Procedure

InitViewFilters

Module

uProbs

Last Modified

7/15/2014 3:26:44 PM

Scope

Interfaced

Declaration

procedure InitViewFilters(Alist:TstringList);

Calls Hierarchy


InitViewFilters
 └SetViewFilters
   ├LoadFilterList
   └ShowFilterStatus

Called-By Hierarchy


                              InitViewFilters
           TfrmProblems.LoadPatientProblems┘ 
            TfrmProblems.lstProbActsClick┤   
        TfrmProblems.wgProbDataDblClick┤ │   
              TfrmProblems.lstViewClick┘ │   
      TfrmProblems.HighlightDuplicate┘   │   
            TfrmProblems.AddProblem┤     │   
 TfrmProblems.lstProbActsClick...┤ │     │   
    TfrmProblems.lstProbPickClick┤ │     │   
 TfrmProblems.lstProbPickDblClick┤ │     │   
 TfrmProblems.edProbEntKeyPress┘ │ │     │   
         TfrmProblems.UMPLLexicon┘ │     │   
      TfrmdlgProb.bbChangeProbClick┘     │   
                TfrmProblems.LoadProblems┤   
               TfrmProblems.DisplayPage┤ │   
TfrmProblems.mnuViewRestoreDefaultClick┤ │   
                  TfrmProblems.FormShow┘ │   
              TfrmProblems.RestoreProblem┤   
       TfrmProblems.lstProbActsClick...┘ │   
                    TfrmdlgProb.FormClose┘   

Calls

Name Declaration Comments
SetViewFilters procedure SetViewFilters(Alist:TStringList); -

Called-By

Name Declaration Comments
TfrmProblems.LoadPatientProblems procedure LoadPatientProblems(AList:TstringList;const status:char;init:boolean); -


Source

1375  procedure InitViewFilters(Alist: TstringList);
1376  var
1377    i:integer;
1378  begin
1379    if PLUser.usCurrentView = '' then PLUser.usCurrentView := PL_UF_VIEW;
1380  
1381    if (PLUser.usViewProv = '') or (Piece(PLUser.usViewProv, U, 1) = '0') then
1382      begin
1383        PLFilters.ProviderList.clear;
1384        PLFilters.Providerlist.add('0');
1385      end
1386    else {conserve user preferred provider}
1387      PLFilters.ProviderList.Add(Piece(PLUser.usViewProv, U, 1));
1388  
1389    if PLUser.usCurrentView = PL_UF_VIEW then
1390      begin {no filter on patient type, so do routine filter on provider and bail}
1391        SetViewFilters(Alist);
1392        //exit;
1393      end;
1394  
1395    if (PLUser.usCurrentView = PL_OP_VIEW) and (PLUser.usViewClin = '') then
1396      begin {no user preferred list of clinics, so get standard list and bail}
1397        SetViewFilters(Alist);
1398        //exit;
1399      end;
1400  
1401    if (PLUser.usCurrentView = PL_IP_VIEW) and (PLUser.usViewServ = '') then
1402      begin {no user preferred list of services, so get standard list  and bail}
1403        SetViewFilters(Alist);
1404        //exit;
1405      end;
1406  
1407    if (PLUser.usCurrentView = PL_OP_VIEW) and (PLUser.usClinList.Count > 0) then
1408      begin {conserve user preferred clinic list}
1409        for i := 0 to pred(PLUser.usClinList.Count) do
1410          PLFilters.ClinicList.add(PLUser.usClinList[i]);
1411      end;
1412  
1413    if PLUser.usCurrentView = PL_IP_VIEW then
1414      begin {conserve user preferred service list}
1415        for i := 0 to pred(PLUser.usServList.Count) do
1416          PLFilters.ServiceList.add(PLUser.usServList[i]);
1417      end;
1418  
1419  //  ShowFilterStatus(PlUser.usCurrentView);
1420  //  PostMessage(frmProblems.Handle, UM_PLFILTER,0,0);
1421  end;