Index: cprs/branches/foia-cprs/CPRS-Chart/Options/fOptions.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Options/fOptions.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Options/fOptions.dfm	(revision 460)
@@ -1,11 +1,12 @@
 object frmOptions: TfrmOptions
-  Left = 307
-  Top = 170
+  Left = 315
+  Top = 110
+  Width = 435
+  Height = 397
   HelpContext = 9999
+  VertScrollBar.Range = 360
   BorderIcons = [biSystemMenu, biHelp]
   BorderStyle = bsDialog
   Caption = 'Options'
-  ClientHeight = 363
-  ClientWidth = 427
   Color = clBtnFace
   ParentFont = True
@@ -19,5 +20,5 @@
   object pnlBottom: TPanel
     Left = 0
-    Top = 333
+    Top = 340
     Width = 427
     Height = 30
@@ -66,5 +67,5 @@
     Top = 0
     Width = 427
-    Height = 333
+    Height = 340
     Align = alClient
     BevelOuter = bvNone
@@ -76,5 +77,5 @@
       Top = 5
       Width = 417
-      Height = 323
+      Height = 330
       HelpContext = 9999
       ActivePage = tsListsTeams
@@ -87,5 +88,5 @@
         DesignSize = (
           409
-          295)
+          302)
         object bvlCoverDays: TBevel
           Left = 125
@@ -923,5 +924,5 @@
         DesignSize = (
           409
-          295)
+          302)
         object bvlNotesNotes: TBevel
           Left = 88
@@ -977,5 +978,5 @@
             00000000000000000000000000000000000000000000000000000000}
         end
-        object Image1: TImage
+        object imgNotes: TImage
           Left = 16
           Top = 163
@@ -1111,13 +1112,13 @@
         Caption = 'Reports'
         ImageIndex = 5
-        object Bevel1: TBevel
+        object bvlReports: TBevel
           Left = 80
-          Top = 24
+          Top = 16
           Width = 321
           Height = 2
         end
-        object Image2: TImage
-          Left = 16
-          Top = 48
+        object imgReports: TImage
+          Left = 20
+          Top = 31
           Width = 41
           Height = 41
@@ -1150,7 +1151,19 @@
             FFFFFFFF}
         end
-        object Image3: TImage
+        object bvlReport1: TBevel
+          Left = 104
+          Top = 108
+          Width = 297
+          Height = 2
+        end
+        object bvlReport2: TBevel
+          Left = 104
+          Top = 204
+          Width = 297
+          Height = 2
+        end
+        object imgReport1: TImage
           Left = 16
-          Top = 176
+          Top = 123
           Width = 41
           Height = 41
@@ -1192,13 +1205,86 @@
             00010000000000000200000083000000C7000000FF810000FFC30000}
         end
