Ignore:
Timestamp:
Jul 6, 2008, 8:20:14 PM (16 years ago)
Author:
Kevin Toppenberg
Message:

Uploading from OR_30_258

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/branches/foia-cprs/CPRS-Chart/fARTAllgy.pas

    r459 r460  
    6060    btnSevHelp: TORAlignButton;
    6161    procedure btnAgentClick(Sender: TObject);
    62     procedure FormCreate(Sender: TObject);
     62    procedure FormCreate(Sender: TObject); 
    6363    procedure cboOriginatorNeedData(Sender: TObject; const StartFrom: String;
    6464      Direction, InsertAt: Integer);
     
    160160                   'HISTORICAL: reported by the patient as occurring in the past;' + CRLF +
    161161                   'no longer requires intervention' ;
     162
    162163 NEW_ALLERGY = True;
    163164 ENTERED_IN_ERROR = True;
     
    190191  Result := False;
    191192  frmARTAllergy := TfrmARTAllergy.Create(Application);
     193  if frmARTAllergy.AbortAction then exit;
    192194  with frmARTAllergy do
    193195    try
     
    286288  ExtractItems(cboSymptoms.Items, Defaults, 'Top Ten');
    287289  cboSymptoms.InsertSeparator;
     290  cboSymptoms.InitLongList('');
    288291  cboOriginator.InitLongList(User.Name) ;
    289292  cboOriginator.SelectByIEN(User.DUZ);
     
    301304var
    302305  Allergy: string;
    303 begin
    304   inherited;
     306  //ErrMsg: string;
     307begin
     308  inherited;
     309  // since this only allows entry of new allergies, key check is irrelevant, eff. v26.12
     310(*  if not IsARTClinicalUser(ErrMsg) then
     311  begin
     312    InfoBox(ErrMsg, 'No Authorization', MB_ICONWARNING or MB_OK);
     313    AbortAction := True;
     314    Close;
     315    Exit;
     316  end;*)
    305317  Changing := True;
    306318  FOldHintPause := Application.HintHidePause;
     
    441453        begin
    442454          if (lstSelectedSymptoms.Items.Count = 0)   then SetError(TX_NO_SYMPTOMS);
    443           if (grpObsHist.Enabled) and RequireOriginatorComments and (memComments.Text = '')  then
     455          if (grpObsHist.Enabled) and RequireOriginatorComments and (not ContainsVisibleChar(memComments.Text))  then
    444456            SetError(TX_ORIG_CMTS_REQD);
    445457          if (grpObsHist.Enabled) and (calObservedDate.Text = '')  then
     
    627639              if tmpDate > 0 then ReactionDate := tmpDate;*)
    628640              with cboSeverity do
    629                 if ItemID <> '' then
    630                   Severity := ItemID;
     641                if (ItemID <> '') and (Text <> '') then
     642                  Severity := ItemID
     643                else
     644                  Severity := '';
    631645              with memComments do
    632646                if GetTextLen > 0 then
     
    886900
    887901procedure TfrmARTAllergy.cboSymptomsMouseClick(Sender: TObject);
     902const
     903  TC_SS_MAX = 'Too many signs/symptoms';
     904  TX_SS_MAX = 'A maximum of 38 signs/symptoms may be selected.';
    888905var
    889906  x: string;
    890907begin
    891908  inherited;
    892   if (cboSymptoms.ItemIndex < 0) and (cboSymptoms.Text = '') then exit;
    893   Changing := True;
     909  with cboSymptoms do if (ItemIndex < 0) or (Text = '') or (ItemID = '') then exit;
    894910  if (lstSelectedSymptoms.SelectByID(cboSymptoms.ItemID) > -1) or
    895911     (lstSelectedSymptoms.Items.IndexOf(cboSymptoms.Text) > -1) then exit;
     912  if (lstSelectedSymptoms.Count + 1) > 38 then
     913  begin
     914    InfoBox(TX_SS_MAX, TC_SS_MAX, MB_ICONERROR or MB_OK);
     915    exit;
     916  end;
     917  Changing := True;
    896918  if cboSymptoms.ItemIndex > -1 then
    897919    begin
     
    906928          SelectByID(cboSymptoms.ItemID);
    907929        end;
    908     end
    909   else
     930    end ;
     931(*  else                             Free-text entries no longer allowed.
    910932    with lstSelectedSymptoms do
    911933      begin
    912934        Items.Add('FT' + U + cboSymptoms.Text);
    913935        ItemIndex := Items.Count - 1;
    914       end;
     936      end;*)
    915937  Changing := False;
    916938  ControlChange(Self)
Note: See TracChangeset for help on using the changeset viewer.