Ignore:
Timestamp:
Jul 7, 2010, 4:51:54 PM (14 years ago)
Author:
Kevin Toppenberg
Message:

Upgrading to version 27

File:
1 edited

Legend:

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

    r456 r830  
    66  SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
    77  Forms, Dialogs, StdCtrls, ORCtrls, ORfn, ExtCtrls, ComCtrls, uConst,
    8   Menus, ORDtTm, Buttons, fODBase, fAutoSz, fOMAction, rODAllergy;
     8  Menus, ORDtTm, Buttons, fODBase, fAutoSz, fOMAction, rODAllergy,
     9  VA508AccessibilityManager;
    910
    1011type
     
    137138  TX_BAD_OBS_DATE     = 'Observation date must be in the format m/d/y or m/y or y, or T-d.';
    138139  TX_MISSING_OBS_DATE = 'Observation date is required for observed reactions.';
     140  TX_MISSING_OBS_HIST = 'You must select either OBSERVED or HISTORICAL for this reaction.';
    139141  TX_BAD_VER_DATE     = 'Verify date must be in the format m/d/y or m/y or y, or T-d.';
    140142  TX_BAD_ORIG_DATE    = 'Origination date must be in the format m/d/y or m/y or y, or T-d.';
     
    284286  StatusText('Loading Default Values');
    285287  uUserCanVerify := FALSE;  //HasSecurityKey('GMRA-ALLERGY VERIFY');
    286   Defaults.Assign(ODForAllergies); 
     288  FastAssign(ODForAllergies, Defaults);
    287289  StatusText('Initializing Long List');
    288290  ExtractItems(cboSymptoms.Items, Defaults, 'Top Ten');
     
    322324  ExtractItems(cboNatureOfReaction.Items, Defaults, 'Nature of Reaction');
    323325  lstAllergy.Items.Add('-1^Click button to search ---->');
    324   grpObsHist.ItemIndex := 1;
     326  grpObsHist.ItemIndex := -1;         // CQ 11775 - v27.10 - RV (was '1')
    325327  calObservedDate.Text := '';
    326328  cboSeverity.ItemIndex := -1;
     329  cboSeverity.Visible := False;
     330  lblSeverity.Visible := False;
     331  btnSevHelp.Visible := False;
     332  calObservedDate.Visible := False;
     333  lblObservedDate.Visible := False;
    327334  cboSymptoms.ItemIndex := -1;
    328335  memComments.Clear;
     
    401408      cboAllergyType.SelectByID(Piece(AllergyType, U, 1));
    402409      cboNatureOfReaction.SelectByID(Piece(NatureOfReaction, U, 1));
    403       lstSelectedSymptoms.Items.Assign(SignsSymptoms);
     410      FastAssign(SignsSymptoms, lstSelectedSymptoms.Items);
    404411      calOriginated.FMDateTime := Originated;
    405412      cboOriginator.InitLongList(OriginatorName);
     
    450457      else if (Length(lstAllergy.DisplayText[0]) = 0) or
    451458         (Piece(lstAllergy.Items[0], U, 1) = '-1') then SetError(TX_NO_ALLERGY);
     459      if (grpObsHist.ItemIndex = -1) then
     460        SetError(TX_MISSING_OBS_HIST);
    452461      if (grpObsHist.ItemIndex = 0) then
    453462        begin
     
    559568  MyFMNow: TFMDateTime;
    560569  i: integer;
    561   SourceGlobalRoot: string;
     570  SourceGlobalRoot, x: string;
    562571begin
    563572  inherited;
     
    583592              DateEnteredInError := MyFMNow;                               {***}
    584593              UserEnteringInError := User.DUZ;
    585               with memErrCmts do if GetTextLen > 0 then ErrorComments.Assign(Lines);
     594              with memErrCmts do if GetTextLen > 0 then QuickCopy(memErrCmts, ErrorComments);
    586595            end;
    587596        end
     
    593602              if Pos('PSDRUG', SourceGlobalRoot) > 0 then
    594603                SourceGlobalRoot := Piece(SourceGlobalRoot, '"', 1);
    595               CausativeAgent := Trim(Piece(DisplayText[0], '<', 1)) + U + Piece(Items[0], U, 1) + ';' + SourceGlobalRoot;
     604              x := Piece(Items[0], U, 2);
     605              if ((Pos('GMRD', SourceGlobalRoot) > 0) or (Pos('PSDRUG', SourceGlobalRoot) > 0))
     606                  and (Pos('<', x) > 0) then
     607                    x := Copy(x, 1, Length(Piece(x, '<', 1)) - 1);
     608                    //x := Trim(Piece(x, '<', 1));
     609              CausativeAgent := x + U + Piece(Items[0], U, 1) + ';' + SourceGlobalRoot;
    596610              with cboAllergyType do
    597611                if ItemID <> '' then
     
    645659              with memComments do
    646660                if GetTextLen > 0 then
    647                   NewComments.Assign(Lines);
     661                  QuickCopy(memComments, NewComments);
    648662            end;
    649663    end;
     
    677691  AStringList := TStringList.Create;
    678692  try
    679     AStringList.Assign(memComments.Lines);
     693    QuickCopy(memComments, AStringList);
    680694    LimitStringLength(AStringList, 74);
    681     memComments.Lines.Assign(AstringList);
     695    QuickCopy(AstringList, memComments);
    682696    ControlChange(Self);
    683697  finally
Note: See TracChangeset for help on using the changeset viewer.