Function

TfrmGraphs.ExpandTax

Module

fGraphs

Last Modified

7/15/2014 3:26:36 PM

Visibility

Private

Owner

TfrmGraphs

Declaration

function ExpandTax(profile: string): string;

Calls Hierarchy


TfrmGraphs.ExpandTax
 └rpcTaxonomy
   └onoff

Called-By Hierarchy


                                     TfrmGraphs.ExpandTax
                                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
rpcTaxonomy function rpcTaxonomy(alltax: boolean; taxonomies: TStrings): TStrings; -

Called-By

Name Declaration Comments
TfrmGraphs.CheckProfile procedure CheckProfile(var aProfile: string; var Updated: boolean); -


Source

5467  function TfrmGraphs.ExpandTax(profile: string): string;
5468  var
5469    i: integer;
5470    itempart, itempart1, itempart2, newprofile: string;
5471    expandedcodes: TStrings;
5472    taxonomies: TStrings;
5473    taxonomycodes: TStrings;
5474  begin    //  '811.2~123~|0~63~|' or '55~12~|0~811.2~|0~63~|'
5475    Result := profile;
5476    if Pos('811.2~', profile) = 0 then exit;
5477    taxonomies := TStringList.Create;
5478    expandedcodes := TStringList.Create;
5479    taxonomycodes := TStringList.Create;
5480    newprofile := '';
5481    for i := 1 to BIG_NUMBER do
5482    begin
5483      itempart := Piece(profile, '|', i);
5484      if length(itempart) = 0 then break;
5485      if Pos('811.2~', itempart) = 0 then
5486        newprofile := newprofile + '|'
5487      else
5488        taxonomies.Add(itempart);
5489    end;
5490    for i := 0 to taxonomies.Count -1 do
5491    begin
5492      itempart := taxonomies[i];
5493      if (Piece(itempart, '~', 1) = '0') and (Piece(itempart, '~', 2) = '811.2') then
5494      begin
5495        // this is Reminder Taxonomy <any> and would bring back a ton of codes
5496        //FastAssign(rpcTaxonomy(true, nil), expandedcodes);
5497        break;
5498      end
5499      else if Piece(itempart, '~', 1) = '811.2' then
5500        taxonomycodes.Add(Piece(itempart, '~', 2));
5501    end;
5502    if taxonomycodes.Count > 0 then
5503      FastAssign(rpcTaxonomy(false, taxonomycodes), expandedcodes);
5504    for i := 1 to expandedcodes.Count -1 do
5505    begin
5506      itempart := expandedcodes[i];
5507      itempart1 := Piece(itempart, ';', 1);
5508      itempart2 := Piece(itempart, ';', 2);
5509      newprofile := newprofile + itempart1 + '~' + itempart2 + '~|'
5510    end;
5511    FreeAndNil(taxonomies);
5512    FreeAndNil(expandedcodes);
5513    FreeAndNil(taxonomycodes);
5514    Result := newprofile;
5515  end;