Index: cprs/trunk/CPRS-Chart/fARTAllgy.pas
===================================================================
--- cprs/trunk/CPRS-Chart/fARTAllgy.pas	(revision 456)
+++ cprs/trunk/CPRS-Chart/fARTAllgy.pas	(revision 830)
@@ -6,5 +6,6 @@
   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
   Forms, Dialogs, StdCtrls, ORCtrls, ORfn, ExtCtrls, ComCtrls, uConst,
-  Menus, ORDtTm, Buttons, fODBase, fAutoSz, fOMAction, rODAllergy;
+  Menus, ORDtTm, Buttons, fODBase, fAutoSz, fOMAction, rODAllergy,
+  VA508AccessibilityManager;
 
 type
@@ -137,4 +138,5 @@
   TX_BAD_OBS_DATE     = 'Observation date must be in the format m/d/y or m/y or y, or T-d.';
   TX_MISSING_OBS_DATE = 'Observation date is required for observed reactions.';
+  TX_MISSING_OBS_HIST = 'You must select either OBSERVED or HISTORICAL for this reaction.';
   TX_BAD_VER_DATE     = 'Verify date must be in the format m/d/y or m/y or y, or T-d.';
   TX_BAD_ORIG_DATE    = 'Origination date must be in the format m/d/y or m/y or y, or T-d.';
@@ -284,5 +286,5 @@
   StatusText('Loading Default Values');
   uUserCanVerify := FALSE;  //HasSecurityKey('GMRA-ALLERGY VERIFY');
-  Defaults.Assign(ODForAllergies);  
+  FastAssign(ODForAllergies, Defaults);
   StatusText('Initializing Long List');
   ExtractItems(cboSymptoms.Items, Defaults, 'Top Ten');
@@ -322,7 +324,12 @@
   ExtractItems(cboNatureOfReaction.Items, Defaults, 'Nature of Reaction');
   lstAllergy.Items.Add('-1^Click button to search ---->');
-  grpObsHist.ItemIndex := 1;
+  grpObsHist.ItemIndex := -1;         // CQ 11775 - v27.10 - RV (was '1')
   calObservedDate.Text := '';
   cboSeverity.ItemIndex := -1;
+  cboSeverity.Visible := False;
+  lblSeverity.Visible := False;
+  btnSevHelp.Visible := False;
+  calObservedDate.Visible := False;
+  lblObservedDate.Visible := False;
   cboSymptoms.ItemIndex := -1;
   memComments.Clear;
@@ -401,5 +408,5 @@
       cboAllergyType.SelectByID(Piece(AllergyType, U, 1));
       cboNatureOfReaction.SelectByID(Piece(NatureOfReaction, U, 1));
-      lstSelectedSymptoms.Items.Assign(SignsSymptoms);
+      FastAssign(SignsSymptoms, lstSelectedSymptoms.Items);
       calOriginated.FMDateTime := Originated;
       cboOriginator.InitLongList(OriginatorName);
@@ -450,4 +457,6 @@
       else if (Length(lstAllergy.DisplayText[0]) = 0) or
          (Piece(lstAllergy.Items[0], U, 1) = '-1') then SetError(TX_NO_ALLERGY);
+      if (grpObsHist.ItemIndex = -1) then
+        SetError(TX_MISSING_OBS_HIST);
       if (grpObsHist.ItemIndex = 0) then
         begin
@@ -559,5 +568,5 @@
   MyFMNow: TFMDateTime;
   i: integer;
-  SourceGlobalRoot: string;
+  SourceGlobalRoot, x: string;
 begin
   inherited;
@@ -583,5 +592,5 @@
               DateEnteredInError := MyFMNow;                               {***}
               UserEnteringInError := User.DUZ;
-              with memErrCmts do if GetTextLen > 0 then ErrorComments.Assign(Lines);
+              with memErrCmts do if GetTextLen > 0 then QuickCopy(memErrCmts, ErrorComments);
             end;
         end
@@ -593,5 +602,10 @@
               if Pos('PSDRUG', SourceGlobalRoot) > 0 then
                 SourceGlobalRoot := Piece(SourceGlobalRoot, '"', 1);
-              CausativeAgent := Trim(Piece(DisplayText[0], '<', 1)) + U + Piece(Items[0], U, 1) + ';' + SourceGlobalRoot;
+              x := Piece(Items[0], U, 2);
+              if ((Pos('GMRD', SourceGlobalRoot) > 0) or (Pos('PSDRUG', SourceGlobalRoot) > 0))
+                  and (Pos('<', x) > 0) then
+                    x := Copy(x, 1, Length(Piece(x, '<', 1)) - 1);
+                    //x := Trim(Piece(x, '<', 1));
+              CausativeAgent := x + U + Piece(Items[0], U, 1) + ';' + SourceGlobalRoot;
               with cboAllergyType do
                 if ItemID <> '' then
@@ -645,5 +659,5 @@
               with memComments do
                 if GetTextLen > 0 then
-                  NewComments.Assign(Lines);
+                  QuickCopy(memComments, NewComments);
             end;
     end;
@@ -677,7 +691,7 @@
   AStringList := TStringList.Create;
   try
-    AStringList.Assign(memComments.Lines);
+    QuickCopy(memComments, AStringList);
     LimitStringLength(AStringList, 74);
-    memComments.Lines.Assign(AstringList);
+    QuickCopy(AstringList, memComments);
     ControlChange(Self);
   finally
