Procedure

TfrmProblems.RowSelected

Module

fProbs

Last Modified

7/15/2014 3:26:38 PM

Visibility

Public

Owner

TfrmProblems

Declaration

procedure RowSelected;

Calls Hierarchy


TfrmProblems.RowSelected
 └TfrmProblems.MString

Called-By Hierarchy


                       TfrmProblems.RowSelected
                 TfrmProblems.wgProbDataClick┤ 
           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┘   │ 
          TfrmProblems.LoadPatientProblems...┘ 

Calls

Name Declaration Comments
TfrmProblems.MString function MString( index: integer): string; -

Called-By

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


Source

1596  procedure TfrmProblems.RowSelected;
1597  var
1598   AnyUnver, AnyAct: integer;
1599   i: integer;
1600  begin
1601    if wgProbData.SelCount > 1 then
1602      begin
1603        mnuActDetails.enabled    := false;
1604        mnuActChange.enabled     := false;
1605        mnuActRestore.enabled    := false;
1606        mnuActRemove.enabled     := false;
1607        mnuActAnnotate.enabled   := false;
1608        popChange.enabled        := false;
1609        popRestore.enabled       := false;
1610        popRemove.enabled        := false;
1611        popAnnotate.enabled      := false;
1612        popViewDetails.enabled   := false;
1613        AnyUnver := 0;
1614        AnyAct := 0;
1615        for i := 0 to wgProbData.Count - 1 do
1616         begin
1617          if wgProbData.Selected[i] and (Copy(Piece(MString(i), U, 2),5,3)='(u)') then
1618            AnyUnver := AnyUnVer + 1;
1619          if wgProbData.Selected[i] and (Copy(Piece(MString(i), U, 2),1,1) = 'A') then
1620            AnyAct := AnyAct + 1;
1621         end;
1622        mnuActVerify.enabled     := PLUser.usVerifyTranscribed and
1623                                    PLUser.usPrimeUser and (AnyUnver > 0);
1624        popVerify.enabled        := PLUser.usVerifyTranscribed and
1625                                    PLUser.usPrimeUser and (AnyUnver > 0);
1626        mnuActInactivate.enabled := (AnyAct > 0);
1627        popInactivate.enabled    := (AnyAct > 0);
1628      end
1629    else
1630      begin
1631        mnuActDetails.enabled    := true;
1632        mnuActChange.enabled     := true;
1633        mnuActRestore.enabled    := PLUser.usPrimeUser;
1634        mnuActRemove.enabled     := PLUser.usPrimeUser;
1635        mnuActAnnotate.enabled   := true;
1636        popChange.enabled        := true;
1637        popRestore.enabled       := PLUser.usPrimeUser;
1638        popRemove.enabled        := PLUser.usPrimeUser;
1639        popAnnotate.enabled      := true;
1640        popViewDetails.enabled   := true ;
1641        mnuActVerify.enabled     := PLUser.usVerifyTranscribed and
1642                                    PLUser.usPrimeUser and
1643                                    (Copy(Piece(MString(wgProbData.ItemIndex), U, 2),5,3)='(u)') ;
1644        popVerify.enabled        := PLUser.usVerifyTranscribed and
1645                                    PLUser.usPrimeUser and
1646                                    (Copy(Piece(MString(wgProbData.ItemIndex), U, 2),5,3)='(u)') ;
1647        mnuActInactivate.enabled := Copy(Piece(MString(wgProbData.ItemIndex), U, 2),1,1) = 'A' ;
1648        popInactivate.enabled    := Copy(Piece(MString(wgProbData.ItemIndex), U, 2),1,1) = 'A' ;
1649      end;
1650  
1651    //Disable menu actions for REMOVED problems list display
1652    if PLUser.usViewAct = 'R' then
1653      begin
1654        mnuActAnnotate.Enabled   := False;
1655        mnuActChange.Enabled     := False;
1656        mnuActInactivate.Enabled := False;
1657        mnuActRemove.Enabled     := False;
1658        mnuActVerify.Enabled     := False;
1659        popAnnotate.Enabled      := False;
1660        popChange.Enabled        := False;
1661        popInactivate.Enabled    := False;
1662        popRemove.Enabled        := False;
1663        popVerify.Enabled        := False;
1664      end;
1665  end ;