Procedure

TfrmGraphs.CheckProfile

Module

fGraphs

Last Modified

7/15/2014 3:26:36 PM

Visibility

Private

Owner

TfrmGraphs

Declaration

procedure CheckProfile(var aProfile: string; var Updated: boolean);

Calls Hierarchy


TfrmGraphs.CheckProfile
 ├GetGraphProfiles
 │ └rpcGetGraphProfiles
 │   └onoff
 ├GetATestGroup
 │ └rpcATestGroup
 ├TfrmGraphs.ExpandTax
 │ └rpcTaxonomy
 │   └onoff
 └TfrmGraphs.LoadDisplayCheck
   ├TfrmGraphs.TypeIsLoaded
   ├TfrmGraphs.LoadType
   │ ├TfrmGraphs.FileNameX
   │ └rpcGetItems
   │   └onoff
   ├TfrmGraphs.TypeIsDisplayed
   └TfrmGraphs.DisplayType
     └TfrmGraphs.FileNameX

Called-By Hierarchy


                                TfrmGraphs.CheckProfile
                               TfrmGraphs.ViewsChange┘ 
                       TfrmGraphs.lstViewsTopChange┤   
                            TfrmGraphs.Initialize┤ │   
                         TfrmFrame.ClearPatient┤ │ │   
                       TfrmFrame.SetupPatient┘ │ │ │   
                  UpdatePatientInfoForAlert┤   │ │ │   
               TfrmFrame.mnuFileNextClick┘ │   │ │ │   
             TfrmFrame.mnuFileOpenClick┤   │   │ │ │   
                 TfrmFrame.UMInitiate┤ │   │   │ │ │   
        TfrmFrame.mnuFileNextClick...┤ │   │   │ │ │   
        TfrmFrame.mnuFileRefreshClick┤ │   │   │ │ │   
        TfrmOrders.CheckOrderStatus┤ │ │   │   │ │ │   
    TfrmOrders.mnuActChgEvntClick┤ │ │ │   │   │ │ │   
       TfrmOrders.mnuActHoldClick┤ │ │ │   │   │ │ │   
     TfrmOrders.mnuActUnholdClick┤ │ │ │   │   │ │ │   
      TfrmOrders.mnuActRenewClick┤ │ │ │   │   │ │ │   
     TfrmOrders.mnuActChangeClick┤ │ │ │   │   │ │ │   
       TfrmOrders.mnuActCopyClick┘ │ │ │   │   │ │ │   
             TfrmMeds.mnuActDCClick┤ │ │   │   │ │ │   
            TfrmMeds.CheckMedStatus┘ │ │   │   │ │ │   
         TfrmMeds.mnuActHoldClick┤   │ │   │   │ │ │   
        TfrmMeds.mnuActRenewClick┤   │ │   │   │ │ │   
       TfrmMeds.mnuActUnholdClick┤   │ │   │   │ │ │   
       TfrmMeds.mnuActChangeClick┤   │ │   │   │ │ │   
         TfrmMeds.mnuActCopyClick┤   │ │   │   │ │ │   
       TfrmMeds.mnuActRefillClick┘   │ │   │   │ │ │   
                   TfrmFrame.ViewInfo┘ │   │   │ │ │   
                TfrmDCSumm.ViewInfo┤   │   │   │ │ │   
              TfrmConsults.ViewInfo┤   │   │   │ │ │   
      TfrmFrame.pnlRemindersMouseUp┤   │   │   │ │ │   
       TfrmFrame.RemindersChanged┘ │   │   │   │ │ │   
           TfrmFrame.FormCreate┘   │   │   │   │ │ │   
             TfrmFrame.pnlCIRNClick┤   │   │   │ │ │   
       TfrmFrame.pnlVistaWebClick┤ │   │   │   │ │ │   
            TfrmFrame.FormKeyDown┘ │   │   │   │ │ │   
          TfrmFrame.pnlPatientClick┤   │   │   │ │ │   
            TfrmFrame.pnlVisitClick┤   │   │   │ │ │   
      TfrmFrame.pnlPrimaryCareClick┤   │   │   │ │ │   
        TfrmFrame.pnlRemindersClick┤   │   │   │ │ │   
         TfrmFrame.pnlPostingsClick┤   │   │   │ │ │   
             TfrmFrame.pnlFlagClick┤   │   │   │ │ │   
               TfrmFrame.laMHVClick┤   │   │   │ │ │   
              TfrmFrame.laVAA2Click┤   │   │   │ │ │   
                TfrmOrders.ViewInfo┤   │   │   │ │ │   
                  TfrmMeds.ViewInfo┤   │   │   │ │ │   
               TfrmSurgery.ViewInfo┤   │   │   │ │ │   
                 TfrmNotes.ViewInfo┤   │   │   │ │ │   
              TfrmProblems.ViewInfo┘   │   │   │ │ │   
      TfrmFrame.mnuFileNotifRemoveClick┤   │   │ │ │   
              TfrmFrame.NextButtonClick┘   │   │ │ │   
            TfrmFrame.SetUpNextButton┘     │   │ │ │   
      TfrmFrame.mnuFileOpenClick...┤       │   │ │ │   
               TfrmFrame.FormResize┘       │   │ │ │   
             TfrmFrame.ChangeFont┘         │   │ │ │   
     TfrmFrame.LoadSizesForUser┤           │   │ │ │   