-        object Bevel2: TBevel
-          Left = 104
-          Top = 160
-          Width = 297
-          Height = 2
-        end
-        object Label3: TMemo
+        object imgReport2: TImage
+          Left = 16
+          Top = 219
+          Width = 41
+          Height = 41
+          Center = True
+          Picture.Data = {
+            055449636F6E0000010001002020000000000000A80800001600000028000000
+            2000000040000000010008000000000080040000000000000000000000010000
+            0000000000000000000080000080000000808000800000008000800080800000
+            C0C0C000C0DCC000F0CAA600CCFFFF0099FFFF0066FFFF0033FFFF00FFCCFF00
+            CCCCFF0099CCFF0066CCFF0033CCFF0000CCFF00FF99FF00CC99FF009999FF00
+            6699FF003399FF000099FF00FF66FF00CC66FF009966FF006666FF003366FF00
+            0066FF00FF33FF00CC33FF009933FF006633FF003333FF000033FF00CC00FF00
+            9900FF006600FF003300FF00FFFFCC00CCFFCC0099FFCC0066FFCC0066FFCC00
+            33FFCC0000FFCC00FFCCCC00CCCCCC0099CCCC0066CCCC0033CCCC0000CCCC00
+            FF99CC00CC99CC009999CC006699CC003399CC000099CC00FF66CC00CC66CC00
+            9966CC006666CC003366CC000066CC00FF33CC00CC33CC009933CC006633CC00
+            3333CC000033CC00FF00CC00CC00CC009900CC006600CC003300CC000000CC00
+            FFFF9900CCFF990099FF990066FF990033FF990000FF9900FFCC9900CCCC9900
+            99CC990066CC990033CC990000CC9900FF999900CC9999009999990066999900
+            3399990000999900FF669900CC66990099669900666699003366990000669900
+            FF339900CC33990099339900663399003333990000339900FF009900CC009900
+            99009900660099003300990000009900FFFF6600CCFF660099FF660066FF6600
+            33FF660000FF6600FFCC6600CCCC660099CC660066CC660033CC660000CC6600
+            FF996600CC99660099996600669966003399660000996600FF666600CC666600
+            99666600666666003366660000666600FF336600CC3366009933660066336600
+            3333660000336600FF006600CC00660099006600660066003300660000006600
+            FFFF3300CCFF330099FF330066FF330033FF330000FF3300FFCC3300CCCC3300
+            99CC330066CC330033CC330000CC3300FF993300CC9933009999330066993300
+            3399330000993300FF663300CC66330099663300666633003366330000663300
+            FF333300CC33330099333300663333003333330000333300FF003300CC003300
+            99003300660033003300330000003300CCFF000099FF000066FF000033FF0000
+            FFCC0000CCCC000099CC000066CC000033CC000000CC0000FF990000CC990000
+            99990000669900003399000000990000FF660000CC6600009966000066660000
+            0066000033660000FF330000CC33000099330000663300003333000000330000
+            CC0000009900000066000000330000000000DD000000BB000000AA0000008800
+            0000770000005500000044000000220000DD000000BB000000AA000000880000
+            00770000005500000044000000220000DDDDDD00555555007777770077777700
+            44444400222222001111110077000000550000004400000022000000F0FBFF00
+            A4A0A000808080000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000
+            FFFFFF000000000000EF000000EFEFEFEFEFEFEF000000000000000000000000
+            0000000000000000EFEF0000EFEFEFEFEFEFEFEFEF00000000000000000000ED
+            ED00000000000000EFEFEF0000000000EFEFEFEFEFEF00000000000000EDEDEB
+            ED00000000000000EFEFEF00ACACAC4FACEF00EFEFEFEF00000000EDEDEBEBEB
+            ED0000000000FB0000000000EFEFEFECEC4FAC00EFEFEF0000EDEDEBEBFFEBEB
+            ED00000000FBFB0AEB0707F7F75D5DEDED4F4F00EF0000EFEDEBEBEBEBF7FFEB
+            ED00000000F1FB00F0EFEFEFECECECECEC4F4FAC00EFEFEFEBEBEBEBEDF7FFEB
+            ED0000000000F0F04FFF4FFFA6A6A6A6FF4FACACACEFEFEFEBEBEBEBEDF7FFEB
+            ED000000000000F04F4FFFA6A64FFF4F4F4FA6ACAC00EFEFEBEBEBEBEDF7FFEB
+            ED000000000000004FA6E4A6A6FF4FFF4F4FA6ACAC00EFEFEFEBEBEBEDF7FFF7
+            ED000000000000004FACE4A6A6A64F4FFF4FA64F4F00EFEFEFEFEBEBEDEDF700
+            ED000000000000EF4FACE4A6ACA6ACACA6A6ACACAC0000EFEFEFEFEB5D000000
+            ED0000000000000000ACE4A6ECECEFEFEFEF00000000FB00EFEFEB00F05DEB00
+            ED00000000000000EF002AE4EDED5D5DF7F70707EB0AFBFB00EBEBFFEBEBEB00
+            ED0000000000000000004FACECECECECECEFEFEFF000FB00EBEBEBFFEBFFFFEB
+            ED00000000000000000000004FACACAC4F00EFEBEB0000EBEBEBEBFFFFF7FFEB
+            ED000000000000000000000000000000EF5DEBEBEB00EBEBEBEBEBEBEDF7FFEB
+            ED000000000000000000000000FFEBEBEBEBEBEBEBEBEBEBEBEBEBEBEDF7FFEB
+            ED000000000000000000000000FFEBEBEBEBEBEBEBEBEBEBEBEBEBEBEDF7FFEB
+            ED000000000000000000000000FFEBEBEBEBEBEBEBEBEBEBEBEBEBEBEDF7FFEB
+            ED000000000000000000000000FFEBEBEBEBEBEBEBEBEBEBEBEBEBEBEDECEBEB
+            ED000000000000000000000000FFEBEBEBEBEBEBEBEBEBEBEBEBEBEBECF7FFFF
+            ED000000000000000000000000FFEBEBEBEBEBEBEBEBEBEBEBEBEBFFFFFF0700
+            00000000000000000000000000FFEBEBEBEBEBEBEBEBEBEBEBFFFFFF07000000
+            00000000000000000000000000FFEBEBEBEBEBEBEBEBEBFFFFFF070000000000
+            00000000000000000000000000FFEBEBEBEBEBEBEBFFFFFF0700000000000000
+            00000000000000000000000000FFEBEBEBEBEBFFFFFF07000000000000000000
+            00000000000000000000000000FFEBEBEBFFFFFF070000000000000000000000
+            00000000000000000000000000FFEBFFFFFF0700000000000000000000000000
+            00000000000000000000000000FFFFFF07000000000000000000000000000000
+            00000000000000000000000000EB070000000000000000000000000000000000
+            0000000000000000000000000000000000000000000000000000000000000000
+            00000000FB80FFE7F3007F83E1003E03C0001803800000030000000380000003
+            C0000003E0000003E0000003E0000003E0000003F0000003F0000003F8000003
+            FC000003FF000003FF000003FF000003FF000003FF000003FF000003FF000007
+            FF00001FFF00007FFF0001FFFF0007FFFF001FFFFF007FFFFF01FFFFFF07FFFF
+            FF9FFFFF}
+        end
+        object memReports: TMemo
           Left = 128
