Procedure

TfrmCover.UpdateVAAButton

Module

fCover

Last Modified

7/15/2014 3:26:36 PM

Comments

Var
  PtIsVAA: boolean;
  PtIsMHV: boolean;

Visibility

Public

Owner

TfrmCover

Declaration

procedure UpdateVAAButton;

Called-By Hierarchy


                      TfrmCover.UpdateVAAButton
                       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.UpdateCCOWContext...┘ 

Called-By

Name Declaration Comments
TfrmFrame.SetupPatient procedure SetupPatient(AFlaggedList : TStringList = nil); -
TfrmFrame.UpdateCCOWContext procedure UpdateCCOWContext; -


Source

937   procedure TfrmCover.UpdateVAAButton;
938   const
939     MHVLabelOrigTop = 3;
940     PtInsLabelOrigTop = 27;
941   //var
942   //  PtIsVAA: boolean;
943   //  PtIsMHV: boolean;
944   begin
945   //VAA & MHV
946     PtIsVAA := false;
947     PtIsMHV := false;
948   
949     VAAFlag := TStringList.Create;
950     MHVFlag := TStringList.Create;
951     VAA_DFN := Patient.DFN;
952     tCallV(VAAFlag, 'ORVAA VAA', [VAA_DFN]);
953     tCallV(MHVFlag, 'ORWMHV MHV', [VAA_DFN]);
954     if VAAFlag[0] <> '0' then
955        begin
956        PtIsVAA := true;
957   
958        with frmFrame do
959           begin
960           laVAA2.Caption := Piece(VAAFlag[0], '^', 1);
961           laVAA2.Hint := Piece(VAAFlag[0], '^', 2); //CQ7626 was piece '6'
962           end;
963        end
964     else
965        begin
966        with frmFrame do
967           begin
968           laVAA2.Caption := #0;
969           laVAA2.Hint := 'No active insurance'; //CQ7626 added this line
970           end;
971        end;
972   
973     //MHV flag
974     if MHVFlag[0] <> '0' then
975        begin
976        PtIsMHV := true;
977   
978         with frmFrame do
979           begin
980            laMHV.Caption := Piece(MHVFlag[0], '^', 1);
981            laMHV.Hint := Piece(MHVFlag[0], '^', 2);
982   
983            if VAAFlag[0] = '0' then
984              laMHV.Caption := 'MHV';
985           end;
986        end
987     else
988        begin
989        with frmFrame do
990           begin
991           laMHV.Caption := #0;
992           laMHV.Hint := 'No MyHealthyVet data'; //CQ7626 added this line
993           end;
994        end;
995   
996     with frmFrame do
997        begin
998        //Modified this 'with' section for CQ7783
999        paVAA.Hide; //Start by hiding it.  Show it only if one of the conditions below is true, else it stays invisible.
1000       paVAA.Height := pnlPrimaryCare.Height;
1001  
1002       if ((PtIsVAA and PtIsMHV)) then  //CQ7411 - this line
1003          begin
1004          laMHV.Top := paVAA.Top;
1005          laMHV.Width := paVAA.Width - 1;
1006          laMHV.Height := (paVAA.ClientHeight div 2) - 1;
1007          laMHV.Visible := true;
1008  
1009          laVAA2.Top := laMHV.Top + laMHV.Height + 1;
1010          laVAA2.Width := paVAA.Width - 1;
1011          laVAA2.Height := (paVAA.ClientHeight div 2);
1012          laVAA2.Visible := true;
1013  
1014          paVAA.Show;
1015          end
1016       else
1017          if ((PtIsMHV and (not PtIsVAA))) then
1018             begin
1019             laMHV.Top := paVAA.Top;
1020             paVAA.Height := pnlPrimaryCare.Height;
1021             laMHV.Height := paVAA.ClientHeight - 1;
1022             laMHV.Visible := true;
1023             laVAA2.Visible  := false;
1024             paVAA.Show;
1025             end
1026       else
1027          if ((PtIsVAA and (not PtIsMHV))) then
1028             begin
1029             laVAA2.Top := paVAA.Top;
1030             paVAA.Height := pnlPrimaryCare.Height-2;
1031             laVAA2.Height := paVAA.ClientHeight - 1;
1032             laVAA2.Width := paVAA.Width - 1;
1033             laVAA2.Visible := true;
1034             laMHV.Visible := false;
1035  
1036             paVAA.Show;
1037             end;
1038    end; //with
1039  //end VAA & MHV
1040  end;