TfrmFrame.LoadUserPreferences┘ │           │   │ │ │   
       TfrmFrame.UMInitiate┘   │           │   │ │ │   
     TfrmFrame.mnuFontSizeClick┘           │   │ │ │   
              TfrmFrame.mnuFileOpenClick...┤   │ │ │   
           TfrmFrame.AllowCCOWContextChange┤   │ │ │   
            TfrmFrame.mnuFileNextClick...┤ │   │ │ │   
            TfrmFrame.mnuFileOpenClick...┤ │   │ │ │   
   TfrmFrame.mnuFileResumeContextSetClick┘ │   │ │ │   
                TfrmFrame.UpdateCCOWContext┤   │ │ │   
            TfrmFrame.mnuFileOpenClick...┤ │   │ │ │   
          TfrmFrame.ctxContextorCommitted┤ │   │ │ │   
           TfrmFrame.StartCCOWContextor┘ │ │   │ │ │   
                 TfrmFrame.FormCreate┘   │ │   │ │ │   
   TfrmFrame.mnuFileResumeContextGetClick┘ │   │ │ │   
     TfrmFrame.mnuFileResumeContextSetClick┘   │ │ │   
                TfrmFrame.mnuToolsGraphingClick┤ │ │   
                         TfrmLabs.grdLabClick┤ │ │ │   
                      TfrmLabs.tvReportsClick┤ │ │ │   
                       TfrmLabs.DisplayPage┤ │ │ │ │   
                      TfrmLabs.LoadTreeView┤ │ │ │ │   
                     TfrmLabs.DisplayPage┤ │ │ │ │ │   
   TfrmOptionsReportsCustom.btnApplyClick┘ │ │ │ │ │   
    TfrmOptionsReportsCustom.btnOKClick┘   │ │ │ │ │   
                TfrmLabs.cmdOtherTestsClick┤ │ │ │ │   
                   TfrmLabs.chkMaxFreqClick┤ │ │ │ │   
              TfrmLabs.ProcessNotifications┤ │ │ │ │   
                     TfrmLabs.DisplayPage┘ │ │ │ │ │   
                                  ..(rec)..┤ │ │ │ │   
                  TfrmLabs.tvReportsKeyDown┤ │ │ │ │   
            TfrmFrame.lstCIRNLocationsClick┘ │ │ │ │   
                      TfrmFrame.SetUpCIRN┘   │ │ │ │   
              TfrmFrame.SetupPatient...┘     │ │ │ │   
                                    ..(rec)..┘ │ │ │   
                        TfrmReports.ClearPtData┤ │ │   
                    TfrmFrame.ClearPatient...┘ │ │ │   
                              TfrmReports.Graph┘ │ │   
                   TfrmReports.tvReportsClick┘   │ │   
         TfrmFrame.lstCIRNLocationsClick...┤     │ │   
                    TfrmReports.DisplayPage┤     │ │   
                   TfrmReports.LoadTreeView┤     │ │   
                  TfrmReports.DisplayPage┤ │     │ │   
     TfrmOptionsReportsDefault.btnOKClick┤ │     │ │   
  TfrmOptionsReportsDefault.btnResetClick┤ │     │ │   