-          Top = 48
+          Top = 27
           Width = 273
           Height = 41
@@ -1213,7 +1299,7 @@
           TabOrder = 4
         end
-        object Label4: TMemo
+        object memReport1: TMemo
           Left = 128
-          Top = 184
+          Top = 121
           Width = 273
           Height = 49
@@ -1228,7 +1314,7 @@
           TabOrder = 5
         end
-        object Label1: TStaticText
+        object lblReports: TStaticText
           Left = 13
-          Top = 16
+          Top = 9
           Width = 55
           Height = 17
@@ -1236,7 +1322,7 @@
           TabOrder = 2
         end
-        object Label2: TStaticText
-          Left = 13
-          Top = 152
+        object lblReport1: TStaticText
+          Left = 9
+          Top = 101
           Width = 89
           Height = 17
@@ -1244,21 +1330,206 @@
           TabOrder = 3
         end
-        object Button1: TButton
+        object btnReports: TButton
           Left = 200
-          Top = 104
+          Top = 76
           Width = 193
           Height = 22
           Caption = 'Set All Reports...'
           TabOrder = 0
-          OnClick = Button1Click
-        end
-        object Button2: TButton
+          OnClick = btnReportsClick
+        end
+        object btnReport1: TButton
           Left = 200
-          Top = 240
+          Top = 167
           Width = 193
           Height = 22
           Caption = 'Set Individual Report...'
           TabOrder = 1
-          OnClick = Button2Click
+          OnClick = btnReport1Click
+        end
+        object lblReport2: TStaticText
+          Left = 5
+          Top = 197
+          Width = 91
+          Height = 17
+          Caption = 'Remote Data Tool'
+          TabOrder = 6
+        end
+        object memReport2: TMemo
+          Left = 128
+          Top = 213
+          Width = 273
+          Height = 28
+          TabStop = False
+          BorderStyle = bsNone
+          Color = clBtnFace
+          Lines.Strings = (
+            'Change the default tool for viewing Remote Patient Data')
+          ReadOnly = True
+          TabOrder = 7
+        end
+        object rdoRDV: TRadioGroup
+          Left = 120
+          Top = 244
+          Width = 277
+          Height = 37
+          Hint = 'Select RDV for Remote Data Views (classic) or WebVista'
+          Caption = 'How do you want to view remote data'
+          Columns = 2
+          ItemIndex = 0
+          Items.Strings = (
+            'RDV (Classic)'
+            'VistaWeb')
+          TabOrder = 8
+          OnClick = rdoRDVClick
+        end
+      end
+      object tsGraphs: TTabSheet
+        Caption = 'Graphs'
+        ImageIndex = 6
+        DesignSize = (
+          409
+          302)
+        object bvlGraphSettings: TBevel
+          Left = 104
+          Top = 16
+          Width = 297
+          Height = 2
+        end
+        object imgGraphSettings: TImage
+          Left = 16
+          Top = 163
+          Width = 41
+          Height = 41
+          Center = True
+          Picture.Data = {
+            055449636F6E0000010001002020100000000000E80200001600000028000000
+            2000000040000000010004000000000080020000000000000000000000000000
+            0000000000000000000080000080000000808000800000008000800080800000
+            80808000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000
+            FFFFFF0000000000000000000000000000000000007070707070707070707070
+            7070700007FFFFFFFFFFFFFFFFFFFFFFFFFF000007F000000000000000000000
+            0000700007F7888788878887888788878888000007FFFFFF9FFFFF9FFFF9FFFF
+            FFFF700007FFFFFFFFFFFFFFFFFFFFFFFFFF000007FFFF999999F99970707070
+            7070707007FFFFFFFFFFFFFF788888888887878007FFFBBBBBBBBBBB78878787
+            88FFFF7707FFFFCCCCCCFCCC78F000088887878007FFFFFFFFFFFFFF77FFFFF7
+            88FFFF7707FFFFFFFFFFFFFF78F000088888888007FFFFFFFFFFFFFF77FFFFF7
+            8887878707FFFFFFFFFFFFFF78F0000888FFFF7007FFFFFFFFFFFFFF77FFFFF7
+            8888888707F000000000000078F000088887878007F788878887888777FFFFF7
+            88F0FF7707F7FFFFFFFFFFFF788888888888888007F7FF9FFFFFFFFF77878787
+            8787878707F7FF9FFFFFFFFF777777777777777007F7FFF9FFFFFFFFF9F9FFFF
+            FFF9700007F7FFF9FFFFFFFF9FF99FFFFF9F000007F7FFFF9FFFFFFF9FFFF9FF
+            F99F700007F7FFFF9FFFFFF9FFFFF99F9FFF000007F7FFFFF9FFFF9FFFFFFFF9
+            9FFF700007F7FFFFF9FF99FFFFFFFFF9FFFF000007F7FFFFFF999FFFFFFFFFFF
+            FFFF700007F7FFFFFFF9FFFFFFFFFFFFFFFF000007FFFFFFFFFFFFFFFFFFFFFF
+            FFFF700007777777777777777777777777770000000000000000000000000000
+            00000000FFFFFFFF800000078000000780000007800000078000000780000007
+            8000000080000000800000008000000080000000800000008000000080000000
+            8000000080000000800000008000000080000000800000008000000780000007
+            8000000780000007800000078000000780000007800000078000000780000007
+            FFFFFFFF}
+        end
+        object bvlGraphViews: TBevel
+          Left = 104
+          Top = 155
+          Width = 297
+          Height = 2
+        end
+        object imgGraphViews: TImage
+          Left = 16
+          Top = 27
+          Width = 41
+          Height = 41
+          Center = True
+          Picture.Data = {
+            055449636F6E0000010001002020100000000000E80200001600000028000000
+            2000000040000000010004000000000080020000000000000000000000000000
+            0000000000000000000080000080000000808000800000008000800080800000
+            80808000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000
+            FFFFFF0000000000000070707707070707070700000000000000788888888888
+            888888700707070707077878788787887878880007FFFFFFFFFF788787887878
+            8787887007F0000000007888888888888888880007F08888888878FFFF8FFFF8
+            FFFF887007F08FFFFFFF7878787878787878780007F08F999999788888888888
+            8888887007F08FFFFFFF787F0F8FFFF8FFFF880007F08BBBBBBB78FFFF8FFFF8
+            FFFF887007F08F222222787F7F8FFFF8FFFF880007F08FFFFFFF78FFFF8FFFF8
+            FFFF887007F08FFFFFFF787F0F8FFFF8FFFF880007FFFFFFFFFF78FFFF8FFFF8
+            FFFF887007FFFFFFFFFF787F7F8FFFF8FFFF880007FFFFFFFFFF78FFFF8FFFF8
+            FFFF887007F000000000787F0F8FFFF87F0F880007F08888888878FFFF8FFFF8
+            FFFF887007F08FFFFFFF787F7F87F0F87F0F880007F08F9FFFFF78FFFF8FFFF8
+            FFFF887007F08F9FFFFF7888888888888888880007F08FF9FFFF787878878788
+            7878887007F08FF9FFFF7777777777777777770007F08FFF9FFFFFFFF9FFFF9F
+            FFF0000007F08FFF9FFFFFFF9FFFFFF9FFF0000007F08FFFF9FFFF99FFFFFFFF
+            9FF7000007F08FFFF9FF99FFFFFFFFFFF9F0000007F08FFFFF99FFFFFFFFFFFF
+            FFF7000007F08FFFFFFFFFFFFFFFFFFFFFF0000007FFFFFFFFFFFFFFFFFFFFFF
+            FFF7000007777777777777777777777777700000000000000000000000000000
+            00000000FFF00001FFF000018000000180000001800000018000000180000001
+            8000000180000001800000018000000180000001800000018000000180000001
+            8000000180000001800000018000000180000001800000018000000180000001
+            8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F
+            FFFFFFFF}
+        end
+        object lblGraphSettings: TStaticText
+          Left = 13
+          Top = 145
+          Width = 79
+          Height = 17
+          Caption = 'Default Settings'
+          TabOrder = 0
+        end
+        object btnGraphSettings: TButton
+          Left = 200
+          Top = 235
+          Width = 193
+          Height = 22
+          Caption = 'Default Graph Settings...'
+          TabOrder = 1
+          OnClick = btnGraphSettingsClick
+        end
+        object lblGraphViews: TStaticText
+          Left = 13
+          Top = 9
+          Width = 79
+          Height = 17
+          Caption = 'View Definitions'
+          TabOrder = 2
+        end
+        object btnGraphViews: TButton
+          Left = 200
+          Top = 100
+          Width = 193
+          Height = 22
+          Caption = 'View Definitions...'
+          TabOrder = 3
+          OnClick = btnGraphViewsClick
+        end
+        object memGraphSettings: TMemo
+          Left = 125
+          Top = 167
+          Width = 275
+          Height = 66
+          TabStop = False
+          BorderStyle = bsNone
+          Color = clBtnFace
+          Lines.Strings = (
+            'Configure default settings for graphs. Changes can be '
+            'made to the types of data displayed and the styles of '
+            'presentation. These settings are saved as your default.')
+          ReadOnly = True
+          TabOrder = 4
+        end
+        object memGraphViews: TMemo
+          Left = 125
+          Top = 27
+          Width = 275
+          Height = 68
+          TabStop = False
+          Anchors = [akLeft, akTop, akRight]
+          BorderStyle = bsNone
+          Color = clBtnFace
+          Lines.Strings = (
+            'Define collections of data as views. Views are used for '
+            'common selections of multiple items.')
+          ReadOnly = True
+          TabOrder = 5
         end
       end
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.
 