TfrmOptionsReportsCustom.btnApplyClick...┘ │     │ │   
           TfrmReports.ProcessNotifications┤     │ │   
                  TfrmReports.DisplayPage┘ │     │ │   
               TfrmReports.tvReportsKeyDown┤     │ │   
            TfrmReports.tvProceduresKeyDown┤     │ │   
                TfrmReports.chkMaxFreqClick┤     │ │   
       TfrmOptionsReportsDefault.btnOKClick┤     │ │   
    TfrmOptionsReportsDefault.btnResetClick┤     │ │   
  TfrmOptionsReportsCustom.btnApplyClick...┘     │ │   
                           TfrmGraphs.GraphSwitch┤ │   
                           TfrmGraphs.GraphSwap┘ │ │   
              TfrmGraphs.mnuPopGraphSwapClick┘   │ │   
                    TfrmGraphs.cboDateRangeChange┤ │   
                  TfrmReports.lstDateRangeClick┤ │ │   
                       TfrmReports.GraphPanel┘ │ │ │   
                       TfrmReports.Graph...┤   │ │ │   
              TfrmReports.tvReportsClick...┘   │ │ │   
                       TfrmGraphs.Initialize...┤ │ │   
                            TfrmGraphs.FormShow┤ │ │   
              TfrmGraphs.btnChangeSettingsClick┤ │ │   
               TfrmReports.btnChangeViewClick┘ │ │ │   
                   TfrmGraphs.CheckExpandedLabs┤ │ │   
                        TfrmGraphs.ItemsClick┘ │ │ │   
                     TfrmGraphs.DisplayData┤   │ │ │   
                TfrmFrame.ClearPatient...┤ │   │ │ │   
               TfrmReports.ClearPtData...┤ │   │ │ │   
                     TfrmReports.Graph...┤ │   │ │ │   
              TfrmGraphs.chkItemsTopClick┤ │   │ │ │   
           TfrmGraphs.chkItemsBottomClick┤ │   │ │ │   
       TfrmGraphs.mnuPopGraphIsolateClick┤ │   │ │ │   
         TfrmGraphs.cboDateRangeChange...┤ │   │ │ │   
                 TfrmGraphs.ItemsClick...┤ │   │ │ │   
                TfrmGraphs.ViewsChange...┤ │   │ │ │   
        TfrmGraphs.mnuPopGraphRemoveClick┘ │   │ │ │   
             TfrmGraphs.lvwItemsBottomClick┤   │ │ │   
                 TfrmGraphs.Initialize...┤ │   │ │ │   
                  TfrmGraphs.CheckContext┤ │   │ │ │   
                    TfrmGraphs.FormShow┘ │ │   │ │ │   
             TfrmGraphs.chkDualViewsClick┤ │   │ │ │   
               TfrmGraphs.Initialize...┤ │ │   │ │ │   
                    TfrmGraphs.FormShow┤ │ │   │ │ │   
                                 Layout┤ │ │   │ │ │   
                   TfrmGraphs.GetSize┘ │ │ │   │ │ │   
                TfrmGraphs.FormShow┘   │ │ │   │ │ │   
   TfrmGraphs.mnuPopGraphDualViewsClick┤ │ │   │ │ │   
              TfrmGraphs.ViewSelections┘ │ │   │ │ │   
        TfrmReports.tvReportsClick...┤   │ │   │ │ │   
   TfrmGraphs.btnGraphSelectionsClick┘   │ │   │ │ │   
TfrmReports.btnGraphSelectionsClick┘     │ │   │ │ │   
                TfrmGraphs.GraphSwitch...┤ │   │ │ │   
                    TfrmGraphs.SplitClick┤ │   │ │ │   
       TfrmGraphs.mnuPopGraphSplitClick┘ │ │   │ │ │   
         TfrmGraphs.mnuPopGraphClearClick┤ │   │ │ │   
                    TfrmGraphs.AutoSelect┤ │   │ │ │   
              TfrmGraphs.ViewsChange...┘ │ │   │ │ │   
          TfrmGraphs.lvwItemsBottomChange┘ │   │ │ │   
                TfrmGraphs.lvwItemsTopClick┘   │ │ │   
                 TfrmGraphs.Initialize...┤     │ │ │   
                      TfrmGraphs.FormShow┤     │ │ │   
          TfrmGraphs.chkDualViewsClick...┤     │ │ │   
                TfrmGraphs.GraphSwitch...┤     │ │ │   
                 TfrmGraphs.SplitClick...┤     │ │ │   
         TfrmGraphs.mnuPopGraphClearClick┤     │ │ │   
                 TfrmGraphs.AutoSelect...┤     │ │ │   
         TfrmGraphs.mnuPopGraphResetClick┤     │ │ │   
                    TfrmGraphs.FormShow┤ │     │ │ │   
  TfrmGraphs.mnuPopGraphHorizontalClick┤ │     │ │ │   
    TfrmGraphs.mnuPopGraphVerticalClick┤ │     │ │ │   
      TfrmGraphs.mnuPopGraphRemoveClick┤ │     │ │ │   
    TfrmGraphs.mnuPopGraphZoomBackClick┘ │     │ │ │   
             TfrmGraphs.lvwItemsTopChange┘     │ │ │   
                      TfrmGraphs.ViewsChange...┤ │ │   
           TfrmGraphs.mnuPopGraphMergeLabsClick┘ │ │   
                     TfrmGraphs.ViewSelections...┘ │   
                    TfrmGraphs.lstViewsBottomChange┘   
                         TfrmGraphs.Initialize...┤     
                        TfrmGraphs.GraphSwitch...┤     
                 TfrmGraphs.cboDateRangeChange...┤     
                     TfrmGraphs.ViewSelections...┘     