Index: cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsOther.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsOther.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsOther.dfm	(revision 460)
@@ -196,9 +196,10 @@
   end
   object txtTodayMinus: TStaticText
-    Left = 32
+    Left = 38
     Top = 321
-    Width = 79
-    Height = 17
-    Caption = 'TODAY MINUS'
+    Width = 64
+    Height = 17
+    Alignment = taRightJustify
+    Caption = 'Today minus'
     Color = clBtnFace
     ParentColor = False
@@ -219,9 +220,9 @@
   end
   object txtDaysMinus: TStaticText
-    Left = 176
+    Left = 178
     Top = 322
-    Width = 36
-    Height = 17
-    Caption = ' DAYS'
+    Width = 26
+    Height = 17
+    Caption = 'days'
     Color = clBtnFace
     ParentColor = False
@@ -244,9 +245,9 @@
   end
   object txtDaysPlus: TStaticText
-    Left = 178
+    Left = 180
     Top = 374
-    Width = 36
-    Height = 17
-    Caption = ' DAYS'
+    Width = 26
+    Height = 17
+    Caption = 'days'
     Color = clBtnFace
     ParentColor = False
@@ -282,9 +283,10 @@
   end
   object txtTodayPlus: TStaticText
-    Left = 42
+    Left = 46
     Top = 372
-    Width = 72
-    Height = 17
-    Caption = 'TODAY PLUS'
+    Width = 56
+    Height = 17
+    Alignment = taRightJustify
+    Caption = 'Today plus'
     Color = clBtnFace
     ParentColor = False
Index: cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsOther.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsOther.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsOther.pas	(revision 460)
@@ -52,5 +52,5 @@
     FstopDt: TFMDateTime;
     FEncStartDays, FEncStopDays, FEncDefStartDays, FEncDefStopDays: integer;
-    FDefaultEvent: string;
+    //FDefaultEvent: string;
   public
     { Public declarations }
Index: cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsReportsCustom.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsReportsCustom.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsReportsCustom.dfm	(revision 460)
@@ -1,5 +1,5 @@
 object frmOptionsReportsCustom: TfrmOptionsReportsCustom
-  Left = 468
-  Top = 4
+  Left = 414
+  Top = 329
   BorderIcons = [biSystemMenu, biHelp]
   BorderStyle = bsDialog
Index: cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsReportsCustom.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsReportsCustom.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsReportsCustom.pas	(revision 460)
@@ -205,7 +205,8 @@
       odbStop.Visible := False;
       edtMax.Visible := False;
+      ShowEditor(grdReport.Col, grdReport.Row, #0);
     end;
   if Key in [#32..#127] then ShowEditor(grdReport.Col, grdReport.Row, Key);
-  signal := 0;
+ signal := 0;
 end;
 
@@ -291,4 +292,5 @@
         begin
           Val(newValue, I, code);
+          if I = 0 then begin end; //added to keep compiler from generating a hint
           if code <> 0 then
              begin
Index: cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsReportsDefault.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsReportsDefault.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsReportsDefault.dfm	(revision 460)
@@ -1,5 +1,5 @@
 object frmOptionsReportsDefault: TfrmOptionsReportsDefault
-  Left = 604
-  Top = 172
+  Left = 773
+  Top = 334
   BorderIcons = [biSystemMenu, biHelp]
   BorderStyle = bsDialog
Index: cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsReportsDefault.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsReportsDefault.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsReportsDefault.pas	(revision 460)
@@ -200,4 +200,5 @@
     begin
       Val(newValue, I, code);
+      if I = 0 then begin end; //added to keep compiler from generating a hint
       if code <> 0 then
         begin
Index: cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsTeams.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsTeams.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsTeams.dfm	(revision 460)
@@ -208,4 +208,6 @@
     OnClick = cboSubscribeClick
     OnKeyDown = cboSubscribeKeyDown
+    OnMouseClick = cboSubscribeMouseClick
+    CharsNeedMatch = 1
   end
   object mnuPopPatient: TPopupMenu
Index: cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsTeams.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsTeams.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsTeams.pas	(revision 460)
@@ -37,4 +37,5 @@
     procedure cboSubscribeKeyDown(Sender: TObject; var Key: Word;
       Shift: TShiftState);
+    procedure cboSubscribeMouseClick(Sender: TObject);
   private
     FKeyBoarding: boolean;
@@ -224,4 +225,50 @@
 procedure TfrmOptionsTeams.cboSubscribeClick(Sender: TObject);
 begin
+  FKeyBoarding := False
+end;
+
+procedure TfrmOptionsTeams.btnRemoveClick(Sender: TObject);
+begin
+  with lstTeams do
+    if InfoBox('Do you want to remove yourself from '
+      + Piece(Items[ItemIndex], '^', 2) + '?',
+      'Confirmation', MB_YESNO or MB_ICONQUESTION) = IDYES then
+  begin
+    rpcRemoveList(ItemIEN);
+    Items.Delete(ItemIndex);
+    lstTeamsClick(self);
+    FillATeams;
+  end;
+end;
+
+procedure TfrmOptionsTeams.mnuPatientIDClick(Sender: TObject);
+begin
+  DisplayPtInfo(lstPatients.ItemID);
+end;
+
+procedure TfrmOptionsTeams.lstPatientsMouseDown(Sender: TObject;
+  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+begin
+  mnuPopPatient.AutoPopup := (lstPatients.Items.Count > 0)
+                              and (lstPatients.ItemIndex > -1)
+                              and (Button = mbRight);
+end;
+
+procedure TfrmOptionsTeams.cboSubscribeKeyDown(Sender: TObject;
+  var Key: Word; Shift: TShiftState);
+begin
+  case Key of VK_RETURN:
+    if (cboSubscribe.ItemIndex > -1) then
+    begin
+      FKeyBoarding := False;
+      cboSubscribeMouseClick(self); // Provide onmouseclick behavior.
+    end;
+  else
+    FKeyBoarding := True; // Suppress onmouseclick behavior.
+  end;
+end;
+
+procedure TfrmOptionsTeams.cboSubscribeMouseClick(Sender: TObject);
+begin
   if FKeyBoarding then
     FKeyBoarding := False
@@ -229,5 +276,7 @@
   begin
     with cboSubscribe do
-    if InfoBox('Do you want to join '
+    if ItemIndex < 0 then
+      exit
+    else if InfoBox('Do you want to join '
       + Piece(Items[ItemIndex], '^', 2) + '?',
       'Confirmation', MB_YESNO or MB_ICONQUESTION) = IDYES then
@@ -249,41 +298,3 @@
 end;
 
-procedure TfrmOptionsTeams.btnRemoveClick(Sender: TObject);
-begin
-  with lstTeams do
-    if InfoBox('Do you want to remove yourself from '
-      + Piece(Items[ItemIndex], '^', 2) + '?',
-      'Confirmation', MB_YESNO or MB_ICONQUESTION) = IDYES then
-  begin
-    rpcRemoveList(ItemIEN);
-    Items.Delete(ItemIndex);
-    lstTeamsClick(self);
-    FillATeams;
-  end;
-end;
-
-procedure TfrmOptionsTeams.mnuPatientIDClick(Sender: TObject);
-begin
-  DisplayPtInfo(lstPatients.ItemID);
-end;
-
-procedure TfrmOptionsTeams.lstPatientsMouseDown(Sender: TObject;
-  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
-begin
-  mnuPopPatient.AutoPopup := (lstPatients.Items.Count > 0)
-                              and (lstPatients.ItemIndex > -1)
-                              and (Button = mbRight);
-end;
-
-procedure TfrmOptionsTeams.cboSubscribeKeyDown(Sender: TObject;
-  var Key: Word; Shift: TShiftState);
-begin
-  case Key of VK_RETURN:
-    if (lstTeams.ItemIndex > 0) then
-      cboSubscribeClick(self); // Provide onclick behavior.
-  else
-    FKeyBoarding := True; // Suppress onclick behavior.
-  end;
-end;
-
 end.