Calls

Name Declaration Comments
TfrmGraphs.ExpandTax function ExpandTax(profile: string): string; -
GetATestGroup function GetATestGroup(testgroup: Integer; userx: int64): TStrings; -
GetGraphProfiles function GetGraphProfiles(profiles, permission: string; ext: integer; userx: int64): TStrings; -
TfrmGraphs.LoadDisplayCheck procedure LoadDisplayCheck(typeofitem: string; var updated: boolean); -

Called-By

Name Declaration Comments
TfrmGraphs.ViewsChange procedure ViewsChange(aListView: TListView; aListBox: TORListBox; aSection: string); -


Source

5517  procedure TfrmGraphs.CheckProfile(var aProfile: string; var Updated: boolean);
5518  var
5519    i, j: integer;
5520    itempart, itempart1, itempart2, profile, profilename, profiletype, xprofile: string;
5521  begin
5522    Application.ProcessMessages;
5523    profiletype := Piece(aProfile, '^', 1);
5524    profilename := Piece(aProfile, '^', 2);
5525    if profiletype = VIEW_PUBLIC then
5526      FastAssign(GetGraphProfiles(UpperCase(profilename), '1', 0, 0), GtslTemp)
5527    else if profiletype = VIEW_PERSONAL then
5528      FastAssign(GetGraphProfiles(UpperCase(profilename), '0', 0, User.DUZ), GtslTemp)
5529    else if profiletype = VIEW_LABS then
5530    begin
5531      FastAssign(GetATestGroup(strtoint(Piece(aProfile, '^', 3)), strtoint(Piece(aProfile, '^', 4))), GtslTemp);
5532      aProfile := VIEW_LABS + '^' + Piece(aProfile, '^', 2) + '^';
5533      for i := 0 to GtslTemp.Count - 1 do
5534        aProfile := aProfile + '63~' + Piece(GtslTemp[i], '^', 1) + '~|';
5535      GtslTemp.Clear;
5536    end;
5537    if profiletype <> '' then
5538    begin
5539      for i := 0 to GtslTemp.Count - 1 do
5540        aProfile := aProfile + GtslTemp[i];
5541      GtslTemp.Clear;
5542    end;
5543    Updated := false;
5544    profile := UpperCase(Piece(aProfile, '^', 3));
5545    xprofile := ExpandTax(profile);
5546    if xprofile <> profile then
5547    begin                                         // taxonomies
5548      profile := xprofile;
5549      LoadDisplayCheck('45DX', Updated);
5550      LoadDisplayCheck('45OP', Updated);
5551      LoadDisplayCheck('9000010.07', Updated);
5552      LoadDisplayCheck('9000010.18', Updated);
5553      LoadDisplayCheck('9000011', Updated);
5554      //LoadDisplayCheck('9999911', Updated);   // problems as durations not being used
5555    end;
5556    aProfile := Pieces(aProfile, '^', 1, 2) + '^' + profile;
5557    for j := 1 to BIG_NUMBER do
5558    begin
5559      itempart := Piece(profile, '|', j);
5560      if itempart = '' then break;
5561      itempart1 := Piece(itempart, '~', 1);
5562      itempart2 := Piece(itempart, '~', 2);
5563      if itempart1 = '0' then                      // <any> type
5564        LoadDisplayCheck(itempart2, Updated)
5565      else if itempart1 = '50.605' then            // drug class
5566      begin
5567        LoadDisplayCheck('52', Updated);
5568        LoadDisplayCheck('55', Updated);
5569        LoadDisplayCheck('55NVA', Updated);
5570        LoadDisplayCheck('53.79', Updated);
5571      end
5572      else if itempart1 <> '0' then                // all others
5573        LoadDisplayCheck(itempart1, Updated);
5574    end;
5575  end;