Index: cprs/branches/foia-cprs/CPRS-Chart/Accessibility_TLB.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Accessibility_TLB.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Accessibility_TLB.pas	(revision 460)
@@ -19,5 +19,5 @@
 // LIBID: {1EA4DBF0-3C3B-11CF-810C-00AA00389B71}
 // LCID: 0
-// Helpfile: 
+// Helpfile:
 // DepndLst: 
 //   (1) v2.0 stdole, (C:\WINNT\System32\Stdole2.tlb)
@@ -148,2 +148,8 @@
 
 end.
+
+
+
+
+
+
Index: cprs/branches/foia-cprs/CPRS-Chart/BA/UBACore.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/BA/UBACore.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/BA/UBACore.pas	(revision 460)
@@ -11,20 +11,22 @@
 function  rpcGetPersonalDxList(UserDUZ:int64):TStringList;
 function  rpcDeleteFromPersonalDxList(UserDUZ:int64; Dest:TStringList):integer;
-procedure rpcSaveBillingData(pBillingData:TStringList);
+procedure rpcSaveBillingDxEntered;  // save dx enteries regardless of being mandatory....
 function  rpcNonBillableOrders(pOrderList: TStringList): TStringList;
 function  rpcOrderRequiresDx(pList: TStringList):boolean;
-procedure rpcSetBillingAwareSwitch(encProvider: int64; encLocation: integer);
+procedure rpcSetBillingAwareSwitch(encProvider: int64; pPatientDFN: string);
 procedure rpcGetProviderPatientDaysDx(ProviderIEN: string;PatientIEN: string);
 procedure rpcGetSC4Orders;    // returns Eligible Treatment Factors for a given patient
-procedure rpcSaveBillingDxEntered;  // save dx enteries regardless of being mandatory....
+
 function  rpcTreatmentFactorsActive(pOrderID: string):boolean;
 procedure rpcBuildSCIEList(pOrderList: TList);
 function  rpcGetUnsignedOrdersBillingData(pOrderList: TStringList):TStringList;
-function  rpcRetrieveBillingData(thisOrderID: string; var thisBAData: string) : boolean;
 function  rpcRetrieveSelectedOrderInfo(pOrderIDList: TStringList):TStringList;
 function  rpcGetTFHintData:TStringList;
 procedure rpcSaveNurseConsultOrder(pOrderRec:TStringList);
 function  rpcGetBAMasterSwStatus:boolean;
-
+procedure rpcSaveCIDCData(pCIDCList: TStringList);
+function  rpcIsPatientInsured(pPatientDFN: string):boolean;
+
+procedure SaveBillingData(pBillingData:TStringList);
 function  OrdersHaveDx(pOrderList:TStringList):boolean;
 procedure SetTreatmentFactors(TFactors: string);
@@ -32,5 +34,5 @@
 procedure AttachPLTFactorsToDx(var Dest:String;ProblemRec:string);
 procedure BALoadStsFlagsAsIs(StsFlagsIN: string);
-function  BADxEntered:boolean;                                //  This will only be executed if bypass switch is set...
+function  BADxEntered:boolean;  //  main logic to determine if dx has been entered for order that requires dx
 function  StripTFactors(FactorsIN: string): string;
 function  AddProviderPatientDaysDx(Dest: TStringList; ProviderIEN: string;PatientIEN: string) : TStringList;
@@ -52,14 +54,13 @@
 function  GetConsultFlags(pOrderID:String; pFlagList:TStringList;FlagsAsIs:string):string;
 function  SetConsultFlags(pPLFactors: string;pFlagsAsIs: string):string; //  return updated flags.
-procedure GetBAStatus(pProvider:int64; pLocation:integer);
+procedure GetBAStatus(pProvider:int64; pPatientDFN: string);
 function  IsICD9CodeActive(ACode: string; LexApp: string; ADate:TFMDateTime = 0): boolean;
 function  BuildConsultDxRec(ConsultRec: TBAConsultOrderRec): string;
 function  ConvertPIMTreatmentFactors(pTFactors:string):string;
 procedure DeleteDCOrdersFromCopiedList(pOrderID:string);
-//function  SetOrderIDConsultDxRequired(pOrderID:String):String; // replace orderid with "R" if consult dx required.
 procedure UpdateBAConsultOrderList(pDcOrders: TStringList);
-
-
-
+function  VerifyOrderIdExists(pOrderList: TStringList): TStringList; // removes records without order id
+function  IsCIDCProvider(encProvider:int64):boolean;
+function  ProcessProblemTFactors(pText:String):String;
 
 var
@@ -75,36 +76,158 @@
 
 
-function rpcRetrieveBillingData(thisOrderID: string; var thisBAData: string) : boolean;
-var
-  rpcResult: TStringList;
-  BAOrderExists : boolean;
-begin
-  Result := false;
-  BAOrderExists := false;
-  rpcResult := TStringList.Create;
-
-  tCallV(rpcResult, 'ORWDBA1 RCVORCI', [thisOrderID]);
-  BAOrderExists := StrToBool(rpcResult[0]);
-
-  if (not BAOrderExists) then
-     //GRAB RETURNED BA DATA HERE
-     Result := true;
-end;
-
-procedure rpcSaveBillingData(pBillingData:TStringList);
+// -----------------  MAIN CIDC DX HAS BEEN ENTERED LOGIC  ---------------------------
+function BADxEntered:boolean;
+var
+  i: integer;
+  //orderStatus: integer;
+  x: string;
+  passList: TStringList;
+  holdOrderList: TStringList;
+  thisOrderID: string;
+  thisRec: string;
+begin
+ //  Result := TRUE;   // caused hint.....
+   holdOrderList := TStringList.Create;
+   holdOrderList.Clear;
+   updatedBAOrderList := TStringList.Create;
+   updatedBAOrderList.Clear;
+   passList := TStringList.Create;
+   passList.Clear;
+   // determine which orders require a dx (lrmp- only)
+   // if NO then continue
+   // if YES, check BADxList for orders with DX enteries.
+   // if ok then create data string pass to M via RPC
+
+  for i := 0 to BAOrderList.Count-1 do
+  begin
+     thisRec := BAOrderList.Strings[i];
+     thisOrderID := piece(thisRec,';',1) + ';1';  //rebuild orderID pass to M.
+     x := BAOrderList.Strings[i];
+     //orderStatus := StrToInt(CharAt(Piece(x, ';', 2), 1));  //  Order Status 1=OK, 2=DISCONTINUE
+    if IsOrderBillable(thisOrderID) then
+     begin
+        passList.Add(piece(x,';',1));
+        holdOrderList.Add(x);//  place holder for orders that can be signed!
+     end;
+  end;
+
+   BAOrderList.Assign(holdOrderList); //assign signable orders to BAOrderList for further processing
+   holdOrderList.Clear; // CQ5025
+
+    //call with passList determine if LRMP
+     if rpcOrderRequiresDx(passList) then
+      BAOrderList.Assign(updatedBAOrderList);
+
+    // check of all orders dx columns are flagged with N/A.....
+    if UBACore.IsAllOrdersNA(BAOrderList) then
+    begin
+       Result := TRUE;              //  force true, no record needs DX entry
+       Exit;                        //to do.  clean this up... when time permitts
+    end
+    else
+      begin
+      if OrdersHaveDx(UBAGlobals.BAOrderList) then
+      begin
+         Result := True; // CIDC orders have dx
+         SaveBillingData(UBAGlobals.BAOrderList) ;
+      end
+      else
+         begin
+            Result := FALSE;
+            Exit;
+         end;
+     end;
+end;
+
+
+function rpcOrderRequiresDx(pList: TStringList):boolean;
+var x: string;
+    i,j: integer;
+    returnList, updatedList: TStringList;
+   begin
+    Result := FALSE;  // initial set dx NOT required
+    returnList := TStringList.Create;
+    updatedList := TStringList.Create;
+    returnList.Clear;
+    updatedList.Clear;
+    // remove deleted orderid's
+    if UBAGlobals.BADeltedOrders.Count > 0 then
+    begin
+       for i := 0 to UBAGlobals.BADeltedOrders.Count-1 do
+          x := UBAGlobals.BADeltedOrders.Strings[i];
+         for j := 0 to pList.Count-1 do
+         begin
+            if x = pList.Strings[j] then
+              continue   // orderid is removed.. or skipped
+            else
+               updatedList.Add(x);
+         end;
+    end
+    else
+       updatedList.Assign(pList);
+
+    // call returns boolean, orders is billable=1 or nonbillable=0 or discontinued = 0
+    tCallV(returnList,'ORWDBA1 ORPKGTYP',[updatedList]);
+
+     //Remove NON LRMP orders from the mix(when checking for dx entry);
+     // BAOrderList and pList are in sync - order id....
+     for i := 0 to BAOrderList.Count-1 do
+     begin
+        x:= piece(returnList.Strings[i],'^',1);
+        if x = BILLABLE_ORDER  then
+        begin
+           updatedBAOrderList.Add(BAOrderList[i]);
+           Result := TRUE;
+        end;
+    end;
+end;
+
+
+// UBAGlobals.NonBillableOrderList must be populated prior to calling this function.
+// call   rpcNonBillableOrders to populate List.
+function IsOrderBillable(pOrderID: string):boolean ;
+var
+  i: integer;
+  currOrderID: string;
+  matchOrderID : string;
+
+begin
+  Result := TRUE;    //  = Billable
+  currOrderID := PrepOrderID(pOrderID);
+  if Piece(pOrderID,';',2) = DISCONTINUED_ORDER THEN
+  begin
+     Result := FALSE;
+     Exit;
+  end;
+  try
+     for i := 0 to UBAGlobals.NonBillableOrderList.Count -1 do
+     begin
+        matchOrderID := PrepOrderID( (Piece(UBAGlobals.NonBillableOrderList.Strings[i],U,1)) );
+        if currOrderID = matchOrderID  then
+        begin
+           Result := FALSE;  //= Non Billable
+           Exit;
+        end;
+     end;
+  except
+     on EListError do
+        begin
+        {$ifdef debug}ShowMessage('EListError in UBACore.IsOrderBillable()');{$endif}
+        raise;
+        end;
+  end;
+end;
+
+
+procedure SaveBillingData(pBillingData:TStringList);
 var
   RecsToSave: TStringList;
-  i: integer;
-  x: string;
 begin
   RecsToSave := TStringList.Create;
   RecsToSave.Clear;
+
   RecsToSave := AttachDxToOrderList(pBillingData); //call with new Biling data, return-code returned
- // for i := 0 to RecstoSave.Count-1 do
- // begin
-//      ShowMessage('Data Sent to ORW ' + RecsToSave.Strings[i]);
- // end;
-  CallV('ORWDBA1 RCVORCI',[RecsToSave]);
- // if Assigned(UBAGlobals.BAConsultOrdersRequireDx) then UBAGlobals.BAConsultOrdersRequireDx.Clear;
+  rpcSaveCIDCData(RecsToSave);  // verify and save billing data
+
   if Assigned(UBAGlobals.BAOrderList) then UBAGlobals.BAOrderList.Clear; // hds00005025
 end;
@@ -123,5 +246,5 @@
       pList.Add(pOrderID);
       Result := FALSE;
-      // call returns boolean, orders is billable=1 or nonbillable=0 or discontinued = 0
+     // call returns boolean, orders is billable=1 or nonbillable=0 or discontinued = 0
       tCallV(rList,'ORWDBA1 ORPKGTYP',[pList]);
      //returns boolean value by OrderID - True = billable
@@ -158,4 +281,5 @@
      currentOrderString := pOrderList.Strings[i];
      currentOrderID := piece(pOrderList.Strings[i],';',1)+ ';1';
+
      GetBADxListForOrder(baseDxRec, currentOrderID);
      FlagsStatsIn := BAFlagsIN;
@@ -174,10 +298,8 @@
 end;
 
-
-
 function  rpcAddToPersonalDxList(UserDUZ:int64; DxCodes:TStringList):boolean;
-//input example ien^code = 12345^306.70
-begin
-  Result := (sCallV('ORWDBA2 ADDPDL', [UserDUZ,DxCodes])= '1');
+//input example ien^code(s) = 12345^306.70^431.22
+begin
+   Result := (sCallV('ORWDBA2 ADDPDL', [UserDUZ,DxCodes])= '1');
 end;
 
@@ -198,73 +320,46 @@
 end;
 
-function rpcOrderRequiresDx(pList: TStringList):boolean;
-var x: string;
-    i,j: integer;
-    returnList, updatedList: TStringList;
-   begin
-//   for i := 0 to plist.count-1 do
-//      x := plist.strings[i];
-    Result := FALSE;
-    returnList := TStringList.Create;
-    updatedList := TStringList.Create;
-    returnList.Clear;
-    updatedList.Clear;
-    // remove deleted orderid's
-    if UBAGlobals.BADeltedOrders.Count > 0 then
-    begin
-       for i := 0 to UBAGlobals.BADeltedOrders.Count-1 do
-          x := UBAGlobals.BADeltedOrders.Strings[i];
-         for j := 0 to pList.Count-1 do
-         begin
-            if x = pList.Strings[j] then
-            continue   // orderid is removed.. or skipped
-            else
-               updatedList.Add(x);
-         end;
-    end
-    else
-       updatedList.Assign(pList);
-    // call returns boolean, orders is billable=1 or nonbillable=0 or discontinued = 0
-    tCallV(returnList,'ORWDBA1 ORPKGTYP',[updatedList]);
-     //Remove NON LRMP orders from the mix(for checking for dx entry);
-     // BAOrderList and pList are in sync - order id....
-     for i := 0 to BAOrderList.Count-1 do
-     begin
-        x:= piece(returnList.Strings[i],'^',1);
-        if x = BILLABLE_ORDER  then   // change to test BA
-        begin
-           updatedBAOrderList.Add(BAOrderList[i]);
-           Result := TRUE;
-        end;
-    end;
-end;
 // returns value used to bypass Billing Aware if needed.
 //  turns off visual and functionality
-procedure rpcSetBillingAwareSwitch(encProvider:int64; encLocation: integer);
-begin
-   BILLING_AWARE := TRUE;
-   if (encProvider = 0) and not PersonHasKey(encProvider, 'PROVIDER') then
-      BILLING_AWARE := FALSE
-   else
-   begin
-      if  (sCallV('ORWDBA1 BASTATUS', [nil]) = '1') then    //  Master switch is set "ON"
-       BILLING_AWARE :=  (sCallV('ORWDBA4 GETBAUSR', [encProvider]) = '1')
-      else
-         BILLING_AWARE := FALSE;
-      end;
-end ;
+procedure rpcSetBillingAwareSwitch(encProvider:int64; pPatientDFN: string);
+begin
+// Is Provider -> Is Master Sw -> Is CIDC SW -> Is Patient Insured
+   BILLING_AWARE := FALSE;
+   // verify user is a provider
+   if (encProvider <> 0) and PersonHasKey(encProvider, 'PROVIDER') then
+    //  Master switch is set "ON"
+      if  (sCallV('ORWDBA1 BASTATUS', [nil]) = '1') then
+         // User is CIDC Enabled
+        if  (sCallV('ORWDBA4 GETBAUSR', [encProvider]) = '1') then
+        begin
+           // Verify Patient is Insured
+           if  rpcIsPatientInsured(pPatientDFN)  then
+              BILLING_AWARE := TRUE;
+        end;
+       {$ifdef debug}BILLING_AWARE := TRUE;{$endif}
+end;
+
+//  verify CIDC Master Switch and Provider is CIDC Enabled.
+//  Patient insurance check is bypassed.  (hds7564)
+function  IsCIDCProvider(encProvider:int64):boolean;
+begin
+    Result := False;
+    if rpcGetBAMasterSwStatus then
+       if (encProvider <> 0) and PersonHasKey(encProvider, 'PROVIDER') then
+          Result := True;
+end;
+
 
 function rpcGetBAMasterSwStatus:boolean;
 begin
-   Result := False;
    Result :=  (sCallV('ORWDBA1 BASTATUS', [nil]) = '1');    //  Master switch is set "ON"
-
-
-end;
+end;
+
 
 procedure rpcSaveNurseConsultOrder(pOrderRec:TStringList);
 begin
-    CallV('ORWDBA1 RCVORCI',[pOrderRec]);
-end;
+    rpcSaveCIDCData(pOrderRec);
+end;
+
 
 procedure rpcSaveBillingDxEntered;  // if not mandatory and user enters dx.
@@ -295,7 +390,7 @@
         baseDxRec := nil;
         baseDxRec := TBADxRecord.Create;
-       InitializeNewDxRec(baseDxRec);
-
-  try
+        InitializeNewDxRec(baseDxRec);
+
+       try
        for i := 0 to BAOrderList.Count-1 do
        begin
@@ -305,22 +400,18 @@
           if baseDxRec.FBADxCode <> '' then
           begin
-                NewBillingList.Add(currentOrderString +'^'+ baseDxRec.FBADxCode +'^'+ baseDxRec.FBASecDx1+
+             NewBillingList.Add(currentOrderString +'^'+ baseDxRec.FBADxCode +'^'+ baseDxRec.FBASecDx1+
                                 '^'+ baseDxRec.FBASecDx2+'^'+ baseDxRec.FBASecDx3);
           end;
        end;
-  except
-     on EListError do
-     begin
-        {$ifdef debug}ShowMessage('EListError in UBACore.rpcSaveBillingDxEntered()');{$endif}
-        raise;
+       except
+       on EListError do
+       begin
+         {$ifdef debug}ShowMessage('EListError in UBACore.rpcSaveBillingDxEntered()');{$endif}
+         raise;
      end;
   end;
 
-   if NewBillingList.Count > 0 then
-      CallV('ORWDBA1 RCVORCI',[NewBillingList]); //1.3.10
-
+   rpcSaveCIDCData(NewBillingList);
    if Assigned(NewBillingList) then FreeAndNil(NewBillingList);
- //  if Assigned(UBAGlobals.BAConsultOrdersRequireDx) then UBAGlobals.BAConsultOrdersRequireDx.Clear;
-
   end;
 end;
@@ -335,6 +426,5 @@
 
 procedure rpcGetProviderPatientDaysDx(ProviderIEN: string;PatientIEN: string);
-var i:integer;
-    x: string;
+var
     tmplst: TStringList;
 begin
@@ -351,5 +441,4 @@
 function rpcGetTFHintData:TStringList;
 begin
-  Result := nil;
   tCallv(BATFHints,'ORWDBA3 HINTS', [nil]);
   Result := BATFHints;
@@ -366,5 +455,4 @@
     rList.Clear;
     NonBillableOrderList.Clear;
-    Result := NonBillableOrderList;
     // call returns boolean, orders is billable=1 or nonbillable=0 or discontinued = 0
     tCallV(rList,'ORWDBA1 ORPKGTYP',[pOrderList]);
@@ -396,5 +484,5 @@
       end;
       // call returns boolean, orders is billable=1 or nonbillable=0 or discontinued = 0
-     tCallV(rList,'ORWDBA1 ORPKGTYP',[OrderIDList]);
+      tCallV(rList,'ORWDBA1 ORPKGTYP',[OrderIDList]);
 
      for i := 0 to rList.Count-1 do
@@ -403,4 +491,26 @@
            OrderListSCEI.Add(OrderIDList.Strings[i]);
    end;
+end;
+
+procedure rpcSaveCIDCData(pCIDCList: TStringList);
+var
+ CIDCList :TStringList;
+begin
+    CIDCList := TStringList.create;
+    CIDCList.Clear;
+    // insure record contain valid orderid
+    if pCIDCList.Count > 0 then
+    begin
+       CIDCList := VerifyOrderIdExists(pCIDCList);
+       if CIDCList.Count > 0 then
+          CallV('ORWDBA1 RCVORCI',[CIDCList]);
+    end;
+    if Assigned(CIDCList) then FreeAndNil(CIDCList);
+end;
+
+function  rpcIsPatientInsured(pPatientDFN: string):boolean;
+begin
+   Result := (sCallV('ORWDBA7 ISWITCH',[pPatientDFN]) = '1');
+     
 end;
 
@@ -433,6 +543,6 @@
              if tempDxRec.FBADxCode = '' then
                 begin
-                Result := FALSE;
-                Break;
+                   Result := FALSE;
+                   Break;
                 end;
           end;
@@ -452,74 +562,4 @@
 
 
-function BADxEntered:boolean;
-var
-  i, orderStatus: integer;
-  x: string;
-  passList: TStringList;
-  holdOrderList: TStringList;
-  thisOrderID: string;
-  thisRec: string;
-begin
-   Result := FALSE;
-   holdOrderList := TStringList.Create;
-   holdOrderList.Clear;
-   updatedBAOrderList := TStringList.Create;
-   updatedBAOrderList.Clear;
-   passList := TStringList.Create;
-   passList.Clear;
-   // determine which orders require a dx (lrmp- only)
-   // if NO then continue
-   // if YES, check BADxList for orders with DX enteries.
-   // if ok then create data string pass to M via RPC
-
-   orderStatus := 0;
-   Result := true;
-
-  try
-   for i := 0 to BAOrderList.Count-1 do
-   begin
-         thisRec := BAOrderList.Strings[i];
-         thisOrderID := piece(thisRec,';',1) + ';1';  //rebuild orderID pass to M.
-
-         x := BAOrderList.Strings[i];
-         orderStatus := StrToInt(CharAt(Piece(x, ';', 2), 1));  //  Order Status 1=OK, 2=DISCONTINUE
-         if orderStatus = integer(BAOK2SIGN) then
-         begin
-            passList.Add(piece(x,';',1));
-            holdOrderList.Add(x);//  place holder for orders that can be signed!
-         end;
-   end;
-  except
-     on EListError do
-        begin
-        {$ifdef debug}ShowMessage('EListError in UBACore.BADxEntered()');{$endif}
-        raise;
-        end;
-  end;
-
-   BAOrderList.Assign(holdOrderList); //assign signable orders to BAOrderList for further processing
-   holdOrderList.Clear; // CQ5025
-     //call with passList determine if LRMP
-
-   if rpcOrderRequiresDx(passList) then
-      BAOrderList.Assign(updatedBAOrderList);
-
-   if updatedBAOrderList.Count <= 0 then   //  order list reflecting orders flagged as -
-      begin                           // dx required.
-      Result := TRUE;              //  force true, no record need DX entry
-      rpcSaveBillingDxEntered;        // save billing data for orders that may have dx enteries
-      Exit;                        //to do.  clean this up... when time permitts
-      end
-   else
-      begin
-      if OrdersHaveDx(UBAGlobals.BAOrderList) then
-         rpcSaveBillingData(UBAGlobals.BAOrderList)
-      else
-         begin
-            Result := FALSE;
-            Exit;
-         end;
-     end;
-end;
 
 
@@ -557,7 +597,13 @@
     thisRec.FBASC                := Piece(ProblemRec,U,5);
     thisRec.FBASC_YN             := Piece(ProblemRec,U,6);
-    thisRec.FBATreatFactors  := Piece(ProblemRec,')',1);
-    thisRec.FBATreatFactors  := Piece(thisRec.FBATreatFactors,'(',2);
-
+    //HDS8409
+    if StrPos(PChar(ProblemRec),'(') <> nil then
+       thisRec.FBATreatFactors :=  ProcessProblemTFactors(ProblemRec)
+    else
+    begin
+       thisRec.FBATreatFactors  := Piece(ProblemRec,')',1);
+       thisRec.FBATreatFactors  := Piece(thisRec.FBATreatFactors,'(',2);
+    end;
+    //HDS8409
   with thisRec do
   begin
@@ -571,5 +617,5 @@
            TFResults := ( FBADxCode + U  + FBADxText );
   end;
-      
+
     Dest := TFResults;
 end;
@@ -657,8 +703,8 @@
 var strDxCode,strDxName:string;
 begin
-    Result := '';
-    strDxCode := Piece(FactorsIN,U,2);
-    strDxName := Piece(FactorsIN,'(',1);
-    Result := (strDxName + U + strDxCode);
+   Result := '';
+   strDxCode := Piece(FactorsIN,U,2);
+   strDxName := Piece(FactorsIN,'(',1);
+   Result := (strDxName + U + strDxCode);
 end;
 
@@ -684,36 +730,4 @@
 
     Result := tmplst;
-end;
-
-// UBAGlobals.NonBillableOrderList must be populated prior to calling this function.
-// call   rpcNonBillableOrders to populate List.
-function IsOrderBillable(pOrderID: string):boolean ;
-var
-  i: integer;
-  currOrderID: string;
-  matchOrderID : string;
-
-begin
-  Result := TRUE;    //  = Billable
-  currOrderID := PrepOrderID(pOrderID);
-  if Piece(pOrderID,';',2) = DISCONTINUED_ORDER THEN
-  begin
-     Result := FALSE;
-     Exit;
-  end;
-  try
-     for i := 0 to UBAGlobals.NonBillableOrderList.Count -1 do
-     begin
-        matchOrderID := PrepOrderID( (Piece(UBAGlobals.NonBillableOrderList.Strings[i],U,1)) );
-        if currOrderID = matchOrderID  then
-           Result := FALSE  //= Non Billable
-     end;
-  except
-     on EListError do
-        begin
-        {$ifdef debug}ShowMessage('EListError in UBACore.IsOrderBillable()');{$endif}
-        raise;
-        end;
-  end;
 end;
 
@@ -748,5 +762,5 @@
      // this change may have an impact on response time??????
      // change from save orders with dx to save all. 06/24/04
-  // /  if not  clear treatment factors for order is non cidc
+     // /  if not  clear treatment factors for order is non cidc
    uBAGlobals.UnsignedOrders.Add(pOrderRec);
 
@@ -764,10 +778,10 @@
    if Assigned(rList) then rList.Clear;
    if Assigned(newList) then newList.Clear;
-   
-     for i := 0 to pOrderIDList.Count-1 do
-     begin
-        newList.Add(Piece(pOrderIDList.Strings[i],';',1));
-        x := newlist.strings[i];
-     end;
+
+   for i := 0 to pOrderIDList.Count-1 do
+   begin
+      newList.Add(Piece(pOrderIDList.Strings[i],';',1));
+      x := newlist.strings[i];
+   end;
    if newList.Count > 0 then
       tCallV(rList,'ORWDBA4 GETTFCI',[newList]);
@@ -781,6 +795,4 @@
    thisList: TStringList;
    rList: TStringList;
-   i:integer;
-   x: string;
 begin
 
@@ -789,7 +801,5 @@
   if Assigned(rList) then rList.Clear;
   if Assigned(thisList)then thisList.Clear;
-  for i := 0 to pOrderList.Count -1 do
-     x := pOrderList.Strings[i];
-     rpcSaveBillingData(pOrderList);  //  save unsigned info to be displayed when recalled at later time
+  SaveBillingData(pOrderList);  //  save unsigned info to be displayed when recalled at later time
 end;
 
@@ -980,5 +990,5 @@
 function  IsAllOrdersNA(pOrderList:TStringList):boolean;
 var
-  i,j:integer;
+  i:integer;
   rList: TStringList;
 begin
@@ -986,20 +996,5 @@
   if Assigned(rList) then rList.Clear;
   Result := True;// disables dx button
-  for j := 0 to pOrderList.Count-1 do
-  begin
-     // code added to allow consult orders that are not cidc but require dx, dx can be edited.
-    if tempDxNodeExists(pOrderList.Strings[j]) then
-    begin
-       Result := False;
-       Exit;
-    end
-    else
-        if Piece(pOrderList.Strings[j],';',2) = DISCONTINUED_ORDER then
-        begin
-           Result := True;
-           Exit;
-        end;
-
-  end;
+ 
   // call returns boolean, orders is billable=1 or nonbillable=0 or discontinued = 0
   tCallV(rList,'ORWDBA1 ORPKGTYP',[pOrderList]);
@@ -1097,11 +1092,11 @@
                if pos( '(', thisString) > 0 then
                   begin
-                  dx2 := Piece(thisString,U,2);
-                  dx2 := Piece(dx2,'(',1)+ U + Piece(thisString,':',2);
+                     dx2 := Piece(thisString,U,2);
+                     dx2 := Piece(dx2,'(',1)+ U + Piece(thisString,':',2);
                   end
                else
                    begin
-                   dx2 := Piece(thisString,U,2);
-                   dx2 := Piece(dx2,':',1)+ U + Piece(thisString,':',2);
+                      dx2 := Piece(thisString,U,2);
+                      dx2 := Piece(dx2,':',1)+ U + Piece(thisString,':',2);
                    end
                end
@@ -1111,11 +1106,11 @@
                   if pos( '(', thisString) > 0 then
                      begin
-                     dx3 := Piece(thisString,U,2);
-                     dx3 := Piece(dx3,'(',1)+ U + Piece(thisString,':',2);
+                        dx3 := Piece(thisString,U,2);
+                        dx3 := Piece(dx3,'(',1)+ U + Piece(thisString,':',2);
                      end
                   else
                      begin
-                     dx3  := Piece(thisString,U,2);
-                     dx3  := Piece(dx3,':',1)+ U + Piece(thisString,':',2);
+                        dx3  := Piece(thisString,U,2);
+                        dx3  := Piece(dx3,':',1)+ U + Piece(thisString,':',2);
                      end
                   end
@@ -1125,11 +1120,11 @@
                      if pos( '(', thisString) > 0 then
                         begin
-                        dx4 := Piece(thisString,U,2);
-                        dx4 := Piece(dx4,'(',1)+ U + Piece(thisString,':',2);
+                           dx4 := Piece(thisString,U,2);
+                           dx4 := Piece(dx4,'(',1)+ U + Piece(thisString,':',2);
                         end
                      else
                         begin
-                        dx4 := Piece(thisString,U,2);
-                        dx4 := Piece(dx4,':',1)+ U + Piece(thisString,':',2);
+                           dx4 := Piece(thisString,U,2);
+                           dx4 := Piece(dx4,':',1)+ U + Piece(thisString,':',2);
                         end;
                      end;
@@ -1206,11 +1201,13 @@
                 dxRec := BuildConsultDxRec(ConsultOrderRec);
                 orderList.Add(RecOut.FExistingRecordID);
-                TfFlags := Piece(GetPatientTFactors(orderList),U,2);
+              //  TfFlags := Piece(GetPatientTFactors(orderList),U,2);
+                TfFlags := GetPatientTFactors(orderList);
+                TfFlags := ConvertPIMTreatmentFactors(TfFlags);
                 orderList.Clear;
-                if strLen(PChar(dxRec)) > 0 then
-                   orderList.Add(RecOut.FExistingRecordID +TfFlags + '^'+ BuildConsultDxRec(ConsultOrderRec) )
-                else
+              //  if strLen(PChar(dxRec)) > 0 then
+              //     orderList.Add(RecOut.FExistingRecordID +TfFlags + '^'+ BuildConsultDxRec(ConsultOrderRec) )
+              //  else
                    orderList.Add(RecOut.FExistingRecordID +TfFlags);
-                rpcSaveBillingData(OrderList);  //  save unsigned info to be displayed when re
+                SaveBillingData(OrderList);  //  save unsigned info to be displayed when re
              end;
           end;
@@ -1241,9 +1238,9 @@
 
 begin
-   strFlagsAsIs  := pFlagsAsIs; // flags from pims
-   strTFactors   :=  pPLFactors;  // value selected from problem list
-   strFlagsOut   := '';   // flags updated with selected values from problem list
-   x := strFlagsAsIs;
-   Result := '';
+    strFlagsAsIs  := pFlagsAsIs; // flags from pims
+    strTFactors   :=  pPLFactors;  // value selected from problem list
+    strFlagsOut   := '';   // flags updated with selected values from problem list
+    x := strFlagsAsIs;
+    Result := '';
 
     UBAGlobals.SC  := Copy(x,1,1);
@@ -1279,4 +1276,8 @@
           UBAGlobals.MST := 'C';
 
+    if UBAGlobals.HNC <> 'N' then
+       if StrPos(PChar(strTFactors),PChar(HEAD_NECK_CANCER)) <> nil then
+          UBAGlobals.HNC := 'C';
+
     if UBAGlobals.CV <>'N' then
        if StrPos(PChar(strTFactors),PChar(COMBAT_VETERAN)) <> nil then
@@ -1289,10 +1290,10 @@
 end;
 
-procedure GetBAStatus(pProvider:int64; pLocation:integer);
+procedure GetBAStatus(pProvider:int64; pPatientDFN: string);
 begin
   // sets global switch, based in value returned from server.
   // True ->  Billing Aware Switch ON. else OFF
 
-  UBACore.rpcSetBillingAwareSwitch(pProvider,pLocation);
+  UBACore.rpcSetBillingAwareSwitch(pProvider,pPatientDFN);
 
   if Assigned(UBAGlobals.BAPCEDiagList) then UBAGlobals.BAPCEDiagList.Clear;
@@ -1374,4 +1375,6 @@
    Result := (strSC + strAO + strIR + strEC + strMST + strHNC + strCV);
 end;
+
+
 // Delete dc'd orders from BACopiedOrderList to keep things in sync.
 procedure DeleteDCOrdersFromCopiedList(pOrderID:string);
@@ -1396,5 +1399,5 @@
 procedure UpdateBAConsultOrderList(pDcOrders: TStringList);
 var
- AnOrder,x: string;
+ x: string;
  var i,j: integer;
  holdList : TStringList;
@@ -1425,22 +1428,50 @@
 end;
 
-{function  SetOrderIDConsultDxRequired(pOrderID:string):string;
-var
-  i: integer;
-  orderIdIN, OrderIdOut,x: string;
-begin
-   result := '';
-   for i := 0 to UBAGlobals.BAConsultOrdersRequireDx.Count-1 do
-   begin
-      orderIdIN := pOrderID;
-      x := UBAGlobals.BAConsultOrdersRequireDx.Strings[i];
-      if orderIdIN = UBAGlobals.BAConsultOrdersRequireDx.Strings[i] then
-             orderIdOUT := 'CONSULT_DX' // consult requires dx entry. enable display of cidc and non-cidc
-          else
-             orderIdOUT := orderIdIN;
-   end;
-   result := OrderIdOut;
-end;
-      }
+// loop thru CIDC records remove records with invalid orderid
+function  VerifyOrderIdExists(pOrderList: TStringList): TStringList;
+var
+  goodList: TStringList;
+  tOrderID: integer;
+ i: integer;
+begin
+  goodList := TStringList.Create;
+  goodList.clear;
+
+  if pOrderList.Count > 0 then
+  begin
+      for i := 0 to pOrderList.Count-1 do
+      begin
+         tOrderID := StrToIntDef(Piece(pOrderList.Strings[i],';',1), 0);
+         if tOrderID > 0 then
+            goodList.add(pOrderList.Strings[i]);
+      end;
+  end;
+  result := goodList;
+end;
+
+// parse string return Treatment Factors when text inlcudes multiple "(())"
+//HDS8409
+function  ProcessProblemTFactors(pText:String):String;
+var AText1,x: string;
+    i,j: integer;
+begin
+ if StrPos(PChar(pText),'(') = nil then exit;
+ AText1 := Piece(pText,U,2);
+ i := 1;
+ j := 0;
+ while j = 0 do
+ begin
+    x := Piece(AText1,'(',i);
+    if Length(x) > 0 then
+       inc(i)
+    else
+    begin
+       x := Piece(AText1,'(',i-1);
+       x := Piece(x,')',1);
+       j := 1;
+       Result := x;
+    end;
+  end;
+end;
 
 end.
Index: cprs/branches/foia-cprs/CPRS-Chart/BA/UBAGlobals.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/BA/UBAGlobals.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/BA/UBAGlobals.pas	(revision 460)
@@ -316,6 +316,4 @@
    sourceOrderID: TStringList;
    targetOrderIDLst: TStringList;
-   i:integer;
-   tempOrderStr:string;
 begin
      //Retrieve TF's/CI's from SOURCE Order
@@ -371,5 +369,4 @@
    if UBAGlobals.tempDxNodeExists(thisOrderID) then
      begin
-     thisRec := TBADxRecord.Create;
      if Assigned(tempDxList) then
 
@@ -523,5 +520,4 @@
 begin
   Result := 0;
-  thisRec := TBADxRecord.Create;
 
    if Assigned(tempDxList) then
@@ -580,5 +576,4 @@
   selectedOrders: smallint;
 begin
-  Result := 0;
   selectedOrders := 0;
 
@@ -762,5 +757,4 @@
    if UBAGlobals.tempDxNodeExists(thisOrderID) then
      begin
-     thisRec := TBADxRecord.Create;
 
      if Assigned(tempDxList) then
@@ -878,5 +872,4 @@
   Result := false;
 
-  thisRec := TBADxRecord.Create;
      try
         for i := 0 to tempDxList.Count - 1 do
@@ -909,5 +902,4 @@
   i: integer;
 begin
-  thisRec := TBADxRecord.Create;
 
   try
@@ -1013,9 +1005,6 @@
 // StringList used to store DX Codes selected from Encounter Form
 var
-  BAVisitStr,BADxIEN: string;
-  BAFileCat    : char;
-  BAFileDateTimeStr: string;
+  BADxIEN: string;
   BAProviderStr, BAProviderName : string;
-  PList: TStringList;
   AList: TStringList;
 begin
@@ -1106,5 +1095,4 @@
 begin
   Result := false;
-  thisRec := TBADxRecord.Create;
   if Assigned(tempDxList) then
      try
Index: cprs/branches/foia-cprs/CPRS-Chart/BA/fBALocalDiagnoses.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/BA/fBALocalDiagnoses.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/BA/fBALocalDiagnoses.dfm	(revision 460)
@@ -21,18 +21,9 @@
   PixelsPerInch = 96
   TextHeight = 13
-  object lblPatientName: TStaticText
-    Left = 50
-    Top = 3
-    Width = 65
-    Height = 17
-    Caption = 'PatientName'
-    TabOrder = 3
-    TabStop = True
-  end
   object pnlTop: TPanel
     Left = 0
     Top = 0
     Width = 612
-    Height = 112
+    Height = 96
     Align = alTop
     Caption = 'pnlTop'
@@ -40,8 +31,8 @@
     DesignSize = (
       612
-      112)
+      96)
     object lbOrders: TListBox
-      Left = 8
-      Top = 24
+      Left = 7
+      Top = 25
       Width = 599
       Height = 69
@@ -49,9 +40,9 @@
       IntegralHeight = True
       ItemHeight = 13
-      TabOrder = 1
+      TabOrder = 2
       OnMouseMove = lbOrdersMouseMove
     end
     object ORStaticText1: TORStaticText
-      Left = 8
+      Left = 216
       Top = 8
       Width = 169
@@ -59,15 +50,30 @@
       AutoSize = False
       Caption = 'Selected Orders'
+      TabOrder = 1
+      TabStop = True
+      OnEnter = ORStaticText1Enter
+      OnExit = ORStaticText1Exit
+    end
+    object lblPatientName: TStaticText
+      Left = 11
+      Top = 9
+      Width = 76
+      Height = 17
+      Caption = 'PatientName'
+      Font.Charset = DEFAULT_CHARSET
+      Font.Color = clWindowText
+      Font.Height = -11
+      Font.Name = 'MS Sans Serif'
+      Font.Style = [fsBold]
+      ParentFont = False
       TabOrder = 0
       TabStop = True
-      OnEnter = ORStaticText1Enter
-      OnExit = ORStaticText1Exit
     end
   end
   object pnlMain: TPanel
     Left = 0
-    Top = 112
+    Top = 96
     Width = 612
-    Height = 243
+    Height = 259
     Align = alClient
     TabOrder = 1
Index: cprs/branches/foia-cprs/CPRS-Chart/BA/fBALocalDiagnoses.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/BA/fBALocalDiagnoses.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/BA/fBALocalDiagnoses.pas	(revision 460)
@@ -18,5 +18,4 @@
      end;
   TfrmBALocalDiagnoses = class(TfrmAutoSz)
-    lblPatientName: TStaticText;
     pnlTop: TPanel;
     lbOrders: TListBox;
@@ -38,4 +37,5 @@
     ORStaticText3: TORStaticText;
     ORStaticText4: TORStaticText;
+    lblPatientName: TStaticText;
     procedure buOKClick(Sender: TObject);
     procedure buCancelClick(Sender: TObject);
@@ -798,6 +798,6 @@
 procedure TfrmBALocalDiagnoses.AddToProblemList;
 var
-   i,j: integer;
-   tempCode, passCode,x: string;
+   i: integer;
+   tempCode, passCode: string;
    NewList: TStringList;
    PatientInfo:string;
Index: cprs/branches/foia-cprs/CPRS-Chart/BA/fBAOptionsDiagnoses.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/BA/fBAOptionsDiagnoses.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/BA/fBAOptionsDiagnoses.dfm	(revision 460)
@@ -30,5 +30,5 @@
       TabOrder = 0
       object Splitter1: TSplitter
-        Left = 468
+        Left = 458
         Top = 26
         Width = -3
@@ -37,5 +37,5 @@
       end
       object Splitter2: TSplitter
-        Left = 193
+        Left = 169
         Top = 26
         Width = 7
@@ -44,5 +44,5 @@
       end
       object Splitter3: TSplitter
-        Left = 467
+        Left = 457
         Top = 26
         Width = 1
@@ -50,13 +50,6 @@
         Cursor = crHSplit
       end
-      object Splitter4: TSplitter
-        Left = 385
-        Top = 26
-        Width = 2
-        Height = 463
-        Cursor = crHSplit
-      end
       object Splitter5: TSplitter
-        Left = 465
+        Left = 455
         Top = 26
         Width = 2
@@ -112,5 +105,5 @@
         Left = 1
         Top = 26
-        Width = 192
+        Width = 168
         Height = 463
         Align = alLeft
@@ -126,7 +119,6 @@
           Left = 0
           Top = 17
-          Width = 192
+          Width = 161
           Height = 446
-          Align = alClient
           Font.Charset = DEFAULT_CHARSET
           Font.Color = clWindowText
@@ -148,5 +140,5 @@
           Left = 0
           Top = 0
-          Width = 192
+          Width = 168
           Height = 17
           DragReorder = False
@@ -161,7 +153,7 @@
       end
       object Panel4: TPanel
-        Left = 200
-        Top = 26
-        Width = 185
+        Left = 176
+        Top = 26
+        Width = 201
         Height = 463
         Align = alLeft
@@ -177,12 +169,12 @@
           Left = 0
           Top = 17
-          Width = 185
+          Width = 201
           Height = 446
-          Align = alLeft
-          Anchors = [akTop, akRight, akBottom]
+          Align = alClient
           ItemHeight = 13
           MultiSelect = True
           ParentShowHint = False
           ShowHint = True
+          Sorted = True
           TabOrder = 0
           OnClick = lbDiagnosisChange
@@ -196,5 +188,5 @@
           Left = 0
           Top = 0
-          Width = 185
+          Width = 201
           Height = 17
           DragReorder = False
@@ -209,7 +201,7 @@
       end
       object Panel5: TPanel
-        Left = 465
-        Top = 26
-        Width = 247
+        Left = 455
+        Top = 26
+        Width = 257
         Height = 463
         Align = alClient
@@ -220,5 +212,5 @@
           Left = 0
           Top = 17
-          Width = 247
+          Width = 257
           Height = 446
           Align = alClient
@@ -229,4 +221,5 @@
           ParentShowHint = False
           ShowHint = True
+          Sorted = True
           TabOrder = 0
           OnClick = lbPersonalDxClick
@@ -238,5 +231,5 @@
           Left = 0
           Top = 0
-          Width = 247
+          Width = 257
           Height = 17
           DragReorder = False
@@ -277,5 +270,5 @@
       end
       object Panel7: TPanel
-        Left = 387
+        Left = 377
         Top = 26
         Width = 78
Index: cprs/branches/foia-cprs/CPRS-Chart/BA/fBAOptionsDiagnoses.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/BA/fBAOptionsDiagnoses.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/BA/fBAOptionsDiagnoses.pas	(revision 460)
@@ -29,5 +29,4 @@
     btnAdd: TBitBtn;
     btnDelete: TBitBtn;
-    Splitter4: TSplitter;
     Splitter5: TSplitter;
     Button1: TButton;
@@ -65,4 +64,6 @@
     procedure ListDiagnosesCodes(Section: String);
     procedure InactiveICDNotification;
+    procedure SyncDxDeleteList;
+    procedure SyncDxNewList;
   
   public
@@ -123,11 +124,12 @@
     LoadEncounterDx;
     ListDiagnosesSections(lbSections.Items);
-    lbPersonalDx.Items := rpcGetPersonalDxList(User.DUZ);
+  //  lbPersonalDx.Items := rpcGetPersonalDxList(User.DUZ);
+    LoadPersonalDxList;
     btnOK.Enabled := False;
     hdrCntlDx.Sections[0].Width := lbPersonalDX.Width;
     hdrCntlDxSections.Sections[0].Width := lbSections.Width;
     hdrCntlDxAdd.Sections[0].Width := lbDiagnosis.Width;
-    lbPersonalDx.Sorted := false;
-    lbPersonalDx.Sorted := True;
+  //  lbPersonalDx.Sorted := false;
+ //  lbPersonalDx.Sorted := True;
     lbPersonalDX.Repaint;
 end;
@@ -374,18 +376,9 @@
 procedure TfrmBAOptionsDiagnoses.btnDeleteClick(Sender: TObject);
 var
-  delDxCode: string;
-  i, c: integer;
-begin
-  inherited;
-  // save dx seleted for deletion, update file when ok is pressed
-  for i := 0 to lbPersonalDX.Count-1 do
-  begin
-     if(lbPersonalDX.Selected[i]) then
-     begin
-        delDxCode := Piece(lbPersonalDX.Items[i],U,1);
-        delDxLst.Add(delDxCode);
-     end;
- end;
-
+   i, c: integer;
+begin
+  inherited;
+  SyncDxDeleteList;
+  SyncDxNewList;
  // delete selected dx from listbox.
  with lbPersonalDX do
@@ -599,4 +592,42 @@
 end;
 
+procedure TfrmBAOptionsDiagnoses.SyncDxDeleteList;
+var
+ i: integer;
+ delDxCode: string;
+begin
+// save dx selected for deletion, update file when ok is pressed
+  for i := 0 to lbPersonalDX.Count-1 do
+  begin
+     if(lbPersonalDX.Selected[i]) then
+     begin
+        delDxCode := Piece(lbPersonalDX.Items[i],U,1);
+        delDxLst.Add(delDxCode);
+     end;
+ end;
+end;
+
+procedure TfrmBAOptionsDiagnoses.SyncDxNewList;
+var
+i,j :integer;
+begin
+ // remove diagnoses selected for deletion from newdxList;
+   for i := 0 to lbPersonalDX.Count-1 do
+   begin
+      if lbPersonalDX.Selected[i] then
+      begin
+        for j := 0 to newDxLst.Count-1 do
+        begin
+           if (Piece(lbPersonalDX.Items[i],U,1)) = (newDxLst.Strings[j]) then
+           begin
+              newDxLst.Delete(j);
+              Break;
+           end;
+        end;
+     end;
+  end;
+end;
+
+
 initialization
   uAddToPDL := 0;
Index: cprs/branches/foia-cprs/CPRS-Chart/CPRS.vpw
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/CPRS.vpw	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/CPRS.vpw	(revision 460)
@@ -0,0 +1,32 @@
+[ProjectDates]
+[State]
+SCREEN: 800 600 22 22 600 432 0 0 N 0 0 0 0 588 233
+CWD: D:\vista\cprs\main\CPRS-Chart
+BUFFER: BN="D:\ejb\book\chap09\timetracker\Employee.java"
+BI: MA=1 74 1  TABS=1 9  WWS=1 IWT=0 ST=0 IN=2 BW=0 US=32000 RO=1 SE=1 SN=0 BIN=0 MN=Java	HM=0 MF=0 TL=0 MLL=0 ASE=0 LNL=6 LCF=0 CAPS=0
+VIEW: LN=.0 CL=1 LE=0 CX=0 CY=1 WI=5 BI=12 HT=0 HN=0 HF=0 HC=4
+BUFFER: BN="D:\ejb\book\chap09\timetracker\EmployeePK.java"
+BI: MA=1 74 1  TABS=1 9  WWS=1 IWT=0 ST=0 IN=2 BW=0 US=32000 RO=1 SE=1 SN=0 BIN=0 MN=Java	HM=0 MF=0 TL=0 MLL=0 ASE=0 LNL=6 LCF=0 CAPS=0
+VIEW: LN=.0 CL=1 LE=0 CX=0 CY=1 WI=5 BI=14 HT=0 HN=0 HF=0 HC=4
+BUFFER: BN="D:\ejb\book\chap09\timetracker\EmployeeBean.java"
+BI: MA=1 74 1  TABS=1 9  WWS=1 IWT=0 ST=0 IN=2 BW=0 US=32000 RO=1 SE=1 SN=0 BIN=0 MN=Java	HM=0 MF=608 TL=0 MLL=0 ASE=0 LNL=6 LCF=0 CAPS=0
+VIEW: LN=.0 CL=1 LE=0 CX=0 CY=1 WI=5 BI=15 HT=0 HN=0 HF=0 HC=4
+WINDOW: 0 0 522 167 -1 -1 N  WF=0 WT=2 "Courier New,9,0,1"
+BUFFER: BN="D:\ejb\book\chap09\timetracker\Employee.java"
+VIEW: LN=.0 CL=1 LE=0 CX=0 CY=1 WI=121 BI=12 HT=0 HN=0 HF=0 HC=4
+WINDOW: 22 22 522 167 -1 -1 N  WF=0 WT=3 "Courier New,9,0,1"
+BUFFER: BN="D:\ejb\book\chap09\timetracker\EmployeePK.java"
+VIEW: LN=.0 CL=1 LE=0 CX=0 CY=1 WI=122 BI=14 HT=0 HN=0 HF=0 HC=4
+WINDOW: 44 44 522 167 -1 -1 N  WF=0 WT=1 "Courier New,9,0,1"
+BUFFER: BN="D:\ejb\book\chap09\timetracker\EmployeeBean.java"
+VIEW: LN=.6777 CL=1 LE=0 CX=0 CY=6 WI=123 BI=15 HT=0 HN=0 HF=0 HC=4
+FILEHIST: 9
+c:\temp\p4win\ReadOnly-0-Rev-12-fReview.pas
+D:\dev\AppExHandler\AppExHandler.pas
+D:\vista\cprs\OR_3_190V24\CPRS-Chart\fmeds.dfm
+D:\vista\cprs\OR_3_190V24\CPRS-Chart\Orders\fODMedNVA.pas
+D:\vista\cprs\OR_3_215V26\CPRS-Chart\dcu\Trpcb.dcu
+D:\vista\cprs\OR_3_215V26\CPRS-Chart\Accessibility_TLB.~pas
+D:\ejb\book\chap09\timetracker\Employee.java
+D:\ejb\book\chap09\timetracker\EmployeePK.java
+D:\ejb\book\chap09\timetracker\EmployeeBean.java
Index: cprs/branches/foia-cprs/CPRS-Chart/CPRSChart.bak
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/CPRSChart.bak	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/CPRSChart.bak	(revision 460)
@@ -0,0 +1,328 @@
+program CPRSChart;
+
+uses
+  SQASrvr,
+  ShareMem,
+  Forms,
+  ORSystem,
+  fPage in 'fPage.pas' {frmPage},
+  fHSplit in 'fHSplit.pas' {frmHSplit},
+  fHP in 'fHP.pas' {frmHP},
+  fCover in 'fCover.pas' {frmCover},
+  fMeds in 'fMeds.pas' {frmMeds},
+  fNotes in 'fNotes.pas' {frmNotes},
+  fDCSumm in 'fDCSumm.pas' {frmDCSumm},
+  fLabs in 'fLabs.pas' {frmLabs},
+  fReports in 'fReports.pas' {frmReports},
+  uCore in 'uCore.pas',
+  fPtSel in 'fPtSel.pas' {frmPtSel},
+  fPtSens in 'fPtSens.pas' {frmPtSens},
+  rCore in 'rCore.pas',
+  fEncnt in 'fEncnt.pas' {frmEncounter},
+  fVisit in 'fVisit.pas' {frmVisit},
+  fPtDemo in 'fPtDemo.pas' {frmPtDemo},
+  rTIU in 'rTIU.pas',
+  fxBroker in 'fxBroker.pas' {frmBroker},
+  fNoteBA in 'fNoteBA.pas' {frmNotesByAuthor},
+  fNoteBD in 'fNoteBD.pas' {frmNotesByDate},
+  fLabTest in 'fLabTest.pas' {frmLabTest},
+  fLabTestGroups in 'fLabTestGroups.pas' {frmLabTestGroups},
+  fLabTests in 'fLabTests.pas' {frmLabTests},
+  rLabs in 'rLabs.pas',
+  fSignItem in 'fSignItem.pas' {frmSignItem},
+  rCover in 'rCover.pas',
+  fRptBox in 'fRptBox.pas' {frmReportBox},
+  rReports in 'rReports.pas',
+  fAbout in 'fAbout.pas' {frmAbout},
+  fxLists in 'fxLists.pas' {frmDbgList},
+  fProbs in 'fProbs.pas' {frmProblems},
+  fAutoSz in 'fAutoSz.pas' {frmAutoSz},
+  rMisc in 'rMisc.pas',
+  fxServer in 'fxServer.pas' {frmDbgServer},
+  fPtCWAD in 'fPtCWAD.pas' {frmPtCWAD},
+  rMeds in 'rMeds.pas',
+  fVitals in 'fVitals.pas' {frmVitals},
+  uProbs in 'uProbs.pas',
+  fProbEdt in 'fProbEdt.pas' {frmdlgProb},
+  fProbflt in 'fProbFlt.pas' {frmPlVuFilt},
+  fProbCmt in 'fProbCmt.pas' {frmProbCmt},
+  fNoteCslt in 'fNoteCslt.pas' {frmNoteConsult},
+  fNotePrt in 'fNotePrt.pas' {frmNotePrint},
+  uConst in 'uConst.pas',
+  fConsults in 'Consults\fConsults.pas' {frmConsults},
+  fLkUpLocation in 'fLkUpLocation.pas' {frmLkUpLocation},
+  fRename in 'fRename.pas' {frmRename},
+  fDateRange in 'fDateRange.pas' {frmDateRange},
+  fRenewOutMed in 'fRenewOutMed.pas' {frmRenewOutMed},
+  fConsult513Prt in 'Consults\fConsult513Prt.pas' {frm513Print},
+  fConsultAct in 'Consults\fConsultAct.pas' {frmConsultAction},
+  fConsultAlertTo in 'Consults\fConsultAlertTo.pas' {frmConsultAlertsTo},
+  fConsultBD in 'Consults\fConsultBD.pas' {frmConsultsByDate},
+  fConsultBS in 'Consults\fConsultBS.pas' {frmConsultsByService},
+  fConsultBSt in 'Consults\fConsultBSt.pas' {frmConsultsByStatus},
+  fConsultsView in 'Consults\fConsultsView.pas' {frmConsultsView},
+  rConsults in 'Consults\rConsults.pas',
+  uConsults in 'Consults\uConsults.pas',
+  fTimeout in 'fTimeout.pas' {frmTimeout},
+  fNoteDR in 'fNoteDR.pas' {frmNoteDelReason},
+  rDCSumm in 'rDCSumm.pas',
+  fSplash in 'fSplash.pas' {frmSplash},
+  fCsltNote in 'Consults\fCsltNote.pas' {frmCsltNote},
+  rProbs in 'rProbs.pas',
+  fEditConsult in 'Consults\fEditConsult.pas' {frmEditCslt},
+  fEditProc in 'Consults\fEditProc.pas' {frmEditProc},
+  fAllgyFind in 'fAllgyFind.pas' {frmAllgyFind},
+  fAddlSigners in 'fAddlSigners.pas' {frmAddlSigners},
+  fLabPrint in 'fLabPrint.pas' {frmLabPrint},
+  fReportsPrint in 'fReportsPrint.pas' {frmReportPrt},
+  fvit in 'fvit.pas' {frmVit},
+  uPCE in 'Encounter\uPCE.pas',
+  fEncounterFrame in 'Encounter\fEncounterFrame.pas' {frmEncounterFrame},
+  fPCEBase in 'Encounter\fPCEBase.pas' {frmPCEBase},
+  fPCELex in 'Encounter\fPCELex.pas' {frmPCELex},
+  fPCEOther in 'Encounter\fPCEOther.pas' {frmPCEOther},
+  fProcedure in 'Encounter\fProcedure.pas' {frmProcedures},
+  fSkinTest in 'Encounter\fSkinTest.pas' {frmSkinTests},
+  fVisitType in 'Encounter\fVisitType.pas' {frmVisitType},
+  rPCE in 'Encounter\rPCE.pas',
+  fDiagnoses in 'Encounter\fDiagnoses.pas' {frmDiagnoses},
+  fPatientEd in 'Encounter\fPatientEd.pas' {frmPatientEd},
+  fExam in 'Encounter\fExam.pas' {frmExams},
+  fHealthFactor in 'Encounter\fHealthFactor.pas' {frmHealthFactors},
+  fImmunization in 'Encounter\fImmunization.pas' {frmImmunizations},
+  fEncVitals in 'Encounter\fEncVitals.pas' {frmEncVitals},
+  fEffectDate in 'fEffectDate.pas' {frmEffectDate},
+  fPtSelDemog in 'fPtSelDemog.pas' {frmPtSelDemog},
+  fPtSelOptns in 'fPtSelOptns.pas' {frmPtSelOptns},
+  uInit in 'uInit.pas',
+  uSpell in 'uSpell.pas',
+  dShared in 'dShared.pas' {dmodShared: TDataModule},
+  fDrawers in 'fDrawers.pas' {frmDrawers},
+  fMedCopy in 'fMedCopy.pas' {frmMedCopy},
+  uReminders in 'uReminders.pas',
+  rReminders in 'rReminders.pas',
+  fReminderTree in 'fReminderTree.pas' {frmReminderTree},
+  fReminderDialog in 'fReminderDialog.pas' {frmRemDlg},
+  fReportsAdhocSubItem1 in 'fReportsAdhocSubItem1.pas' {frmReportsAdhocSubItem1},
+  fReportsAdhocComponent1 in 'fReportsAdhocComponent1.pas' {frmReportsAdhocComponent1},
+  fPtSelMsg in 'fPtSelMsg.pas' {frmPtSelMsg},
+  fMHTest in 'fMHTest.pas' {frmMHTest},
+  fGAF in 'Encounter\fGAF.pas' {frmGAF},
+  fPCEProvider in 'Encounter\fPCEProvider.pas' {frmPCEProvider},
+  fPCEBaseGrid in 'Encounter\fPCEBaseGrid.pas' {frmPCEBaseGrid},
+  fPCEBaseMain in 'Encounter\fPCEBaseMain.pas' {frmPCEBaseMain},
+  fNoteProps in 'fNoteProps.pas' {frmNoteProperties},
+  fNotesBP in 'fNotesBP.pas' {frmNotesBP},
+  fLabInfo in 'fLabInfo.pas' {frmLabInfo},
+  fPreReq in 'Consults\fPreReq.pas' {frmPrerequisites},
+  fDCSummProps in 'fDCSummProps.pas' {frmDCSummProperties},
+  fHFSearch in 'Encounter\fHFSearch.pas' {frmHFSearch},
+  fConsMedRslt in 'Consults\fConsMedRslt.pas' {frmConsMedRslt},
+  mVitMetric in 'Vitals\mVitMetric.pas' {fraVitMetric: TFrame},
+  mVitAll in 'Vitals\mVitAll.pas' {fraVitAll: TFrame},
+  mVitBase in 'Vitals\mVitBase.pas' {fraVitBase: TFrame},
+  uVitals in 'Vitals\uVitals.pas',
+  rVitals in 'Vitals\rVitals.pas',
+  mVitPulse in 'Vitals\mVitPulse.pas' {fraVitPulse: TFrame},
+  mVitResp in 'Vitals\mVitResp.pas' {fraVitResp: TFrame},
+  mVitBP in 'Vitals\mVitBP.pas' {fraVitPB: TFrame},
+  mVitTemp in 'Vitals\mVitTemp.pas' {fraVitTemp: TFrame},
+  mVitHeight in 'Vitals\mVitHeight.pas' {fraVitHeight: TFrame},
+  mVitWeight in 'Vitals\mVitWeight.pas' {fraVitWeight: TFrame},
+  mVitPain in 'Vitals\mVitPain.pas' {fraVitPain: TFrame},
+  mVitPO2 in 'Vitals\mVitPO2.pas' {fraVitPO2: TFrame},
+  mVitCVP in 'Vitals\mVitCVP.pas' {fraVitCVP: TFrame},
+  mVitCirGirth in 'Vitals\mVitCirGirth.pas' {fraVitCircum: TFrame},
+  uDCSumm in 'uDCSumm.pas',
+  uDocTree in 'uDocTree.pas',
+  fVitalsDate in 'Vitals\fVitalsDate.pas' {frmVitalsDate},
+  uTemplates in 'Templates\uTemplates.pas',
+  fTemplateDialog in 'Templates\fTemplateDialog.pas' {frmTemplateDialog},
+  fTemplateEditor in 'Templates\fTemplateEditor.pas' {frmTemplateEditor},
+  fTemplateFieldEditor in 'Templates\fTemplateFieldEditor.pas' {frmTemplateFieldEditor},
+  fTemplateFields in 'Templates\fTemplateFields.pas' {frmTemplateFields},
+  fTemplateObjects in 'Templates\fTemplateObjects.pas' {frmTemplateObjects},
+  fTemplateView in 'Templates\fTemplateView.pas' {frmTemplateView},
+  mTemplateFieldButton in 'Templates\mTemplateFieldButton.pas' {fraTemplateFieldButton: TFrame},
+  rTemplates in 'Templates\rTemplates.pas',
+  uTemplateFields in 'Templates\uTemplateFields.pas',
+  fTemplateAutoGen in 'Templates\fTemplateAutoGen.pas' {frmTemplateAutoGen},
+  mVisitRelated in 'Encounter\mVisitRelated.pas' {fraVisitRelated: TFrame},
+  fRemVisitInfo in 'fRemVisitInfo.pas' {frmRemVisitInfo},
+  fIconLegend in 'fIconLegend.pas' {frmIconLegend},
+  mImgText in 'mImgText.pas' {fraImgText: TFrame},
+  fTemplateImport in 'Templates\fTemplateImport.pas' {frmTemplateImport},
+  fRemCoverSheet in 'fRemCoverSheet.pas' {frmRemCoverSheet},
+  uTIU in 'uTIU.pas',
+  fRemCoverPreview in 'fRemCoverPreview.pas' {frmRemCoverPreview},
+  fPCEEdit in 'Encounter\fPCEEdit.pas' {frmPCEEdit},
+  uSurgery in 'uSurgery.pas',
+  fSurgeryView in 'fSurgeryView.pas' {frmSurgeryView},
+  rSurgery in 'rSurgery.pas',
+  uCaseTree in 'uCaseTree.pas',
+  fSurgery in 'fSurgery.pas' {frmSurgery},
+  fNoteIDParents in 'fNoteIDParents.pas' {frmNoteIDParents},
+  uReports in 'uReports.pas',
+  fNoteCPFields in 'fNoteCPFields.pas' {frmNoteCPFields},
+  CPRSChart_TLB in 'CPRSChart_TLB.pas',
+  uEventHooks in 'uEventHooks.pas',
+  rEventHooks in 'rEventHooks.pas',
+  fPtSelOptSave in 'fPtSelOptSave.pas' {frmPtSelOptSave},
+  uOrders in 'Orders\uOrders.pas',
+  fOCSession in 'Orders\fOCSession.pas' {frmOCSession},
+  fODAuto in 'Orders\fODAuto.pas',
+  fODBase in 'Orders\fODBase.pas' {frmODBase},
+  fODDiet in 'Orders\fODDiet.pas' {frmODDiet},
+  fODDietLT in 'Orders\fODDietLT.pas' {frmODDietLT},
+  fODGen in 'Orders\fODGen.pas' {frmODGen},
+  fODLab in 'Orders\fODLab.pas' {frmODLab},
+  fODLabImmedColl in 'Orders\fODLabImmedColl.pas' {frmODLabImmedColl},
+  fODLabOthCollSamp in 'Orders\fODLabOthCollSamp.pas' {frmODLabOthCollSamp},
+  fODLabOthSpec in 'Orders\fODLabOthSpec.pas' {frmODLabOthSpec},
+  fODMedComplex in 'Orders\fODMedComplex.pas' {frmODMedComplex},
+  fODMedFA in 'Orders\fODMedFA.pas' {frmODMedFA},
+  fODMedIn in 'Orders\fODMedIn.pas' {frmODMedIn},
+  fODMedIV in 'Orders\fODMedIV.pas' {frmODMedIV},
+  fODMedOIFA in 'Orders\fODMedOIFA.pas' {frmODMedOIFA},
+  fODMedOut in 'Orders\fODMedOut.pas' {frmODMedOut},
+  fODMeds in 'Orders\fODMeds.pas' {frmODMeds},
+  fODMessage in 'Orders\fODMessage.pas' {frmODMessage},
+  fODMisc in 'Orders\fODMisc.pas' {frmODMisc},
+  fODRad in 'Orders\fODRad.pas' {frmODRad},
+  fODRadApproval in 'Orders\fODRadApproval.pas' {frmODRadApproval},
+  fODRadConShRes in 'Orders\fODRadConShRes.pas' {frmODRadConShRes},
+  fODRadImType in 'Orders\fODRadImType.pas' {frmODRadImType},
+  fODSaveQuick in 'Orders\fODSaveQuick.pas' {frmODQuick},
+  fODText in 'Orders\fODText.pas' {frmODText},
+  fODVitals in 'Orders\fODVitals.pas' {frmODVitals},
+  fOMAction in 'Orders\fOMAction.pas' {frmOMAction},
+  fOMHTML in 'Orders\fOMHTML.pas' {frmOMHTML},
+  fOMNavA in 'Orders\fOMNavA.pas' {frmOMNavA},
+  fOMProgress in 'Orders\fOMProgress.pas' {frmOMProgress},
+  fOMSet in 'Orders\fOMSet.pas' {frmOMSet},
+  fOMVerify in 'Orders\fOMVerify.pas' {frmOMVerify},
+  fOrderComment in 'Orders\fOrderComment.pas' {frmWardComments},
+  fOrderFlag in 'Orders\fOrderFlag.pas' {frmFlagOrder},
+  fOrders in 'Orders\fOrders.pas' {frmOrders},
+  fOrdersAlert in 'Orders\fOrdersAlert.pas' {frmAlertOrders},
+  fOrderSaveQuick in 'Orders\fOrderSaveQuick.pas' {frmSaveQuickOrder},
+  fOrdersComplete in 'Orders\fOrdersComplete.pas' {frmCompleteOrders},
+  fOrdersCopy in 'Orders\fOrdersCopy.pas' {frmCopyOrders},
+  fOrdersDC in 'Orders\fOrdersDC.pas' {frmDCOrders},
+  fOrdersHold in 'Orders\fOrdersHold.pas' {frmHoldOrders},
+  fOrdersOnChart in 'Orders\fOrdersOnChart.pas' {frmOnChartOrders},
+  fOrdersPrint in 'Orders\fOrdersPrint.pas' {frmOrdersPrint},
+  fOrdersRefill in 'Orders\fOrdersRefill.pas' {frmRefillOrders},
+  fOrdersRelease in 'Orders\fOrdersRelease.pas' {frmReleaseOrders},
+  fOrdersRenew in 'Orders\fOrdersRenew.pas' {frmRenewOrders},
+  fOrdersSign in 'Orders\fOrdersSign.pas' {frmSignOrders},
+  fOrdersTS in 'Orders\fOrdersTS.pas' {frmOrdersTS},
+  fOrdersUnhold in 'Orders\fOrdersUnhold.pas' {frmUnholdOrders},
+  fOrdersVerify in 'Orders\fOrdersVerify.pas' {frmVerifyOrders},
+  fOrderUnflag in 'Orders\fOrderUnflag.pas' {frmUnflagOrder},
+  fOrderVw in 'Orders\fOrderVw.pas' {frmOrderView},
+  rODAllergy in 'Orders\rODAllergy.pas',
+  rODBase in 'Orders\rODBase.pas',
+  rODDiet in 'Orders\rODDiet.pas',
+  rODLab in 'Orders\rODLab.pas',
+  rODMeds in 'Orders\rODMeds.pas',
+  rODRad in 'Orders\rODRad.pas',
+  rOrders in 'Orders\rOrders.pas',
+  uODBase in 'Orders\uODBase.pas',
+  fOCAccept in 'Orders\fOCAccept.pas' {frmOCAccept},
+  fODConsult in 'Consults\fODConsult.pas' {frmODCslt},
+  fODProc in 'Consults\fODProc.pas' {frmODProc},
+  uOptions in 'Options\uOptions.pas',
+  fOptionsCombinations in 'Options\fOptionsCombinations.pas' {frmOptionsCombinations},
+  fOptionsDays in 'Options\fOptionsDays.pas' {frmOptionsDays},
+  fOptionsLists in 'Options\fOptionsLists.pas' {frmOptionsLists},
+  fOptionsNewList in 'Options\fOptionsNewList.pas' {frmOptionsNewList},
+  fOptionsNotes in 'Options\fOptionsNotes.pas' {frmOptionsNotes},
+  fOptionsOther in 'Options\fOptionsOther.pas' {frmOptionsOther},
+  fOptionsPatientSelection in 'Options\fOptionsPatientSelection.pas' {frmOptionsPatientSelection},
+  fOptionsPrimaryList in 'Options\fOptionsPrimaryList.pas' {frmOptionsPrimaryList},
+  fOptionsReminders in 'Options\fOptionsReminders.pas' {frmOptionsReminders},
+  fOptionsReportsCustom in 'Options\fOptionsReportsCustom.pas' {frmOptionsReportsCustom},
+  fOptionsReportsDefault in 'Options\fOptionsReportsDefault.pas' {frmOptionsReportsDefault},
+  fOptionsSubscribe in 'Options\fOptionsSubscribe.pas' {frmOptionsSubscribe},
+  fOptionsSurrogate in 'Options\fOptionsSurrogate.pas' {frmOptionsSurrogate},
+  fOptionsTeams in 'Options\fOptionsTeams.pas' {frmOptionsTeams},
+  fOptionsTitles in 'Options\fOptionsTitles.pas' {frmOptionsTitles},
+  rOptions in 'Options\rOptions.pas',
+  fOptions in 'Options\fOptions.pas' {frmOptions},
+  uSignItems in 'uSignItems.pas',
+  mCoPayDesc in 'mCoPayDesc.pas' {fraCoPayDesc: TFrame},
+  XuDigSigSC_TLB in 'XuDigSigSC_TLB.pas',
+  fOrdersCV in 'Orders\fOrdersCV.pas' {frmChgEvent},
+  fODReleaseEvent in 'Orders\fODReleaseEvent.pas' {frmOrdersReleaseEvent},
+  fODActive in 'Orders\fODActive.pas' {frmODActive},
+  fDefaultEvent in 'fDefaultEvent.pas' {frmDefaultEvent},
+  mEvntDelay in 'mEvntDelay.pas' {fraEvntDelayList: TFrame},
+  fOrdersEvntRelease in 'Orders\fOrdersEvntRelease.pas' {frmOrdersEvntRelease},
+  rECS in 'rECS.pas',
+  fODChangeEvtDisp in 'Orders\fODChangeEvtDisp.pas' {frmChangeEventDisp},
+  fODValidateAction in 'Orders\fODValidateAction.pas' {frmInvalidActionList},
+  fODChild in 'Orders\fODChild.pas' {frmODChild},
+  uAccessibleStringGrid in 'uAccessibleStringGrid.pas' {AccessibleStringGrid: CoClass},
+  Accessibility_TLB in 'Accessibility_TLB.pas',
+  uAccessibleListBox in 'uAccessibleListBox.pas' {AccessibleListBox: CoClass},
+  uAccessibleTreeNode in 'uAccessibleTreeNode.pas' {IAccessibleTreeNode: CoClass},
+  uAccessibleTreeView in 'uAccessibleTreeView.pas' {AccessibleTreeView: CoClass},
+  fDupPts in 'fDupPts.pas' {frmDupPts},
+  VERGENCECONTEXTORLib_TLB in 'VERGENCECONTEXTORLib_TLB.pas',
+  uOrPtf in 'uOrPtf.pas',
+  fPatientFlagMulti in 'fPatientFlagMulti.pas' {frmFlags},
+  fFrame in 'fFrame.pas' {frmFrame},
+  fAlertForward in 'fAlertForward.pas' {frmAlertForward},
+  fODMedNVA in 'Orders\fODMedNVA.pas' {frmODMedNVA},
+  uAccessibleRichEdit in 'uAccessibleRichEdit.pas' {AccessibleRichEdit: CoClass},
+  fPrintList in 'fPrintList.pas' {frmPrintList},
+  fODChangeUnreleasedRenew in 'Orders\fODChangeUnreleasedRenew.pas' {frmODChangeUnreleasedRenew},
+  UBAMessages in 'BA\UBAMessages.pas',
+  UBAConst in 'BA\UBAConst.pas',
+  UBAGlobals in 'BA\UBAGlobals.pas',
+  fBALocalDiagnoses in 'BA\fBALocalDiagnoses.pas' {frmBALocalDiagnoses},
+  fReview in 'fReview.pas' {frmReview},
+  fARTFreeTextMsg in 'fARTFreeTextMsg.pas' {frmARTFreeTextMsg},
+  fAllgyBox in 'fAllgyBox.pas' {frmAllgyBox},
+  fARTAllgy in 'fARTAllgy.pas' {frmARTAllergy},
+  UBACore in 'BA\UBACore.pas',
+  fBAOptionsDiagnoses in 'BA\fBAOptionsDiagnoses.pas' {frmBAOptionsDiagnoses},
+  fOtherSchedule in 'Orders\fOtherSchedule.pas' {frmOtherSchedule},
+  fODBBank in 'Orders\fODBBank.pas' {frmODBBank},
+  fNoteST in 'fNoteST.pas' {frmNotesSearchText},
+  fNoteSTStop in 'fNoteSTStop.pas' {frmSearchStop},
+  rGraphs in 'rGraphs.pas',
+  fGraphs in 'fGraphs.pas' {frmGraphs},
+  fGraphSettings in 'fGraphSettings.pas' {frmGraphSettings},
+  fGraphProfiles in 'fGraphProfiles.pas' {frmGraphProfiles},
+  uGraphs in 'uGraphs.pas',
+  fClinicWardMeds in 'fClinicWardMeds.pas' {frmClinicWardMeds},
+  fActivateDeactivate in 'fActivateDeactivate.pas' {frmActivateDeactive},
+  uFormMonitor in 'uFormMonitor.pas';
+
+{$R *.TLB}
+
+{$R *.RES}
+
+begin
+  if not UpdateSelf then                          // only start if not copying new version
+  begin
+    RegisterCPRSTypeLibrary;                      // will halt program if /regserver or /unregserver param
+    Application.Initialize;
+    frmSplash := nil;
+    if ParamSearch('SPLASH') <> 'OFF' then
+    begin
+      frmSplash := TfrmSplash.Create(Application);  // show splash screen
+      frmSplash.Show;                               //         "
+      frmSplash.Refresh;                            //         "
+    end;
+    Application.Title := 'CPRS - Patient Chart';
+    Application.HelpFile := 'cprs.hlp';
+    Application.CreateForm(TdmodShared, dmodShared);
+  Application.CreateForm(TfrmFrame, frmFrame);
+  Application.CreateForm(TfrmSearchStop, frmSearchStop);
+  frmSplash.Free;                               // close & free splash screen
+    Application.Run;
+  end;
+end.
Index: cprs/branches/foia-cprs/CPRS-Chart/CPRSChart.cfg
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/CPRSChart.cfg	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/CPRSChart.cfg	(revision 460)
@@ -25,4 +25,5 @@
 -$YD
 -$Z1
+-GD
 -cg
 -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
@@ -32,10 +33,10 @@
 -$M32768,1048576
 -K$00400000
--E"..\CPRS-Chart"
--N"..\CPRS-Chart\DCU"
--LE"..\Packages"
--LN"..\Packages"
--U"c:\program files\borland\delphi6\Lib\Debug;..\CPRS-Lib"
--O"c:\program files\borland\delphi6\Lib\Debug;..\CPRS-Lib"
--I"c:\program files\borland\delphi6\Lib\Debug;..\CPRS-Lib"
--R"c:\program files\borland\delphi6\Lib\Debug;..\CPRS-Lib"
+-E"C:\Vista\cprs\OR_3_215V26\CPRS-Chart"
+-N"C:\Vista\cprs\OR_3_215V26\CPRS-Chart\DCU"
+-LE"C:\Vista\cprs\OR_3_215V26\Packages"
+-LN"C:\Vista\cprs\OR_3_215V26\Packages"
+-U"c:\program files\borland\delphi6\Lib\Debug;C:\Vista\cprs\OR_3_215V26\CPRS-Lib"
+-O"c:\program files\borland\delphi6\Lib\Debug;C:\Vista\cprs\OR_3_215V26\CPRS-Lib"
+-I"c:\program files\borland\delphi6\Lib\Debug;C:\Vista\cprs\OR_3_215V26\CPRS-Lib"
+-R"c:\program files\borland\delphi6\Lib\Debug;C:\Vista\cprs\OR_3_215V26\CPRS-Lib"
Index: cprs/branches/foia-cprs/CPRS-Chart/CPRSChart.dof
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/CPRSChart.dof	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/CPRSChart.dof	(revision 460)
@@ -32,5 +32,5 @@
 UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
 [Linker]
-MapFile=0
+MapFile=3
 OutputObjs=0
 ConsoleApp=1
@@ -42,9 +42,9 @@
 ExeDescription=
 [Directories]
-OutputDir=..\CPRS-Chart
-UnitOutputDir=..\CPRS-Chart\DCU
-PackageDLLOutputDir=..\Packages
-PackageDCPOutputDir=..\Packages
-SearchPath=$(DELPHI)\Lib\Debug;..\CPRS-Lib
+OutputDir=C:\Vista\cprs\OR_3_215V26\CPRS-Chart
+UnitOutputDir=C:\Vista\cprs\OR_3_215V26\CPRS-Chart\DCU
+PackageDLLOutputDir=C:\Vista\cprs\OR_3_215V26\Packages
+PackageDCPOutputDir=C:\Vista\cprs\OR_3_215V26\Packages
+SearchPath=$(DELPHI)\Lib\Debug;C:\Vista\cprs\OR_3_215V26\CPRS-Lib
 Packages=vcl;rtl;vclx;VclSmp;vclshlctrls;dbrtl;adortl;vcldb;qrpt;bdertl;vcldbx;dsnap;cds;bdecds;teeui;teedb;tee;teeqr;ibxpress;visualclx;visualdbclx;vclie;xmlrtl;inet;inetdbbde;inetdbxpress;inetdb;nmfast;dbexpress;dbxcds;indy;dclOffice2k;soaprtl;XWB_R60
 Conditionals=
@@ -66,6 +66,6 @@
 MajorVer=1
 MinorVer=0
-Release=25
-Build=42
+Release=26
+Build=68
 Debug=0
 PreRelease=0
@@ -77,30 +77,29 @@
 [Version Info Keys]
 CompanyName=Department of Veterans Affairs
-FileDescription=5/31/2005
-FileVersion=1.0.25.42
-InternalName=1.0.25.42 server required
+FileDescription=6/5/2006
+FileVersion=1.0.26.68
+InternalName=1.0.26.68 server required
 LegalCopyright=Unauthorized access or misuse of this system and/or its data is a federal crime. Use of all data shall be in accordance with VA policy on security and privacy.
 LegalTrademarks=
-OriginalFilename=Patch 195
+OriginalFilename=Patch 215
 ProductName=Computerized Patient Record System
 ProductVersion=1.0.0.0
-Comments=Version 1.0.25.42
+Comments=Version 1.0.26.68
 [HistoryLists\hlUnitAliases]
 Count=1
 Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
 [HistoryLists\hlSearchPath]
-Count=2
-Item0=$(DELPHI)\Lib\Debug;..\CPRS-Lib
-Item1=..\CPRS-Lib
+Count=1
+Item0=$(DELPHI)\Lib\Debug;C:\Vista\cprs\OR_3_215V26\CPRS-Lib
 [HistoryLists\hlUnitOutputDirectory]
 Count=1
-Item0=..\CPRS-Chart\DCU
+Item0=C:\Vista\cprs\OR_3_215V26\CPRS-Chart\DCU
 [HistoryLists\hlOutputDirectorry]
 Count=1
-Item0=..\CPRS-Chart
+Item0=C:\Vista\cprs\OR_3_215V26\CPRS-Chart
 [HistoryLists\hlBPLOutput]
 Count=1
-Item0=..\Packages
+Item0=C:\Vista\cprs\OR_3_215V26\Packages
 [HistoryLists\hlDCPOutput]
 Count=1
-Item0=..\Packages
+Item0=C:\Vista\cprs\OR_3_215V26\Packages
Index: cprs/branches/foia-cprs/CPRS-Chart/CPRSChart.dpr
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/CPRSChart.dpr	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/CPRSChart.dpr	(revision 460)
@@ -2,4 +2,6 @@
 
 uses
+  SQASrvr,
+  ShareMem,
   Forms,
   ORSystem,
@@ -169,5 +171,4 @@
   uOrders in 'Orders\uOrders.pas',
   fOCSession in 'Orders\fOCSession.pas' {frmOCSession},
-  fODAllgy in 'Orders\fODAllgy.pas',
   fODAuto in 'Orders\fODAuto.pas',
   fODBase in 'Orders\fODBase.pas' {frmODBase},
@@ -288,5 +289,16 @@
   UBACore in 'BA\UBACore.pas',
   fBAOptionsDiagnoses in 'BA\fBAOptionsDiagnoses.pas' {frmBAOptionsDiagnoses},
-  fOtherSchedule in 'Orders\fOtherSchedule.pas' {frmOtherSchedule};
+  fOtherSchedule in 'Orders\fOtherSchedule.pas' {frmOtherSchedule},
+  fODBBank in 'Orders\fODBBank.pas' {frmODBBank},
+  fNoteST in 'fNoteST.pas' {frmNotesSearchText},
+  fNoteSTStop in 'fNoteSTStop.pas' {frmSearchStop},
+  rGraphs in 'rGraphs.pas',
+  fGraphs in 'fGraphs.pas' {frmGraphs},
+  fGraphSettings in 'fGraphSettings.pas' {frmGraphSettings},
+  fGraphProfiles in 'fGraphProfiles.pas' {frmGraphProfiles},
+  uGraphs in 'uGraphs.pas',
+  fClinicWardMeds in 'fClinicWardMeds.pas' {frmClinicWardMeds},
+  fActivateDeactivate in 'fActivateDeactivate.pas' {frmActivateDeactive},
+  uFormMonitor in 'uFormMonitor.pas';
 
 {$R *.TLB}
@@ -310,4 +322,5 @@
     Application.CreateForm(TdmodShared, dmodShared);
   Application.CreateForm(TfrmFrame, frmFrame);
+  Application.CreateForm(TfrmSearchStop, frmSearchStop);
   frmSplash.Free;                               // close & free splash screen
     Application.Run;
Index: cprs/branches/foia-cprs/CPRS-Chart/CPRSChart.drc
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/CPRSChart.drc	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/CPRSChart.drc	(revision 460)
@@ -9,385 +9,491 @@
 */
 
-#define VDBConsts_SRefreshRecord 65152
-#define VDBConsts_SRemoteLogin 65153
-#define OleConst_SInvalidLicense 65168
-#define OleConst_SNotLicensed 65169
-#define OleConst_sNoRunningObject 65170
-#define DBConsts_SBcdOverflow 65171
-#define DBConsts_SInvalidBcdValue 65172
-#define DBConsts_SCouldNotParseTimeStamp 65173
-#define DBConsts_SInvalidSqlTimeStamp 65174
-#define VDBConsts_SFirstRecord 65175
-#define VDBConsts_SPriorRecord 65176
-#define VDBConsts_SNextRecord 65177
-#define VDBConsts_SLastRecord 65178
-#define VDBConsts_SInsertRecord 65179
-#define VDBConsts_SDeleteRecord 65180
-#define VDBConsts_SEditRecord 65181
-#define VDBConsts_SPostEdit 65182
-#define VDBConsts_SCancelEdit 65183
-#define TeeConst_TeeMsg_FunctionMultiply 65184
-#define TeeConst_TeeMsg_FunctionDivide 65185
-#define TeeConst_TeeMsg_FunctionHigh 65186
-#define TeeConst_TeeMsg_FunctionLow 65187
-#define TeeConst_TeeMsg_FunctionAverage 65188
-#define TeeConst_TeeMsg_DefaultFontName 65189
-#define TeeConst_TeeMsg_CheckPointerSize 65190
-#define TeeConst_TeeMsg_FunctionPeriod 65191
-#define TeeConst_TeeMsg_PieOther 65192
-#define TeeConst_TeeMsg_ValuesX 65193
-#define TeeConst_TeeMsg_ValuesY 65194
-#define TeeConst_TeeMsg_ValuesPie 65195
-#define TeeConst_TeeMsg_ValuesBar 65196
-#define TeeConst_TeeMsg_ValuesAngle 65197
-#define OleConst_SCannotActivate 65198
-#define OleConst_SNoWindowHandle 65199
-#define TeeConst_TeeMsg_GalleryPie 65200
-#define TeeConst_TeeMsg_GalleryFastLine 65201
-#define TeeConst_TeeMsg_Rotation 65202
-#define TeeConst_TeeMsg_PieSample1 65203
-#define TeeConst_TeeMsg_PieSample2 65204
-#define TeeConst_TeeMsg_PieSample3 65205
-#define TeeConst_TeeMsg_PieSample4 65206
-#define TeeConst_TeeMsg_PieSample5 65207
-#define TeeConst_TeeMsg_PieSample6 65208
-#define TeeConst_TeeMsg_PieSample7 65209
-#define TeeConst_TeeMsg_PieSample8 65210
-#define TeeConst_TeeMsg_GalleryStandard 65211
-#define TeeConst_TeeMsg_GalleryFunctions 65212
-#define TeeConst_TeeMsg_DefaultFontSize 65213
-#define TeeConst_TeeMsg_FunctionAdd 65214
-#define TeeConst_TeeMsg_FunctionSubtract 65215
-#define TeeConst_TeeMsg_AxisLogBase 65216
-#define TeeConst_TeeMsg_MaxPointsPerPage 65217
-#define TeeConst_TeeMsg_3dPercent 65218
-#define TeeConst_TeeMsg_CircularSeries 65219
-#define TeeConst_TeeMsg_BarWidthPercent 65220
-#define TeeConst_TeeMsg_BarOffsetPercent 65221
-#define TeeConst_TeeMsg_DefaultPercentOf 65222
-#define TeeConst_TeeMsg_DefPercentFormat 65223
-#define TeeConst_TeeMsg_DefValueFormat 65224
-#define TeeConst_TeeMsg_AxisTitle 65225
-#define TeeConst_TeeMsg_AxisLabels 65226
-#define TeeConst_TeeMsg_GalleryLine 65227
-#define TeeConst_TeeMsg_GalleryPoint 65228
-#define TeeConst_TeeMsg_GalleryArea 65229
-#define TeeConst_TeeMsg_GalleryBar 65230
-#define TeeConst_TeeMsg_GalleryHorizBar 65231
-#define ComConst_SAutomationWarning 65232
-#define ComConst_SNoCloseActiveServer1 65233
-#define ComConst_SNoCloseActiveServer2 65234
-#define TeeConst_TeeMsg_LegendTopPos 65235
-#define TeeConst_TeeMsg_LegendFirstValue 65236
-#define TeeConst_TeeMsg_LegendColorWidth 65237
-#define TeeConst_TeeMsg_SeriesSetDataSource 65238
-#define TeeConst_TeeMsg_SeriesInvDataSource 65239
-#define TeeConst_TeeMsg_FillSample 65240
-#define TeeConst_TeeMsg_Angle 65241
-#define TeeConst_TeeMsg_AxisLogDateTime 65242
-#define TeeConst_TeeMsg_AxisLogNotPositive 65243
-#define TeeConst_TeeMsg_AxisLabelSep 65244
-#define TeeConst_TeeMsg_AxisIncrementNeg 65245
-#define TeeConst_TeeMsg_AxisMinMax 65246
-#define TeeConst_TeeMsg_AxisMaxMin 65247
-#define ComStrs_sDateTimeMin 65248
-#define ComStrs_sFailSetCalDateTime 65249
-#define ComStrs_sFailSetCalMaxSelRange 65250
-#define ComStrs_sFailSetCalMinMaxRange 65251
-#define ComStrs_sFailsetCalSelRange 65252
-#define ComConst_SCreateRegKeyError 65253
-#define ComConst_SOleError 65254
-#define ComConst_SObjectFactoryMissing 65255
-#define ComConst_STypeInfoMissing 65256
-#define ComConst_SBadTypeInfo 65257
-#define ComConst_SDispIntfMissing 65258
-#define ComConst_SNoMethod 65259
-#define ComConst_SVarNotObject 65260
-#define ComConst_STooManyParams 65261
-#define ComConst_SDCOMNotInstalled 65262
-#define ComConst_SDAXError 65263
-#define ComStrs_sTabFailDelete 65264
-#define ComStrs_sTabFailRetrieve 65265
-#define ComStrs_sTabFailGetObject 65266
-#define ComStrs_sTabFailSet 65267
-#define ComStrs_sTabFailSetObject 65268
-#define ComStrs_sTabMustBeMultiLine 65269
-#define ComStrs_sInvalidIndex 65270
-#define ComStrs_sInsertError 65271
-#define ComStrs_sInvalidOwner 65272
-#define ComStrs_sRichEditInsertError 65273
-#define ComStrs_sRichEditLoadFail 65274
-#define ComStrs_sRichEditSaveFail 65275
-#define ComStrs_sUDAssociated 65276
-#define ComStrs_sPageIndexError 65277
-#define ComStrs_sInvalidComCtl32 65278
-#define ComStrs_sDateTimeMax 65279
-#define Consts_SNoDefaultPrinter 65280
-#define Consts_SDuplicateMenus 65281
-#define Consts_SCannotOpenAVI 65282
-#define Consts_SDockedCtlNeedsName 65283
-#define Consts_SDockTreeRemoveError 65284
-#define Consts_SDockZoneNotFound 65285
-#define Consts_SDockZoneHasNoCtl 65286
-#define Consts_SMultiSelectRequired 65287
-#define Consts_SSeparator 65288
-#define Consts_SErrorSettingCount 65289
-#define Consts_SListBoxMustBeVirtual 65290
-#define HelpIntfs_hNoTableOfContents 65291
-#define HelpIntfs_hNothingFound 65292
-#define HelpIntfs_hNoContext 65293
-#define HelpIntfs_hNoTopics 65294
-#define ComStrs_sTabFailClear 65295
-#define Consts_SmkcLeft 65296
-#define Consts_SmkcUp 65297
-#define Consts_SmkcRight 65298
-#define Consts_SmkcDown 65299
-#define Consts_SmkcIns 65300
-#define Consts_SmkcDel 65301
-#define Consts_SmkcShift 65302
-#define Consts_SmkcCtrl 65303
-#define Consts_SmkcAlt 65304
-#define Consts_SOutOfRange 65305
-#define Consts_SInsertLineError 65306
-#define Consts_SInvalidClipFmt 65307
-#define Consts_SIconToClipboard 65308
-#define Consts_SCannotOpenClipboard 65309
-#define Consts_SInvalidMemoSize 65310
-#define Consts_SInvalidPrinterOp 65311
-#define Consts_SMsgDlgHelp 65312
-#define Consts_SMsgDlgAbort 65313
-#define Consts_SMsgDlgRetry 65314
-#define Consts_SMsgDlgIgnore 65315
-#define Consts_SMsgDlgAll 65316
-#define Consts_SMsgDlgNoToAll 65317
-#define Consts_SMsgDlgYesToAll 65318
-#define Consts_SmkcBkSp 65319
-#define Consts_SmkcTab 65320
-#define Consts_SmkcEsc 65321
-#define Consts_SmkcEnter 65322
-#define Consts_SmkcSpace 65323
-#define Consts_SmkcPgUp 65324
-#define Consts_SmkcPgDn 65325
-#define Consts_SmkcEnd 65326
-#define Consts_SmkcHome 65327
-#define Consts_SAllButton 65328
-#define Consts_SCannotDragForm 65329
-#define Consts_SVMetafiles 65330
-#define Consts_SVEnhMetafiles 65331
-#define Consts_SVIcons 65332
-#define Consts_SVBitmaps 65333
-#define Consts_SMaskErr 65334
-#define Consts_SMaskEditErr 65335
-#define Consts_SMsgDlgWarning 65336
-#define Consts_SMsgDlgError 65337
-#define Consts_SMsgDlgInformation 65338
-#define Consts_SMsgDlgConfirm 65339
-#define Consts_SMsgDlgYes 65340
-#define Consts_SMsgDlgNo 65341
-#define Consts_SMsgDlgOK 65342
-#define Consts_SMsgDlgCancel 65343
-#define Consts_SNotPrinting 65344
-#define Consts_SPrinting 65345
-#define Consts_SInvalidPrinter 65346
-#define Consts_SDeviceOnPort 65347
-#define Consts_SGroupIndexTooLow 65348
-#define Consts_SNoMDIForm 65349
-#define Consts_SControlParentSetToSelf 65350
-#define Consts_SOKButton 65351
-#define Consts_SCancelButton 65352
-#define Consts_SYesButton 65353
-#define Consts_SNoButton 65354
-#define Consts_SHelpButton 65355
-#define Consts_SCloseButton 65356
-#define Consts_SIgnoreButton 65357
-#define Consts_SRetryButton 65358
-#define Consts_SAbortButton 65359
-#define Consts_SImageReadFail 65360
-#define Consts_SImageWriteFail 65361
-#define Consts_SWindowDCError 65362
-#define Consts_SWindowClass 65363
-#define Consts_SCannotFocus 65364
-#define Consts_SParentRequired 65365
-#define Consts_SParentGivenNotAParent 65366
-#define Consts_SMDIChildNotVisible 65367
-#define Consts_SVisibleChanged 65368
-#define Consts_SCannotShowModal 65369
-#define Consts_SScrollBarRange 65370
-#define Consts_SPropertyOutOfRange 65371
-#define Consts_SMenuIndexError 65372
-#define Consts_SMenuReinserted 65373
-#define Consts_SMenuNotFound 65374
-#define Consts_SNoTimers 65375
-#define RTLConsts_SThreadCreateError 65376
-#define RTLConsts_SThreadError 65377
-#define Consts_SInvalidTabPosition 65378
-#define Consts_SInvalidTabStyle 65379
-#define Consts_SInvalidBitmap 65380
-#define Consts_SInvalidIcon 65381
-#define Consts_SInvalidMetafile 65382
-#define Consts_SChangeIconSize 65383
-#define Consts_SOleGraphic 65384
-#define Consts_SUnknownClipboardFormat 65385
-#define Consts_SOutOfResources 65386
-#define Consts_SNoCanvasHandle 65387
-#define Consts_SInvalidImageSize 65388
-#define Consts_SInvalidImageList 65389
-#define Consts_SReplaceImage 65390
-#define Consts_SImageIndexError 65391
-#define RTLConsts_SListCapacityError 65392
-#define RTLConsts_SListCountError 65393
-#define RTLConsts_SListIndexError 65394
-#define RTLConsts_SMemoryStreamError 65395
-#define RTLConsts_SPropertyException 65396
-#define RTLConsts_SReadError 65397
-#define RTLConsts_SReadOnlyProperty 65398
-#define RTLConsts_SRegGetDataFailed 65399
-#define RTLConsts_SRegSetDataFailed 65400
-#define RTLConsts_SResNotFound 65401
-#define RTLConsts_SSeekNotImplemented 65402
-#define RTLConsts_SSortedListError 65403
-#define RTLConsts_STooManyDeleted 65404
-#define RTLConsts_SUnknownGroup 65405
-#define RTLConsts_SUnknownProperty 65406
-#define RTLConsts_SWriteError 65407
-#define RTLConsts_SDuplicateString 65408
-#define RTLConsts_SFCreateError 65409
-#define RTLConsts_SFixedColTooBig 65410
-#define RTLConsts_SFixedRowTooBig 65411
-#define RTLConsts_SFOpenError 65412
-#define RTLConsts_SGridTooLarge 65413
-#define RTLConsts_SIndexOutOfRange 65414
-#define RTLConsts_SInvalidImage 65415
-#define RTLConsts_SInvalidName 65416
-#define RTLConsts_SInvalidProperty 65417
-#define RTLConsts_SInvalidPropertyElement 65418
-#define RTLConsts_SInvalidPropertyPath 65419
-#define RTLConsts_SInvalidPropertyType 65420
-#define RTLConsts_SInvalidPropertyValue 65421
-#define RTLConsts_SInvalidRegType 65422
-#define RTLConsts_SInvalidStringGridOp 65423
-#define SysConst_SLongDayNameSun 65424
-#define SysConst_SLongDayNameMon 65425
-#define SysConst_SLongDayNameTue 65426
-#define SysConst_SLongDayNameWed 65427
-#define SysConst_SLongDayNameThu 65428
-#define SysConst_SLongDayNameFri 65429
-#define SysConst_SLongDayNameSat 65430
-#define RTLConsts_SAncestorNotFound 65431
-#define RTLConsts_SAssignError 65432
-#define RTLConsts_SBitsIndexError 65433
-#define RTLConsts_SCantWriteResourceStreamError 65434
-#define RTLConsts_SCheckSynchronizeError 65435
-#define RTLConsts_SClassNotFound 65436
-#define RTLConsts_SDuplicateClass 65437
-#define RTLConsts_SDuplicateItem 65438
-#define RTLConsts_SDuplicateName 65439
-#define SysConst_SLongMonthNameApr 65440
-#define SysConst_SLongMonthNameMay 65441
-#define SysConst_SLongMonthNameJun 65442
-#define SysConst_SLongMonthNameJul 65443
-#define SysConst_SLongMonthNameAug 65444
-#define SysConst_SLongMonthNameSep 65445
-#define SysConst_SLongMonthNameOct 65446
-#define SysConst_SLongMonthNameNov 65447
-#define SysConst_SLongMonthNameDec 65448
-#define SysConst_SShortDayNameSun 65449
-#define SysConst_SShortDayNameMon 65450
-#define SysConst_SShortDayNameTue 65451
-#define SysConst_SShortDayNameWed 65452
-#define SysConst_SShortDayNameThu 65453
-#define SysConst_SShortDayNameFri 65454
-#define SysConst_SShortDayNameSat 65455
-#define SysConst_SUnkOSError 65456
-#define SysConst_SShortMonthNameJan 65457
-#define SysConst_SShortMonthNameFeb 65458
-#define SysConst_SShortMonthNameMar 65459
-#define SysConst_SShortMonthNameApr 65460
-#define SysConst_SShortMonthNameMay 65461
-#define SysConst_SShortMonthNameJun 65462
-#define SysConst_SShortMonthNameJul 65463
-#define SysConst_SShortMonthNameAug 65464
-#define SysConst_SShortMonthNameSep 65465
-#define SysConst_SShortMonthNameOct 65466
-#define SysConst_SShortMonthNameNov 65467
-#define SysConst_SShortMonthNameDec 65468
-#define SysConst_SLongMonthNameJan 65469
-#define SysConst_SLongMonthNameFeb 65470
-#define SysConst_SLongMonthNameMar 65471
-#define SysConst_SInvalidVarNullOp 65472
-#define SysConst_SVarTypeCouldNotConvert 65473
-#define SysConst_SVarTypeConvertOverflow 65474
-#define SysConst_SVarOverflow 65475
-#define SysConst_SVarInvalid 65476
-#define SysConst_SVarBadType 65477
-#define SysConst_SVarNotImplemented 65478
-#define SysConst_SVarUnexpected 65479
-#define SysConst_SExternalException 65480
-#define SysConst_SAssertionFailed 65481
-#define SysConst_SIntfCastError 65482
-#define SysConst_SSafecallException 65483
-#define SysConst_SAssertError 65484
-#define SysConst_SAbstractError 65485
-#define SysConst_SModuleAccessViolation 65486
-#define SysConst_SOSError 65487
-#define SysConst_SArgumentMissing 65488
-#define SysConst_SDispatchError 65489
-#define SysConst_SReadAccess 65490
-#define SysConst_SWriteAccess 65491
-#define SysConst_SFormatTooLong 65492
-#define SysConst_SVarArrayCreate 65493
-#define SysConst_SVarArrayBounds 65494
-#define SysConst_SVarArrayLocked 65495
-#define SysConst_SInvalidVarCast 65496
-#define SysConst_SInvalidVarOp 65497
-#define SysConst_SInvalidVarOpWithHResult 65498
-#define SysConst_SVarNotArray 65499
-#define SysConst_SVarTypeOutOfRange 65500
-#define SysConst_SVarTypeAlreadyUsed 65501
-#define SysConst_SVarTypeNotUsable 65502
-#define SysConst_SVarTypeTooManyCustom 65503
-#define SysConst_SRangeError 65504
-#define SysConst_SIntOverflow 65505
-#define SysConst_SInvalidOp 65506
-#define SysConst_SZeroDivide 65507
-#define SysConst_SOverflow 65508
-#define SysConst_SUnderflow 65509
-#define SysConst_SInvalidPointer 65510
-#define SysConst_SInvalidCast 65511
-#define SysConst_SAccessViolation 65512
-#define SysConst_SStackOverflow 65513
-#define SysConst_SControlC 65514
-#define SysConst_SPrivilege 65515
-#define SysConst_SOperationAborted 65516
-#define SysConst_SException 65517
-#define SysConst_SExceptTitle 65518
-#define SysConst_SInvalidFormat 65519
+#define TeeConst_TeeMsg_ValuesGanttStart 65056
+#define TeeConst_TeeMsg_ValuesGanttEnd 65057
+#define TeeConst_TeeMsg_ValuesGanttNextTask 65058
+#define TeeConst_TeeMsg_ValuesArrowEndX 65059
+#define TeeConst_TeeMsg_ValuesArrowEndY 65060
+#define VDBConsts_SFirstRecord 65061
+#define VDBConsts_SPriorRecord 65062
+#define VDBConsts_SNextRecord 65063
+#define VDBConsts_SLastRecord 65064
+#define VDBConsts_SInsertRecord 65065
+#define VDBConsts_SDeleteRecord 65066
+#define VDBConsts_SEditRecord 65067
+#define VDBConsts_SPostEdit 65068
+#define VDBConsts_SCancelEdit 65069
+#define VDBConsts_SRefreshRecord 65070
+#define VDBConsts_SRemoteLogin 65071
+#define TeeConst_TeeMsg_FunctionAdd 65072
+#define TeeConst_TeeMsg_FunctionSubtract 65073
+#define TeeConst_TeeMsg_FunctionMultiply 65074
+#define TeeConst_TeeMsg_FunctionDivide 65075
+#define TeeConst_TeeMsg_FunctionHigh 65076
+#define TeeConst_TeeMsg_FunctionLow 65077
+#define TeeConst_TeeMsg_FunctionAverage 65078
+#define TeeConst_TeeMsg_DefaultFontName 65079
+#define TeeConst_TeeMsg_CheckPointerSize 65080
+#define TeeConst_TeeMsg_FunctionPeriod 65081
+#define TeeConst_TeeMsg_PieOther 65082
+#define TeeConst_TeeMsg_ValuesX 65083
+#define TeeConst_TeeMsg_ValuesY 65084
+#define TeeConst_TeeMsg_ValuesPie 65085
+#define TeeConst_TeeMsg_ValuesBar 65086
+#define TeeConst_TeeMsg_ValuesAngle 65087
+#define TeeConst_TeeMsg_PieSample8 65088
+#define TeeConst_TeeMsg_GalleryStandard 65089
+#define TeeConst_TeeMsg_GalleryFunctions 65090
+#define TeeConst_TeeMsg_GalleryArrow 65091
+#define TeeConst_TeeMsg_GalleryGantt 65092
+#define TeeConst_TeeMsg_GanttSample1 65093
+#define TeeConst_TeeMsg_GanttSample2 65094
+#define TeeConst_TeeMsg_GanttSample3 65095
+#define TeeConst_TeeMsg_GanttSample4 65096
+#define TeeConst_TeeMsg_GanttSample5 65097
+#define TeeConst_TeeMsg_GanttSample6 65098
+#define TeeConst_TeeMsg_GanttSample7 65099
+#define TeeConst_TeeMsg_GanttSample8 65100
+#define TeeConst_TeeMsg_GanttSample9 65101
+#define TeeConst_TeeMsg_GanttSample10 65102
+#define TeeConst_TeeMsg_DefaultFontSize 65103
+#define TeeConst_TeeMsg_AxisLabels 65104
+#define TeeConst_TeeMsg_GalleryLine 65105
+#define TeeConst_TeeMsg_GalleryPoint 65106
+#define TeeConst_TeeMsg_GalleryArea 65107
+#define TeeConst_TeeMsg_GalleryBar 65108
+#define TeeConst_TeeMsg_GalleryHorizBar 65109
+#define TeeConst_TeeMsg_GalleryPie 65110
+#define TeeConst_TeeMsg_GalleryFastLine 65111
+#define TeeConst_TeeMsg_Rotation 65112
+#define TeeConst_TeeMsg_PieSample1 65113
+#define TeeConst_TeeMsg_PieSample2 65114
+#define TeeConst_TeeMsg_PieSample3 65115
+#define TeeConst_TeeMsg_PieSample4 65116
+#define TeeConst_TeeMsg_PieSample5 65117
+#define TeeConst_TeeMsg_PieSample6 65118
+#define TeeConst_TeeMsg_PieSample7 65119
+#define TeeConst_TeeMsg_AxisLogDateTime 65120
+#define TeeConst_TeeMsg_AxisLogNotPositive 65121
+#define TeeConst_TeeMsg_AxisLabelSep 65122
+#define TeeConst_TeeMsg_AxisIncrementNeg 65123
+#define TeeConst_TeeMsg_AxisMinMax 65124
+#define TeeConst_TeeMsg_AxisMaxMin 65125
+#define TeeConst_TeeMsg_AxisLogBase 65126
+#define TeeConst_TeeMsg_MaxPointsPerPage 65127
+#define TeeConst_TeeMsg_3dPercent 65128
+#define TeeConst_TeeMsg_CircularSeries 65129
+#define TeeConst_TeeMsg_BarWidthPercent 65130
+#define TeeConst_TeeMsg_BarOffsetPercent 65131
+#define TeeConst_TeeMsg_DefaultPercentOf 65132
+#define TeeConst_TeeMsg_DefPercentFormat 65133
+#define TeeConst_TeeMsg_DefValueFormat 65134
+#define TeeConst_TeeMsg_AxisTitle 65135
+#define bdeconst_SInitError 65136
+#define bdeconst_SIDAPILangID 65137
+#define bdeconst_SBDEError 65138
+#define bdeconst_SNoDataSetField 65139
+#define bdeconst_SNoCachedUpdates 65140
+#define bdeconst_SNoFieldAccess 65141
+#define bdeconst_SUntitled 65142
+#define bdeconst_SUpdateFailed 65143
+#define bdeconst_SLocalTransDirty 65144
+#define TeeConst_TeeMsg_LegendTopPos 65145
+#define TeeConst_TeeMsg_LegendFirstValue 65146
+#define TeeConst_TeeMsg_LegendColorWidth 65147
+#define TeeConst_TeeMsg_SeriesSetDataSource 65148
+#define TeeConst_TeeMsg_SeriesInvDataSource 65149
+#define TeeConst_TeeMsg_FillSample 65150
+#define TeeConst_TeeMsg_Angle 65151
+#define bdeconst_SAutoSessionExists 65152
+#define bdeconst_SAutoSessionActive 65153
+#define bdeconst_SDuplicateDatabaseName 65154
+#define bdeconst_SDuplicateSessionName 65155
+#define bdeconst_SInvalidSessionName 65156
+#define bdeconst_SDatabaseNameMissing 65157
+#define bdeconst_SSessionNameMissing 65158
+#define bdeconst_SDatabaseOpen 65159
+#define bdeconst_SDatabaseClosed 65160
+#define bdeconst_SDatabaseHandleSet 65161
+#define bdeconst_SSessionActive 65162
+#define bdeconst_SHandleError 65163
+#define bdeconst_SNoReferenceTableName 65164
+#define bdeconst_SEmptySQLStatement 65165
+#define bdeconst_SNoParameterValue 65166
+#define bdeconst_SLoginError 65167
+#define DBConsts_STextTrue 65168
+#define DBConsts_SParameterNotFound 65169
+#define DBConsts_SInvalidVersion 65170
+#define DBConsts_SBadFieldType 65171
+#define DBConsts_SProviderSQLNotSupported 65172
+#define DBConsts_SProviderExecuteNotSupported 65173
+#define DBConsts_SExprNoAggOnCalcs 65174
+#define DBConsts_SDataSetUnidirectional 65175
+#define DBConsts_SUnassignedVar 65176
+#define DBConsts_SRecordNotFound 65177
+#define DBConsts_SBcdOverflow 65178
+#define DBConsts_SInvalidBcdValue 65179
+#define DBConsts_SInvalidFormatType 65180
+#define DBConsts_SCouldNotParseTimeStamp 65181
+#define DBConsts_SInvalidSqlTimeStamp 65182
+#define bdeconst_SAutoSessionExclusive 65183
+#define DBConsts_SExprNoRParenOrComma 65184
+#define DBConsts_SExprExpected 65185
+#define DBConsts_SExprBadField 65186
+#define DBConsts_SExprBadNullTest 65187
+#define DBConsts_SExprRangeError 65188
+#define DBConsts_SExprIncorrect 65189
+#define DBConsts_SExprNothing 65190
+#define DBConsts_SExprTypeMis 65191
+#define DBConsts_SExprBadScope 65192
+#define DBConsts_SExprNoArith 65193
+#define DBConsts_SExprNotAgg 65194
+#define DBConsts_SExprBadConst 65195
+#define DBConsts_SExprNoAggFilter 65196
+#define DBConsts_SExprEmptyInList 65197
+#define DBConsts_SInvalidKeywordUse 65198
+#define DBConsts_STextFalse 65199
+#define DBConsts_SInvalidCalcType 65200
+#define DBConsts_SFieldReadOnly 65201
+#define DBConsts_SNotIndexField 65202
+#define DBConsts_SCircularDataLink 65203
+#define DBConsts_SLookupInfoError 65204
+#define DBConsts_SDataSourceChange 65205
+#define DBConsts_SDataSetOpen 65206
+#define DBConsts_SNotEditing 65207
+#define DBConsts_SDataSetClosed 65208
+#define DBConsts_SNestedDataSetClass 65209
+#define DBConsts_SExprTermination 65210
+#define DBConsts_SExprNameError 65211
+#define DBConsts_SExprStringError 65212
+#define DBConsts_SExprInvalidChar 65213
+#define DBConsts_SExprNoLParen 65214
+#define DBConsts_SExprNoRParen 65215
+#define DBConsts_SFieldNameMissing 65216
+#define DBConsts_SDuplicateFieldName 65217
+#define DBConsts_SFieldNotFound 65218
+#define DBConsts_SFieldAccessError 65219
+#define DBConsts_SFieldValueError 65220
+#define DBConsts_SFieldRangeError 65221
+#define DBConsts_SBcdFieldRangeError 65222
+#define DBConsts_SInvalidIntegerValue 65223
+#define DBConsts_SInvalidBoolValue 65224
+#define DBConsts_SInvalidFloatValue 65225
+#define DBConsts_SFieldTypeMismatch 65226
+#define DBConsts_SFieldSizeMismatch 65227
+#define DBConsts_SInvalidVarByteArray 65228
+#define DBConsts_SFieldOutOfRange 65229
+#define DBConsts_SFieldRequired 65230
+#define DBConsts_SDataSetMissing 65231
+#define ComConst_STooManyParams 65232
+#define ComConst_SDCOMNotInstalled 65233
+#define ComConst_SDAXError 65234
+#define ComConst_SAutomationWarning 65235
+#define ComConst_SNoCloseActiveServer1 65236
+#define ComConst_SNoCloseActiveServer2 65237
+#define OleConst_SCannotActivate 65238
+#define OleConst_SNoWindowHandle 65239
+#define OleConst_SOleError 65240
+#define OleConst_SVarNotObject 65241
+#define OleConst_SInvalidLicense 65242
+#define OleConst_SNotLicensed 65243
+#define OleConst_sNoRunningObject 65244
+#define DBConsts_SInvalidFieldSize 65245
+#define DBConsts_SInvalidFieldKind 65246
+#define DBConsts_SUnknownFieldType 65247
+#define ComStrs_sPageIndexError 65248
+#define ComStrs_sInvalidComCtl32 65249
+#define ComStrs_sDateTimeMax 65250
+#define ComStrs_sDateTimeMin 65251
+#define ComStrs_sFailSetCalDateTime 65252
+#define ComStrs_sFailSetCalMaxSelRange 65253
+#define ComStrs_sFailSetCalMinMaxRange 65254
+#define ComStrs_sFailsetCalSelRange 65255
+#define ComConst_SCreateRegKeyError 65256
+#define ComConst_SOleError 65257
+#define ComConst_SObjectFactoryMissing 65258
+#define ComConst_STypeInfoMissing 65259
+#define ComConst_SBadTypeInfo 65260
+#define ComConst_SDispIntfMissing 65261
+#define ComConst_SNoMethod 65262
+#define ComConst_SVarNotObject 65263
+#define HelpIntfs_hNoContext 65264
+#define HelpIntfs_hNoTopics 65265
+#define ComStrs_sTabFailClear 65266
+#define ComStrs_sTabFailDelete 65267
+#define ComStrs_sTabFailRetrieve 65268
+#define ComStrs_sTabFailGetObject 65269
+#define ComStrs_sTabFailSet 65270
+#define ComStrs_sTabFailSetObject 65271
+#define ComStrs_sTabMustBeMultiLine 65272
+#define ComStrs_sInvalidIndex 65273
+#define ComStrs_sInsertError 65274
+#define ComStrs_sInvalidOwner 65275
+#define ComStrs_sRichEditInsertError 65276
+#define ComStrs_sRichEditLoadFail 65277
+#define ComStrs_sRichEditSaveFail 65278
+#define ComStrs_sUDAssociated 65279
+#define Consts_SCannotOpenClipboard 65280
+#define Consts_SInvalidMemoSize 65281
+#define Consts_SInvalidPrinterOp 65282
+#define Consts_SNoDefaultPrinter 65283
+#define Consts_SDuplicateMenus 65284
+#define Consts_SCannotOpenAVI 65285
+#define Consts_SDockedCtlNeedsName 65286
+#define Consts_SDockTreeRemoveError 65287
+#define Consts_SDockZoneNotFound 65288
+#define Consts_SDockZoneHasNoCtl 65289
+#define Consts_SMultiSelectRequired 65290
+#define Consts_SSeparator 65291
+#define Consts_SErrorSettingCount 65292
+#define Consts_SListBoxMustBeVirtual 65293
+#define HelpIntfs_hNoTableOfContents 65294
+#define HelpIntfs_hNothingFound 65295
+#define Consts_SmkcPgDn 65296
+#define Consts_SmkcEnd 65297
+#define Consts_SmkcHome 65298
+#define Consts_SmkcLeft 65299
+#define Consts_SmkcUp 65300
+#define Consts_SmkcRight 65301
+#define Consts_SmkcDown 65302
+#define Consts_SmkcIns 65303
+#define Consts_SmkcDel 65304
+#define Consts_SmkcShift 65305
+#define Consts_SmkcCtrl 65306
+#define Consts_SmkcAlt 65307
+#define Consts_SOutOfRange 65308
+#define Consts_SInsertLineError 65309
+#define Consts_SInvalidClipFmt 65310
+#define Consts_SIconToClipboard 65311
+#define Consts_SMsgDlgNo 65312
+#define Consts_SMsgDlgOK 65313
+#define Consts_SMsgDlgCancel 65314
+#define Consts_SMsgDlgHelp 65315
+#define Consts_SMsgDlgAbort 65316
+#define Consts_SMsgDlgRetry 65317
+#define Consts_SMsgDlgIgnore 65318
+#define Consts_SMsgDlgAll 65319
+#define Consts_SMsgDlgNoToAll 65320
+#define Consts_SMsgDlgYesToAll 65321
+#define Consts_SmkcBkSp 65322
+#define Consts_SmkcTab 65323
+#define Consts_SmkcEsc 65324
+#define Consts_SmkcEnter 65325
+#define Consts_SmkcSpace 65326
+#define Consts_SmkcPgUp 65327
+#define Consts_SIgnoreButton 65328
+#define Consts_SRetryButton 65329
+#define Consts_SAbortButton 65330
+#define Consts_SAllButton 65331
+#define Consts_SCannotDragForm 65332
+#define Consts_SVMetafiles 65333
+#define Consts_SVEnhMetafiles 65334
+#define Consts_SVIcons 65335
+#define Consts_SVBitmaps 65336
+#define Consts_SMaskErr 65337
+#define Consts_SMaskEditErr 65338
+#define Consts_SMsgDlgWarning 65339
+#define Consts_SMsgDlgError 65340
+#define Consts_SMsgDlgInformation 65341
+#define Consts_SMsgDlgConfirm 65342
+#define Consts_SMsgDlgYes 65343
+#define Consts_SMenuReinserted 65344
+#define Consts_SMenuNotFound 65345
+#define Consts_SNoTimers 65346
+#define Consts_SNotPrinting 65347
+#define Consts_SPrinting 65348
+#define Consts_SInvalidPrinter 65349
+#define Consts_SDeviceOnPort 65350
+#define Consts_SGroupIndexTooLow 65351
+#define Consts_SNoMDIForm 65352
+#define Consts_SControlParentSetToSelf 65353
+#define Consts_SOKButton 65354
+#define Consts_SCancelButton 65355
+#define Consts_SYesButton 65356
+#define Consts_SNoButton 65357
+#define Consts_SHelpButton 65358
+#define Consts_SCloseButton 65359
+#define Consts_SInvalidImageList 65360
+#define Consts_SReplaceImage 65361
+#define Consts_SImageIndexError 65362
+#define Consts_SImageReadFail 65363
+#define Consts_SImageWriteFail 65364
+#define Consts_SWindowDCError 65365
+#define Consts_SWindowClass 65366
+#define Consts_SCannotFocus 65367
+#define Consts_SParentRequired 65368
+#define Consts_SParentGivenNotAParent 65369
+#define Consts_SMDIChildNotVisible 65370
+#define Consts_SVisibleChanged 65371
+#define Consts_SCannotShowModal 65372
+#define Consts_SScrollBarRange 65373
+#define Consts_SPropertyOutOfRange 65374
+#define Consts_SMenuIndexError 65375
+#define RTLConsts_SUnknownGroup 65376
+#define RTLConsts_SUnknownProperty 65377
+#define RTLConsts_SWriteError 65378
+#define RTLConsts_SThreadCreateError 65379
+#define RTLConsts_SThreadError 65380
+#define Consts_SInvalidTabPosition 65381
+#define Consts_SInvalidTabStyle 65382
+#define Consts_SInvalidBitmap 65383
+#define Consts_SInvalidIcon 65384
+#define Consts_SInvalidMetafile 65385
+#define Consts_SChangeIconSize 65386
+#define Consts_SOleGraphic 65387
+#define Consts_SUnknownClipboardFormat 65388
+#define Consts_SOutOfResources 65389
+#define Consts_SNoCanvasHandle 65390
+#define Consts_SInvalidImageSize 65391
+#define RTLConsts_SInvalidPropertyValue 65392
+#define RTLConsts_SInvalidRegType 65393
+#define RTLConsts_SInvalidStringGridOp 65394
+#define RTLConsts_SListCapacityError 65395
+#define RTLConsts_SListCountError 65396
+#define RTLConsts_SListIndexError 65397
+#define RTLConsts_SMemoryStreamError 65398
+#define RTLConsts_SPropertyException 65399
+#define RTLConsts_SReadError 65400
+#define RTLConsts_SReadOnlyProperty 65401
+#define RTLConsts_SRegGetDataFailed 65402
+#define RTLConsts_SRegSetDataFailed 65403
+#define RTLConsts_SResNotFound 65404
+#define RTLConsts_SSeekNotImplemented 65405
+#define RTLConsts_SSortedListError 65406
+#define RTLConsts_STooManyDeleted 65407
+#define RTLConsts_SDuplicateClass 65408
+#define RTLConsts_SDuplicateItem 65409
+#define RTLConsts_SDuplicateName 65410
+#define RTLConsts_SDuplicateString 65411
+#define RTLConsts_SFCreateError 65412
+#define RTLConsts_SFixedColTooBig 65413
+#define RTLConsts_SFixedRowTooBig 65414
+#define RTLConsts_SFOpenError 65415
+#define RTLConsts_SGridTooLarge 65416
+#define RTLConsts_SIndexOutOfRange 65417
+#define RTLConsts_SInvalidImage 65418
+#define RTLConsts_SInvalidName 65419
+#define RTLConsts_SInvalidProperty 65420
+#define RTLConsts_SInvalidPropertyElement 65421
+#define RTLConsts_SInvalidPropertyPath 65422
+#define RTLConsts_SInvalidPropertyType 65423
+#define SysConst_SShortDayNameThu 65424
+#define SysConst_SShortDayNameFri 65425
+#define SysConst_SShortDayNameSat 65426
+#define SysConst_SLongDayNameSun 65427
+#define SysConst_SLongDayNameMon 65428
+#define SysConst_SLongDayNameTue 65429
+#define SysConst_SLongDayNameWed 65430
+#define SysConst_SLongDayNameThu 65431
+#define SysConst_SLongDayNameFri 65432
+#define SysConst_SLongDayNameSat 65433
+#define RTLConsts_SAncestorNotFound 65434
+#define RTLConsts_SAssignError 65435
+#define RTLConsts_SBitsIndexError 65436
+#define RTLConsts_SCantWriteResourceStreamError 65437
+#define RTLConsts_SCheckSynchronizeError 65438
+#define RTLConsts_SClassNotFound 65439
+#define SysConst_SLongMonthNameJan 65440
+#define SysConst_SLongMonthNameFeb 65441
+#define SysConst_SLongMonthNameMar 65442
+#define SysConst_SLongMonthNameApr 65443
+#define SysConst_SLongMonthNameMay 65444
+#define SysConst_SLongMonthNameJun 65445
+#define SysConst_SLongMonthNameJul 65446
+#define SysConst_SLongMonthNameAug 65447
+#define SysConst_SLongMonthNameSep 65448
+#define SysConst_SLongMonthNameOct 65449
+#define SysConst_SLongMonthNameNov 65450
+#define SysConst_SLongMonthNameDec 65451
+#define SysConst_SShortDayNameSun 65452
+#define SysConst_SShortDayNameMon 65453
+#define SysConst_SShortDayNameTue 65454
+#define SysConst_SShortDayNameWed 65455
+#define SysConst_SModuleAccessViolation 65456
+#define SysConst_SOSError 65457
+#define SysConst_SUnkOSError 65458
+#define SysConst_SNL 65459
+#define SysConst_SShortMonthNameJan 65460
+#define SysConst_SShortMonthNameFeb 65461
+#define SysConst_SShortMonthNameMar 65462
+#define SysConst_SShortMonthNameApr 65463
+#define SysConst_SShortMonthNameMay 65464
+#define SysConst_SShortMonthNameJun 65465
+#define SysConst_SShortMonthNameJul 65466
+#define SysConst_SShortMonthNameAug 65467
+#define SysConst_SShortMonthNameSep 65468
+#define SysConst_SShortMonthNameOct 65469
+#define SysConst_SShortMonthNameNov 65470
+#define SysConst_SShortMonthNameDec 65471
+#define SysConst_SVarTypeNotUsable 65472
+#define SysConst_SVarTypeTooManyCustom 65473
+#define SysConst_SInvalidVarNullOp 65474
+#define SysConst_SVarTypeCouldNotConvert 65475
+#define SysConst_SVarTypeConvertOverflow 65476
+#define SysConst_SVarOverflow 65477
+#define SysConst_SVarInvalid 65478
+#define SysConst_SVarBadType 65479
+#define SysConst_SVarNotImplemented 65480
+#define SysConst_SVarUnexpected 65481
+#define SysConst_SExternalException 65482
+#define SysConst_SAssertionFailed 65483
+#define SysConst_SIntfCastError 65484
+#define SysConst_SSafecallException 65485
+#define SysConst_SAssertError 65486
+#define SysConst_SAbstractError 65487
+#define SysConst_SExceptTitle 65488
+#define SysConst_SInvalidFormat 65489
+#define SysConst_SArgumentMissing 65490
+#define SysConst_SDispatchError 65491
+#define SysConst_SReadAccess 65492
+#define SysConst_SWriteAccess 65493
+#define SysConst_SFormatTooLong 65494
+#define SysConst_SVarArrayCreate 65495
+#define SysConst_SVarArrayBounds 65496
+#define SysConst_SVarArrayLocked 65497
+#define SysConst_SInvalidVarCast 65498
+#define SysConst_SInvalidVarOp 65499
+#define SysConst_SInvalidVarOpWithHResult 65500
+#define SysConst_SVarNotArray 65501
+#define SysConst_SVarTypeOutOfRange 65502
+#define SysConst_SVarTypeAlreadyUsed 65503
+#define SysConst_SInvalidInput 65504
+#define SysConst_SDivByZero 65505
+#define SysConst_SRangeError 65506
+#define SysConst_SIntOverflow 65507
+#define SysConst_SInvalidOp 65508
+#define SysConst_SZeroDivide 65509
+#define SysConst_SOverflow 65510
+#define SysConst_SUnderflow 65511
+#define SysConst_SInvalidPointer 65512
+#define SysConst_SInvalidCast 65513
+#define SysConst_SAccessViolation 65514
+#define SysConst_SStackOverflow 65515
+#define SysConst_SControlC 65516
+#define SysConst_SPrivilege 65517
+#define SysConst_SOperationAborted 65518
+#define SysConst_SException 65519
 #define SysConst_SInvalidInteger 65520
 #define SysConst_SInvalidFloat 65521
-#define SysConst_SInvalidTime 65522
-#define SysConst_SInvalidDateTime 65523
-#define SysConst_STimeEncodeError 65524
-#define SysConst_SDateEncodeError 65525
-#define SysConst_SOutOfMemory 65526
-#define SysConst_SInOutError 65527
-#define SysConst_SFileNotFound 65528
-#define SysConst_SInvalidFilename 65529
-#define SysConst_STooManyOpenFiles 65530
-#define SysConst_SAccessDenied 65531
-#define SysConst_SEndOfFile 65532
-#define SysConst_SDiskFull 65533
-#define SysConst_SInvalidInput 65534
-#define SysConst_SDivByZero 65535
+#define SysConst_SInvalidDate 65522
+#define SysConst_SInvalidTime 65523
+#define SysConst_SInvalidDateTime 65524
+#define SysConst_SInvalidTimeStamp 65525
+#define SysConst_STimeEncodeError 65526
+#define SysConst_SDateEncodeError 65527
+#define SysConst_SOutOfMemory 65528
+#define SysConst_SInOutError 65529
+#define SysConst_SFileNotFound 65530
+#define SysConst_SInvalidFilename 65531
+#define SysConst_STooManyOpenFiles 65532
+#define SysConst_SAccessDenied 65533
+#define SysConst_SEndOfFile 65534
+#define SysConst_SDiskFull 65535
 STRINGTABLE
 BEGIN
-	VDBConsts_SRefreshRecord,	"Refresh data"
-	VDBConsts_SRemoteLogin,	"Remote Login"
-	OleConst_SInvalidLicense,	"License information for %s is invalid"
-	OleConst_SNotLicensed,	"License information for %s not found. You cannot use this control in design mode"
-	OleConst_sNoRunningObject,	"Unable to retrieve a pointer to a running object registered with OLE for %s/%s"
-	DBConsts_SBcdOverflow,	"BCD overflow"
-	DBConsts_SInvalidBcdValue,	"%s is not a valid BCD value"
-	DBConsts_SCouldNotParseTimeStamp,	"Could not parse SQL TimeStamp string"
-	DBConsts_SInvalidSqlTimeStamp,	"Invalid SQL date/time values"
+	TeeConst_TeeMsg_ValuesGanttStart,	"Start"
+	TeeConst_TeeMsg_ValuesGanttEnd,	"End"
+	TeeConst_TeeMsg_ValuesGanttNextTask,	"NextTask"
+	TeeConst_TeeMsg_ValuesArrowEndX,	"EndX"
+	TeeConst_TeeMsg_ValuesArrowEndY,	"EndY"
 	VDBConsts_SFirstRecord,	"First record"
 	VDBConsts_SPriorRecord,	"Prior record"
@@ -399,4 +505,8 @@
 	VDBConsts_SPostEdit,	"Post edit"
 	VDBConsts_SCancelEdit,	"Cancel edit"
+	VDBConsts_SRefreshRecord,	"Refresh data"
+	VDBConsts_SRemoteLogin,	"Remote Login"
+	TeeConst_TeeMsg_FunctionAdd,	"Add"
+	TeeConst_TeeMsg_FunctionSubtract,	"Subtract"
 	TeeConst_TeeMsg_FunctionMultiply,	"Multiply"
 	TeeConst_TeeMsg_FunctionDivide,	"Divide"
@@ -413,6 +523,26 @@
 	TeeConst_TeeMsg_ValuesBar,	"Bar"
 	TeeConst_TeeMsg_ValuesAngle,	"Angle"
-	OleConst_SCannotActivate,	"OLE control activation failed"
-	OleConst_SNoWindowHandle,	"Could not obtain OLE control window handle"
+	TeeConst_TeeMsg_PieSample8,	"Chairs"
+	TeeConst_TeeMsg_GalleryStandard,	"Standard"
+	TeeConst_TeeMsg_GalleryFunctions,	"Functions"
+	TeeConst_TeeMsg_GalleryArrow,	"Arrow"
+	TeeConst_TeeMsg_GalleryGantt,	"Gantt"
+	TeeConst_TeeMsg_GanttSample1,	"Design"
+	TeeConst_TeeMsg_GanttSample2,	"Prototyping"
+	TeeConst_TeeMsg_GanttSample3,	"Development"
+	TeeConst_TeeMsg_GanttSample4,	"Sales"
+	TeeConst_TeeMsg_GanttSample5,	"Marketing"
+	TeeConst_TeeMsg_GanttSample6,	"Testing"
+	TeeConst_TeeMsg_GanttSample7,	"Manufac."
+	TeeConst_TeeMsg_GanttSample8,	"Debugging"
+	TeeConst_TeeMsg_GanttSample9,	"New Version"
+	TeeConst_TeeMsg_GanttSample10,	"Banking"
+	TeeConst_TeeMsg_DefaultFontSize,	"8"
+	TeeConst_TeeMsg_AxisLabels,	"Axis Labels"
+	TeeConst_TeeMsg_GalleryLine,	"Line"
+	TeeConst_TeeMsg_GalleryPoint,	"Point"
+	TeeConst_TeeMsg_GalleryArea,	"Area"
+	TeeConst_TeeMsg_GalleryBar,	"Bar"
+	TeeConst_TeeMsg_GalleryHorizBar,	"Horiz. Bar"
 	TeeConst_TeeMsg_GalleryPie,	"Pie"
 	TeeConst_TeeMsg_GalleryFastLine,	"Fast Line"
@@ -425,10 +555,10 @@
 	TeeConst_TeeMsg_PieSample6,	"Keyboards"
 	TeeConst_TeeMsg_PieSample7,	"Bikes"
-	TeeConst_TeeMsg_PieSample8,	"Chairs"
-	TeeConst_TeeMsg_GalleryStandard,	"Standard"
-	TeeConst_TeeMsg_GalleryFunctions,	"Functions"
-	TeeConst_TeeMsg_DefaultFontSize,	"8"
-	TeeConst_TeeMsg_FunctionAdd,	"Add"
-	TeeConst_TeeMsg_FunctionSubtract,	"Subtract"
+	TeeConst_TeeMsg_AxisLogDateTime,	"DateTime Axis cannot be Logarithmic"
+	TeeConst_TeeMsg_AxisLogNotPositive,	"Logarithmic Axis Min and Max values should be >= 0"
+	TeeConst_TeeMsg_AxisLabelSep,	"Labels Separation % must be greater than 0"
+	TeeConst_TeeMsg_AxisIncrementNeg,	"Axis increment must be >= 0"
+	TeeConst_TeeMsg_AxisMinMax,	"Axis Minimum Value must be <= Maximum"
+	TeeConst_TeeMsg_AxisMaxMin,	"Axis Maximum Value must be >= Minimum"
 	TeeConst_TeeMsg_AxisLogBase,	"Axis Logarithmic Base should be >= 2"
 	TeeConst_TeeMsg_MaxPointsPerPage,	"MaxPointsPerPage must be >= 0"
@@ -441,13 +571,13 @@
 	TeeConst_TeeMsg_DefValueFormat,	"#,##0.###"
 	TeeConst_TeeMsg_AxisTitle,	"Axis Title"
-	TeeConst_TeeMsg_AxisLabels,	"Axis Labels"
-	TeeConst_TeeMsg_GalleryLine,	"Line"
-	TeeConst_TeeMsg_GalleryPoint,	"Point"
-	TeeConst_TeeMsg_GalleryArea,	"Area"
-	TeeConst_TeeMsg_GalleryBar,	"Bar"
-	TeeConst_TeeMsg_GalleryHorizBar,	"Horiz. Bar"
-	ComConst_SAutomationWarning,	"COM Server Warning"
-	ComConst_SNoCloseActiveServer1,	"There are still active COM objects in this application.  One or more clients may have references to these objects, so manually closing "
-	ComConst_SNoCloseActiveServer2,	"this application may cause those client application(s) to fail.\r\n\r\nAre you sure you want to close this application?"
+	bdeconst_SInitError,	"An error occurred while attempting to initialize the Borland Database Engine (error $%.4x)"
+	bdeconst_SIDAPILangID,	"0009"
+	bdeconst_SBDEError,	"BDE error $%.4x"
+	bdeconst_SNoDataSetField,	"Missing DataSetField property"
+	bdeconst_SNoCachedUpdates,	"Not in cached update mode"
+	bdeconst_SNoFieldAccess,	"Cannot access field '%s' in a filter"
+	bdeconst_SUntitled,	"Untitled Application"
+	bdeconst_SUpdateFailed,	"Update failed"
+	bdeconst_SLocalTransDirty,	"The transaction isolation level must be dirty read for local databases"
 	TeeConst_TeeMsg_LegendTopPos,	"Top Legend Position must be between 0 and 100 %"
 	TeeConst_TeeMsg_LegendFirstValue,	"First Legend Value must be > 0"
@@ -457,10 +587,103 @@
 	TeeConst_TeeMsg_FillSample,	"FillSampleValues NumValues must be > 0"
 	TeeConst_TeeMsg_Angle,	"%s Angle must be between 0 and 359 degrees"
-	TeeConst_TeeMsg_AxisLogDateTime,	"DateTime Axis cannot be Logarithmic"
-	TeeConst_TeeMsg_AxisLogNotPositive,	"Logarithmic Axis Min and Max values should be >= 0"
-	TeeConst_TeeMsg_AxisLabelSep,	"Labels Separation % must be greater than 0"
-	TeeConst_TeeMsg_AxisIncrementNeg,	"Axis increment must be >= 0"
-	TeeConst_TeeMsg_AxisMinMax,	"Axis Minimum Value must be <= Maximum"
-	TeeConst_TeeMsg_AxisMaxMin,	"Axis Maximum Value must be >= Minimum"
+	bdeconst_SAutoSessionExists,	"Cannot add a session to the form or data-module while session '%s' has AutoSessionName enabled"
+	bdeconst_SAutoSessionActive,	"Cannot modify SessionName while AutoSessionName is enabled"
+	bdeconst_SDuplicateDatabaseName,	"Duplicate database name '%s'"
+	bdeconst_SDuplicateSessionName,	"Duplicate session name '%s'"
+	bdeconst_SInvalidSessionName,	"Invalid session name %s"
+	bdeconst_SDatabaseNameMissing,	"Database name missing"
+	bdeconst_SSessionNameMissing,	"Session name missing"
+	bdeconst_SDatabaseOpen,	"Cannot perform this operation on an open database"
+	bdeconst_SDatabaseClosed,	"Cannot perform this operation on a closed database"
+	bdeconst_SDatabaseHandleSet,	"Database handle owned by a different session"
+	bdeconst_SSessionActive,	"Cannot perform this operation on an active session"
+	bdeconst_SHandleError,	"Error creating cursor handle"
+	bdeconst_SNoReferenceTableName,	"ReferenceTableName not specified for field '%s'"
+	bdeconst_SEmptySQLStatement,	"No SQL statement available"
+	bdeconst_SNoParameterValue,	"No value for parameter '%s'"
+	bdeconst_SLoginError,	"Cannot connect to database '%s'"
+	DBConsts_STextTrue,	"True"
+	DBConsts_SParameterNotFound,	"Parameter '%s' not found"
+	DBConsts_SInvalidVersion,	"Unable to load bind parameters"
+	DBConsts_SBadFieldType,	"Field '%s' is of an unsupported type"
+	DBConsts_SProviderSQLNotSupported,	"SQL not supported: %s"
+	DBConsts_SProviderExecuteNotSupported,	"Execute not supported: %s"
+	DBConsts_SExprNoAggOnCalcs,	"Field '%s' is not the correct type of calculated field to be used in an aggregate, use an internalcalc"
+	DBConsts_SDataSetUnidirectional,	"Operation not allowed on a unidirectional dataset"
+	DBConsts_SUnassignedVar,	"Unassigned variant value"
+	DBConsts_SRecordNotFound,	"Record not found"
+	DBConsts_SBcdOverflow,	"BCD overflow"
+	DBConsts_SInvalidBcdValue,	"%s is not a valid BCD value"
+	DBConsts_SInvalidFormatType,	"Invalid format type for BCD"
+	DBConsts_SCouldNotParseTimeStamp,	"Could not parse SQL TimeStamp string"
+	DBConsts_SInvalidSqlTimeStamp,	"Invalid SQL date/time values"
+	bdeconst_SAutoSessionExclusive,	"Cannot enable AutoSessionName property with more than one session on a form or data-module"
+	DBConsts_SExprNoRParenOrComma,	"')' or ',' expected but %s found"
+	DBConsts_SExprExpected,	"Expression expected but %s found"
+	DBConsts_SExprBadField,	"Field '%s' cannot be used in a filter expression"
+	DBConsts_SExprBadNullTest,	"NULL only allowed with '=' and '<>'"
+	DBConsts_SExprRangeError,	"Constant out of range"
+	DBConsts_SExprIncorrect,	"Incorrectly formed filter expression"
+	DBConsts_SExprNothing,	"nothing"
+	DBConsts_SExprTypeMis,	"Type mismatch in expression"
+	DBConsts_SExprBadScope,	"Operation cannot mix aggregate value with record-varying value"
+	DBConsts_SExprNoArith,	"Arithmetic in filter expressions not supported"
+	DBConsts_SExprNotAgg,	"Expression is not an aggregate expression"
+	DBConsts_SExprBadConst,	"Constant is not correct type %s"
+	DBConsts_SExprNoAggFilter,	"Aggregate expressions not allowed in filters"
+	DBConsts_SExprEmptyInList,	"IN predicate list may not be empty"
+	DBConsts_SInvalidKeywordUse,	"Invalid use of keyword"
+	DBConsts_STextFalse,	"False"
+	DBConsts_SInvalidCalcType,	"Field '%s' cannot be a calculated or lookup field"
+	DBConsts_SFieldReadOnly,	"Field '%s' cannot be modified"
+	DBConsts_SNotIndexField,	"Field '%s' is not indexed and cannot be modified"
+	DBConsts_SCircularDataLink,	"Circular datalinks are not allowed"
+	DBConsts_SLookupInfoError,	"Lookup information for field '%s' is incomplete"
+	DBConsts_SDataSourceChange,	"DataSource cannot be changed"
+	DBConsts_SDataSetOpen,	"Cannot perform this operation on an open dataset"
+	DBConsts_SNotEditing,	"Dataset not in edit or insert mode"
+	DBConsts_SDataSetClosed,	"Cannot perform this operation on a closed dataset"
+	DBConsts_SNestedDataSetClass,	"Nested dataset must inherit from %s"
+	DBConsts_SExprTermination,	"Filter expression incorrectly terminated"
+	DBConsts_SExprNameError,	"Unterminated field name"
+	DBConsts_SExprStringError,	"Unterminated string constant"
+	DBConsts_SExprInvalidChar,	"Invalid filter expression character: '%s'"
+	DBConsts_SExprNoLParen,	"'(' expected but %s found"
+	DBConsts_SExprNoRParen,	"')' expected but %s found"
+	DBConsts_SFieldNameMissing,	"Field name missing"
+	DBConsts_SDuplicateFieldName,	"Duplicate field name '%s'"
+	DBConsts_SFieldNotFound,	"Field '%s' not found"
+	DBConsts_SFieldAccessError,	"Cannot access field '%s' as type %s"
+	DBConsts_SFieldValueError,	"Invalid value for field '%s'"
+	DBConsts_SFieldRangeError,	"%g is not a valid value for field '%s'. The allowed range is %g to %g"
+	DBConsts_SBcdFieldRangeError,	"%s is not a valid value for field '%s'. The allowed range is %s to %s"
+	DBConsts_SInvalidIntegerValue,	"'%s' is not a valid integer value for field '%s'"
+	DBConsts_SInvalidBoolValue,	"'%s' is not a valid boolean value for field '%s'"
+	DBConsts_SInvalidFloatValue,	"'%s' is not a valid floating point value for field '%s'"
+	DBConsts_SFieldTypeMismatch,	"Type mismatch for field '%s', expecting: %s actual: %s"
+	DBConsts_SFieldSizeMismatch,	"Size mismatch for field '%s', expecting: %d actual: %d"
+	DBConsts_SInvalidVarByteArray,	"Invalid variant type or size for field '%s'"
+	DBConsts_SFieldOutOfRange,	"Value of field '%s' is out of range"
+	DBConsts_SFieldRequired,	"Field '%s' must have a value"
+	DBConsts_SDataSetMissing,	"Field '%s' has no dataset"
+	ComConst_STooManyParams,	"Dispatch methods do not support more than 64 parameters"
+	ComConst_SDCOMNotInstalled,	"DCOM not installed"
+	ComConst_SDAXError,	"DAX Error"
+	ComConst_SAutomationWarning,	"COM Server Warning"
+	ComConst_SNoCloseActiveServer1,	"There are still active COM objects in this application.  One or more clients may have references to these objects, so manually closing "
+	ComConst_SNoCloseActiveServer2,	"this application may cause those client application(s) to fail.\r\n\r\nAre you sure you want to close this application?"
+	OleConst_SCannotActivate,	"OLE control activation failed"
+	OleConst_SNoWindowHandle,	"Could not obtain OLE control window handle"
+	OleConst_SOleError,	"OLE error %.8x"
+	OleConst_SVarNotObject,	"Variant does not reference an OLE object"
+	OleConst_SInvalidLicense,	"License information for %s is invalid"
+	OleConst_SNotLicensed,	"License information for %s not found. You cannot use this control in design mode"
+	OleConst_sNoRunningObject,	"Unable to retrieve a pointer to a running object registered with OLE for %s/%s"
+	DBConsts_SInvalidFieldSize,	"Invalid field size"
+	DBConsts_SInvalidFieldKind,	"Invalid FieldKind"
+	DBConsts_SUnknownFieldType,	"Field '%s' is of an unknown type"
+	ComStrs_sPageIndexError,	"%d is an invalid PageIndex value.  PageIndex must be between 0 and %d"
+	ComStrs_sInvalidComCtl32,	"This control requires version 4.70 or greater of COMCTL32.DLL"
+	ComStrs_sDateTimeMax,	"Date exceeds maximum of %s"
 	ComStrs_sDateTimeMin,	"Date is less than minimum of %s"
 	ComStrs_sFailSetCalDateTime,	"Failed to set calendar date or time"
@@ -476,7 +699,7 @@
 	ComConst_SNoMethod,	"Method '%s' not supported by automation object"
 	ComConst_SVarNotObject,	"Variant does not reference an automation object"
-	ComConst_STooManyParams,	"Dispatch methods do not support more than 64 parameters"
-	ComConst_SDCOMNotInstalled,	"DCOM not installed"
-	ComConst_SDAXError,	"DAX Error"
+	HelpIntfs_hNoContext,	"No context-sensitive help installed"
+	HelpIntfs_hNoTopics,	"No topic-based help system installed"
+	ComStrs_sTabFailClear,	"Failed to clear tab control"
 	ComStrs_sTabFailDelete,	"Failed to delete tab at index %d"
 	ComStrs_sTabFailRetrieve,	"Failed to retrieve tab at index %d"
@@ -492,7 +715,7 @@
 	ComStrs_sRichEditSaveFail,	"Failed to Save Stream"
 	ComStrs_sUDAssociated,	"%s is already associated with %s"
-	ComStrs_sPageIndexError,	"%d is an invalid PageIndex value.  PageIndex must be between 0 and %d"
-	ComStrs_sInvalidComCtl32,	"This control requires version 4.70 or greater of COMCTL32.DLL"
-	ComStrs_sDateTimeMax,	"Date exceeds maximum of %s"
+	Consts_SCannotOpenClipboard,	"Cannot open clipboard"
+	Consts_SInvalidMemoSize,	"Text exceeds memo capacity"
+	Consts_SInvalidPrinterOp,	"Operation not supported on selected printer"
 	Consts_SNoDefaultPrinter,	"There is no default printer currently selected"
 	Consts_SDuplicateMenus,	"Menu '%s' is already being used by another form"
@@ -508,7 +731,7 @@
 	HelpIntfs_hNoTableOfContents,	"Unable to find a Table of Contents"
 	HelpIntfs_hNothingFound,	"No help found for %s"
-	HelpIntfs_hNoContext,	"No context-sensitive help installed"
-	HelpIntfs_hNoTopics,	"No topic-based help system installed"
-	ComStrs_sTabFailClear,	"Failed to clear tab control"
+	Consts_SmkcPgDn,	"PgDn"
+	Consts_SmkcEnd,	"End"
+	Consts_SmkcHome,	"Home"
 	Consts_SmkcLeft,	"Left"
 	Consts_SmkcUp,	"Up"
@@ -524,7 +747,7 @@
 	Consts_SInvalidClipFmt,	"Invalid clipboard format"
 	Consts_SIconToClipboard,	"Clipboard does not support Icons"
-	Consts_SCannotOpenClipboard,	"Cannot open clipboard"
-	Consts_SInvalidMemoSize,	"Text exceeds memo capacity"
-	Consts_SInvalidPrinterOp,	"Operation not supported on selected printer"
+	Consts_SMsgDlgNo,	"&No"
+	Consts_SMsgDlgOK,	"OK"
+	Consts_SMsgDlgCancel,	"Cancel"
 	Consts_SMsgDlgHelp,	"&Help"
 	Consts_SMsgDlgAbort,	"&Abort"
@@ -540,7 +763,7 @@
 	Consts_SmkcSpace,	"Space"
 	Consts_SmkcPgUp,	"PgUp"
-	Consts_SmkcPgDn,	"PgDn"
-	Consts_SmkcEnd,	"End"
-	Consts_SmkcHome,	"Home"
+	Consts_SIgnoreButton,	"&Ignore"
+	Consts_SRetryButton,	"&Retry"
+	Consts_SAbortButton,	"Abort"
 	Consts_SAllButton,	"&All"
 	Consts_SCannotDragForm,	"Cannot drag a form"
@@ -556,7 +779,7 @@
 	Consts_SMsgDlgConfirm,	"Confirm"
 	Consts_SMsgDlgYes,	"&Yes"
-	Consts_SMsgDlgNo,	"&No"
-	Consts_SMsgDlgOK,	"OK"
-	Consts_SMsgDlgCancel,	"Cancel"
+	Consts_SMenuReinserted,	"Menu inserted twice"
+	Consts_SMenuNotFound,	"Sub-menu is not in menu"
+	Consts_SNoTimers,	"Not enough timers available"
 	Consts_SNotPrinting,	"Printer is not currently printing"
 	Consts_SPrinting,	"Printing in progress"
@@ -572,7 +795,7 @@
 	Consts_SHelpButton,	"&Help"
 	Consts_SCloseButton,	"&Close"
-	Consts_SIgnoreButton,	"&Ignore"
-	Consts_SRetryButton,	"&Retry"
-	Consts_SAbortButton,	"Abort"
+	Consts_SInvalidImageList,	"Invalid ImageList"
+	Consts_SReplaceImage,	"Unable to Replace Image"
+	Consts_SImageIndexError,	"Invalid ImageList Index"
 	Consts_SImageReadFail,	"Failed to read ImageList data from stream"
 	Consts_SImageWriteFail,	"Failed to write ImageList data to stream"
@@ -588,7 +811,7 @@
 	Consts_SPropertyOutOfRange,	"%s property out of range"
 	Consts_SMenuIndexError,	"Menu index out of range"
-	Consts_SMenuReinserted,	"Menu inserted twice"
-	Consts_SMenuNotFound,	"Sub-menu is not in menu"
-	Consts_SNoTimers,	"Not enough timers available"
+	RTLConsts_SUnknownGroup,	"%s not in a class registration group"
+	RTLConsts_SUnknownProperty,	"Property %s does not exist"
+	RTLConsts_SWriteError,	"Stream write error"
 	RTLConsts_SThreadCreateError,	"Thread creation error: %s"
 	RTLConsts_SThreadError,	"Thread Error: %s (%d)"
@@ -604,7 +827,7 @@
 	Consts_SNoCanvasHandle,	"Canvas does not allow drawing"
 	Consts_SInvalidImageSize,	"Invalid image size"
-	Consts_SInvalidImageList,	"Invalid ImageList"
-	Consts_SReplaceImage,	"Unable to Replace Image"
-	Consts_SImageIndexError,	"Invalid ImageList Index"
+	RTLConsts_SInvalidPropertyValue,	"Invalid property value"
+	RTLConsts_SInvalidRegType,	"Invalid data type for '%s'"
+	RTLConsts_SInvalidStringGridOp,	"Cannot insert or delete rows from grid"
 	RTLConsts_SListCapacityError,	"List capacity out of bounds (%d)"
 	RTLConsts_SListCountError,	"List count out of bounds (%d)"
@@ -620,7 +843,7 @@
 	RTLConsts_SSortedListError,	"Operation not allowed on sorted list"
 	RTLConsts_STooManyDeleted,	"Too many rows or columns deleted"
-	RTLConsts_SUnknownGroup,	"%s not in a class registration group"
-	RTLConsts_SUnknownProperty,	"Property %s does not exist"
-	RTLConsts_SWriteError,	"Stream write error"
+	RTLConsts_SDuplicateClass,	"A class named %s already exists"
+	RTLConsts_SDuplicateItem,	"List does not allow duplicates ($0%x)"
+	RTLConsts_SDuplicateName,	"A component named %s already exists"
 	RTLConsts_SDuplicateString,	"String list does not allow duplicates"
 	RTLConsts_SFCreateError,	"Cannot create file %s"
@@ -636,7 +859,7 @@
 	RTLConsts_SInvalidPropertyPath,	"Invalid property path"
 	RTLConsts_SInvalidPropertyType,	"Invalid property type: %s"
-	RTLConsts_SInvalidPropertyValue,	"Invalid property value"
-	RTLConsts_SInvalidRegType,	"Invalid data type for '%s'"
-	RTLConsts_SInvalidStringGridOp,	"Cannot insert or delete rows from grid"
+	SysConst_SShortDayNameThu,	"Thu"
+	SysConst_SShortDayNameFri,	"Fri"
+	SysConst_SShortDayNameSat,	"Sat"
 	SysConst_SLongDayNameSun,	"Sunday"
 	SysConst_SLongDayNameMon,	"Monday"
@@ -652,7 +875,7 @@
 	RTLConsts_SCheckSynchronizeError,	"CheckSynchronize called from thread $%x, which is NOT the main thread"
 	RTLConsts_SClassNotFound,	"Class %s not found"
-	RTLConsts_SDuplicateClass,	"A class named %s already exists"
-	RTLConsts_SDuplicateItem,	"List does not allow duplicates ($0%x)"
-	RTLConsts_SDuplicateName,	"A component named %s already exists"
+	SysConst_SLongMonthNameJan,	"January"
+	SysConst_SLongMonthNameFeb,	"February"
+	SysConst_SLongMonthNameMar,	"March"
 	SysConst_SLongMonthNameApr,	"April"
 	SysConst_SLongMonthNameMay,	"May"
@@ -668,8 +891,8 @@
 	SysConst_SShortDayNameTue,	"Tue"
 	SysConst_SShortDayNameWed,	"Wed"
-	SysConst_SShortDayNameThu,	"Thu"
-	SysConst_SShortDayNameFri,	"Fri"
-	SysConst_SShortDayNameSat,	"Sat"
+	SysConst_SModuleAccessViolation,	"Access violation at address %p in module '%s'. %s of address %p"
+	SysConst_SOSError,	"System Error.  Code: %d.\r\n%s"
 	SysConst_SUnkOSError,	"A call to an OS function failed"
+	SysConst_SNL,	"Application is not licensed to use this feature"
 	SysConst_SShortMonthNameJan,	"Jan"
 	SysConst_SShortMonthNameFeb,	"Feb"
@@ -684,7 +907,6 @@
 	SysConst_SShortMonthNameNov,	"Nov"
 	SysConst_SShortMonthNameDec,	"Dec"
-	SysConst_SLongMonthNameJan,	"January"
-	SysConst_SLongMonthNameFeb,	"February"
-	SysConst_SLongMonthNameMar,	"March"
+	SysConst_SVarTypeNotUsable,	"Custom variant type (%.4x) is not usable"
+	SysConst_SVarTypeTooManyCustom,	"Too many custom variant types have been registered"
 	SysConst_SInvalidVarNullOp,	"Invalid NULL variant operation"
 	SysConst_SVarTypeCouldNotConvert,	"Could not convert variant of type (%s) into type (%s)"
@@ -701,6 +923,6 @@
 	SysConst_SAssertError,	"%s (%s, line %d)"
 	SysConst_SAbstractError,	"Abstract Error"
-	SysConst_SModuleAccessViolation,	"Access violation at address %p in module '%s'. %s of address %p"
-	SysConst_SOSError,	"System Error.  Code: %d.\r\n%s"
+	SysConst_SExceptTitle,	"Application Error"
+	SysConst_SInvalidFormat,	"Format '%s' invalid or incompatible with argument"
 	SysConst_SArgumentMissing,	"No argument for format '%s'"
 	SysConst_SDispatchError,	"Variant method calls not supported"
@@ -717,6 +939,6 @@
 	SysConst_SVarTypeOutOfRange,	"Custom variant type (%.4x) is out of range"
 	SysConst_SVarTypeAlreadyUsed,	"Custom variant type (%.4x) already used by %s"
-	SysConst_SVarTypeNotUsable,	"Custom variant type (%.4x) is not usable"
-	SysConst_SVarTypeTooManyCustom,	"Too many custom variant types have been registered"
+	SysConst_SInvalidInput,	"Invalid numeric input"
+	SysConst_SDivByZero,	"Division by zero"
 	SysConst_SRangeError,	"Range check error"
 	SysConst_SIntOverflow,	"Integer overflow"
@@ -733,10 +955,10 @@
 	SysConst_SOperationAborted,	"Operation aborted"
 	SysConst_SException,	"Exception %s in module %s at %p.\r\n%s%s\r\n"
-	SysConst_SExceptTitle,	"Application Error"
-	SysConst_SInvalidFormat,	"Format '%s' invalid or incompatible with argument"
 	SysConst_SInvalidInteger,	"'%s' is not a valid integer value"
 	SysConst_SInvalidFloat,	"'%s' is not a valid floating point value"
+	SysConst_SInvalidDate,	"'%s' is not a valid date"
 	SysConst_SInvalidTime,	"'%s' is not a valid time"
 	SysConst_SInvalidDateTime,	"'%s' is not a valid date and time"
+	SysConst_SInvalidTimeStamp,	"'%d.%d' is not a valid timestamp"
 	SysConst_STimeEncodeError,	"Invalid argument to time encode"
 	SysConst_SDateEncodeError,	"Invalid argument to date encode"
@@ -749,6 +971,4 @@
 	SysConst_SEndOfFile,	"Read beyond end of file"
 	SysConst_SDiskFull,	"Disk full"
-	SysConst_SInvalidInput,	"Invalid numeric input"
-	SysConst_SDivByZero,	"Division by zero"
 END
 
Index: cprs/branches/foia-cprs/CPRS-Chart/Consults/FormResize.txt
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Consults/FormResize.txt	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/Consults/FormResize.txt	(revision 460)
@@ -0,0 +1,8 @@
+procedure TfrmODCslt.FormResize(Sender: TObject);
+begin
+  inherited;
+  memOrder.Top := pnlReason.Top + pnlReason.Height + 2;
+  pnlMessage.Top := memOrder.Top + 2;
+  cmdAccept.Top := pnlMessage.Top;
+  cmdQuit.Top := cmdAccept.Top;
+end;
Index: cprs/branches/foia-cprs/CPRS-Chart/Consults/fConsultAct.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Consults/fConsultAct.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Consults/fConsultAct.dfm	(revision 460)
@@ -107,4 +107,5 @@
         TabOrder = 3
         OnNeedData = NewPersonNeedData
+        CharsNeedMatch = 1
       end
       object cboUrgency: TORComboBox
@@ -129,4 +130,5 @@
         SynonymChars = '<>'
         TabOrder = 2
+        CharsNeedMatch = 1
       end
       object treService: TORTreeView
@@ -167,4 +169,5 @@
         OnKeyPause = cboServiceSelect
         OnMouseClick = cboServiceSelect
+        CharsNeedMatch = 1
       end
     end
@@ -352,4 +355,5 @@
           TabStop = True
           OnNeedData = NewPersonNeedData
+          CharsNeedMatch = 1
         end
       end
Index: cprs/branches/foia-cprs/CPRS-Chart/Consults/fConsultAct.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Consults/fConsultAct.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Consults/fConsultAct.pas	(revision 460)
@@ -465,5 +465,5 @@
     FUrgency       := cboUrgency.ItemIEN ;
     if (FActionType = CN_ACT_SIGFIND) or (FActionType = CN_ACT_ADMIN_COMPLETE) then
-      FSigFind       := Copy(grpSigFindings.Items[grpSigFindings.ItemIndex],1,1);
+      FSigFind       := Copy(grpSigFindings.Items[grpSigFindings.ItemIndex],2,1);
     LimitEditWidth(memComments, 74);
     FComments := memComments.Lines ;
Index: cprs/branches/foia-cprs/CPRS-Chart/Consults/fConsults.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Consults/fConsults.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Consults/fConsults.dfm	(revision 460)
@@ -1,6 +1,6 @@
 inherited frmConsults: TfrmConsults
-  Left = 327
-  Top = 169
-  Width = 660
+  Left = 247
+  Top = 174
+  Width = 723
   Height = 467
   HelpContext = 6000
@@ -15,5 +15,5 @@
   inherited shpPageBottom: TShape
     Top = 416
-    Width = 652
+    Width = 715
   end
   inherited sptHorz: TSplitter
@@ -25,5 +25,5 @@
   inherited pnlRight: TPanel [2]
     Left = 85
-    Width = 567
+    Width = 630
     Height = 416
     OnResize = pnlRightResize
@@ -31,5 +31,5 @@
       Left = 0
       Top = 350
-      Width = 567
+      Width = 630
       Height = 4
       Cursor = crVSplit
@@ -39,5 +39,5 @@
       Left = 0
       Top = 0
-      Width = 567
+      Width = 630
       Height = 350
       Align = alClient
@@ -48,5 +48,5 @@
         Left = 0
         Top = 0
-        Width = 567
+        Width = 630
         Height = 19
         Align = alTop
@@ -68,5 +68,5 @@
         Left = 0
         Top = 19
-        Width = 567
+        Width = 630
         Height = 331
         Align = alClient
@@ -97,5 +97,5 @@
       Left = 0
       Top = 354
-      Width = 567
+      Width = 630
       Height = 62
       Align = alBottom
@@ -107,5 +107,5 @@
       Left = 0
       Top = 0
-      Width = 567
+      Width = 630
       Height = 350
       Align = alClient
@@ -117,5 +117,5 @@
         Left = 0
         Top = 67
-        Width = 567
+        Width = 630
         Height = 283
         Align = alClient
@@ -137,5 +137,5 @@
         Left = 0
         Top = 0
-        Width = 567
+        Width = 630
         Height = 67
         Align = alTop
@@ -144,5 +144,5 @@
         OnResize = pnlFieldsResize
         DesignSize = (
-          567
+          630
           67)
         object bvlNewTitle: TBevel
@@ -166,5 +166,5 @@
         end
         object lblAuthor: TStaticText
-          Left = 339
+          Left = 402
           Top = 6
           Width = 152
@@ -189,5 +189,5 @@
         end
         object lblCosigner: TStaticText
-          Left = 244
+          Left = 307
           Top = 21
           Width = 243
@@ -232,5 +232,5 @@
         end
         object cmdChange: TButton
-          Left = 493
+          Left = 556
           Top = 6
           Width = 58
@@ -245,5 +245,5 @@
           Left = 48
           Top = 40
-          Width = 503
+          Width = 566
           Height = 21
           Hint = 'Subject is limited to a maximum of 80 characters.'
@@ -435,5 +435,4 @@
         Height = 142
         Align = alClient
-        Color = clWhite
         HideSelection = False
         Indent = 15
@@ -675,4 +674,54 @@
         end
       end
+      object mnuViewInformation: TMenuItem
+        Caption = 'Information'
+        OnClick = mnuViewInformationClick
+        object mnuViewDemo: TMenuItem
+          Tag = 1
+          Caption = 'De&mographics...'
+          OnClick = ViewInfo
+        end
+        object mnuViewVisits: TMenuItem
+          Tag = 2
+          Caption = 'Visits/Pr&ovider...'
+          OnClick = ViewInfo
+        end
+        object mnuViewPrimaryCare: TMenuItem
+          Tag = 3
+          Caption = 'Primary &Care...'
+          OnClick = ViewInfo
+        end
+        object mnuViewMyHealtheVet: TMenuItem
+          Tag = 4
+          Caption = 'MyHealthe&Vet...'
+          OnClick = ViewInfo
+        end
+        object mnuInsurance: TMenuItem
+          Tag = 5
+          Caption = '&Insurance...'
+          OnClick = ViewInfo
+        end
+        object mnuViewFlags: TMenuItem
+          Tag = 6
+          Caption = '&Flags...'
+          OnClick = ViewInfo
+        end
+        object mnuViewRemoteData: TMenuItem
+          Tag = 7
+          Caption = 'Remote &Data...'
+          OnClick = ViewInfo
+        end
+        object mnuViewReminders: TMenuItem
+          Tag = 8
+          Caption = '&Reminders...'
+          Enabled = False
+          OnClick = ViewInfo
+        end
+        object mnuViewPostings: TMenuItem
+          Tag = 9
+          Caption = '&Postings...'
+          OnClick = ViewInfo
+        end
+      end
       object Z3: TMenuItem
         Caption = '-'
Index: cprs/branches/foia-cprs/CPRS-Chart/Consults/fConsults.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Consults/fConsults.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Consults/fConsults.pas	(revision 460)
@@ -162,4 +162,14 @@
     popNoteMemoInsTemplate: TMenuItem;
     popNoteMemoEncounter: TMenuItem;
+    mnuViewInformation: TMenuItem;
+    mnuViewDemo: TMenuItem;
+    mnuViewVisits: TMenuItem;
+    mnuViewPrimaryCare: TMenuItem;
+    mnuViewMyHealtheVet: TMenuItem;
+    mnuInsurance: TMenuItem;
+    mnuViewFlags: TMenuItem;
+    mnuViewReminders: TMenuItem;
+    mnuViewRemoteData: TMenuItem;
+    mnuViewPostings: TMenuItem;
     procedure mnuChartTabClick(Sender: TObject);
     procedure lstConsultsClick(Sender: TObject);
@@ -267,4 +277,6 @@
     procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X,
       Y: Integer);
+    procedure ViewInfo(Sender: TObject);
+    procedure mnuViewInformationClick(Sender: TObject);
   private
     FEditingIndex: Integer;      // TIU index of document being currently edited
@@ -296,5 +308,5 @@
     procedure frmDrawerPnlEncounterButtonExit(Sender: TObject);
     procedure frmDrawerEdtSearchExit(Sender: TObject);
-    procedure DoAutoSave;
+    procedure DoAutoSave(Suppress: integer = 1);
     function GetTitleText(AnIndex: Integer): string;
     //function MakeTitleText(IsAddendum: Boolean = False): string;
@@ -870,9 +882,5 @@
             lstNotesClick(Self);  // will make pnlWrite visible
             if timAutoSave.Interval <> 0 then EnableAutosave := TRUE;
-
-            if txtSubject.Visible then
-              txtSubject.SetFocus
-            else
-              memResults.SetFocus;
+            if txtSubject.Visible then txtSubject.SetFocus else memResults.SetFocus;
           end
         else  //  CreatedNote.ErrorText <> ''
@@ -947,5 +955,6 @@
     else HaveRequired := True;
   // lock the consult request if there is a consult
-  if FEditNote.PkgIEN > 0 then HaveRequired := LockConsultRequest(FEditNote.PkgIEN);
+  if HaveRequired and (FEditNote.PkgIEN > 0) then
+    HaveRequired := LockConsultRequest(FEditNote.PkgIEN);
   if HaveRequired then
   begin
@@ -1529,5 +1538,5 @@
       CompleteConsult(IS_ID_CHILD, 0, UseClinProcTitles);
     end
-  else if NoteIEN = -1 then Exit;
+  else if NoteIEN = -1 then Exit
 end;
 
@@ -2003,8 +2012,11 @@
 procedure TfrmConsults.SaveSignItem(const ItemID, ESCode: string);
 { saves and optionally signs a progress note or addendum }
+const
+  SIG_COSIGN = 'COSIGNATURE';
+  SIG_SIGN   = 'SIGNATURE';
 var
   AnIndex, IEN, i: Integer;
   Saved, ContinueSign: Boolean;  {*RAB* 8/26/99}
-  SignSts: TActionRec;
+  ActionSts, SignSts: TActionRec;
   APCEObject: TPCEData;
   OK: boolean;
@@ -2012,4 +2024,5 @@
   tmpNode: TORTreeNode;
   ErrMsg: string;
+  ActionType, SignTitle: string;
 begin
   AnIndex := -1;
@@ -2039,15 +2052,20 @@
   if Length(ESCode) > 0 then
   begin
-(*    if LacksClinProcFieldsForSignature(IEN, ErrMsg) then
-       begin
-         InfoBox(ErrMsg, TC_CLIN_PROC, MB_OK);
-         ContinueSign := False;
-       end
-    else ContinueSign := True;
-    if not LastSaveClean(IEN) and
-      (InfoBox(TX_ABSAVE, TC_ABSAVE, MB_YESNO or MB_DEFBUTTON2) <> IDYES)
-       then ContinueSign := False;
-       //else ContinueSign := True;*)
-    if LacksClinProcFieldsForSignature(IEN, ErrMsg) then
+    if CosignDocument(IEN) then
+    begin
+      SignTitle := TX_COSIGN;
+      ActionType := SIG_COSIGN;
+    end else
+    begin
+      SignTitle := TX_SIGN;
+      ActionType := SIG_SIGN;
+    end;
+    ActOnDocument(ActionSts, IEN, ActionType);
+    if not ActionSts.Success then
+      begin
+        InfoBox(ActionSts.Reason, TX_IN_AUTH, MB_OK);
+        ContinueSign := False;
+      end
+    else if LacksClinProcFieldsForSignature(IEN, ErrMsg) then
       begin
        InfoBox(ErrMsg, TC_CLIN_PROC, MB_OK);
@@ -2063,5 +2081,4 @@
        then ContinueSign := False
     else ContinueSign := True;
-
     if ContinueSign then
     begin
@@ -2753,9 +2770,11 @@
 begin
   inherited;
-  DoAutoSave;
+  DoAutoSave(0);
   timAutoSave.Enabled := False;
   try
     SpellCheckForControl(memResults);
   finally
+    FChanged := True;
+    DoAutoSave(0);
     timAutoSave.Enabled := True;
   end;
@@ -2765,9 +2784,11 @@
 begin
   inherited;
-  DoAutoSave;
+  DoAutoSave(0);
   timAutoSave.Enabled := False;
   try
     GrammarCheckForControl(memResults);
   finally
+    FChanged := True;
+    DoAutoSave(0);
     timAutoSave.Enabled := True;
   end;
@@ -2985,4 +3006,5 @@
   SigAction: integer;
   SavedDocID, SavedCsltID: string;
+  ARefDate: TFMDateTime;
 begin
   inherited;
@@ -3017,7 +3039,11 @@
     end;
 
-  if not LockConsultRequestAndNote(lstNotes.ItemIEN) then Exit;
-  Exclusions := GetCurrentSigners(lstNotes.ItemIEN);
-  SelectAdditionalSigners(Font.Size, lstNotes.ItemIEN, SigAction, Exclusions, SignerList, CT_CONSULTS);
+  with lstNotes do
+    begin
+      if not LockConsultRequestAndNote(ItemIEN) then Exit;
+      Exclusions := GetCurrentSigners(ItemIEN);
+      ARefDate := StrToFloat(Piece(Items[ItemIndex], U, 3));
+      SelectAdditionalSigners(Font.Size, ItemIEN, SigAction, Exclusions, SignerList, CT_CONSULTS, ARefDate);
+    end;
   with SignerList do
     begin
@@ -3556,5 +3582,5 @@
     begin
       if Title > 0 then CurTitle := Title else CurTitle := DocType;
-      if AskCosignerForTitle(CurTitle, Author) and (Cosigner <= 0) then Result := True;
+      if AskCosignerForTitle(CurTitle, Author, DateTime) and (Cosigner <= 0) then Result := True;
     end;
   end;
@@ -3572,5 +3598,5 @@
           ErrMsg := TX_NO_AUTHOR;
         end;
-      if AskCosignerForTitle(Title, Author) and (Cosigner = 0) then
+      if AskCosignerForTitle(Title, Author, DateTime) and (Cosigner = 0) then
         begin
           Result := True;
@@ -3665,5 +3691,5 @@
 end;
 
-procedure TfrmConsults.DoAutoSave;
+procedure TfrmConsults.DoAutoSave(Suppress: integer = 1);
 var
   ErrMsg: string;
@@ -3672,8 +3698,8 @@
   begin
     StatusText('Autosaving note...');
-    //PutTextOnly(ErrMsg, memNewNote.Lines, lstNotes.GetIEN(EditingIndex));
+    //PutTextOnly(ErrMsg, memResults.Lines, lstNotes.GetIEN(EditingIndex));
     timAutoSave.Enabled := False;
     try
-      SetText(ErrMsg, memResults.Lines, lstNotes.GetIEN(EditingIndex),1);
+      SetText(ErrMsg, memResults.Lines, lstNotes.GetIEN(EditingIndex), Suppress);
     finally
       timAutoSave.Enabled := True;
@@ -4682,6 +4708,11 @@
         (Screen.ActiveControl = txtSubject) or
         (Screen.ActiveControl = memResults) then
-      //frmFrame.pnlPatient.SetFocus  //COMMENTED OUT FOR CQ6498
-      memResults.SetFocus //ADDED THIS LINE FOR CQ6498
+      begin
+        //frmFrame.pnlPatient.SetFocus  //COMMENTED OUT FOR CQ6498
+        if memResults.CanFocus then
+          memResults.SetFocus //ADDED THIS LINE FOR CQ6498
+        else
+          memConsult.SetFocus;
+      end
     else
     if (Screen.ActiveControl = tvConsults) then
@@ -4729,5 +4760,6 @@
   {Below is a fix for ClearQuest Defect HDS0000948, Kind of Kloogy I looked
   and looked for side effects and a better solution and this was the best!}
-  frmDrawers.Hide;
+  if (EditingIndex = -1) or (lstNotes.ItemIndex <> EditingIndex) then
+    frmDrawers.Hide;
   {This TStaticText I am looking for doesn't have a Name! So
    I have to loop through the panel's controls and disable the TStaticText.}
@@ -4768,4 +4800,24 @@
 end;
 
+procedure TfrmConsults.ViewInfo(Sender: TObject);
+begin
+  inherited;
+  frmFrame.ViewInfo(Sender);
+end;
+
+procedure TfrmConsults.mnuViewInformationClick(Sender: TObject);
+begin
+  inherited;
+  mnuViewDemo.Enabled := frmFrame.pnlPatient.Enabled;
+  mnuViewVisits.Enabled := frmFrame.pnlVisit.Enabled;
+  mnuViewPrimaryCare.Enabled := frmFrame.pnlPrimaryCare.Enabled;
+  mnuViewMyHealtheVet.Enabled := not (Copy(frmFrame.laMHV.Hint, 1, 2) = 'No');
+  mnuInsurance.Enabled := not (Copy(frmFrame.laVAA2.Hint, 1, 2) = 'No');
+  mnuViewFlags.Enabled := frmFrame.lblFlag.Enabled;
+  mnuViewRemoteData.Enabled := frmFrame.lblCirn.Enabled;
+  mnuViewReminders.Enabled := frmFrame.pnlReminders.Enabled;
+  mnuViewPostings.Enabled := frmFrame.pnlPostings.Enabled;
+end;
+
 initialization
   uPCEEdit := TPCEData.Create;
Index: cprs/branches/foia-cprs/CPRS-Chart/Consults/fEditConsult.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Consults/fEditConsult.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Consults/fEditConsult.dfm	(revision 460)
@@ -1,6 +1,6 @@
 object frmEditCslt: TfrmEditCslt
   Tag = 110
-  Left = 119
-  Top = 94
+  Left = 409
+  Top = 225
   Width = 569
   Height = 367
@@ -174,4 +174,5 @@
     SynonymChars = '<>'
     TabOrder = 0
+    CharsNeedMatch = 1
   end
   object cboUrgency: TORComboBox
@@ -197,4 +198,5 @@
     TabOrder = 1
     OnChange = ControlChange
+    CharsNeedMatch = 1
   end
   object radInpatient: TRadioButton
@@ -239,4 +241,5 @@
     TabOrder = 7
     OnChange = ControlChange
+    CharsNeedMatch = 1
   end
   object txtProvDiag: TCaptionEdit
@@ -246,4 +249,5 @@
     Height = 21
     Anchors = [akLeft, akTop, akRight]
+    MaxLength = 180
     ParentShowHint = False
     PopupMenu = mnuPopProvDx
@@ -277,4 +281,5 @@
     OnChange = ControlChange
     OnNeedData = txtAttnNeedData
+    CharsNeedMatch = 1
   end
   object cboCategory: TORComboBox
@@ -298,4 +303,5 @@
     TabOrder = 14
     Visible = False
+    CharsNeedMatch = 1
   end
   object cmdAccept: TButton
Index: cprs/branches/foia-cprs/CPRS-Chart/Consults/fEditProc.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Consults/fEditProc.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Consults/fEditProc.dfm	(revision 460)
@@ -18,6 +18,6 @@
   Position = poScreenCenter
   DesignSize = (
-    545
-    289)
+    561
+    308)
   PixelsPerInch = 96
   TextHeight = 13
@@ -166,4 +166,5 @@
     TabOrder = 2
     OnChange = ControlChange
+    CharsNeedMatch = 1
   end
   object radInpatient: TRadioButton
@@ -208,4 +209,5 @@
     TabOrder = 6
     OnChange = ControlChange
+    CharsNeedMatch = 1
   end
   object txtProvDiag: TCaptionEdit
@@ -215,4 +217,5 @@
     Height = 21
     Anchors = [akLeft, akTop, akRight]
+    MaxLength = 180
     ParentShowHint = False
     PopupMenu = mnuPopProvDx
@@ -246,4 +249,5 @@
     OnChange = ControlChange
     OnNeedData = txtAttnNeedData
+    CharsNeedMatch = 1
   end
   object cboProc: TORComboBox
@@ -277,4 +281,5 @@
     OnChange = cboProcSelect
     OnNeedData = cboProcNeedData
+    CharsNeedMatch = 1
   end
   object cboCategory: TORComboBox
@@ -299,4 +304,5 @@
     Visible = False
     OnChange = ControlChange
+    CharsNeedMatch = 1
   end
   object cboService: TORComboBox
@@ -329,4 +335,5 @@
     TabOrder = 1
     OnChange = ControlChange
+    CharsNeedMatch = 1
   end
   object memComment: TRichEdit
Index: cprs/branches/foia-cprs/CPRS-Chart/Consults/fODConsult.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Consults/fODConsult.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Consults/fODConsult.dfm	(revision 460)
@@ -1,14 +1,13 @@
 inherited frmODCslt: TfrmODCslt
   Tag = 110
-  Left = 377
-  Top = 11
-  Width = 536
-  Height = 321
-  HorzScrollBar.Range = 528
-  HorzScrollBar.Visible = True
-  VertScrollBar.Range = 294
-  VertScrollBar.Visible = True
-  AutoScroll = False
+  Left = 430
+  Top = 203
+  Width = 606
+  Height = 376
+  HorzScrollBar.Range = 590
+  VertScrollBar.Range = 340
   Caption = 'Order a Consult'
+  Constraints.MinHeight = 376
+  Constraints.MinWidth = 606
   Font.Charset = ANSI_CHARSET
   PixelsPerInch = 96
@@ -23,8 +22,8 @@
   object pnlReason: TPanel [1]
     Left = 3
-    Top = 117
-    Width = 516
-    Height = 132
-    Anchors = [akLeft, akTop, akRight, akBottom]
+    Top = 154
+    Width = 585
+    Height = 135
+    Anchors = [akLeft, akTop, akRight]
     BevelOuter = bvNone
     TabOrder = 11
@@ -32,5 +31,5 @@
       Left = 0
       Top = 0
-      Width = 516
+      Width = 585
       Height = 13
       Align = alTop
@@ -40,6 +39,6 @@
       Left = 0
       Top = 13
-      Width = 516
-      Height = 119
+      Width = 585
+      Height = 122
       Align = alClient
       Font.Charset = ANSI_CHARSET
@@ -48,4 +47,5 @@
       Font.Name = 'Courier New'
       Font.Style = []
+      Constraints.MinHeight = 40
       ParentFont = False
       PopupMenu = popReason
@@ -61,5 +61,5 @@
   end
   object lblUrgency: TStaticText [2]
-    Left = 239
+    Left = 309
     Top = 2
     Width = 44
@@ -70,5 +70,5 @@
   end
   object lblPlace: TStaticText [3]
-    Left = 384
+    Left = 454
     Top = 43
     Width = 104
@@ -79,5 +79,5 @@
   end
   object lblAttn: TStaticText [4]
-    Left = 384
+    Left = 454
     Top = 2
     Width = 46
@@ -88,5 +88,5 @@
   end
   object lblProvDiag: TStaticText [5]
-    Left = 239
+    Left = 309
     Top = 81
     Width = 104
@@ -98,8 +98,7 @@
   inherited memOrder: TCaptionMemo
     Left = 3
-    Top = 255
-    Width = 347
-    Height = 36
-    Anchors = [akLeft, akRight, akBottom]
+    Top = 305
+    Width = 417
+    Height = 41
     Lines.Strings = (
       'The order text...'
@@ -110,24 +109,22 @@
   end
   inherited cmdAccept: TButton
-    Left = 357
-    Top = 265
-    Anchors = [akRight, akBottom]
+    Left = 427
+    Top = 315
     TabOrder = 12
   end
   inherited cmdQuit: TButton
-    Left = 453
-    Top = 265
+    Left = 531
+    Top = 315
     Width = 61
-    Anchors = [akRight, akBottom]
     TabOrder = 13
   end
   inherited pnlMessage: TPanel
-    Left = 61
-    Top = 245
-    Width = 277
+    Left = 13
+    Top = 295
+    Width = 377
     Anchors = [akLeft, akRight, akBottom]
     TabOrder = 14
     inherited memMessage: TRichEdit
-      Width = 227
+      Width = 292
     end
   end
@@ -135,6 +132,6 @@
     Left = 0
     Top = 16
-    Width = 204
-    Height = 73
+    Width = 274
+    Height = 113
     Anchors = [akLeft, akTop, akRight]
     Style = orcsSimple
@@ -156,4 +153,5 @@
     OnChange = ControlChange
     OnClick = cboServiceSelect
+    OnExit = cboServiceExit
     OnKeyDown = cboServiceKeyDown
     OnKeyUp = cboServiceKeyUp
@@ -161,5 +159,5 @@
   end
   object cboUrgency: TORComboBox
-    Left = 239
+    Left = 309
     Top = 16
     Width = 133
@@ -187,5 +185,5 @@
   end
   object cboPlace: TORComboBox
-    Left = 384
+    Left = 454
     Top = 56
     Width = 136
@@ -212,9 +210,10 @@
   end
   object txtProvDiag: TCaptionEdit
-    Left = 239
+    Left = 309
     Top = 94
     Width = 231
     Height = 21
     Anchors = [akTop, akRight]
+    MaxLength = 180
     ParentShowHint = False
     PopupMenu = mnuPopProvDx
@@ -225,5 +224,5 @@
   end
   object txtAttn: TORComboBox
-    Left = 384
+    Left = 454
     Top = 16
     Width = 136
@@ -252,7 +251,7 @@
   object treService: TORTreeView
     Left = 0
-    Top = 37
-    Width = 228
-    Height = 201
+    Top = 38
+    Width = 298
+    Height = 220
     Anchors = [akLeft, akTop, akRight, akBottom]
     Font.Charset = DEFAULT_CHARSET
@@ -299,12 +298,19 @@
   end
   object pnlServiceTreeButton: TKeyClickPanel
-    Left = 204
+    Left = 274
     Top = 14
-    Width = 25
-    Height = 24
+    Width = 26
+    Height = 26
     Hint = 'View services/specialties hierarchically'
     Anchors = [akTop, akRight]
     BevelOuter = bvNone
+    BevelWidth = 2
     Caption = 'View services/specialties hierarchically'
+    Font.Charset = ANSI_CHARSET
+    Font.Color = clBtnFace
+    Font.Height = -11
+    Font.Name = 'MS Sans Serif'
+    Font.Style = []
+    ParentFont = False
     TabOrder = 2
     TabStop = True
@@ -313,7 +319,7 @@
     OnExit = pnlServiceTreeButtonExit
     object btnServiceTree: TSpeedButton
-      Left = 1
-      Top = 1
-      Width = 23
+      Left = 2
+      Top = 2
+      Width = 22
       Height = 22
       Glyph.Data = {
@@ -360,12 +366,13 @@
         FFFFFFFFFFFFFFFFFFFF00FB00FF0404040404FFFFFFFFFFFFFF070007FFFFFF
         FFFFFFFFFFFFFFFFFFFF}
+      Margin = 0
       OnClick = btnServiceTreeClick
     end
   end
   object cmdLexSearch: TButton
-    Left = 473
-    Top = 96
+    Left = 543
+    Top = 94
     Width = 49
-    Height = 17
+    Height = 21
     Anchors = [akTop, akRight]
     Caption = 'Lexicon'
@@ -374,5 +381,5 @@
   end
   object gbInptOpt: TGroupBox
-    Left = 239
+    Left = 309
     Top = 35
     Width = 140
@@ -401,7 +408,7 @@
   end
   object btnDiagnosis: TButton
-    Left = 473
+    Left = 543
     Top = 95
-    Width = 52
+    Width = 49
     Height = 20
     Anchors = [akTop, akRight]
@@ -421,5 +428,5 @@
     OnPopup = popReasonPopup
     Left = 411
-    Top = 169
+    Top = 188
     object popReasonCut: TMenuItem
       Caption = 'Cu&t'
Index: cprs/branches/foia-cprs/CPRS-Chart/Consults/fODConsult.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Consults/fODConsult.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Consults/fODConsult.pas	(revision 460)
@@ -85,4 +85,5 @@
     procedure btnDiagnosisClick(Sender: TObject);
     procedure cmdQuitClick(Sender: TObject);
+    procedure FormClose(Sender: TObject; var Action: TCloseAction);
 
   private
@@ -97,5 +98,5 @@
     procedure SetupReasonForRequest(OrderAction: integer);
     procedure GetProvDxandValidateCode(AResponses: TResponses);
-    function  ShowPrerequisites: boolean;
+    function ShowPrerequisites: boolean;
     procedure DoSetFontSize(FontSize: integer);
     procedure SetUpQuickOrderDX;
@@ -106,4 +107,5 @@
     procedure Validate(var AnErrMsg: string); override;
     function DefaultReasonForRequest(Service: string; Resolve: Boolean): TStrings;
+    
   public
     procedure SetupDialog(OrderAction: Integer; const ID: string); override;
@@ -123,5 +125,5 @@
 uses
     rODBase, rConsults, uCore, uConsults, rCore, fConsults, fPCELex, rPCE, fPreReq,
-    ORClasses, clipbrd, uTemplates;
+    ORClasses, clipbrd, uTemplates, fFrame, uODBase;
 
 var
@@ -131,5 +133,5 @@
   BADxUpdated: boolean;
   quickCode: string;
-  
+
 
 
@@ -153,4 +155,5 @@
 procedure TfrmODCslt.FormCreate(Sender: TObject);
 begin
+  frmFrame.pnlVisit.Enabled := false;
   AutoSizeDisabled := True;
   inherited;
@@ -223,5 +226,7 @@
   cboService.Enabled := True;
   cboService.Font.Color := clWindowText;
+  cboService.Height := 25 + (7 * cboService.ItemHeight);
   btnServiceTree.Enabled := True;
+  pnlServiceTreeButton.Enabled := True;
   ActiveControl := cboService;
   SetProvDiagPromptingMode;
@@ -271,4 +276,5 @@
       cboService.Font.Color := clGrayText;
       btnServiceTree.Enabled := False;
+      pnlServiceTreeButton.Enabled := False;
       if (OrderAction in [ORDER_COPY, ORDER_QUICK]) and (not ShowPrerequisites) then
         begin
@@ -286,5 +292,4 @@
     begin
       if QuickList.Count > 0 then BuildQuickTree(QuickList, '0', nil) ;
-      //SvcList.Assign(LoadServiceList(CN_SVC_LIST_ORD))   ;
       SvcList.Assign(LoadServiceListWithSynonyms(CN_SVC_LIST_ORD));           {RV}
       AList.Assign(SvcList);
@@ -512,4 +517,5 @@
         cboService.Font.Color := clGrayText;
         btnServiceTree.Enabled := False;
+        pnlServiceTreeButton.Enabled := False;
         Changing := False;
       end;
@@ -645,8 +651,6 @@
  begin
  inherited;
-
- //if NOT BILLING_AWARE then
-    if treService.Selected <> nil then
-       LastNode := treService.Selected.AbsoluteIndex;
+ if treService.Selected <> nil then
+    LastNode := treService.Selected.AbsoluteIndex;
 
  if  BILLING_AWARE and CIDCOkToSave  then
@@ -657,5 +661,4 @@
        begin
           uBACore.CompleteConsultOrderRec(uBAGlobals.BAOrderID,UBAGlobals.BAConsultDxList);
-       //   if ProvDx.Reqd = 'R' then UBAGlobals.BAConsultOrdersRequireDx.Add(uBAGlobals.BAOrderID); //allow special handling of non cidc consults that require dx .
           uBAGlobals.BAConsultDxList.Clear;
        end;
@@ -743,4 +746,5 @@
           Font.Color := clGrayText;
           btnServiceTree.Enabled := False;
+          pnlServiceTreeButton.Enabled := False;
           Changing := False;
           with Responses do if QuickOrder > 0 then
@@ -945,5 +949,8 @@
   with ProvDx do if (Reqd = '') or (PromptMode = '') then Exit;
   if ProvDx.Reqd = 'R' then
-    lblProvDiag.Caption := TX_PROVDX_REQD
+  begin
+    lblProvDiag.Caption := TX_PROVDX_REQD;
+    if (BILLING_AWARE)  and (ProvDx.PromptMode[1] = '') then btnDiagnosis.Enabled := True;
+  end
   else
     lblProvDiag.Caption := TX_PROVDX_OPT;
@@ -1066,6 +1073,5 @@
                   Result := False;
                   AbortOrder := True;
-                  //cmdQuitClick(Self);
-                end
+               end
               else Result := True;
             end;
@@ -1076,7 +1082,4 @@
 end;
 
-////////// NOTE THIS FUNCTION IS NO LONGER ASSIGNED TO OnExit EVENT
-///////// Calling this with enter making a selection had serious errors
-///////// No ill effect can be seen for not calling it.
 procedure TfrmODCslt.cboServiceExit(Sender: TObject);
 begin
@@ -1086,5 +1089,7 @@
   if cboService.ItemID = FLastServiceID then Exit;
   cboServiceSelect(cboService);
-  cboService.SetFocus;
+  // CQ #7490, following line commented out v26.24 (RV)
+  // CQ #9610 and 10074 - uncommented and "if" added v26.54 (RV)
+  if cboService.Enabled then cboService.SetFocus;
   PostMessage(Handle, WM_NEXTDLGCTL, 0, 0);
 end;
@@ -1141,6 +1146,8 @@
   TmpSL: TStringList;
   DocInfo: string;
-
-begin
+  x: string;
+  HasObjects: boolean;
+begin
+  Resolve := FALSE ;  // override value passed in - resolve on client - PSI-05-093
   DocInfo := '';
   TmpSL := TStringList.Create;
@@ -1148,5 +1155,10 @@
     Result := GetDefaultReasonForRequest(Service + CSLT_PTR, Resolve);
     TmpSL.Assign(Result);
+    x := TmpSL.Text;
+    ExpandOrderObjects(x, HasObjects);
+    TmpSL.Text := x;
+    Responses.OrderContainsObjects := HasObjects;
     ExecuteTemplateOrBoilerPlate(TmpSL, cboService.ItemIEN , ltConsult, nil, 'Reason for Request: ' + cboService.DisplayText[cboService.ItemIndex], DocInfo);
+    if TmpSL.Text <> x then Responses.OrderContainsObjects := False;
     Result.Assign(TmpSL);
   finally
@@ -1284,5 +1296,5 @@
   //Except when Enter or Space is pressed. VK_LBUTTON activates OnClick in TORComboBoxes
   FcboServiceKeyDownStopClick := false;
-  if (Key <> VK_RETURN) and (Key <> VK_SPACE) and (Key <> VK_LBUTTON) then
+  if (Key <> VK_RETURN) {and (Key <> VK_SPACE)} and (Key <> VK_LBUTTON) then  //comment on this line is fix for CQ6789
     FcboServiceKeyDownStopClick := True
   else
@@ -1333,4 +1345,5 @@
      end;
   end;
+
   ProvDx.CodeInactive := False;
 end;
@@ -1387,4 +1400,10 @@
 end;
 
+procedure TfrmODCslt.FormClose(Sender: TObject; var Action: TCloseAction);
+begin
+  inherited;
+  frmFrame.pnlVisit.Enabled := true;
+end;
+
 end.
 
Index: cprs/branches/foia-cprs/CPRS-Chart/Consults/fODProc.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Consults/fODProc.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Consults/fODProc.dfm	(revision 460)
@@ -1,14 +1,13 @@
 inherited frmODProc: TfrmODProc
   Tag = 112
-  Left = 262
-  Top = 191
-  Width = 531
-  Height = 322
+  Left = 208
+  Top = 188
+  Width = 543
+  Height = 393
   HorzScrollBar.Range = 523
-  HorzScrollBar.Visible = True
   VertScrollBar.Range = 295
-  VertScrollBar.Visible = True
-  AutoScroll = False
   Caption = 'Order a Procedure'
+  Constraints.MinHeight = 393
+  Constraints.MinWidth = 543
   PixelsPerInch = 96
   TextHeight = 13
@@ -31,6 +30,13 @@
     WordWrap = False
   end
-  object lblUrgency: TStaticText [2]
-    Left = 237
+  object lblReason: TLabel [2]
+    Left = 4
+    Top = 103
+    Width = 95
+    Height = 13
+    Caption = 'Reason for Request'
+  end
+  object lblUrgency: TStaticText [3]
+    Left = 249
     Top = 4
     Width = 44
@@ -40,6 +46,6 @@
     TabOrder = 15
   end
-  object lblPlace: TStaticText [3]
-    Left = 384
+  object lblPlace: TStaticText [4]
+    Left = 396
     Top = 43
     Width = 104
@@ -49,6 +55,6 @@
     TabOrder = 16
   end
-  object lblAttn: TStaticText [4]
-    Left = 384
+  object lblAttn: TStaticText [5]
+    Left = 396
     Top = 4
     Width = 46
@@ -58,6 +64,6 @@
     TabOrder = 17
   end
-  object lblProvDiag: TStaticText [5]
-    Left = 237
+  object lblProvDiag: TStaticText [6]
+    Left = 249
     Top = 81
     Width = 104
@@ -67,28 +73,18 @@
     TabOrder = 18
   end
-  object pnlReason: TPanel [6]
+  object pnlReason: TPanel [7]
     Left = 0
-    Top = 99
-    Width = 521
-    Height = 154
+    Top = 120
+    Width = 528
+    Height = 192
     Anchors = [akLeft, akTop, akRight, akBottom]
     BevelOuter = bvNone
     TabOrder = 9
-    DesignSize = (
-      521
-      154)
-    object lblReason: TLabel
-      Left = 4
-      Top = 9
-      Width = 95
-      Height = 13
-      Caption = 'Reason for Request'
-    end
     object memReason: TCaptionRichEdit
       Left = 0
-      Top = 24
-      Width = 521
-      Height = 130
-      Anchors = [akLeft, akTop, akRight, akBottom]
+      Top = 0
+      Width = 528
+      Height = 192
+      Align = alClient
       Font.Charset = DEFAULT_CHARSET
       Font.Color = clWindowText
@@ -96,4 +92,5 @@
       Font.Name = 'Courier New'
       Font.Style = []
+      Constraints.MinHeight = 40
       ParentFont = False
       PopupMenu = popReason
@@ -110,9 +107,9 @@
   end
   inherited memOrder: TCaptionMemo
-    Left = 4
-    Top = 258
-    Width = 361
-    Height = 36
-    Anchors = [akLeft, akRight, akBottom]
+    Left = 0
+    Top = 321
+    Width = 380
+    Height = 41
+    Anchors = [akLeft, akRight]
     Lines.Strings = (
       'The order text...'
@@ -123,6 +120,6 @@
     TabOrder = 1
   end
-  object cboUrgency: TORComboBox [8]
-    Left = 237
+  object cboUrgency: TORComboBox [9]
+    Left = 249
     Top = 17
     Width = 133
@@ -148,6 +145,6 @@
     CharsNeedMatch = 1
   end
-  object cboPlace: TORComboBox [9]
-    Left = 384
+  object cboPlace: TORComboBox [10]
+    Left = 396
     Top = 56
     Width = 133
@@ -173,10 +170,172 @@
     CharsNeedMatch = 1
   end
-  object txtProvDiag: TCaptionEdit [10]
-    Left = 237
+  object txtAttn: TORComboBox [11]
+    Left = 396
+    Top = 17
+    Width = 133
+    Height = 21
+    Anchors = [akTop, akRight]
+    Style = orcsDropDown
+    AutoSelect = True
+    Caption = 'Attention'
+    Color = clWindow
+    DropDownCount = 8
+    ItemHeight = 13
+    ItemTipColor = clWindow
+    ItemTipEnable = True
+    ListItemsOnly = True
+    LongList = True
+    LookupPiece = 2
+    MaxLength = 0
+    Pieces = '2,3'
+    Sorted = False
+    SynonymChars = '<>'
+    TabOrder = 3
+    OnChange = ControlChange
+    OnNeedData = txtAttnNeedData
+    CharsNeedMatch = 1
+  end
+  object cboProc: TORComboBox [12]
+    Left = 4
+    Top = 17
+    Width = 227
+    Height = 21
+    Anchors = [akLeft, akTop, akRight]
+    Style = orcsDropDown
+    AutoSelect = True
+    Caption = 'Procedure'
+    Color = clWindow
+    DropDownCount = 8
+    ItemHeight = 13
+    ItemTipColor = clWindow
+    ItemTipEnable = True
+    ListItemsOnly = True
+    LongList = True
+    LookupPiece = 0
+    MaxLength = 0
+    Pieces = '2'
+    Sorted = False
+    SynonymChars = '<>'
+    TabOrder = 0
+    OnChange = cboProcSelect
+    OnNeedData = cboProcNeedData
+    CharsNeedMatch = 1
+  end
+  object cboCategory: TORComboBox [13]
+    Left = 516
+    Top = 10
+    Width = 3
+    Height = 21
+    Style = orcsDropDown
+    AutoSelect = True
+    Color = clWindow
+    DropDownCount = 8
+    ItemHeight = 13
+    ItemTipColor = clWindow
+    ItemTipEnable = True
+    ListItemsOnly = False
+    LongList = False
+    LookupPiece = 0
+    MaxLength = 0
+    Sorted = False
+    SynonymChars = '<>'
+    TabOrder = 13
+    Visible = False
+    OnChange = ControlChange
+    CharsNeedMatch = 1
+  end
+  object cboService: TORComboBox [14]
+    Left = 4
+    Top = 58
+    Width = 227
+    Height = 21
+    Anchors = [akLeft, akTop, akRight]
+    Style = orcsDropDown
+    AutoSelect = True
+    Caption = 'Service to perform this procedure'
+    Color = clWindow
+    DropDownCount = 8
+    Enabled = False
+    ItemHeight = 13
+    ItemTipColor = clWindow
+    ItemTipEnable = True
+    ListItemsOnly = False
+    LongList = False
+    LookupPiece = 0
+    MaxLength = 0
+    Pieces = '2'
+    Sorted = False
+    SynonymChars = '<>'
+    TabOrder = 4
+    OnChange = cboServiceChange
+    CharsNeedMatch = 1
+  end
+  inherited cmdAccept: TButton
+    Left = 387
+    Top = 339
+    Anchors = [akRight, akBottom]
+    TabOrder = 10
+  end
+  inherited cmdQuit: TButton
+    Left = 469
+    Top = 339
+    Width = 64
+    Anchors = [akRight, akBottom]
+    TabOrder = 11
+  end
+  inherited pnlMessage: TPanel
+    Left = 50
+    Top = 320
+    Width = 316
+    Anchors = [akLeft, akRight, akBottom]
+    TabOrder = 12
+    inherited memMessage: TRichEdit
+      Width = 254
+    end
+  end
+  object cmdLexSearch: TButton
+    Left = 486
+    Top = 93
+    Width = 49
+    Height = 21
+    Anchors = [akTop, akRight]
+    Caption = 'Lexicon'
+    TabOrder = 8
+    OnClick = cmdLexSearchClick
+  end
+  object gbInptOpt: TGroupBox
+    Left = 249
+    Top = 36
+    Width = 140
+    Height = 45
+    Anchors = [akTop, akRight]
+    Caption = 'Patient will be seen as an:'
+    TabOrder = 5
+    object radInpatient: TRadioButton
+      Left = 3
+      Top = 20
+      Width = 61
+      Height = 17
+      Caption = '&Inpatient'
+      TabOrder = 0
+      OnClick = radInpatientClick
+    end
+    object radOutpatient: TRadioButton
+      Left = 67
+      Top = 20
+      Width = 71
+      Height = 17
+      Caption = '&Outpatient'
+      TabOrder = 1
+      OnClick = radOutpatientClick
+    end
+  end
+  object txtProvDiag: TCaptionEdit
+    Left = 249
     Top = 93
     Width = 234
     Height = 21
     Anchors = [akTop, akRight]
+    MaxLength = 180
     ParentShowHint = False
     PopupMenu = mnuPopProvDx
@@ -185,170 +344,4 @@
     OnChange = txtProvDiagChange
     Caption = 'Provisional Diagnosis'
-  end
-  object txtAttn: TORComboBox [11]
-    Left = 384
-    Top = 17
-    Width = 133
-    Height = 21
-    Anchors = [akTop, akRight]
-    Style = orcsDropDown
-    AutoSelect = True
-    Caption = 'Attention'
-    Color = clWindow
-    DropDownCount = 8
-    ItemHeight = 13
-    ItemTipColor = clWindow
-    ItemTipEnable = True
-    ListItemsOnly = True
-    LongList = True
-    LookupPiece = 2
-    MaxLength = 0
-    Pieces = '2,3'
-    Sorted = False
-    SynonymChars = '<>'
-    TabOrder = 3
-    OnChange = ControlChange
-    OnNeedData = txtAttnNeedData
-    CharsNeedMatch = 1
-  end
-  object cboProc: TORComboBox [12]
-    Left = 4
-    Top = 17
-    Width = 215
-    Height = 21
-    Anchors = [akLeft, akTop, akRight]
-    Style = orcsDropDown
-    AutoSelect = True
-    Caption = 'Procedure'
-    Color = clWindow
-    DropDownCount = 8
-    ItemHeight = 13
-    ItemTipColor = clWindow
-    ItemTipEnable = True
-    ListItemsOnly = True
-    LongList = True
-    LookupPiece = 0
-    MaxLength = 0
-    Pieces = '2'
-    Sorted = False
-    SynonymChars = '<>'
-    TabOrder = 0
-    OnChange = cboProcSelect
-    OnNeedData = cboProcNeedData
-    CharsNeedMatch = 1
-  end
-  object cboCategory: TORComboBox [13]
-    Left = 516
-    Top = 10
-    Width = 3
-    Height = 21
-    Style = orcsDropDown
-    AutoSelect = True
-    Color = clWindow
-    DropDownCount = 8
-    ItemHeight = 13
-    ItemTipColor = clWindow
-    ItemTipEnable = True
-    ListItemsOnly = False
-    LongList = False
-    LookupPiece = 0
-    MaxLength = 0
-    Sorted = False
-    SynonymChars = '<>'
-    TabOrder = 13
-    Visible = False
-    OnChange = ControlChange
-    CharsNeedMatch = 1
-  end
-  object cboService: TORComboBox [14]
-    Left = 4
-    Top = 58
-    Width = 215
-    Height = 21
-    Anchors = [akLeft, akTop, akRight]
-    Style = orcsDropDown
-    AutoSelect = True
-    Caption = 'Service to perform this procedure'
-    Color = clWindow
-    DropDownCount = 8
-    Enabled = False
-    ItemHeight = 13
-    ItemTipColor = clWindow
-    ItemTipEnable = True
-    ListItemsOnly = False
-    LongList = False
-    LookupPiece = 0
-    MaxLength = 0
-    Pieces = '2'
-    Sorted = False
-    SynonymChars = '<>'
-    TabOrder = 4
-    OnChange = cboServiceChange
-    CharsNeedMatch = 1
-  end
-  inherited cmdAccept: TButton
-    Left = 369
-    Top = 268
-    Anchors = [akRight, akBottom]
-    TabOrder = 10
-  end
-  inherited cmdQuit: TButton
-    Left = 457
-    Top = 268
-    Width = 64
-    Anchors = [akRight, akBottom]
-    TabOrder = 11
-  end
-  inherited pnlMessage: TPanel
-    Left = 50
-    Top = 249
-    Width = 304
-    Anchors = [akLeft, akRight, akBottom]
-    TabOrder = 12
-    inherited memMessage: TRichEdit
-      Width = 254
-    end
-  end
-  object cmdLexSearch: TButton
-    Left = 474
-    Top = 93
-    Width = 49
-    Height = 21
-    Anchors = [akTop, akRight]
-    Caption = 'Lexicon'
-    TabOrder = 8
-    OnClick = cmdLexSearchClick
-  end
-  object gbInptOpt: TGroupBox
-    Left = 237
-    Top = 36
-    Width = 140
-    Height = 45
-    Anchors = [akTop, akRight]
-    Caption = 'Patient will be seen as an:'
-    TabOrder = 5
-    DesignSize = (
-      140
-      45)
-    object radInpatient: TRadioButton
-      Left = 3
-      Top = 20
-      Width = 61
-      Height = 17
-      Anchors = [akTop, akRight]
-      Caption = '&Inpatient'
-      TabOrder = 0
-      OnClick = radInpatientClick
-    end
-    object radOutpatient: TRadioButton
-      Left = 67
-      Top = 20
-      Width = 71
-      Height = 17
-      Anchors = [akTop, akRight]
-      Caption = '&Outpatient'
-      TabOrder = 1
-      OnClick = radOutpatientClick
-    end
   end
   object mnuPopProvDx: TPopupMenu
Index: cprs/branches/foia-cprs/CPRS-Chart/Consults/fODProc.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Consults/fODProc.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Consults/fODProc.pas	(revision 460)
@@ -12,5 +12,4 @@
     cboUrgency: TORComboBox;
     cboPlace: TORComboBox;
-    txtProvDiag: TCaptionEdit;
     txtAttn: TORComboBox;
     lblProc: TLabel;
@@ -34,8 +33,9 @@
     pnlReason: TPanel;
     memReason: TCaptionRichEdit;
-    lblReason: TLabel;
     gbInptOpt: TGroupBox;
     radInpatient: TRadioButton;
     radOutpatient: TRadioButton;
+    txtProvDiag: TCaptionEdit;
+    lblReason: TLabel;
     procedure FormCreate(Sender: TObject);
     procedure txtAttnNeedData(Sender: TObject; const StartFrom: String;
@@ -63,4 +63,6 @@
       Shift: TShiftState);
     procedure memReasonKeyPress(Sender: TObject; var Key: Char);
+    procedure FormResize(Sender: TObject);
+    procedure FormClose(Sender: TObject; var Action: TCloseAction);
   private
     FLastProcID: string;
@@ -88,5 +90,5 @@
 uses
     rODBase, rConsults, uCore, uConsults, rCore, fConsults, fPCELex, rPCE, ORClasses,
-    clipbrd, fPreReq, uTemplates, uAccessibleRichEdit;
+    clipbrd, fPreReq, uTemplates, uAccessibleRichEdit, fFrame, uODBase;
 
 var
@@ -109,4 +111,5 @@
 procedure TfrmODProc.FormCreate(Sender: TObject);
 begin
+  frmFrame.pnlVisit.Enabled := false;
   AutoSizeDisabled := True;
   inherited;
@@ -709,5 +712,8 @@
   TmpSL: TStringList;
   DocInfo: string;
-begin
+  x: string;
+  HasObjects: boolean;
+begin
+  Resolve := FALSE ;  // override value passed in - resolve on client - PSI-05-093
   DocInfo := '';
   TmpSL := TStringList.Create;
@@ -715,6 +721,11 @@
     Result := GetDefaultReasonForRequest(Piece(cboProc.Items[cboProc.ItemIndex], U, 4), Resolve);
     TmpSL.Assign(Result);
+    x := TmpSL.Text;
+    ExpandOrderObjects(x, HasObjects);
+    TmpSL.Text := x;
+    Responses.OrderContainsObjects := HasObjects;
     ExecuteTemplateOrBoilerPlate(TmpSL, StrToIntDef(piece(piece(cboProc.Items[cboProc.ItemIndex],U,4),';',1),0),
                    ltProcedure, nil, 'Reason for Request: ' + cboProc.DisplayText[cboProc.ItemIndex], DocInfo);
+    if TmpSL.Text <> x then Responses.OrderContainsObjects := False;
     Result.Assign(TmpSL);
   finally
@@ -805,4 +816,17 @@
 end;
 
+procedure TfrmODProc.FormResize(Sender: TObject);
+begin
+  inherited;
+  memOrder.Top := PnlReason.Top + PnlReason.Height + 5;
+
+end;
+
+procedure TfrmODProc.FormClose(Sender: TObject; var Action: TCloseAction);
+begin
+  inherited;
+  frmFrame.pnlVisit.Enabled := true;
+end;
+
 end.
 
Index: cprs/branches/foia-cprs/CPRS-Chart/Consults/fPreReq.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Consults/fPreReq.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Consults/fPreReq.dfm	(revision 460)
@@ -12,5 +12,4 @@
   Font.Name = 'MS Sans Serif'
   Font.Style = []
-  FormStyle = fsStayOnTop
   OldCreateOrder = True
   Position = poScreenCenter
Index: cprs/branches/foia-cprs/CPRS-Chart/Consults/rConsults.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Consults/rConsults.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Consults/rConsults.pas	(revision 460)
@@ -4,4 +4,11 @@
 
 uses SysUtils, Classes, ORNet, ORFn, rCore, uCore, TRPCB, dialogs, uConsults, rTIU, uTIU;
+
+type
+
+  TUnresolvedConsults = record
+    UnresolvedConsultsExist: boolean;
+    ShowNagScreen: boolean;
+  end;
 
 {Consult Titles }
@@ -32,4 +39,5 @@
 function GetFormattedSF513(AConsult: Integer; ChartCopy: string): TStrings;
 function UnresolvedConsultsExist: boolean;
+procedure GetUnresolvedConsultsInfo;
 
 {list box fillers}
@@ -97,4 +105,5 @@
   uClinProcClass: integer;
   uClinProcTitles: TClinProcTitles;
+  uUnresolvedConsults: TUnresolvedConsults;
 
 implementation
@@ -602,4 +611,16 @@
 end;
 
+procedure GetUnresolvedConsultsInfo;
+var
+  x: string;
+begin
+  x := sCallV('ORQQCN UNRESOLVED', [Patient.DFN]);
+  with uUnresolvedConsults do
+  begin
+    UnresolvedConsultsExist := (Piece(x, U, 1) = '1');
+    ShowNagScreen := (Piece(x, U, 2) = '1');
+  end;
+end;
+
 function ConsultMessage(AnIEN: Integer): string;
 begin
Index: cprs/branches/foia-cprs/CPRS-Chart/Encounter/fDiagnoses.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Encounter/fDiagnoses.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Encounter/fDiagnoses.dfm	(revision 460)
@@ -1,5 +1,5 @@
 inherited frmDiagnoses: TfrmDiagnoses
-  Left = 306
-  Top = 183
+  Left = 304
+  Top = 169
   Caption = 'Encounter Diagnoses'
   PixelsPerInch = 96
@@ -76,7 +76,5 @@
       inherited lbSection: TORListBox
         Tag = 20
-        Style = lbOwnerDrawFixed
         TabOrder = 0
-        OnDrawItem = lbSectionDrawItem
       end
       inherited btnOther: TButton
Index: cprs/branches/foia-cprs/CPRS-Chart/Encounter/fDiagnoses.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Encounter/fDiagnoses.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Encounter/fDiagnoses.pas	(revision 460)
@@ -218,10 +218,8 @@
 var
   i: integer;
-  dxString: string;
   dxCode, dxName: string;
   ADiagnosis: TPCEItem;
 begin
    inherited;
-  ADiagnosis := TPCEItem.Create;
   UBAGlobals.BAPCEDiagList.Clear;
   with lbGrid do for i := 0 to Items.Count - 1 do
Index: cprs/branches/foia-cprs/CPRS-Chart/Encounter/fEncVitals.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Encounter/fEncVitals.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Encounter/fEncVitals.dfm	(revision 460)
@@ -1,5 +1,5 @@
 inherited frmEncVitals: TfrmEncVitals
-  Left = 400
-  Top = 227
+  Left = 353
+  Top = 210
   Caption = 'Vitals'
   KeyPreview = True
@@ -8,16 +8,42 @@
   OnKeyDown = FormKeyDown
   OnResize = FormResize
-  OnShow = FormShow
   PixelsPerInch = 96
   TextHeight = 13
+  object lvVitals: TCaptionListView [0]
+    Left = 0
+    Top = 0
+    Width = 624
+    Height = 368
+    Hint = 'To sort, click on column headers|'
+    Align = alClient
+    Columns = <>
+    Constraints.MinHeight = 50
+    HideSelection = False
+    MultiSelect = True
+    ReadOnly = True
+    RowSelect = True
+    ParentShowHint = False
+    ShowHint = True
+    TabOrder = 1
+    ViewStyle = vsReport
+  end
+  object pnlBottom: TPanel [1]
+    Left = 0
+    Top = 368
+    Width = 624
+    Height = 32
+    Align = alBottom
+    BevelOuter = bvNone
+    TabOrder = 5
+  end
   inherited btnOK: TBitBtn
     Left = 444
     Top = 377
-    TabOrder = 1
+    TabOrder = 3
   end
   inherited btnCancel: TBitBtn
     Left = 524
     Top = 377
-    TabOrder = 2
+    TabOrder = 4
   end
   object pnlmain: TPanel
@@ -27,4 +53,5 @@
     Height = 217
     TabOrder = 0
+    Visible = False
     object lblVitPointer: TOROffsetLabel
       Left = 506
@@ -383,4 +410,5 @@
       ListItemsOnly = True
       LongList = False
+      LookupPiece = 0
       MaxLength = 0
       Pieces = '1,2'
@@ -390,4 +418,5 @@
       TabStop = True
       OnEnter = SetVitPointer
+      CharsNeedMatch = 1
     end
     object txtMeasPulse: TCaptionEdit
@@ -414,3 +443,12 @@
     end
   end
+  object btnEnterVitals: TButton
+    Left = 8
+    Top = 377
+    Width = 75
+    Height = 21
+    Caption = 'Enter Vitals'
+    TabOrder = 2
+    OnClick = btnEnterVitalsClick
+  end
 end
Index: cprs/branches/foia-cprs/CPRS-Chart/Encounter/fEncVitals.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Encounter/fEncVitals.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Encounter/fEncVitals.pas	(revision 460)
@@ -6,5 +6,20 @@
   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
   fPCEBase, ORDtTm, StdCtrls, ORCtrls, ExtCtrls, Buttons, fAutoSz, ORFn,
-  rvitals, ComCtrls;
+  rvitals, ComCtrls, ORNet, uVitals
+  , TRPCB // Vitals Lite 2004-05-21 ===========================================
+  ;
+{== Vitals Lite 2004-05-21 ===================================================}
+type
+  TGMV_GetInputPanel = function(
+    var anApp: TApplication;
+    aB: TRPCBroker;
+    aP,         // Patient DFN
+    aL,         // Hospitals IEN
+    aSig,       // Application signature
+    aTemplate   // Vitals Input template
+        : String;
+    aNow        // Input Date/Time
+        :TDateTime):TCustomForm;
+{== Vitals Lite 2004-05-21 ===================================================}
 
 type
@@ -47,4 +62,7 @@
     txtMeasPulse: TCaptionEdit;
     txtMeasHt: TCaptionEdit;
+    pnlBottom: TPanel;
+    btnEnterVitals: TButton;
+    lvVitals: TCaptionListView;
     procedure SetVitPointer(Sender: TObject);
     procedure txtMeasBPExit(Sender: TObject);
@@ -71,4 +89,5 @@
     procedure FormKeyDown(Sender: TObject; var Key: Word;
       Shift: TShiftState);
+    procedure btnEnterVitalsClick(Sender: TObject); //vitals lite
   private
     FDataLoaded: boolean;
@@ -82,4 +101,6 @@
     procedure ChangeFocus(Control: TWinControl);
     procedure ClearData;
+    procedure LoadVitalView(VitalsList : TStringList); //Vitals Lite
+    procedure LoadVitalsList;
   public
     function OK2SaveVitals: boolean;
@@ -97,5 +118,7 @@
 
 uses UCore, rCore, rPCE, fPCELex, fPCEOther, fVitals,fVisit, fFrame, fEncnt,
-  uVitals, fEncounterFrame;
+     fEncounterFrame, uInit
+  //   , fGMV_InputTemp // Vitals Lite 2004-05-21
+     ;
 
 const
@@ -373,7 +396,8 @@
 end;
 
+
 procedure TfrmEncVitals.FormCreate(Sender: TObject);
-
-begin
+begin
+
   inherited;
   FTabName := CT_VitNm;
@@ -389,8 +413,12 @@
 
 begin
-  inherited;
   //uVisitType.Free;
   uVitalOld.Free;
   uVitalNew.free;
+
+{== Vitals Lite 2004-05-21 ===================================================}
+  FreeLibrary(VitalsDLLHandle);
+{== Vitals Lite 2004-05-21 ===================================================}
+  inherited;
 end;
 
@@ -412,6 +440,18 @@
 
 procedure TfrmEncVitals.FormShow(Sender: TObject);
-begin
-  inherited;
+var
+  GMV_LibName: String;
+begin
+  inherited;
+  //Begin Vitals Lite
+  {Visit is Assumed to Be selected when Opening Encounter Dialog}
+  GMV_LibName :='GMV_VitalsViewEnter.dll';
+  GMV_LibName := GetProgramFilesPath + SHARE_DIR + GMV_LibName;
+  VitalsDLLHandle := LoadLibrary(PChar(GMV_LibName));
+  if VitalsDLLHandle = 0 then // No Handle found
+    MessageDLG('Can''t find library "'+GMV_LibName+'".',mtError,[mbok],0)
+  else
+    LoadVitalsList;
+  //End Vitals Lite
 //  frmEncVitals.caption := 'Vital entry for - '+ patient.name; {RAB 6/15/98}
   FormActivate(Sender);
@@ -540,3 +580,87 @@
 end;
 
+//Begin Vitals Lite
+procedure TfrmEncVitals.LoadVitalView(VitalsList: TStringList);
+var
+  i : integer;
+  curCol : TListColumn;
+  curItem : TListItem;
+  HeadingList,tmpList : TStringList;
+begin
+  HeadingList := TStringList.Create;
+  tmpList := TStringList.Create;
+  lvVitals.ShowColumnHeaders := false;                //CQ: 10069 - the column display becomes squished.
+  lvVitals.Items.Clear;
+  lvVitals.Columns.Clear;
+  PiecesToList(VitalsList[0],U,HeadingList);
+  for i := 0 to HeadingList.Count-1 do
+  begin
+    curCol := lvVitals.Columns.Add;
+    curCol.Caption := HeadingList[i];
+    curCol.AutoSize := true;
+  end;
+  for i := 1 to VitalsList.Count-1 do
+  begin
+    curItem := lvVitals.Items.Add;
+    PiecesToList(VitalsList[i],U,tmpList);
+    curItem.Caption := tmpList[0];
+    tmpList.Delete(0);
+    curItem.SubItems.Assign(tmpList);
+  end;
+  lvVitals.ShowColumnHeaders := true;                 //CQ: 10069 - the column display becomes squished.
+  HeadingList.Free;
+  tmpList.Free;
+end;
+
+procedure TfrmEncVitals.btnEnterVitalsClick(Sender: TObject);
+var
+  VLPtVitals : TGMV_VitalsEnterDLG;
+  GMV_FName : String;
+begin
+  inherited;
+  if VitalsDLLHandle = 0 then Exit;//The DLL was initialized on Create, but just in case....
+  GMV_FName := 'GMV_VitalsEnterDLG';
+  @VLPtVitals := GetProcAddress(VitalsDLLHandle,PChar(GMV_FName));
+  if assigned(VLPtVitals) then
+  begin
+    VLPtVitals(
+      RPCBrokerV,
+      Patient.DFN,
+      FloatToStr(uEncPCEData.Location),
+      GMV_DEFAULT_TEMPLATE,
+      GMV_APP_SIGNATURE,
+      FMDateTimeToDateTime(uEncPCEData.DateTime),
+      Patient.Name,
+      frmFrame.lblPtSSN.Caption + '    ' + frmFrame.lblPtAge.Caption
+    );
+  end
+  else
+    MessageDLG('Can not find function "'+GMV_FName+'".',mtError,[mbok],0);
+  @VLPtVitals := nil;
+  LoadVitalsList;
+end;
+
+procedure TfrmEncVitals.LoadVitalsList;
+var
+  VitalsList : TStringList;
+  VLPtVitals : TGMV_LatestVitalsList;
+  GMV_FName : String;
+begin
+  if VitalsDLLHandle = 0 then Exit;//The DLL was initialized on Create, but just in case....
+  GMV_FName := 'GMV_LatestVitalsList';
+  @VLPtVitals := GetProcAddress(VitalsDLLHandle,PChar(GMV_FName));
+  if assigned(VLPtVitals) then
+  begin
+    frmFrame.VitalsDLLActive := True;  // need this flag for CCOW (RV)
+    VitalsList := VLPtVitals(RPCBrokerV,Patient.DFN,U,false);
+    if assigned(VitalsList) then
+      LoadVitalView(VitalsList);
+  end
+  else
+    MessageDLG('Can''t find function "'+GMV_FName+'".',mtError,[mbok],0);
+  @VLPtVitals := nil;
+  frmFrame.VitalsDLLActive := False;  // need this flag for CCOW (RV)
+end;
+//End Vitals Lite
+
 end.
Index: cprs/branches/foia-cprs/CPRS-Chart/Encounter/fEncounterFrame.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Encounter/fEncounterFrame.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Encounter/fEncounterFrame.dfm	(revision 460)
@@ -1,6 +1,6 @@
 object frmEncounterFrame: TfrmEncounterFrame
-  Left = 366
-  Top = 181
-  Width = 612
+  Left = 290
+  Top = 108
+  Width = 640
   Height = 451
   Caption = 'Encounter Frame'
@@ -16,4 +16,5 @@
   Position = poScreenCenter
   OnCanResize = FormCanResize
+  OnClose = FormClose
   OnCloseQuery = FormCloseQuery
   OnCreate = FormCreate
@@ -26,5 +27,5 @@
     Left = 0
     Top = 0
-    Width = 604
+    Width = 632
     Height = 2
     Align = alTop
@@ -32,6 +33,6 @@
   object StatusBar1: TStatusBar
     Left = 0
-    Top = 424
-    Width = 604
+    Top = 417
+    Width = 632
     Height = 0
     Panels = <>
@@ -41,6 +42,6 @@
     Left = 0
     Top = 24
-    Width = 604
-    Height = 400
+    Width = 632
+    Height = 393
     Align = alClient
     BevelOuter = bvNone
@@ -52,10 +53,9 @@
     ParentFont = False
     TabOrder = 1
-    TabStop = True
   end
   object TabControl: TTabControl
     Left = 0
     Top = 2
-    Width = 604
+    Width = 632
     Height = 22
     Align = alTop
Index: cprs/branches/foia-cprs/CPRS-Chart/Encounter/fEncounterFrame.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Encounter/fEncounterFrame.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Encounter/fEncounterFrame.pas	(revision 460)
@@ -75,4 +75,5 @@
     procedure FormKeyDown(Sender: TObject; var Key: Word;
       Shift: TShiftState);
+    procedure FormClose(Sender: TObject; var Action: TCloseAction);
     procedure FormCanResize(Sender: TObject; var NewWidth,
       NewHeight: Integer; var Resize: Boolean);
@@ -123,5 +124,5 @@
   uCore,
   fGAF, uConst,
-  rCore, fPCEProvider;
+  rCore, fPCEProvider, rMisc;
 
 {$R *.DFM}
@@ -397,4 +398,5 @@
     frmEncounterFrame.CreateChildForms(frmEncounterFrame, PCEData.Location);
     ResizeAnchoredFormToFont(frmEncounterFrame);
+    SetFormPosition(frmEncounterFrame);
 
     with frmEncounterFrame do
@@ -714,11 +716,11 @@
     if FormListContains(CT_ImmNm) then
       SetImmunizations(frmImmunizations.lbGrid.Items);
-    if FormListContains(CT_ImmNm) then
+    if FormListContains(CT_SkinNm) then
       SetSkinTests(frmSkinTests.lbGrid.Items);
     if FormListContains(CT_PedNm) then
       SetPatientEds(frmPatientEd.lbGrid.Items);
-    if FormListContains(CT_ImmNm) then
+    if FormListContains(CT_HlthNm) then
       SetHealthFactors(frmHealthFactors.lbGrid.Items);
-    if FormListContains(CT_ImmNm) then
+    if FormListContains(CT_XamNm) then
       SetExams(frmExams.lbGrid.Items);
   end;
@@ -817,5 +819,12 @@
 end;
 
-procedure TfrmEncounterFrame.FormCanResize(Sender: TObject; var NewWidth, NewHeight: Integer; var Resize: Boolean);
+procedure TfrmEncounterFrame.FormClose(Sender: TObject;
+  var Action: TCloseAction);
+begin
+  SaveUserBounds(Self);
+end;
+
+procedure TfrmEncounterFrame.FormCanResize(Sender: TObject; var NewWidth,
+  NewHeight: Integer; var Resize: Boolean);
 begin
   //CQ4740
Index: cprs/branches/foia-cprs/CPRS-Chart/Encounter/fHealthFactor.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Encounter/fHealthFactor.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Encounter/fHealthFactor.dfm	(revision 460)
@@ -1,5 +1,5 @@
 inherited frmHealthFactors: TfrmHealthFactors
-  Left = 434
-  Top = 354
+  Left = 374
+  Top = 205
   Caption = 'Health Factor page'
   PixelsPerInch = 96
@@ -46,4 +46,5 @@
   end
   inherited edtComment: TCaptionEdit
+    MaxLength = 245
     TabOrder = 3
   end
@@ -90,4 +91,5 @@
     ListItemsOnly = False
     LongList = False
+    LookupPiece = 0
     MaxLength = 0
     Pieces = '2'
@@ -96,4 +98,5 @@
     TabOrder = 4
     OnChange = cboHealthLevelChange
+    CharsNeedMatch = 1
   end
 end
Index: cprs/branches/foia-cprs/CPRS-Chart/Encounter/fPCELex.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Encounter/fPCELex.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Encounter/fPCELex.dfm	(revision 460)
@@ -1,5 +1,5 @@
 inherited frmPCELex: TfrmPCELex
-  Left = 386
-  Top = 204
+  Left = 639
+  Top = 480
   BorderIcons = []
   BorderStyle = bsDialog
Index: cprs/branches/foia-cprs/CPRS-Chart/Encounter/fPCEProvider.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Encounter/fPCEProvider.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Encounter/fPCEProvider.dfm	(revision 460)
@@ -71,4 +71,5 @@
     OnChange = cboPrimaryChange
     OnNeedData = cboPrimaryNeedData
+    CharsNeedMatch = 1
   end
   object btnYes: TButton
Index: cprs/branches/foia-cprs/CPRS-Chart/Encounter/rPCE.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Encounter/rPCE.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Encounter/rPCE.pas	(revision 460)
@@ -150,4 +150,5 @@
 function IsUserAProvider(AUser: Int64; ADate: TFMDateTime): boolean;
 function IsCancelOrNoShow(ANote: integer): boolean;
+function IsNonCountClinic(ALocation: integer): boolean;
 
 // HNC Flag
@@ -173,5 +174,4 @@
   uVTypeForLoc:   TStringList;
   uProblems:      TStringList;
-  
   uModifiers:     TORStringList = nil;
   uGAFOK:         boolean;
@@ -1438,4 +1438,9 @@
 end;
 
+function IsNonCountClinic(ALocation: integer): boolean;
+begin
+  Result := (sCallV('ORWPCE1 NONCOUNT', [ALocation]) = '1');
+end;
+
 function DefaultProvider(ALocation: integer; AUser: Int64; ADate: TFMDateTime;
                                              ANoteIEN: integer): string;
Index: cprs/branches/foia-cprs/CPRS-Chart/Encounter/uPCE.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Encounter/uPCE.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Encounter/uPCE.pas	(revision 460)
@@ -1375,8 +1375,7 @@
   Result := inherited DelimitedStr;
   if Provider > 0 then tmpProv := IntToStr(Provider) else tmpProv := '';
-  //Result := 'CPT' + Result + U + IntToStr(Quantity) + U + IntToStr(Provider) +
   Result := 'CPT' + Result + U + IntToStr(Quantity) + U + tmpProv
-  //Result := 'CPT' + Result + U + IntToStr(Quantity) + U +
-  + U + U + U + IntToStr(cnt) + Mods + U + IntToStr(UNxtCommSeqNum) + U;
+             + U + U + U + IntToStr(cnt) + Mods + U + IntToStr(UNxtCommSeqNum) + U;
+  if Length(Result) > 250 then SetPiece(Result, U, 4, '');
 end;
 
@@ -1554,4 +1553,5 @@
     BOOLCHAR[AddProb] + U + U + U;
   if(SaveComment) then Result := Result + IntToStr(UNxtCommSeqNum);
+  if Length(Result) > 250 then SetPiece(Result, U, 4, '');
 end;
 
@@ -2988,4 +2988,9 @@
 begin
   if not CanEditPCE(Self) then
+  begin
+    Result := TRUE;
+    exit;
+  end;
+  if IsNonCountClinic(FEncLocation) then
   begin
     Result := TRUE;
Index: cprs/branches/foia-cprs/CPRS-Chart/Options/fOptions.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Options/fOptions.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Options/fOptions.dfm	(revision 460)
@@ -1,11 +1,12 @@
 object frmOptions: TfrmOptions
-  Left = 307
-  Top = 170
+  Left = 315
+  Top = 110
+  Width = 435
+  Height = 397
   HelpContext = 9999
+  VertScrollBar.Range = 360
   BorderIcons = [biSystemMenu, biHelp]
   BorderStyle = bsDialog
   Caption = 'Options'
-  ClientHeight = 363
-  ClientWidth = 427
   Color = clBtnFace
   ParentFont = True
@@ -19,5 +20,5 @@
   object pnlBottom: TPanel
     Left = 0
-    Top = 333
+    Top = 340
     Width = 427
     Height = 30
@@ -66,5 +67,5 @@
     Top = 0
     Width = 427
-    Height = 333
+    Height = 340
     Align = alClient
     BevelOuter = bvNone
@@ -76,5 +77,5 @@
       Top = 5
       Width = 417
-      Height = 323
+      Height = 330
       HelpContext = 9999
       ActivePage = tsListsTeams
@@ -87,5 +88,5 @@
         DesignSize = (
           409
-          295)
+          302)
         object bvlCoverDays: TBevel
           Left = 125
@@ -923,5 +924,5 @@
         DesignSize = (
           409
-          295)
+          302)
         object bvlNotesNotes: TBevel
           Left = 88
@@ -977,5 +978,5 @@
             00000000000000000000000000000000000000000000000000000000}
         end
-        object Image1: TImage
+        object imgNotes: TImage
           Left = 16
           Top = 163
@@ -1111,13 +1112,13 @@
         Caption = 'Reports'
         ImageIndex = 5
-        object Bevel1: TBevel
+        object bvlReports: TBevel
           Left = 80
-          Top = 24
+          Top = 16
           Width = 321
           Height = 2
         end
-        object Image2: TImage
-          Left = 16
-          Top = 48
+        object imgReports: TImage
+          Left = 20
+          Top = 31
           Width = 41
           Height = 41
@@ -1150,7 +1151,19 @@
             FFFFFFFF}
         end
-        object Image3: TImage
+        object bvlReport1: TBevel
+          Left = 104
+          Top = 108
+          Width = 297
+          Height = 2
+        end
+        object bvlReport2: TBevel
+          Left = 104
+          Top = 204
+          Width = 297
+          Height = 2
+        end
+        object imgReport1: TImage
           Left = 16
-          Top = 176
+          Top = 123
           Width = 41
           Height = 41
@@ -1192,13 +1205,86 @@
             00010000000000000200000083000000C7000000FF810000FFC30000}
         end
-        object Bevel2: TBevel
-          Left = 104
-          Top = 160
-          Width = 297
-          Height = 2
-        end
-        object Label3: TMemo
+        object imgReport2: TImage
+          Left = 16
+          Top = 219
+          Width = 41
+          Height = 41
+          Center = True
+          Picture.Data = {
+            055449636F6E0000010001002020000000000000A80800001600000028000000
+            2000000040000000010008000000000080040000000000000000000000010000
+            0000000000000000000080000080000000808000800000008000800080800000
+            C0C0C000C0DCC000F0CAA600CCFFFF0099FFFF0066FFFF0033FFFF00FFCCFF00
+            CCCCFF0099CCFF0066CCFF0033CCFF0000CCFF00FF99FF00CC99FF009999FF00
+            6699FF003399FF000099FF00FF66FF00CC66FF009966FF006666FF003366FF00
+            0066FF00FF33FF00CC33FF009933FF006633FF003333FF000033FF00CC00FF00
+            9900FF006600FF003300FF00FFFFCC00CCFFCC0099FFCC0066FFCC0066FFCC00
+            33FFCC0000FFCC00FFCCCC00CCCCCC0099CCCC0066CCCC0033CCCC0000CCCC00
+            FF99CC00CC99CC009999CC006699CC003399CC000099CC00FF66CC00CC66CC00
+            9966CC006666CC003366CC000066CC00FF33CC00CC33CC009933CC006633CC00
+            3333CC000033CC00FF00CC00CC00CC009900CC006600CC003300CC000000CC00
+            FFFF9900CCFF990099FF990066FF990033FF990000FF9900FFCC9900CCCC9900
+            99CC990066CC990033CC990000CC9900FF999900CC9999009999990066999900
+            3399990000999900FF669900CC66990099669900666699003366990000669900
+            FF339900CC33990099339900663399003333990000339900FF009900CC009900
+            99009900660099003300990000009900FFFF6600CCFF660099FF660066FF6600
+            33FF660000FF6600FFCC6600CCCC660099CC660066CC660033CC660000CC6600
+            FF996600CC99660099996600669966003399660000996600FF666600CC666600
+            99666600666666003366660000666600FF336600CC3366009933660066336600
+            3333660000336600FF006600CC00660099006600660066003300660000006600
+            FFFF3300CCFF330099FF330066FF330033FF330000FF3300FFCC3300CCCC3300
+            99CC330066CC330033CC330000CC3300FF993300CC9933009999330066993300
+            3399330000993300FF663300CC66330099663300666633003366330000663300
+            FF333300CC33330099333300663333003333330000333300FF003300CC003300
+            99003300660033003300330000003300CCFF000099FF000066FF000033FF0000
+            FFCC0000CCCC000099CC000066CC000033CC000000CC0000FF990000CC990000
+            99990000669900003399000000990000FF660000CC6600009966000066660000
+            0066000033660000FF330000CC33000099330000663300003333000000330000
+            CC0000009900000066000000330000000000DD000000BB000000AA0000008800
+            0000770000005500000044000000220000DD000000BB000000AA000000880000
+            00770000005500000044000000220000DDDDDD00555555007777770077777700
+            44444400222222001111110077000000550000004400000022000000F0FBFF00
+            A4A0A000808080000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000
+            FFFFFF000000000000EF000000EFEFEFEFEFEFEF000000000000000000000000
+            0000000000000000EFEF0000EFEFEFEFEFEFEFEFEF00000000000000000000ED
+            ED00000000000000EFEFEF0000000000EFEFEFEFEFEF00000000000000EDEDEB
+            ED00000000000000EFEFEF00ACACAC4FACEF00EFEFEFEF00000000EDEDEBEBEB
+            ED0000000000FB0000000000EFEFEFECEC4FAC00EFEFEF0000EDEDEBEBFFEBEB
+            ED00000000FBFB0AEB0707F7F75D5DEDED4F4F00EF0000EFEDEBEBEBEBF7FFEB
+            ED00000000F1FB00F0EFEFEFECECECECEC4F4FAC00EFEFEFEBEBEBEBEDF7FFEB
+            ED0000000000F0F04FFF4FFFA6A6A6A6FF4FACACACEFEFEFEBEBEBEBEDF7FFEB
+            ED000000000000F04F4FFFA6A64FFF4F4F4FA6ACAC00EFEFEBEBEBEBEDF7FFEB
+            ED000000000000004FA6E4A6A6FF4FFF4F4FA6ACAC00EFEFEFEBEBEBEDF7FFF7
+            ED000000000000004FACE4A6A6A64F4FFF4FA64F4F00EFEFEFEFEBEBEDEDF700
+            ED000000000000EF4FACE4A6ACA6ACACA6A6ACACAC0000EFEFEFEFEB5D000000
+            ED0000000000000000ACE4A6ECECEFEFEFEF00000000FB00EFEFEB00F05DEB00
+            ED00000000000000EF002AE4EDED5D5DF7F70707EB0AFBFB00EBEBFFEBEBEB00
+            ED0000000000000000004FACECECECECECEFEFEFF000FB00EBEBEBFFEBFFFFEB
+            ED00000000000000000000004FACACAC4F00EFEBEB0000EBEBEBEBFFFFF7FFEB
+            ED000000000000000000000000000000EF5DEBEBEB00EBEBEBEBEBEBEDF7FFEB
+            ED000000000000000000000000FFEBEBEBEBEBEBEBEBEBEBEBEBEBEBEDF7FFEB
+            ED000000000000000000000000FFEBEBEBEBEBEBEBEBEBEBEBEBEBEBEDF7FFEB
+            ED000000000000000000000000FFEBEBEBEBEBEBEBEBEBEBEBEBEBEBEDF7FFEB
+            ED000000000000000000000000FFEBEBEBEBEBEBEBEBEBEBEBEBEBEBEDECEBEB
+            ED000000000000000000000000FFEBEBEBEBEBEBEBEBEBEBEBEBEBEBECF7FFFF
+            ED000000000000000000000000FFEBEBEBEBEBEBEBEBEBEBEBEBEBFFFFFF0700
+            00000000000000000000000000FFEBEBEBEBEBEBEBEBEBEBEBFFFFFF07000000
+            00000000000000000000000000FFEBEBEBEBEBEBEBEBEBFFFFFF070000000000
+            00000000000000000000000000FFEBEBEBEBEBEBEBFFFFFF0700000000000000
+            00000000000000000000000000FFEBEBEBEBEBFFFFFF07000000000000000000
+            00000000000000000000000000FFEBEBEBFFFFFF070000000000000000000000
+            00000000000000000000000000FFEBFFFFFF0700000000000000000000000000
+            00000000000000000000000000FFFFFF07000000000000000000000000000000
+            00000000000000000000000000EB070000000000000000000000000000000000
+            0000000000000000000000000000000000000000000000000000000000000000
+            00000000FB80FFE7F3007F83E1003E03C0001803800000030000000380000003
+            C0000003E0000003E0000003E0000003E0000003F0000003F0000003F8000003
+            FC000003FF000003FF000003FF000003FF000003FF000003FF000003FF000007
+            FF00001FFF00007FFF0001FFFF0007FFFF001FFFFF007FFFFF01FFFFFF07FFFF
+            FF9FFFFF}
+        end
+        object memReports: TMemo
           Left = 128
-          Top = 48
+          Top = 27
           Width = 273
           Height = 41
@@ -1213,7 +1299,7 @@
           TabOrder = 4
         end
-        object Label4: TMemo
+        object memReport1: TMemo
           Left = 128
-          Top = 184
+          Top = 121
           Width = 273
           Height = 49
@@ -1228,7 +1314,7 @@
           TabOrder = 5
         end
-        object Label1: TStaticText
+        object lblReports: TStaticText
           Left = 13
-          Top = 16
+          Top = 9
           Width = 55
           Height = 17
@@ -1236,7 +1322,7 @@
           TabOrder = 2
         end
-        object Label2: TStaticText
-          Left = 13
-          Top = 152
+        object lblReport1: TStaticText
+          Left = 9
+          Top = 101
           Width = 89
           Height = 17
@@ -1244,21 +1330,206 @@
           TabOrder = 3
         end
-        object Button1: TButton
+        object btnReports: TButton
           Left = 200
-          Top = 104
+          Top = 76
           Width = 193
           Height = 22
           Caption = 'Set All Reports...'
           TabOrder = 0
-          OnClick = Button1Click
-        end
-        object Button2: TButton
+          OnClick = btnReportsClick
+        end
+        object btnReport1: TButton
           Left = 200
-          Top = 240
+          Top = 167
           Width = 193
           Height = 22
           Caption = 'Set Individual Report...'
           TabOrder = 1
-          OnClick = Button2Click
+          OnClick = btnReport1Click
+        end
+        object lblReport2: TStaticText
+          Left = 5
+          Top = 197
+          Width = 91
+          Height = 17
+          Caption = 'Remote Data Tool'
+          TabOrder = 6
+        end
+        object memReport2: TMemo
+          Left = 128
+          Top = 213
+          Width = 273
+          Height = 28
+          TabStop = False
+          BorderStyle = bsNone
+          Color = clBtnFace
+          Lines.Strings = (
+            'Change the default tool for viewing Remote Patient Data')
+          ReadOnly = True
+          TabOrder = 7
+        end
+        object rdoRDV: TRadioGroup
+          Left = 120
+          Top = 244
+          Width = 277
+          Height = 37
+          Hint = 'Select RDV for Remote Data Views (classic) or WebVista'
+          Caption = 'How do you want to view remote data'
+          Columns = 2
+          ItemIndex = 0
+          Items.Strings = (
+            'RDV (Classic)'
+            'VistaWeb')
+          TabOrder = 8
+          OnClick = rdoRDVClick
+        end
+      end
+      object tsGraphs: TTabSheet
+        Caption = 'Graphs'
+        ImageIndex = 6
+        DesignSize = (
+          409
+          302)
+        object bvlGraphSettings: TBevel
+          Left = 104
+          Top = 16
+          Width = 297
+          Height = 2
+        end
+        object imgGraphSettings: TImage
+          Left = 16
+          Top = 163
+          Width = 41
+          Height = 41
+          Center = True
+          Picture.Data = {
+            055449636F6E0000010001002020100000000000E80200001600000028000000
+            2000000040000000010004000000000080020000000000000000000000000000
+            0000000000000000000080000080000000808000800000008000800080800000
+            80808000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000
+            FFFFFF0000000000000000000000000000000000007070707070707070707070
+            7070700007FFFFFFFFFFFFFFFFFFFFFFFFFF000007F000000000000000000000
+            0000700007F7888788878887888788878888000007FFFFFF9FFFFF9FFFF9FFFF
+            FFFF700007FFFFFFFFFFFFFFFFFFFFFFFFFF000007FFFF999999F99970707070
+            7070707007FFFFFFFFFFFFFF788888888887878007FFFBBBBBBBBBBB78878787
+            88FFFF7707FFFFCCCCCCFCCC78F000088887878007FFFFFFFFFFFFFF77FFFFF7
+            88FFFF7707FFFFFFFFFFFFFF78F000088888888007FFFFFFFFFFFFFF77FFFFF7
+            8887878707FFFFFFFFFFFFFF78F0000888FFFF7007FFFFFFFFFFFFFF77FFFFF7
+            8888888707F000000000000078F000088887878007F788878887888777FFFFF7
+            88F0FF7707F7FFFFFFFFFFFF788888888888888007F7FF9FFFFFFFFF77878787
+            8787878707F7FF9FFFFFFFFF777777777777777007F7FFF9FFFFFFFFF9F9FFFF
+            FFF9700007F7FFF9FFFFFFFF9FF99FFFFF9F000007F7FFFF9FFFFFFF9FFFF9FF
+            F99F700007F7FFFF9FFFFFF9FFFFF99F9FFF000007F7FFFFF9FFFF9FFFFFFFF9
+            9FFF700007F7FFFFF9FF99FFFFFFFFF9FFFF000007F7FFFFFF999FFFFFFFFFFF
+            FFFF700007F7FFFFFFF9FFFFFFFFFFFFFFFF000007FFFFFFFFFFFFFFFFFFFFFF
+            FFFF700007777777777777777777777777770000000000000000000000000000
+            00000000FFFFFFFF800000078000000780000007800000078000000780000007
+            8000000080000000800000008000000080000000800000008000000080000000
+            8000000080000000800000008000000080000000800000008000000780000007
+            8000000780000007800000078000000780000007800000078000000780000007
+            FFFFFFFF}
+        end
+        object bvlGraphViews: TBevel
+          Left = 104
+          Top = 155
+          Width = 297
+          Height = 2
+        end
+        object imgGraphViews: TImage
+          Left = 16
+          Top = 27
+          Width = 41
+          Height = 41
+          Center = True
+          Picture.Data = {
+            055449636F6E0000010001002020100000000000E80200001600000028000000
+            2000000040000000010004000000000080020000000000000000000000000000
+            0000000000000000000080000080000000808000800000008000800080800000
+            80808000C0C0C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000
+            FFFFFF0000000000000070707707070707070700000000000000788888888888
+            888888700707070707077878788787887878880007FFFFFFFFFF788787887878
+            8787887007F0000000007888888888888888880007F08888888878FFFF8FFFF8
+            FFFF887007F08FFFFFFF7878787878787878780007F08F999999788888888888
+            8888887007F08FFFFFFF787F0F8FFFF8FFFF880007F08BBBBBBB78FFFF8FFFF8
+            FFFF887007F08F222222787F7F8FFFF8FFFF880007F08FFFFFFF78FFFF8FFFF8
+            FFFF887007F08FFFFFFF787F0F8FFFF8FFFF880007FFFFFFFFFF78FFFF8FFFF8
+            FFFF887007FFFFFFFFFF787F7F8FFFF8FFFF880007FFFFFFFFFF78FFFF8FFFF8
+            FFFF887007F000000000787F0F8FFFF87F0F880007F08888888878FFFF8FFFF8
+            FFFF887007F08FFFFFFF787F7F87F0F87F0F880007F08F9FFFFF78FFFF8FFFF8
+            FFFF887007F08F9FFFFF7888888888888888880007F08FF9FFFF787878878788
+            7878887007F08FF9FFFF7777777777777777770007F08FFF9FFFFFFFF9FFFF9F
+            FFF0000007F08FFF9FFFFFFF9FFFFFF9FFF0000007F08FFFF9FFFF99FFFFFFFF
+            9FF7000007F08FFFF9FF99FFFFFFFFFFF9F0000007F08FFFFF99FFFFFFFFFFFF
+            FFF7000007F08FFFFFFFFFFFFFFFFFFFFFF0000007FFFFFFFFFFFFFFFFFFFFFF
+            FFF7000007777777777777777777777777700000000000000000000000000000
+            00000000FFF00001FFF000018000000180000001800000018000000180000001
+            8000000180000001800000018000000180000001800000018000000180000001
+            8000000180000001800000018000000180000001800000018000000180000001
+            8000000F8000000F8000000F8000000F8000000F8000000F8000000F8000000F
+            FFFFFFFF}
+        end
+        object lblGraphSettings: TStaticText
+          Left = 13
+          Top = 145
+          Width = 79
+          Height = 17
+          Caption = 'Default Settings'
+          TabOrder = 0
+        end
+        object btnGraphSettings: TButton
+          Left = 200
+          Top = 235
+          Width = 193
+          Height = 22
+          Caption = 'Default Graph Settings...'
+          TabOrder = 1
+          OnClick = btnGraphSettingsClick
+        end
+        object lblGraphViews: TStaticText
+          Left = 13
+          Top = 9
+          Width = 79
+          Height = 17
+          Caption = 'View Definitions'
+          TabOrder = 2
+        end
+        object btnGraphViews: TButton
+          Left = 200
+          Top = 100
+          Width = 193
+          Height = 22
+          Caption = 'View Definitions...'
+          TabOrder = 3
+          OnClick = btnGraphViewsClick
+        end
+        object memGraphSettings: TMemo
+          Left = 125
+          Top = 167
+          Width = 275
+          Height = 66
+          TabStop = False
+          BorderStyle = bsNone
+          Color = clBtnFace
+          Lines.Strings = (
+            'Configure default settings for graphs. Changes can be '
+            'made to the types of data displayed and the styles of '
+            'presentation. These settings are saved as your default.')
+          ReadOnly = True
+          TabOrder = 4
+        end
+        object memGraphViews: TMemo
+          Left = 125
+          Top = 27
+          Width = 275
+          Height = 68
+          TabStop = False
+          Anchors = [akLeft, akTop, akRight]
+          BorderStyle = bsNone
+          Color = clBtnFace
+          Lines.Strings = (
+            'Define collections of data as views. Views are used for '
+            'common selections of multiple items.')
+          ReadOnly = True
+          TabOrder = 5
         end
       end
Index: cprs/branches/foia-cprs/CPRS-Chart/Options/fOptions.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Options/fOptions.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Options/fOptions.pas	(revision 460)
@@ -72,18 +72,34 @@
     btnNotesTitles: TButton;
     imgNotesNotes: TImage;
-    Image1: TImage;
+    imgNotes: TImage;
     imgTeams: TImage;
     tsCprsReports: TTabSheet;
-    Label1: TStaticText;
-    Bevel1: TBevel;
-    Label3: TMemo;
-    Image2: TImage;
-    Button1: TButton;
-    Label2: TStaticText;
-    Image3: TImage;
-    Label4: TMemo;
-    Button2: TButton;
-    Bevel2: TBevel;
+    lblReports: TStaticText;
+    bvlReports: TBevel;
+    memReports: TMemo;
+    imgReports: TImage;
+    btnReports: TButton;
+    lblReport1: TStaticText;
+    memReport1: TMemo;
+    btnReport1: TButton;
+    bvlReport1: TBevel;
     btnDiagnoses: TButton;
+    tsGraphs: TTabSheet;
+    lblGraphSettings: TStaticText;
+    bvlGraphSettings: TBevel;
+    imgGraphSettings: TImage;
+    btnGraphSettings: TButton;
+    bvlGraphViews: TBevel;
+    lblGraphViews: TStaticText;
+    imgGraphViews: TImage;
+    btnGraphViews: TButton;
+    memGraphSettings: TMemo;
+    memGraphViews: TMemo;
+    bvlReport2: TBevel;
+    lblReport2: TStaticText;
+    memReport2: TMemo;
+    imgReport1: TImage;
+    imgReport2: TImage;
+    rdoRDV: TRadioGroup;
     procedure FormCreate(Sender: TObject);
     procedure FormDestroy(Sender: TObject);
@@ -108,10 +124,13 @@
     procedure btnNotesNotesClick(Sender: TObject);
     procedure btnNotesTitlesClick(Sender: TObject);
-    procedure Button1Click(Sender: TObject);
-    procedure Button2Click(Sender: TObject);
+    procedure btnReportsClick(Sender: TObject);
+    procedure btnReport1Click(Sender: TObject);
     procedure lvwNotificationsEnter(Sender: TObject);
     procedure lvwNotificationsMouseDown(Sender: TObject;
       Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
     procedure btnDiagnosesClick(Sender: TObject);
+    procedure btnGraphSettingsClick(Sender: TObject);
+    procedure btnGraphViewsClick(Sender: TObject);
+    procedure rdoRDVClick(Sender: TObject);
   private
     { Private declarations }
@@ -145,5 +164,7 @@
 uses fOptionsDays, fOptionsReminders, fOptionsSurrogate,
      fOptionsPatientSelection, fOptionsLists, fOptionsTeams, fOptionsCombinations,
-     fOptionsOther, fOptionsNotes, fOptionsTitles, fOptionsReportsCustom, fOptionsReportsDefault, rOptions, rCore, uCore, uOptions;
+     fOptionsOther, fOptionsNotes, fOptionsTitles, fOptionsReportsCustom, fOptionsReportsDefault,
+     fGraphs, fGraphSettings, fGraphProfiles, rGraphs, uGraphs,
+     rOptions, rCore, uCore, uOptions, UBACore, fFrame;
      //fTestDialog;
 
@@ -195,10 +216,10 @@
              tsListsTeams.TabVisible := true;
              ActivePage := tsCoverSheet;
-             Label3.Text := 'Change the default date range and occurrence limits for all reports on ' +
+             memReports.Text := 'Change the default date range and occurrence limits for all reports on ' +
                                'the CPRS Reports tab (excluding health summary reports) .';
-             Label4.Text := 'Change the individual date range and occurrence limits for each report on ' +
+             memReport1.Text := 'Change the individual date range and occurrence limits for each report on ' +
                                'the CPRS Reports tab (excluding health summary reports) .';
-             Button1.caption := 'Set All Reports...';
-             Button2.caption := 'Set Individual Reports...';
+             btnReports.caption := 'Set All Reports...';
+             btnReport1.caption := 'Set Individual Reports...';
              if User.IsReportsOnly then // For "Reports Only" users.
                begin
@@ -217,10 +238,10 @@
              if (not User.ToolsRptEdit) then // For users with Reports settings edit parameter not set.
                begin
-                 Label3.Text := 'View the default date range and occurrence limits for all reports on ' +
+                 memReports.Text := 'View the default date range and occurrence limits for all reports on ' +
                                    'the CPRS Reports tab (excluding health summary reports) .';
-                 Label4.Text := 'View the individual date range and occurrence limits for each report on ' +
+                 memReport1.Text := 'View the individual date range and occurrence limits for each report on ' +
                                    'the CPRS Reports tab (excluding health summary reports) .';
-                 Button1.caption := 'View All Report Settings...';
-                 Button2.caption := 'View Individual Report Settings...';
+                 btnReports.caption := 'View All Report Settings...';
+                 btnReport1.caption := 'View Individual Report Settings...';
                end;
            end;
@@ -249,7 +270,8 @@
   FdirtyOtherStuff := false;
   CheckApply;
-  if not BILLING_AWARE then   btnDiagnoses.Enabled := False;
-  if (Encounter.Provider = 0) and not PersonHasKey(Encounter.Provider, 'PROVIDER') then
+
+  if (Encounter.Provider = 0) and not IsCIDCProvider(User.DUZ) then
       btnDiagnoses.Enabled := False;
+  if UseVistaWeb then rdoRDV.ItemIndex := 1;
 
 end;
@@ -641,5 +663,5 @@
 end;
 
-procedure TfrmOptions.Button1Click(Sender: TObject);
+procedure TfrmOptions.btnReportsClick(Sender: TObject);
 var
   topsize, leftsize, value: integer;
@@ -650,5 +672,5 @@
 end;
 
-procedure TfrmOptions.Button2Click(Sender: TObject);
+procedure TfrmOptions.btnReport1Click(Sender: TObject);
 var
   topsize, leftsize, value: integer;
@@ -678,5 +700,5 @@
   topsize, leftsize, value: integer;
 begin
-  if BILLING_AWARE then  {BAV25 Code}
+  if IsCIDCProvider(User.DUZ) then    //(hds7564)
   begin
      value := 0;
@@ -686,4 +708,75 @@
 end;
 
+procedure TfrmOptions.btnGraphSettingsClick(Sender: TObject);
+// display GraphSettings
+var
+  actiontype: boolean;
+  topsize, leftsize: integer;
+begin
+  actiontype := false;
+  Offset(topsize, -60, leftsize, -60);
+  DialogOptionsGraphSettings(topsize, leftsize, Font.Size, actiontype);
+end;
+
+procedure TfrmOptions.btnGraphViewsClick(Sender: TObject);
+// display Graph Views
+var
+  actiontype: boolean;
+  topsize, leftsize: integer;
+begin
+  actiontype := false;
+  Offset(topsize, -60, leftsize, -60);
+  DialogOptionsGraphProfiles(topsize, leftsize, Font.Size, actiontype);
+end;
+
+procedure TfrmOptions.rdoRDVClick(Sender: TObject);
+var
+  iIndex: integer;
+begin
+  iIndex := rdoRDV.ItemIndex;
+   with frmFrame do
+   if iIndex = 0 then
+    begin
+      ChangeVistaWebParam('0');
+      lblCIRN.Caption := ' Remote';
+      lblCIRNData.Caption := 'Data';
+      lblCIRNAvail.Caption := '';
+      lblCIRN.Width := 43;
+      lblCIRNData.Width := 43;
+      lblCIRNData.Alignment := taCenter;
+      lblCIRN.Alignment := taCenter;
+      lstCIRNLocations.Clear;
+      SetUpCIRN;
+    end
+  else
+    begin
+      ChangeVistaWebParam('1');
+      lblCIRN.Caption := 'Remote';
+      lblCIRNData.Caption := 'Data*';  //VistaWeb On
+      lblCIRN.Width := 43;
+      lblCIRNData.Width := 43;
+      lblCIRNData.Alignment := taCenter;
+      lblCIRN.Alignment := taCenter;
+      lblCIRN.Enabled     := True;
+      lblCIRNData.Enabled := True;
+      pnlCIRN.TabStop     := True;
+      if ColorToRGB(clWindowText) = ColorToRGB(clBlack) then
+        begin
+          lblCIRN.Font.Color  := clBlue;
+          lblCIRNData.Font.Color  := clBlue;
+          lblCIRNAvail.Font.Color := clBlue;
+          lstCIRNLocations.Font.Color  := clBlue;
+        end
+      else
+        begin
+          lblCIRN.Font.Color  := clWindowText;
+          lblCIRNData.Font.Color  := clWindowText;
+          lblCIRNAvail.Font.Color := clWindowText;
+          lstCIRNLocations.Font.Color  := clWindowText;
+        end;
+    end;
+
+end;
+
 end.
 
Index: cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsOther.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsOther.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsOther.dfm	(revision 460)
@@ -196,9 +196,10 @@
   end
   object txtTodayMinus: TStaticText
-    Left = 32
+    Left = 38
     Top = 321
-    Width = 79
-    Height = 17
-    Caption = 'TODAY MINUS'
+    Width = 64
+    Height = 17
+    Alignment = taRightJustify
+    Caption = 'Today minus'
     Color = clBtnFace
     ParentColor = False
@@ -219,9 +220,9 @@
   end
   object txtDaysMinus: TStaticText
-    Left = 176
+    Left = 178
     Top = 322
-    Width = 36
-    Height = 17
-    Caption = ' DAYS'
+    Width = 26
+    Height = 17
+    Caption = 'days'
     Color = clBtnFace
     ParentColor = False
@@ -244,9 +245,9 @@
   end
   object txtDaysPlus: TStaticText
-    Left = 178
+    Left = 180
     Top = 374
-    Width = 36
-    Height = 17
-    Caption = ' DAYS'
+    Width = 26
+    Height = 17
+    Caption = 'days'
     Color = clBtnFace
     ParentColor = False
@@ -282,9 +283,10 @@
   end
   object txtTodayPlus: TStaticText
-    Left = 42
+    Left = 46
     Top = 372
-    Width = 72
-    Height = 17
-    Caption = 'TODAY PLUS'
+    Width = 56
+    Height = 17
+    Alignment = taRightJustify
+    Caption = 'Today plus'
     Color = clBtnFace
     ParentColor = False
Index: cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsOther.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsOther.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsOther.pas	(revision 460)
@@ -52,5 +52,5 @@
     FstopDt: TFMDateTime;
     FEncStartDays, FEncStopDays, FEncDefStartDays, FEncDefStopDays: integer;
-    FDefaultEvent: string;
+    //FDefaultEvent: string;
   public
     { Public declarations }
Index: cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsReportsCustom.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsReportsCustom.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsReportsCustom.dfm	(revision 460)
@@ -1,5 +1,5 @@
 object frmOptionsReportsCustom: TfrmOptionsReportsCustom
-  Left = 468
-  Top = 4
+  Left = 414
+  Top = 329
   BorderIcons = [biSystemMenu, biHelp]
   BorderStyle = bsDialog
Index: cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsReportsCustom.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsReportsCustom.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsReportsCustom.pas	(revision 460)
@@ -205,7 +205,8 @@
       odbStop.Visible := False;
       edtMax.Visible := False;
+      ShowEditor(grdReport.Col, grdReport.Row, #0);
     end;
   if Key in [#32..#127] then ShowEditor(grdReport.Col, grdReport.Row, Key);
-  signal := 0;
+ signal := 0;
 end;
 
@@ -291,4 +292,5 @@
         begin
           Val(newValue, I, code);
+          if I = 0 then begin end; //added to keep compiler from generating a hint
           if code <> 0 then
              begin
Index: cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsReportsDefault.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsReportsDefault.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsReportsDefault.dfm	(revision 460)
@@ -1,5 +1,5 @@
 object frmOptionsReportsDefault: TfrmOptionsReportsDefault
-  Left = 604
-  Top = 172
+  Left = 773
+  Top = 334
   BorderIcons = [biSystemMenu, biHelp]
   BorderStyle = bsDialog
Index: cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsReportsDefault.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsReportsDefault.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsReportsDefault.pas	(revision 460)
@@ -200,4 +200,5 @@
     begin
       Val(newValue, I, code);
+      if I = 0 then begin end; //added to keep compiler from generating a hint
       if code <> 0 then
         begin
Index: cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsTeams.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsTeams.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsTeams.dfm	(revision 460)
@@ -208,4 +208,6 @@
     OnClick = cboSubscribeClick
     OnKeyDown = cboSubscribeKeyDown
+    OnMouseClick = cboSubscribeMouseClick
+    CharsNeedMatch = 1
   end
   object mnuPopPatient: TPopupMenu
Index: cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsTeams.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsTeams.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Options/fOptionsTeams.pas	(revision 460)
@@ -37,4 +37,5 @@
     procedure cboSubscribeKeyDown(Sender: TObject; var Key: Word;
       Shift: TShiftState);
+    procedure cboSubscribeMouseClick(Sender: TObject);
   private
     FKeyBoarding: boolean;
@@ -224,4 +225,50 @@
 procedure TfrmOptionsTeams.cboSubscribeClick(Sender: TObject);
 begin
+  FKeyBoarding := False
+end;
+
+procedure TfrmOptionsTeams.btnRemoveClick(Sender: TObject);
+begin
+  with lstTeams do
+    if InfoBox('Do you want to remove yourself from '
+      + Piece(Items[ItemIndex], '^', 2) + '?',
+      'Confirmation', MB_YESNO or MB_ICONQUESTION) = IDYES then
+  begin
+    rpcRemoveList(ItemIEN);
+    Items.Delete(ItemIndex);
+    lstTeamsClick(self);
+    FillATeams;
+  end;
+end;
+
+procedure TfrmOptionsTeams.mnuPatientIDClick(Sender: TObject);
+begin
+  DisplayPtInfo(lstPatients.ItemID);
+end;
+
+procedure TfrmOptionsTeams.lstPatientsMouseDown(Sender: TObject;
+  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+begin
+  mnuPopPatient.AutoPopup := (lstPatients.Items.Count > 0)
+                              and (lstPatients.ItemIndex > -1)
+                              and (Button = mbRight);
+end;
+
+procedure TfrmOptionsTeams.cboSubscribeKeyDown(Sender: TObject;
+  var Key: Word; Shift: TShiftState);
+begin
+  case Key of VK_RETURN:
+    if (cboSubscribe.ItemIndex > -1) then
+    begin
+      FKeyBoarding := False;
+      cboSubscribeMouseClick(self); // Provide onmouseclick behavior.
+    end;
+  else
+    FKeyBoarding := True; // Suppress onmouseclick behavior.
+  end;
+end;
+
+procedure TfrmOptionsTeams.cboSubscribeMouseClick(Sender: TObject);
+begin
   if FKeyBoarding then
     FKeyBoarding := False
@@ -229,5 +276,7 @@
   begin
     with cboSubscribe do
-    if InfoBox('Do you want to join '
+    if ItemIndex < 0 then
+      exit
+    else if InfoBox('Do you want to join '
       + Piece(Items[ItemIndex], '^', 2) + '?',
       'Confirmation', MB_YESNO or MB_ICONQUESTION) = IDYES then
@@ -249,41 +298,3 @@
 end;
 
-procedure TfrmOptionsTeams.btnRemoveClick(Sender: TObject);
-begin
-  with lstTeams do
-    if InfoBox('Do you want to remove yourself from '
-      + Piece(Items[ItemIndex], '^', 2) + '?',
-      'Confirmation', MB_YESNO or MB_ICONQUESTION) = IDYES then
-  begin
-    rpcRemoveList(ItemIEN);
-    Items.Delete(ItemIndex);
-    lstTeamsClick(self);
-    FillATeams;
-  end;
-end;
-
-procedure TfrmOptionsTeams.mnuPatientIDClick(Sender: TObject);
-begin
-  DisplayPtInfo(lstPatients.ItemID);
-end;
-
-procedure TfrmOptionsTeams.lstPatientsMouseDown(Sender: TObject;
-  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
-begin
-  mnuPopPatient.AutoPopup := (lstPatients.Items.Count > 0)
-                              and (lstPatients.ItemIndex > -1)
-                              and (Button = mbRight);
-end;
-
-procedure TfrmOptionsTeams.cboSubscribeKeyDown(Sender: TObject;
-  var Key: Word; Shift: TShiftState);
-begin
-  case Key of VK_RETURN:
-    if (lstTeams.ItemIndex > 0) then
-      cboSubscribeClick(self); // Provide onclick behavior.
-  else
-    FKeyBoarding := True; // Suppress onclick behavior.
-  end;
-end;
-
 end.
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fOCAccept.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fOCAccept.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fOCAccept.dfm	(revision 460)
@@ -11,32 +11,42 @@
   TextHeight = 13
   object memChecks: TRichEdit
-    Left = 8
-    Top = 8
-    Width = 454
-    Height = 120
+    Left = 0
+    Top = 0
+    Width = 472
+    Height = 136
+    Align = alClient
     ReadOnly = True
     ScrollBars = ssVertical
-    TabOrder = 2
+    TabOrder = 0
     WantReturns = False
   end
-  object cmdAccept: TButton
-    Left = 148
-    Top = 140
-    Width = 80
-    Height = 21
-    Caption = 'Accept Order'
-    Default = True
-    ModalResult = 6
-    TabOrder = 0
-  end
-  object cmdCancel: TButton
-    Left = 244
-    Top = 140
-    Width = 80
-    Height = 21
-    Cancel = True
-    Caption = 'Cancel Order'
-    ModalResult = 7
+  object pnlBottom: TPanel
+    Left = 0
+    Top = 136
+    Width = 472
+    Height = 33
+    Align = alBottom
+    BevelOuter = bvNone
     TabOrder = 1
+    object cmdAccept: TButton
+      Left = 148
+      Top = 7
+      Width = 80
+      Height = 21
+      Caption = 'Accept Order'
+      Default = True
+      ModalResult = 6
+      TabOrder = 0
+    end
+    object cmdCancel: TButton
+      Left = 244
+      Top = 7
+      Width = 80
+      Height = 21
+      Cancel = True
+      Caption = 'Cancel Order'
+      ModalResult = 7
+      TabOrder = 1
+    end
   end
 end
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fOCAccept.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fOCAccept.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fOCAccept.pas	(revision 460)
@@ -5,9 +5,10 @@
 uses
   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
-  fAutoSz, StdCtrls, ComCtrls, ORFn;
+  fAutoSz, StdCtrls, ComCtrls, ORFn, ExtCtrls;
 
 type
   TfrmOCAccept = class(TfrmAutoSz)
     memChecks: TRichEdit;
+    pnlBottom: TPanel;
     cmdAccept: TButton;
     cmdCancel: TButton;
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fOCSession.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fOCSession.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fOCSession.dfm	(revision 460)
@@ -1,5 +1,5 @@
 inherited frmOCSession: TfrmOCSession
-  Left = 220
-  Top = 392
+  Left = 365
+  Top = 221
   Width = 504
   Height = 298
@@ -7,51 +7,75 @@
   Caption = 'Order Checks'
   Position = poScreenCenter
+  ShowHint = True
+  OnClose = FormClose
+  OnShow = FormShow
   PixelsPerInch = 96
   TextHeight = 13
-  object lblJustify: TLabel
-    Left = 8
-    Top = 195
-    Width = 248
-    Height = 13
-    Caption = 'Enter justification for overriding critical order checks -'
-  end
-  object lstChecks: TListBox
-    Left = 8
-    Top = 8
-    Width = 480
-    Height = 149
+  object lstChecks: TCaptionListBox
+    Left = 0
+    Top = 0
+    Width = 496
+    Height = 160
+    Style = lbOwnerDrawVariable
+    Align = alClient
     ItemHeight = 13
     MultiSelect = True
-    Style = lbOwnerDrawVariable
-    TabOrder = 0
+    ParentShowHint = False
+    ShowHint = True
+    TabOrder = 1
     OnDrawItem = lstChecksDrawItem
     OnMeasureItem = lstChecksMeasureItem
+    HintOnItem = True
   end
-  object txtJustify: TCaptionEdit
-    Left = 8
-    Top = 209
-    Width = 480
-    Height = 21
-    MaxLength = 80
-    TabOrder = 2
-    Caption = 'Enter justification for overriding critical order checks -'
-  end
-  object cmdCancelOrder: TButton
-    Left = 356
-    Top = 162
-    Width = 133
-    Height = 21
-    Caption = 'Cancel Selected Order(s)'
-    TabOrder = 1
-    OnClick = cmdCancelOrderClick
-  end
-  object cmdContinue: TButton
-    Left = 212
-    Top = 242
-    Width = 72
-    Height = 21
-    Caption = 'Continue'
-    TabOrder = 3
-    OnClick = cmdContinueClick
+  object pnlBottom: TPanel
+    Left = 0
+    Top = 160
+    Width = 496
+    Height = 111
+    Align = alBottom
+    BevelOuter = bvNone
+    TabOrder = 0
+    DesignSize = (
+      496
+      111)
+    object lblJustify: TLabel
+      Left = 8
+      Top = 34
+      Width = 248
+      Height = 13
+      Anchors = [akLeft, akTop, akRight]
+      Caption = 'Enter justification for overriding critical order checks -'
+    end
+    object txtJustify: TCaptionEdit
+      Left = 8
+      Top = 50
+      Width = 480
+      Height = 21
+      Anchors = [akLeft, akTop, akRight]
+      MaxLength = 80
+      TabOrder = 0
+      OnKeyDown = txtJustifyKeyDown
+      Caption = 'Enter justification for overriding critical order checks -'
+    end
+    object cmdCancelOrder: TButton
+      Left = 356
+      Top = 5
+      Width = 133
+      Height = 21
+      Anchors = [akLeft, akTop, akRight]
+      Caption = 'Cancel Selected Order(s)'
+      TabOrder = 2
+      OnClick = cmdCancelOrderClick
+    end
+    object cmdContinue: TButton
+      Left = 212
+      Top = 82
+      Width = 72
+      Height = 21
+      Anchors = [akLeft, akTop, akRight]
+      Caption = 'Continue'
+      TabOrder = 3
+      OnClick = cmdContinueClick
+    end
   end
 end
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fOCSession.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fOCSession.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fOCSession.pas	(revision 460)
@@ -5,11 +5,12 @@
 uses
   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
-  fAutoSz, StdCtrls, ORFn, uConst, ORCtrls;
+  fAutoSz, StdCtrls, ORFn, uConst, ORCtrls, ExtCtrls;
 
 type
   TfrmOCSession = class(TfrmAutoSz)
-    lstChecks: TListBox;
+    lstChecks: TCaptionListBox;
+    pnlBottom: TPanel;
+    lblJustify: TLabel;
     txtJustify: TCaptionEdit;
-    lblJustify: TLabel;
     cmdCancelOrder: TButton;
     cmdContinue: TButton;
@@ -20,4 +21,9 @@
     procedure lstChecksDrawItem(Control: TWinControl; Index: Integer;
       Rect: TRect; State: TOwnerDrawState);
+    procedure FormClose(Sender: TObject; var Action: TCloseAction);
+    procedure FormShow(Sender: TObject);
+    procedure FormResize(Sender: TObject);
+    procedure txtJustifyKeyDown(Sender: TObject; var Key: Word;
+      Shift: TShiftState);
   private
     FCritical: Boolean;
@@ -36,5 +42,5 @@
 {$R *.DFM}
 
-uses rOrders, uCore;
+uses rOrders, uCore, rMisc;
 
 type
@@ -49,4 +55,5 @@
 var
   uCheckedOrders: TList;
+  FOldHintHidePause: integer;
 
 constructor TOCRec.Create(const AnID: string);
@@ -54,8 +61,10 @@
   OrderID := AnID;
   Checks := TStringList.Create;
+  FOldHintHidePause := Application.HintHidePause;
 end;
 
 destructor TOCRec.Destroy;
 begin
+  Application.HintHidePause := FOldHintHidePause;
   Checks.Free;
   inherited Destroy;
@@ -141,4 +150,5 @@
         frmOCSession.SetReqJustify;
         MessageBeep(MB_ICONASTERISK);
+        if frmOCSession.Visible then frmOCSession.SetFocus;
         frmOCSession.ShowModal;
       finally
@@ -166,8 +176,8 @@
   lblJustify.Visible := FCritical;
   txtJustify.Visible := FCritical;
-end;
-
-procedure TfrmOCSession.lstChecksMeasureItem(Control: TWinControl; Index: Integer;
-  var Height: Integer);
+
+end;
+
+procedure TfrmOCSession.lstChecksMeasureItem(Control: TWinControl; Index: Integer; var Height: Integer);
 var
   i, AHt, TotalHt: Integer;
@@ -177,28 +187,28 @@
 begin
   inherited;
+
   with lstChecks do
-  begin
-    if Index >= uCheckedOrders.Count then Exit;
-    OCRec := TOCRec(uCheckedOrders.Items[Index]);
-    ARect := ItemRect(Index);
-    ARect.Left := ARect.Left + 2;
-    AHt := DrawText(Canvas.Handle, PChar(OCRec.OrderText), Length(OCRec.OrderText), ARect,
-                    DT_CALCRECT or DT_LEFT or DT_NOPREFIX or DT_WORDBREAK) + 2;
-    TotalHt := AHt;
-    for i := 0 to OCRec.Checks.Count - 1 do
-    begin
-      ARect := ItemRect(Index);
-      ARect.Left := ARect.Left + 10;
-      x := Piece(OCRec.Checks[i], U, 3);
-      AHt := DrawText(Canvas.Handle, PChar(x), Length(x), ARect,
-                      DT_CALCRECT or DT_LEFT or DT_NOPREFIX or DT_WORDBREAK);
-      TotalHt := TotalHt + AHt;
-    end;
-  end;
+     begin
+       if Index >= uCheckedOrders.Count then Exit;
+       OCRec := TOCRec(uCheckedOrders.Items[Index]);
+       ARect := ItemRect(Index);
+       ARect.Left := ARect.Left + 2;
+       AHt := DrawText(Canvas.Handle, PChar(OCRec.OrderText), Length(OCRec.OrderText), ARect, DT_CALCRECT or DT_LEFT or DT_NOPREFIX or DT_WORDBREAK or DT_EXTERNALLEADING) + 2; //CQ7178: added DT_EXTERNALLEADING
+       TotalHt := AHt;
+
+       for i := 0 to OCRec.Checks.Count - 1 do
+          begin
+            ARect := ItemRect(Index);
+            ARect.Left := ARect.Left + 10;
+            x := Piece(OCRec.Checks[i], U, 3);
+            AHt := DrawText(Canvas.Handle, PChar(x), Length(x), ARect, DT_CALCRECT or DT_LEFT or DT_NOPREFIX or DT_WORDBREAK or DT_EXTERNALLEADING); //CQ7178: added DT_EXTERNALLEADING
+            TotalHt := TotalHt + AHt;
+          end;
+     end;
   Height := TotalHt + 2; // add 2 for focus rectangle
-end;
-
-procedure TfrmOCSession.lstChecksDrawItem(Control: TWinControl; Index: Integer; Rect: TRect;
-  State: TOwnerDrawState);
+  if Height > 255 then Height := 255; //CQ7178
+end;
+
+procedure TfrmOCSession.lstChecksDrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);
 var
   i, AHt: Integer;
@@ -208,32 +218,31 @@
 begin
   inherited;
+
   with lstChecks do
-  begin
-    if Index >= uCheckedOrders.Count then Exit;
-    OCRec := TOCRec(uCheckedOrders.Items[Index]);
-    ARect := ItemRect(Index);
-    AHt := DrawText(Canvas.Handle, PChar(OCRec.OrderText), Length(OCRec.OrderText), ARect,
-                    DT_LEFT or DT_NOPREFIX or DT_WORDBREAK) + 2;
-    ARect.Left := ARect.Left + 10;
-    ARect.Top  := ARect.Top + AHt;
-    for i := 0 to OCRec.Checks.Count - 1 do
-    begin
-      x := Piece(OCRec.Checks[i], U, 3);
-      if not (odSelected in State) then
-      begin
-        if (Piece(OCRec.Checks[i], U, 2) = '1')
-          then
+     begin
+       if Index >= uCheckedOrders.Count then Exit;
+       OCRec := TOCRec(uCheckedOrders.Items[Index]);
+       ARect := ItemRect(Index);
+       AHt := DrawText(Canvas.Handle, PChar(OCRec.OrderText), Length(OCRec.OrderText), ARect, DT_LEFT or DT_NOPREFIX or DT_WORDBREAK or DT_EXTERNALLEADING) + 2; //CQ7178: added DT_EXTERNALLEADING
+       ARect.Left := ARect.Left + 10;
+       ARect.Top  := ARect.Top + AHt;
+       for i := 0 to OCRec.Checks.Count - 1 do
           begin
-            if ColorToRGB(clWindowText) = ColorToRGB(clBlack) then
-              Canvas.Font.Color := clBlue;
-            Canvas.Font.Style := [fsUnderline];
-          end
-          else Canvas.Font.Color := clWindowText;
-      end;
-      AHt := DrawText(Canvas.Handle, PChar(x), Length(x), ARect,
-                      DT_LEFT or DT_NOPREFIX or DT_WORDBREAK);
-      ARect.Top  := ARect.Top + AHt;
-    end;
-  end;
+            x := Piece(OCRec.Checks[i], U, 3);
+            if not (odSelected in State) then
+               begin
+                 if (Piece(OCRec.Checks[i], U, 2) = '1') then
+                   begin
+                     if ColorToRGB(clWindowText) = ColorToRGB(clBlack) then
+                       Canvas.Font.Color := clBlue;
+                     Canvas.Font.Style := [fsUnderline];
+                   end
+                 else Canvas.Font.Color := clWindowText;
+               end;
+            AHt := DrawText(Canvas.Handle, PChar(x), Length(x), ARect, DT_LEFT or DT_NOPREFIX or DT_WORDBREAK or DT_EXTERNALLEADING); //CQ7178: added DT_EXTERNALLEADING
+            ARect.Top  := ARect.Top + AHt;
+        end;
+     end;
+
 end;
 
@@ -268,5 +277,5 @@
   if FCritical and ((Length(txtJustify.Text) < 2) or not ContainsVisibleChar(txtJustify.Text)) then
   begin
-    InfoBox('A justification for overriding critical order checks is required.',
+     InfoBox('A justification for overriding critical order checks is required.',
             'Justification Required', MB_OK);
     Exit;
@@ -278,3 +287,31 @@
 end;
 
+procedure TfrmOCSession.FormClose(Sender: TObject;
+  var Action: TCloseAction);
+begin
+  inherited;
+  SaveUserBounds(Self); //Save Position & Size of Form
+end;
+
+procedure TfrmOCSession.FormShow(Sender: TObject);
+begin
+  inherited;
+  SetFormPosition(Self); //Get Saved Position & Size of Form
+end;
+
+
+procedure TfrmOCSession.FormResize(Sender: TObject);
+begin
+  //TfrmAutoSz has defect must call inherited Resize for the resize to function.
+  inherited;
+end;
+
+procedure TfrmOCSession.txtJustifyKeyDown(Sender: TObject; var Key: Word;
+  Shift: TShiftState);
+begin
+  inherited;
+  //GE CQ9540  activate Return key, behave as "Continue" buttom clicked.
+  if Key = VK_RETURN then cmdContinueClick(self);
+end;
+
 end.
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODAllgy.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODAllgy.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODAllgy.dfm	(revision 460)
@@ -184,4 +184,5 @@
     TabOrder = 3
     OnChange = ControlChange
+    CharsNeedMatch = 1
   end
   object grpObsHist: TRadioGroup
@@ -260,4 +261,5 @@
     OnChange = ControlChange
     OnNeedData = cboOriginatorNeedData
+    CharsNeedMatch = 1
   end
   object cboSymptoms: TORComboBox
@@ -285,4 +287,5 @@
     OnMouseClick = cboSymptomsMouseClick
     OnNeedData = cboSymptomsNeedData
+    CharsNeedMatch = 1
   end
   object btnCurrent: TButton
@@ -328,4 +331,5 @@
     TabOrder = 11
     OnChange = ControlChange
+    CharsNeedMatch = 1
   end
   object btnRemove: TButton
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODAllgy.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODAllgy.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODAllgy.pas	(revision 460)
@@ -496,4 +496,6 @@
 
 procedure TfrmODAllergy.cboSymptomsMouseClick(Sender: TObject);
+var
+  x: string;
 begin
   inherited;
@@ -501,7 +503,12 @@
   Changing := True;
   if lstSelectedSymptoms.SelectByID(cboSymptoms.ItemID) > -1 then exit;
+  with cboSymptoms do
+    if Piece(Items[ItemIndex], U, 3) <> '' then
+      x := ItemID + U + Piece(Items[ItemIndex], U, 3)
+    else
+      x := ItemID + U + Piece(Items[ItemIndex], U, 2);
   with lstSelectedSymptoms do
     begin
-      Items.Add(cboSymptoms.Items[cboSymptoms.ItemIndex]);
+      Items.Add(x);
       SelectByID(cboSymptoms.ItemID);
     end;
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODAuto.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODAuto.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODAuto.pas	(revision 460)
@@ -24,5 +24,5 @@
 
 uses rODBase, rOrders, fTemplateDialog, uTemplateFields, rTemplates, uConst, uTemplates,
-     rConsults;
+     rConsults, uCore, uODBase;
 
 procedure TfrmODAuto.InitDialog;
@@ -38,4 +38,5 @@
   LType: TTemplateLinkType;
   IEN: integer;
+  HasObjects: boolean;
 
 begin
@@ -44,4 +45,6 @@
   LType := DisplayGroupToLinkType(Responses.DisplayGroup);
   tmp := Responses.EValueFor('COMMENT', 1);
+  ExpandOrderObjects(tmp, HasObjects);
+  Responses.OrderContainsObjects := Responses.OrderContainsObjects or HasObjects;
   if (LType <> ltNone) or HasTemplateField(tmp) then
   begin
@@ -56,5 +59,5 @@
     else
       CheckBoilerplate4Fields(tmp, cptn);
-      
+
     if tmp <> '' then
       Responses.Update('COMMENT', 1, TX_WPTYPE, tmp)
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODBBank.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODBBank.dfm	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODBBank.dfm	(revision 460)
@@ -0,0 +1,1061 @@
+inherited frmODBBank: TfrmODBBank
+  Left = 272
+  Top = 171
+  Width = 543
+  Height = 507
+  Caption = 'Blood Component and Diagnostic Test Order Form'
+  PixelsPerInch = 96
+  TextHeight = 13
+  inherited memOrder: TCaptionMemo
+    Top = 431
+    Width = 423
+    Anchors = [akLeft, akRight, akBottom]
+  end
+  inherited cmdAccept: TButton
+    Left = 435
+    Top = 427
+    Anchors = [akRight, akBottom]
+  end
+  inherited cmdQuit: TButton
+    Left = 435
+    Top = 454
+    Anchors = [akRight, akBottom]
+  end
+  inherited pnlMessage: TPanel
+    Left = 12
+    Top = 433
+    Width = 389
+    Anchors = [akLeft, akRight, akBottom]
+  end
+  object pnlBB: TPanel
+    Left = 4
+    Top = 4
+    Width = 525
+    Height = 413
+    TabOrder = 5
+    object pnlFull: TPanel
+      Left = 1
+      Top = 1
+      Width = 523
+      Height = 411
+      Align = alClient
+      Caption = 'pnlFull'
+      TabOrder = 0
+      object pgeProduct: TPageControl
+        Left = 0
+        Top = 4
+        Width = 521
+        Height = 411
+        ActivePage = TabDiag
+        Font.Charset = DEFAULT_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -11
+        Font.Name = 'MS Sans Serif'
+        Font.Style = []
+        Images = ImageList1
+        ParentFont = False
+        TabIndex = 1
+        TabOrder = 0
+        OnChange = pgeProductChange
+        object tabInfo: TTabSheet
+          Caption = 'Patient Information'
+          ImageIndex = 3
+          object edtInfo: TCaptionRichEdit
+            Left = 0
+            Top = 8
+            Width = 513
+            Height = 369
+            Font.Charset = DEFAULT_CHARSET
+            Font.Color = clWindowText
+            Font.Height = -11
+            Font.Name = 'Courier New'
+            Font.Style = []
+            ParentFont = False
+            ReadOnly = True
+            ScrollBars = ssBoth
+            TabOrder = 0
+            Caption = 'Patient Info'
+          end
+        end
+        object TabDiag: TTabSheet
+          Caption = 'Orders'
+          ImageIndex = 2
+          object lblReqComment: TOROffsetLabel
+            Left = 300
+            Top = 25
+            Width = 104
+            Height = 33
+            HorzOffset = 2
+            Transparent = False
+            VertOffset = 2
+            WordWrap = False
+          end
+          object pnlFields: TPanel
+            Left = 0
+            Top = 87
+            Width = 513
+            Height = 162
+            Hint = 'Data entered into these fields apply to the entire order.'
+            ParentShowHint = False
+            ShowHint = True
+            TabOrder = 0
+            object lblDiagComment: TOROffsetLabel
+              Left = 8
+              Top = 114
+              Width = 46
+              Height = 15
+              Caption = 'Comment'
+              HorzOffset = 2
+              Transparent = False
+              VertOffset = 2
+              WordWrap = True
+            end
+            object lblUrgency: TLabel
+              Left = 8
+              Top = 80
+              Width = 40
+              Height = 13
+              Caption = 'Urgency'
+            end
+            object lblCollType: TLabel
+              Left = 8
+              Top = 41
+              Width = 73
+              Height = 13
+              Caption = 'Collection Type'
+            end
+            object lblPreparation: TLabel
+              Left = 352
+              Top = 41
+              Width = 54
+              Height = 13
+              Caption = 'Preparation'
+              Enabled = False
+              Visible = False
+            end
+            object lblWanted: TLabel
+              Left = 352
+              Top = 5
+              Width = 90
+              Height = 13
+              Caption = 'Date Time Wanted'
+            end
+            object lblReason: TLabel
+              Left = 332
+              Top = 114
+              Width = 95
+              Height = 13
+              Caption = 'Reason for Request'
+            end
+            object lblSurgery: TLabel
+              Left = 352
+              Top = 80
+              Width = 36
+              Height = 13
+              Hint = 
+                'Enter the name of the surgical procedure that this request is fo' +
+                'r.'
+              Caption = 'Surgery'
+            end
+            object lblCollTime: TLabel
+              Left = 8
+              Top = 5
+              Width = 100
+              Height = 13
+              Caption = 'Collection Date/Time'
+            end
+            object cmdImmedColl: TSpeedButton
+              Left = 132
+              Top = 21
+              Width = 24
+              Height = 17
+              Font.Charset = DEFAULT_CHARSET
+              Font.Color = clWindowText
+              Font.Height = -16
+              Font.Name = 'MS Sans Serif'
+              Font.Style = [fsBold]
+              Glyph.Data = {
+                D6000000424DD60000000000000076000000280000000C0000000C0000000100
+                0400000000006000000000000000000000001000000010000000000000000000
+                80000080000000808000800000008000800080800000C0C0C000808080000000
+                FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
+                0000333333333333000033333333333300003333333333330000300330033003
+                0000300330033003000033333333333300003333333333330000333333333333
+                0000333333333333000033333333333300003333333333330000}
+              ParentFont = False
+              ParentShowHint = False
+              ShowHint = False
+              OnClick = cmdImmedCollClick
+            end
+            object txtDiagComment: TCaptionEdit
+              Left = 8
+              Top = 132
+              Width = 293
+              Height = 21
+              MaxLength = 240
+              TabOrder = 6
+              OnChange = txtDiagCommentChange
+            end
+            object cboUrgency: TORComboBox
+              Left = 8
+              Top = 96
+              Width = 112
+              Height = 21
+              Style = orcsDropDown
+              AutoSelect = True
+              Caption = 'Urgency'
+              Color = clWindow
+              DropDownCount = 8
+              ItemHeight = 13
+              ItemTipColor = clWindow
+              ItemTipEnable = True
+              ListItemsOnly = True
+              LongList = False
+              LookupPiece = 0
+              MaxLength = 0
+              Pieces = '2'
+              Sorted = False
+              SynonymChars = '<>'
+              TabOrder = 5
+              OnChange = cboUrgencyChange
+              CharsNeedMatch = 1
+            end
+            object cboCollType: TORComboBox
+              Left = 8
+              Top = 57
+              Width = 149
+              Height = 21
+              Style = orcsDropDown
+              AutoSelect = True
+              Caption = 'Collection Type'
+              Color = clWindow
+              DropDownCount = 8
+              ItemHeight = 13
+              ItemTipColor = clWindow
+              ItemTipEnable = True
+              ListItemsOnly = True
+              LongList = False
+              LookupPiece = 0
+              MaxLength = 0
+              Pieces = '2'
+              Sorted = False
+              SynonymChars = '<>'
+              TabOrder = 4
+              OnChange = cboCollTypeChange
+              CharsNeedMatch = 1
+            end
+            object chkConsent: TCheckBox
+              Left = 192
+              Top = 21
+              Width = 112
+              Height = 17
+              Hint = 'Informed Consent Signed On Chart?'
+              Alignment = taLeftJustify
+              Caption = 'Informed Consent?'
+              ParentShowHint = False
+              ShowHint = True
+              TabOrder = 11
+              OnClick = chkConsentClick
+            end
+            object calWantTime: TORDateBox
+              Left = 352
+              Top = 17
+              Width = 149
+              Height = 21
+              TabOrder = 7
+              OnChange = calWantTimeChange
+              DateOnly = False
+              RequireTime = False
+            end
+            object tReason: TEdit
+              Left = 332
+              Top = 132
+              Width = 169
+              Height = 21
+              MaxLength = 80
+              TabOrder = 10
+              OnChange = tReasonChange
+            end
+            object cboSurgery: TORComboBox
+              Left = 352
+              Top = 92
+              Width = 149
+              Height = 21
+              Style = orcsDropDown
+              AutoSelect = True
+              Caption = 'Surgery'
+              Color = clWindow
+              DropDownCount = 8
+              ItemHeight = 13
+              ItemTipColor = clWindow
+              ItemTipEnable = True
+              ListItemsOnly = False
+              LongList = False
+              LookupPiece = 0
+              MaxLength = 0
+              Pieces = '2'
+              Sorted = False
+              SynonymChars = '<>'
+              TabOrder = 9
+              OnChange = cboSurgeryChange
+              CharsNeedMatch = 1
+            end
+            object txtImmedColl: TCaptionEdit
+              Left = 12
+              Top = 17
+              Width = 145
+              Height = 21
+              Color = clBtnFace
+              ReadOnly = True
+              TabOrder = 2
+              Text = 'txtImmedColl'
+            end
+            object cboCollTime: TORComboBox
+              Left = 8
+              Top = 17
+              Width = 149
+              Height = 21
+              Style = orcsDropDown
+              AutoSelect = True
+              Caption = 'Collection Date/Time'
+              Color = clWindow
+              DropDownCount = 8
+              ItemHeight = 13
+              ItemTipColor = clWindow
+              ItemTipEnable = True
+              ListItemsOnly = False
+              LongList = False
+              LookupPiece = 0
+              MaxLength = 0
+              Pieces = '2'
+              Sorted = False
+              SynonymChars = '<>'
+              TabOrder = 0
+              CharsNeedMatch = 1
+            end
+            object pnlCollTimeButton: TKeyClickPanel
+              Left = 137
+              Top = 19
+              Width = 20
+              Height = 19
+              BevelOuter = bvNone
+              Caption = 'Select collection time'
+              TabOrder = 3
+              TabStop = True
+            end
+            object calCollTime: TORDateBox
+              Left = 8
+              Top = 17
+              Width = 149
+              Height = 21
+              TabOrder = 1
+              OnChange = calCollTimeChange
+              DateOnly = False
+              RequireTime = False
+            end
+            object cboPreparation: TORComboBox
+              Left = 352
+              Top = 56
+              Width = 149
+              Height = 21
+              Style = orcsDropDown
+              AutoSelect = True
+              Color = clWindow
+              DropDownCount = 8
+              Enabled = False
+              Items.Strings = (
+                'I^Immediate'
+                'H^Hold')
+              ItemHeight = 13
+              ItemTipColor = clWindow
+              ItemTipEnable = True
+              ListItemsOnly = False
+              LongList = False
+              LookupPiece = 0
+              MaxLength = 0
+              Pieces = '2'
+              Sorted = False
+              SynonymChars = '<>'
+              TabOrder = 8
+              Visible = False
+              OnChange = cboPreparationChange
+              CharsNeedMatch = 1
+            end
+          end
+          object pnlTop: TPanel
+            Left = 0
+            Top = 1
+            Width = 513
+            Height = 84
+            TabOrder = 1
+            object pnlSelect: TPanel
+              Left = 5
+              Top = 1
+              Width = 511
+              Height = 76
+              TabOrder = 0
+              object pnlDiagTests: TGroupBox
+                Left = 8
+                Top = 0
+                Width = 245
+                Height = 73
+                Caption = 'Diagnostic Tests'
+                Font.Charset = DEFAULT_CHARSET
+                Font.Color = clWindowText
+                Font.Height = -11
+                Font.Name = 'MS Sans Serif'
+                Font.Style = []
+                ParentFont = False
+                TabOrder = 0
+                object lblTNS: TLabel
+                  Left = 8
+                  Top = 52
+                  Width = 3
+                  Height = 13
+                  Color = clActiveBorder
+                  Font.Charset = DEFAULT_CHARSET
+                  Font.Color = clMaroon
+                  Font.Height = -11
+                  Font.Name = 'MS Sans Serif'
+                  Font.Style = []
+                  ParentColor = False
+                  ParentFont = False
+                end
+                object cboAvailTest: TORComboBox
+                  Left = 7
+                  Top = 18
+                  Width = 226
+                  Height = 21
+                  Style = orcsDropDown
+                  AutoSelect = True
+                  Caption = 'Available Lab Tests'
+                  Color = clWindow
+                  DropDownCount = 8
+                  ItemHeight = 13
+                  ItemTipColor = clWindow
+                  ItemTipEnable = True
+                  ListItemsOnly = True
+                  LongList = True
+                  LookupPiece = 0
+                  MaxLength = 0
+                  Pieces = '2'
+                  Sorted = False
+                  SynonymChars = '<>'
+                  TabOrder = 0
+                  OnClick = cboAvailTestSelect
+                  OnExit = cboAvailTestExit
+                  OnNeedData = cboAvailTestNeedData
+                  CharsNeedMatch = 1
+                end
+              end
+              object pnlBloodComponents: TGroupBox
+                Left = 252
+                Top = 0
+                Width = 253
+                Height = 73
+                Caption = 'Blood Components'
+                TabOrder = 1
+                object lblQuantity: TLabel
+                  Left = 198
+                  Top = 0
+                  Width = 39
+                  Height = 13
+                  Caption = 'Quantity'
+                end
+                object lblModifiers: TLabel
+                  Left = 10
+                  Top = 48
+                  Width = 42
+                  Height = 13
+                  Caption = 'Modifiers'
+                end
+                object cboAvailComp: TORComboBox
+                  Left = 8
+                  Top = 18
+                  Width = 181
+                  Height = 21
+                  Style = orcsDropDown
+                  AutoSelect = True
+                  Caption = 'Available Lab Tests'
+                  Color = clWindow
+                  DropDownCount = 8
+                  ItemHeight = 13
+                  ItemTipColor = clWindow
+                  ItemTipEnable = True
+                  ListItemsOnly = True
+                  LongList = True
+                  LookupPiece = 0
+                  MaxLength = 0
+                  Pieces = '2'
+                  Sorted = False
+                  SynonymChars = '<>'
+                  TabOrder = 0
+                  OnClick = cboAvailCompSelect
+                  OnExit = cboAvailCompExit
+                  OnNeedData = cboAvailCompNeedData
+                  CharsNeedMatch = 1
+                end
+                object tQuantity: TEdit
+                  Left = 200
+                  Top = 16
+                  Width = 25
+                  Height = 21
+                  TabOrder = 1
+                  Text = '0'
+                end
+                object upQuantity: TUpDown
+                  Left = 225
+                  Top = 16
+                  Width = 15
+                  Height = 21
+                  Associate = tQuantity
+                  Min = 0
+                  Position = 0
+                  TabOrder = 2
+                  Wrap = False
+                end
+                object cboModifiers: TORComboBox
+                  Left = 56
+                  Top = 44
+                  Width = 133
+                  Height = 21
+                  Style = orcsDropDown
+                  AutoSelect = True
+                  Caption = 'Modifier'
+                  Color = clWindow
+                  DropDownCount = 8
+                  ItemHeight = 13
+                  ItemTipColor = clWindow
+                  ItemTipEnable = True
+                  ListItemsOnly = True
+                  LongList = False
+                  LookupPiece = 0
+                  MaxLength = 0
+                  Sorted = False
+                  SynonymChars = '<>'
+                  TabOrder = 3
+                  CharsNeedMatch = 1
+                end
+              end
+            end
+          end
+        end
+        object TabResults: TTabSheet
+          Caption = 'Lab Results'
+          Enabled = False
+          object edtResults: TCaptionRichEdit
+            Left = 0
+            Top = 8
+            Width = 513
+            Height = 369
+            Font.Charset = DEFAULT_CHARSET
+            Font.Color = clWindowText
+            Font.Height = -11
+            Font.Name = 'Courier New'
+            Font.Style = []
+            ParentFont = False
+            TabOrder = 0
+          end
+        end
+      end
+      object pnlSelectedTests: TGroupBox
+        Left = 4
+        Top = 292
+        Width = 518
+        Height = 117
+        Caption = 'Selected Components and Tests'
+        TabOrder = 1
+        Visible = False
+        object btnAddTests: TORAlignSpeedButton
+          Left = 426
+          Top = 17
+          Width = 75
+          Height = 21
+          Caption = 'Add'
+          Font.Charset = DEFAULT_CHARSET
+          Font.Color = clWindowText
+          Font.Height = -11
+          Font.Name = 'MS Sans Serif'
+          Font.Style = []
+          Glyph.Data = {
+            F6000000424DF600000000000000760000002800000010000000100000000100
+            0400000000008000000000000000000000001000000000000000000000000000
+            8000008000000080800080000000800080008080000080808000C0C0C0000000
+            FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
+            3333333333333333333333333333333333333333333003333333333333300333
+            3333333333300333333333333330033333333330000000000333333000000000
+            0333333333300333333333333330033333333333333003333333333333300333
+            3333333333333333333333333333333333333333333333333333}
+          ParentFont = False
+          OnClick = btnAddTestsClick
+        end
+        object lvSelectionList: TCaptionListView
+          Left = 4
+          Top = 16
+          Width = 409
+          Height = 93
+          Columns = <
+            item
+              AutoSize = True
+              Caption = 'Test/Component'
+            end
+            item
+              AutoSize = True
+              Caption = 'Qty'
+            end
+            item
+              AutoSize = True
+              Caption = 'Modifiers'
+            end
+            item
+              Caption = 'ID'
+              Width = 0
+            end>
+          RowSelect = True
+          TabOrder = 0
+          ViewStyle = vsReport
+          Caption = 'lvSelectionList'
+        end
+        object btnRemove: TButton
+          Left = 426
+          Top = 42
+          Width = 75
+          Height = 21
+          Caption = 'Remove'
+          TabOrder = 1
+          OnClick = btnRemoveClick
+        end
+        object btnRemoveAll: TButton
+          Left = 426
+          Top = 68
+          Width = 75
+          Height = 21
+          Caption = 'Remove All'
+          TabOrder = 2
+          OnClick = btnRemoveAllClick
+        end
+      end
+    end
+  end
+  object dlgLabCollTime: TORDateTimeDlg
+    FMDateTime = 2980923
+    DateOnly = False
+    RequireTime = True
+    Left = 435
+    Top = 12
+  end
+  object ORWanted: TORDateTimeDlg
+    FMDateTime = 2980923
+    DateOnly = False
+    RequireTime = True
+    Left = 335
+    Top = 12
+  end
+  object ImageList1: TImageList
+    Left = 388
+    Top = 12
+    Bitmap = {
+      494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
+      0000000000003600000028000000400000003000000001002000000000000030
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000A0A0A002F2F2F00222222000C0C
+      0C0015151500262626002A2A2A001F1F1F0001010100171717001C1C1C001313
+      13001B1B1B00181818001616160000000000CFCFD000D9D9D900E2E2E200E9EA
+      EA00F1F1F300FAFDF600FFFFFE00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0017171700A2A2A200FFFFFF00FAFA
+      FA00A7B8110045BC3B0032C32100E0ED4B00DEF65200D8E34600B0B81800C4CC
+      2B00E3F45100D0F14900D5E34500AFA31D000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000700040005D0250006D6320006D8
+      260007F9070012FC0E0008FC000008FB0C000311ED000000FD00100ADF000000
+      110000000000000000000000000002020200DDDEDF00E5E5E600E8E8ED009896
+      A6004B4992004240BC003734BE003734C4003F3DCB005250D50079779700FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0056151700B2A09F00FAFAFA00F5F5
+      F500BD9E070036E1370096D53200DEEE4300E8E73F00D5EE4600B99D1000BEB7
+      1400E9E74200C7D12300AFD73B00D28229000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000600040001FF000001FF000001FF
+      000001FF000001FF000001FF000000FF05000EC4360004ED000004E119000000
+      270000000000000000000000000002020200E4E4E500E9EAE80063606B005C59
+      CB00544FCD004E48CD004944BC004540C800433FCD004A48D3006060DE009695
+      BD00FFFFFF00FFFFFF00FFFFFF00FFFFFF00BF191800EDA6A300FCFCFC00FCFC
+      FC00A4A103005ECF770080D32A0046BD140081DD36009CE03500F2F54B007FCF
+      28006FCE2900EFF55400BAA81B00C78F20000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000500030001FF000001FF000001FF
+      000001FF000001FF000001FF000001FF000001FF000010FD020005FF05000500
+      000000000000000000000000000002020200E9EAE7009D99BF007773EC007A75
+      F6007C75F700756EF4006D66E800635DDA00514DD0004A47D3005451D8006E6C
+      DB00FFFFFF00FFFFFF00FFFFFF00FFFFFF00CF292800F2ABA800FCFCFC00FCFC
+      FC00C2B91600CFC8250066C61B0036DB340021AB0600DCEF4C00F0F8510047BB
+      140022BE1900F4F34F00C2911700B7B415000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000801060001FF000001FF000001FF
+      000001FF000001FF000001FF000001FF000001FF000010FD020005FF05000500
+      000000000000000000000000000002020200EBEBED00A9A6D7009691F6009B95
+      FB00AAA3FF00A79EFF009B93FF00837AF2006761D5005651C3005753D6006C6A
+      DE00FDFEFF00FFFFFF00FFFFFF00FFFFFF00D57C2C00F2CAAE00FEFEFE00FCFC
+      FC00F4FC5500E4F14F0057C41A003EE33C0043BD1500C0E94000F2F14900B0DD
+      3A000DB60C00EFF24800D0F04500E1AD7E000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000500030001FF000001FF000001FF
+      000001FF000001FF000001FF000001FF000001FF000010FD020005FF05000500
+      000000000000000000000000000002020200EDEDEE00EAEAEE00ABA5F600BAB5
+      FB00E9E6FC00FFFFFF00D4D1FF009A92FD007770E400615CCB005F5BD400726F
+      D900FFFFFF00FFFFFF00FFFFFF00FFFFFF00CFCF2900F0ECA500FCFCFC00FCFC
+      FC0042F0450019B215001CBC160017B70B0079D42B0025D52A00E9F64E004BC0
+      17002FC31700D9F34C003FB90F00FFFFF3000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000D060B0001FF000000EB110000FF
+      0B000DFE070001FF000001FF000001FF000000EE0F000AFD080006F806000802
+      030000000000000000000000000002020200EDEDEE00F1F1F200EDECEF00B9B3
+      F800C1BBFC00D1D0FE00BEB6FF00968DFF007973EC006863D4006B67CA008381
+      B800FFFFFF00FFFFFF00FFFFFF00FFFFFF009ED52A00D5EFA300FCFCFC00FCFC
+      FC005DE8610050F57C009FDE3A003FE33E001EBA150027C017008AD92E003EC3
+      1F0026BB14007FDE3A0037BB1000FFF2FA000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000500030001FF000000DC1D0001FF
+      000006FF000001FF000001FF000001FF00000BFF070010FD020001FF00000500
+      000000000000000000000000000002020200EBEBEC00EFEFEF00F2F1F300F4F3
+      F300ABA7F100A39DF7009E8EFE00887AFF006D69E2006965CF007471C500E9EB
+      F900FFFFFF00FFFFFF00FFFFFF00FFFFFF001DBF2A00A2E79E00FCFCFC00FCFC
+      FC00BAAA670078EBD80034DE48004FF6870034D6360086CB2E00A1E032009FE2
+      430022D931007DF96900E2F2F900FCFCFC000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000801060001FF000000E1220001FF
+      000006FF000001FF000000FE000001FF000009FF070010FD020001FF00000500
+      000000000000000000000000000002020200E5E5E500E9E9EA00ECECED00EFEF
+      F000EFEEF1008A85E200736EF600635EF700615EC9006B68B000BCBCDC00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0050FB9F00B0FFD800F9F9F900FBFB
+      FB00FCFCFC00FAFAFA006EB247002FFF860017AD13009BD53A000FB0000025C1
+      2700DCE2D100FCFCFC00FCFCFC00FCFCFC000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000C00030001FF000000E1220001FF
+      000006FF000001FF00000EFC000007FC02000AE4210010FF000002FF00000901
+      010000000000000000000000000002020200DBDBDB00E0E0E100E5E5E600E8E8
+      E900EAE9EA00E7EBE6005F5EDE005858EF005F60A2008989B300FCFBFD00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0042DBEA00ACECF700FFFFFF00FBFB
+      FB00FCFCFC00FDFDFD00FFE9FF00EEDDC200127DBA0035D73C0043C70800E2C5
+      A000FFFEFF00FCFCFC00FCFCFC00FCFCFC000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000500030003FF000000DD2A0001FF
+      000006FF000002FD020005FF000000FF000000180A0004FF07001ECB16000002
+      000000000000000000000000000002020200C9C9CA00D0D0D100D7D8D800DCDC
+      DD00DEDFE000E0E1E100E1E0E0005353E3005A5D7500EDF0F100F6F9F900FAFB
+      FB00FDFDFE00FEFEFE00FFFFFF00FFFFFF006393E500BAD2EE00FCFCFC00FCFC
+      FC00FCFCFC00FCFCFC00FCFCFC00FFFFF800DE39D600167EB90044D8EE00F5FA
+      FF00FCFCFC00FCFCFC00FCFCFC00FCFCFC000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000902070000FF000000DD2A0001FF
+      000006FF00000DF6060015751A0007FF00000806060003FF0000001000000005
+      000000000000000000000000000002020200B7B8B800BCBDBD00C4C5C500CCCD
+      CD00D1D1D100D4D5D500D7D7D800C6C5D0004D4EA900E5E6E300EDEEED00F3F4
+      F400F8F8F800FBFBFB00FCFCFC00FCFDFD00DC3BD300F0AAF000FDFDFD00FCFC
+      FC00FCFCFC00FCFCFC00FCFCFC00F1F2FF00C820B9001EA8B4005BCAFA00EAEC
+      FF00FCFCFC00FCFCFC00FCFCFC00FCFCFC000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000500030000FF000000DD2A0001FF
+      000006FF00000DB0000020001C0000F500001300140025000D00000200000401
+      000000000000000000000000000002020200A5A5A600A5A5A600ACADAD00B5B5
+      B500BDBCBD0000000000C6C7C800CBC8CB00B1B0C400BDBDC100DDDDDB00E4E4
+      E400EAEAEA00EEEFEF00F1F2F200F2F3F300E03FD700F3ADF300F8F8F800FCFC
+      FC00FCFCFC00FCFCFC00FCFCFC00CCC7C600AD68C900515ADA0035C83600B185
+      8600FCFCFC00FCFCFC00FCFCFC00FCFCFC000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000A03080000FF000000D7240001FF
+      0000000600001D3F160000010000219024000000070000000000020103000000
+      0000000000000000000000000000020202008F8F8F008F8F8F008F8F8F009596
+      96009D9E9E00A5A5A600AAABAB00B0B0B100B6B6B700BAB8BA009C9DA100C5C6
+      C700CDCECE00D2D2D300D5D5D600D6D6D600A71BC200DE9FE500FCFCFC00FCFC
+      FC00FCFCFC00FCFCFC00FCFCFC00DA971200AFB91300CEA42100E86B2100677E
+      AE00FCFCFC00FCFCFC00FCFCFC00FCFCFC000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000903000014F70600130830000BED
+      00000200010008000A0003020400000700000000070000000000020103000000
+      0000000000000000000000000000020202007C7D7D007C7D7D007C7D7D007C7D
+      7D007E7E7E00848585008B8B8C0091919200979798009C9D9D00A1A1A000A3A4
+      A200A8A9A900AEAEAE00B1B1B100B2B2B3003A2EFF00B0ADFD00FEFEFE00FFFF
+      FF00FCFCFC00FCFCFC00FFFCFF00AAD83100FAF8FE00511C1900FAE7F000EDD8
+      E000FCFCFC00FCFCFC00FCFCFC00FCFCFC000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000013131300161616000A0D11000000
+      0000030408000101010001010100010101000000030001010100000100000101
+      0100010101000101010001010100020202006B6B6C006B6B6C006B6B6C006B6B
+      6C006B6B6C006B6B6C006B6B6C006D6D6E0072727200767677007A7B7B007E7E
+      7E00818182008484840087878700888889000C04F10099A0F000F7F7F700FBFB
+      FB00FCFCFC00FCFCFC00FDFFFF00FFF7FF0057262400CE5C45009A252200B8C9
+      C600FCFCFC00FCFCFC00FCFCFC00FCFCFC00424D3E000000000000003E000000
+      2800000040000000300000000100010000000000800100000000000000000000
+      000000000000000000000000FFFFFF0000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000FFFF000000000000FFFF000000000000
+      FFFF000000000000FFFF000000000000FFFF000000000000FFFF000000000000
+      FFFF000000000000FFFF000000000000FFFF000000000000FFFF000000000000
+      FFFF000000000000FFFF000000000000FFFF000004000000FFFF000000000000
+      FFFF000000000000FFFF00000000000000000000000000000000000000000000
+      000000000000}
+  end
+end
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODBBank.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODBBank.pas	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODBBank.pas	(revision 460)
@@ -0,0 +1,2304 @@
+unit fODBBank;
+
+interface
+
+uses
+  SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
+  Forms, Dialogs, StdCtrls, ORCtrls, ORfn, fODBase, ExtCtrls, ComCtrls, uConst,
+  ORDtTm, Buttons, Menus, ImgList;
+
+type
+  TfrmODBBank = class(TfrmODBase)
+    pnlBB: TPanel;
+    pnlFull: TPanel;
+    pgeProduct: TPageControl;
+    tabInfo: TTabSheet;
+    edtInfo: TCaptionRichEdit;
+    TabDiag: TTabSheet;
+    lblReqComment: TOROffsetLabel;
+    pnlFields: TPanel;
+    dlgLabCollTime: TORDateTimeDlg;
+    ORWanted: TORDateTimeDlg;
+    lblDiagComment: TOROffsetLabel;
+    txtDiagComment: TCaptionEdit;
+    pnlSelectedTests: TGroupBox;
+    lvSelectionList: TCaptionListView;
+    lblUrgency: TLabel;
+    cboUrgency: TORComboBox;
+    lblCollType: TLabel;
+    cboCollType: TORComboBox;
+    chkConsent: TCheckBox;
+    lblPreparation: TLabel;
+    calWantTime: TORDateBox;
+    lblWanted: TLabel;
+    tReason: TEdit;
+    lblReason: TLabel;
+    cboSurgery: TORComboBox;
+    lblSurgery: TLabel;
+    txtImmedColl: TCaptionEdit;
+    cboCollTime: TORComboBox;
+    lblCollTime: TLabel;
+    cmdImmedColl: TSpeedButton;
+    pnlCollTimeButton: TKeyClickPanel;
+    calCollTime: TORDateBox;
+    cboPreparation: TORComboBox;
+    btnRemove: TButton;
+    btnRemoveAll: TButton;
+    pnlTop: TPanel;
+    pnlSelect: TPanel;
+    pnlDiagTests: TGroupBox;
+    cboAvailTest: TORComboBox;
+    pnlBloodComponents: TGroupBox;
+    lblQuantity: TLabel;
+    cboAvailComp: TORComboBox;
+    tQuantity: TEdit;
+    upQuantity: TUpDown;
+    TabResults: TTabSheet;
+    edtResults: TCaptionRichEdit;
+    btnAddTests: TORAlignSpeedButton;
+    ImageList1: TImageList;
+    lblModifiers: TLabel;
+    cboModifiers: TORComboBox;
+    lblTNS: TLabel;
+    procedure FormCreate(Sender: TObject);
+    procedure cboAvailTestSelect(Sender: TObject);
+    procedure cboAvailCompSelect(Sender: TObject);
+    procedure DisableCommentPanels;
+    procedure DisableComponentControls;
+    procedure DisableDiagTestControls;
+    procedure EnableComponentControls;
+    procedure EnableDiagTestControls;
+    procedure cboAvailTestExit(Sender: TObject);
+    procedure cboAvailCompExit(Sender: TObject);
+    procedure cboAvailTestNeedData(Sender: TObject;
+      const StartFrom: String; Direction, InsertAt: Integer);
+    procedure cboAvailCompNeedData(Sender: TObject;
+      const StartFrom: String; Direction, InsertAt: Integer);
+    procedure cmdImmedCollClick(Sender: TObject);
+    procedure pgeProductChange(Sender: TObject);
+    procedure cboCollTypeChange(Sender: TObject);
+    procedure btnAddTestsClick(Sender: TObject);
+    procedure FormDestroy(Sender: TObject);
+    procedure btnRemoveClick(Sender: TObject);
+    procedure btnRemoveAllClick(Sender: TObject);
+    procedure cmdAcceptClick(Sender: TObject);
+    procedure calWantTimeChange(Sender: TObject);
+    procedure chkConsentClick(Sender: TObject);
+    procedure cboUrgencyChange(Sender: TObject);
+    procedure txtDiagCommentChange(Sender: TObject);
+    procedure cboPreparationChange(Sender: TObject);
+    procedure cboSurgeryChange(Sender: TObject);
+    procedure tReasonChange(Sender: TObject);
+    procedure calCollTimeChange(Sender: TObject);
+  protected
+    FCmtTypes: TStringList ;
+    procedure InitDialog; override;
+    function  ValidCollTime(UserEntry: string): string;
+    procedure GetAllCollSamples(AComboBox: TORComboBox);
+    procedure GetAllSpecimens(AComboBox: TORComboBox);
+    procedure SetupCollTimes(CollType: string);
+    procedure LoadCollType(AComboBox:TORComboBox);
+    function  ValidAdd: Boolean;
+    procedure ValidateAdd(var AnErrMsg: string);
+    procedure Validate(var AnErrMsg: string); override;
+    procedure ExtractMSBOS(OutList:TStrings; AList:TStrings);
+    procedure ExtractTests(OutList:TStrings; AList:TStrings);
+    procedure ExtractSurgeries(OutList:TStrings; AList:TStrings);
+    procedure ExtractUrgencies(OutList:TStrings; AList:TStrings);
+    procedure ExtractModifiers(OutList:TStrings; AList:TStrings);
+    procedure ExtractSpecimens(OutList:TStrings; AList:TStrings);
+    procedure ExtractTypeScreen(OutList:TStrings; AList:TStrings);
+    procedure ExtractPatientInfo(OutList:TStrings; AList:TStrings);
+    procedure ExtractSpecimen(OutList:TStrings; AList:TStrings);
+    function  SpecimenNeeded(OutList:TStrings; AList:TStrings; CompID:integer): Boolean;
+    procedure LoadUrgencies(AComboBox:TORComboBox);
+    procedure LoadModifiers(AComboBox:TORComboBox);
+  private
+    FLastCollType: string;
+    FLastCollTime: string;
+    FLastLabCollTime: string;
+    FLastLabID: string;
+    FLastItemID: string;
+    FEvtDelayLoc: integer;
+    FEvtDivision: integer;
+    FVbecLookup: string;
+    procedure ReadServerVariables;
+  public
+    procedure SetupDialog(OrderAction: Integer; const ID: string); override;
+    procedure LoadRequiredComment(CmtType: integer);
+    procedure DetermineCollectionDefaults(Responses: TResponses);
+    property  EvtDelayLoc: integer   read FEvtDelayLoc   write FEvtDelayLoc;
+    property  EvtDivision: integer   read FEvtDivision   write FEvtDivision;
+  end;
+
+type
+  TCollSamp = class(TObject)
+    CollSampID: Integer;                  { IEN of CollSamp }
+    CollSampName: string;                 { Name of CollSamp }
+    SpecimenID: Integer;                  { IEN of default specimen }
+    SpecimenName: string;                 { Name of the specimen }
+    TubeColor: string;                    { TubeColor (text) }
+    MinInterval: Integer;                 { Minimum days between orders }
+    MaxPerDay: Integer;                   { Maximum orders per day }
+    LabCanCollect: Boolean;               { True if lab can collect }
+    SampReqComment: string;               { Name of required comment }
+    WardComment: TStringList;             { CollSamp specific comment }
+  end;
+
+  TLabTest = class(TObject)
+    TestID: Integer;                      { IEN of Lab Test }
+    TestName: string;                     { Name of Lab Test }
+    ItemID: Integer;                      { Orderable Item ID }
+    LabSubscript: string ;                { which section of Lab? }
+    CollSamp: Integer;                    { index into CollSampList }
+    Specimen: Integer;                    { IEN of specimen }
+    Comment: TStringList;                 { text of comment }
+    TestReqComment: string;               { Name of required comment }
+    CurReqComment: string;                { name of required comment }
+    CurWardComment: TStringList;          { WP of Ward Comment }
+    UniqueCollSamp: Boolean;              { true if not prompt CollSamp }
+    CollSampList: TList;                  { collection sample objects }
+    CollSampCount: integer;               { count of original contents of CollSampList}
+    SpecimenList: TStringList;            { Strings: IEN^Specimen Name }
+    SpecListCount: integer;               { count of original contents of SpecimenList}
+    SurgeryList: TStringList;             { Strings: Surgeries}
+    PatientInfo: TStringList;             { Text of Patient Information}
+    ResultsDisplay: TStringList;          { Text of Test Results}
+    QuickOrderResponses: TResponses;      { if created as a result of a quick order selection}
+    { functions & procedures }
+    constructor Create(const LabTestIEN: string; Responses: TResponses);
+    destructor Destroy; override ;
+    function  IndexOfCollSamp(CollSampIEN: Integer): Integer;
+    procedure FillCollSampList(LoadData: TStringList; DfltCollSamp: Integer);
+    procedure LoadAllSamples;
+    procedure SetCollSampDflts;
+    procedure ChangeCollSamp(CollSampIEN: Integer);
+    procedure ChangeSpecimen(const SpecimenIEN: string);
+    procedure ChangeComment(const CommentText: string);
+    function  LabCanCollect: Boolean;
+    procedure LoadCollSamp(AComboBox: TORComboBox);
+    procedure LoadSpecimen(AComboBox: TORComboBox);
+    function  NameOfCollSamp: string;
+    function  NameOfSpecimen: string;
+    function  ObtainCollSamp: Boolean;
+    function  ObtainSpecimen: Boolean;
+    function  ObtainComment: Boolean;
+  end;
+
+const
+  CmtType: array[0..6] of string = ('ANTICOAGULATION','DOSE/DRAW TIMES','ORDER COMMENT',
+                                    'ORDER COMMENT MODIFIED','TDM (PEAK-TROUGH)',
+                                    'TRANSFUSION','URINE VOLUME');
+var
+  frmODBBank: TfrmODBBank;
+
+implementation
+
+{$R *.dfm}
+
+uses rODBase, rODLab, uCore, rCore, fODLabOthCollSamp, fODLabOthSpec, fODLabImmedColl, fLabCollTimes,
+ rOrders, uODBase, fRptBox;
+
+var
+  uSelectedItems: TStringList;   //Selected Items in ListView- if TestYes =1 then test else component
+                                 //TestYes(1)^Test-Component(2)^Qty(3)^Sample(4,5)^Specimen(6,7)^Modifier(8)
+  uVBECList: TStringList;        //List of items from VBEC api
+  uTestsForResults: TStringList; //List of tests to show results
+  uUrgencyList: TStringList;     //List of Urgencies
+  uModifierList: TStringList;    //List of Modifiers
+  uRaw: TStringList;             //Results Array
+  uTestSelected, uComponentSelected: Boolean;  //Used on Validate
+  uDfltUrgency: Integer;
+  uSpecimen, uGetTnS: Integer;            //Set to 1 if a specimen for test is already in lab... no need to collect
+  uDfltCollType: string;
+  ALabTest: TLabTest;
+  UserHasLRLABKey: boolean;
+  LRFZX     : string;  //the default collection type  (LC,WC,SP,I)
+  LRFSAMP   : string;  //the default sample           (ptr)
+  LRFSPEC   : string;  //the default specimen         (ptr)
+  LRFDATE   : string;  //the default collection time  (NOW,NEXT,AM,PM,T...)
+  LRFURG    : string;  //the default urgency          (number)		TRY '2'
+  LRFSCH    : string;  //the default schedule?        (ONE TIME, QD, ...)
+  LRORDERMODE : Integer; //the mode being used to order (component or diagnostic test)
+
+const
+  TX_NO_TEST          = 'A Lab Test must be specified.'    ;
+  TX_NO_IMMED = 'Immediate collect is not available for this test/sample';
+  TX_NO_IMMED_CAP = 'Invalid Collection Type';
+
+  TI_INFO = 0;    //Corresponds with pgeProduct TabIndex
+  TI_ORDER = 1;
+  TI_RESULTS = 2;
+
+  TORDER_MODE_INFO = 0;
+  TORDER_MODE_DIAG = 1;
+  TORDER_MODE_COMP = 2;
+
+procedure TfrmODBBank.FormCreate(Sender: TObject);
+var
+  i: integer;
+  AList, ATests: TStringList;
+begin
+  AutoSizeDisabled := True;
+  inherited;
+  AList := TStringList.Create;
+  ATests := TStringList.Create;
+  uSelectedItems := TStringList.Create;
+  uVBECList := TStringList.Create;
+  uTestsForResults := TStringList.Create;
+  uUrgencyList := TStringList.Create;
+  uModifierList := TStringList.Create;
+  uRaw := TStringList.Create;
+  uSpecimen := 0;
+  uGetTnS := 0;
+  lblTNS.Caption := '';
+  lblTNS.Visible := false;
+  uDfltUrgency := 9;
+  TabResults.ImageIndex := 0;
+  Responses.Clear;
+  try
+    LRFZX    := '';
+    LRFSAMP  := '';
+    LRFSPEC  := '';
+    LRFDATE  := '';
+    LRFURG   := '';
+    LRFSCH   := '';
+    LRORDERMODE := TORDER_MODE_INFO;
+    DisableComponentControls;
+    DisableDiagTestControls;
+    FLastColltime := '';
+    FLastLabCollTime := '';
+    FLastItemID := '';
+    uDfltCollType := '';
+    FillerID := 'LR';
+    FEvtDelayLoc := 0;
+    FEvtDivision := 0;
+    UserHasLRLABKey := User.HasKey('LRLAB');
+    AllowQuickOrder := True;
+    StatusText('Loading Dialog Definition');
+    lblReqComment.Visible := False ;
+    lblModifiers.Enabled := False;
+    cboModifiers.Enabled := False;
+    FCmtTypes := TStringList.Create;
+    for i := 0 to 6 do FCmtTypes.Add(CmtType[i]) ;
+    Responses.Dialog := 'VBEC BLOOD BANK';        // loads formatting info
+    StatusText('Loading Default Values');
+    if Self.EvtID > 0 then
+    begin
+      EvtDelayLoc := StrToIntDef(GetEventLoc1(IntToStr(Self.EvtID)),0);
+      EvtDivision := StrToIntDef(GetEventDiv1(IntToStr(Self.EvtID)),0);
+      if EvtDelayLoc>0 then
+        AList.Assign(ODForLab(EvtDelayLoc,EvtDivision))
+      else
+        AList.Assign(ODForLab(Encounter.Location,EvtDivision));
+    end else
+      AList.Assign(ODForLab(Encounter.Location)); // ODForLab returns TStrings with defaults
+    CtrlInits.LoadDefaults(AList);
+    InitDialog;
+    with CtrlInits do
+    begin
+      SetControl(cboCollType, 'Collection Types');
+      uDfltCollType := ExtractDefault(AList, 'Collection Types');
+      if uDfltCollType <> '' then
+        cboCollType.SelectByID(uDfltCollType)
+      else if OrderForInpatient then
+        cboCollType.SelectByID('LC')
+      else
+        cboCollType.SelectByID('SP');
+      SetupCollTimes(cboCollType.ItemID);
+      StatusText('Initializing List of Tests');
+      FVbecLookup := 'S.VBT';
+      cboAvailTest.InitLongList('');
+    end;
+    cboAvailComp.Clear;
+    aList.Clear;
+    GetBloodComponents(aList);            //Get Components in right order
+    for i := 0 to aList.Count - 1 do
+      cboAvailComp.Items.Add(aList[i]);
+    uVBECList.Clear;
+    edtInfo.Clear;
+    cboSurgery.Clear;
+    GetPatientBBInfo(uVBECList, Patient.DFN, Encounter.Location);
+    aList.Clear;
+    ExtractPatientInfo(AList, uVBECList);
+    QuickCopy(AList, edtInfo);
+    AList.Clear;
+    ExtractSurgeries(AList, uVBECList);
+    for i := 0 to AList.Count - 1 do
+      cboSurgery.Items.Add(AList[i]);
+    AList.Clear;
+    ExtractUrgencies(uUrgencyList, uVBECList);
+    LoadUrgencies(cboUrgency);
+    cboUrgency.SelectByID(IntToStr(uDfltUrgency));
+    ExtractModifiers(uModifierList, uVBECList);
+    LoadModifiers(cboModifiers);
+    calWantTime.Text := FormatFMDateTime('mmm dd,yyyy@hh:nn',DateTimeToFMDateTime(Now));
+    //cboPreparation.SelectByID('I');
+    memMessage.Visible := false;
+    memOrder.Visible := false;
+    cmdAccept.Visible := false;
+    pgeProduct.TabIndex := TI_INFO;
+    lvSelectionList.Column[0].Width := 200;
+    lvSelectionList.Column[1].Width := 40;
+    pgeProduct.ActivePageIndex := TI_INFO;
+    PreserveControl(cboAvailTest);
+    PreserveControl(cboAvailComp);
+    PreserveControl(cboCollType);
+    PreserveControl(cboCollTime);
+    PreserveControl(calCollTime);
+    PreserveControl(calWantTime);
+    StatusText('');
+
+  finally
+    AList.Free;
+    ATests.Free;
+  end;
+end;
+
+procedure TfrmODBBank.InitDialog;
+begin
+  inherited;
+  Changing := True;
+  if ALabTest <> nil then
+    begin
+      ALabTest.Destroy;
+      ALabTest := nil;
+    end;
+  DisableCommentPanels;
+  cboAvailTest.SelectByID(FLastItemID);
+  cboAvailComp.SelectByID(FLastItemID);
+  cboAvailTest.ItemIndex := -1;
+  StatusText('');
+  Changing := False ;
+end;
+
+procedure TfrmODBBank.SetupDialog(OrderAction: Integer; const ID: string);
+var
+  tmpResp: TResponse;
+  i: integer;
+begin
+  inherited;
+  ReadServerVariables;
+  if LRFZX <> '' then
+    begin
+      cboCollType.SelectByID(LRFZX);
+      if cboCollType.ItemIndex > -1 then SetupCollTimes(LRFZX);
+    end;
+  if OrderAction in [ORDER_COPY, ORDER_EDIT, ORDER_QUICK] then with Responses, ALabTest do
+   begin
+      SetControl(cboAvailTest,       'ORDERABLE', 1);
+      cboAvailTestSelect(Self);
+      if ALabTest = nil then Exit;  // Causes access violation in FillCollSampleList
+      Changing := True;
+      DetermineCollectionDefaults(Responses);
+      i := 1 ;
+      tmpResp := Responses.FindResponseByName('COMMENT',i);
+      while tmpResp <> nil do
+        begin
+          Comment.Add(tmpResp.EValue);
+          Inc(i);
+          tmpResp := Responses.FindResponseByName('COMMENT',i);
+        end ;
+      Changing := False;
+   end;
+end;
+
+constructor TLabTest.Create(const LabTestIEN: string; Responses: TResponses);
+var
+  LoadData, OneSamp: TStringList;
+  DfltCollSamp: Integer;
+  x: string;
+  tmpResp: TResponse;
+begin
+  LoadData := TStringList.Create;
+  try
+    LoadLabTestData(LoadData, LabTestIEN) ;
+    with LoadData do
+    begin
+      QuickOrderResponses := Responses;
+      TestID := StrToInt(LabTestIEN);
+      TestName := Piece(ExtractDefault(LoadData, 'Test Name'),U,1);
+      ItemID := StrToInt(Piece(ExtractDefault(LoadData, 'Item ID'),U,1));
+      LabSubscript := Piece(ExtractDefault(LoadData, 'Item ID'),U,2);
+      TestReqComment := ExtractDefault(LoadData, 'ReqCom');
+      if Length(ExtractDefault(LoadData, 'Unique CollSamp')) > 0 then UniqueCollSamp := True;
+      x := ExtractDefault(LoadData, 'Unique CollSamp');
+      if Length(x) = 0 then x := ExtractDefault(LoadData, 'Lab CollSamp');
+      if Length(x) = 0 then x := ExtractDefault(LoadData, 'Default CollSamp');
+      if Length(x) = 0 then x := '-1';
+      DfltCollSamp := StrToInt(x);
+      SpecimenList := TStringList.Create;
+      ExtractItems(SpecimenList, LoadData, 'Specimens');
+      if LRFSPEC <> '' then SpecimenList.Add(GetOneSpecimen(StrToInt(LRFSPEC)));
+      Comment := TStringList.Create ;
+      CurWardComment := TStringList.Create;
+      ExtractText(CurWardComment, LoadData, 'GenWardInstructions');
+      CollSamp := 0;
+      CollSampList := TList.Create;
+      FillCollSampList(LoadData, DfltCollSamp);
+      with QuickOrderResponses do tmpResp := FindResponseByName('SAMPLE'  ,1);
+      if (LRFSAMP <> '') and (IndexOfCollSamp(StrToInt(LRFSAMP)) < 0) and
+         (not UniqueCollSamp) and (tmpResp = nil) then
+        begin
+          OneSamp := TStringList.Create;
+          try
+            OneSamp.Assign(GetOneCollSamp(StrToInt(LRFSAMP)));
+            FillCollSampList(OneSamp, CollSampList.Count);
+          finally
+            OneSamp.Free;
+          end;
+        end;
+      if (not UniqueCollSamp) and (CollSampList.Count = 0) then LoadAllSamples;
+      CollSampCount := CollSampList.Count;
+    end;
+  finally
+    LoadData.Free;
+  end;
+  SetCollSampDflts;
+end;
+
+destructor TLabTest.Destroy;
+var
+  i: Integer;
+begin
+  if CollSampList <> nil then
+    with CollSampList do for i := 0 to Count - 1 do
+     with TCollSamp(Items[i]) do
+      begin
+        WardComment.Free;
+        Free;
+      end;
+  CollSampList.Free;
+  SpecimenList.Free;
+  CurWardComment.Free;
+  Comment.Free;
+  inherited Destroy;
+end;
+
+function TLabTest.IndexOfCollSamp(CollSampIEN: Integer): Integer;
+var
+  i: Integer;
+begin
+  Result := -1;
+  with CollSampList do for i := 0 to Count - 1 do with TCollSamp(Items[i]) do
+    if CollSampIEN = CollSampID then
+    begin
+      Result := i;
+      break;
+    end;
+end;
+
+procedure TLabTest.LoadAllSamples;
+var
+  LoadList, SpecList: TStringList;
+  i: Integer;
+begin
+  LoadList := TStringList.Create;
+  SpecList := TStringList.Create;
+  try
+    LoadSamples(LoadList) ;
+    FillCollSampList(LoadList, 0);
+    ExtractItems(SpecList, LoadList, 'Specimens');
+    with SpecList do for i := 0 to Count - 1 do
+      if SpecimenList.IndexOf(Strings[i]) = -1 then SpecimenList.Add(Strings[i]);
+  finally
+    LoadList.Free;
+    SpecList.Free;
+  end;
+end;
+
+procedure TLabTest.FillCollSampList(LoadData: TStringList; DfltCollSamp: Integer);
+{1  2        3         4       5         6          7         8          9               10   }
+{n^IEN^CollSampName^SpecIEN^TubeTop^MinInterval^MaxPerDay^LabCollect^SampReqCommentIEN;name^SpecName}
+var
+  i, LastListItem, AnIndex: Integer;
+  ACollSamp: TCollSamp;
+  LabCollSamp: Integer;
+begin
+  i := -1;
+  if CollSampList = nil then CollSampList := TList.Create;
+  LastListItem := CollSampList.Count ;
+  LabCollSamp := StrToIntDef(ExtractDefault(LoadData, 'Lab CollSamp'), 0);
+  repeat Inc(i) until (i = LoadData.Count) or (LoadData[i] = '~CollSamp');
+  Inc(i);
+  if i < LoadData.Count then repeat
+    if LoadData[i][1] = 'i' then
+      begin
+        ACollSamp := TCollSamp.Create;
+        with ACollSamp do
+          begin
+            AnIndex         := StrToIntDef(Copy(Piece(LoadData[i], '^', 1), 2, 999), -1);
+            CollSampID      := StrToInt(Piece(LoadData[i], '^', 2));
+            CollSampName    := Piece(LoadData[i], '^', 3);
+            SpecimenID      := StrToIntDef(Piece(LoadData[i], '^', 4), 0);
+            SpecimenName    := Piece(LoadData[i], '^', 10);
+            TubeColor       := Piece(LoadData[i], '^', 5);
+            MinInterval     := StrToIntDef(Piece(LoadData[i], '^', 6), 0);
+            MaxPerDay       := StrToIntDef(Piece(LoadData[i], '^', 7), 0);
+            LabCanCollect   := AnIndex = LabCollSamp;
+            SampReqComment  := Piece(LoadData[i], '^', 9);
+            WardComment     := TStringList.Create;
+            if CollSampID  = StrToIntDef(LRFSAMP, 0) then
+              CollSamp := CollSampID
+            else if AnIndex = DfltCollSamp then
+              CollSamp := CollSampID;
+          end; {with}
+        LastListItem := CollSampList.Add(ACollSamp);
+      end; {if}
+    if (LoadData[i][1] = 't') then
+      TCollSamp(CollSampList.Items[LastListItem]).WardComment.Add(Copy(LoadData[i], 2, 255));
+    Inc(i);
+  until (i = LoadData.Count) or (LoadData[i][1] = '~');
+end;
+
+procedure TLabTest.SetCollSampDflts;
+var
+  tmpResp: TResponse;
+begin
+  Specimen := 0;
+  Comment.Clear;
+  CurReqComment := TestReqComment;
+  if CollSamp = 0 then Exit;
+  with QuickOrderResponses do tmpResp := FindResponseByName('SPECIMEN'  ,1);
+  if (LRFSPEC <> '') and (tmpResp = nil) then
+    ChangeSpecimen(LRFSPEC)
+  else with TCollSamp(CollSampList.Items[IndexOfCollSamp(CollSamp)]) do
+    begin
+      Specimen := SpecimenID;
+      if SampReqcomment <> '' then CurReqComment := SampReqComment;
+    end;
+end;
+
+procedure TLabTest.ChangeCollSamp(CollSampIEN: Integer);
+begin
+  CollSamp := CollSampIEN;
+  SetCollSampDflts;
+end;
+
+procedure TLabTest.ChangeSpecimen(const SpecimenIEN: string);
+begin
+  Specimen := StrToIntDef(SpecimenIEN,0);
+end;
+
+procedure TLabTest.ChangeComment(const CommentText: string);
+begin
+  Comment.Add(CommentText);
+end;
+
+function TLabTest.LabCanCollect: Boolean;
+var
+  i: Integer;
+begin
+  Result := False;
+  i := IndexOfCollSamp(CollSamp);
+  if i > -1 then with TCollSamp(CollSampList.Items[i]) do Result := LabCanCollect;
+end;
+
+procedure TLabTest.LoadCollSamp(AComboBox: TORComboBox);
+{ loads the collection sample combo box, expects CollSamp to already be set to default }
+var
+  i: Integer;
+  x: string;
+begin
+  AComboBox.Clear;
+  with CollSampList do for i := 0 to Count - 1 do with TCollSamp(Items[i]) do
+  begin
+    x := IntToStr(CollSampID) + '^' + CollSampName;
+    if Length(TubeColor) <> 0 then x := x + ' (' + TubeColor + ')';
+    AComboBox.Items.Add(x);
+    if CollSamp = CollSampID then AComboBox.ItemIndex := i;
+  end;
+  if ((ALabTest.LabSubscript = 'CH') and (not UserHasLRLABKey)) then
+    begin
+      // do not add 'Other'   (coded this way for clarity)
+    end
+  else
+    with AComboBox do
+      begin
+        Items.Add('0^Other...');
+        if ItemIndex < 0 then ItemIndex := Items.IndexOf('Other...');
+      end;
+end;
+
+procedure TLabTest.LoadSpecimen(AComboBox: TORComboBox);
+{ loads specimen combo box, if SpecimenList is empty, use 'E' xref on 61 ?? }
+var
+  i: Integer;
+  tmpResp: TResponse;
+begin
+  AComboBox.Clear;
+  if ObtainSpecimen then
+    begin
+      if SpecimenList.Count = 0 then LoadSpecimens(SpecimenList) ;
+      AComboBox.Items.Assign(SpecimenList);
+      AComboBox.Items.Add('0^Other...');
+      with QuickOrderResponses do tmpResp := FindResponseByName('SPECIMEN'  ,1);
+      if (LRFSPEC <> '') and (tmpResp = nil) then
+        AComboBox.SelectByID(LRFSPEC)
+      else if Specimen > 0 then
+        AComboBox.SelectByIEN(Specimen)
+      else
+        AComboBox.ItemIndex := AComboBox.Items.IndexOf('Other...');
+    end
+  else
+    begin
+      i := IndexOfCollSamp(CollSamp);
+      if i < CollSampList.Count then with TCollSamp(CollSampList.Items[i]) do
+        begin
+          AComboBox.Items.Add(IntToStr(SpecimenID) + '^' + SpecimenName);
+          AComboBox.ItemIndex := 0;
+        end;
+      with QuickOrderResponses do tmpResp := FindResponseByName('SPECIMEN'  ,1);
+      if (LRFSPEC <> '') and (tmpResp = nil) then
+        begin
+          AComboBox.Items.Add(GetOneSpecimen(StrToInt(LRFSPEC)));
+          AComboBox.SelectByID(LRFSPEC);
+        end;
+    end;
+  ChangeSpecimen(AComboBox.ItemID);
+end;
+
+function TLabTest.NameOfCollSamp: string;
+var
+  i: Integer;
+begin
+  Result := '';
+  i := IndexOfCollSamp(CollSamp);
+  if i > -1 then with TCollSamp(CollSampList.Items[i]) do Result := CollSampName;
+end;
+
+function TLabTest.NameOfSpecimen: string;
+var
+  i: Integer;
+begin
+  Result := '';
+  if CollSamp > 0 then with TCollSamp(CollSampList[IndexOfCollSamp(CollSamp)]) do
+    if (Specimen > 0) and (Specimen = SpecimenID) then Result := SpecimenName;
+  if (Length(Result) = 0) and (Specimen > 0) then with SpecimenList do
+    for i := 0 to Count - 1 do if Specimen = StrToInt(Piece(Strings[i], '^', 1)) then
+    begin
+      Result := Piece(Strings[i], '^', 2);
+      break;
+    end;
+end;
+
+function TLabTest.ObtainCollSamp: Boolean;
+begin
+  Result := (not UniqueCollSamp);
+end;
+
+function TLabTest.ObtainSpecimen: Boolean;
+var
+  i: Integer;
+begin
+  Result := True;
+  i := IndexOfCollSamp(CollSamp);
+  if (i > -1) and (i < CollSampList.Count) then with TCollSamp(CollSampList.Items[i]) do
+    if SpecimenID > 0 then Result := False;
+end;
+
+function TLabTest.ObtainComment: Boolean;
+begin
+  Result := Length(CurReqComment) > 0;
+end;
+
+procedure TfrmODBBank.ExtractModifiers(OutList:TStrings; AList:TStrings);
+begin
+  ExtractItems(Outlist, AList,'MODIFIERS');
+end;
+
+procedure TfrmODBBank.ExtractUrgencies(OutList:TStrings; AList:TStrings);
+begin
+  ExtractItems(Outlist, AList,'URGENCIES');
+end;
+
+procedure TfrmODBBank.ExtractSurgeries(OutList:TStrings; AList:TStrings);
+begin
+  ExtractItems(OutList, AList,'SURGERIES');
+end;
+
+procedure TfrmODBBank.ExtractSpecimens(OutList:TStrings; AList:TStrings);
+begin
+  ExtractItems(OutList, AList,'SPECIMENS');
+end;
+
+procedure TfrmODBBank.ExtractTypeScreen(OutList:TStrings; AList:TStrings);
+begin
+  ExtractItems(OutList, AList, 'TYPE AND SCREEN');
+end;
+
+procedure TfrmODBBank.ExtractSpecimen(OutList:TStrings; AList:TStrings);
+begin
+  ExtractItems(OutList, AList, 'SPECIMEN');
+end;
+
+procedure TfrmODBBank.ExtractPatientInfo(OutList:TStrings; AList:TStrings);
+begin
+  ExtractItems(OutList, AList, 'INFO');
+end;
+
+procedure TfrmODBBank.ExtractTests(OutList:TStrings; AList:TStrings);
+begin
+  ExtractItems(OutList, AList, 'TESTS');
+end;
+
+procedure TfrmODBBank.ExtractMSBOS(OutList:TStrings; AList:TStrings);
+begin
+  ExtractItems(OutList, AList, 'MSBOS');
+end;
+
+function TfrmODBBank.SpecimenNeeded(OutList:TStrings; AList:TStrings; CompID:integer): Boolean;
+var
+  i:integer;
+  aborh: boolean;
+  aSpecimen, aSpecimenDate: string;
+  aWantDateTime, aExpiredSpecimenDate: TFMDateTime;
+begin
+  result := false;
+  aborh := false;
+  aSpecimen := '';
+  OutList.Clear;
+  ExtractItems(OutList,Alist,'ABORH');
+  for i := 0 to OutList.Count - 1 do
+    begin
+      if Length(OutList[i])>1 then
+        begin
+          aborh := true;
+        end;
+    end;
+  if aborh = false then
+    begin
+      result := true;
+      exit;
+    end;
+  OutList.Clear;
+  ExtractSpecimen(OutList, uVBECList);
+  if OutList.Count > 0 then aSpecimen := OutList[0];
+  OutList.Clear;
+  ExtractItems(OutList,AList,'SPECIMENS');
+  aWantDateTime := calWantTime.FMDateTime;
+  aSpecimenDate := piece(aSpecimen,'^',1);
+  aExpiredSpecimenDate := 0;
+  if Length(aSpecimenDate) > 0 then aExpiredSpecimenDate := StrToFloat(aSpecimenDate);
+
+  for i := 0 to OutList.Count - 1 do
+    begin
+      if (IntToStr(aLabTest.ItemID) = piece(OutList[i],'^',1)) and (piece(OutList[i],'^',2) = '1') then
+        if aSpecimen = '' then
+          begin
+            result := true;
+            exit;
+          end
+        else if (Length(calWantTime.Text) > 0) and (aExpiredSpecimenDate < aWantDateTime) then
+          begin
+            result := true;
+            exit;
+          end;
+    end;
+end;
+
+procedure TfrmODBBank.Validate(var AnErrMsg: string);
+
+  procedure SetError(const x: string);
+  begin
+    if Length(AnErrMsg) > 0 then AnErrMsg := AnErrMsg + CRLF;
+    AnErrMsg := AnErrMsg + x;
+  end;
+
+const
+  TX_NO_TESTS       = 'No Tests or Components selected' ;
+  TX_TNS_REQUIRED   = 'An order for TYPE and SCREEN must be created for this order set' ;
+
+begin
+  inherited;
+  if uSelectedItems.Count < 1 then
+    SetError(TX_NO_TESTS);
+  if uGetTns = 1 then
+    SetError(TX_TNS_REQUIRED);
+end;
+
+procedure TfrmODBBank.ValidateAdd(var AnErrMsg: string);
+
+  procedure SetError(const x: string);
+    begin
+      if Length(AnErrMsg) > 0 then AnErrMsg := AnErrMsg + CRLF;
+      AnErrMsg := AnErrMsg + x;
+    end;
+
+var
+  i, CmtType, DaysofFuturePast: integer;
+  d1, d2: TDateTime;
+  x: string;
+const
+  {Diagnostic Test Errors}
+  TX_NO_TIME        = 'Collection Time is required.' ;
+  TX_NO_TCOLLTYPE   = 'Collection Type is required.' ;
+  TX_NO_TESTS       = 'A Lab Test or tests must be selected.' ;
+  TX_BAD_TIME       = 'Collection times must be chosen from the drop down list or entered as valid' +
+                      ' Fileman date/times (T@1700, T+1@0800, etc.).' ;
+  TX_PAST_TIME      = 'Collection times in the past are not allowed.';
+  TX_NO_DAYS        = 'A number of days must be entered for continuous orders.';
+  TX_NO_TIMES       = 'A number of times must be entered for continuous orders.';
+  TX_NO_STOP_DATE   = 'Could not calculate the stop date for the order.  Check "for n Days".';
+  TX_TOO_MANY_DAYS  = 'Maximum number of days allowed is ';
+  TX_TOO_MANY_TIMES = 'For this frequency, the maximum number of times allowed is:  X';
+  //TX_NO_COMMENT     = 'A comment is required for this test and collection sample.';
+  TX_NUMERIC_REQD   = 'A numeric value is required for urine volume.';
+  TX_DOSEDRAW_REQD  = 'Both DOSE and DRAW times are required for this order.';
+  TX_TDM_REQD       = 'A value for LEVEL is required for this order.';
+  //TX_ANTICOAG_REQD  = 'You must specify an anticoagulant on this order.' ;
+  TX_NO_COLLSAMPLE  = 'A collection sample MUST be specified.';
+  TX_NO_SPECIMEN    = 'A specimen MUST be specified.';
+  TX_NO_URGENCY     = 'An urgency MUST be specified.';
+  TX_NO_FREQUENCY   = 'A collection frequency MUST be specified.';
+  TX_NOT_LAB_COLL_TIME = ' is not a routine lab collection time.';
+  TX_NO_ALPHA       = 'For continuous orders, enter a number of days, or an "X" followed by a number of times.';
+  TX_BADTIME_CAP    = 'Invalid Immediate Collect Time';
+  {Component/Type & Screen Errors}
+  TX_NO_COMPONENTS  = 'A Blood Product MUST be selected.';
+  TX_NO_QUANTITY    = 'The number of units MUST be specified under "Quantity".';
+  TX_HIGH_QUANTITY  = 'Quantity too high.';
+  TX_NO_DATEMODIFIED= 'A Date/time Wanted MUST be specified';
+  //TX_NO_PREPARATION = 'Preparation MUST be specified - either "Hold" or "Immediate".';
+  TX_NO_SURGERY     = 'A Surgery MUST be specified for Pre-Op orders';         //only if Pre-op selected
+  TX_NO_REASON      = 'A Reason for Request MUST be entered';
+  TX_NO_COMMENT     = 'A Comment MUST be entered for this Component';
+  TX_DUPLICATE      = 'Duplicate Test/Component not allowed';
+  TX_NO_TEST_SELECTED = 'No Test/Component selected';
+
+begin
+  inherited;
+  AnErrMsg := '';
+  if aLabTest = nil then
+    begin
+      AnErrMsg := TX_NO_TEST_SELECTED;
+      Exit;
+    end;
+  for i := 0 to uSelectedItems.Count - 1 do
+    if IntToStr(aLabTest.TestID) = piece(uSelectedItems[i],'^',2) then
+      begin
+        AnErrMsg := TX_DUPLICATE;
+        Exit;
+      end;
+  if LRORDERMODE = TORDER_MODE_DIAG then
+    begin
+      with cboAvailTest do if ItemIEN <= 0 then SetError(TX_NO_TESTS);
+
+      if ALabTest <> nil then
+        if (cboCollType.ItemID = 'I') and (not ALabTest.LabCanCollect) then
+          begin
+            SetError(TX_NO_IMMED);
+            cboCollType.ItemIndex := -1;
+          end;
+      if uSpecimen = 0 then
+        if cboCollType.ItemID = '' then
+          SetError(TX_NO_TCOLLTYPE)
+        else if cboCollType.ItemID = 'LC' then
+          begin
+           if Length(cboCollTime.Text) = 0 then SetError(TX_NO_TIME);
+           with cboCollTime do if (Length(Text) > 0) and (ItemIndex = -1) then
+             begin
+               if StrToFMDateTime(Text) < 0 then
+                 SetError(TX_BAD_TIME)
+               else if StrToFMDateTime(Text) < FMNow then
+                 SetError(TX_PAST_TIME)
+               else if OrderForInpatient then
+                 begin
+                   d1 := FMDateTimeToDateTime(Trunc(StrToFMDateTime(cboColltime.Text)));
+                   d2 := FMDateTimeToDateTime(FMToday);
+                   if EvtDelayLoc > 0 then
+                     DaysofFuturePast := LabCollectFutureDays(EvtDelayLoc,EvtDivision)
+                   else
+                     DaysofFuturePast := LabCollectFutureDays(Encounter.Location);
+                   if DaysofFuturePast = 0 then DaysofFuturePast := 7;
+                   if ((d1 - d2) > DaysofFuturePast) then
+                     SetError('A lab collection cannot be ordered more than '
+                       + IntToStr(DaysofFuturePast) + ' days in advance');
+                 end
+               else if EvtDelayLoc > 0 then
+                 begin
+                   if (not IsLabCollectTime(StrToFMDateTime(cboCollTime.Text), EvtDelayLoc)) then
+                     SetError(cboCollTime.Text + TX_NOT_LAB_COLL_TIME);
+                 end
+               else if EvtDelayLoc <= 0 then
+                 begin
+                   if (not IsLabCollectTime(StrToFMDateTime(cboCollTime.Text), Encounter.Location)) then
+                     SetError(cboCollTime.Text + TX_NOT_LAB_COLL_TIME);
+                 end;
+             end;
+          end
+        else
+          begin
+            if cboCollType.ItemID = 'I' then
+              begin
+                calCollTime.Text := txtImmedColl.Text;
+                x := ValidImmCollTime(calCollTime.FMDateTime);
+                if (Piece(x, U, 1) <> '1') then
+                  SetError(Piece(x, U, 2));
+              end;
+
+            with calColltime do
+              begin
+                if FMDateTime = 0 then SetError(TX_BAD_TIME)
+                else
+                  begin
+                    // date only was entered
+                    if (FMDateTime - Trunc(FMDateTime) = 0) then
+                      begin
+                        if (Trunc(FMDateTime) < FMToday) then SetError(TX_PAST_TIME);
+                      end
+                    // date/time was entered
+                    else
+                      begin
+                        if (UpperCase(Text) <> 'NOW') and (FMDateTime < FMNow) then SetError(TX_PAST_TIME);
+                      end;
+                  end;
+              end;
+          end;
+
+      with cboUrgency do if ItemIEN  <= 0 then SetError(TX_NO_URGENCY);
+      if ALabTest <> nil then
+        begin
+          CmtType := FCmtTypes.IndexOf(ALabTest.CurReqComment) ;
+          with ALabTest do
+          case CmtType of
+            0 : {ANTICOAGULATION}         {if (Pos('ANTICOAGULANT',Comment.Text)=0) then
+                                         SetError(TX_ANTICOAG_REQD)};
+            1 : {DOSE/DRAW TIMES}         if (Pos('Last dose:',Comment.Text)=0) or
+                                          (Pos('draw time:',Comment.Text)=0) then
+                                         SetError(TX_DOSEDRAW_REQD);
+            2 : {ORDER COMMENT}           {if (Length(Comment.Text)=0) then
+                                         SetError(TX_NO_COMMENT)};
+            3 : {ORDER COMMENT MODIFIED}  {if (Length(Comment.Text)=0) then
+                                         SetError(TX_NO_COMMENT)};
+            4 : {TDM (PEAK-TROUGH}        if (Pos('Dose is expected',Comment.Text)=0) then
+                                         SetError(TX_TDM_REQD);
+            5 : {TRANSFUSION}             {if (Length(Comment.Text)=0) then
+                                         SetError(TX_NO_COMMENT)};
+            6 : {URINE VOLUME}            if (Length(Comment.Text)>0) and
+                                       (ExtractInteger(Comment.Text)<=0) then
+                                          Comment.Text := '?';
+                                         {SetError(TX_NUMERIC_REQD);}
+          end;
+        end;
+    end
+  else if LRORDERMODE = TORDER_MODE_COMP then
+    begin
+      with cboAvailComp do
+        begin
+          if ItemIEN <= 0 then SetError(TX_NO_COMPONENTS);
+        end;
+      if StrToInt(tQuantity.Text) < 1 then SetError(TX_NO_QUANTITY);
+      if calWantTime.Text = '' then SetError(TX_NO_DATEMODIFIED);
+      //if cboPreparation.Text ='' then SetError(TX_NO_PREPARATION);
+      if StrToInt(tQuantity.Text) > 100 then SetError(TX_HIGH_QUANTITY);
+      if tReason.Text = '' then SetError(TX_NO_REASON);
+      if (txtDiagComment.Text = '') and (cboAvailComp.Text = 'OTHER') then SetError(TX_NO_COMMENT);
+      if (cboUrgency.Text = 'PRE-OP') and (length(cboSurgery.ItemID) < 1) then SetError(TX_NO_SURGERY);
+    end;
+end;
+
+function TfrmODBBank.ValidAdd: Boolean;
+const
+  TX_NO_SAVE     = 'This item cannot be added for the following reason(s):' + CRLF + CRLF;
+  TX_NO_SAVE_CAP = 'Unable to Add item';
+  TX_SAVE_ERR    = 'Unexpected error - it was not possible to Add this item.';
+var
+  ErrMsg: string;
+
+begin
+  Result := True;
+  ValidateAdd(ErrMsg);
+  if Length(ErrMsg) > 0 then
+  begin
+    InfoBox(TX_NO_SAVE + ErrMsg, TX_NO_SAVE_CAP, MB_OK);
+    Result := False;
+    Exit;
+  end;
+end;
+
+function TfrmODBBank.ValidCollTime(UserEntry: string): string;
+var
+  i: integer;
+const
+  FMDateResponses: array[0..3] of string = ('TODAY','NOW','NOON','MID');
+begin
+  Result := '';
+  UserEntry := UpperCase(UserEntry);
+  if StrToFMDateTime(UserEntry) < 0 then exit;
+  if (UserEntry = 'T') or
+     (UserEntry = 'N') or
+     (Copy(UserEntry,1,2)='T+') or
+     (Copy(UserEntry,1,2)='T@') or
+     (Copy(UserEntry,1,2)='T-') or
+     (Copy(UserEntry,1,2)='N+') then Result := UserEntry
+  else
+     for i := 0 to 3 do if Pos(FMDateResponses[i],UserEntry)>0 then Result := UserEntry ;
+  if Result = '' then Result := FloatToStr(StrToFMDateTime(UserEntry));
+end;
+
+procedure TfrmODBBank.GetAllCollSamples(AComboBox: TORComboBox);
+var
+  OtherSamp: string;
+begin
+  with ALabTest, AComboBox do
+    begin
+      if ((CollSampList.Count + 1) <= AComboBox.Items.Count) then LoadAllSamples;
+      OtherSamp := SelectOtherCollSample(Font.Size, CollSampCount, CollSampList);
+      if OtherSamp = '-1' then exit;
+      if SelectByID(Piece(OtherSamp, U, 1)) = -1 then
+        if Items.Count > CollSampCount + 1 then
+          Items[0] := OtherSamp
+        else
+          Items.Insert(0, OtherSamp) ;
+      SelectByID(Piece(OtherSamp, U, 1));
+      AComboBox.OnChange(Self);
+      ActiveControl := cmdAccept;
+    end;
+end;
+
+procedure TfrmODBBank.GetAllSpecimens(AComboBox: TORComboBox);
+var
+  OtherSpec: string;
+begin
+  inherited;
+  if ALabTest <> nil then
+    with ALabTest, AComboBox do
+      begin
+        AComboBox.DroppedDown := False;
+        OtherSpec := SelectOtherSpecimen(Font.Size, SpecimenList);
+        if OtherSpec = '-1' then exit;
+        if SelectByID(Piece(OtherSpec, U, 1)) = -1 then
+          if Items.Count > SpecListCount + 1 then
+            Items[0] := OtherSpec
+          else
+            Items.Insert(0, OtherSpec) ;
+        SpecimenList.Add(OtherSpec);
+        SelectByID(Piece(OtherSpec, U, 1));
+        AComboBox.OnChange(Self);
+      end;
+end;
+
+procedure TfrmODBBank.SetupCollTimes(CollType: string);
+var
+  tmpImmTime, tmpTime: TFMDateTime;
+  x, tmpORECALLType, tmpORECALLTime: string;
+begin
+  x := GetLastCollectionTime;
+  tmpORECALLType := Piece(x, U, 1);
+  tmpORECALLTime := Piece(x, U, 2);
+  if CollType = 'SP' then
+    begin
+      cboColltime.Visible    := False;
+      txtImmedColl.Visible   := False;
+      pnlCollTimeButton.Visible   := False;
+      pnlCollTimeButton.TabStop := False;
+      calCollTime.Visible    := True;
+      calColltime.Enabled    := True;
+      if FLastCollTime <> '' then
+        begin
+          calCollTime.Text := ValidCollTime(FLastColltime);
+          if IsFMDateTime(calCollTime.Text) then
+            begin
+              calCollTime.Text := FormatFMDateTime('mmm dd,yy@hh:nn', StrToFMDateTime(calColltime.Text));
+              calColltime.FMDateTime := StrToFMDateTime(FLastCollTime);
+            end;
+        end
+      else if tmpORECALLTime <> '' then
+        begin
+          calCollTime.Text := ValidCollTime(tmpORECALLTime);
+          if IsFMDateTime(calCollTime.Text) then
+            begin
+              calCollTime.Text := FormatFMDateTime('mmm dd,yy@hh:nn', StrToFMDateTime(calColltime.Text));
+              calColltime.FMDateTime := StrToFMDateTime(tmpORECALLTime);
+            end;
+        end
+      else if LRFDATE <> '' then
+        calCollTime.Text     := LRFDATE
+      else
+        calCollTime.Text     := 'TODAY';
+    end
+  else if CollType = 'WC' then
+    begin
+      cboColltime.Visible    := False;
+      txtImmedColl.Visible   := False;
+      pnlCollTimeButton.Visible   := False;
+      pnlCollTimeButton.TabStop := False;
+      calCollTime.Visible    := True;
+      calColltime.Enabled    := True;
+      if FLastCollTime <> '' then
+        begin
+          calCollTime.Text := ValidColltime(FLastColltime);
+          if IsFMDateTime(calCollTime.Text) then
+            begin
+              calCollTime.Text := FormatFMDateTime('mmm dd,yy@hh:nn', StrToFMDateTime(calColltime.Text));
+              calColltime.FMDateTime := StrToFMDateTime(FLastCollTime);
+            end;
+        end
+      else if tmpORECALLTime <> '' then
+        begin
+          calCollTime.Text := ValidColltime(tmpORECALLTime);
+          if IsFMDateTime(calCollTime.Text) then
+            begin
+              calCollTime.Text := FormatFMDateTime('mmm dd,yy@hh:nn', StrToFMDateTime(calColltime.Text));
+              calColltime.FMDateTime := StrToFMDateTime(tmpORECALLTime);
+            end;
+        end
+      else if LRFDATE <> '' then
+        calCollTime.Text     := LRFDATE
+      else
+        calCollTime.Text     := 'NOW';
+    end
+  else if CollType = 'LC' then
+    begin
+      cboColltime.Visible    := True;
+      calCollTime.Visible    := False;
+      calColltime.Enabled    := False;
+      txtImmedColl.Visible   := False;
+      pnlCollTimeButton.Visible   := False;
+      pnlCollTimeButton.TabStop := False;
+      with CtrlInits do SetControl(cboCollTime, 'Lab Collection Times');
+      if Pos(U, FLastLabCollTime) > 0 then
+        cboColltime.SelectByID(Piece(FLastLabCollTime, U, 1))
+      else if FLastLabCollTime <> '' then
+        cboCollTime.Text     := FLastLabCollTime
+      else if (tmpORECALLTime <> '') and (tmpORECALLType = 'LC') then
+        cboCollTime.Text     := MakeRelativeDateTime(StrToFMDateTime(tmpORECALLTime))
+      else if LRFDATE <> '' then
+        cboCollTime.Text     := LRFDATE
+      else
+        cboCollTime.ItemIndex := 0;
+    end
+  else if CollType = 'I' then
+    begin
+      cboColltime.Visible    := False;
+      calCollTime.Visible    := False;
+      calColltime.Enabled    := False;
+      txtImmedColl.Visible   := True;
+      pnlCollTimeButton.Visible   := True;
+      pnlCollTimeButton.TabStop := True;
+      tmpImmTime := GetDefaultImmCollTime;
+      tmpTime := 0;
+      if (FLastColltime <> '') then
+        tmpTime := StrToFMDateTime(FLastColltime)
+      else if (tmpORECALLTime <> '') then
+        tmpTime := StrToFMDateTime(tmpORECALLTime)
+      else if LRFDATE <> '' then
+        tmpTime := StrToFMDateTime(LRFDATE);
+
+      if tmpTime > tmpImmTime then
+        begin
+          calCollTime.FMDateTime := tmpTime;
+          txtImmedColl.Text      := FormatFMDateTime('mmm dd,yy@hh:nn', tmpTime);
+        end
+      else
+        begin
+          calCollTime.FMDateTime := GetDefaultImmCollTime;
+          txtImmedColl.Text      := FormatFMDateTime('mmm dd,yy@hh:nn', calCollTime.FMDateTime);
+        end;
+    end;
+end;
+
+procedure TfrmODBBank.LoadCollType(AComboBox:TORComboBox);
+var
+  i: integer;
+begin
+  with CtrlInits, cboCollType do
+    begin
+      SetControl(cboCollType, 'Collection Types');
+      if not ALabTest.LabCanCollect then
+        begin
+          i := SelectByID('LC');
+          if i > -1 then Items.Delete(i);
+          i := SelectByID('I');
+          if i > -1 then Items.Delete(i);
+        end ;
+      if LRFZX <> '' then
+        begin
+          if (LRFZX = 'LC') or (LRFZX = 'I') then
+            begin
+              if ALabTest.LabCanCollect then
+                cboCollType.SelectByID(LRFZX)
+              else
+                cboCollType.SelectByID('WC');
+            end
+          else
+            cboCollType.SelectByID(LRFZX);
+        end
+      else if FLastCollType <> '' then
+        begin
+          if (FLastCollType = 'LC') or (FLastCollType = 'I') then
+            begin
+              if ALabTest.LabCanCollect then
+                cboCollType.SelectByID(FLastCollType)
+              else
+                cboCollType.SelectByID('WC');
+            end
+          else
+            cboCollType.SelectByID(FLastCollType);
+        end
+      else if uDfltCollType <> '' then
+        begin
+          if (uDfltCollType = 'LC') or (uDfltCollType = 'I') then
+            begin
+              if ALabTest.LabCanCollect then
+                cboCollType.SelectByID(uDfltCollType)
+              else
+                cboCollType.SelectByID('WC');
+            end
+          else
+            cboCollType.SelectByID(uDfltCollType);
+        end
+      else if OrderForInpatient then
+        begin
+          if ALabTest.LabCanCollect then
+            cboCollType.SelectByID('LC')
+          else
+            SelectByID('WC');
+        end
+      else
+        cboCollType.SelectByID('SP');
+    end;
+  SetupCollTimes(cboCollType.ItemID);
+end;
+
+procedure  TfrmODBBank.ReadServerVariables;
+begin
+  LRFZX   := KeyVariable['LRFZX'];
+  LRFSAMP := KeyVariable['LRFSAMP'];
+  LRFSPEC := KeyVariable['LRFSPEC'];
+  LRFDATE := KeyVariable['LRFDATE'];
+  LRFURG  := KeyVariable['LRFURG'];
+  LRFSCH  := KeyVariable['LRFSCH'];
+end;
+
+procedure TfrmODBBank.cboAvailTestSelect(Sender: TObject);
+var
+  x: string;
+  i: integer;
+begin
+  DisableComponentControls;
+  EnableDiagTestControls;
+  LRORDERMODE := TORDER_MODE_DIAG;
+  with cboAvailTest do
+    begin
+      if (Length(ItemID) = 0) or (ItemID = '0') then Exit;
+      for i := 0 to uSelectedItems.Count - 1 do
+        if ItemID = piece(uSelectedItems[i],'^',1) then
+          begin
+            ShowMessage('This test has already been selected!');
+            Exit;
+          end;
+      FLastLabID := ItemID ;
+      FLastItemID := ItemID;
+      Changing := True;
+      if Sender <> Self then
+        Responses.Clear;       // Sender=Self when called from SetupDialog
+      if CharAt(ItemID, 1) = 'Q' then
+        with Responses do
+          begin
+            FLastItemID := ItemID;
+            QuickOrder := ExtractInteger(ItemID);
+            SetControl(cboAvailTest, 'ORDERABLE', 1);
+            if (Length(ItemID) = 0) or (ItemID = '0') then Exit;
+            FLastLabID := ItemID;
+          end;
+      ALabTest := TLabTest.Create(ItemID, Responses);
+    end;
+  with ALabTest do
+  begin
+
+    {with Responses do if QuickOrder > 0 then
+     begin
+      StatusText('Initializing Quick Order');
+      Changing := True;
+      SetControl(cboAvailTest,       'ORDERABLE', 1);
+      DetermineCollectionDefaults(Responses);
+      LoadUrgency(cboCollType.ItemID, cboUrgency);
+      SetControl(cboUrgency,         'URGENCY', 1);
+      Urgency := cboUrgency.ItemIEN;
+      if (Urgency = 0) and (cboUrgency.Items.Count = 1) then
+        begin
+          cboUrgency.ItemIndex := 0;
+          Urgency := cboUrgency.ItemIEN;
+        end;
+      tmpResp := FindResponseByName('SPECIMEN'  ,1);
+      i := 1 ;
+      tmpResp := Responses.FindResponseByName('COMMENT',i);
+      while tmpResp <> nil do
+        begin
+          Comment.Add(tmpResp.EValue);
+          Inc(i);
+          tmpResp := Responses.FindResponseByName('COMMENT',i);
+        end ;
+      end;  //  Quick Order}
+    if ObtainCollSamp then
+      begin
+        //For BloodBank orders, this condition should never occur
+      end
+    else
+      begin
+        with ALabTest do
+          with TCollSamp(CollSampList.Items[IndexOfCollSamp(CollSamp)]) do
+            begin
+              x := '' ;
+              for i := 0 to WardComment.Count-1 do
+                x := x + WardComment.strings[i]+#13#10 ;
+              pnlMessage.TabOrder := cboAvailTest.TabOrder + 1;
+              OrderMessage(x) ;
+            end ;
+      end;
+    if ObtainComment then
+      LoadRequiredComment(FCmtTypes.IndexOf(CurReqComment))
+    else
+      DisableCommentPanels;
+    x := '' ;
+    for i := 0 to CurWardComment.Count-1 do
+      x := x + CurWardComment.strings[i]+#13#10 ;
+    i :=  IndexOfCollSamp(CollSamp);
+    if i > -1 then with TCollSamp(CollSampList.Items[IndexOfCollSamp(CollSamp)]) do
+       for i := 0 to WardComment.Count-1 do
+         x := x + WardComment.strings[i]+#13#10 ;
+    pnlMessage.TabOrder := cboAvailTest.TabOrder + 1;
+    OrderMessage(x) ;
+   end; { with }
+  StatusText('');
+  Changing := False;
+end;
+
+procedure TfrmODBBank.cboAvailCompSelect(Sender: TObject);
+var
+  x: string;
+  i: integer;
+begin
+  DisableDiagTestControls;
+  EnableComponentControls;
+  LRORDERMODE := TORDER_MODE_COMP;
+  with cboAvailComp do
+    begin
+      if (Length(ItemID) = 0) or (ItemID = '0') then Exit;
+      for i := 0 to uSelectedItems.Count - 1 do
+        if ItemID = piece(uSelectedItems[i],'^',1) then
+          begin
+            ShowMessage('This component has already been selected!');
+            Exit;
+          end;
+      FLastLabID := ItemID ;
+      FLastItemID := ItemID;
+      Changing := True;
+      if Sender <> Self then
+        Responses.Clear;       // Sender=Self when called from SetupDialog
+      if CharAt(ItemID, 1) = 'Q' then
+        with Responses do
+          begin
+            FLastItemID := ItemID;
+            QuickOrder := ExtractInteger(ItemID);
+            SetControl(cboAvailComp, 'ORDERABLE', 1);
+            if (Length(ItemID) = 0) or (ItemID = '0') then Exit;
+            FLastLabID := ItemID;
+          end;
+      ALabTest := TLabTest.Create(ItemID, Responses);
+    end;
+  with ALabTest do
+  begin
+
+    {with Responses do if QuickOrder > 0 then
+     begin
+      StatusText('Initializing Quick Order');
+      Changing := True;
+      SetControl(cboAvailTest,       'ORDERABLE', 1);
+      DetermineCollectionDefaults(Responses);
+      LoadUrgency(cboCollType.ItemID, cboUrgency);
+      SetControl(cboUrgency,         'URGENCY', 1);
+      Urgency := cboUrgency.ItemIEN;
+      if (Urgency = 0) and (cboUrgency.Items.Count = 1) then
+        begin
+          cboUrgency.ItemIndex := 0;
+          Urgency := cboUrgency.ItemIEN;
+        end;
+      tmpResp := FindResponseByName('SPECIMEN'  ,1);
+      i := 1 ;
+      tmpResp := Responses.FindResponseByName('COMMENT',i);
+      while tmpResp <> nil do
+        begin
+          Comment.Add(tmpResp.EValue);
+          Inc(i);
+          tmpResp := Responses.FindResponseByName('COMMENT',i);
+        end ;
+      end;  //  Quick Order}
+    {if ObtainCollSamp then
+      begin
+        // should not occur with Blood orders
+      end
+    else
+      begin
+        with ALabTest do
+          with TCollSamp(CollSampList.Items[IndexOfCollSamp(CollSamp)]) do
+            begin
+              x := '' ;
+              for i := 0 to WardComment.Count-1 do
+                x := x + WardComment.strings[i]+#13#10 ;
+              pnlMessage.TabOrder := cboAvailTest.TabOrder + 1;
+              OrderMessage(x) ;
+            end ;
+      end;
+     }
+    if ObtainComment then
+      LoadRequiredComment(FCmtTypes.IndexOf(CurReqComment))
+    else
+      DisableCommentPanels;
+    x := '' ;
+    for i := 0 to CurWardComment.Count-1 do
+      x := x + CurWardComment.strings[i]+#13#10 ;
+    i :=  IndexOfCollSamp(CollSamp);
+    if i > -1 then with TCollSamp(CollSampList.Items[IndexOfCollSamp(CollSamp)]) do
+       for i := 0 to WardComment.Count-1 do
+         x := x + WardComment.strings[i]+#13#10 ;
+    pnlMessage.TabOrder := cboAvailComp.TabOrder + 1;
+    OrderMessage(x) ;
+   end; { with }
+  StatusText('');
+  Changing := False;
+end;
+
+procedure TfrmODBBank.DisableCommentPanels;
+begin
+  lblReqComment.Visible := False;
+end;
+
+procedure TfrmODBBank.DisableComponentControls;
+begin
+  lblModifiers.Enabled := false;
+  cboModifiers.Enabled := false;
+  lblWanted.Enabled := false;
+  calWantTime.Enabled := false;
+  //lblPreparation.Enabled := false;
+  //cboPreparation.Enabled := false;
+  lblSurgery.Enabled := false;
+  cboSurgery.Enabled := false;
+  lblReason.Enabled := false;
+  tReason.Enabled := false;
+  chkConsent.Enabled := false;
+  lblQuantity.Enabled := false;
+  tQuantity.Enabled := false;
+  upQuantity.Enabled := false;
+  cboAvailComp.ItemIndex := -1;
+  tQuantity.Text := '0';
+end;
+
+procedure TfrmODBBank.EnableComponentControls;
+begin
+  lblModifiers.Enabled := true;
+  cboModifiers.Enabled := true;
+  lblWanted.Enabled := true;
+  calWantTime.Enabled := true;
+  //lblPreparation.Enabled := true;
+  //cboPreparation.Enabled := true;
+  if cboUrgency.Text = 'PRE-OP' then
+    begin
+      lblSurgery.Enabled := true;
+      cboSurgery.Enabled := true;
+    end;
+  lblReason.Enabled := true;
+  tReason.Enabled := true;
+  chkConsent.Enabled := true;
+  lblQuantity.Enabled := true;
+  tQuantity.Enabled := true;
+  upQuantity.Enabled := true;
+  txtDiagComment.Enabled := true;
+  lblDiagComment.Enabled := true;
+end;
+
+procedure TfrmODBBank.DisableDiagTestControls;
+begin
+  lblCollTime.Enabled := false;
+  calCollTime.Enabled := false;
+  cboCollTime.Enabled := false;
+  cboAvailTest.ItemIndex := -1;
+  lblCollType.Enabled := false;
+  cboCollType.Enabled := false;
+  cmdImmedColl.Enabled := false;
+end;
+
+procedure TfrmODBBank.EnableDiagTestControls;
+begin
+  calWantTime.Enabled := true;
+  lblWanted.Enabled := true;
+  lblCollTime.Enabled := true;
+  calCollTime.Enabled := true;
+  cboCollTime.Enabled := true;
+  lblCollType.Enabled := true;
+  cboCollType.Enabled := true;
+  lblUrgency.Enabled := true;
+  cboUrgency.Enabled := true;
+  txtDiagComment.Enabled := true;
+  lblDiagComment.Enabled := true;
+  cmdImmedColl.Enabled := true;
+end;
+
+procedure TfrmODBBank.LoadRequiredComment(CmtType: integer);
+begin
+  DisableCommentPanels;
+  lblReqComment.Visible := True ;
+end;
+
+procedure TfrmODBBank.DetermineCollectionDefaults(Responses: TResponses);
+var
+  RespCollect, RespStart: TResponse;
+begin
+  if ALabTest = nil then exit;
+  calCollTime.Clear;
+  cboCollTime.Clear;
+  calCollTime.Enabled := True;
+  lblCollTime.Enabled := True;
+  cboColltime.Enabled := True;
+  with Responses, ALabTest do
+    begin
+      RespCollect := FindResponseByName('COLLECT',1);
+      RespStart   := FindResponseByName('START'  ,1);
+      if (RespCollect <> nil) then with RespCollect do
+        begin
+          if IValue = 'LC' then
+            begin
+              if not LabCanCollect then
+                begin
+                 cboCollType.SelectByID('WC');
+                 SetupCollTimes('WC');
+                end
+              else   //  if LabCanCollect
+                begin
+                 cboCollType.SelectByID('LC');
+                 SetupCollTimes('LC');
+                 CtrlInits.SetControl(cboCollTime, 'Lab Collection Times') ;
+                 if RespStart <> nil then
+                   begin
+                     cboCollTime.SelectByID('L' + RespStart.IValue);
+                     if cboCollTime.ItemIndex < 0 then
+                       cboCollTime.Text := RespStart.IValue;
+                   end;
+                end;
+            end
+          else    //  if IValue <> 'LC'
+            begin
+              cboCollType.SelectByID(IValue) ;
+              SetupCollTimes(IValue);
+              if RespStart <> nil then
+                begin
+                  if ContainsAlpha(RespStart.IValue) then
+                    calColltime.Text := RespStart.IValue
+                  else
+                    calColltime.FMDateTime := StrToFMDateTime(RespStart.IValue);
+                end;
+            end ;
+          if IValue = 'I' then
+            if not LabCanCollect then
+              begin
+               cboCollType.SelectByID('WC');
+               SetupCollTimes('WC');
+              end
+            else
+              begin
+                calCollTime.Enabled := False;
+                if RespStart <> nil then txtImmedColl.Text := RespStart.EValue;
+              end;
+        end
+      else   // if (RespCollect = nil)
+        LoadCollType(cbocollType);
+    end;
+end;
+
+procedure TfrmODBBank.cboAvailTestExit(Sender: TObject);
+begin
+  inherited;
+  if (Length(cboAvailTest.ItemID) = 0) or (cboAvailTest.ItemID = '0') then Exit;
+  if cboAvailTest.ItemID = FLastLabID then Exit;
+  cboAvailTestSelect(cboAvailTest);
+  cboAvailTest.SetFocus;
+  PostMessage(Handle, WM_NEXTDLGCTL, 0, 0);
+end;
+
+procedure TfrmODBBank.cboAvailCompExit(Sender: TObject);
+begin
+  inherited;
+  if (Length(cboAvailComp.ItemID) = 0) or (cboAvailComp.ItemID = '0') then Exit;
+  if cboAvailComp.ItemID = FLastLabID then Exit;
+  cboAvailCompSelect(cboAvailComp);
+  cboAvailComp.SetFocus;
+  PostMessage(Handle, WM_NEXTDLGCTL, 0, 0);
+end;
+
+procedure TfrmODBBank.cboAvailTestNeedData(Sender: TObject;
+  const StartFrom: String; Direction, InsertAt: Integer);
+begin
+  cboAvailTest.ForDataUse(SubsetOfOrderItems(StartFrom, Direction, FVbecLookup));
+end;
+
+procedure TfrmODBBank.cboAvailCompNeedData(Sender: TObject;
+  const StartFrom: String; Direction, InsertAt: Integer);
+begin
+  cboAvailComp.ForDataUse(SubsetOfOrderItems(StartFrom, Direction, FVbecLookup));
+end;
+
+procedure TfrmODBBank.cmdImmedCollClick(Sender: TObject);
+var
+  ImmedCollTime: string;
+begin
+  inherited;
+  ImmedCollTime := SelectImmediateCollectTime(Font.Size, txtImmedColl.Text);
+  if ImmedCollTime <> '-1' then
+    begin
+      txtImmedColl.Text := ImmedCollTime;
+      calCollTime.FMDateTime := StrToFMDateTime(ImmedCollTime);
+    end
+  else
+    begin
+      txtImmedColl.Clear;
+      calCollTime.Clear;
+    end;
+end;
+
+procedure TfrmODBBank.pgeProductChange(Sender: TObject);
+begin
+  inherited;
+  case pgeProduct.TabIndex of
+  TI_ORDER :     begin
+                  memMessage.Visible := true;
+                  memOrder.Visible := true;
+                  cmdAccept.Visible := true;
+                  pnlSelectedTests.Visible := true;
+                  pgeProduct.Height := 281;
+                end;
+  TI_INFO :     begin
+                  if lvSelectionList.Items.Count > 0 then exit;
+                  LRORDERMODE := TORDER_MODE_INFO;
+                  memMessage.Visible := false;
+                  memOrder.Visible := false;
+                  cmdAccept.Visible := false;
+                  pnlSelectedTests.Visible := false;
+                  pgeProduct.Height := 411;
+                end;
+  TI_RESULTS :  begin
+                  if lvSelectionList.Items.Count > 0 then exit;
+                  memMessage.Visible := false;
+                  memOrder.Visible := false;
+                  cmdAccept.Visible := false;
+                  pnlSelectedTests.Visible := false;
+                  pgeProduct.Height := 411;
+                end;
+  end; {case}
+end;
+
+procedure TfrmODBBank.cboCollTypeChange(Sender: TObject);
+begin
+  if (ALabTest = nil) or Changing or (cboCollType.ItemID = '') then exit;
+  if (cboCollType.ItemID = 'I') and (not ALabTest.LabCanCollect) then
+    begin
+      InfoBox(TX_NO_IMMED, TX_NO_IMMED_CAP, MB_OK or MB_ICONWARNING);
+      cboCollType.ItemIndex := -1;
+      Exit;
+    end;
+  SetupCollTimes(cboCollType.ItemID);
+end;
+
+procedure TfrmODBBank.LoadModifiers(AComboBox:TORComboBox);
+var
+  i: integer;
+begin
+  with AComboBox do
+    begin
+      Clear;
+      for i := 0 to uModifierList.Count - 1 do
+           Items.Add(uModifierList[i]);
+    end;
+end;
+
+procedure TfrmODBBank.LoadUrgencies(AComboBox:TORComboBox);
+var
+  i: integer;
+begin
+  with AComboBox do
+    begin
+      Clear;
+      for i := 0 to uUrgencyList.Count - 1 do
+         if (piece(uUrgencyList[i],'^',2) = 'STAT') and (StatAllowed(Patient.DFN) = false) then
+           Continue
+         else
+           Items.Add(uUrgencyList[i]);
+    end;
+end;
+
+procedure TfrmODBBank.btnAddTestsClick(Sender: TObject);
+var
+  aList, aTests, aRaw: TStringList;
+  ListItem: TListItem;
+  aStr, aMsg: String;                  //add independent structures for components, Tests, and associated fields.
+  aCollType, aModifier, aPreparation, aSurgery, aCollTime, aTestYes, aSpecimen, aCollSave: String;
+  CurAdd, i, j, k, getTest, TestAdded, aMSBOS, aMSBOSContinue: Integer;
+  x, name, aTypeScreen: String;
+begin
+  if not ValidAdd then Exit;
+  aList := TStringList.Create;
+  aTests := TStringList.Create;
+  aRaw := TStringList.Create;
+  try
+    aCollType := '';
+    aModifier := '';
+    aPreparation := '';
+    aSurgery := '';
+    aCollTime := '';
+    aTestYes := '0';
+    aTypeScreen := '';
+    uGetTnS := 0;
+    aSpecimen := '';
+    ExtractTypeScreen(aList, uVBECList);
+    if aList.Count > 0 then aTypeScreen := aList[0];
+    aList.Clear;
+    ExtractSpecimen(aList, uVBECList);
+    if aList.Count > 0 then aSpecimen := aList[0];
+    if LRORDERMODE = TORDER_MODE_DIAG then aTestYes := '1';
+    if length(cboModifiers.ItemID) > 0 then aModifier := cboModifiers.Items[cboModifiers.ItemIndex];
+    //if length(cboPreparation.ItemID) > 0 then aPreparation := cboPreparation.Items[cboPreparation.ItemIndex];
+    if length(cboSurgery.ItemID) > 0 then aSurgery := cboSurgery.Items[cboSurgery.ItemIndex];
+    if length(cboCollTime.ItemID) > 0 then aCollTime := cboCollTime.Items[cboCollTime.ItemIndex];
+    if (LRORDERMODE = TORDER_MODE_DIAG) and (length(cboAvailTest.ItemID) > 0) then
+      begin
+        uTestSelected := true;
+        with lvSelectionList do
+          begin
+            ListItem := Items.Add;
+            ListItem.Caption := piece(cboAvailTest.Items[cboAvailTest.ItemIndex],'^',2);
+            ListItem.SubItems.Add('');
+            if length(cboModifiers.ItemID) > 0 then ListItem.SubItems.Add(cboModifiers.Items[cboModifiers.ItemIndex])
+              else ListItem.SubItems.Add('');
+            ListItem.SubItems.Add(piece(cboAvailTest.Items[cboAvailTest.ItemIndex],'^',1));
+            if piece(cboAvailTest.Items[cboAvailTest.ItemIndex],'^',1) = aTypeScreen then
+              begin
+                lblTNS.Caption := '';
+                lblTNS.Visible := false;
+              end;
+          end;
+        lblCollTime.Enabled := false;
+        calCollTime.Enabled := false;
+        cboCollTime.Enabled := false;
+        lblCollType.Enabled := false;
+        cboCollType.Enabled := false;
+        cboAvailTest.ItemIndex := -1;
+      end;
+    if (LRORDERMODE = TORDER_MODE_COMP) and (length(cboAvailComp.ItemID) > 0) then
+      begin
+        if Length(cboSurgery.ItemID) > 0 then
+          begin
+            aList.Clear;
+            ExtractMSBOS(aList, uVBECList);    //Get maximum units for selected Surgey
+            for i := 0 to aList.Count - 1 do
+              begin
+                if (StrToInt(piece(aList[i],'^',1)) = aLabTest.ItemID)
+                 and (StrToInt(piece(aList[i],'^',2)) = cboSurgery.ItemID) then
+                  begin
+                    aMSBOS := StrToInt(piece(aList[i],'^',4));
+                    if (aMSBOS > 0) and (StrToInt(tQuantity.Text) > aMSBOS) then
+                      begin
+                        with Application do
+                        begin
+                          NormalizeTopMosts;
+                          aMSBOSContinue :=
+                            MessageBox(PChar('The number of units ordered (' + tQuantity.Text +
+                                       ') exceeds the maximum number of units (' + IntToStr(aMSBOS) +
+                                       ') for the ' + cboSurgery.text +
+                                       ' surgical procedure selected.' + CRLF + CRLF + 'Do you wish to continue?'),
+                                       PChar('Maximum Number of Units Exceeded'),
+                                       MB_YESNO);
+                          RestoreTopMosts;
+                        end;
+                        if aMSBOSContinue = 7 then
+                          begin
+                            ShowMessage(cboAvailComp.Text + ' has NOT been added to this request.');
+                            exit;
+                          end;
+                      end;
+                  end;
+              end;
+          end;
+        if SpecimenNeeded(aList, uVBECList, aLabTest.ItemID) then  //check to see if type and screen is needed
+          begin
+            uGetTnS := 1;
+            for i := 0 to lvSelectionList.Items.Count - 1 do
+              begin
+                if lvSelectionList.Items[i].SubItems[2] = aTypeScreen then
+                  begin
+                    uGetTnS := 0;
+                    uDfltUrgency := cboUrgency.ItemID;
+                    lblTNS.Caption := '';
+                    lblTNS.Visible := false;
+                    break;
+                  end;
+              end;
+          end;
+        aList.Clear;
+        ExtractSpecimens(aList, uVBECList);    //Get specimen values to pass back to Server
+        for i := 0 to aList.Count - 1 do
+          begin
+            if (StrToInt(piece(aList[i],'^',1)) = aLabTest.ItemID) then
+              begin
+                aSpecimen := piece(aList[i],'^',2) + '^' + aSpecimen;
+                break;
+              end;
+          end;
+        uComponentSelected := true;
+        with lvSelectionList do
+          begin
+            ListItem := Items.Add;
+            ListItem.Caption := piece(cboAvailComp.Items[cboAvailComp.ItemIndex],'^',2);
+            ListItem.SubItems.Add(tQuantity.Text);
+            if length(cboModifiers.ItemID) > 0 then ListItem.SubItems.Add(cboModifiers.Items[cboModifiers.ItemIndex])
+              else ListItem.SubItems.Add('');
+            ListItem.SubItems.Add(piece(cboAvailComp.Items[cboAvailComp.ItemIndex],'^',1));
+          end;
+        lblWanted.Enabled := false;
+        calWantTime.Enabled := false;
+        //lblPreparation.Enabled := false;
+        //cboPreparation.Enabled := false;
+        lblSurgery.Enabled := false;
+        cboSurgery.Enabled := false;
+        lblReason.Enabled := false;
+        tReason.Enabled := false;
+        chkConsent.Enabled := false;
+        cboAvailComp.ItemIndex := -1;
+      end;
+    if Sender <> Self then
+      Responses.Clear;       // Sender=Self when called from SELF
+    CurAdd := 1;
+    aStr := aTestYes + '^' + IntToStr(aLabTest.TestID) + '^' + tQuantity.Text + '^' + aModifier + '^' + aSpecimen;  //aSpecimen has 2 pieces
+    uSelectedItems.Add(aStr);
+    for i := 0 to uSelectedItems.Count - 1 do
+      begin
+        name := lvSelectionList.Items[i].Caption;
+        x := uSelectedItems[i];
+        if piece(x,'^',1) = '1' then    //Diagnostic Test related fields
+          begin
+            if Length(piece(x,'^',2)) > 0 then Responses.Update('ORDERABLE', CurAdd, piece(x,'^',2), name);
+          end
+        else
+          begin
+            if Length(piece(x,'^',2)) > 0 then Responses.Update('ORDERABLE', CurAdd, piece(x,'^',2), name);
+            if Length(piece(x,'^',3)) > 0 then Responses.Update('QTY', CurAdd, piece(x,'^',3), piece(x,'^',3));
+            if Length(piece(x,'^',4)) > 0 then Responses.Update('MODIFIER', CurAdd, piece(x,'^',4), aModifier);
+            if Length(piece(x,'^',5)) > 0 then Responses.Update('SPECSTS', CurAdd, pieces(x,'^',5,7), piece(x,'^',5));
+            if Length(cboSurgery.Text) > 0 then Responses.Update('MISC',1,cboSurgery.Text,cboSurgery.Text);
+          end;
+        Inc(CurAdd);
+        aList.Clear;
+        TestAdded := 0;
+        getTest := 0;
+        ExtractTests(aList, uVBECList);   //Get Results associated with ordered components
+        for j := 0 to aList.Count - 1 do
+          begin
+            if StrToInt(piece(aList[j],'^',1)) = aLabTest.ItemID then
+              begin
+                if uTestsForResults.Count < 1 then getTest := 1;
+                for k := 0 to uTestsForResults.Count - 1 do
+                  begin
+                    if piece(uTestsForResults[k],'^',1) = piece(aList[j],'^',3) then
+                      begin
+                        getTest := 0;
+                        break;
+                      end
+                    else getTest := 1;
+                  end;
+                if getTest = 1 then
+                  begin
+                    uTestsForResults.Add(piece(aList[j],'^',3));
+                    TestAdded := 1;
+                  end;
+              end;
+          end;
+        if TestAdded = 1 then
+          begin
+            edtResults.Clear;
+            aTests.Clear;
+            GetPatientBloodResults(aTests, Patient.DFN, uTestsForResults);
+            QuickCopy(ATests,edtResults);
+            if edtResults.Lines.Count > 0 then TabResults.ImageIndex := 1;
+            uRaw.Clear;
+            GetPatientBloodResultsRaw(uRaw, Patient.DFN, uTestsForResults);
+          end;
+      end;
+    if LRORDERMODE = TORDER_MODE_DIAG then
+      begin
+        if Length(calWantTime.Text) > 0 then Responses.Update('DATETIME',1,ValidCollTime(calWantTime.Text),calWantTime.Text);
+        with cboCollType do if Length(ItemID) > 0 then
+          begin
+            Responses.Update('COLLECT', 1, ItemID, ItemID) ;
+            FLastCollType := ItemID;
+          end;
+        if Length(cboUrgency.Text) > 0 then Responses.Update('URGENCY',1,cboUrgency.ItemID,cboUrgency.Text);
+        if Length(txtDiagComment.Text) > 0 then Responses.Update('COMMENT',1,txtDiagComment.Text,txtDiagComment.Text);
+        if cboCollType.ItemID = 'LC' then
+          begin
+            with cboCollTime do
+              if Length(ItemID) > 0 then
+                begin
+                  Responses.Update('START', 1, Copy(ItemID, 2, 999), Copy(ItemID, 2, 999));
+                  FLastLabCollTime := ItemID + U + Text;
+                end
+              else if Length(Text) > 0 then
+                begin
+                  Responses.Update('START', 1, ValidCollTime(Text), Text) ;
+                  FLastLabCollTime := ValidCollTime(Text);
+                end;
+          end
+        else
+          begin
+            with calCollTime do
+              if FMDateTime > 0 then
+                begin
+                  Responses.Update('START', 1, ValidCollTime(Text), Text);
+                  FLastColltime := ValidCollTime(Text);
+                end
+              else
+                begin
+                  Responses.Update('START', 1, '', '') ;
+                  FLastCollTime := '';
+                end;
+          end;
+      end;
+    if LRORDERMODE = TORDER_MODE_COMP then
+      begin
+        if Length(cboUrgency.Text) > 0 then Responses.Update('URGENCY',1,cboUrgency.ItemID,cboUrgency.Text);
+        if Length(txtDiagComment.Text) > 0 then Responses.Update('COMMENT',1,txtDiagComment.Text,txtDiagComment.Text);
+        if Length(calWantTime.Text) > 0 then Responses.Update('DATETIME',1,ValidCollTime(calWantTime.Text),calWantTime.Text);
+        //if Length(cboPreparation.Text) > 0 then Responses.Update('XFUSION',1,cboPreparation.ItemID,cboPreparation.Text);
+        if Length(cboSurgery.Text) > 0 then Responses.Update('MISC',1,cboSurgery.Text,cboSurgery.Text);
+        if Length(tReason.Text) > 0 then Responses.Update('REASON',1,tReason.Text,tReason.Text);
+        if chkConsent.Checked = true then Responses.Update('YN',1,'1','Yes');
+      end;
+    memOrder.Text := Responses.OrderText;
+    CurAdd := 1;
+    if uRaw.Count > 0 then
+      for j := 0 to uRaw.Count - 1 do
+        begin
+          if Length(uRaw[j]) > 0 then Responses.Update('RESULTS', CurAdd, uRaw[j], piece(uRaw[j],'^',1));
+          Inc(CurAdd);
+        end;
+    tQuantity.Text := '0';
+    ALabTest := nil;
+  finally
+    aList.Free;
+    aTests.Free;
+    aRaw.Free;
+  end;
+  aMsg := '';
+  if UgetTnS = 1 then
+    begin
+      lblTNS.Caption := 'TYPE + SCREEN must be added to order';
+      lblTNS.Visible := true;
+      cboAvailTest.SelectByID(aTypeScreen);
+      cboAvailTestSelect(self);
+    end;
+  {if getTnS = 1 then
+    begin
+      for i := 1 to cboAvailTest.Items.Count - 1 do
+        begin
+          if piece(cboAvailTest.Items[i],'^',1) = aTypeScreen then
+            begin
+              if piece(aSpecimen,'^',1) = '1' then
+                begin
+                  cboCollTime.Text := calWantTime.Text;
+                  aCollSave := cboCollTime.Text + '^' + cboCollTime.ItemID + '^' + cboCollType.Text + '^' + cboCollType.ItemID;
+                  cboCollTime.Text := '';
+                  cboCollType.Text := '';
+                  uSpecimen := 1;
+                end;
+              cboModifiers.Text := '';
+              cboAvailTest.SelectByID(aTypeScreen);
+              cboAvailTestSelect(Self);
+              btnAddTestsClick(Self);
+              uSpecimen := 0;
+              cboCollTime.Text := piece(aCollSave,'^',1);
+              cboCollType.Text := piece(aCollSave,'^',3);
+              aCollSave := '';
+              break;
+            end;
+        end;
+      aMsg := 'An order for Type and Screen has been added to this request' + '.';
+    end;
+  if (getTns = 1) then
+    begin
+      if length(aMsg) > 0 then aMsg := aMsg + crlf + crlf;
+      ShowMessage(aMsg);
+    end;}
+  cboModifiers.Text := '';
+  edtResults.Height := 247;
+  edtInfo.Height := 247;
+end;
+
+procedure TfrmODBBank.FormDestroy(Sender: TObject);
+begin
+  inherited;
+  uSelectedItems.Free;
+  uVBECList.Free;
+  uTestsForResults.Free;
+  uUrgencyList.Free;
+  uModifierList.Free;
+  uRaw.Free;
+end;
+
+procedure TfrmODBBank.btnRemoveClick(Sender: TObject);
+var
+  i,j,curAdd: integer;
+  x, name, aModifier, aTypeScreen: string;
+  aList: TStringList;
+begin
+  inherited;
+  aList := TStringList.Create;
+  curAdd := 1;
+  aModifier := '';
+  aTypeScreen := '';
+  ExtractTypeScreen(aList, uVBECList);
+  if aList.Count > 0 then aTypeScreen := aList[0];
+  aList.Clear;
+  if length(cboModifiers.ItemID) > 0 then aModifier := cboModifiers.Items[cboModifiers.ItemIndex];
+  with lvSelectionList do
+    begin
+      for i := lvSelectionList.Items.Count - 1 downto 0 do
+        begin
+          if lvSelectionList.Items[i].Selected = true then
+            for j := uSelectedItems.Count - 1 downto 0 do
+            if lvSelectionList.Items[i].SubItems[2] = piece(uSelectedItems[j],'^',2) then
+              begin
+                if lvSelectionList.Items[i].SubItems[2] = aTypeScreen then
+                  begin
+                    uGetTnS := 1;
+                    lblTNS.Caption := 'TYPE+SCREEN must be added to order';
+                    lblTNS.Visible := true;
+                  end;
+                uSelectedItems.Delete(j);
+                lvSelectionList.Items[i].Delete;
+                break;
+              end;
+        end;
+    end;
+  Responses.Clear;
+  for i := 0 to uSelectedItems.Count - 1 do
+    begin
+      name := lvSelectionList.Items[i].Caption;
+      x := uSelectedItems[i];
+      if piece(x,'^',1) = '1' then    //Diagnostic Test related fields
+        begin
+          if Length(piece(x,'^',2)) > 0 then Responses.Update('ORDERABLE', CurAdd, piece(x,'^',2), name);
+        end
+      else
+        begin
+          if Length(piece(x,'^',2)) > 0 then Responses.Update('ORDERABLE', CurAdd, piece(x,'^',2), name);
+          if Length(piece(x,'^',3)) > 0 then Responses.Update('QTY', CurAdd, piece(x,'^',3), piece(x,'^',3));
+          if Length(piece(x,'^',4)) > 0 then Responses.Update('MODIFIER', CurAdd, piece(x,'^',4), aModifier);
+          if Length(piece(x,'^',5)) > 0 then Responses.Update('SPECSTS', CurAdd, pieces(x,'^',5,7), piece(x,'^',5));
+        end;
+      Inc(CurAdd);
+    end;
+  if Length(calWantTime.Text) > 0 then Responses.Update('DATETIME',1,ValidCollTime(calWantTime.Text),calWantTime.Text);
+  if cboCollType.ItemID = 'LC' then
+    begin
+      with cboCollTime do
+        if Length(ItemID) > 0 then
+          begin
+            Responses.Update('START', 1, Copy(ItemID, 2, 999), Copy(ItemID, 2, 999));
+            FLastLabCollTime := ItemID + U + Text;
+          end
+        else if Length(Text) > 0 then
+          begin
+            Responses.Update('START', 1, ValidCollTime(Text), Text) ;
+            FLastLabCollTime := ValidCollTime(Text);
+          end;
+    end
+  else
+    begin
+      with calCollTime do
+        if FMDateTime > 0 then
+          begin
+            Responses.Update('START', 1, ValidCollTime(Text), Text);
+            FLastColltime := ValidCollTime(Text);
+          end
+        else
+          begin
+            Responses.Update('START', 1, '', '') ;
+            FLastCollTime := '';
+          end;
+    end;
+  with cboCollType do if Length(ItemID) > 0 then
+    begin
+      Responses.Update('COLLECT', 1, ItemID, ItemID) ;
+      FLastCollType := ItemID;
+    end;
+  if Length(cboUrgency.Text) > 0 then Responses.Update('URGENCY',1,cboUrgency.ItemID,cboUrgency.Text);
+  if Length(txtDiagComment.Text) > 0 then Responses.Update('COMMENT',1,txtDiagComment.Text,txtDiagComment.Text);
+  //if Length(cboPreparation.Text) > 0 then Responses.Update('XFUSION',1,cboPreparation.ItemID,cboPreparation.Text);
+  if Length(cboSurgery.Text) > 0 then Responses.Update('MISC',1,cboSurgery.Text,cboSurgery.Text);
+  if Length(tReason.Text) > 0 then Responses.Update('REASON',1,tReason.Text,tReason.Text);
+  if chkConsent.Checked = true then Responses.Update('YN',1,'1','Yes');
+  memOrder.Text := Responses.OrderText;
+  CurAdd := 1;
+  if uRaw.Count > 0 then
+    for j := 0 to uRaw.Count - 1 do
+      begin
+        if Length(uRaw[j]) > 0 then Responses.Update('RESULTS', CurAdd, uRaw[j], piece(uRaw[j],'^',1));
+        Inc(CurAdd);
+      end;
+  if uSelectedItems.Count < 1 then
+    begin
+      uGetTnS := 0;
+      lblTNS.Caption := '';
+      lblTNS.Visible := false;
+    end;
+  aList.Free;
+end;
+
+procedure TfrmODBBank.btnRemoveAllClick(Sender: TObject);
+begin
+  inherited;
+  lvSelectionList.Clear;
+  uSelectedItems.Clear;
+  uTestsForResults.Clear;
+  uRaw.Clear;
+  uGetTnS := 0;
+  lblTNS.Caption := '';
+  lblTNS.Visible := false;
+  InitDialog;
+end;
+
+procedure TfrmODBBank.cmdAcceptClick(Sender: TObject);
+var
+  i: integer;
+  Comp: boolean;
+const
+  Txt1 = 'This order can not be saved for the following reason(s):';
+  Txt2 = #13+#13+'An order for TYPE and SCREEN must be created with this order set.';
+begin
+  if uGetTnS = 1 then
+    begin
+      MessageDlg(Txt1+Txt2, mtWarning,[mbOK],0);
+      Exit;
+    end;
+  Comp := false;
+  if uSelectedItems.Count > 0 then
+    begin
+      for i := 0 to uSelectedItems.Count - 1 do
+        if not (piece(uSelectedItems[i],'^',1) = '1') then
+          begin
+            Comp := true;
+            Break;
+          end;
+    end;
+  if Comp = true then
+    ShowMessage('The nursing blood administration order must be entered separately' + '.');
+  inherited;
+end;
+
+procedure TfrmODBBank.calWantTimeChange(Sender: TObject);
+begin
+  inherited;
+  if uSelectedItems.Count > 0 then
+    if Length(calWantTime.Text) > 0 then Responses.Update('DATETIME',1,ValidCollTime(calWantTime.Text),calWantTime.Text);
+end;
+
+procedure TfrmODBBank.chkConsentClick(Sender: TObject);
+begin
+  inherited;
+  if uSelectedItems.Count > 0 then
+    begin
+      if chkConsent.Checked = true then Responses.Update('YN',1,'1','Yes')
+      else Responses.Update('YN',1,'0','No');
+    end;
+end;
+
+procedure TfrmODBBank.cboUrgencyChange(Sender: TObject);
+begin
+  inherited;
+  if Length(cboUrgency.Text) > 0 then
+    begin
+      Responses.Update('URGENCY',1,cboUrgency.ItemID,cboUrgency.Text);
+      if cboUrgency.Text = 'PRE-OP' then
+        begin
+          lblSurgery.Enabled := true;
+          cboSurgery.Enabled := true;
+        end
+      else
+        begin
+          lblSurgery.Enabled := false;
+          cboSurgery.Enabled := false;
+          cboSurgery.Text := '';
+          if uSelectedItems.Count > 0 then
+            Responses.Update('MISC',1,cboSurgery.Text,cboSurgery.Text);
+        end;
+    end;
+end;
+
+procedure TfrmODBBank.txtDiagCommentChange(Sender: TObject);
+begin
+  inherited;
+  if uSelectedItems.Count > 0 then
+    Responses.Update('COMMENT',1,txtDiagComment.Text,txtDiagComment.Text);
+end;
+
+procedure TfrmODBBank.cboPreparationChange(Sender: TObject);
+begin
+  inherited;
+  Exit;  // disable Preparation, since it is no longer needed by VBECS
+  if uSelectedItems.Count > 0 then
+    if Length(cboPreparation.Text) > 0 then
+      Responses.Update('XFUSION',1,cboPreparation.ItemID,cboPreparation.Text);
+end;
+
+procedure TfrmODBBank.cboSurgeryChange(Sender: TObject);
+begin
+  inherited;
+  if uSelectedItems.Count > 0 then
+    if Length(cboSurgery.Text) > 0 then
+      Responses.Update('MISC',1,cboSurgery.Text,cboSurgery.Text);
+end;
+
+procedure TfrmODBBank.tReasonChange(Sender: TObject);
+begin
+  inherited;
+  if uSelectedItems.Count > 0 then
+    if Length(tReason.Text) > 0 then
+      Responses.Update('REASON',1,tReason.Text,tReason.Text);
+end;
+
+procedure TfrmODBBank.calCollTimeChange(Sender: TObject);
+begin
+  inherited;
+  if uSelectedItems.Count > 0 then
+    begin
+      if cboCollType.ItemID = 'LC' then
+        begin
+          with cboCollTime do
+            if Length(ItemID) > 0 then
+              begin
+                Responses.Update('START', 1, Copy(ItemID, 2, 999), Copy(ItemID, 2, 999));
+                FLastLabCollTime := ItemID + U + Text;
+              end
+            else if Length(Text) > 0 then
+              begin
+                Responses.Update('START', 1, ValidCollTime(Text), Text) ;
+                FLastLabCollTime := ValidCollTime(Text);
+              end;
+        end
+      else
+        begin
+          with calCollTime do
+            if FMDateTime > 0 then
+              begin
+                Responses.Update('START', 1, ValidCollTime(Text), Text);
+                FLastColltime := ValidCollTime(Text);
+              end
+            else
+              begin
+                Responses.Update('START', 1, '', '') ;
+                FLastCollTime := '';
+              end;
+        end;
+    end;
+end;
+
+end.
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODBase.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODBase.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODBase.dfm	(revision 460)
@@ -4,4 +4,10 @@
   Width = 528
   Height = 275
+  HorzScrollBar.Range = 500
+  HorzScrollBar.Tracking = True
+  HorzScrollBar.Visible = True
+  VertScrollBar.Range = 225
+  VertScrollBar.Visible = True
+  AutoScroll = False
   BorderIcons = [biSystemMenu]
   Caption = ''
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODBase.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODBase.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODBase.pas	(revision 460)
@@ -62,4 +62,6 @@
     FLogTime:   TFMDateTime;
     FViewName: string;
+    FCancel: boolean;
+    FOrderContainsObjects: boolean;
     function FindResponseByIEN(APromptIEN, AnInstance: Integer): TResponse;
     function GetOrderText: string;
@@ -83,4 +85,5 @@
     function GetIENForPrompt(const APromptID: string): Integer;
     function FindResponseByName(const APromptID: string; AnInstance: Integer): TResponse;
+    function PromptExists(const APromptID: string):boolean;
     function InstanceCount(const APromptID: string): Integer;
     function IValueFor(const APromptID: string; AnInstance: Integer): string;
@@ -96,5 +99,5 @@
       const AnIValue, AnEValue: string);
     property Dialog: string            read FDialog         write SetDialog;
-    property DisplayGroup: Integer     read FDisplayGroup;
+    property DisplayGroup: Integer     read FDisplayGroup   write FDisplayGroup;
     property CopyOrder:    string      read FCopyOrder      write SetCopyOrder;
     property EditOrder:    string      read FEditOrder;  //  write SetEditOrder;
@@ -110,4 +113,6 @@
     property VarTrailing:  string      read FVarTrailing    write FVarTrailing;
     property TheList:      TList       read FResponseList   write FResponseList;
+    property Cancel:       boolean     read FCancel         write FCancel;
+    property OrderContainsObjects: boolean read FOrderContainsObjects write FOrderContainsObjects;
   end;
 
@@ -241,5 +246,5 @@
 uses fOCAccept, uODBase, rCore, rMisc, fODMessage,
   fTemplateDialog, uEventHooks, uTemplates, rConsults,fOrders,uOrders,
-  fFrame, uTemplateFields;
+  fFrame, uTemplateFields, fClinicWardMeds;
 
 const
@@ -583,4 +588,6 @@
 procedure TResponses.SetCopyOrder(const AnID: string);
 { sets responses to the values for an order that is created by copying }
+var
+  HasObjects: boolean;
 begin
   if AnID = '' then
@@ -590,30 +597,40 @@
   end;
   Clear;
-  LoadResponses(FResponseList, AnID);                      // Example AnID=C123456;1-3604
+  LoadResponses(FResponseList, AnID, HasObjects);                      // Example AnID=C123456;1-3604
   FCopyOrder := Copy(Piece(AnID, '-', 1), 2, Length(AnID));
+  FOrderContainsObjects := HasObjects;
 end;
 
 procedure TResponses.SetEditOrder(const AnID: string);
 { sets responses to the values for an order that is about to be edited }
+var
+  HasObjects: boolean;
 begin
   Clear;
-  LoadResponses(FResponseList, AnID);                      // Example AnID=X123456;1
+  LoadResponses(FResponseList, AnID, HasObjects);                      // Example AnID=X123456;1
   FEditOrder := Copy(Piece(AnID, '-', 1), 2, Length(AnID));
+  FOrderContainsObjects := HasObjects;
 end;
 
 procedure TResponses.SetQuickOrder(AnIEN: Integer);
 { sets responses to a quick order value - this is used by the QuickOrder property}
+var
+  HasObjects: boolean;
 begin
   Clear;
-  LoadResponses(FResponseList, IntToStr(AnIEN));           // Example AnIEN=134
+  LoadResponses(FResponseList, IntToStr(AnIEN), HasObjects);           // Example AnIEN=134
   FQuickOrder := AnIEN;
+  FOrderContainsObjects := HasObjects;
 end;
 
 procedure TResponses.SetQuickOrderByID(const AnID: string);
 { sets responses to a quick order value }
+var
+  HasObjects: boolean;
 begin
   Clear;
-  LoadResponses(FResponseList, AnID);                      // Example AnID=134-3645
+  LoadResponses(FResponseList, AnID, HasObjects);                      // Example AnID=134-3645
   FQuickOrder := StrToIntDef(Piece(AnID, '-', 1), 0);      // 2nd '-' piece is $H seconds
+  FOrderContainsObjects := HasObjects;
 end;
 
@@ -671,4 +688,13 @@
       break;
     end;
+end;
+
+function TResponses.PromptExists(const APromptID: string): boolean;
+var
+  i: Integer;
+begin
+  Result := False;
+  with FPrompts do for i := 0 to Count - 1 do with TPrompt(Items[i]) do
+    if (ID = APromptID) then Result :=  True;
 end;
 
@@ -958,4 +984,5 @@
   APtEvtPtr: string;
 begin
+  //IMOLoc := 0;
   NewPtEvtPtr := 0;
   QOUDGroup := False;
@@ -984,4 +1011,29 @@
     if IsIMODialog then
       DGroup := ClinDisp;
+    //AGP Change 26.35, 26.41 8518 added text order
+    //AGP Change 26.55 remove IMO functionality for inpatient
+    (*if (Patient.Inpatient = true) and (IsValidIMOLoc(encounter.Location,Patient.DFN)=true) and
+      ((ConstructOrder.DialogName = 'PSJ OR PAT OE') or (ConstructOrder.DialogName = 'PSJI OR PAT FLUID OE') or
+      (ConstructOrder.DialogName = 'OR GXTEXT WORD PROCESSING ORDE')) and
+      ((FEditOrder = '') and (Self.FEventName = '') and (Self.FCopyOrder = '')) then
+      begin
+       if frmClinicWardMeds.ClinicOrWardLocation(Encounter.location) = Encounter.Location then
+          begin
+            ConstructOrder.IsIMODialog := True;
+            ConstructOrder.DGroup := ClinDisp;
+          end
+       else IMOLoc := Patient.Location;
+      end; *)
+    //AGP Change 26.51, change logic to set text orders to IMO for outpatients at an outpatient location.
+    //AGP Text orders are only treated as IMO if the order display group is a nursing display group
+    if (Patient.Inpatient = False) and (IsValidIMOLoc(encounter.Location,Patient.DFN)=true) and
+       (((pos('OR GXTEXT WORD PROCESSING ORDE',ConstructOrder.DialogName)>0) and (ConstructOrder.DGroup = NurDisp)) or
+       ((ConstructOrder.DialogName = 'OR GXMISC GENERAL') and (ConstructOrder.DGroup = NurDisp)) or
+       ((ConstructOrder.DialogName = 'OR GXTEXT TEXT ONLY ORDER') and (ConstructOrder.DGroup = NurDisp))) and //AGP Change CQ #10757
+      ((FEditOrder = '') and (Self.FEventName = '') and (Self.FCopyOrder = '')) then
+         begin
+            ConstructOrder.IsIMODialog := True;
+            ConstructOrder.DGroup := ClinDisp;
+          end;
     IsEventDefaultOR := EventDefaultOD;
     if IsUDGroup or QOUDGroup then
@@ -1003,4 +1055,5 @@
       APtEvtPtr   := IntToStr(EventExist(Patient.DFN, FEventIFN));
       PTEventPtr  := APtEvtPtr;
+      //PutNewOrder(AnOrder, ConstructOrder, OrderSource, IMOLoc);
       PutNewOrder(AnOrder, ConstructOrder, OrderSource);
       if not SaveAsCurrent then
@@ -1012,4 +1065,5 @@
     else
     begin
+      //PutNewOrder(AnOrder, ConstructOrder, OrderSource, IMOLoc);
       PutNewOrder(AnOrder, ConstructOrder, OrderSource);
       if not SaveAsCurrent then
@@ -1064,4 +1118,5 @@
   AResponse: TResponse;
   IEN: integer;
+  HasObjects: boolean;
 
   procedure AssignBPText(List: TStrings; const Value: string);
@@ -1080,4 +1135,6 @@
       else         IEN := 0;
     end;
+    ExpandOrderObjects(tmp, HasObjects);
+    FOrderContainsObjects := FOrderContainsObjects or HasObjects;
     if IEN <> 0 then
       begin
@@ -1091,5 +1148,4 @@
     else
       CheckBoilerplate4Fields(tmp, cptn);
-
     List.Text := tmp;
   end;
@@ -1326,4 +1382,6 @@
   if (Encounter.Provider = 0) or (PersonHasKey(Encounter.Provider, 'PROVIDER') = False)
     then AnErrMsg := TX_NO_PROVIDER;
+  if IsPFSSActive and Responses.PromptExists('VISITSTR') then
+    Responses.Update('VISITSTR', 1, Encounter.VisitStr, Encounter.VisitStr);
 end;
 
@@ -1432,4 +1490,11 @@
   if not AcceptOrderChecks then
   begin
+    if AskAnotherOrder(DialogIEN) then
+        InitDialog           // ClearDialogControls is in InitDialog
+      else
+        begin
+          ClearDialogControls;    // to allow form to close without prompting to save order
+          Close;
+        end;
     Result := False;
     Exit;
@@ -1497,4 +1562,5 @@
   CIDCOkToSave := False;
   alreadyClosed := False;
+  self.Responses.Cancel := False;
   if frmOrders <> nil then
   begin
@@ -1589,4 +1655,5 @@
 begin
   inherited;
+  //self.Responses.Cancel := False;
   if User.NoOrdering then Exit;
   if FAbortOrder then exit;
@@ -1726,4 +1793,5 @@
 end;
 
+
 end.
 
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODDiet.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODDiet.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODDiet.dfm	(revision 460)
@@ -1,5 +1,7 @@
 inherited frmODDiet: TfrmODDiet
-  Left = 404
-  Top = 199
+  Left = 541
+  Top = 398
+  Width = 532
+  Height = 291
   Caption = 'Diet Order'
   OnKeyDown = FormKeyDown
@@ -9,6 +11,6 @@
     Left = 0
     Top = 0
-    Width = 520
-    Height = 186
+    Width = 524
+    Height = 194
     ActivePage = pgeOutPt
     Align = alTop
@@ -86,4 +88,5 @@
         OnMouseClick = cboDietAvailMouseClick
         OnNeedData = cboDietAvailNeedData
+        CharsNeedMatch = 1
       end
       object lstDietSelect: TORListBox
@@ -165,4 +168,5 @@
         TabOrder = 6
         OnChange = DietChange
+        CharsNeedMatch = 1
       end
       object chkCancelTubefeeding: TCheckBox
@@ -195,6 +199,6 @@
       end
       object lblOPDietAvail: TLabel
-        Left = 127
-        Top = 0
+        Left = 0
+        Top = 1
         Width = 70
         Height = 13
@@ -203,5 +207,5 @@
       object lblOPComment: TLabel
         Left = 4
-        Top = 117
+        Top = 128
         Width = 92
         Height = 13
@@ -216,6 +220,6 @@
       end
       object lblOPSelect: TLabel
-        Left = 127
-        Top = 38
+        Left = 0
+        Top = 39
         Width = 64
         Height = 13
@@ -223,6 +227,6 @@
       end
       object grpOPMeal: TKeyClickRadioGroup
-        Left = 5
-        Top = 5
+        Left = 168
+        Top = 11
         Width = 110
         Height = 107
@@ -234,5 +238,5 @@
           'Evening'
           '<none selected>')
-        TabOrder = 0
+        TabOrder = 3
         TabStop = True
         OnClick = grpOPMealClick
@@ -242,5 +246,5 @@
         Top = 5
         Width = 93
-        Height = 149
+        Height = 155
         Caption = 'Days of Week'
         TabOrder = 8
@@ -334,6 +338,6 @@
       end
       object cboOPDietAvail: TORComboBox
-        Left = 127
-        Top = 15
+        Left = 0
+        Top = 16
         Width = 157
         Height = 21
@@ -341,39 +345,4 @@
         AutoSelect = True
         Caption = 'Available Diet Components'
-        Color = clWindow
-        DropDownCount = 8
-        ItemHeight = 13
-        ItemTipColor = clWindow
-        ItemTipEnable = True
-        ListItemsOnly = True
-        LongList = True
-        LookupPiece = 0
-        MaxLength = 0
-        Pieces = '2'
-        Sorted = False
-        SynonymChars = '<>'
-        TabOrder = 1
-        OnExit = cboDietAvailExit
-        OnMouseClick = cboOPDietAvailMouseClick
-        OnNeedData = cboOPDietAvailNeedData
-      end
-      object txtOPDietComment: TCaptionEdit
-        Left = 4
-        Top = 131
-        Width = 404
-        Height = 21
-        MaxLength = 80
-        TabOrder = 11
-        OnChange = OPChange
-        Caption = 'Special Instructions'
-      end
-      object cboOPDelivery: TORComboBox
-        Left = 292
-        Top = 86
-        Width = 120
-        Height = 21
-        Style = orcsDropDown
-        AutoSelect = True
-        Caption = 'Delivery'
         Color = clWindow
         DropDownCount = 8
@@ -388,10 +357,47 @@
         Sorted = False
         SynonymChars = '<>'
-        TabOrder = 9
+        TabOrder = 0
+        OnExit = cboDietAvailExit
+        OnKeyDown = cboOPDietAvailKeyDown
+        OnMouseClick = cboOPDietAvailMouseClick
+        CharsNeedMatch = 1
+      end
+      object txtOPDietComment: TCaptionEdit
+        Left = 3
+        Top = 143
+        Width = 404
+        Height = 21
+        MaxLength = 80
+        TabOrder = 11
         OnChange = OPChange
+        Caption = 'Special Instructions'
+      end
+      object cboOPDelivery: TORComboBox
+        Left = 292
+        Top = 86
+        Width = 120
+        Height = 21
+        Style = orcsDropDown
+        AutoSelect = True
+        Caption = 'Delivery'
+        Color = clWindow
+        DropDownCount = 8
+        ItemHeight = 13
+        ItemTipColor = clWindow
+        ItemTipEnable = True
+        ListItemsOnly = True
+        LongList = False
+        LookupPiece = 0
+        MaxLength = 0
+        Pieces = '2'
+        Sorted = False
+        SynonymChars = '<>'
+        TabOrder = 6
+        OnChange = OPChange
+        CharsNeedMatch = 1
       end
       object lstOPDietSelect: TORListBox
-        Left = 127
-        Top = 52
+        Left = 0
+        Top = 53
         Width = 156
         Height = 56
@@ -399,17 +405,18 @@
         ParentShowHint = False
         ShowHint = True
-        TabOrder = 2
+        TabOrder = 1
         Caption = 'Selected Diet Components'
         ItemTipColor = clWindow
         LongList = False
         Pieces = '2'
+        OnChange = OPChange
       end
       object cmdOPRemove: TButton
-        Left = 212
-        Top = 109
+        Left = 85
+        Top = 110
         Width = 72
         Height = 17
         Caption = 'Remove'
-        TabOrder = 3
+        TabOrder = 2
         OnClick = cmdOPRemoveClick
       end
@@ -421,7 +428,7 @@
         Caption = 'Cancel Tubefeeding'
         State = cbGrayed
-        TabOrder = 10
+        TabOrder = 7
         Visible = False
-        OnClick = DietChange
+        OnClick = OPChange
       end
     end
@@ -469,4 +476,11 @@
         Height = 13
         Caption = 'Amount'
+      end
+      object lblOPTFStart: TLabel
+        Left = 341
+        Top = 90
+        Width = 51
+        Height = 13
+        Caption = 'Start Date:'
       end
       object cboProduct: TORComboBox
@@ -493,12 +507,13 @@
         OnExit = cboProductExit
         OnMouseClick = cboProductMouseClick
+        CharsNeedMatch = 1
       end
       object txtTFComment: TCaptionEdit
-        Left = 4
+        Left = 6
         Top = 133
         Width = 504
         Height = 21
         MaxLength = 240
-        TabOrder = 6
+        TabOrder = 8
         OnChange = TFChange
         Caption = 'Special Instructions'
@@ -542,11 +557,11 @@
       object txtQuantity: TCaptionEdit
         Tag = -1
-        Left = 340
-        Top = 108
+        Left = 151
+        Top = 124
         Width = 93
         Height = 19
         Hint = 
-          'Enter quantity as 2000 K, 100 CC/HOUR, 8 OZ/TID, etc; total quan' +
-          'tity may not exceed 5000cc.'
+          'Enter quantity as 2000 K, 100 ML/HOUR, 8 OZ/TID, etc; total quan' +
+          'tity may not exceed 5000ml.'
         Ctl3D = False
         ParentCtl3D = False
@@ -563,6 +578,6 @@
       object cboStrength: TCaptionComboBox
         Tag = -1
-        Left = 444
-        Top = 108
+        Left = 252
+        Top = 124
         Width = 53
         Height = 21
@@ -583,4 +598,42 @@
           'FULL')
         Caption = 'Strength'
+      end
+      object calOPTFStart: TORDateBox
+        Left = 341
+        Top = 104
+        Width = 169
+        Height = 21
+        TabStop = False
+        TabOrder = 7
+        Visible = False
+        OnChange = TFChange
+        DateOnly = False
+        RequireTime = False
+        Caption = 'Start Date:'
+      end
+      object cboOPTFRecurringMeals: TORComboBox
+        Left = 342
+        Top = 105
+        Width = 160
+        Height = 21
+        Style = orcsDropDown
+        AutoSelect = True
+        Color = clWindow
+        DropDownCount = 8
+        ItemHeight = 13
+        ItemTipColor = clWindow
+        ItemTipEnable = True
+        ListItemsOnly = False
+        LongList = False
+        LookupPiece = 0
+        MaxLength = 0
+        Pieces = '2,3'
+        Sorted = False
+        SynonymChars = '<>'
+        TabPositions = '12'
+        TabOrder = 6
+        TabStop = True
+        OnChange = TFChange
+        CharsNeedMatch = 1
       end
     end
@@ -705,5 +758,5 @@
         Width = 120
         Height = 21
-        TabOrder = 3
+        TabOrder = 4
         OnChange = calELStopChange
         DateOnly = True
@@ -717,5 +770,5 @@
         Height = 152
         Caption = 'Days of Week'
-        TabOrder = 4
+        TabOrder = 5
         object chkMonday: TCheckBox
           Left = 8
@@ -788,6 +841,31 @@
         Height = 17
         Caption = 'Bagged Meal'
-        TabOrder = 5
+        TabOrder = 6
         OnClick = ELChange
+      end
+      object cboOPELRecurringMeals: TORComboBox
+        Left = 287
+        Top = 15
+        Width = 121
+        Height = 21
+        Style = orcsDropDown
+        AutoSelect = True
+        Color = clWindow
+        DropDownCount = 8
+        ItemHeight = 13
+        ItemTipColor = clWindow
+        ItemTipEnable = True
+        ListItemsOnly = False
+        LongList = False
+        LookupPiece = 0
+        MaxLength = 0
+        Pieces = '2,3'
+        Sorted = False
+        SynonymChars = '<>'
+        TabPositions = '12'
+        TabOrder = 3
+        TabStop = True
+        OnChange = ELChange
+        CharsNeedMatch = 1
       end
     end
@@ -861,4 +939,11 @@
         Caption = 'Enter Additional Diet Order'
       end
+      object lblOPAOStart: TLabel
+        Left = 6
+        Top = 72
+        Width = 51
+        Height = 13
+        Caption = 'Start Date:'
+      end
       object txtAOComment: TCaptionEdit
         Left = 4
@@ -867,18 +952,63 @@
         Height = 21
         MaxLength = 80
-        TabOrder = 0
+        TabOrder = 1
         OnChange = AOChange
         Caption = 'Enter Additional Diet Order'
       end
+      object calOPAOStart: TORDateBox
+        Left = 54
+        Top = 88
+        Width = 169
+        Height = 21
+        TabStop = False
+        TabOrder = 4
+        Visible = False
+        OnChange = AOChange
+        DateOnly = False
+        RequireTime = False
+        Caption = 'Start Date:'
+      end
+      object cboOPAORecurringMeals: TORComboBox
+        Left = 6
+        Top = 88
+        Width = 168
+        Height = 21
+        Style = orcsDropDown
+        AutoSelect = True
+        Color = clWindow
+        DropDownCount = 8
+        ItemHeight = 13
+        ItemTipColor = clWindow
+        ItemTipEnable = True
+        ListItemsOnly = False
+        LongList = False
+        LookupPiece = 0
+        MaxLength = 0
+        Pieces = '2,3'
+        Sorted = False
+        SynonymChars = '<>'
+        TabPositions = '12'
+        TabOrder = 2
+        TabStop = True
+        OnChange = AOChange
+        CharsNeedMatch = 1
+      end
     end
   end
+  inherited memOrder: TCaptionMemo
+    Top = 208
+  end
   inherited cmdAccept: TButton
+    Left = 445
+    Top = 208
     TabOrder = 2
   end
   inherited cmdQuit: TButton
+    Left = 445
+    Top = 235
     TabOrder = 3
   end
   inherited pnlMessage: TPanel
-    Top = 172
+    Top = 197
     Height = 57
     TabOrder = 1
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODDiet.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODDiet.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODDiet.pas	(revision 460)
@@ -96,4 +96,11 @@
     cmdOPRemove: TButton;
     chkOPCancelTubefeeding: TCheckBox;
+    calOPTFStart: TORDateBox;
+    lblOPTFStart: TLabel;
+    lblOPAOStart: TLabel;
+    calOPAOStart: TORDateBox;
+    cboOPAORecurringMeals: TORComboBox;
+    cboOPTFRecurringMeals: TORComboBox;
+    cboOPELRecurringMeals: TORComboBox;
     procedure nbkDietChanging(Sender: TObject;
       var AllowChange: Boolean);
@@ -137,7 +144,4 @@
     procedure FormKeyDown(Sender: TObject; var Key: Word;
       Shift: TShiftState);
-   //  Outpatient meal additions
-    procedure cboOPDietAvailNeedData(Sender: TObject;
-      const StartFrom: String; Direction, InsertAt: Integer);
     procedure cboOPDietAvailMouseClick(Sender: TObject);
     procedure cboOPDietAvailExit(Sender: TObject);
@@ -149,4 +153,6 @@
     procedure grpOPMealClick(Sender: TObject);
     procedure cmdOPRemoveClick(Sender: TObject);
+    procedure cboOPDietAvailKeyDown(Sender: TObject; var Key: Word;
+      Shift: TShiftState);
   private
     FNextCol: Integer;
@@ -177,6 +183,8 @@
     function TFStrengthCode(const x: string): Integer;
    //  Outpatient meal additions
+    function  FMDOW(AnFMDate: TFMDateTime): integer;
+    function  FMDays(AStart, AEnd: TFMDateTime): string;
     function  GetOPDaysOfWeek: string;
-    procedure SetEnableOPDOW(AllowUse: Boolean);
+    procedure SetEnableOPDOW(AllowUse: Boolean; OneTimeDay: integer; DaysToCheck: string = '');
     procedure ResetControlsOP;
     procedure SetValuesFromResponsesOP;
@@ -184,4 +192,5 @@
     procedure OPDietCheckForNPO;
     procedure OPDietCheckForTF;
+    function PatientHasRecurringMeals(var MealList: TStringList; MealType: string = ''): boolean;
   protected
     procedure InitDialog; override;
@@ -195,4 +204,5 @@
   uDialogName: string;
   uFHAUTH: boolean;
+  uRecurringMealList: TStringList;
 
 implementation
@@ -200,5 +210,5 @@
 {$R *.DFM}
 
-uses uCore, rODBase, rODDiet, rCore, rOrders, fODDietLT, uAccessibleStringGrid;
+uses uCore, rODBase, rODDiet, rCore, rOrders, fODDietLT, uAccessibleStringGrid, DateUtils;
 
 const
@@ -209,6 +219,5 @@
   TX_DIET_PRC = 'This diet conflicts with ';
   TC_DIET_ERR = 'Unable to Add Diet';
-  TX_INPT_ONLY = 'Diets may be entered for inpatients only.';
-  //TX_INPT_ONLY = 'This type of diet may be entered for inpatients only.';
+  TX_INPT_ONLY = 'This type of diet may be entered for inpatients only.';
   TC_INPT_ONLY = 'Ordering Restriction';
   TX_CANCEL_TF = 'Cancel the current tubefeeding order?' + CRLF + CRLF;
@@ -221,7 +230,7 @@
   TX_TFQTY  = 'A quantity must be entered for ';
   TX_TFAMT  = 'The quantity is invalid for ';
-  TX_TF5000 = 'The total quantity ordered may not exceed 5000cc.';
+  TX_TF5000 = 'The total quantity ordered may not exceed 5000ml.';
   TX_HLPQTY = CRLF + 'The following may be entered for quantity:' + CRLF +
-              '  Units may be K for Kcals, C for cc''s, O for oz. or U for units (e.g. cans).' + CRLF +
+              '  Units may be K for Kcals, C for cc''s, M for ml, O for oz. or U for units (e.g. cans).' + CRLF +
               '  Frequency may be DAY, HOUR, QD, QH, BID, TID, QID, Q2H, Q3H, Q4H, or Q6H.' + CRLF +
               '  May also input 100CC/HR X 16 for 16 hours.  Valid quantity for powder form' + CRLF +
@@ -242,4 +251,6 @@
   TX_AONONE      = 'Text for additional order has not been entered.';
   TX_ACCEPT      = 'Accept the following order?' + CRLF + CRLF;
+  TX_CONTINUE    = 'Continue editing the following order?' + CRLF + CRLF;
+  TX_DISCARD     = CRLF + CRLF + 'Answering NO will discard all changes.';
   TC_ACCEPT      = 'Unsaved Order';
   TX_EL_SAVE_ERR    = 'An error occurred while saving this late tray order.';
@@ -274,4 +285,17 @@
                     'coordinator enters times for E/L trays for this location.';
   TC_NO_PARAMS    = 'Unable to Order Early/Late Tray';
+  TX_NOSTART   = 'A valid start date must be entered.';
+  TC_NOSTART   = 'Start date required';
+  TX_NOT_THIS_LOC = 'This location has not been configured to' + CRLF +
+                    'allow ordering of meals for outpatients.' + CRLF + CRLF +
+                    'Please contact your IRM diet package coordinator.';
+  TC_NOT_THIS_LOC = 'Unable to order from this location';
+  TX_NO_OUTPT_ORDERS = 'Diet orders may only be entered for inpatients.';
+  TC_NO_OUTPT_ORDERS = 'Ordering Restriction';
+  TX_NO_MEALS_DEFINED = 'No diet types have been defined to be orderable for outpatients.' + CRLF + CRLF +
+                        'Please contact your IRM diet package coordinator.';
+  TC_NO_MEALS_DEFINED = 'Unable to order outpatient meals';
+
+  FMDayLetters: array[1..7] of string[1] = ('M', 'T', 'W', 'R', 'F', 'S', 'X');
 
 type
@@ -290,4 +314,6 @@
 begin
   inherited;
+  AbortOrder := False;
+  uRecurringMealList := TStringList.Create;
   if OrderForInpatient then
     begin
@@ -302,6 +328,6 @@
   else                                         // this block will go away after FH patch installed everywhere
     begin
-      InfoBox(TX_INPT_ONLY, TC_INPT_ONLY, MB_OK);
-      Close;
+      InfoBox(TX_NO_OUTPT_ORDERS, TC_NO_OUTPT_ORDERS, MB_OK);
+      AbortOrder := True;
       Exit;
     end;
@@ -313,23 +339,30 @@
   if StrToIntDef(ALocation, 0) < 1 then
     ALocation := IntToStr(Encounter.Location);
-  LoadDietParams(uDietParams, ALocation);
-  if pgeOutPt.TabVisible then
-    with uDietParams, cboOPDelivery do
-    begin
-      if Tray      then Items.Add('T^Tray');
-      if Cafeteria then Items.Add('C^Cafeteria');
-      if DiningRm  then Items.Add('D^Dining Room');
-      //if Bagged    then Items.Add('B^Bagged');  // ????
-      ItemIndex := 0;
-      chkBagged.Visible := uDietParams.Bagged;    // ????
+  if (not OrderForInpatient) and OutpatientPatchInstalled and (not OutpatientLocationConfigured(ALocation)) then
+    begin
+      InfoBox(TX_NOT_THIS_LOC, TC_NOT_THIS_LOC, MB_OK or MB_ICONINFORMATION);
+      AbortOrder := True;
     end
   else
-    with uDietParams, cboDelivery do
-    begin
-      if Tray      then Items.Add('T^Tray');
-      if Cafeteria then Items.Add('C^Cafeteria');
-      if DiningRm  then Items.Add('D^Dining Room');
-      ItemIndex := 0;
-      chkBagged.Visible := uDietParams.Bagged;
+    begin
+      LoadDietParams(uDietParams, ALocation);
+      if pgeOutPt.TabVisible then
+        with uDietParams, cboOPDelivery do
+        begin
+          if Tray      then Items.Add('T^Tray');
+          if Cafeteria then Items.Add('C^Cafeteria');
+          if DiningRm  then Items.Add('D^Dining Room');
+          ItemIndex := 0;
+          chkBagged.Visible := uDietParams.Bagged;
+        end
+      else
+        with uDietParams, cboDelivery do
+        begin
+          if Tray      then Items.Add('T^Tray');
+          if Cafeteria then Items.Add('C^Cafeteria');
+          if DiningRm  then Items.Add('D^Dining Room');
+          ItemIndex := 0;
+          chkBagged.Visible := uDietParams.Bagged;
+        end;
     end;
   TAccessibleStringGrid.WrapControl(grdSelected);
@@ -340,4 +373,5 @@
   TAccessibleStringGrid.UnwrapControl(grdSelected);
   TFClearGrid;
+  uRecurringMealList.Free;
   inherited;
 end;
@@ -350,5 +384,5 @@
     ColWidths[1] := Canvas.TextWidth('XFULLX') + GetSystemMetrics(SM_CXVSCROLL);
     ColWidths[2] := Canvas.TextWidth('100 GRAMS/HOUR X 24');
-    ColWidths[3] := Canvas.TextWidth('55000cc');
+    ColWidths[3] := Canvas.TextWidth('55000ml');
     ColWidths[0] := ClientWidth - ColWidths[1] - ColWidths[2] - ColWidths[3] - 3;
     lblTFStrength.Left := Left + ColWidths[0] + 3;
@@ -368,4 +402,5 @@
 procedure TfrmODDiet.SetupDialog(OrderAction: Integer; const ID: string);
 begin
+  if AbortOrder then exit;
   inherited;
   uDialogName := ExternalName(DialogIEN, 101.41);
@@ -396,4 +431,9 @@
        end;
   'T': begin
+         if (not OrderForInpatient) and (not PatientHasRecurringMeals(uRecurringMealList)) then
+         begin
+           Close;
+           Exit;
+         end;
          nbkDiet.ActivePage := pgeTubefeeding;
          nbkDietChange(Self);
@@ -401,4 +441,9 @@
        end;
   'E': begin
+         if (not OrderForInpatient) and (not PatientHasRecurringMeals(uRecurringMealList)) then
+         begin
+           Close;
+           Exit;
+         end;
          nbkDiet.ActivePage := pgeEarlyLate;
          nbkDietChange(Self);
@@ -411,4 +456,9 @@
        end;
   'A': begin
+         if (not OrderForInpatient) and (not PatientHasRecurringMeals(uRecurringMealList)) then
+         begin
+           Close;
+           Exit;
+         end;
          nbkDiet.ActivePage := pgeAdditional;
          nbkDietChange(Self);
@@ -442,4 +492,5 @@
         nbkDietChange(Self);
         if OrderAction <> ORDER_NEW then SetValuesFromResponsesDO;
+        ActiveControl := cboOPDietAvail;
       end;
   end;
@@ -517,16 +568,21 @@
     end;
     if Sum > 5000 then SetError(TX_TF5000);
+    if not OrderForInpatient then
+      if not calOPTFStart.IsValid      then SetError(TX_BAD_START);
   end;
   if nbkDiet.ActivePage = pgeEarlyLate then
   begin
     if grpMeal.ItemIndex = 3                                   then SetError(TX_ELMEAL);
-    if GetMealTime = ''                                        then SetError(TX_ELTIME);
     if not calELStart.IsValid                                  then SetError(TX_ELNOSTART);
-    if not calELStop.IsValid                                   then SetError(TX_ELNOSTOP);
     if calELStart.FMDateTime < FMToday                         then SetError(TX_ELSTARTLT);
-    if calELStop.FMDateTime < FMToday                          then SetError(TX_ELSTOPLT);
-    if calELStop.FMDateTime < calELStart.FMDateTime            then SetError(TX_ELSTOPSTART);
     if calELStart.FMDateTime > FMDateTimeOffsetBy(FMToday, 30) then SetError(TX_ELSTART30);
-    if calELStop.FMDateTime > FMDateTimeOffsetBy(FMToday, 30)  then SetError(TX_ELSTOP30);
+    if OrderForInpatient then
+    begin
+      if GetMealTime = ''                                        then SetError(TX_ELTIME);
+      if not calELStop.IsValid                                   then SetError(TX_ELNOSTOP);
+      if calELStop.FMDateTime < FMToday                          then SetError(TX_ELSTOPLT);
+      if calELStop.FMDateTime < calELStart.FMDateTime            then SetError(TX_ELSTOPSTART);
+      if calELStop.FMDateTime > FMDateTimeOffsetBy(FMToday, 30)  then SetError(TX_ELSTOP30);
+    end;
     if grpDOW.Enabled and (GetDaysOfWeek = '')                 then SetError(TX_ELDOW);
     if MealTimePassed                                          then SetError(TX_ELPAST);
@@ -539,6 +595,7 @@
   begin
     if not ContainsVisibleChar(txtAOComment.Text)              then SetError(TX_AONONE);
-  end;
-{ TODO -oRich V. -cOutpatient Meals : Add any required Outpatient Meals validation code here }
+    if not OrderForInpatient then
+      if not calOPAOStart.IsValid                              then SetError(TX_BAD_START);
+  end;
   if nbkDiet.ActivePage = pgeOutPt then
   begin
@@ -580,13 +637,30 @@
   FTabChanging := True;
   if Length(memOrder.Text) > 0 then
-    if InfoBox(TX_ACCEPT + memOrder.Text, TC_ACCEPT, MB_YESNO) = ID_YES then
-    begin
-      cmdAcceptClick(Self);
-      AllowChange := AcceptOK;
-    end else
-    begin
-      memOrder.Text := '';
-      memOrder.Lines.Clear;
-      Responses.Clear;
+    begin
+      if nbkDiet.ActivePage = pgeOutpt then
+        begin
+          if InfoBox(TX_CONTINUE + memOrder.Text + TX_DISCARD, TC_ACCEPT, MB_YESNO) = ID_YES then
+            begin
+              AllowChange := FALSE;
+            end else
+            begin
+              memOrder.Text := '';
+              memOrder.Lines.Clear;
+              Responses.Clear;
+            end;
+        end
+      else
+        begin
+          if InfoBox(TX_ACCEPT + memOrder.Text, TC_ACCEPT, MB_YESNO) = ID_YES then
+            begin
+              cmdAcceptClick(Self);
+              AllowChange := AcceptOK;
+            end else
+            begin
+              memOrder.Text := '';
+              memOrder.Lines.Clear;
+              Responses.Clear;
+            end;
+        end
     end;
   FTabChanging := False;
@@ -594,7 +668,22 @@
 
 procedure TfrmODDiet.nbkDietChange(Sender: TObject);
+var
+  x, CxMsg: string ;
+  i: integer;
+  AStringList: TStringList;
+const
+//  TX_CX_CUR = 'A new diet order will CANCEL and REPLACE this current diet:' + CRLF + CRLF;
+  TX_CX_CUR = 'A new diet order will CANCEL and REPLACE this current diet now unless' + CRLF +
+              'you specify a start date for when the new diet should replace the current' + CRLF +
+              'diet:' + CRLF + CRLF;
+  TX_CX_FUT = 'A new diet order with no expiration date will CANCEL and REPLACE these diets:' + CRLF + CRLF;
 begin
   inherited;
   // much of the logic here can be eliminated if ClearDialogControls starts clearing containers
+  if AbortOrder then
+  begin
+    cmdQuitClick(Self);
+    exit;
+  end;
   StatusText('Loading Dialog Definition');
   if Sender <> Self then Responses.Clear;
@@ -603,5 +692,36 @@
   begin
     AllowQuickOrder := True;
-    OrderMessage(CurrentDietText);
+    x := CurrentDietText;
+    if Piece(x, #13, 1) <> 'Current Diet:  ' then
+    begin
+      AStringList := TStringList.Create;
+      try
+        AStringList.Text := x;
+        CxMsg := TX_CX_CUR + #9 + Piece(AStringList[0], ':', 1) + ':' + CRLF + CRLF
+                 + #9 + Copy(AStringList[0], 16, 99) + CRLF;
+        if AStringList.Count > 1 then
+        begin
+          CxMsg := CxMsg + CRLF + CRLF +
+                   TX_CX_FUT + #9 + Piece(AStringList[1], ':', 1) + ':' + CRLF + CRLF
+                   + #9 + Copy(AStringList[1], 22, 99) + CRLF;
+          if AStringList.Count > 2 then
+          for i := 2 to AStringList.Count - 1 do
+            CxMsg := CxMsg + #9 + TrimLeft(AStringList[i]) + CRLF;
+        end;
+      finally
+        AStringList.Free;
+      end;
+    end;
+    if CxMsg <> '' then
+    begin
+      if InfoBox(CxMsg + CRLF +
+                'Are you sure?', 'Confirm', MB_ICONWARNING or MB_YESNO) = ID_NO then
+      begin
+        AbortOrder := True;
+        cmdQuitClick(Self);
+        exit;
+      end;
+    end;
+    OrderMessage(x);
     Responses.Dialog := 'FHW1';                            // Diet Order
     DisplayGroup := DisplayGroupForDialog('FHW1');
@@ -615,12 +735,19 @@
   if nbkDiet.ActivePage = pgeTubefeeding then
   begin
-{ TODO -oRich V. -cOutpatient Meals : Prompt for which recurring meal(s) to apply this order against }
     if not OrderForInpatient then
     begin
-      // get list of existing OP recurring meals
-      // if none, then exit with message
-      // if some, display and allow selection of multiple dates/times
-      // set different dialog/display group?
-    end;
+      if not PatientHasRecurringMeals(uRecurringMealList) then
+        begin
+          Changing := False;
+          nbkDiet.ActivePage := pgeOutPt;
+          nbkDietChange(nbkDiet);
+          Exit;
+          end
+        else
+          cboOPTFRecurringMeals.Items.Assign(uRecurringMealList);
+    end;
+    cboOPTFRecurringMeals.Visible := not OrderForInpatient;
+    calOPTFStart.Visible := False;
+    lblOPTFStart.Visible := not OrderForInpatient;
     AllowQuickOrder := True;
     if Length(uDietParams.CurTF) > 0
@@ -644,19 +771,32 @@
   if nbkDiet.ActivePage = pgeEarlyLate then
   begin
-{ TODO -oRich V. -cOutpatient Meals : Prompt for which recurring meal to apply this order against }
     if not OrderForInpatient then
-    begin
-      // get list of existing OP recurring meals
-      // if none, then exit with message
-      // if some, display and allow selection of one and only one
-      // set different dialog/display group?
-    end
+      begin
+        if not PatientHasRecurringMeals(uRecurringMealList) then
+          begin
+            Changing := False;
+            nbkDiet.ActivePage := pgeOutPt;
+            nbkDietChange(nbkDiet);
+            Exit;
+          end
+        else
+          cboOPELRecurringMeals.Items.Assign(uRecurringMealList);
+      end
     else if (StrToIntDef(uDietParams.EarlyIEN, 0) = 0) or (StrToIntDef(uDietParams.LateIEN, 0) = 0) then
-    begin
-      InfoBox(TX_NO_PARAMS, TC_NO_PARAMS, MB_ICONERROR or MB_OK);
-      if pgeEarlyLate <> nil then
-        nbkDiet.SelectNextPage(False);
-      Exit;
-    end;
+      begin
+        InfoBox(TX_NO_PARAMS, TC_NO_PARAMS, MB_ICONERROR or MB_OK);
+        if pgeEarlyLate <> nil then
+          nbkDiet.SelectNextPage(False);
+        Changing := False;
+        Exit;
+      end;
+    cboOPELRecurringMeals.Visible := not OrderForInpatient;
+    cboOPELRecurringMeals.TabStop := not OrderForInpatient;
+    calELStart.Visible := OrderForInpatient;
+    calELStart.TabStop := OrderForInpatient;
+    calELStop.Visible := OrderForInpatient;
+    lblELStop.Visible := OrderForInpatient;
+    grpDOW.Visible := OrderForInpatient;
+    grpDOW.Enabled := OrderForInpatient;
     AllowQuickOrder := False;
     OrderMessage('');
@@ -678,12 +818,19 @@
   if nbkDiet.ActivePage = pgeAdditional then
   begin
-{ TODO -oRich V. -cOutpatient Meals : Prompt for which recurring meal(s) to apply this order against }
-    if not OrderForInpatient then
-    begin
-      // get list of existing OP recurring meals
-      // if none, then exit with message
-      // if some, display and allow selection of multiple dates/times
-      // set different dialog/display group?
-    end;
+  if not OrderForInpatient then
+    begin
+      if not PatientHasRecurringMeals(uRecurringMealList) then
+        begin
+          Changing := False;
+          nbkDiet.ActivePage := pgeOutPt;
+          nbkDietChange(nbkDiet);
+          Exit;
+        end
+      else
+        cboOPAORecurringMeals.Items.Assign(uRecurringMealList);
+    end;
+    cboOPAORecurringMeals.Visible := not OrderForInpatient;
+    calOPAOStart.Visible := False;  //not OrderForInpatient;
+    lblOPAOStart.Visible := not OrderForInpatient;
     AllowQuickOrder := False;
     OrderMessage('');
@@ -694,25 +841,18 @@
   if nbkDiet.ActivePage = pgeOutPt then
   begin
-    OrderMessage(CurrentDietText);
+    x := CurrentDietText;
+    if Length(Piece(x, #$D, 1)) > Length('Current Diet:  ') then
+      OrderMessage(x)
+    else
+      OrderMessage('');
+    if (uDialogName <> 'FHW SPECIAL MEAL') and (uDialogName <> 'FHW OP MEAL') then
+      uDialogName := 'FHW OP MEAL';
     Responses.Dialog := uDialogName;
     DisplayGroup := DisplayGroupForDialog(uDialogName);
-    if uDialogName = 'FHW OP MEAL' then                          // Recurring meal
-      begin
-       AllowQuickOrder := True;
-       ResetControlsOP;
-       LoadDietQuickList(cboOPDietAvail.Items, 'MEAL');              // use D.G. short name here
-       cboOPDietAvail.InsertSeparator;
-       cboOPDietAvail.InitLongList('');
-       { TODO -oRich V. -cOutpatient Meals : Need to DC Tubefeeding order for OP meals? }
-       chkOPCancelTubefeeding.State := cbGrayed;
-       chkOPCancelTubefeeding.Visible := False;
-       grpOPMeal.Caption := 'Recurring Meal';
-       SetEnableOPDOW(False);
-      end
-    else if uDialogName = 'FHW SPECIAL MEAL' then                 // Special meal
+    if uDialogName = 'FHW SPECIAL MEAL' then                 // Special meal
       begin
        AllowQuickOrder := False;
        ResetControlsOP;
-       cboOPDietAvail.InitLongList('');
+       cboOPDietAvail.Items.AddStrings(SubsetOfOPDiets);
        { TODO -oRich V. -cOutpatient Meals : Need to DC Tubefeeding order for OP meals? }
        chkOPCancelTubefeeding.State := cbGrayed;
@@ -723,6 +863,23 @@
        pgeAdditional.TabVisible := False;
        pgeEarlyLate.TabVisible := False;
-       cboOPDietAvail.SelectByIEN(uDietParams.RegIEN);
+       cboOPDietAvail.SelectByIEN(uDietParams.OPDefaultDiet);
        cboOPDietAvailMouseClick(Self);
+       Changing := False;
+      end
+    else if uDialogName = 'FHW OP MEAL' then                          // Recurring meal
+      begin
+       AllowQuickOrder := True;
+       ResetControlsOP;
+       LoadDietQuickList(cboOPDietAvail.Items, 'MEAL');              // use D.G. short name here
+       cboOPDietAvail.InsertSeparator;
+       cboOPDietAvail.Items.AddStrings(SubsetOfOPDiets);
+       cboOPDietAvail.SelectByIEN(uDietParams.OPDefaultDiet);
+       { TODO -oRich V. -cOutpatient Meals : Need to DC Tubefeeding order for OP meals? }
+       chkOPCancelTubefeeding.State := cbGrayed;
+       chkOPCancelTubefeeding.Visible := False;
+       grpOPMeal.Caption := 'Recurring Meal';
+       SetEnableOPDOW(False, -1);
+       cboOPDietAvailMouseClick(Self);
+       Changing := False;
       end;
   end;
@@ -802,4 +959,5 @@
           InfoBox(Piece(ADiet,'^',2), TC_DIET_ERR, MB_OK);
           cboDietAvail.ItemIndex := -1;
+          Changing := False;
           Exit;
         end;
@@ -935,4 +1093,5 @@
   TFClearGrid;
   chkCancelTrays.Checked := False;
+  calOPTFStart.Text := '';
   txtTFComment.Text := '';
 end;
@@ -973,4 +1132,9 @@
     AResponse := FindResponseByName('CANCEL', 1);
     if AResponse <> nil then chkCancelTrays.Checked := AResponse.IValue = '1';
+    if not OrderForInpatient then
+    begin
+      SetControl(cboOPTFRecurringMeals, 'DATETIME', 1);
+      SetControl(calOPTFStart, 'DATETIME', 1);
+    end;
     SetControl(txtTFComment, 'COMMENT',  1);
   end;
@@ -1114,5 +1278,5 @@
     begin
       grdSelected.Cells[2, ARow] := Piece(x, U, 2);
-      grdSelected.Cells[3, ARow] := Piece(x, U, 1) + 'cc';
+      grdSelected.Cells[3, ARow] := Piece(x, U, 1) + 'ml';
     end
     else grdSelected.Cells[3, ARow] := '';
@@ -1268,4 +1432,9 @@
     then Responses.Update('CANCEL', 1, '1', 'Yes')
     else Responses.Update('CANCEL', 1, '0', 'No');
+  if not OrderForInpatient then
+  begin
+    calOPTFStart.FMDateTime := StrToFloatDef(cboOPTFRecurringMeals.ItemID, 0);
+    Responses.Update('DATETIME', 1, FloatToStr(calOPTFStart.FMDateTime), calOPTFStart.Text);
+  end;
   memOrder.Text := Responses.OrderText;
 end;
@@ -1323,6 +1492,11 @@
       if radLT3.Caption = AResponse.IValue then radLT3.Checked := True;
     end;
-    SetControl(calELStart, 'START', 1);
-    SetControl(calELStop,  'STOP',  1);
+    if not OrderForInpatient then
+      SetControl(cboOPELRecurringMeals, 'START', 1)
+    else
+    begin
+      SetControl(calELStart, 'START', 1);
+      SetControl(calELStop,  'STOP',  1);
+    end;
     calELStopChange(Self);
     AResponse := FindResponseByName('SCHEDULE', 1);
@@ -1403,13 +1577,46 @@
     lblNoTimes.Visible := not HasTimes;
   end;
-
-begin
-  inherited;
+var
+  AMeal: string;
+begin
+  inherited;
+  Changing := True;
   case grpMeal.ItemIndex of
-    0: SetMealTimes(uDietParams.BTimes);
-    1: SetMealTimes(uDietParams.NTimes);
-    2: SetMealTimes(uDietParams.ETimes);
-  else SetMealTimes('');
-  end;
+    0: begin
+         SetMealTimes(uDietParams.BTimes);
+         AMeal := 'B';
+       end;
+    1: begin
+         SetMealTimes(uDietParams.NTimes);
+         AMeal := 'N';
+       end;
+    2: begin
+         SetMealTimes(uDietParams.ETimes);
+         AMeal := 'E';
+       end;
+  else
+    begin
+      SetMealTimes('');
+      AMeal := '';
+    end;
+  end;
+  if not OrderForInpatient then
+    begin
+      if AMeal = '' then
+      begin
+        uRecurringMealList.Clear;
+        cboOPELRecurringMeals.Clear;
+      end
+      else if not PatientHasRecurringMeals(uRecurringMealList, AMeal) then
+        begin
+          uRecurringMealList.Clear;
+          cboOPELRecurringMeals.Clear;
+          grpMeal.ItemIndex := 3;
+        end
+      else
+        cboOPELRecurringMeals.Items.Assign(uRecurringMealList);
+    end;
+  Changing := False;
+  ELChange(grpMeal);
 end;
 
@@ -1445,5 +1652,6 @@
 begin
   inherited;
-  if (Length(calELStop.Text) > 0) and (calELStop.Text = calELStart.Text)
+  if not OrderForInpatient then SetEnableDOW(False)
+  else if (Length(calELStop.Text) > 0) and (calELStop.Text = calELStart.Text)
     then SetEnableDOW(False)
     else SetEnableDOW(True);
@@ -1478,4 +1686,9 @@
       then Responses.Update('ORDERABLE', 1, uDietParams.EarlyIEN, 'EARLY TRAY')
       else Responses.Update('ORDERABLE', 1, uDietParams.LateIEN,  'LATE TRAY');
+  end;
+  if not OrderForInpatient then
+  begin
+    calELStart.FMDateTime := StrToFloatDef(cboOPELRecurringMeals.ItemID, 0);
+    calELStop.FMDateTime := calELStart.FMDateTime;
   end;
   with calELStart   do if Length(Text) > 0 then Responses.Update('START',     1, Text,   Text);
@@ -1525,4 +1738,5 @@
 begin
   txtAOComment.Text := '';
+  calOPAOStart.Text := '';
 end;
 
@@ -1532,4 +1746,6 @@
   ResetControlsAO;
   Responses.SetControl(txtAOComment, 'COMMENT', 1);
+  //Responses.SetControl(calOPAOStart, 'DATETIME', 1);
+  Responses.SetControl(cboOPAORecurringMeals, 'DATETIME', 1);
   Changing := False;
   AOChange(Self);
@@ -1542,15 +1758,14 @@
   with txtAOComment do if Text <> ''
     then Responses.Update('COMMENT', 1, Text, Text);
+  if not OrderForInpatient then
+    begin
+      calOPAOStart.FMDateTime := StrToFloatDef(cboOPAORecurringMeals.ItemID, 0);
+      Responses.Update('DATETIME', 1, FloatToStr(calOPAOStart.FMDateTime), calOPAOStart.Text);
+    end;
   memOrder.Text := Responses.OrderText;
 end;
 
+
 { Outpatient Meals Order tab ----------------------------------------------------------------- }
-
-procedure TfrmODDiet.cboOPDietAvailNeedData(Sender: TObject; const StartFrom: string;
-  Direction, InsertAt: Integer);
-begin
-  inherited;
-  cboOPDietAvail.ForDataUse(SubsetOfOPDiets(StartFrom, Direction));
-end;
 
 procedure TfrmODDiet.cboOPDietAvailMouseClick(Sender: TObject);
@@ -1566,4 +1781,10 @@
 begin
   inherited;
+  if cboOPDietAvail.Items.Count = 0 then
+    begin
+      InfoBox(TX_NO_MEALS_DEFINED, TC_NO_MEALS_DEFINED, MB_OK or MB_ICONINFORMATION);
+      AbortOrder := True;
+      exit;
+    end  ;
   if CharAt(cboOPDietAvail.ItemID, 1) = 'Q' then              // setup quick order
   begin
@@ -1592,6 +1813,6 @@
     OPChange(Sender);
   end; {if cboOPDietAvail}
+  OPChange(Sender);
   cboOPDietAvail.ItemIndex := -1;
-  OPChange(Sender);
 end;
 
@@ -1643,5 +1864,4 @@
 procedure TfrmODDiet.SetValuesFromResponsesOP;
 var
-  //AnInstance: Integer;
   AResponse: TResponse;
   ADiet: string;
@@ -1651,22 +1871,4 @@
   with Responses do
   begin
-(*    AnInstance := NextInstance('ORDERABLE', 0);
-    while AnInstance > 0 do
-    begin
-      AResponse := FindResponseByName('ORDERABLE', AnInstance);
-      if AResponse <> nil then
-      begin
-        ADiet := DietAttributes(StrToIntDef(AResponse.IValue,0));
-        if Piece(ADiet,'^',1)='0' then
-        begin
-          InfoBox(Piece(ADiet,'^',2), TC_OP_DIET_ERR, MB_OK);
-          cboOPDietAvail.ItemIndex := -1;
-          Exit;
-        end;
-        lstOPDietSelect.Items.Add(ADiet);
-      end;
-      AnInstance := NextInstance('ORDERABLE', AnInstance);
-    end; {while AnInstance - ORDERABLE}*)
-
     AResponse := FindResponseByName('ORDERABLE', 1);
     if AResponse <> nil then
@@ -1677,4 +1879,5 @@
         InfoBox(Piece(ADiet,'^',2), TC_OP_DIET_ERR, MB_OK);
         cboOPDietAvail.ItemIndex := -1;
+        Changing := False;
         Exit;
       end;
@@ -1721,4 +1924,5 @@
 begin
   inherited;
+  if Changing then exit;
   if FChangeStop then
     calOPStop.Text := calOPStart.Text
@@ -1727,18 +1931,67 @@
 end;
 
+function TfrmODDiet.FMDOW(AnFMDate: TFMDateTime): integer;
+var
+  WinDate: TDateTime;
+  x: integer;
+begin
+  WinDate := FMDateTimeToDateTime(AnFMDate);
+  x := DayOfTheWeek(WinDate);
+  Result := x;
+end;
+
+function TfrmODDiet.FMDays(AStart, AEnd: TFMDateTime): string;
+var
+  AWinStart, AWinEnd: TDateTime;
+  i: double;
+  Days: string;
+begin
+  AWinStart := FMDateTimeToDateTime(AStart);
+  AWinEnd := FMDateTimeToDateTime(AEnd);
+  i := AWinStart;
+  repeat
+    Days := Days + FMDayLetters[DayOfTheWeek(i)];
+    i := i + 1;
+  until i > AWinEnd;
+  Result := Days;
+end;
+
 procedure TfrmODDiet.calOPStartExit(Sender: TObject);
-begin
-  inherited;
-  if (Length(calOPStop.Text) > 0) and (calOPStop.Text = calOPStart.Text)
-    then SetEnableOPDOW(False)
-    else SetEnableOPDOW(True);
+var
+  Days: string;
+begin
+  inherited;
+  if not (calOPStart.FMDateTime > 0) then
+  begin
+    SetEnableOPDOW(False, -1);
+    Exit ;
+  end;
+  if (Length(calOPStop.Text) > 0) and (calOPStop.Text = calOPStart.Text) then
+    SetEnableOPDOW(False, FMDOW(calOPStart.FMDateTime))
+  else
+  begin
+    Days := FMDays(calOPStart.FMDateTime, calOPStop.FMDateTime);
+    SetEnableOPDOW(True, -1, Days);
+  end;
 end;
 
 procedure TfrmODDiet.calOPStopChange(Sender: TObject);
-begin
-  inherited;
-  if (Length(calOPStop.Text) > 0) and (calOPStop.FMDateTime = calOPStart.FMDateTime)
-    then SetEnableOPDOW(False)
-    else SetEnableOPDOW(True);
+var
+  Days: string;
+begin
+  inherited;
+  if Changing then exit;
+  if not (calOPStop.FMDateTime > 0) then
+  begin
+    SetEnableOPDOW(False, -1);
+    Exit ;
+  end;
+  if (Length(calOPStop.Text) > 0) and (calOPStop.FMDateTime = calOPStart.FMDateTime) then
+    SetEnableOPDOW(False, FMDOW(calOPStart.FMDateTime))
+  else
+  begin
+    Days := FMDays(calOPStart.FMDateTime, calOPStop.FMDateTime);
+    SetEnableOPDOW(True, -1, Days);
+  end;
   OPChange(Sender);
 end;
@@ -1752,5 +2005,5 @@
   if Changing then Exit;
   if Sender <> Self then Responses.Clear;       // Sender=Self when called from SetupDialog
-  // Per NFS, only one selection allowed from any of 5 available OP diets
+  // Per NFS, only one selection allowed from any of 10-15 available OP diets
   with lstOPDietSelect do if Items.Count > 0 then
     Responses.Update('ORDERABLE', 1, Piece(Items[0], U, 1), Piece(Items[0], U, 2));
@@ -1765,5 +2018,6 @@
     begin
       x := GetOPDaysOfWeek;
-      if Length(x) > 0 then Responses.Update('SCHEDULE', 1, x, x);
+      if Length(x) = 0 then x := 'ONCE';
+      Responses.Update('SCHEDULE', 1, x, x);
     end;
   with txtOPDietComment do {if Length(Text) > 0 then} Responses.Update('COMMENT',   1, Text,   Text);
@@ -1784,14 +2038,25 @@
 end;
 
-procedure TfrmODDiet.SetEnableOPDOW(AllowUse: Boolean);
-begin
+procedure TfrmODDiet.SetEnableOPDOW(AllowUse: Boolean; OneTimeDay: integer; DaysToCheck: string = '');
+var
+  i: integer;
+begin
+  if (not AllowUse) and (OneTimeDay > -1) then
+    begin
+      for i := 0 to grpOPDOW.ControlCount - 1 do
+      begin
+        if grpOPDOW.Controls[i] is TCheckBox then
+          TCheckBox(grpOPDOW.Controls[i]).Checked := False;
+      end;
+      //TCheckBox(grpOPDOW.Controls[OneTimeDay - 1]).Checked := True;  CQ #8305
+    end;
   grpOPDOW.Enabled       := AllowUse;
-  chkOPMonday.Enabled    := AllowUse;
-  chkOPTuesday.Enabled   := AllowUse;
-  chkOPWednesday.Enabled := AllowUse;
-  chkOPThursday.Enabled  := AllowUse;
-  chkOPFriday.Enabled    := AllowUse;
-  chkOPSaturday.Enabled  := AllowUse;
-  chkOPSunday.Enabled    := AllowUse;
+  chkOPMonday.Enabled    := AllowUse and (Pos('M', DaysToCheck) > 0);
+  chkOPTuesday.Enabled   := AllowUse and (Pos('T', DaysToCheck) > 0);
+  chkOPWednesday.Enabled := AllowUse and (Pos('W', DaysToCheck) > 0);
+  chkOPThursday.Enabled  := AllowUse and (Pos('R', DaysToCheck) > 0);
+  chkOPFriday.Enabled    := AllowUse and (Pos('F', DaysToCheck) > 0);
+  chkOPSaturday.Enabled  := AllowUse and (Pos('S', DaysToCheck) > 0);
+  chkOPSunday.Enabled    := AllowUse and (Pos('X', DaysToCheck) > 0);
 end;
 
@@ -1896,5 +2161,5 @@
     // check if late tray should be ordered
     AResponse := Responses.FindResponseByName('ORDERABLE', 1);
-    if (AResponse <> nil) and (Copy(AResponse.EValue, 1, 3) <> 'NPO') then
+    if (Self.EvtID = 0) and (AResponse <> nil) and (Copy(AResponse.EValue, 1, 3) <> 'NPO') then
     begin
       AResponse := Responses.FindResponseByName('START', 1);
@@ -1915,5 +2180,5 @@
     // check if late tray should be ordered
     AResponse := Responses.FindResponseByName('ORDERABLE', 1);
-    if (AResponse <> nil) and (Copy(AResponse.EValue, 1, 3) <> 'NPO') then
+    if (Self.EvtID = 0) and (AResponse <> nil) and (Copy(AResponse.EValue, 1, 3) <> 'NPO') then
     begin
       AResponse := Responses.FindResponseByName('START', 1);
@@ -1930,7 +2195,14 @@
     if NewOrder.ID <> '' then
     begin
-      if (Encounter.Provider = User.DUZ) and User.CanSignOrders
-        then CanSign := CH_SIGN_YES
-        else CanSign := CH_SIGN_NA;
+      if OrderForInpatient then
+        begin
+          if (Encounter.Provider = User.DUZ) and User.CanSignOrders
+            then CanSign := CH_SIGN_YES
+            else CanSign := CH_SIGN_NA;
+        end
+      else
+        begin
+          CanSign := CH_SIGN_NA;
+        end;
       Changes.Add(CH_ORD, NewOrder.ID, NewOrder.Text, '', CanSign);
       SendMessage(Application.MainForm.Handle, UM_NEWORDER, ORDER_NEW, Integer(NewOrder))
@@ -1955,4 +2227,29 @@
 end;
 
+procedure TfrmODDiet.cboOPDietAvailKeyDown(Sender: TObject; var Key: Word;
+  Shift: TShiftState);
+begin
+  inherited;
+  if Key = VK_RETURN then cboOPDietAvailMouseClick(Self);
+end;
+
+function TfrmODDiet.PatientHasRecurringMeals(var MealList: TStringList; MealType: string = ''): boolean;
+const
+  TX_NO_RECURRING_MEALS = 'For outpatients, this type of order requires association with an existing recurring' + CRLF +
+                          'meal order.  There are currently no active recurring meal orders for this patient.' + CRLF + CRLF +
+                          'Those orders must be signed and released before they can be linked to this item.'; 
+  TC_NO_RECURRING_MEALS = 'Unable to order ' ;
+begin
+  MealList.Clear;
+  GetCurrentRecurringOPMeals(MealList, MealType);
+  if MealList.Count = 0 then
+    begin
+      InfoBox(TX_NO_RECURRING_MEALS, TC_NO_RECURRING_MEALS + nbkDiet.ActivePage.Caption, MB_OK);
+      Result := False;
+    end
+  else
+    Result := True;
+end;
+
 end.
 
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODDietLT.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODDietLT.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODDietLT.pas	(revision 460)
@@ -75,7 +75,7 @@
   begin
     TimePart := Frac(x);
-    if TimePart > 0.12 then
+    if TimePart > 0.1159 then
     begin
-      x := x - 0.12;
+      if TimePart > 0.1259 then x := x - 0.12;
       Suffix := 'P'
     end
@@ -127,23 +127,33 @@
        (TimePart < (StrToIntDef(Piece(DietParams.Alarms, U, 6), 0) / 10000)) then Meal := 'E';
     if Meal = #0 then Exit;
-    // get the available late times for this meal
-    case Meal of
-    'B': AvailTimes := Pieces(DietParams.BTimes, U, 4, 6);
-    'E': AvailTimes := Pieces(DietParams.ETimes, U, 4, 6);
-    'N': AvailTimes := Pieces(DietParams.NTimes, U, 4, 6);
-    end;
-    SetAvailTimes(TimePart, TimeCount, AvailTimes);
-    if TimeCount = 0 then Exit;
   end
   else  // for outpatients
   begin
+(*  From Rich Knoepfle, NFS developer
+If they order a breakfast and it is after the LATE BREAKFAST ALARM END, I don't allow them to do it.  (For special meals I don't allow them to order something for the following day).
+If it's before the LATE BREAKFAST ALARM BEGIN than I accept the order.
+If it's between the LATE BREAKFAST ALARM BEGIN and ALARM END then I ask if they want to order a Late breakfast tray.
+*)
     Meal := AMeal;
     case AMeal of
-      'B':  if TimePart < (StrToIntDef(Piece(DietParams.Alarms, U, 1), 0) / 10000) then Meal := #0;
-      'N':  if TimePart < (StrToIntDef(Piece(DietParams.Alarms, U, 3), 0) / 10000) then Meal := #0;
-      'E':  if TimePart < (StrToIntDef(Piece(DietParams.Alarms, U, 5), 0) / 10000) then Meal := #0;
+      'B':  if (TimePart < (StrToIntDef(Piece(DietParams.Alarms, U, 1), 0) / 10000)) or
+               (TimePart > (StrToIntDef(Piece(DietParams.Alarms, U, 2), 0) / 10000)) then Meal := #0;
+      'N':  if (TimePart < (StrToIntDef(Piece(DietParams.Alarms, U, 3), 0) / 10000)) or
+               (TimePart > (StrToIntDef(Piece(DietParams.Alarms, U, 4), 0) / 10000)) then Meal := #0;
+      'E':  if (TimePart < (StrToIntDef(Piece(DietParams.Alarms, U, 5), 0) / 10000)) or
+               (TimePart > (StrToIntDef(Piece(DietParams.Alarms, U, 6), 0) / 10000)) then Meal := #0;
     end;
     if Meal = #0 then exit;
   end;
+
+  // get the available late times for this meal
+  case Meal of
+  'B': AvailTimes := Pieces(DietParams.BTimes, U, 4, 6);
+  'E': AvailTimes := Pieces(DietParams.ETimes, U, 4, 6);
+  'N': AvailTimes := Pieces(DietParams.NTimes, U, 4, 6);
+  end;
+  SetAvailTimes(TimePart, TimeCount, AvailTimes);
+  if TimeCount = 0 then Exit;
+
   // setup form to get the selected late tray
   frmODDietLT := TfrmODDietLT.Create(Application);
@@ -153,15 +163,11 @@
     begin
       FOutpatient := IsOutpatient;
-      if not IsOutpatient then
-      begin
-        if Length(Piece(AvailTimes, U, 1)) > 0 then radLT1.Caption := Piece(AvailTimes, U, 1);
-        if Length(Piece(AvailTimes, U, 2)) > 0 then radLT2.Caption := Piece(AvailTimes, U, 2);
-        if Length(Piece(AvailTimes, U, 3)) > 0 then radLT3.Caption := Piece(AvailTimes, U, 3);
-        radLT1.Visible := Length(radLT1.Caption) > 0;
-        radLT2.Visible := Length(radLT2.Caption) > 0;
-        radLT3.Visible := Length(radLT3.Caption) > 0;
-        radLT1.Checked := TimeCount = 1;
-      end
-      else GroupBox1.Visible := False;
+      if Length(Piece(AvailTimes, U, 1)) > 0 then radLT1.Caption := Piece(AvailTimes, U, 1);
+      if Length(Piece(AvailTimes, U, 2)) > 0 then radLT2.Caption := Piece(AvailTimes, U, 2);
+      if Length(Piece(AvailTimes, U, 3)) > 0 then radLT3.Caption := Piece(AvailTimes, U, 3);
+      radLT1.Visible := Length(radLT1.Caption) > 0;
+      radLT2.Visible := Length(radLT2.Caption) > 0;
+      radLT3.Visible := Length(radLT3.Caption) > 0;
+      radLT1.Checked := TimeCount = 1;
       chkBagged.Visible := DietParams.Bagged;
       with lblMealCutOff do case Meal of
@@ -174,15 +180,10 @@
       if YesPressed then
       begin
-        if not IsOutpatient then
-        begin
-          with radLT1 do if Checked then LateTrayFields.LateTime := Caption;
-          with radLT2 do if Checked then LateTrayFields.LateTime := Caption;
-          with radLT3 do if Checked then LateTrayFields.LateTime := Caption;
-        end
-        else
-          LateTrayFields.LateTime := FMTimeToAMPM(FMToday + TimePart);
+        with radLT1 do if Checked then LateTrayFields.LateTime := Caption;
+        with radLT2 do if Checked then LateTrayFields.LateTime := Caption;
+        with radLT3 do if Checked then LateTrayFields.LateTime := Caption;
         LateTrayFields.LateMeal := Meal;
         LateTrayFields.IsBagged := chkBagged.Checked;
-      end; {if YesPressed}
+      end;
     end; {with frmODDietLT}
   finally
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODGen.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODGen.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODGen.pas	(revision 460)
@@ -339,4 +339,5 @@
     Editor.SetBounds(FEditorLeft, FEditorTop, NUM_CHAR * FCharWd, HT_FRAME * FCharHt);
     TORDateBox(Editor).DateOnly := Pos('T', DialogItem.Domain) = 0;
+    with TORDateBox(Editor) do RequireTime := (not DateOnly) and (Pos('R', DialogItem.Domain) > 0); //v26.48 - RV  PSI-05-002
     TORDateBox(Editor).Text := DialogItem.EDefault;
     TORDateBox(Editor).Hint := DialogItem.HelpText;
@@ -490,5 +491,8 @@
         end;
         with TORComboBox(Editor) do
+        begin
           Items.AddStrings(TStrings(TopTSList));
+          LongList := false;
+        end;
       end else
         TORComboBox(Editor).OnNeedData := LookupNeedData;
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODLab.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODLab.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODLab.dfm	(revision 460)
@@ -374,4 +374,5 @@
     OnExit = cboAvailTestExit
     OnNeedData = cboAvailTestNeedData
+    CharsNeedMatch = 1
   end
   object cboFrequency: TORComboBox
@@ -397,4 +398,5 @@
     TabOrder = 16
     OnChange = cboFrequencyChange
+    CharsNeedMatch = 1
   end
   object cboCollSamp: TORComboBox
@@ -423,4 +425,5 @@
     OnKeyPause = cboCollSampKeyPause
     OnMouseClick = cboCollSampMouseClick
+    CharsNeedMatch = 1
   end
   object cboSpecimen: TORComboBox
@@ -451,4 +454,5 @@
     OnKeyPause = cboSpecimenKeyPause
     OnMouseClick = cboSpecimenMouseClick
+    CharsNeedMatch = 1
   end
   object cboUrgency: TORComboBox
@@ -474,4 +478,5 @@
     TabOrder = 3
     OnChange = cboUrgencyChange
+    CharsNeedMatch = 1
   end
   object txtAddlComment: TCaptionEdit
@@ -533,4 +538,5 @@
     OnChange = cboCollTimeChange
     OnExit = cboCollTimeExit
+    CharsNeedMatch = 1
   end
   object cboCollType: TORComboBox
@@ -556,4 +562,5 @@
     TabOrder = 11
     OnChange = cboCollTypeChange
+    CharsNeedMatch = 1
   end
   object dlgLabCollTime: TORDateTimeDlg
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODLab.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODLab.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODLab.pas	(revision 460)
@@ -181,5 +181,5 @@
 
 uses rODBase, rODLab, uCore, rCore, fODLabOthCollSamp, fODLabOthSpec, fODLabImmedColl, fLabCollTimes,
- rOrders, uODBase, fRptBox;
+ rOrders, uODBase, fRptBox, fFrame;
 
 
@@ -208,4 +208,5 @@
   AList: TStringList;
 begin
+  frmFrame.pnlVisit.Enabled := false;
   AutoSizeDisabled := True;
   inherited;
@@ -417,5 +418,5 @@
       TestID := StrToInt(LabTestIEN);
       TestName := Piece(ExtractDefault(LoadData, 'Test Name'),U,1);
-      LabSubscript := Piece(ExtractDefault(LoadData, 'Test Name'),U,2);
+      LabSubscript := Piece(ExtractDefault(LoadData, 'Item ID'),U,2);
       TestReqComment := ExtractDefault(LoadData, 'ReqCom');
       if Length(ExtractDefault(LoadData, 'Unique CollSamp')) > 0 then UniqueCollSamp := True;
@@ -826,7 +827,13 @@
 
 procedure TfrmODLab.ControlChange(Sender: TObject);
+var
+  AResponse: TResponse;
+  AVisitStr: string;
 begin
   inherited;
   if Changing or (ALabTest = nil) then Exit;
+  AResponse := Responses.FindResponseByName('VISITSTR', 1);
+  if AResponse <> nil then
+    AVisitStr := AResponse.EValue;
   Responses.Clear;
   with ALabTest do
@@ -877,4 +884,5 @@
   with txtDays do if Enabled then Responses.Update('DAYS', 1, Text, Text);
   { worry about stop date later }
+  if AVisitStr <> '' then Responses.Update('VISITSTR', 1, AVisitStr, AVisitStr);
   memOrder.Text := Responses.OrderText;
 end;
@@ -1527,4 +1535,5 @@
   inherited;
   if FCmtTypes <> nil then FCmtTypes.Free;
+  frmFrame.pnlVisit.Enabled := true;
 end;
 
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMedFA.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMedFA.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMedFA.dfm	(revision 460)
@@ -5,4 +5,5 @@
   Height = 205
   Caption = 'Formulary Alternatives'
+  FormStyle = fsStayOnTop
   OnCreate = FormCreate
   PixelsPerInch = 96
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMedIV.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMedIV.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMedIV.dfm	(revision 460)
@@ -1,8 +1,8 @@
 inherited frmODMedIV: TfrmODMedIV
-  Left = 321
-  Top = 199
+  Left = 587
+  Top = 331
   Width = 610
   Height = 341
-  Caption = 'IV Fluid Order'
+  Caption = 'Infusion Order'
   OnKeyDown = FormKeyDown
   PixelsPerInch = 96
@@ -11,7 +11,7 @@
     Left = 6
     Top = 196
-    Width = 63
-    Height = 13
-    Caption = 'Infusion Rate'
+    Width = 96
+    Height = 13
+    Caption = 'Infusion Rate (ml/hr)'
   end
   object lblPriority: TLabel [1]
@@ -30,9 +30,9 @@
   end
   object lblAmount: TLabel [3]
-    Left = 333
+    Left = 328
     Top = 6
-    Width = 74
-    Height = 13
-    Caption = 'Volume/Strenth'
+    Width = 80
+    Height = 13
+    Caption = 'Volume/Strength'
     WordWrap = True
   end
@@ -51,59 +51,5 @@
     Caption = 'Duration or Total Volume'
   end
-  object Label1: TStaticText [6]
-    Left = 100
-    Top = 213
-    Width = 28
-    Height = 17
-    Caption = 'ml/hr'
-    TabOrder = 15
-  end
-  object cboAdditive: TORComboBox [7]
-    Left = 6
-    Top = 20
-    Width = 200
-    Height = 125
-    Style = orcsSimple
-    AutoSelect = True
-    Caption = 'Additives'
-    Color = clWindow
-    DropDownCount = 11
-    ItemHeight = 13
-    ItemTipColor = clWindow
-    ItemTipEnable = True
-    ListItemsOnly = True
-    LongList = True
-    LookupPiece = 0
-    MaxLength = 0
-    Pieces = '2'
-    Sorted = False
-    SynonymChars = '<>'
-    TabPositions = '20'
-    TabOrder = 0
-    OnExit = cboAdditiveExit
-    OnMouseClick = cboAdditiveMouseClick
-    OnNeedData = cboAdditiveNeedData
-    CharsNeedMatch = 1
-  end
-  object tabFluid: TTabControl [8]
-    Left = 7
-    Top = 3
-    Width = 200
-    Height = 21
-    TabHeight = 15
-    TabOrder = 13
-    Tabs.Strings = (
-      '   Solutions   '
-      '   Additives   ')
-    TabIndex = 0
-    TabStop = False
-    OnChange = tabFluidChange
-  end
-  inherited memOrder: TCaptionMemo
-    Top = 255
-    Width = 475
-    TabOrder = 11
-  end
-  object txtRate: TCaptionEdit [10]
+  object txtRate: TCaptionEdit [6]
     Left = 6
     Top = 210
@@ -111,9 +57,10 @@
     Height = 21
     AutoSelect = False
-    TabOrder = 6
+    TabOrder = 5
     OnChange = ControlChange
+    OnExit = txtRateExit
     Caption = 'Infusion Rate'
   end
-  object cboPriority: TORComboBox [11]
+  object cboPriority: TORComboBox [7]
     Left = 134
     Top = 210
@@ -135,9 +82,9 @@
     Sorted = False
     SynonymChars = '<>'
-    TabOrder = 7
+    TabOrder = 6
     OnChange = ControlChange
     CharsNeedMatch = 1
   end
-  object grdSelected: TCaptionStringGrid [12]
+  object grdSelected: TCaptionStringGrid [8]
     Left = 214
     Top = 20
@@ -152,5 +99,5 @@
     Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goDrawFocusSelected]
     ScrollBars = ssVertical
-    TabOrder = 3
+    TabOrder = 2
     OnDrawCell = grdSelectedDrawCell
     OnKeyPress = grdSelectedKeyPress
@@ -158,5 +105,5 @@
     Caption = 'Selected Solution and Additives'
   end
-  object cmdRemove: TButton [13]
+  object cmdRemove: TButton [9]
     Left = 443
     Top = 99
@@ -164,8 +111,8 @@
     Height = 18
     Caption = 'Remove'
-    TabOrder = 4
+    TabOrder = 3
     OnClick = cmdRemoveClick
   end
-  object memComments: TCaptionMemo [14]
+  object memComments: TCaptionMemo [10]
     Left = 214
     Top = 120
@@ -175,9 +122,9 @@
       'memComments')
     ScrollBars = ssVertical
-    TabOrder = 5
+    TabOrder = 4
     OnChange = ControlChange
     Caption = 'Comments'
   end
-  object txtSelected: TCaptionEdit [15]
+  object txtSelected: TCaptionEdit [11]
     Tag = -1
     Left = 416
@@ -187,5 +134,5 @@
     Ctl3D = False
     ParentCtl3D = False
-    TabOrder = 1
+    TabOrder = 0
     Text = 'meq.'
     Visible = False
@@ -194,5 +141,5 @@
     Caption = 'Volume'
   end
-  object cboSelected: TCaptionComboBox [16]
+  object cboSelected: TCaptionComboBox [12]
     Tag = -1
     Left = 460
@@ -204,5 +151,5 @@
     ItemHeight = 13
     ParentCtl3D = False
-    TabOrder = 2
+    TabOrder = 1
     Visible = False
     OnChange = cboSelectedChange
@@ -210,44 +157,22 @@
     Caption = 'Volume/Strength'
   end
+  inherited memOrder: TCaptionMemo
+    Top = 255
+    Width = 475
+    TabOrder = 10
+  end
   inherited cmdAccept: TButton
     Left = 495
     Top = 255
-    TabOrder = 9
+    TabOrder = 8
   end
   inherited cmdQuit: TButton
     Left = 495
     Top = 282
-    TabOrder = 10
+    TabOrder = 9
   end
   inherited pnlMessage: TPanel
     Top = 237
-    TabOrder = 12
-  end
-  object cboSolution: TORComboBox
-    Left = 6
-    Top = 19
-    Width = 200
-    Height = 164
-    Style = orcsSimple
-    AutoSelect = True
-    Caption = 'Solutions'
-    Color = clWindow
-    DropDownCount = 11
-    ItemHeight = 13
-    ItemTipColor = clWindow
-    ItemTipEnable = True
-    ListItemsOnly = True
-    LongList = True
-    LookupPiece = 0
-    MaxLength = 0
-    Pieces = '2'
-    Sorted = False
-    SynonymChars = '<>'
-    TabPositions = '20'
-    TabOrder = 14
-    OnExit = cboSolutionExit
-    OnMouseClick = cboSolutionMouseClick
-    OnNeedData = cboSolutionNeedData
-    CharsNeedMatch = 1
+    TabOrder = 11
   end
   object pnlXDuration: TPanel
@@ -257,10 +182,10 @@
     Height = 21
     BevelOuter = bvNone
-    TabOrder = 8
+    TabOrder = 7
     OnEnter = pnlXDurationEnter
     DesignSize = (
       121
       21)
-    object btnXDuration: TSpeedButton
+    object btnXDuration: TBitBtn
       Left = 69
       Top = 1
@@ -269,4 +194,6 @@
       Anchors = [akLeft, akTop, akRight, akBottom]
       Caption = 'days'
+      TabOrder = 1
+      OnClick = btnXDurationClick
       Glyph.Data = {
         AE000000424DAE0000000000000076000000280000000E000000070000000100
@@ -279,6 +206,4 @@
       NumGlyphs = 2
       Spacing = 0
-      Transparent = False
-      OnClick = btnXDurationClick
     end
     object txtXDuration: TCaptionEdit
@@ -293,4 +218,83 @@
     end
   end
+  object pnlCombo: TPanel
+    Left = 8
+    Top = 1
+    Width = 200
+    Height = 185
+    BevelOuter = bvNone
+    TabOrder = 17
+    object cboAdditive: TORComboBox
+      Left = 0
+      Top = 20
+      Width = 200
+      Height = 165
+      Style = orcsSimple
+      Align = alClient
+      AutoSelect = True
+      Caption = 'Additives'
+      Color = clWindow
+      DropDownCount = 11
+      ItemHeight = 13
+      ItemTipColor = clWindow
+      ItemTipEnable = True
+      ListItemsOnly = True
+      LongList = True
+      LookupPiece = 0
+      MaxLength = 0
+      Pieces = '2'
+      Sorted = False
+      SynonymChars = '<>'
+      TabPositions = '20'
+      TabOrder = 0
+      OnExit = cboAdditiveExit
+      OnMouseClick = cboAdditiveMouseClick
+      OnNeedData = cboAdditiveNeedData
+      CharsNeedMatch = 1
+    end
+    object tabFluid: TTabControl
+      Left = 0
+      Top = 0
+      Width = 200
+      Height = 20
+      Align = alTop
+      TabHeight = 15
+      TabOrder = 1
+      Tabs.Strings = (
+        '   Solutions   '
+        '   Additives   ')
+      TabIndex = 0
+      TabStop = False
+      OnChange = tabFluidChange
+    end
+    object cboSolution: TORComboBox
+      Left = 0
+      Top = 20
+      Width = 200
+      Height = 165
+      Style = orcsSimple
+      Align = alClient
+      AutoSelect = True
+      Caption = 'Solutions'
+      Color = clWindow
+      DropDownCount = 11
+      ItemHeight = 13
+      ItemTipColor = clWindow
+      ItemTipEnable = True
+      ListItemsOnly = True
+      LongList = True
+      LookupPiece = 0
+      MaxLength = 0
+      Pieces = '2'
+      Sorted = False
+      SynonymChars = '<>'
+      TabPositions = '20'
+      TabOrder = 2
+      OnExit = cboSolutionExit
+      OnMouseClick = cboSolutionMouseClick
+      OnNeedData = cboSolutionNeedData
+      CharsNeedMatch = 1
+    end
+  end
   object popDuration: TPopupMenu
     AutoHotkeys = maManual
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMedIV.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMedIV.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMedIV.pas	(revision 460)
@@ -9,10 +9,6 @@
 type
   TfrmODMedIV = class(TfrmODBase)
-    tabFluid: TTabControl;
-    cboSolution: TORComboBox;
     lblInfusionRate: TLabel;
     txtRate: TCaptionEdit;
-    lblPriority: TLabel;
-    cboPriority: TORComboBox;
     lblComponent: TLabel;
     lblAmount: TLabel;
@@ -21,8 +17,6 @@
     lblComments: TLabel;
     memComments: TCaptionMemo;
-    cboAdditive: TORComboBox;
     txtSelected: TCaptionEdit;
     cboSelected: TCaptionComboBox;
-    Label1: TStaticText;
     popDuration: TPopupMenu;
     popML: TMenuItem;
@@ -33,5 +27,11 @@
     txtXDuration: TCaptionEdit;
     lblLimit: TLabel;
-    btnXDuration: TSpeedButton;
+    btnXDuration: TBitBtn;
+    pnlCombo: TPanel;
+    cboAdditive: TORComboBox;
+    tabFluid: TTabControl;
+    cboSolution: TORComboBox;
+    lblPriority: TLabel;
+    cboPriority: TORComboBox;
     procedure FormCreate(Sender: TObject);
     procedure tabFluidChange(Sender: TObject);
@@ -64,4 +64,5 @@
     procedure pnlXDurationEnter(Sender: TObject);
     procedure txtXDurationExit(Sender: TObject);
+    procedure txtRateExit(Sender: TObject);
   private
     FInpatient: Boolean;
@@ -84,5 +85,5 @@
 {$R *.DFM}
 
-uses ORFn, uConst, rODMeds, rODBase, uAccessibleStringGrid;
+uses ORFn, uConst, rODMeds, rODBase, uAccessibleStringGrid, fFrame;
 
 const
@@ -129,4 +130,5 @@
   Restriction: string;
 begin
+  frmFrame.pnlVisit.Enabled := false;
   inherited;
   AllowQuickOrder := True;
@@ -155,4 +157,5 @@
   with grdSelected do for i := 0 to RowCount - 1 do TIVComponent(Objects[0, i]).Free;
   inherited;
+  frmFrame.pnlVisit.Enabled := True;
 end;
 
@@ -454,7 +457,6 @@
     end;
   end;
+  Application.ProcessMessages;         //CQ: 10157
   ClickOnGridCell;
-  if cboAdditive.Visible then
-    ActiveControl := cboAdditive;
   ControlChange(Sender);
 end;
@@ -522,4 +524,5 @@
     Col := 1;
   end;
+  Application.ProcessMessages;         //CQ: 10157
   ClickOnGridCell;
   ControlChange(Sender);
@@ -550,4 +553,6 @@
       Show;
       SetFocus;
+      if AControl is TComboBox then                    //CQ: 10157
+        TComboBox(AControl).DroppedDown := True;
     end;
   end;
@@ -855,8 +860,27 @@
 procedure TfrmODMedIV.txtXDurationExit(Sender: TObject);
 var
+  Len: Integer;
   Code: double;
+  Digits, Warning: string;
 begin
   inherited;
   if Changing then Exit;
+  //AGP Change 26.15 HIN-1203-42283 Added additional check to make sure the user can only enter the correct duration
+  Len := Length(txtXDuration.Text);
+  if (Len > 0) and (Pos('.', txtXDuration.Text)=0) then
+    begin
+      Warning := '0';
+      Digits := '2';
+      if ((btnXDuration.Caption = 'days') or (btnXDuration.Caption = 'hours') or (btnXDuration.Caption = 'L')) and (Len > 2) then  Warning := '1';
+      if (btnXDuration.Caption = 'ml') and (Len > 4) then  Warning := '1';
+      if Warning = '1' then
+          begin
+             if btnXduration.Caption = 'ml' then Digits := '4';
+             ShowMessage('Invalid Value.' + #13#10 + 'Reason: Duration for ' + btnXDuration.Caption + ' cannot be greater than ' + digits + ' digits.');
+             txtXDuration.Text := '';
+             txtXDuration.SetFocus;
+             Exit;
+          end;
+      end;
   if (Pos('.', txtXDuration.Text)>0) and
      ((btnXduration.Caption = 'days') or (btnXduration.Caption = 'hours')) then
@@ -897,3 +921,34 @@
 end;
 
+procedure TfrmODMedIV.txtRateExit(Sender: TObject);
+var
+ErrorText, LDec,RDec: string;
+i: Integer;
+Result: boolean;
+begin
+  inherited;
+  //AGP Change 26.28 for CQ # 7598 add infusion rate check for valid value
+  ErrorText := 'The Infusion Rate must be in one of the following formats:' + CRLF + CRLF + 'nnnn.nn ml/hr or text@per labels per day';
+  Result := False;
+  if pos('@',Self.txtRate.Text)>0 then exit;
+  if pos('.',Self.txtRate.Text)>0 then
+      begin
+         LDec := Piece(Self.txtRate.Text,'.',1);
+         RDec := Piece(Self.txtRate.Text,'.',2);
+         if Length(LDec)>4 then Result := True;
+         if Length(RDec)>2 then Result := True;
+      end
+  else if Length(Self.txtRate.Text)>4 then Result := True;
+  if (Result = False) and (pos('.',Self.txtRate.Text)=0) then
+    begin
+    for i := 1 to Length(Self.txtRate.Text) do if not (Self.txtRate.Text[i] in ['0'..'9']) then Result := True
+    end;
+  if Result = True then
+    begin
+       InfoBox(ErrorText,'Warning - Invalid Infusion Rate', MB_OK);
+       Self.txtRate.Text := '';
+       Self.txtRate.SetFocus;
+    end;
+end;
+
 end.
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMedNVA.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMedNVA.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMedNVA.dfm	(revision 460)
@@ -1,5 +1,5 @@
 inherited frmODMedNVA: TfrmODMedNVA
-  Left = 168
-  Top = 36
+  Left = 100
+  Top = 167
   Width = 632
   Height = 536
@@ -57,4 +57,6 @@
       Height = 133
       Align = alTop
+      BevelInner = bvLowered
+      BevelOuter = bvSpace
       Columns = <
         item
@@ -63,4 +65,5 @@
       ColumnClick = False
       HideSelection = False
+      HotTrack = True
       OwnerData = True
       ParentShowHint = False
@@ -71,5 +74,9 @@
       ViewStyle = vsReport
       OnChange = lstChange
+      OnClick = ListViewClick
       OnData = lstQuickData
+      OnEditing = ListViewEditing
+      OnEnter = ListViewEnter
+      OnResize = ListViewResize
       Caption = 'Quick Orders'
     end
@@ -215,5 +222,4 @@
         OnExit = cboDosageExit
         CharsNeedMatch = 1
-        UniqueAutoComplete = True
       end
       object cboRoute: TORComboBox
@@ -245,5 +251,4 @@
         OnExit = cboRouteExit
         CharsNeedMatch = 1
-        UniqueAutoComplete = True
       end
       object cboSchedule: TORComboBox
@@ -273,5 +278,4 @@
         OnExit = cboScheduleExit
         CharsNeedMatch = 1
-        UniqueAutoComplete = True
       end
       object chkPRN: TCheckBox
@@ -285,4 +289,5 @@
         ParentColor = False
         TabOrder = 5
+        OnClick = chkPRNClick
       end
     end
@@ -308,5 +313,5 @@
       object Label1: TLabel
         Left = 5
-        Top = 50
+        Top = 47
         Width = 108
         Height = 13
@@ -319,4 +324,10 @@
         Height = 13
         Caption = 'Start Date:'
+      end
+      object Image1: TImage
+        Left = 25
+        Top = 17
+        Width = 31
+        Height = 31
       end
       object memComment: TCaptionMemo
@@ -354,8 +365,8 @@
       end
       object lbStatements: TORListBox
-        Left = 8
-        Top = 62
+        Left = 7
+        Top = 59
         Width = 603
-        Height = 76
+        Height = 81
         Style = lbOwnerDrawFixed
         Anchors = [akLeft, akTop, akRight]
@@ -370,9 +381,23 @@
         OnClickCheck = lbStatementsClickCheck
       end
+      object memDrugMsg: TMemo
+        Left = 63
+        Top = 15
+        Width = 533
+        Height = 31
+        Anchors = [akLeft, akRight, akBottom]
+        Color = clCream
+        Lines.Strings = (
+          '')
+        ReadOnly = True
+        ScrollBars = ssVertical
+        TabOrder = 6
+        Visible = False
+      end
     end
   end
   object btnSelect: TButton
     Left = 539
-    Top = 461
+    Top = 463
     Width = 72
     Height = 21
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMedNVA.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMedNVA.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMedNVA.pas	(revision 460)
@@ -1,5 +1,5 @@
 unit fODMedNVA;
 
-interface                         
+interface
 
 uses
@@ -41,4 +41,6 @@
     Label2: TLabel;
     btnSelect: TButton;
+    Image1: TImage;
+    memDrugMsg: TMemo;
     procedure FormCreate(Sender: TObject);
     procedure btnSelectClick(Sender: TObject);
@@ -68,5 +70,5 @@
     procedure cboScheduleClick(Sender: TObject);
     procedure cboRouteExit(Sender: TObject);
-
+    procedure DispOrderMessage(const AMessage: string);
 
 
@@ -89,4 +91,5 @@
       Change: TItemChange);
     procedure FormKeyPress(Sender: TObject; var Key: Char);
+
   private
     {selection}
@@ -121,4 +124,5 @@
     FPtInstruct: string;
     FAltChecked: Boolean;
+    FShrinkDrugMsg: boolean;
     FQOQuantity: Double;
     FQODosage: string;
@@ -129,4 +133,5 @@
     FDisabledCancelButton: TButton;
     FShrinked: boolean;
+    FQOInitial: boolean;
     FRemoveText : Boolean;
     {selection}
@@ -291,5 +296,5 @@
   TX_NO_FUTURE_DATES  = 'Dates in the future are not allowed.';
   TX_BAD_DATE         = 'Dates must be in the format mm/dd/yy or mm/yy';
-
+  TX_CAP_FUTURE       = 'Invalid date';
 
 { procedures inherited from fODBase --------------------------------------------------------- }
@@ -300,19 +305,26 @@
 var
   ListCount: Integer;
-  Restriction, x : string;
-begin
+  Restriction, x: string;
+begin
+  frmFrame.pnlVisit.Enabled := false;
   AutoSizeDisabled := True;
  // ActivateOrderDialog(Piece(DialogInfo, ';', 1), DelayEvent, Self, 0);
   inherited;
+  AllowQuickOrder := True;
+
   if User.OrderRole in[OR_CLERK] then   // if user is clerk check restrictions else ok to write NonVA Order.
-  begin
-     CheckAuthForNVAMeds(Restriction);
-     if Length(Restriction) > 0 then
-     begin
-       InfoBox(Restriction, TC_RESTRICT, MB_OK);
-       Close;
-       Exit;
-     end;
-  end;
+    begin
+      CheckAuthForNVAMeds(Restriction);
+      if Length(Restriction) > 0 then
+        begin
+          CheckAuthForNVAMeds(Restriction);
+          if Length(Restriction) > 0 then
+            begin
+              InfoBox(Restriction, TC_RESTRICT, MB_OK);
+              Close;
+              Exit;
+            end;
+        end;
+    end;  // clerk restrictions
 
   if DlgFormID = OD_MEDNONVA  then FNonVADlg := TRUE;
@@ -363,4 +375,5 @@
   LoadOTCStatements(lbStatements.Items);
   FRemoveText := True;
+  FShrinkDrugMsg := False;
 end;
 
@@ -376,4 +389,5 @@
  // TAccessibleStringGrid.UnwrapControl(grdDoses);
   inherited;
+  frmFrame.pnlVisit.Enabled := true;
 end;
 
@@ -401,4 +415,5 @@
 procedure TfrmODMedNVA.SetupDialog(OrderAction: Integer; const ID: string);
 var
+  //AnInstr: string;
   OrderID: string;
 begin
@@ -429,5 +444,18 @@
     Changing := False;
   end;
-
+  { prevent the SIG from being part of the comments on pre-CPRS prescriptions }
+  {if (OrderAction in [ORDER_COPY, ORDER_EDIT]) and (cboDosage.Text = '') then  //commented out by cla 2/27/04 - CQ 2591
+  begin
+    OrderID := Copy(Piece(ID, ';', 1), 2, Length(ID));
+    AnInstr := TextForOrder(OrderID);
+    pnlMessage.TabOrder := 0;
+    OrderMessage(AnInstr);
+    if OrderAction = ORDER_COPY
+      then AnInstr := 'Copy: ' + AnInstr
+      else AnInstr := 'Change: ' + AnInstr;
+    Caption := AnInstr;
+    memComment.Clear;  // sometimes the sig is in the comment
+    lbStatements.Clear;
+  end;}
   ControlChange(Self);
 end;
@@ -527,5 +555,4 @@
 end;
 
-
 { Navigate medication selection lists ------------------------------------------------------- }
 
@@ -607,6 +634,9 @@
 var
   Offset: Integer;
+  SelRect: TRect;
 begin
   AListView.Selected.MakeVisible(FALSE);
+  SelRect := AListView.Selected.DisplayRect(drBounds);   //  CQ: 6636
+  FRowHeight := SelRect.Bottom - SelRect.Top;
   Offset := AListView.Selected.Index - AListView.TopItem.Index;
   Application.ProcessMessages;
@@ -803,5 +833,31 @@
     Changing := True;
     ResetOnMedChange;
-  if (FActiveMedList = lstAll) and (lstAll.Selected <> nil) then  // orderable item
+    if (FActiveMedList = lstQuick) and (lstQuick.Selected <> nil) then   // quick order
+    begin
+      ErrMsg := '';
+      FIsQuickOrder := True;
+      FQOInitial := True;
+      Responses.QuickOrder := Integer(lstQuick.Selected.Data);
+      txtMed.Tag  := StrToIntDef(Responses.IValueFor('ORDERABLE', 1), 0);
+      IsActivateOI(ErrMsg, txtMed.Tag);
+      if Length(ErrMsg)>0 then
+      begin
+        //btnSelect.Visible := False;
+        btnSelect.Enabled := False;
+        ShowMessage(ErrMsg);
+        Exit;
+      end;
+      if txtMed.Tag = 0 then
+      begin
+        //btnSelect.Visible := False;
+        btnSelect.Enabled := False;
+        txtMed.SetFocus;
+        Exit;
+      end;
+      SetOnMedSelect;   // set up for this medication
+      SetOnQuickOrder;  // insert quick order responses
+      ShowMedFields;
+    end
+    else if (FActiveMedList = lstAll) and (lstAll.Selected <> nil) then  // orderable item
     begin
       MedIEN := Integer(lstAll.Selected.Data);
@@ -831,5 +887,5 @@
       ShowMedFields;
     end
-    else                                                                 // no selection
+    else                                           // no selection
     begin
       MessageBeep(0);
@@ -842,5 +898,4 @@
   else ShowMedSelect;                             // show the selection fields
   FNoZERO   := False;
-
 end;
 
@@ -848,4 +903,8 @@
 begin
   cboDosage.Items.Clear;
+  chkPRN.Checked := False;
+  cboSchedule.ItemIndex := -1;
+  cboSchedule.Text := '';  // leave items intact
+  memComment.Lines.Clear;
   cboDosage.Text := '';
   cboRoute.Items.Clear;
@@ -867,23 +926,5 @@
   QOPiUnChk := False;
   PKIEnviron := False;
-  if GetPKISite and GetPKIUse then  //PKI check for crypto object on workstation
-    begin
-      try  //PKI object creation
-        crypto := CoXuDigSigS.Create;
-        crypto.GetCSP;
-        StatusText(crypto.Reason);
-        PKIEnviron := True;
-      except
-        on  E: Exception do
-          begin
-            {ShowMessage('An error has been encountered while trying to create PKI environment: '+ E.Message +
-            '.  This order will be processed without Digital Signature encryption.');}
-            PKIEnviron := False;
-          end;
-      end;
-      crypto := nil;
-    end;
-  if PKIEnviron = False then
-    if GetPKISite then PKIEnviron := True;
+  if GetPKISite then PKIEnviron := True;
   with CtrlInits do
   begin
@@ -950,5 +991,6 @@
  //   end;
     pnlMessage.TabOrder := cboDosage.TabOrder + 1;
-    OrderMessage(TextOf('Message'));
+
+ //   DispOrderMessage(TextOf('Message'));
   end;
 end;
@@ -971,4 +1013,5 @@
         with cboDosage do
           if ItemIndex > -1 then x := Text + TAB + Items[ItemIndex] else x := Text;
+
         SetControl(cboRoute,  'ROUTE', i);
         with cboRoute do
@@ -1001,5 +1044,5 @@
       else
         SetDosage(IValueFor('INSTR', 1));
-        SetControl(cboRoute,  'ROUTE',     1);
+        SetControl(cboDosage, 'DOSAGE', 1); // CQ: HDS00007776
         SetSchedule(IValueFor('SCHEDULE',  1));
       if (cboSchedule.Text = '') and FIsQuickOrder then
@@ -1174,4 +1217,5 @@
   NonPRNPart: string;
 begin
+ 
   cboSchedule.ItemIndex := -1;
   if Pos('PRN', x) > 0 then
@@ -1179,14 +1223,35 @@
     NonPRNPart := Trim(Copy(x, 1, Pos('PRN', x) - 1));
     cboSchedule.SelectByID(NonPRNPart);
-    if cboSchedule.ItemIndex > -1 then chkPRN.Checked := True else
-    begin
-      cboSchedule.SelectByID(x);
-      if cboSchedule.ItemIndex < 0 then cboSchedule.Text := x;
-    end;
+    if cboSchedule.ItemIndex < 0 then
+    begin
+      if NSSchedule then
+      begin
+        chkPRN.Checked := False;
+        cboSchedule.Text := '';
+      end else
+      begin
+        chkPRN.Checked := True;
+        cboSchedule.Items.Add(NonPRNPart);
+        cboSchedule.Text := NonPRNPart;
+      end;
+    end else
+      chkPRN.Checked := True;
   end else
   begin
     chkPRN.Checked := False;
     cboSchedule.SelectByID(x);
-    if cboSchedule.ItemIndex < 0 then cboSchedule.Text := x;
+    if cboSchedule.ItemIndex < 0 then
+    begin
+      if NSSchedule then
+      begin
+        cboSchedule.Text := '';
+      end
+      else
+      begin
+        cboSchedule.Items.Add(x);
+        cboSchedule.Text := x;
+        cboSchedule.SelectByID(x);
+      end;
+    end;
   end;
 end;
@@ -1246,8 +1311,7 @@
 var
   DispDrug: Integer;
-  x: string;
-begin
-  inherited;
-  UpdateRelated(False);
+begin
+  inherited;
+UpdateRelated(False);
   DispDrug := StrToIntDef(ValueOf(FLD_DRUG_ID), 0);
   if cboDosage.Text = '' then    //cla 3/18/04
@@ -1256,13 +1320,15 @@
     cboDosage.ItemIndex := -1;
   end;
+  {  hds8084
   if DispDrug > 0 then
   begin
     if not FSuppressMsg then begin
       pnlMessage.TabOrder := cboDosage.TabOrder + 1;
-      OrderMessage(DispenseMessage(DispDrug));
+      DispOrderMessage(DispenseMessage(DispDrug));
     end;
     x := QuantityMessage(DispDrug);
   end
   else x := '';
+  }
   with cboDosage do
     if (ItemIndex > -1) and (Piece(Items[ItemIndex], U, 3) = 'NF')
@@ -1589,5 +1655,5 @@
                                 then Responses.Update('ROUTE',    1, ValueOf(FLD_ROUTE_ID), x)
                                 else Responses.Update('ROUTE',    1, '', x);
- //     x := ValueOf(FLD_SCHEDULE);    Responses.Update('SCHEDULE', 1, x,  x);
+      x := ValueOf(FLD_SCHEDULE);    Responses.Update('SCHEDULE', 1, x,  x); // CQ:7297, 7534
     end;
   end; {case TabDose.TabIndex}
@@ -1598,5 +1664,5 @@
   if Length(calStart.Text) > 0 then
      Responses.Update('START', 1, calStart.Text, 'Start Date: ' + calStart.Text);  //cla 7-17-03
-
+     
   x := ValueOf(FLD_STATEMENTS);
   Responses.Update('STATEMENTS',1, TX_WPTYPE, x);
@@ -1697,5 +1763,5 @@
                      if ItemIndex > -1  then Result := Piece(Items[ItemIndex], U, 4);
     FLD_SCHEDULE  : begin
-                      Result := cboSchedule.Text;
+                      Result := UpperCase(cboSchedule.Text);
                       if chkPRN.Checked then Result := Result + ' PRN';
                       if UpperCase(Copy(Result, Length(Result) - 6, Length(Result))) = 'PRN PRN'
@@ -1768,11 +1834,11 @@
   if Length(CurSchedule)=0 then Exit;
   ASchedule := Trim(CurSchedule);
-  if (Pos('^',ASchedule)=0) then
+  {if (Pos('^',ASchedule)=0) then  //GE  CQ7506
   begin
     PrnPos := Pos('PRN',ASchedule);
     if (PrnPos > 1) and (CharAt(ASchedule,PrnPos-1) <> ';') then
       Delete(ASchedule, PrnPos, Length(ASchedule));
-  end
-  else if (Pos('^',ASchedule)>0) then
+  end  }
+  if (Pos('^',ASchedule)>0) then
   begin
     PrnPos := Pos('PRN',ASchedule);
@@ -1929,4 +1995,5 @@
     begin
       Val(TabletNum, ie, code);
+      if ie = 0 then begin end;
       if code <> 0 then
         Exit;
@@ -1967,10 +2034,32 @@
 
 procedure TfrmODMedNVA.chkPRNClick(Sender: TObject);
-begin
-  inherited;
-  if chkPRN.Checked then lblAdminTime.Caption := ''
+var
+  tempSch: string;
+  PRNPos: integer;
+begin
+  inherited;
+  {if chkPRN.Checked then lblAdminTime.Caption := ''
   else
   begin
     lblAdminTime.Caption := FAdminTimeLbl;
+  end;
+  ControlChange(Self);
+  }
+  if chkPRN.Checked then
+  begin
+     lblAdminTime.Caption := '';
+     PrnPos := Pos('PRN',cboSchedule.Text);
+     if (PrnPos < 1) then
+        UpdateStartExpires(cboSchedule.Text + ' PRN');
+  end
+  else
+  begin
+    if Length(Trim(cboSchedule.Text))>0 then
+    begin
+      tempSch := ';'+Trim(cboSchedule.Text);
+      UpdateStartExpires(tempSch);
+    end;
+    lblAdminTime.Caption := FAdminTimeLbl;
+    
   end;
   ControlChange(Self);
@@ -2194,3 +2283,29 @@
 end;
 
+procedure TfrmODMedNVA.DispOrderMessage(const AMessage: string);
+begin
+  if ContainsVisibleChar(AMessage) then
+  begin
+    image1.Visible := True;
+    memDrugMsg.Visible := True;
+    image1.Picture.Icon.Handle := LoadIcon(0, IDI_ASTERISK);
+    memDrugMsg.Lines.Clear;
+    memDrugMsg.Lines.SetText(PChar(AMessage));
+    if fShrinkDrugMsg then
+    begin
+      pnlBottom.Height := pnlBottom.Height + memDrugMsg.Height + 2;
+      fShrinkDrugMsg := False;
+    end;
+  end else
+  begin
+    image1.Visible := False;
+    memDrugMsg.Visible := False;
+    if not fShrinkDrugMsg then
+  //  begin
+  //    pnlBottom.Height := pnlBottom.Height - memDrugMsg.Height - 2;
+      fShrinkDrugMsg := True;
+ //   end;
+  end;
+end;
+
 end.
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMedOIFA.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMedOIFA.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMedOIFA.dfm	(revision 460)
@@ -1,29 +1,45 @@
-inherited frmODMedOIFA: TfrmODMedOIFA
-  Width = 316
+object frmODMedOIFA: TfrmODMedOIFA
+  Left = 0
+  Top = 0
+  Width = 313
   Height = 205
   Caption = 'Formulary Alternatives'
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  FormStyle = fsStayOnTop
+  OldCreateOrder = True
+  Position = poMainFormCenter
+  OnClose = FormClose
   OnCreate = FormCreate
+  OnShow = FormShow
   PixelsPerInch = 96
   TextHeight = 13
   object Label1: TLabel
-    Left = 8
-    Top = 8
-    Width = 273
+    Left = 0
+    Top = 0
+    Width = 305
     Height = 13
+    Align = alTop
     Caption = 'The selected drug is not in the formulary.  Alternatives are:'
   end
   object Label2: TStaticText
-    Left = 8
-    Top = 127
-    Width = 250
+    Left = 0
+    Top = 134
+    Width = 305
     Height = 17
+    Align = alBottom
     Caption = 'Do you wish to use the selected alternative instead?'
-    TabOrder = 3
+    TabOrder = 1
   end
   object lstFormAlt: TORListBox
-    Left = 8
-    Top = 22
-    Width = 292
-    Height = 97
+    Left = 0
+    Top = 13
+    Width = 305
+    Height = 121
+    Align = alClient
     ItemHeight = 13
     ParentShowHint = False
@@ -36,24 +52,33 @@
     Pieces = '2'
   end
-  object cmdYes: TButton
-    Left = 74
-    Top = 148
-    Width = 72
-    Height = 21
-    Caption = 'Yes'
-    Default = True
-    Enabled = False
-    TabOrder = 1
-    OnClick = cmdYesClick
-  end
-  object cmdNo: TButton
-    Left = 162
-    Top = 148
-    Width = 72
-    Height = 21
-    Cancel = True
-    Caption = 'No'
-    TabOrder = 2
-    OnClick = cmdNoClick
+  object btnPanel: TPanel
+    Left = 0
+    Top = 151
+    Width = 305
+    Height = 27
+    Align = alBottom
+    BevelOuter = bvNone
+    TabOrder = 3
+    object cmdYes: TButton
+      Left = 74
+      Top = 3
+      Width = 72
+      Height = 21
+      Caption = 'Yes'
+      Default = True
+      Enabled = False
+      TabOrder = 0
+      OnClick = cmdYesClick
+    end
+    object cmdNo: TButton
+      Left = 162
+      Top = 3
+      Width = 72
+      Height = 21
+      Cancel = True
+      Caption = 'No'
+      TabOrder = 1
+      OnClick = cmdNoClick
+    end
   end
 end
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMedOIFA.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMedOIFA.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMedOIFA.pas	(revision 460)
@@ -5,11 +5,12 @@
 uses
   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
-  fAutoSz, StdCtrls, ORCtrls;
+  StdCtrls, ORCtrls, ExtCtrls, fAutoSz;
 
 type
-  TfrmODMedOIFA = class(TfrmAutoSz)
+  TfrmODMedOIFA = class(TForm)
     Label1: TLabel;
     lstFormAlt: TORListBox;
     Label2: TStaticText;
+    btnPanel: TPanel;
     cmdYes: TButton;
     cmdNo: TButton;
@@ -18,4 +19,6 @@
     procedure cmdNoClick(Sender: TObject);
     procedure lstFormAltClick(Sender: TObject);
+    procedure FormShow(Sender: TObject);
+    procedure FormClose(Sender: TObject; var Action: TCloseAction);
   private
     FSelected: string;
@@ -30,5 +33,5 @@
 {$R *.DFM}
 
-uses ORFn, rODMeds;
+uses ORFn, rODMeds, rMisc;
 
 procedure CheckFormularyOI(var AnIEN: Integer; var AName: string; ForInpatient: Boolean);
@@ -130,3 +133,16 @@
 end;
 
+procedure TfrmODMedOIFA.FormShow(Sender: TObject);
+begin
+  inherited;
+  SetFormPosition(Self);
+end;
+
+procedure TfrmODMedOIFA.FormClose(Sender: TObject;
+  var Action: TCloseAction);
+begin
+  inherited;
+  SaveUserBounds(Self);  
+end;
+
 end.
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMeds.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMeds.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMeds.dfm	(revision 460)
@@ -1,12 +1,9 @@
 inherited frmODMeds: TfrmODMeds
-  Left = 202
-  Top = 61
+  Left = 519
+  Top = 204
   Width = 584
-  Height = 494
+  Height = 515
   HorzScrollBar.Range = 558
-  HorzScrollBar.Visible = True
   VertScrollBar.Range = 399
-  VertScrollBar.Visible = True
-  AutoScroll = False
   Caption = 'Medication Order'
   Constraints.MinHeight = 325
@@ -15,5 +12,5 @@
   DesignSize = (
     576
-    460)
+    488)
   PixelsPerInch = 96
   TextHeight = 13
@@ -22,5 +19,5 @@
     Top = 34
     Width = 580
-    Height = 392
+    Height = 413
     Anchors = [akLeft, akTop, akRight, akBottom]
     BevelOuter = bvNone
@@ -71,5 +68,5 @@
       Top = 137
       Width = 580
-      Height = 255
+      Height = 276
       Align = alClient
       BevelInner = bvLowered
@@ -101,5 +98,5 @@
   end
   inherited memOrder: TCaptionMemo
-    Top = 427
+    Top = 448
     Width = 502
     Anchors = [akLeft, akRight, akBottom]
@@ -122,5 +119,5 @@
   object btnSelect: TButton [3]
     Left = 515
-    Top = 427
+    Top = 448
     Width = 72
     Height = 21
@@ -134,5 +131,5 @@
   inherited cmdAccept: TButton
     Left = 514
-    Top = 427
+    Top = 448
     Anchors = [akRight, akBottom]
     TabOrder = 6
@@ -142,5 +139,5 @@
   inherited cmdQuit: TButton
     Left = 514
-    Top = 452
+    Top = 473
     Width = 51
     Anchors = [akRight, akBottom]
@@ -159,5 +156,5 @@
     Top = 34
     Width = 580
-    Height = 392
+    Height = 413
     Anchors = [akLeft, akTop, akRight, akBottom]
     BevelOuter = bvNone
@@ -170,5 +167,5 @@
       Top = 0
       Width = 580
-      Height = 173
+      Height = 184
       Align = alClient
       Constraints.MinHeight = 80
@@ -176,5 +173,5 @@
       DesignSize = (
         580
-        173)
+        184)
       object lblRoute: TLabel
         Left = 280
@@ -197,10 +194,10 @@
       end
       object txtNSS: TLabel
-        Left = 452
+        Left = 442
         Top = 22
-        Width = 76
+        Width = 71
         Height = 13
         Anchors = [akTop, akRight]
-        Caption = '(Non-standard?)'
+        Caption = '(Day-Of-Week)'
         Font.Charset = DEFAULT_CHARSET
         Font.Color = clBlue
@@ -217,5 +214,5 @@
         Top = 36
         Width = 580
-        Height = 132
+        Height = 143
         Anchors = [akLeft, akTop, akRight, akBottom]
         ColCount = 6
@@ -280,5 +277,5 @@
         Top = 36
         Width = 279
-        Height = 132
+        Height = 143
         Anchors = [akLeft, akTop, akRight, akBottom]
         Style = orcsSimple
@@ -302,4 +299,5 @@
         OnClick = cboDosageClick
         OnExit = cboDosageExit
+        OnKeyUp = cboDosageKeyUp
         CharsNeedMatch = 1
         UniqueAutoComplete = True
@@ -309,5 +307,5 @@
         Top = 36
         Width = 113
-        Height = 132
+        Height = 143
         Anchors = [akTop, akRight, akBottom]
         Style = orcsSimple
@@ -339,5 +337,5 @@
         Top = 36
         Width = 178
-        Height = 132
+        Height = 143
         Anchors = [akTop, akRight, akBottom]
         Style = orcsSimple
@@ -426,4 +424,5 @@
       OnExit = cboXDosageExit
       OnKeyDown = memMessageKeyDown
+      OnKeyUp = cboXDosageKeyUp
       CharsNeedMatch = 1
       UniqueAutoComplete = True
@@ -546,4 +545,5 @@
         Width = 38
         Height = 19
+        Hint = 'A duration must be defined if using "Then" as a sequence.'
         Caption = 'then'
         Glyph.Data = {
@@ -556,6 +556,14 @@
         Layout = blGlyphRight
         NumGlyphs = 2
+        ParentShowHint = False
+        ShowHint = True
         Spacing = 1
         OnClick = btnXSequenceClick
+      end
+      object SpeedButton1: TSpeedButton
+        Left = 16
+        Top = 16
+        Width = 23
+        Height = 22
       end
     end
@@ -598,4 +606,5 @@
         OnChange = cboXScheduleChange
         OnClick = cboXScheduleClick
+        OnEnter = cboXScheduleEnter
         OnExit = cboXScheduleExit
         OnKeyDown = memMessageKeyDown
@@ -617,12 +626,12 @@
     object pnlBottom: TPanel
       Left = 0
-      Top = 173
+      Top = 184
       Width = 580
-      Height = 219
+      Height = 229
       Align = alBottom
       TabOrder = 6
       DesignSize = (
         580
-        219)
+        229)
       object lblComment: TLabel
         Left = 4
@@ -666,6 +675,6 @@
       end
       object Image1: TImage
-        Left = 1
-        Top = 183
+        Left = 5
+        Top = 177
         Width = 31
         Height = 31
@@ -686,5 +695,5 @@
         Top = 2
         Width = 513
-        Height = 44
+        Height = 43
         Anchors = [akLeft, akTop, akRight]
         ScrollBars = ssVertical
@@ -707,7 +716,9 @@
         Width = 60
         Height = 21
+        AutoSize = False
         TabOrder = 1
         Text = '0'
         OnChange = txtSupplyChange
+        OnClick = txtSupplyClick
         Caption = 'Days Supply'
       end
@@ -728,7 +739,9 @@
         Width = 60
         Height = 21
+        AutoSize = False
         TabOrder = 3
         Text = '0'
         OnChange = txtQuantityChange
+        OnClick = txtQuantityClick
         Caption = 'Quantity'
       end
@@ -750,7 +763,9 @@
         Width = 30
         Height = 21
+        AutoSize = False
         TabOrder = 5
         Text = '0'
         OnChange = ControlChange
+        OnClick = txtRefillsClick
         Caption = 'Refills'
       end
@@ -817,5 +832,5 @@
         ItemTipColor = clWindow
         ItemTipEnable = True
-        ListItemsOnly = False
+        ListItemsOnly = True
         LongList = False
         LookupPiece = 0
@@ -825,5 +840,4 @@
         SynonymChars = '<>'
         TabOrder = 10
-        Text = 'ROUTINE'
         OnChange = ControlChange
         CharsNeedMatch = 1
@@ -842,10 +856,9 @@
       end
       object lblAdminTime: TStaticText
-        Left = 267
-        Top = 104
+        Left = 262
+        Top = 120
         Width = 4
         Height = 4
         TabOrder = 16
-        Visible = False
       end
       object stcPI: TStaticText
@@ -885,7 +898,7 @@
       object memDrugMsg: TMemo
         Left = 37
-        Top = 183
+        Top = 176
         Width = 533
-        Height = 34
+        Height = 51
         Anchors = [akLeft, akRight, akBottom]
         Color = clCream
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMeds.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMeds.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMeds.pas	(revision 460)
@@ -86,4 +86,5 @@
     memDrugMsg: TMemo;
     txtNSS: TLabel;
+    SpeedButton1: TSpeedButton;
     procedure FormCreate(Sender: TObject);
     procedure btnSelectClick(Sender: TObject);
@@ -186,4 +187,13 @@
     procedure cboScheduleExit(Sender: TObject);
     procedure cboXScheduleExit(Sender: TObject);
+    procedure cboDosageKeyUp(Sender: TObject; var Key: Word;
+      Shift: TShiftState);
+    procedure cboXDosageKeyUp(Sender: TObject; var Key: Word;
+      Shift: TShiftState);
+    procedure txtSupplyClick(Sender: TObject);
+    procedure txtQuantityClick(Sender: TObject);
+    procedure txtRefillsClick(Sender: TObject);
+    procedure WMClose(var Msg : TWMClose); message WM_CLOSE;
+    procedure cboXScheduleEnter(Sender: TObject);
     //procedure btnNSSClick(Sender: TObject);
   private
@@ -236,8 +246,8 @@
     FOrigiMsgDisp: boolean;
     FNSSOther: boolean;
-    FFromClick: boolean;
+    {selection}
     FShowPnlXScheduleOk : boolean;
     FRemoveText : Boolean;
-    {selection}
+    FSmplPRNChkd: Boolean;
     procedure ChangeDelayed;
     function FindQuickOrder(const x: string): Integer;
@@ -302,8 +312,10 @@
 //    function ValidateRoute(RouteCombo: TORComboBox) : Boolean; Removed based on Site feeback. See CQ: 7518
     function IsSupplyAndOutPatient : boolean;
+    function GetSchedListIndex(SchedCombo: TORComboBox; pSchedule: String):integer;
   protected
     procedure InitDialog; override;
     procedure Validate(var AnErrMsg: string); override;
   public
+    ARow1: integer;
     procedure SetupDialog(OrderAction: Integer; const ID: string); override;
     procedure CheckDecimal(var AStr: string);
@@ -319,5 +331,5 @@
 
 uses rCore, uCore, ORFn, rODMeds, rODBase, rOrders, fRptBox, fODMedOIFA,
-  uAccessibleStringGrid, uOrders, fOtherSchedule, StrUtils;
+  uAccessibleStringGrid, uOrders, fOtherSchedule, StrUtils, fFrame;
 
 const
@@ -329,4 +341,5 @@
   COL_DURATION =  4;
   COL_SEQUENCE =  5;
+  COL_CHKXPRN  =  6;
   VAL_DOSAGE   = 10;
   VAL_ROUTE    = 20;
@@ -334,4 +347,5 @@
   VAL_DURATION = 40;
   VAL_SEQUENCE = 50;
+  VAL_CHKXPRN  = 60;
   TAB          = #9;
   {field identifiers}
@@ -387,4 +401,5 @@
   TC_NO_DEA     = 'DEA# Required';
   TX_NO_MED     = 'Medication must be selected.';
+  TX_NO_SEQ     = 'Missing one or more conjunction.';
   TX_NO_DOSE    = 'Dosage must be entered.';
   TX_DOSE_NUM   = 'Dosage may not be numeric only';
@@ -422,8 +437,10 @@
   x: string;
 begin
+  frmFrame.pnlVisit.Enabled := false;
   AutoSizeDisabled := True;
   inherited;
   btnXDuration.Align := alClient;
   AllowQuickOrder := True;
+  FSmplPRNChkd := False; // GE CQ7585
   CheckAuthForMeds(x);
   if Length(x) > 0 then
@@ -456,5 +473,7 @@
   {if not FInptDlg then } Responses.SetPromptFormat('INSTR', '@');
   StatusText('Loading Schedules');
-  LoadSchedules(cboSchedule.Items, FInptDlg);
+  //if (Self.EvtID > 0) then LoadSchedules(cboSchedule.Items)
+  //else LoadSchedules(cboSchedule.Items, FInptDlg);
+  LoadSchedules(cboSchedule.Items, FInptDlg);  
   StatusText('');
   if FInptDlg then SetControlsInpatient else SetControlsOutpatient;
@@ -466,4 +485,6 @@
   begin
     txtNss.Visible := True;
+    //cboSchedule.ListItemsOnly := True;
+    //cboXSchedule.ListItemsOnly := True;
   end;
   with grdDoses do
@@ -537,4 +558,5 @@
   FAllDrugs.Free;
   TAccessibleStringGrid.UnwrapControl(grdDoses);
+  frmFrame.pnlVisit.Enabled := true;
   inherited;
 end;
@@ -558,10 +580,9 @@
   FQOInitial  := False;
   FNSSOther   := False;
-  FFromClick  := False;
 end;
 
 procedure TfrmODMeds.SetupDialog(OrderAction: Integer; const ID: string);
 var
-  AnInstr, OrderID, nsSch: string;
+  AnInstr, OrderID, nsSch, Text: string;
   ix: integer;
 begin
@@ -606,4 +627,10 @@
              begin
                 SetSchedule(nsSch);
+                {cboSchedule.SelectByID(nsSch);
+                if cboSchedule.ItemIndex < 0 then
+                begin
+                  cboSchedule.Items.Add(nsSch);
+                  cboSchedule.ItemIndex := cboSchedule.Items.IndexOf(nsSch);
+                end;}
              end;
            end;
@@ -611,5 +638,6 @@
        end;
     end;  //nss
-    UpdateRelated(FALSE);
+    if ((OrderAction <> Order_COPY) and (OrderAction <> Order_EDIT)) or
+    (XfInToOutNow = true) then UpdateRelated(FALSE); //AGP Change
     Changing := False;
   end;
@@ -624,5 +652,6 @@
       then AnInstr := 'Copy: ' + AnInstr
       else AnInstr := 'Change: ' + AnInstr;
-    Caption := AnInstr;
+    Text := AnsiReplaceText(AnInstr,CRLF,'');
+    Caption := Text;
     memComment.Clear;  // sometimes the sig is in the comment
   end;
@@ -654,10 +683,17 @@
     // and is not an outpaitent order, then display error text to require route
     if (Length(x) = 0) and (Not IsSupplyAndOutPatient) then
+    begin
+      if cboRoute.Showing = true then cboRoute.SetFocus;  //CQ: 7467
       SetError(TX_NO_ROUTE);
+    end;
     if (Length(x) > 0) and NeedLookup then
     begin
       LookupRoute(x, RouteID, RouteAbbr);
       if RouteID = '0'
-        then SetError(TX_NF_ROUTE)
+        then
+        begin
+         if cboRoute.Showing = true then cboRoute.SetFocus;    //CQ: 7467
+        SetError(TX_NF_ROUTE);
+        end
         else Responses.Update('ROUTE', AnInstance, RouteID, RouteAbbr);
     end;
@@ -678,5 +714,4 @@
     else if (Length(tmpX) = 0) and FInptDlg and ScheduleRequired(txtMed.Tag, ARoute, ADrug)
       then SetError(TX_NO_SCHED);
-
     if Length(tmpX) > 0 then
     begin
@@ -706,6 +741,15 @@
     if (ValueOfResponse(FLD_DRUG_ID, i) = '') then
     begin
-      if not ContainsAlpha(Responses.IValueFor('INSTR', i)) then SetError(TX_DOSE_NUM);
-      if Length(Responses.IValueFor('INSTR', i)) > 60       then SetError(TX_DOSE_LEN);
+      if not ContainsAlpha(Responses.IValueFor('INSTR', i)) then
+      begin
+         SetError(TX_DOSE_NUM);
+         if tabDose.TabIndex = TI_DOSE then
+            cboDosage.SetFocus;    //CQ: 7467
+      end;
+      if Length(Responses.IValueFor('INSTR', i)) > 60       then
+      begin
+         SetError(TX_DOSE_LEN);
+         cboDosage.SetFocus;  //CQ: 7467
+      end;
     end;
     ValidateRoute(Responses.EValueFor('ROUTE', i), Responses.IValueFor('ROUTE', i) = '', i);
@@ -713,4 +757,16 @@
     i := Responses.NextInstance('INSTR', i);
   end;
+  //AGP Change 26.45 Fix for then/and conjucntion PSI-04-069
+  if self.tabDose.TabIndex = 1 then
+    begin
+       for i := 2 to self.grdDoses.RowCount do
+         begin
+           if ((ValFor(COL_DOSAGE, i-1) <> '') and (ValFor(COL_DOSAGE, i) <> '')) and (ValFor(COL_SEQUENCE,i-1) = '') then
+             begin
+              SetError(TX_NO_SEQ);
+              Exit;
+             end;
+         end;
+    end;
   if not FInptDlg then                            // outpatient stuff
   begin
@@ -953,4 +1009,11 @@
     UniqueText := False;
   FFromSelf := True;
+  {AutoSelection is only based upon uniquely matching characters.
+   Several CQs have been resolved relating to this issue:
+   See CQ:
+   7326 - Auto complete does not work correctly if user has quick orders in Medication list
+   7328 - PSI-05-016: TAM-0205-31170  Med Error due to pre-populated med screen
+   6715 PSI-04-044 Orders: NJH-0804-20315  Physician unable to enter medication order
+  }
   if UniqueText then
   begin
@@ -1129,4 +1192,5 @@
   QOQuantityStr := '';
   btnSelect.SetFocus;                             // let the exit events finish
+
   if pnlMeds.Visible then                         // display the medication fields
   begin
@@ -1294,4 +1358,5 @@
   lblQtyMsg.Caption := '';
   lblQuantity.Caption := 'Quantity';
+  FSmplPRNChkd := chkPRN.Checked;  //  GE  CQ7585
   chkPRN.Checked := False;
   FLastUnits    := '';
@@ -1318,23 +1383,5 @@
   QOPiUnChk := False;
   PKIEnviron := False;
-  if GetPKISite and GetPKIUse then  //PKI check for crypto object on workstation
-    begin
-      try  //PKI object creation
-        crypto := CoXuDigSigS.Create;
-        crypto.GetCSP;
-        StatusText(crypto.Reason);
-        PKIEnviron := True;
-      except
-        on  E: Exception do
-          begin
-            {ShowMessage('An error has been encountered while trying to create PKI environment: '+ E.Message +
-            '.  This order will be processed without Digital Signature encryption.');}
-            PKIEnviron := False;
-          end;
-      end;
-      crypto := nil;
-    end;
-  if PKIEnviron = False then
-    if GetPKISite then PKIEnviron := True;
+  if GetPKISite then PKIEnviron := True;
   with CtrlInits do
   begin
@@ -1381,9 +1428,9 @@
       end;
       pnlTop.Height := pnlFields.Height - pnlBottom.Height;
-      chkDoseNow.Top := memComment.Top + memComment.Height + 4;
+      chkDoseNow.Top := memComment.Top + memComment.Height + 1;
       lblPriority.Top := memcomment.Top + memComment.Height + 1;
       cboPriority.Top := lblPriority.Top + lblPriority.Height;
       lblAdminTime.Left := chkDoseNow.Left;
-      lblAdminTime.Top := chkDoseNow.Top + chkDoseNow.Height + 1;
+      lblAdminTime.Top := chkDoseNow.Top + chkDoseNow.Height - 1;
     end else
     begin
@@ -1456,5 +1503,6 @@
         SetDosage(IValueFor('INSTR', i));
         with cboDosage do
-          if ItemIndex > -1 then x := Text + TAB + Items[ItemIndex] else x := Text;
+          if ItemIndex > -1 then x := Text + TAB + Items[ItemIndex]
+         else x := IValueFor('INSTR',i); //AGP Change 26.41 for CQ 9102 PSI-05-015 affect copy and edit functionality
         grdDoses.Cells[COL_DOSAGE, i] := x;
         SetControl(cboRoute,  'ROUTE', i);
@@ -1474,4 +1522,5 @@
           if ItemIndex > -1 then x := x + TAB + Items[ItemIndex];
         grdDoses.Cells[COL_SCHEDULE, i] := x;
+        if chkPRN.Checked = True then grdDoses.Cells[COL_CHKXPRN,i] := '1';
         grdDoses.Cells[COL_DURATION, i] := IValueFor('DAYS', i);
         if      IValueFor('CONJ', i) = 'A' then x := 'AND'
@@ -1597,5 +1646,5 @@
   txtMed.SetFocus;
   FDrugID := '';
-  ShowOrderMessage( False );
+  //ShowOrderMessage( False );
 end;
 
@@ -1628,6 +1677,6 @@
 
 procedure TfrmODMeds.ShowControlsSimple;
-var
-  dosagetxt: string;
+//var
+  //dosagetxt: string;
 begin
   //Commented out, no longer using CharsNeedMatch Property
@@ -1661,19 +1710,43 @@
 procedure TfrmODMeds.ShowControlsComplex;
 
-  procedure MoveCombo(SrcCombo, DestCombo: TORComboBox);
-  begin
-    DestCombo.Items.Clear;
-    DestCombo.Items.Assign(SrcCombo.Items);
-    DestCombo.ItemIndex := SrcCombo.ItemIndex;
-    DestCombo.Text := Piece(SrcCombo.Text, TAB, 1);
-  end;
-
-var
-  dosagetxt: string;
+  procedure MoveCombo(SrcCombo, DestCombo: TORComboBox; CompSch: boolean = false); //AGP Changes 26.12 PSI-04-63
+  var
+  cnt,i,index: integer;
+  node,text: string;
+  begin
+  if (CompSch = false) or not (FInptDlg)then
+    begin
+      DestCombo.Items.Clear;
+      DestCombo.Items.Assign(SrcCombo.Items);
+      DestCombo.ItemIndex := SrcCombo.ItemIndex;
+      DestCombo.Text := Piece(SrcCombo.Text, TAB, 1);
+    end;
+  if (CompSch = true) and (FInptDlg) then     // AGP Changes 26.12 PSI-04-63
+    begin
+    //AGP change 26.34 CQ 7201,6902 fix the problem with one time schedule still showing for inpatient complex orders
+    DestCombo.ItemIndex := -1;
+    Text := SrcCombo.Text;
+    index := SrcCombo.ItemIndex;
+    cnt := 0;
+    for i := 0 to SrcCombo.Items.Count - 1 do
+      begin
+        node := SrcCombo.Items.Strings[i];
+        if piece(node,U,3) <> 'O' then
+          begin
+            DestCombo.Items.Add(SrcCombo.Items.Strings[i]);
+            if Piece(node,U,1) = text then DestCombo.ItemIndex := index - cnt;
+          end
+        else cnt := cnt+1;
+      end;
+    end;
+  end;
+
+//var
+  //dosagetxt: string;
 begin
   tabDose.TabIndex := TI_COMPLEX;
   MoveCombo(cboDosage,   cboXDosage);
   MoveCombo(cboRoute,    cboXRoute);
-  MoveCombo(cboSchedule, cboXSchedule);
+  MoveCombo(cboSchedule, cboXSchedule, true);  //AGP Changes 26.12 PSI-04-063
   grdDoses.Visible := True;
   btnXInsert.Visible := True;
@@ -1689,5 +1762,5 @@
   ActiveControl := grdDoses;
   //Commented out, no longer using CharsNeedMatch Property
- { NumCharsForMatch := 0;
+{  NumCharsForMatch := 0;
   for i := 0 to cboXDosage.Items.Count - 1 do         //find the shortest unit dose text on fifth piece
   begin
@@ -1719,6 +1792,8 @@
         Break;
       end;
-    if ((DoseIndex < 0) and (not IsTransferAction)) then Text := x
-    else if ((DoseIndex < 0) and IsTransferAction) then Text := ''
+    if DoseIndex <0 then Text := x
+  (*  if ((DoseIndex < 0) and (not IsTransferAction)) then Text := x
+    else if ((DoseIndex < 0) and IsTransferAction) and (DosageTab = False) then Text := ''
+    else if ((DoseIndex < 0) and IsTransferAction) and (DosageTab = True) then Text := x *)
     else ItemIndex := DoseIndex;
   end;
@@ -1740,8 +1815,10 @@
 procedure TfrmODMeds.SetSchedule(const x: string);
 var
-  NonPRNPart: string;
+NonPRNPart: string;
 begin
   cboSchedule.ItemIndex := -1;
-  if Pos('PRN', x) > 0 then
+  //AGP change CQ 10593, remove code to match the new expected first dose code
+  //PSI-05-026
+ (* if Pos('PRN', x) > 0 then
   begin
     NonPRNPart := Trim(Copy(x, 1, Pos('PRN', x) - 1));
@@ -1762,5 +1839,5 @@
       chkPRN.Checked := True;
   end else
-  begin
+  begin  *)
     chkPRN.Checked := False;
     cboSchedule.SelectByID(x);
@@ -1773,26 +1850,55 @@
       else
       begin
-        cboSchedule.Items.Add(x);
-        cboSchedule.Text := x;
-        cboSchedule.SelectByID(x);
+      if Pos('PRN', x) > 0 then
+        begin
+         NonPRNPart := Trim(Copy(x, 1, Pos('PRN', x) - 1));
+         chkPRN.Checked := True;
+         cboSchedule.SelectByID(NonPRNPart);
+         if cboSchedule.ItemIndex > -1 then  EXIT;
+         cboSchedule.Items.Add(NonPRNPart);
+         cboSchedule.Text := NonPRNPart;
+         cboSchedule.SelectByID(NonPRNPart);
+         EXIT;
+        end;
+         cboSchedule.Items.Add(x);
+         cboSchedule.Text := x;
+         cboSchedule.SelectByID(x);
       end;
-    end;
   end;
 end;
 
 { Medication edit --------------------------------------------------------------------------- }
-
 procedure TfrmODMeds.tabDoseChange(Sender: TObject);
 var
-  x: string;
-
-begin
-  inherited;
+  //text,x, tmpsch: string;
+  text, x: string;
+  reset: integer;
+begin
+  inherited;
+  reset := 0;
+  //AGP change for CQ 6521 added warning message
+  //AGP Change for CQ 7508 added tab information
+  //GE  Change warning message functionality show only   cq 7590
+  //    when tab changes from complex to simple.
+  //AGP Change for CQ 7834 and 7832 change text and added check to see if some values have been completed in row 1
+  if (tabDose.TabIndex = 0) and ((ValFor(COL_DOSAGE, 1)<>'') or (ValFor(COL_SCHEDULE, 1)<>'') or (ValFor(COL_DURATION, 1)<>'') or
+      (ValFor(COL_SEQUENCE, 1)<>''))  then
+      begin
+        text := 'By switching to the Dosage Tab, ' ;
+         if (InfoBox(text +'you will lose all data on this screen. Click OK to continue or Cancel','Warning',MB_OKCANCEL)=IDCANCEL) then
+            begin
+             if tabDose.TabIndex = 1 then tabDose.TabIndex := 0
+             else tabDose.TabIndex := 1;
+             reset := 1;
+            end;
+      end;
   case tabDose.TabIndex of
   TI_DOSE:    begin
+                cboXSchedule.Clear;                       // Added to Fix CQ: 9603
                 // clean up responses?
                 FSuppressMsg := FOrigiMsgDisp;
                 ShowControlsSimple;
-                ResetOnTabChange;
+                if reset = 0 then ResetOnTabChange;
+                txtNss.Left := lblSchedule.Left + lblSchedule.Width + 2;
                 if (FInptDlg) then txtNss.Visible := True
                 else txtNss.Visible := False;
@@ -1805,8 +1911,9 @@
   TI_COMPLEX: begin
                 FSuppressMsg := FOrigiMsgDisp;
+                if reset = 1 then exit;
                 ShowControlsComplex;
                 ResetOnTabChange;
+                txtNss.Left := grdDoses.Left + grdDoses.ColWidths[0] + grdDoses.ColWidths[1] + grdDoses.ColWidths[2] + 3;
                 txtNss.Visible := False;
-                if txtNss.Visible then txtNss.Visible := False;           
                 x := cboXDosage.Text + TAB;
                 with cboXDosage   do if ItemIndex > -1 then x := x + Items[ItemIndex];
@@ -1818,8 +1925,10 @@
                 with cboXSchedule do if ItemIndex > -1 then x := x + Items[ItemIndex];
                 grdDoses.Cells[COL_SCHEDULE, 1] := x;
+                UpdateStartExpires(ValFor(VAL_SCHEDULE,1));
                 ControlChange(Self);
              end; {TI_COMPLEX}
   end; {case}
 end;
+
 
 procedure TfrmODMeds.lblGuidelineClick(Sender: TObject);
@@ -1901,11 +2010,6 @@
 
 procedure TfrmODMeds.cboDosageChange(Sender: TObject);
-var
-  tmpIdx: integer;
-  tmpTxt,tmpTxt1: string;
-begin
-  inherited;
-  //if length(cboDosage.Text) < 1 then
-  //  cboDosage.ItemIndex := -1;
+begin
+  inherited;
   UpdateRelated;
 end;
@@ -1946,6 +2050,4 @@
 begin
   inherited;
-//if cboRoute.Text = '' then
-//  cboRoute.ItemIndex := -1;
   with cboRoute do
     if ItemIndex > -1 then
@@ -1994,5 +2096,5 @@
 begin
   inherited;
-  if (FInptDlg) and (cboSchedule.Text = 'OTHER') then
+  if  (FInptDlg) and (cboSchedule.Text = 'OTHER') then
   begin
     othSch := CreateOtherScheduel;
@@ -2004,6 +2106,4 @@
     end;
   end;
-//if cboSchedule.Text = '' then
-//  cboSchedule.ItemIndex := -1;
 //Remove Deletion of Text, since we are changing the validation to be on exit of the control.
 {  if (Length(cboSchedule.Text)>0) and (cboSchedule.ItemIndex < 0) and FInptDlg then
@@ -2116,5 +2216,19 @@
       if Length(Route) = 0 then Route := ValueOf(FLD_ROUTE_NM);
       Schedule := ValueOf(FLD_SCHED_EX);
-      if Length(Schedule) = 0 then Schedule := ValueOf(FLD_SCHEDULE);
+      (* Schedule := Piece(Temp,U,1);
+      if Piece(Temp,U,3) = '1' then Schedule := Schedule + ' AS NEEDED';
+      if UpperCase(Copy(Schedule, Length(Schedule) - 18, Length(Schedule))) = 'AS NEEDED AS NEEDED'
+      then Schedule := Copy(Schedule, 1, Length(Schedule) - 10); *)
+      if Length(Schedule) = 0 then
+        begin
+          Schedule := ValueOf(FLD_SCHEDULE);
+          if RightStr(Schedule,3) = 'PRN' then
+             begin
+               Schedule := Copy(Schedule,1,Length(Schedule)-3); //Remove the Trailing PRN
+               if (RightStr(Schedule,1) = ' ') or (RightStr(Schedule,1) = '-') then
+               Schedule := Copy(Schedule,1,Length(Schedule)-1);
+               Schedule := Schedule + ' AS NEEDED'
+             end;
+        end;
       Result := FSIGVerb + ' ' + Dose + ' ' + Route + ' ' + Schedule;
     end;
@@ -2140,5 +2254,16 @@
         if Length(Route) = 0 then Route := ValueOf(FLD_ROUTE_NM, i);
         Schedule := ValueOf(FLD_SCHED_EX, i);
-        if Length(Schedule) = 0 then Schedule := ValueOf(FLD_SCHEDULE, i);
+        //if Length(Schedule) = 0 then Schedule := ValueOf(FLD_SCHEDULE, i);
+        if Length(Schedule) = 0 then
+        begin
+          Schedule := ValueOf(FLD_SCHEDULE);
+          if RightStr(Schedule,3) = 'PRN' then
+             begin
+               Schedule := Copy(Schedule,1,Length(Schedule)-3); //Remove the Trailing PRN
+               if (RightStr(Schedule,1) = ' ') or (RightStr(Schedule,1) = '-') then
+               Schedule := Copy(Schedule,1,Length(Schedule)-1);
+               Schedule := Schedule + ' AS NEEDED'
+             end;
+        end;
         Duration := ValueOf(FLD_DURATION, i);
         if Length(Duration) > 0 then Duration := 'FOR ' + Duration;
@@ -2241,5 +2366,8 @@
 begin
   Result := Piece(Piece(grdDoses.Cells[COL_DOSAGE, ARow], TAB, 2), U, 4);
-  if (not FInptDlg) and (Length(FDrugID) > 0) then
+  //AGP CHANGE 26.33 change for Remedy ticket 87476 fix for quick orders for complex
+  //inpatient orders not displaying the correct unit dose in Pharmacy
+  //if (not FInptDlg) and (Length(FDrugID) > 0) then
+  if Length(FDrugID) > 0 then
   begin
     Result := '';
@@ -2454,5 +2582,5 @@
   TI_COMPLEX:
     begin
-      if txtNss.Visible then txtNss.Visible := False;
+      //if txtNss.Visible then txtNss.Visible := False;
       with grdDoses do for i := 1 to Pred(RowCount) do
       begin
@@ -2491,4 +2619,11 @@
                                    else Responses.Update('ROUTE',    i, '', x);
         x := ValueOf(FLD_SCHEDULE, i);  Responses.Update('SCHEDULE', i, x, x);
+        if FSmplPRNChkd then   // GE CQ7585  Carry PRN checked from simple to complex tab
+        begin
+           pnlXSchedule.Tag := 1;
+           chkXPRN.Checked := True;
+          //cboXScheduleClick(Self);// force onclick to fire when complex tab is entered
+           FSmplPRNChkd := False;
+        end;
         x := ValueOf(FLD_DURATION, i);  Responses.Update('DAYS',     i, UpperCase(x), x);
         x := ValueOf(FLD_SEQUENCE, i);
@@ -2508,5 +2643,6 @@
   begin
     Responses.Update('NOW',     1, ValueOf(FLD_NOW_ID), ValueOf(FLD_NOW_NM));
-    x := InpatientSig;                  Responses.Update('SIG',     1, TX_WPTYPE, x);
+    x := InpatientSig;
+    Responses.Update('SIG',     1, TX_WPTYPE, x);
   end else                                        // outpatient orders
   begin
@@ -2548,4 +2684,5 @@
     VAL_DURATION : Result := Piece(Cells[COL_DURATION, ARow], TAB, 1);
     VAL_SEQUENCE : Result := Piece(Cells[COL_SEQUENCE, ARow], TAB, 1);
+    VAL_CHKXPRN  : Result := Cells[COL_CHKXPRN, ARow];
     end;
 end;
@@ -2729,5 +2866,5 @@
 procedure TfrmODMeds.ShowEditor(ACol, ARow: Integer; AChar: Char);
 var
-  x, NonPRNPart: string;
+  x,tmpText: string;
 
   procedure PlaceControl(AControl: TWinControl);
@@ -2759,4 +2896,5 @@
 begin
   inherited;
+  txtNSS.Visible := False;
   //Make space just select editor.  This blows up as soon as some joker makes a
   //dosage starting with a space.
@@ -2784,10 +2922,11 @@
                       //grdDoses.Cells[COL_SCHEDULE, ARow] := grdDoses.Cells[COL_SCHEDULE, Pred(ARow)];
                     end;
-                    if grdDoses.Cells[COL_SEQUENCE, Pred(ARow)] = '' then
+                //AGP Change 26.45 remove auto-populate of the sequence field
+                {*    if grdDoses.Cells[COL_SEQUENCE, Pred(ARow)] = '' then
                     begin
                       if StrToIntDef(Piece(grdDoses.Cells[COL_DURATION, Pred(ARow)], ' ', 1), 0) > 0
                         then grdDoses.Cells[COL_SEQUENCE, Pred(ARow)] := 'THEN'
                         else grdDoses.Cells[COL_SEQUENCE, Pred(ARow)] := 'AND';
-                    end;
+                    end;  *}
                   end;
                   // set appropriate value for cboDosage
@@ -2806,7 +2945,18 @@
   COL_SCHEDULE: begin
                   // set appropriate value for cboSchedule
+                  if FInptDlg then txtNSS.Visible := True;
                   x := Piece(grdDoses.Cells[COL_SCHEDULE, ARow], TAB, 1);
                   Changing := TRUE;
-                  chkXPRN.Checked := False;
+                  if ValFor(VAL_CHKXPRN,Arow)='1' then chkXPRN.Checked := true
+                  else chkXPRN.Checked := False;
+                  if Pos('PRN',x)>0 then
+                    begin
+                      cboXSchedule.SelectByID(x);
+                      if cboXSchedule.ItemIndex <0 then
+                        begin
+                          x := Trim(Copy(x, 1, Pos('PRN', x) - 1));
+                          chkXPRN.Checked := true;
+                        end;
+                    end;
                   if Length(x) > 0 then
                   begin
@@ -2815,5 +2965,5 @@
                   end
                   else cboXSchedule.ItemIndex := -1;
-                  if Pos('PRN', x) > 0 then
+                (*  if Pos('PRN', x) > 0 then
                   begin
                     NonPRNPart := Trim(Copy(x, 1, Pos('PRN', x) - 1));
@@ -2825,5 +2975,5 @@
                       if cboXSchedule.ItemIndex < 0 then cboXSchedule.Text := x;
                     end;
-                  end;
+                  end; *)
                   Changing := FALSE;
                   pnlXSequence.Tag := ARow;
@@ -2844,20 +2994,23 @@
                     btnXDuration.Caption := 'days';
                   end;
+                  tmpText := txtXDuration.Text;  //Fix for CQ: 8107 - Kloogy but works.
                   UpdateDurationControls(False);
-
                   Changing := FALSE;
                   pnlXDuration.Tag := ARow;
                   PlaceControl(pnlXDuration);
                   txtXDuration.SetFocus;
+                  ARow1 := ARow;
+                  txtXDuration.Text := tmpText;  //Fix for CQ: 8107 - Kloogy but works.
                   if AChar <> #0 then PostMessage(Handle, UM_DELAYEVENT, Ord(AChar), COL_DURATION);
                 end;
   COL_SEQUENCE: begin
                   x := ValFor(COL_SEQUENCE, ARow);
-                  if x = '' then x := 'then';
+                  //if x = '' then x := 'and';  AGP Change 26.46 remove for CQ 9535
                   btnXSequence.Caption := x;
                   pnlXSequence.Caption := btnXSequence.Caption;
                   pnlXSequence.Tag := ARow;
+                  ARow1 := ARow;
                   PlaceControl(pnlXSequence);
-                  btnXSequence.Width := pnlXSequence.Width;                  
+                  btnXSequence.Width := pnlXSequence.Width;
                 end;
   end; {case ACol}
@@ -2929,5 +3082,4 @@
     then lblQtyMsg.Caption := TX_QTY_PRE + x + TX_QTY_POST
     else lblQtyMsg.Caption := '';
-
 end;
 
@@ -2985,5 +3137,5 @@
     cboXRoute.ItemIndex := -1;
     Exit;
-  end;
+  end;  
   cboXRouteClick(Self);
   cboXRoute.Tag := -1;
@@ -3013,5 +3165,5 @@
 procedure TfrmODMeds.cboXScheduleChange(Sender: TObject);
 var
-  othSch, x, PRN: string;
+  othSch, x: string;
   idx : integer;
 begin
@@ -3031,9 +3183,13 @@
       end;
     end;
-    if chkXPRN.Checked then PRN := ' PRN' else PRN := '';
+  (* if chkXPRN.Checked then PRN := ' PRN' else PRN := '';
     with cboXSchedule do if ItemIndex > -1
       then x := Text + PRN + TAB + Items[ItemIndex]
-      else x := Text + PRN;
+      else x := Text + PRN; *)
+    with cboXSchedule do if ItemIndex > -1
+      then x := Text + TAB + Items[ItemIndex]
+      else x := Text;
     grdDoses.Cells[COL_SCHEDULE, pnlXSchedule.Tag] := x;
+    self.cboSchedule.Text := x;
     UpdateRelated;
   end;
@@ -3042,21 +3198,30 @@
 procedure TfrmODMeds.cboXScheduleClick(Sender: TObject);
 var
-  x, PRN: string;
-begin
-  inherited;
-  if chkXPRN.Checked then PRN := ' PRN' else PRN := '';
+  x: string;
+begin
+  inherited;
+  //if chkXPRN.Checked then PRN := ' PRN' else PRN := '';
+ (* with cboXSchedule do if ItemIndex > -1
+    then x := Text + PRN + TAB + Items[ItemIndex]
+    else x := Text + PRN;  *)
   with cboXSchedule do if ItemIndex > -1
-    then x := Text + PRN + TAB + Items[ItemIndex]
-    else x := Text + PRN;
-  if (Pos('PRN',X)>0) and (pnlXSchedule.Tag = 1) then
+    then x := Text + TAB + Items[ItemIndex]
+    else x := Text;
+   (* if (Pos('PRN',X)>0) and (pnlXSchedule.Tag = 1) then
     if lblAdmintime.visible then
-      lblAdmintime.Caption := '';
+      lblAdmintime.Caption := ''; *)
   grdDoses.Cells[COL_SCHEDULE, pnlXSchedule.Tag] := x;
+  UpdateStartExpires(x);
   UpdateRelated;
 end;
 
 procedure TfrmODMeds.chkXPRNClick(Sender: TObject);
-begin
-  inherited;
+var
+check: string;
+begin
+  inherited;
+  if self.chkXPRN.Checked = True then check := '1'
+  else check := '0';
+  self.grdDoses.Cells[COL_CHKXPRN, self.grdDoses.Row] := check;
   if not Changing then cboXScheduleClick(Self);
 end;
@@ -3096,4 +3261,5 @@
 var
   I, Code: Integer;
+  OrgValue: string;
 begin
   inherited;
@@ -3103,8 +3269,13 @@
     Val(txtXDuration.Text, I, Code);
     UpdateDurationControls(Code <> 0);
-    if (Code <> 0) and (I=0) then
-    begin
-      ShowMessage('Free text input is not allowed!');
-      txtXDuration.Text := '0';
+    //Commented out the "and" to resolve CQ: 7557
+    if (Code <> 0) {and (I=0)} then
+    begin
+      ShowMessage('Please use numeric characters only.');
+      with txtXDuration do
+      begin
+        Text := IntToStr(I);
+        SelStart := Length(Text);
+      end;
       Exit;
       btnXDuration.Width := 8;
@@ -3114,12 +3285,35 @@
       PopDuration.Items.Tag := 0;
       btnXDuration.Caption := '';
-    end
+    end;
+   {AGP change 26.19 for PSI-05-018 cq #7322
     else if PopDuration.Items.Tag = 0 then
     begin
       PopDuration.Items.Tag := 3;  //Days selection
       btnXDuration.Caption := 'days';
-    end;
+    end; }
     grdDoses.Cells[COL_DURATION, pnlXDuration.Tag] := txtXDuration.Text + ' ' + Uppercase(btnXDuration.Caption);
-  end else grdDoses.Cells[COL_DURATION, pnlXDuration.Tag] := '';
+  end else   //AGP CHANGE ORDER
+       begin
+         if not(FInptDlg) then grdDoses.Cells[COL_DURATION, pnlXDuration.Tag] := '';
+         OrgValue := ValFor(COL_DURATION, pnlxDuration.tag);
+         //if ((txtXDuration.Text = '0') or (txtXDuration.Text = '')) and ((ValFor(COL_SEQUENCE, ARow1) = 'THEN') and (FInptDlg)) then //AGP CHANGE ORDER
+         //AGP change 26.33 Then/And conjunction requiring a duration to include outpatient orders also
+         if ((txtXDuration.Text = '0') or (txtXDuration.Text = '')) and (ValFor(COL_SEQUENCE, ARow1) = 'THEN') then //AGP CHANGE ORDER
+             begin
+               if (InfoBox('A duration is required when using "Then" as a sequence.'+CRLF+'"Then" will be remove from the sequence field if you continue'+
+                    CRLF+'Click "OK" to continue or click "Cancel"','Duration Warning', MB_OKCANCEL)=1) then
+                    begin
+                        grdDoses.Cells[COL_DURATION, pnlXDuration.Tag] := '';
+                        pnlXSequence.Tag := ARow1;
+                        pnlXSequence.Caption := '';
+                        grdDoses.Cells[COL_SEQUENCE, pnlXSequence.Tag] := '';
+                        btnXSequence.Click;
+                    end
+                    else
+                    grdDoses.Cells[COL_DURATION, pnlXDuration.Tag] := OrgValue;
+               end
+             else grdDoses.Cells[COL_DURATION, pnlXDuration.Tag] := txtXDuration.Text;
+       end;
+   // end;
   ControlChange(Self);
   UpdateRelated;
@@ -3151,7 +3345,21 @@
 begin
   inherited;
+  inherited;
   with TSpeedButton(Sender) do APoint := ClientToScreen(Point(0, Height));
   popXSequence.Popup(APoint.X, APoint.Y);
   pnlXSequence.Caption := btnXSequence.Caption;
+  {
+  with TSpeedButton(Sender) do APoint := ClientToScreen(Point(0, Height));
+  popXSequence.Popup(APoint.X, APoint.Y);
+  pnlXSequence.Caption := btnXSequence.Caption;
+  if (pnlXSequence.Caption = 'then') and
+      ((ValFor(COL_DURATION, ARow1) = '') or
+       (ValFor(COL_DURATION, ARow1) = '0')) then
+     begin
+       InfoBox('A duration is required when using "Then" as a conjunction','Duration Warning',MB_OK);
+       pnlXSequence.Caption := '';
+       btnXSequence.Caption := '';
+     end;
+     }
 end;
 
@@ -3162,4 +3370,13 @@
   inherited;
   with TMenuItem(Sender) do if Tag > 0 then x := Caption else x := '';
+ //AGP Changes 26.12 PSI-04-63
+ //if ((x = 'then') and (FInptDlg)) and ((ValFor(COL_DURATION, ARow1) = '') or (ValFor(COL_DURATION, ARow1) = '0')) then
+ //AGP change 26.32 Then/And conjunction requiring a duration to include outpatient orders
+ if (x = 'then') and ((ValFor(COL_DURATION, ARow1) = '') or (ValFor(COL_DURATION, ARow1) = '0')) then
+     begin
+       InfoBox('A duration is required when using "Then" as a conjunction' + CRLF + CRLF+
+           'The patient will be instructed to take these doses consecutively, not concurrently.','Duration Warning',MB_OK);
+       x := '';
+     end;
   btnXSequence.Caption := x;
   pnlXSequence.Caption := btnXSequence.Caption;
@@ -3279,5 +3496,5 @@
     FLD_ROUTE_EX  : with cboRoute do
                      if ItemIndex > -1  then Result := Piece(Items[ItemIndex], U, 4);
-    FLD_SCHEDULE  : begin
+    FLD_SCHEDULE  : begin        //gary)
                       Result := UpperCase(Trim(cboSchedule.Text));
                       if chkPRN.Checked then Result := Result + ' PRN';
@@ -3287,8 +3504,38 @@
     FLD_SCHED_EX  : begin
                       with cboSchedule do
+                        begin
                         if ItemIndex > -1 then Result := Piece(Items[ItemIndex], U, 2);
+                   (*     if (Length(Result)=0) and (ItemIndex > -1) then
+                            begin
+                              Result := Piece(Items[ItemIndex], U, 1);
+                              if Piece(Items[ItemIndex], U, 3) = 'P' then
+                              begin
+                                if RightStr(Result,3) = 'PRN' then
+                                  begin
+                                    Result := Copy(Result,1,Length(Result)-3); //Remove the Trailing PRN
+                                    if (RightStr(Result,1) = ' ') or (RightStr(Result,1) = '-') then
+                                    Result := Copy(Result,1,Length(Result)-1);
+                                  end;
+                               Result := Result + ' AS NEEDED';
+                              end;
+                            end;
+                        end; *)
+                      if RightStr(Result,3) = 'PRN' then
+                           begin
+                              Result := Copy(Result,1,Length(Result)-3); //Remove the Trailing PRN
+                              if (RightStr(Result,1) = ' ') or (RightStr(Result,1) = '-') then
+                              Result := Copy(Result,1,Length(Result)-1);
+                              Result := Result + ' AS NEEDED'
+                           end;
                       if (Length(Result) > 0) and chkPRN.Checked then Result := Result + ' AS NEEDED';
                       if UpperCase(Copy(Result, Length(Result) - 18, Length(Result))) = 'AS NEEDED AS NEEDED'
                         then Result := Copy(Result, 1, Length(Result) - 10);
+                      if UpperCase(Copy(Result, Length(Result) - 12, Length(Result))) = 'PRN AS NEEDED' then
+                          begin
+                            Result := Copy(Result, 1, Length(Result) - 13);
+                            if RightStr(Result,1)=' ' then Result := Result + 'AS NEEDED'
+                            else Result := Result + ' AS NEEDED';
+                          end;
+                    end;
                     end;
     FLD_SCHED_TYP : with cboSchedule do
@@ -3330,7 +3577,13 @@
       FLD_ROUTE_AB  : Result := Piece(Piece(Cells[COL_ROUTE, ARow], TAB, 2), U, 3);
       FLD_ROUTE_EX  : Result := Piece(Piece(Cells[COL_ROUTE, ARow], TAB, 2), U, 4);
-      FLD_SCHEDULE  : Result := Piece(Cells[COL_SCHEDULE, ARow], TAB, 1);
+      FLD_SCHEDULE  : begin
+                         Result := Piece(Piece(Cells[COL_SCHEDULE, ARow], TAB, 2), U, 1);
+                         if Result = '' then Result := Piece(Cells[COL_SCHEDULE, ARow], TAB, 1);
+                         if valFor(VAL_CHKXPRN,ARow)='1' then Result := Result + ' PRN';
+                         if UpperCase(Copy(Result, Length(Result) - 6, Length(Result))) = 'PRN PRN' then
+                         Result := Copy(Result, 1, Length(Result) - 4);
+                      end;
       FLD_SCHED_EX  : begin
-                        Result := Piece(Piece(Cells[COL_SCHEDULE, ARow], TAB, 2), U, 2);
+                        (*Result := Piece(Piece(Cells[COL_SCHEDULE, ARow], TAB, 2), U, 2);
                         if Result = '' then //Added for CQ: 7639
                         begin
@@ -3343,4 +3596,24 @@
                            (Pos('PRN', Piece(Cells[COL_SCHEDULE, ARow], TAB, 1)) > 0)
                            then Result := Result + ' AS NEEDED';
+                      end;*)
+                        Result := Piece(Piece(Cells[COL_SCHEDULE, ARow], TAB, 2),U,2);
+                        if Result = '' then Result := Piece(Piece(Cells[COL_SCHEDULE, ARow], TAB, 2),U,1); //Added for CQ: 7639
+                        if Result = '' then Result := Piece(Cells[COL_SCHEDULE, ARow], TAB, 1);
+                        if RightStr(Result,3) = 'PRN' then
+                           begin
+                              Result := Copy(Result,1,Length(Result)-3); //Remove the Trailing PRN
+                              if (RightStr(Result,1) = ' ') or (RightStr(Result,1) = '-') then
+                              Result := Copy(Result,1,Length(Result)-1);
+                              Result := Result + ' AS NEEDED';
+                           end;
+                        if valFor(VAL_CHKXPRN,ARow)='1' then Result := Result + ' AS NEEDED';
+                        if UpperCase(Copy(Result, Length(Result) - 18, Length(Result))) = 'AS NEEDED AS NEEDED'
+                        then Result := Copy(Result, 1, Length(Result) - 10);
+                        if UpperCase(Copy(Result, Length(Result) - 12, Length(Result))) = 'PRN AS NEEDED' then
+                          begin
+                            Result := Copy(Result, 1, Length(Result) - 13);
+                            if RightStr(Result,1)=' ' then Result := Result + 'AS NEEDED'
+                            else Result := Result + ' AS NEEDED';
+                          end;
                       end;
       FLD_SCHED_TYP : Result := Piece(Piece(Cells[COL_SCHEDULE, ARow], TAB, 2), U, 3);
@@ -3552,17 +3825,11 @@
 procedure TfrmODMeds.UpdateStartExpires(const CurSchedule: string);
 var
-  ShowText, Duration, ASchedule: string;
+  CompSch, ShowText, Duration, ASchedule: string;
   AdminTime:    TFMDateTime;
-  Interval, PrnPos: Integer;
+  i, j, Interval, PrnPos: Integer;
 begin
   if Length(CurSchedule)=0 then Exit;
   ASchedule := Trim(CurSchedule);
-  if (Pos('^',ASchedule)=0) then
-  begin
-    PrnPos := Pos('PRN',ASchedule);
-    if (PrnPos > 1) and (CharAt(ASchedule,PrnPos-1) <> ';') then
-      Delete(ASchedule, PrnPos, Length(ASchedule));
-  end
-  else if (Pos('^',ASchedule)>0) then
+  if (Pos('^',ASchedule)>0) then
   begin
     PrnPos := Pos('PRN',ASchedule);
@@ -3571,7 +3838,50 @@
   end;
   ASchedule := Trim(ASchedule);
+  if self.tabDose.TabIndex = TI_COMPLEX then
+    begin
+      CompSch := valFor(VAL_SCHEDULE,1);
+      if CompSch = '' then
+        begin
+          ASchedule := '';
+          AdminTime := -1;
+        end;
+      if CompSch <> '' then
+        begin
+          for i := 0 to self.cboXSchedule.Items.Count-1 do
+            begin
+              if (Piece(self.cboXSchedule.Items.Strings[i],U,1) = CompSch) and (Piece(self.cboXSchedule.Items.Strings[i],U,3)='P') then
+                begin
+                  AdminTime := -1;
+                  Aschedule := '';
+                end;
+            end;
+        end;
+        if valFor(VAL_CHKXPRN,1)='1' then
+          begin
+            AdminTime := -1;
+            Aschedule := '';
+          end;
+      if (ASchedule <> '') and (CompSch <> '') then ASchedule := ';' + CompSch;
+    end;
   if Length(ASchedule)>0 then
-      LoadAdminInfo(ASchedule, txtMed.Tag, ShowText, AdminTime, Duration)
-  else Exit;
+      LoadAdminInfo(ASchedule, txtMed.Tag, ShowText, AdminTime, Duration);
+  //else Exit;
+  if (AdminTime > 0) and (self.tabDose.TabIndex = TI_DOSE) then
+    begin
+     if self.cboSchedule.ItemIndex = -1 then
+       begin
+         for j := 0 to self.cboSchedule.items.Count -1 do
+           begin
+             if (Piece(self.cboSchedule.Items.Strings[j],U,1) = Piece(Aschedule,';',2)) and (Piece(self.cboSchedule.Items.Strings[j],U,3)='P') then
+               begin
+                 AdminTime := -1;
+                 break;
+               end;
+           end;
+       end;
+     if (self.cboSchedule.ItemIndex > -1) and (Piece(self.cboSchedule.Items.Strings[self.cboSchedule.ItemIndex],U,3)='P') then
+       AdminTime := -1;
+     if self.chkPRN.Checked = true then AdminTime := -1
+    end;
   if AdminTime > 0 then
   begin
@@ -3630,5 +3940,5 @@
   CurSupply, i, pNum, j: Integer;
   CurQuantity: double;
-  LackQtyInfo, SaveChanging: Boolean;
+  LackQtyInfo, SaveChanging, DispFirstDose: Boolean;
 begin
   inherited;
@@ -3637,4 +3947,5 @@
   SaveChanging := Changing;
   Changing := TRUE;
+  DispFirstDose := FALSE;
   // don't allow Exit procedure so Changing gets reset appropriately
   CurUnits    := '';
@@ -3700,11 +4011,22 @@
       or ((Length(cboSchedule.Text)>0) and (cboSchedule.ItemIndex < 0)) then
     begin
-        if (chkDoseNow.Checked) and (chkDoseNow.Visible) then
+      if (chkDoseNow.Checked) and (chkDoseNow.Visible) then
+      begin
+        chkDoseNowClick(Self);
+        chkDoseNow.Checked := False;
+      end;
+      for i := 0 to cboSchedule.Items.Count-1 do
         begin
-          chkDoseNowClick(Self);
-          chkDoseNow.Checked := False;
+                  if Piece(cboSchedule.Items.Strings[i],U,1) = Uppercase(cboSchedule.Text) then
+            begin
+              DispFirstDose := True;
+              break;
+            end;
         end;
-        chkDoseNow.Visible := False;
-        lblAdminTime.Visible := False;
+      if not DispFirstDose then
+        begin
+          chkDoseNow.Visible := False;
+          lblAdminTime.Visible := False;
+        end;
     end
     else
@@ -3715,8 +4037,8 @@
     if Responses.EventType in ['A','D','T','M','O'] then lblAdminTime.Visible := False;
   end;
-  if not FInptDlg then
+    if not FInptDlg then
   begin
     CurSchedule := CurScheduleOut;
-    if CurInstruct <> FLastInstruct
+    if (CurInstruct <> FLastInstruct) and (CurUnits <> U) //AGP Change 26.48 Do not update quantity and day supply if no matching dose on the server
       then UpdateDefaultSupply(CurUnits, CurSchedule, CurDuration, CurDispDrug, CurSupply, CurQuantity,
                                LackQtyInfo);
@@ -3751,16 +4073,38 @@
 
 procedure TfrmODMeds.cmdAcceptClick(Sender: TObject);
-begin
-  if (cboSchedule.Text = 'OTHER') and (FInptDlg)then
+var
+i: integer;
+begin
+  if (FInptDlg) and (cboSchedule.Text = 'OTHER') then
   begin
     cboScheduleClick(Self);
     Exit;
   end;
+  //AGP Change for 26.45 PSI-04-069
+  if self.tabDose.TabIndex = 1 then
+    begin
+       for i := 2 to self.grdDoses.RowCount do
+         begin
+           if ((ValFor(COL_DOSAGE, i-1) <> '') and (ValFor(COL_DOSAGE, i) <> '')) and (ValFor(COL_SEQUENCE,i-1) = '') then
+             begin
+              infoBox('To be able to complete a complex order every row except for the last row must have a conjunction defined. ' + CRLF
+              + CRLF + 'Verify that all rows have a conjunction defined.','Sequence Error',MB_OK);
+              Exit;
+             end;
+           //text := Self.cboXDosage.Items.Strings[i];
+         end;
+    end;
   if FInptDlg and (not FOutptIV)
     then DisplayGroup := DisplayGroupByName('UD RX')
   else DisplayGroup := DisplayGroupByName('O RX');
+  //timCheckChangesTimer(Self);
   DropLastSequence;
   cmdAccept.SetFocus;
   inherited;
+  (*if self.Responses.Cancel = true then
+    begin
+      self.Destroy;
+      exit;
+    end; *)
 end;
 
@@ -3791,5 +4135,5 @@
     if length(theSch)>0 then
     begin
-      if (ValueOf(FLD_SCHED_TYP) <> 'O') and (InfoBox(T1+medNm+T+T2+theSch+T+T3+'NOW"'+T4, 'Warning', MB_OKCANCEL or MB_ICONWARNING) = IDCANCEL) then
+      if ( (ValueOf(FLD_SCHED_TYP) <> 'O') and (InfoBox(T1+medNm+T+T2+theSch+T+T3+'NOW"'+T4, 'Warning', MB_OKCANCEL or MB_ICONWARNING) = IDCANCEL) )then
       begin
         chkDoseNow.Checked := False;
@@ -3808,7 +4152,7 @@
   if (tabDose.TabIndex = TI_COMPLEX) and chkDoseNow.Checked  then
   begin
-    if (ValueOf(FLD_SCHED_TYP) <> 'O') and ( InfoBox('Give Additional Dose Now is in addition to those listed in the table.' + CRLF +
+    if ( (ValueOf(FLD_SCHED_TYP) <> 'O') and (InfoBox('Give Additional Dose Now is in addition to those listed in the table.' + CRLF +
                  'Please adjust the duration of the first row, if necessary.',
-                 'Give Additional Dose Now for Complex Order', MB_OKCANCEL or MB_ICONWARNING) = IDCANCEL) then
+                 'Give Additional Dose Now for Complex Order', MB_OKCANCEL or MB_ICONWARNING) = IDCANCEL) ) then
     begin
       chkDoseNow.Checked := False;
@@ -3908,7 +4252,15 @@
 var
   tempSch: string;
-begin
-  inherited;
-  if chkPRN.Checked then lblAdminTime.Caption := ''
+  PRNPos: integer;
+begin
+  inherited;
+  //GE  CQ 7552
+  if chkPRN.Checked then
+  begin
+     lblAdminTime.Caption := '';
+     PrnPos := Pos('PRN',cboSchedule.Text);
+     if (PrnPos < 1) then
+        UpdateStartExpires(cboSchedule.Text + ' PRN');
+  end
   else
   begin
@@ -3918,5 +4270,5 @@
       UpdateStartExpires(tempSch);
     end;
-    lblAdminTime.Caption := FAdminTimeLbl;
+    //lblAdminTime.Caption := FAdminTimeLbl;
     if txtQuantity.visible then
       cboScheduleClick(Self);
@@ -4031,7 +4383,5 @@
   end
   else if (Key = #13) and (ActiveControl = txtMed) then
-    Key := #0   //Don't let the base class turn it into a forward tab!
-  else
-    inherited;
+    Key := #0;   //Don't let the base class turn it into a forward tab!
 end;
 
@@ -4284,5 +4634,5 @@
   inherited;
   if MessageDlg('You can also select ' + '"' + 'Other' + '"' + ' from the schedule list'
-    + ' to create a day-of-week or admin-time only schedule.'
+    + ' to create a day-of-week schedule.'
     + #13#10 + 'Click OK to launch schedule builder',
     mtInformation, [mbOK, mbCancel],0) = mrOK then
@@ -4292,4 +4642,9 @@
       cboSchedule.SelectByID('OTHER');
       cboScheduleClick(Self);
+    end;
+    if  (tabDose.TabIndex = TI_COMPLEX) then
+    begin
+      cboXSchedule.SelectByID('OTHER');
+      CBOXScheduleChange(Self);
     end;
   end;
@@ -4325,13 +4680,26 @@
 
 procedure TfrmODMeds.ValidateInpatientSchedule(ScheduleCombo: TORComboBox);
-begin
-  //CQ 7575  Schedule coming across lower-case, change all schedules to Upper-Case.
+var
+  tmpIndex : Integer;
+begin
+
+{CQ: 6690 - Orders - autopopulation of schedule field - overtyping only 1 character
+ CQ: 7280 - PTM 32-34, 42 Meds: NJH-0205-20901 MED DIALOG DROPPING FIRST LETTER (schedule)}
+
+ //CQ 7575  Schedule coming across lower-case, change all schedules to Upper-Case.
   if (Length(ScheduleCombo.Text) > 0) then
-     ScheduleCombo.Text := UpperCase(ScheduleCombo.Text);
+    ScheduleCombo.Text := TrimLeft(UpperCase(ScheduleCombo.Text));
+    {if user entered schedule verify it is in list}
+  if ScheduleCombo.ItemIndex < 0 then // CQ: 7397
+  begin //Fix for CQ: 9299 - Outpatient Med orders will not accept free text schedule
+    tmpIndex := GetSchedListIndex(ScheduleCombo,ScheduleCombo.Text);
+    if tmpIndex > -1 then
+      ScheduleCombo.ItemIndex := tmpIndex;
+  end;
   if (Length(ScheduleCombo.Text) > 0) and (ScheduleCombo.ItemIndex < 0) and FInptDlg then
   begin
     FShowPnlXScheduleOk := False; //Added for CQ: 7370
     Application.MessageBox('Please select a valid schedule from the list.'+#13+#13+
-                           'If you would like to create a non-standard schedule please'+
+                           'If you would like to create a Day-of-Week schedule please'+
                            ' select ''OTHER'' from the list.',
                            'Incorrect Schedule.');
@@ -4344,6 +4712,7 @@
 
 //Removed based on Site feeback. See CQ: 7518
-{function TfrmODMeds.ValidateRoute(RouteCombo: TORComboBox) : Boolean;
-begin
+(*function TfrmODMeds.ValidateRoute(RouteCombo: TORComboBox) : Boolean;
+begin
+{CQ: 7331 - Medications - Route - Can not enter any route not listed in Route field in window}
   Result := True;
   if (Length(RouteCombo.Text) > 0) and (RouteCombo.ItemIndex < 0) and (Not IsSupplyAndOutPatient) then
@@ -4356,5 +4725,5 @@
     Result := False;
   end;
-end;}
+end;*)
 
 function TfrmODMeds.isUniqueQuickOrder(iText: string): Boolean;
@@ -4373,4 +4742,5 @@
 function TfrmODMeds.IsSupplyAndOutPatient: boolean;
 begin
+{CQ: 7331 - Medications - Route - Can not enter any route not listed in Route field in window}
   Result := False;
   if (MedIsSupply(txtMed.Tag)) and (not FInptDlg) then
@@ -4378,10 +4748,89 @@
 end;
 
+// CQ: 7397 - Inpatient med orders with PRN cancel due to invalid schedule.
+function TfrmODMeds.GetSchedListIndex(SchedCombo: TORComboBox; pSchedule: String):integer;
+var i: integer;
+begin
+    result := -1;
+    for i := 0 to SchedCombo.items.Count-1 do
+    begin
+         if pSchedule = SchedCombo.DisplayText[i] then
+         begin
+           result := i;   // match found
+           break;
+         end;
+    end;
+end;
+
 
 procedure TfrmODMeds.cboXScheduleExit(Sender: TObject);
 begin
   inherited;
+{CQ: 7344 - Inconsistency with Schedule box: Allows free-text entry for Complex orders,
+            doesn't for simple orders }
   ValidateInpatientSchedule(cboXSchedule);
 end;
 
+procedure TfrmODMeds.cboDosageKeyUp(Sender: TObject; var Key: Word;
+  Shift: TShiftState);
+begin
+  inherited;
+  //Fix for CQ: 7545
+  if cboDosage.ItemIndex > -1 then
+    cboDosageClick(Sender);
+end;
+
+procedure TfrmODMeds.cboXDosageKeyUp(Sender: TObject; var Key: Word;
+  Shift: TShiftState);
+begin
+  inherited;
+  //Fix for CQ: 7545
+  if cboXDosage.ItemIndex > -1 then
+    cboXDosageClick(Sender);
+end;
+
+procedure TfrmODMeds.txtSupplyClick(Sender: TObject);
+begin
+  inherited;
+  Self.txtSupply.SelectAll;
+end;
+
+procedure TfrmODMeds.txtQuantityClick(Sender: TObject);
+begin
+  inherited;
+   self.txtQuantity.SelectAll;
+end;
+
+procedure TfrmODMeds.txtRefillsClick(Sender: TObject);
+begin
+  inherited;
+  self.txtRefills.SelectAll;
+end;
+
+procedure TfrmODMeds.WMClose(var Msg: TWMClose);
+begin
+   if self <> nil then
+     begin
+       if (self.tabDose.TabIndex = TI_Dose) then
+         begin
+            if Trim(cboSchedule.Text) = '' then cboSchedule.ItemIndex := -1;
+            ValidateInpatientSchedule(cboSchedule);
+            if self.cboSchedule.Focused = true then exit;
+         end;
+       if (self.tabDose.TabIndex = TI_Complex) then
+         begin
+           ValidateInpatientSchedule(cboXSchedule);
+           if self.cboXSchedule.Focused = true then exit;
+         end;
+     end;
+    inherited
+end;
+
+procedure TfrmODMeds.cboXScheduleEnter(Sender: TObject);
+begin
+  inherited;
+  //agp Change CQ 10719 
+   self.chkXPRN.OnClick(self.chkXPRN);
+end;
+
 end.
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODRad.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODRad.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODRad.dfm	(revision 460)
@@ -8,5 +8,4 @@
   Constraints.MinHeight = 344
   Constraints.MinWidth = 576
-  OnPaint = FormPaint
   PixelsPerInch = 96
   TextHeight = 13
@@ -88,5 +87,6 @@
       SynonymChars = '<>'
       TabOrder = 0
-      OnDropDownClose = cboImTypeChange
+      OnChange = cboImTypeChange
+      OnDropDownClose = cboImTypeDropDownClose
       OnExit = cboImTypeExit
       CharsNeedMatch = 1
@@ -241,4 +241,5 @@
       TabOrder = 8
       OnChange = calPreOpChange
+      OnExit = calPreOpExit
       DateOnly = False
       RequireTime = False
@@ -256,4 +257,5 @@
       TabOrder = 6
       OnClick = ControlChange
+      OnExit = chkIsolationExit
     end
     object calRequestDate: TORDateBox
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODRad.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODRad.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODRad.pas	(revision 460)
@@ -56,5 +56,4 @@
     procedure FormCreate(Sender: TObject);
     procedure cboImTypeChange(Sender: TObject);
-    procedure FormPaint(Sender: TObject);
     procedure memReasonExit(Sender: TObject);
     procedure FormResize(Sender: TObject);
@@ -65,4 +64,8 @@
     procedure cboProcedureExit(Sender: TObject);
     procedure cboImTypeExit(Sender: TObject);
+    procedure FormClose(Sender: TObject; var Action: TCloseAction);
+    procedure chkIsolationExit(Sender: TObject);
+    procedure calPreOpExit(Sender: TObject);
+    procedure cboImTypeDropDownClose(Sender: TObject);
   private
     FLastRadID: string;
@@ -71,8 +74,13 @@
     FEvtDelayDiv: string;
     FPredefineOrder: boolean;
+    ImageTypeChanged : boolean;
+    FFormFirstOpened: boolean;
+    function NoPregnantSelection : Boolean;
+    procedure ImageTypeChange;
+    procedure FormFirstOpened(Sender: TObject);
   protected
     procedure InitDialog; override;
     procedure Validate(var AnErrMsg: string); override;
-    procedure SetDefaultPregant;    
+    procedure SetDefaultPregant;
   public
     procedure SetupDialog(OrderAction: Integer; const ID: string); override;
@@ -83,5 +91,6 @@
 {$R *.DFM}
 
-uses rODBase, rODRad, rOrders, uCore, rCore, fODRadApproval, fODRadConShRes, fLkUpLocation;
+uses rODBase, rODRad, rOrders, uCore, rCore, fODRadApproval, fODRadConShRes, fLkUpLocation, fFrame,
+  uFormMonitor;
 
 const
@@ -103,7 +112,7 @@
 var
   Radiologist, Contract, Research: string ;
-  AName: string;
+  AName, IsPregnant: string;
   ALocation, AType: integer;
-
+  
 { TfrmODBase common methods }
 
@@ -116,5 +125,5 @@
   if OrderAction in [ORDER_COPY, ORDER_EDIT, ORDER_QUICK] then with Responses do
   begin
-    if (OrderAction = ORDER_QUICK) or (OrderAction = ORDER_COPY) then
+    if (OrderAction = ORDER_QUICK) or (OrderAction = ORDER_EDIT) or (OrderAction = ORDER_COPY) then
       FPredefineOrder := True;
     FEditCopy := True;
@@ -125,4 +134,9 @@
         for i := 0 to Items.Count-1 do
           if StrToIntDef(Piece(Items[i],U,4), 0) = DisplayGroup then ItemIndex := i;
+        if OrderAction = ORDER_EDIT then
+        begin
+          Enabled := False;
+          Color := clBtnFace;
+        end;
      end;
     if Self.EvtID>0 then
@@ -171,8 +185,25 @@
           end;
       end;
+    //hds00007460
+    tmpResp := FindResponseByName('PREGNANT',1);
+    if tmpResp <> nil then
+       if Length(tmpResp.EValue)>0 then
+       begin
+          IsPregnant := tmpResp.EValue;
+          if IsPregnant = 'YES' then
+             radPregnant.Checked := True
+          else
+          if IsPregnant = 'NO' then
+             radPregnantNo.Checked := True
+          else
+          if IsPregnant = 'UNKNOWN' then
+             radPregnantUnknown.Checked := True;
+       end;
+    //hds00007460
     Changing := False;
     FEditCopy := False;
     OrderMessage(ImagingMessage(cboProcedure.ItemIEN)) ;
     ControlChange(Self);
+    FPredefineOrder := False;
   end;
 end;
@@ -184,4 +215,5 @@
 begin
   if not FEditCopy then inherited;
+
   FPreOpDate := '';
   FLastRadID := '';
@@ -203,4 +235,5 @@
       cboProcedure.Items.Add(FRadCommonCombo.Items[i]);
     if FRadCommonCombo.Items.Count>0 then cboProcedure.InsertSeparator;
+
     calRequestDate.Text := 'TODAY';
     SetControl(cboAvailMod, 'Modifiers');
@@ -286,5 +319,5 @@
   with cboCategory do if Length(ItemID)  > 0 then Responses.Update('CLASS',     1, ItemID, Text);
   with cboSubmit do if Length(ItemID)    > 0 then Responses.Update('IMLOC',     1, ItemID, Text);
-  with radPregnant do if Checked             then Responses.Update('PREGNANT',  1, 'Y'   , 'Yes')
+  with radPregnant do if Checked                then Responses.Update('PREGNANT',  1, 'Y'   , 'Yes')
                  else if not Enabled         then Responses.Update('PREGNANT',  1, ''    , '');
   with radPregnantNo do if Checked           then Responses.Update('PREGNANT',  1, 'N'   , 'No');
@@ -387,12 +420,14 @@
   with calRequestDate do
     if FMDateTime = 0 then SetError(TX_NO_DATE);
+
 end;
 
 procedure TfrmODRad.cboProcedureNeedData(Sender: TObject;
   const StartFrom: string; Direction, InsertAt: Integer);
+
 begin
   inherited ;
   cboProcedure.ForDataUse(SubSetOfRadProcs(DisplayGroup, StartFrom, Direction));
-end;
+ end;
 
 procedure TfrmODRad.cboAvailModMouseClick(Sender: TObject);
@@ -402,4 +437,6 @@
   Found: boolean;
 begin
+  if (cboAvailMod.Items.Count < 1) or  //GE 04-30-05 prevent list index out of bounds when empty
+     (cboAvailMod.ItemIndex < 0) then Exit;
   Found := False;
   with cboAvailMod do x := Items[ItemIndex];
@@ -445,9 +482,9 @@
    begin
     if ItemID <> FLastRadID then
-    begin
-      FLastRadID := ItemID;
-      if FPredefineOrder then
-        FPredefineOrder := False;
-    end else Exit;
+     begin
+       FLastRadID := ItemID;
+       if FPredefineOrder then
+         FPredefineOrder := False;
+     end else Exit;
     Changing := True;
     if Sender <> Self then
@@ -539,4 +576,7 @@
 procedure TfrmODRad.FormCreate(Sender: TObject);
 begin
+  FFormFirstOpened := TRUE;
+  ImageTypeChanged := false;
+  frmFrame.pnlVisit.Enabled := false;
   AutoSizeDisabled := True;
   inherited;
@@ -567,4 +607,5 @@
     radPregnantUnknown.Enabled := False;
   end else SetDefaultPregant;
+  FormMonitorBringToFrontEvent(Self, FormFirstOpened);
 end;
 
@@ -575,20 +616,5 @@
 begin
   inherited;
-  if FPredefineOrder then
-    FPredefineOrder := False;
-  if Changing or (cboImtype.ItemIndex = -1) then exit;
-  with cboImType do DisplayGroup := StrToIntDef(Piece(Items[ItemIndex], U, 4), 0) ;
-  if DisplayGroup = 0 then exit;
-  CtrlInits.LoadDefaults(ODForRad(Patient.DFN, FEvtDelayDiv, DisplayGroup));   // ODForRad returns TStrings with defaults
-  FPredefineOrder := False;
-  InitDialog;
-end;
-
-procedure TfrmODRad.FormPaint(Sender: TObject);
-begin
-  inherited;
-  with cboImType do
-    if not FEditCopy and (ItemIEN = 0) and (DroppedDown = False) and (Application.Active)
-      then DroppedDown := True;
+  ImageTypeChanged := true;
 end;
 
@@ -679,9 +705,74 @@
 end;
 
+
 procedure TfrmODRad.cboImTypeExit(Sender: TObject);
 begin
   inherited;
-  if FPredefineOrder then Exit
-  else cboImTypeChange(Self);
+  ImageTypeChange;
+end;
+
+procedure TfrmODRad.FormClose(Sender: TObject; var Action: TCloseAction);
+begin
+  inherited;
+  frmFrame.pnlVisit.Enabled := true;
+  FormMonitorBringToFrontEvent(Self, nil);
+end;
+
+procedure TfrmODRad.chkIsolationExit(Sender: TObject);
+begin
+  inherited;
+  //Fix for CQ: 10025
+  if TabIsPressed() then
+    if NoPregnantSelection() then
+      if radPregnant.CanFocus then
+        radPregnant.SetFocus();
+end;
+
+procedure TfrmODRad.calPreOpExit(Sender: TObject);
+begin
+  inherited;
+  //Fix for CQ: 10025
+  if ShiftTabIsPressed() then
+    if NoPregnantSelection() then
+      if radPregnant.CanFocus then
+        radPregnant.SetFocus();
+end;
+
+function TfrmODRad.NoPregnantSelection : Boolean;
+begin
+  result := not ((radPregnant.Checked) or (radPregnantNo.Checked) or (radPregnantUnknown.Checked));
+end;
+
+procedure TfrmODRad.cboImTypeDropDownClose(Sender: TObject);
+begin
+  inherited;
+  ImageTypeChange;
+end;
+
+procedure TfrmODRad.ImageTypeChange;
+begin
+  if not ImageTypeChanged then Exit;
+  ImageTypeChanged := false;
+  if FPredefineOrder then
+    FPredefineOrder := False;
+  if Changing or (cboImtype.ItemIndex = -1) then exit;
+  with cboImType do DisplayGroup := StrToIntDef(Piece(Items[ItemIndex], U, 4), 0) ;
+  if DisplayGroup = 0 then exit;
+  CtrlInits.LoadDefaults(ODForRad(Patient.DFN, FEvtDelayDiv, DisplayGroup));   // ODForRad returns TStrings with defaults
+  FPredefineOrder := False;
+  InitDialog;
+end;
+
+procedure TfrmODRad.FormFirstOpened(Sender: TObject);
+begin
+  if(FFormFirstOpened) then
+  begin
+    FFormFirstOpened := FALSE;
+    with cboImType do
+      if not FEditCopy and (ItemIEN = 0) and (DroppedDown = False) and (Application.Active) then
+      begin
+        cboImType.DroppedDown := TRUE;
+      end;
+  end;
 end;
 
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODVitals.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODVitals.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODVitals.dfm	(revision 460)
@@ -1,5 +1,5 @@
 inherited frmODVitals: TfrmODVitals
-  Left = 273
-  Top = 211
+  Left = 721
+  Top = 363
   Caption = 'Vital Measurement Order'
   PixelsPerInch = 96
@@ -64,4 +64,5 @@
     ListItemsOnly = False
     LongList = False
+    LookupPiece = 0
     MaxLength = 0
     Pieces = '2'
@@ -70,4 +71,5 @@
     TabOrder = 4
     OnChange = ControlChange
+    CharsNeedMatch = 1
   end
   object cboSchedule: TORComboBox
@@ -86,4 +88,5 @@
     ListItemsOnly = False
     LongList = False
+    LookupPiece = 0
     MaxLength = 0
     Pieces = '2'
@@ -92,4 +95,5 @@
     TabOrder = 5
     OnChange = ControlChange
+    CharsNeedMatch = 1
   end
   object calStart: TORDateBox
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODVitals.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fODVitals.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fODVitals.pas	(revision 460)
@@ -38,4 +38,5 @@
     procedure FormCreate(Sender: TObject);
     procedure ControlChange(Sender: TObject);
+    procedure FormClose(Sender: TObject; var Action: TCloseAction);
   private
     { Private declarations }
@@ -54,5 +55,5 @@
 {$R *.DFM}
 
-uses uConst, ORFn, rODBase;
+uses uConst, ORFn, rODBase, fFrame;
 
 const
@@ -64,4 +65,5 @@
 procedure TfrmODVitals.FormCreate(Sender: TObject);
 begin
+  frmFrame.pnlVisit.Enabled := false;
   inherited;
   FillerID := 'OR';                     // does 'on Display' order check **KCM**
@@ -138,3 +140,10 @@
 end;
 
+procedure TfrmODVitals.FormClose(Sender: TObject;
+  var Action: TCloseAction);
+begin
+  inherited;
+  frmFrame.pnlVisit.Enabled := true;
+end;
+
 end.
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fOMSet.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fOMSet.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fOMSet.pas	(revision 460)
@@ -26,4 +26,6 @@
     procedure FormCreate(Sender: TObject);
   private
+    DoingNextItem : Boolean;
+    CloseRequested : Boolean;
     FDelayEvent: TOrderDelayEvent;
     FClosing: Boolean;
@@ -105,4 +107,5 @@
 var
   SetItem: TSetItem;
+  theOwner: TComponent;
 
   procedure SkipToNext;
@@ -113,4 +116,5 @@
 
 begin
+  DoingNextItem := true;
   //frmFrame.UpdatePtInfoOnRefresh;
   if FClosing then Exit;
@@ -158,9 +162,12 @@
                     SkipToNext;
                 end;
-    'O':      if not ActivateOrderSet(  IntToStr(SetItem.DialogIEN), FDelayEvent, Self, ItemIndex) then
-              begin
-                if IsCreatedByMenu(SetItem) and (lstSet.ItemIndex < lstSet.Items.Count - 1) then
-                  lstSet.Checked[lstSet.ItemIndex] := True
-                else SkipToNext;
+    'O':      begin
+                if (Self.Owner.Name = 'frmOMNavA') then theOwner := Self.Owner else theOwner := self;
+                if not ActivateOrderSet( IntToStr(SetItem.DialogIEN), FDelayEvent, theOwner, ItemIndex) then
+                begin
+                  if IsCreatedByMenu(SetItem) and (lstSet.ItemIndex < lstSet.Items.Count - 1) then
+                    lstSet.Checked[lstSet.ItemIndex] := True
+                  else SkipToNext;
+                end;
               end;
     else      begin
@@ -170,4 +177,5 @@
     end; {case}
   end; {with lstSet}
+  DoingNextItem := false;
 end;
 
@@ -178,4 +186,6 @@
   if Message.WParam = lstSet.ItemIndex then
     if lstSet.ItemIndex < lstSet.Items.Count - 1 then DoNextItem else Close;
+  if CloseRequested then
+    Close;
 end;
 
@@ -197,5 +207,5 @@
     begin
       SendMessage(TWinControl(SetItem.OwnedBy).Handle, UM_DESTROY, SetItem.RefNum, 0);
-      Exit;
+      //Exit;
     end;
   end;
@@ -219,4 +229,6 @@
   FClosebyDeaCheck := False;
   NoFresh := True;
+  CloseRequested := false;
+  DoingNextItem := false;
 end;
 
@@ -264,5 +276,8 @@
 procedure TfrmOMSet.cmdInteruptClick(Sender: TObject);
 begin
-  Close;
+  if DoingNextItem then
+    CloseRequested := true              //Fix for CQ: 8297
+  else
+    Close;
 end;
 
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fOMVerify.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fOMVerify.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fOMVerify.pas	(revision 460)
@@ -30,5 +30,5 @@
 {$R *.DFM}
 
-uses ORFn, uConst, fFrame, rMisc;
+uses ORFn, uConst, fFrame, rMisc, uODBase;
 
 procedure ShowVerifyText(var QuickLevel: Integer; var VerifyText: string; InptDispGrp: boolean);
@@ -37,4 +37,5 @@
   tempStrs,prompts: TStringList;
   flag: boolean;
+  HasObjects: boolean;
 
   function CutoffOutptPrompts(const promptIDs: TStringList; var promptList: TStringList): boolean;
@@ -83,4 +84,5 @@
       SetBounds(frmFrame.Left, frmFrame.Top + frmFrame.Height - Height, Width, Height);
       SetFormPosition(frmOMVerify);
+      ExpandOrderObjects(VerifyText, HasObjects);
       memText.Lines.SetText(PChar(VerifyText));
       ShowModal;
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrderFlag.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrderFlag.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrderFlag.dfm	(revision 460)
@@ -87,4 +87,5 @@
     OnExit = cboOnExit
     OnNeedData = cboAlertRecipientNeedData
+    CharsNeedMatch = 1
   end
 end
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrderFlag.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrderFlag.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrderFlag.pas	(revision 460)
@@ -57,4 +57,5 @@
   finally
     frmFlagOrder.Release;
+    AlertRecip := 0;
   end;
 end;
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrderSaveQuick.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrderSaveQuick.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrderSaveQuick.pas	(revision 460)
@@ -104,7 +104,9 @@
   DGroupName, QuickName, CRC: string;
   NewIEN, AnIndex, i: Integer;
+  IsClinicOrder: boolean;
 begin
   Result := False;
   CRC := ResponseSet.OrderCRC;
+  IsClinicOrder := False;
   if CRC = EMPTY_CRC then
   begin
@@ -117,4 +119,9 @@
     with frmSaveQuickOrder do
     begin
+      if (ResponseSet.DisplayGroup = ClinDisp) and (ResponseSet.Dialog = 'PSJI OR PAT FLUID OE') then
+        begin
+          ResponseSet.DisplayGroup := IVDisp;
+          IsClinicOrder := True;
+        end;
       if ResponseSet.DisplayGroup = ClinDisp then
         DGroupName := NameOfDGroup(InptDisp)
@@ -156,4 +163,5 @@
           SaveQuickListForOD(lstQuickList.Items, ResponseSet.DisplayGroup);
       end; {if OKPressed}
+      if IsClinicOrder = True then ResponseSet.DisplayGroup := ClinDisp;
     end; {with frmSaveQuickOrder}
   finally
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrders.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrders.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrders.dfm	(revision 460)
@@ -1,6 +1,6 @@
 inherited frmOrders: TfrmOrders
-  Left = 142
-  Top = 63
-  Width = 698
+  Left = 451
+  Top = 250
+  Width = 774
   Height = 579
   HelpContext = 4000
@@ -14,9 +14,10 @@
   inherited shpPageBottom: TShape
     Top = 528
-    Width = 690
+    Width = 766
   end
   inherited sptHorz: TSplitter
     Left = 117
     Height = 528
+    OnMoved = sptHorzMoved
   end
   inherited pnlLeft: TPanel
@@ -102,5 +103,5 @@
   inherited pnlRight: TPanel
     Left = 121
-    Width = 569
+    Width = 645
     Height = 528
     ParentColor = True
@@ -111,5 +112,5 @@
       Left = 0
       Top = 0
-      Width = 569
+      Width = 645
       Height = 19
       Align = alTop
@@ -144,5 +145,5 @@
       Left = 0
       Top = 19
-      Width = 569
+      Width = 645
       Height = 17
       DragReorder = False
@@ -179,5 +180,5 @@
           ImageIndex = -1
           MinWidth = 16
-          Text = 'Nrs'
+          Text = 'Nurse'
           Width = 40
         end
@@ -185,5 +186,5 @@
           ImageIndex = -1
           MinWidth = 16
-          Text = 'Clk'
+          Text = 'Clerk'
           Width = 35
         end
@@ -197,5 +198,5 @@
           ImageIndex = -1
           MinWidth = 16
-          Text = 'Sts'
+          Text = 'Status'
           Width = 50
         end
@@ -206,4 +207,5 @@
           Width = 40
         end>
+      OnSectionClick = hdrOrdersSectionClick
       OnSectionResize = hdrOrdersSectionResize
       OnMouseDown = hdrOrdersMouseDown
@@ -213,5 +215,5 @@
       Left = 0
       Top = 36
-      Width = 569
+      Width = 645
       Height = 492
       Style = lbOwnerDrawVariable
@@ -301,4 +303,54 @@
         end
       end
+      object mnuViewInformation: TMenuItem
+        Caption = 'Information'
+        OnClick = mnuViewInformationClick
+        object mnuViewDemo: TMenuItem
+          Tag = 1
+          Caption = 'De&mographics...'
+          OnClick = ViewInfo
+        end
+        object mnuViewVisits: TMenuItem
+          Tag = 2
+          Caption = 'Visits/Pr&ovider...'
+          OnClick = ViewInfo
+        end
+        object mnuViewPrimaryCare: TMenuItem
+          Tag = 3
+          Caption = 'Primary &Care...'
+          OnClick = ViewInfo
+        end
+        object mnuViewMyHealtheVet: TMenuItem
+          Tag = 4
+          Caption = 'MyHealthe&Vet...'
+          OnClick = ViewInfo
+        end
+        object mnuInsurance: TMenuItem
+          Tag = 5
+          Caption = '&Insurance...'
+          OnClick = ViewInfo
+        end
+        object mnuViewFlags: TMenuItem
+          Tag = 6
+          Caption = '&Flags...'
+          OnClick = ViewInfo
+        end
+        object mnuViewRemoteData: TMenuItem
+          Tag = 7
+          Caption = 'Remote &Data...'
+          OnClick = ViewInfo
+        end
+        object mnuViewReminders: TMenuItem
+          Tag = 8
+          Caption = '&Reminders...'
+          Enabled = False
+          OnClick = ViewInfo
+        end
+        object mnuViewPostings: TMenuItem
+          Tag = 9
+          Caption = '&Postings...'
+          OnClick = ViewInfo
+        end
+      end
       object Z1: TMenuItem
         Caption = '-'
@@ -522,4 +574,9 @@
       OnClick = mnuActSignClick
     end
+    object mnuOptimizeFields: TMenuItem
+      Caption = 'Adjust Column Size'
+      Visible = False
+      OnClick = mnuOptimizeFieldsClick
+    end
   end
 end
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrders.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrders.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrders.pas	(revision 460)
@@ -89,4 +89,15 @@
     sptVert: TSplitter;
     mnuViewExpired: TMenuItem;
+    mnuViewInformation: TMenuItem;
+    mnuViewDemo: TMenuItem;
+    mnuViewVisits: TMenuItem;
+    mnuViewPrimaryCare: TMenuItem;
+    mnuViewMyHealtheVet: TMenuItem;
+    mnuInsurance: TMenuItem;
+    mnuViewFlags: TMenuItem;
+    mnuViewReminders: TMenuItem;
+    mnuViewRemoteData: TMenuItem;
+    mnuViewPostings: TMenuItem;
+    mnuOptimizeFields: TMenuItem;
     procedure mnuChartTabClick(Sender: TObject);
     procedure FormCreate(Sender: TObject);
@@ -146,4 +157,10 @@
     procedure hdrOrdersMouseDown(Sender: TObject; Button: TMouseButton;
       Shift: TShiftState; X, Y: Integer);
+    procedure ViewInfo(Sender: TObject);
+    procedure mnuViewInformationClick(Sender: TObject);
+    procedure mnuOptimizeFieldsClick(Sender: TObject);
+    procedure hdrOrdersSectionClick(HeaderControl: THeaderControl;
+      Section: THeaderSection);
+    procedure sptHorzMoved(Sender: TObject);
   private
     { Private declarations }
@@ -188,4 +205,5 @@
     procedure UseDefaultSort;
     procedure SynchListToOrders;
+//    procedure ActivateDeactiveRenew;
     procedure ValidateSelected(const AnAction, WarningMsg, WarningTitle: string);
     procedure ViewAlertedOrders(OrderIEN: string; Status: integer; DispGrp: string;
@@ -196,5 +214,7 @@
     function MeasureColumnHeight(AnOrder: TOrder; Index: Integer; Column: integer):integer;
     function GetPlainText(AnOrder: TOrder; index: integer):string;
+    function PatientStatusChanged: boolean;    
     procedure UMEventOccur(var Message: TMessage); message UM_EVENTOCCUR;
+    function CheckOrderStatus: boolean;
   public
     procedure setSectionWidths; //CQ6170
@@ -229,5 +249,5 @@
     property EvtColWidth: integer       read FEvtColWidth        write FEvtColWidth;
     property DontCheck: boolean         read FDontCheck          write FDontCheck;
-    property ParentComplexOrderID: string       read FParentComplexOrderID        write FParentComplexOrderID;  
+    property ParentComplexOrderID: string       read FParentComplexOrderID        write FParentComplexOrderID;
   end;
 
@@ -247,5 +267,5 @@
      fOMNavA, rCore, fOCSession, fOrdersPrint, fOrdersTS, fEffectDate, fODActive, fODChild,
      fOrdersCopy, fOMVerify, fODAuto, rODBase, uODBase, rMeds,fODValidateAction, fMeds, uInit, fBALocalDiagnoses,
-  fODConsult;
+     fODConsult, fClinicWardMeds, fActivateDeactivate;
 
 {$R *.DFM}
@@ -970,5 +990,6 @@
           if ((TOrder(Items.Objects[i]).DGroupName = 'Inpt. Meds') or
               (TOrder(Items.Objects[i]).DGroupName = 'Out. Meds') or
-              (TOrder(Items.Objects[i]).DGroupName = 'IV Fluids')) then
+              (TOrder(Items.Objects[i]).DGroupName = 'Clin. Orders') or
+              (TOrder(Items.Objects[i]).DGroupName = 'Infusion')) then
             begin
               tmpList.Add('');
@@ -993,7 +1014,8 @@
           ReportBox(tmpList, 'Order Details - ' + BigOrderID, True);
         end;
+      StatusText('');
+      if (frmFrame.TimedOut) or (frmFrame.CCOWDrivedChange) then Exit; //code added to correct access violation on timeout
       Selected[i] := False;
-      StatusText('');
-    end;
+      end;
   finally
     tmpList.Free;
@@ -1324,9 +1346,9 @@
       7: result := ChartRev;
       8: result := NameOfStatus(Status);
-      9:
-      begin
-        result := MixedCase(Anorder.OrderLocName);
-        if (Index > 0) and (result = TOrder(lstOrders.Items.Objects[Index - 1]).OrderLocName) then result := '';
-      end;
+      9: result := MixedCase(Anorder.OrderLocName);
+      //begin AGP change 26.52 display all location for orders.
+        //result := MixedCase(Anorder.OrderLocName);
+        //if (Index > 0) and (result = TOrder(lstOrders.Items.Objects[Index - 1]).OrderLocName) then result := '';
+      //end;
     end;
   end;
@@ -1435,5 +1457,5 @@
   NextIndex: Integer;
 begin
-
+  if PatientStatusChanged then exit;
   if BILLING_AWARE then //CQ5114
      fODConsult.displayDXCode := ''; //CQ5114
@@ -1534,88 +1556,102 @@
   BadList  := TStringList.Create;
   CheckedList := TStringList.Create;
-  with lstOrders do for i := 0 to Items.Count - 1 do if Selected[i] then
-  begin
-    AnOrder := TOrder(Items.Objects[i]);
-    //AGP Change 25.34 to fix problem with renewing inpatient meds from an outpatient location
-    if (AnAction = 'RN') and (AnOrder.Status=6) and (AnOrder.DGroupName = 'Inpt. Meds') and (Patient.inpatient) and (IsClinicLoc(Encounter.Location)) then
-       begin
-         Selected[i] := False;
-         MessageDlg('You can not renew inpatient medication order on a clinic location for selected inpatient.', mtWarning, [mbOK], 0);
-       end;
-    if (AnAction = 'RN') or (AnAction = 'EV') then // or (AnAction = 'RW') then
-    begin
-      if not IsValidSchedule(AnOrder.ID) then
-      begin
-        if (AnAction = 'RN') then
-          ShowMessage('The order contains invalid schedule and can not be renewed.')
-        else if (AnAction = 'EV') then
-          ShowMessage('The order contains invalid schedule and can not be changed to event delayed order.');
-        //else if (AnAction = 'RW') then
-        //  ShowMessage('The order contains invalid schedule and can not be copied.);
+  try
+    with lstOrders do for i := 0 to Items.Count - 1 do if Selected[i] then
+    begin
+      AnOrder := TOrder(Items.Objects[i]);
+      if (AnAction = 'RN') and (AnOrder.Status=6) and (AnOrder.DGroupName = 'Inpt. Meds') and (Patient.inpatient) and (IsClinicLoc(Encounter.Location)) then
+         begin
+           Selected[i] := False;
+           MessageDlg('You cannot renew inpatient medication order on a clinic location for selected inpatient.', mtWarning, [mbOK], 0);
+         end;
+      if ((AnAction = 'RN') or (AnAction = 'EV')) and (AnOrder.EnteredInError = 0) then  //AGP Changes PSI-04053
+      begin
+        if not IsValidSchedule(AnOrder.ID) then
+        begin
+          if (AnAction = 'RN') then
+            ShowMessage('The order contains invalid schedule and can not be renewed.')
+          else if (AnAction = 'EV') then
+            ShowMessage('The order contains invalid schedule and can not be changed to event delayed order.');
+
+          Selected[i] := False;
+          Continue;
+        end;
+      end;
+      //AGP CHANGE ORDER ENTERED IN ERROR TO ALLOW SIGNATURE AND VERIFY ACTIONS 26.23
+      if ((AnOrder.EnteredInError = 1) and ((AnOrder.Status = 1) or (AnOrder.Status = 13)))  and ((AnAction <> 'ES') and (AnAction <> 'VR')) then
+         begin
+            InfoBox(AnOrder.Text + WarningMsg + 'This order has been mark as Entered in error.', WarningTitle, MB_OK);
+            Selected[i] := False;
+            Continue;
+         end;
+      if ((AnAction <> OA_RELEASE) and (AnOrder.EnteredInError = 0)) or (((AnOrder.EnteredInError = 1) and ((AnOrder.Status = 1) or (AnOrder.Status = 13))) and
+            (AnAction = 'ES')) then
+         ValidateOrderAction(AnOrder.ID, AnAction, ErrMsg)
+      //AGP END Changes
+        else ErrMsg := '';
+      if (Length(ErrMsg)>0) and (Pos('COMPLEX-PSI',ErrMsg)<1) then
+      begin
+        InfoBox(AnOrder.Text + WarningMsg + ErrMsg, WarningTitle, MB_OK);
         Selected[i] := False;
         Continue;
       end;
-    end;
-    if AnAction <> OA_RELEASE then ValidateOrderAction(AnOrder.ID, AnAction, ErrMsg)
-      else ErrMsg := '';
-    if (Length(ErrMsg)>0) and (Pos('COMPLEX-PSI',ErrMsg)<1) then
-    begin
-      InfoBox(AnOrder.Text + WarningMsg + ErrMsg, WarningTitle, MB_OK);
-      Selected[i] := False;
-      Continue;
-    end;
-    if (Length(ErrMsg)>0) and IsFirstDoseNowOrder(AnOrder.ID) and (AnAction <> 'RL') then
-    begin
-      InfoBox(AnOrder.Text + WarningMsg + ErrMsg, WarningTitle, MB_OK);
-      Selected[i] := False;
-      Continue;
-    end;
-    if (Length(ErrMsg)>0) and ( (AnAction = OA_CHGEVT) or (AnAction = OA_EDREL) ) then
-    begin
-      InfoBox(AnOrder.Text + WarningMsg + ErrMsg, WarningTitle, MB_OK);
-      Selected[i] := False;
-      Continue;
-    end;
-    AParentID := '';
-    IsValidActionOnComplexOrder(AnOrder.ID, AnAction,TListBox(lstOrders),CheckedList,ErrMsg, AParentID);
-    TOrder(Items.Objects[i]).ParentID := AParentID;
-    if (Length(ErrMsg)=0) and (AnAction=OA_EDREL) then
+      if (Length(ErrMsg)>0) and IsFirstDoseNowOrder(AnOrder.ID) and (AnAction <> 'RL') then
+      begin
+        InfoBox(AnOrder.Text + WarningMsg + ErrMsg, WarningTitle, MB_OK);
+        Selected[i] := False;
+        Continue;
+      end;
+      if (Length(ErrMsg)>0) and ( (AnAction = OA_CHGEVT) or (AnAction = OA_EDREL) ) then
+      begin
+        InfoBox(AnOrder.Text + WarningMsg + ErrMsg, WarningTitle, MB_OK);
+        Selected[i] := False;
+        Continue;
+      end;
+      AParentID := '';
+      IsValidActionOnComplexOrder(AnOrder.ID, AnAction,TListBox(lstOrders),CheckedList,ErrMsg, AParentID);
+      TOrder(Items.Objects[i]).ParentID := AParentID;
+      if (Length(ErrMsg)=0) and (AnAction=OA_EDREL) then
+         begin
+           if (AnOrder.Signature = 2) and (not VerbTelPolicyOrder(AnOrder.ID)) then
+              begin
+                ErrMsg := 'Need to be signed first.';
+                Selected[i] := False;
+              end;
+         end;
+
+      if (AnAction = OA_CHGEVT) or (AnAction = OA_EDREL) then
+         begin
+           if Length(ErrMsg)>0 then
+              begin
+                Selected[i] := False;
+                Badlist.Add(AnOrder.Text + '^' + ErrMsg);
+              end
+           else
+             GoodList.Add(AnOrder.Text);
+         end;
+
+      if (Length(ErrMsg) > 0) and (AnAction <> OA_CHGEVT) and (AnAction <> OA_EDREL) then
+         begin
+           if Pos('COMPLEX-PSI',ErrMsg)>0 then ErrMsg := TX_COMPLEX;
+           InfoBox(AnOrder.Text + WarningMsg + ErrMsg, WarningTitle, MB_OK);
+           Selected[i] := False;
+         end;
+
+      if Selected[i] and (not OrderIsLocked(AnOrder.ID, AnAction)) then Selected[i] := False;
+
+    end; //with
+
+    if ((AnAction = OA_CHGEVT) or (AnAction = OA_EDREL)) then
        begin
-         if (AnOrder.Signature = 2) and (not VerbTelPolicyOrder(AnOrder.ID)) then
-            begin
-              ErrMsg := 'Need to be signed first.';
-              Selected[i] := False;
-            end;
+        if (BadList.Count = 1) and (GoodList.Count < 1 ) then
+          InfoBox(Piece(BadList[0],'^',1) + WarningMsg + Piece(BadList[0],'^',2), WarningTitle, MB_OK);
+        if ((BadList.Count >= 1) and (GoodList.Count >= 1)) or ( BadList.Count > 1 )then
+          DisplayOrdersForAction(BadList,GoodList,AnAction);
        end;
-
-    if (AnAction = OA_CHGEVT) or (AnAction = OA_EDREL) then
-       begin
-         if Length(ErrMsg)>0 then
-            begin
-              Selected[i] := False;
-              Badlist.Add(AnOrder.Text + '^' + ErrMsg);
-            end
-         else
-           GoodList.Add(AnOrder.Text);
-       end;
-
-    if (Length(ErrMsg) > 0) and (AnAction <> OA_CHGEVT) and (AnAction <> OA_EDREL) then
-       begin
-         if Pos('COMPLEX-PSI',ErrMsg)>0 then ErrMsg := TX_COMPLEX;
-         InfoBox(AnOrder.Text + WarningMsg + ErrMsg, WarningTitle, MB_OK);
-         Selected[i] := False;
-       end;
-
-    if Selected[i] and (not OrderIsLocked(AnOrder.ID, AnAction)) then Selected[i] := False;
-    
-  end; //with
-
-  if ((AnAction = OA_CHGEVT) or (AnAction = OA_EDREL)) then
-     begin
-      if (BadList.Count = 1) and (GoodList.Count < 1 ) then
-        InfoBox(Piece(BadList[0],'^',1) + WarningMsg + Piece(BadList[0],'^',2), WarningTitle, MB_OK);
-      if ((BadList.Count >= 1) and (GoodList.Count >= 1)) or ( BadList.Count > 1 )then
-        DisplayOrdersForAction(BadList,GoodList,AnAction);
-     end;
+  finally
+    GoodList.Free;
+    BadList.Free;
+    CheckedList.Free;
+  end;
 end;
 
@@ -1682,5 +1718,7 @@
   SelectedList := TList.Create;
   try
-    ValidateSelected(OA_DC, TX_NO_DC, TC_NO_DC);        // validate DC action on each order
+    //if CheckOrderStatus = True then Exit;
+    ValidateSelected(OA_DC, TX_NO_DC, TC_NO_DC); // validate DC action on each order
+    //ActivateDeactiveRenew;   AGP 26.53 TURN OFF UNTIL FINAL DECISION CAN BE MADE
     MakeSelectedList(SelectedList);                     // build list of orders that remain
     // updating the Changes object happens in ExecuteDCOrders, based on individual order
@@ -1753,5 +1791,5 @@
 begin
   inherited;
-  if not EncounterPresentEDO then Exit;  
+  if not EncounterPresentEDO then Exit;
   if NoneSelected(TX_NOSEL) then Exit;
   if not AuthorizedUser then Exit;
@@ -1764,4 +1802,5 @@
   SelectedList := TList.Create;
   try
+    if CheckOrderStatus = True then Exit;
     ValidateSelected(OA_CHGEVT, TX_NO_CV, TC_NO_CV);   // validate Change Event action on each order
     MakeSelectedList(SelectedList);                     // build list of orders that remain
@@ -1799,4 +1838,5 @@
   SelectedList := TList.Create;
   try
+    if CheckOrderStatus = True then Exit;
     ValidateSelected(OA_HOLD, TX_NO_HOLD, TC_NO_HOLD);  // validate hold action on each order
     MakeSelectedList(SelectedList);                     // build list of orders that remain
@@ -1824,4 +1864,5 @@
   SelectedList := TList.Create;
   try
+    if CheckOrderStatus = True then Exit;
     ValidateSelected(OA_UNHOLD, TX_NO_UNHOLD, TC_NO_UNHOLD);  // validate release hold action
     MakeSelectedList(SelectedList);                           // build list of selected orders
@@ -1850,4 +1891,5 @@
   SelectedList := TList.Create;
   try
+    if CheckOrderStatus = True then Exit;
     ValidateSelected(OA_RENEW, TX_NO_RENEW, TC_NO_RENEW);  // validate renew action for each
     MakeSelectedList(SelectedList);                       // build list of orders that remain
@@ -2026,4 +2068,5 @@
   try
     if NoneSelected(TX_NOSEL) then Exit;
+    if CheckOrderStatus = True then Exit;
     ValidateSelected(OA_CHANGE, TX_NO_CHANGE, TC_NO_CHANGE);
     if (FCurrentView.EventDelay.PtEventIFN>0) and
@@ -2067,4 +2110,5 @@
     if NoneSelected(TX_NOSEL) then Exit;
     NewOrderCreated := False;
+    if CheckOrderStatus = True then Exit;
     ValidateSelected(OA_COPY, TX_NO_COPY, TC_NO_COPY);
     if (FCurrentView.EventDelay.PtEventIFN>0) and (PtEvtCompleted(FCurrentView.EventDelay.PtEventIFN, FCurrentView.EventDelay.EventName)) then
@@ -2269,5 +2313,5 @@
        UBACore.CompleteUnsignedBillingInfo(rpcGetUnsignedOrdersBillingData(OrderListSCEI) );
     end;
-   
+
    {billing Aware}
     ExecuteReleaseOrderChecks(SelectedList);            // call order checking
@@ -2279,7 +2323,10 @@
       if Active and (FollowUp = NF_ORDER_REQUIRES_ELEC_SIGNATURE) then
         UnsignedOrderAlertFollowup(Piece(RecordID, U, 2));
-    UpdateExpiringMedAlerts(Patient.DFN);
-    UpdateUnverifiedMedAlerts(Patient.DFN);
-    UpdateUnverifiedOrderAlerts(Patient.DFN);
+      if Active then
+      begin
+        UpdateExpiringMedAlerts(Patient.DFN);
+        UpdateUnverifiedMedAlerts(Patient.DFN);
+        UpdateUnverifiedOrderAlerts(Patient.DFN);
+      end;
     if not uInit.TimedOut then
       begin
@@ -2370,5 +2417,9 @@
       NF_DNR_EXPIRING                  :
         ViewAlertedOrders('', STS_EXPIRING, '', False, True, 'All Services, Expiring');
-      NF_MEDICATIONS_EXPIRING          :
+      NF_MEDICATIONS_EXPIRING_INPT          :
+        begin
+          ViewAlertedOrders('', STS_EXPIRING, 'PHARMACY', False, True, 'Medications, Expiring');
+        end;
+      NF_MEDICATIONS_EXPIRING_OUTPT          :
         begin
           ViewAlertedOrders('', STS_EXPIRING, 'PHARMACY', False, True, 'Medications, Expiring');
@@ -2509,6 +2560,8 @@
     if (ALocation > 0) and (ALocation <> Encounter.Location) then
     begin
-      if InfoBox(TX_NEW_LOC1 + AName + TX_NEW_LOC2, TC_NEW_LOC, MB_YESNO) = IDYES
-        then Encounter.Location := ALocation;
+    //gary
+      Encounter.Location := frmClinicWardMeds.ClinicOrWardLocation(Alocation);
+   //   if InfoBox(TX_NEW_LOC1 + AName + TX_NEW_LOC2, TC_NEW_LOC, MB_YESNO) = IDYES
+   //     then Encounter.Location := ALocation;
     end;
     if Encounter.Location = 0
@@ -3045,4 +3098,8 @@
   inherited SetFontSize( FontSize );
   RedrawOrderList;
+  mnuOptimizeFieldsClick(self);
+  lstSheets.Repaint;
+  lstWrite.Repaint;
+  btnDelayedOrder.Repaint;
 end;
 
@@ -3050,4 +3107,5 @@
 begin
   inherited;
+  if PatientStatusChanged then exit;
   //frmFrame.UpdatePtInfoOnRefresh;
 end;
@@ -3056,4 +3114,5 @@
 begin
   inherited;
+  if PatientStatusChanged then exit;
   //frmFrame.UpdatePtInfoOnRefresh;
 end;
@@ -3062,4 +3121,5 @@
 begin
   inherited;
+  if PatientStatusChanged then exit;
   //frmFrame.UpdatePtInfoOnRefresh;
 end;
@@ -3068,4 +3128,5 @@
 begin
   inherited;
+  if PatientStatusChanged then exit;  
   //frmFrame.UpdatePtInfoOnRefresh;
 end;
@@ -3186,18 +3247,21 @@
 var
   i: integer;
-  totalSectionsWidth: integer;
+  totalSectionsWidth, originalwidth: integer;
 begin
   inherited;
   //CQ6170
   totalSectionsWidth := getTotalSectionsWidth;
-
-     if totalSectionsWidth > lstOrders.Width - 5 then
-        begin
-        for i := 0 to hdrOrders.Sections.Count-1 do
-           begin
-           hdrOrders.Sections[i].Width := origWidths[i];
-           lstOrders.Invalidate;
-           end;
-        end;
+  if totalSectionsWidth > lstOrders.Width - 5 then
+  begin
+    originalwidth := 0;
+    for i := 0 to hdrOrders.Sections.Count - 1 do
+      originalwidth := originalwidth + origWidths[i];
+    if originalwidth < totalSectionsWidth then
+    begin
+      for i := 0 to hdrOrders.Sections.Count - 1 do
+        hdrOrders.Sections[i].Width := origWidths[i];
+      lstOrders.Invalidate;
+    end;
+  end;
   //end CQ6170
 end;
@@ -3209,4 +3273,126 @@
 end;
 
+function TfrmOrders.PatientStatusChanged: boolean;
+const
+
+  msgTxt1 = 'Patient status was changed from ';
+  msgTxt2 = 'CPRS needs to refresh patient information to display patient latest record.';
+   //GE CQ9537  - Change message text
+  msgTxt3 = 'Patient has been admitted. ';
+  msgTxt4 = CRLF + 'You will be prompted to sign your orders.  Any new orders subsequently' +
+            CRLF +'entered and signed will be directed to the inpatient staff.';
+var
+  PtSelect: TPtSelect;
+  IsInpatientNow: boolean;
+  ptSts: string;
+begin
+  result := False;
+  SelectPatient(Patient.DFN, PtSelect);
+  IsInpatientNow := Length(PtSelect.Location) > 0;
+  if Patient.Inpatient <> IsInpatientNow then
+  begin
+    if (not Patient.Inpatient) then   //GE CQ9537  - Change message text
+       MessageDlg(msgTxt3 + msgTxt4, mtWarning, [mbOK], 0)
+    else
+       begin
+          if Patient.Inpatient then ptSts := 'Inpatient to Outpatient.';
+          MessageDlg(msgTxt1 + ptSts + #13#10#13 + msgTxt2, mtWarning, [mbOK], 0);
+       end;
+    frmFrame.mnuFileRefreshClick(Application);
+    Result := True;
+  end;
+end;
+
+function TfrmOrders.CheckOrderStatus: boolean;
+var
+i: integer;
+AnOrder: TOrder;
+begin
+    Result := False;
+    with lstOrders do for i := 0 to Items.Count - 1 do if Selected[i] then
+    begin
+      AnOrder := TOrder(Items.Objects[i]);
+      if AnORder.Status <> GetOrderStatus(AnOrder.ID) then
+         begin
+           MessageDlg('The Order status has changed.' + #13#10#13 + 'CPRS needs to refresh patient information to display the correct order status', mtWarning, [mbOK], 0);
+           frmFrame.mnuFileRefreshClick(Application);
+           Result := True;
+           EXIT;
+         end;
+    end;
+end;
+
+(*procedure TfrmOrders.ActivateDeactiveRenew;
+var
+  i: Integer;
+  AnOrder: TOrder;
+  tmpArr: TStringList;
+begin
+    tmpArr := TStringList.Create;
+    with lstOrders do for i := 0 to Items.Count - 1 do if Selected[i] then
+    begin
+      AnOrder := TOrder(Items.Objects[i]);
+      if AnOrder.Status = 5 then tmpArr.Add(AnOrder.ID);
+    end;
+    if tmpArr <> nil then frmActivateDeactive.fActivateDeactive(tmpArr);
+end;  *)
+
+procedure TfrmOrders.ViewInfo(Sender: TObject);
+begin
+  inherited;
+  frmFrame.ViewInfo(Sender);
+end;
+
+procedure TfrmOrders.mnuViewInformationClick(Sender: TObject);
+begin
+  inherited;
+  mnuViewDemo.Enabled := frmFrame.pnlPatient.Enabled;
+  mnuViewVisits.Enabled := frmFrame.pnlVisit.Enabled;
+  mnuViewPrimaryCare.Enabled := frmFrame.pnlPrimaryCare.Enabled;
+  mnuViewMyHealtheVet.Enabled := not (Copy(frmFrame.laMHV.Hint, 1, 2) = 'No');
+  mnuInsurance.Enabled := not (Copy(frmFrame.laVAA2.Hint, 1, 2) = 'No');
+  mnuViewFlags.Enabled := frmFrame.lblFlag.Enabled;
+  mnuViewRemoteData.Enabled := frmFrame.lblCirn.Enabled;
+  mnuViewReminders.Enabled := frmFrame.pnlReminders.Enabled;
+  mnuViewPostings.Enabled := frmFrame.pnlPostings.Enabled;
+end;
+
+procedure TfrmOrders.mnuOptimizeFieldsClick(Sender: TObject);
+var
+  totalSectionsWidth, unitvalue: integer;
+begin
+  totalSectionsWidth := pnlRight.Width - 3;
+  if totalSectionsWidth < 16 then exit;
+  unitvalue := round(totalSectionsWidth / 16);
+  with hdrOrders do
+  begin
+    Sections[1].Width := unitvalue;
+    Sections[2].Width := pnlRight.Width - (unitvalue * 10) - 5;
+    Sections[3].Width := unitvalue * 2;
+    Sections[4].Width := unitvalue * 2;
+    Sections[5].Width := unitvalue;
+    Sections[6].Width := unitvalue;
+    Sections[7].Width := unitvalue;
+    Sections[8].Width := unitvalue;
+    Sections[9].Width := unitvalue;
+  end;
+  hdrOrdersSectionResize(hdrOrders, hdrOrders.Sections[0]);
+  hdrOrders.Repaint;
+end;
+
+procedure TfrmOrders.hdrOrdersSectionClick(HeaderControl: THeaderControl;
+  Section: THeaderSection);
+begin
+  inherited;
+  //if Section = hdrOrders.Sections[1] then
+    mnuOptimizeFieldsClick(self);
+end;
+
+procedure TfrmOrders.sptHorzMoved(Sender: TObject);
+begin
+  inherited;
+  mnuOptimizeFieldsClick(self);
+end;
+
 end.
 
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrdersDC.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrdersDC.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrdersDC.dfm	(revision 460)
@@ -65,4 +65,5 @@
       ParentShowHint = False
       ShowHint = True
+      Sorted = True
       TabOrder = 0
       Caption = 'Reason for Discontinue (select one)'
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrdersDC.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrdersDC.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrdersDC.pas	(revision 460)
@@ -36,7 +36,5 @@
 {$R *.DFM}
 
-uses rOrders, uCore, uConst, fOrders, UBAGlobals;
-{ TODO -oRich V. -cOutpatient Meals : Uncomment for processing of child orders treeview. }
-//, fOrderChildren;
+uses rOrders, uCore, uConst, fOrders;
 
 function ExecuteDCOrders(SelectedList: TList; var DelEvt: boolean): Boolean;
@@ -52,8 +50,4 @@
   OriginalID,APtEvtID,APtEvtName,AnEvtInfo,tmpPtEvt:  string;
   PtEvtList: TStringList;
-{ TODO -oRich V. -cOutpatient Meals : Uncomment for processing of child orders treeview. }
-(*  tmpList: TList;
-  j: integer;
-  AChildOrder: TOrder;*)
 begin
   Result := False;
@@ -63,6 +57,4 @@
   PtEvtList := TStringList.Create;
   if SelectedList.Count = 0 then Exit;
-{ TODO -oRich V. -cOutpatient Meals : Uncomment for processing of child orders treeview. }
-//  tmpList := TList.Create;
   frmDCOrders := TfrmDCOrders.Create(Application);
   try
@@ -72,31 +64,7 @@
     begin
       AnOrder    := TOrder(Items[i]);
-
-      if BILLING_AWARE then  //CQ4589
-        UBAGlobals.RemoveOrderFromDxList(AnOrder.ID);
-
-{ TODO -oRich V. -cOutpatient Meals : Comment next 3 lines for processing of child orders treeview. }
       frmDCOrders.lstOrders.Items.Add(AnOrder.Text);
       if not ((AnOrder.Status = 11) and (AnOrder.Signature = 2)) then NeedReason := True;
     end;
-{ TODO -oRich V. -cOutpatient Meals : Uncomment for processing of child orders treeview. }
-//***********  begin OP meals changes **************
-(*      if Copy(AnOrder.Text, 1, 1) = '+' then
-      begin
-        ActOnChildOrders(tmpList, AnOrder.ID);
-{ TODO -oRich V. -cOutpatient Meals : How/when to get selected items into SelectedList? }
-        for j := tmpList.Count - 1 downto 0 do
-        begin
-          AChildOrder := TOrder(tmpList.Items[j]);
-          frmDCOrders.lstOrders.Items.Add(AChildOrder.Text);
-          if not ((AChildOrder.Status = 11) and (AChildOrder.Signature = 2)) then NeedReason := True;
-        end;
-      end else
-      begin
-        frmDCOrders.lstOrders.Items.Add(AnOrder.Text);
-        if not ((AnOrder.Status = 11) and (AnOrder.Signature = 2)) then NeedReason := True;
-      end;
-    end;*)
-//*************  End OP meals changes ****************
     if NeedReason then
     begin
@@ -126,6 +94,4 @@
                        end;
         DCT_DELETION:  begin
-                         if BILLING_AWARE then
-                            UBAGlobals.BADeltedOrders.Add(OriginalID);
                          Changes.Remove(CH_ORD, OriginalID);
                          if (AnOrder.ID = '0') or (AnOrder.ID = '')
@@ -174,6 +140,4 @@
     else with SelectedList do for i := 0 to Count - 1 do UnlockOrder(TOrder(Items[i]).ID);
   finally
-{ TODO -oRich V. -cOutpatient Meals : Uncomment for processing of child orders treeview. }
-    //tmpList.Free;
     frmDCOrders.Release;
   end;
@@ -202,5 +166,5 @@
 begin
   inherited;
-  if not (lstReason.ItemIEN > 0) then
+  if (lstReason.Visible) and (not (lstReason.ItemIEN > 0)) then
   begin
     InfoBox(TX_REASON_REQ, TC_REASON_REQ, MB_OK);
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrdersOnChart.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrdersOnChart.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrdersOnChart.pas	(revision 460)
@@ -33,5 +33,6 @@
 {$R *.DFM}
 
-uses rCore, rOrders, uConst, fOrdersPrint, uOrders;
+uses rCore, rOrders, uConst, fOrdersPrint, uOrders, fFrame, UCore,
+  fClinicWardMeds;
 
 const
@@ -43,5 +44,5 @@
 var
   frmOnChartOrders: TfrmOnChartOrders;
-  i: Integer;
+  i, PrintLoc: Integer;
   SignList: TStringList;
   OrderText: string;
@@ -62,4 +63,5 @@
 begin
   Result := False;
+  PrintLoc := 0;
   if SelectedList.Count = 0 then Exit;
   frmOnChartOrders := TfrmOnChartOrders.Create(Application);
@@ -78,4 +80,16 @@
         StatusText('Sending Orders to Service(s)...');
         if SignList.Count > 0 then SendOrders(SignList, '');
+
+         if (not frmFrame.TimedOut) then
+          begin
+             if IsValidIMOLoc(uCore.TempEncounterLoc,Patient.DFN) then
+                frmClinicWardMeds.ClinicOrWardLocation(SignList, uCore.TempEncounterLoc,uCore.TempEncounterLocName, PrintLoc)
+             else
+                if (IsValidIMOLoc(Encounter.Location,Patient.DFN)) and ((frmClinicWardMeds.rpcIsPatientOnWard(patient.DFN)) and (Patient.Inpatient = false)) then
+                   frmClinicWardMeds.ClinicOrWardLocation(SignList, Encounter.Location,Encounter.LocationName, PrintLoc);
+          end;
+          uCore.TempEncounterLoc := 0;
+          uCore.TempEncounterLocName := '';
+
         with SignList do if Count > 0 then for i := 0 to Count - 1 do
           begin
@@ -88,5 +102,5 @@
           end;
         StatusText('');
-        PrintOrdersOnSignRelease(SignList, NO_WRITTEN);
+        PrintOrdersOnSignRelease(SignList, NO_WRITTEN, PrintLoc);
 //        SetupOrdersPrint(SignList, DeviceInfo, NO_WRITTEN, False, PrintIt);  //*KCM*
 //        if PrintIt then PrintOrdersOnReview(SignList, DeviceInfo);           //*KCM*
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrdersRelease.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrdersRelease.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrdersRelease.pas	(revision 460)
@@ -41,5 +41,6 @@
 {$R *.DFM}
 
-uses Hash, rCore, rOrders, uConst, fSignItem, fOrdersPrint, uCore, uOrders, fRptBox;
+uses Hash, rCore, rOrders, uConst, fSignItem, fOrdersPrint, uCore, uOrders, fRptBox,
+  fFrame, fClinicWardMeds;
 
 const
@@ -55,5 +56,5 @@
 var
   frmReleaseOrders: TfrmReleaseOrders;
-  i: Integer;
+  i, PrintLoc: Integer;
   SignList: TStringList;
   OrderText: string;
@@ -87,4 +88,5 @@
 begin
   Result := False;
+  PrintLoc := 0;
   if SelectedList.Count = 0 then Exit;
   frmReleaseOrders := TfrmReleaseOrders.Create(Application);
@@ -109,4 +111,19 @@
         StatusText('Sending Orders to Service(s)...');
         if SignList.Count > 0 then SendOrders(SignList, frmReleaseOrders.ESCode);
+
+        if (not frmFrame.TimedOut) then
+          begin
+             if IsValidIMOLoc(uCore.TempEncounterLoc,Patient.DFN) then
+                frmClinicWardMeds.ClinicOrWardLocation(SignList, uCore.TempEncounterLoc,uCore.TempEncounterLocName, PrintLoc)
+             else
+                if (IsValidIMOLoc(Encounter.Location,Patient.DFN)) and ((frmClinicWardMeds.rpcIsPatientOnWard(patient.DFN)) and (Patient.Inpatient = false)) then
+                   frmClinicWardMeds.ClinicOrWardLocation(SignList, Encounter.Location,Encounter.LocationName, PrintLoc);
+          end;
+          uCore.TempEncounterLoc := 0;
+          uCore.TempEncounterLocName := '';
+
+        //hds7591  Clinic/Ward movement.
+
+
         with SignList do if Count > 0 then for i := 0 to Count - 1 do
         begin
@@ -120,5 +137,5 @@
         end;
         StatusText('');
-        PrintOrdersOnSignRelease(SignList, frmReleaseOrders.FNature);
+        PrintOrdersOnSignRelease(SignList, frmReleaseOrders.FNature, PrintLoc);
 //        SetupOrdersPrint(SignList, DeviceInfo, frmReleaseOrders.FNature, False, PrintIt); //*KCM*
 //        if PrintIt then PrintOrdersOnReview(SignList, DeviceInfo);                       //*KCM*
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrdersRenew.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrdersRenew.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrdersRenew.dfm	(revision 460)
@@ -1,9 +1,14 @@
 inherited frmRenewOrders: TfrmRenewOrders
-  Left = 273
-  Top = 185
-  Width = 450
-  Height = 270
+  Left = 434
+  Top = 232
+  HorzScrollBar.Tracking = True
+  HorzScrollBar.Visible = True
+  VertScrollBar.Tracking = True
+  AutoScroll = False
   Caption = 'Renew Orders'
+  ClientHeight = 416
+  ClientWidth = 592
   Position = poScreenCenter
+  Scaled = False
   OnClose = FormClose
   OnCreate = FormCreate
@@ -11,49 +16,41 @@
   PixelsPerInch = 96
   TextHeight = 13
-  object lstOrders: TListBox
-    Left = 0
-    Top = 17
-    Width = 442
-    Height = 185
-    Style = lbOwnerDrawVariable
-    Align = alClient
-    Color = clCream
-    ItemHeight = 13
-    TabOrder = 0
-    OnClick = lstOrdersClick
-    OnDrawItem = lstOrdersDrawItem
-    OnMeasureItem = lstOrdersMeasureItem
-  end
   object hdrOrders: THeaderControl
     Left = 0
     Top = 0
-    Width = 442
+    Width = 592
     Height = 17
     DragReorder = False
+    Constraints.MinHeight = 17
     Sections = <
       item
+        AutoSize = True
         ImageIndex = -1
         Text = 'Order to be Renewed'
-        Width = 317
+        Width = 296
       end
       item
+        AutoSize = True
         ImageIndex = -1
         Text = 'Start/Stop Time'
-        Width = 125
+        Width = 296
       end>
+    OnSectionResize = hdrOrdersSectionResize
   end
-  object Panel1: TPanel
+  object pnlBottom: TPanel
     Left = 0
-    Top = 202
-    Width = 442
-    Height = 41
+    Top = 393
+    Width = 592
+    Height = 23
     Align = alBottom
+    Anchors = [akLeft, akTop, akRight, akBottom]
+    AutoSize = True
     TabOrder = 2
     DesignSize = (
-      442
-      41)
+      592
+      23)
     object cmdCancel: TButton
-      Left = 362
-      Top = 12
+      Left = 512
+      Top = 1
       Width = 72
       Height = 21
@@ -61,14 +58,16 @@
       Cancel = True
       Caption = 'Cancel'
+      Constraints.MinHeight = 21
       TabOrder = 0
       OnClick = cmdCancelClick
     end
     object cmdOK: TButton
-      Left = 274
-      Top = 12
+      Left = 424
+      Top = 1
       Width = 72
       Height = 21
       Anchors = [akTop, akRight]
       Caption = 'OK'
+      Constraints.MinHeight = 21
       Default = True
       TabOrder = 1
@@ -77,8 +76,9 @@
     object cmdChange: TButton
       Left = 8
-      Top = 12
+      Top = 1
       Width = 145
       Height = 21
       Caption = 'Change...'
+      Constraints.MinHeight = 21
       Enabled = False
       TabOrder = 2
@@ -86,3 +86,30 @@
     end
   end
+  object lstOrders: TCaptionListBox
+    Left = 0
+    Top = 17
+    Width = 592
+    Height = 376
+    Style = lbOwnerDrawVariable
+    Align = alClient
+    Anchors = []
+    Color = clCream
+    Ctl3D = True
+    ExtendedSelect = False
+    Font.Charset = DEFAULT_CHARSET
+    Font.Color = clWindowText
+    Font.Height = -11
+    Font.Name = 'MS Sans Serif'
+    Font.Style = []
+    ItemHeight = 24
+    ParentCtl3D = False
+    ParentFont = False
+    ParentShowHint = False
+    ShowHint = True
+    TabOrder = 1
+    OnClick = lstOrdersClick
+    OnDrawItem = lstOrdersDrawItem
+    OnMeasureItem = lstOrdersMeasureItem
+    HintOnItem = True
+  end
 end
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrdersRenew.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrdersRenew.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrdersRenew.pas	(revision 460)
@@ -6,14 +6,14 @@
   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
   fAutoSz, StdCtrls, ORFn, ComCtrls, uConst, rODMeds, uOrders, fOCAccept,
-  ExtCtrls, uODBase;
+  ExtCtrls, uODBase, ORCtrls;
 
 type
   TfrmRenewOrders = class(TfrmAutoSz)
-    lstOrders: TListBox;
     hdrOrders: THeaderControl;
-    Panel1: TPanel;
+    pnlBottom: TPanel;
     cmdCancel: TButton;
     cmdOK: TButton;
     cmdChange: TButton;
+    lstOrders: TCaptionListBox;
     procedure FormCreate(Sender: TObject);
     procedure cmdOKClick(Sender: TObject);
@@ -27,4 +27,6 @@
     procedure FormClose(Sender: TObject; var Action: TCloseAction);
     procedure FormShow(Sender: TObject);
+    procedure hdrOrdersSectionResize(HeaderControl: THeaderControl;
+      Section: THeaderSection);
   private
     OKPressed: Boolean;
@@ -78,5 +80,5 @@
   IsInpt: boolean;
   i,j: Integer;
-  m: integer; //BAPHII 1.3.2
+  //m: integer; //BAPHII 1.3.2
   PkgInfo:string;
   PlainText,RnErrMsg: string;
@@ -251,10 +253,6 @@
          AnOrder.LinkObject := nil;
        end;
-
     frmRenewOrders.Release;
   end;
-
-
-
 end;
 
@@ -283,4 +281,5 @@
     DateHeight := MeasureColumnHeight(x, Index, DATE_COLUMN);
     Height := HigherOf(TextHeight, DateHeight);
+    if Height > 255 then Height := 255;  //This is maximum allowed by a windows listbox item.
   end
 end;
@@ -427,3 +426,10 @@
 end;
 
+procedure TfrmRenewOrders.hdrOrdersSectionResize(HeaderControl: THeaderControl; Section: THeaderSection);
+begin
+  inherited;
+  lstOrders.Repaint; //CQ6367
+end;
+
+
 end.
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrdersSign.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrdersSign.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrdersSign.dfm	(revision 460)
@@ -1,5 +1,5 @@
 object frmSignOrders: TfrmSignOrders
-  Left = 379
-  Top = 162
+  Left = 400
+  Top = 159
   Width = 585
   Height = 511
@@ -43,9 +43,9 @@
   object Label2: TStaticText
     Left = 8
-    Top = 144
+    Top = 147
     Width = 171
     Height = 17
     Caption = 'The following orders will be signed -'
-    TabOrder = 4
+    TabOrder = 3
     TabStop = True
   end
@@ -58,5 +58,5 @@
     Caption = 'OK'
     Default = True
-    TabOrder = 2
+    TabOrder = 1
     OnClick = cmdOKClick
   end
@@ -69,5 +69,5 @@
     Cancel = True
     Caption = 'Cancel'
-    TabOrder = 3
+    TabOrder = 2
     OnClick = cmdCancelClick
   end
@@ -192,5 +192,5 @@
     ShowHint = True
     Style = lbOwnerDrawVariable
-    TabOrder = 1
+    TabOrder = 4
     OnClick = clstOrdersClick
     OnDrawItem = clstOrdersDrawItem
@@ -243,5 +243,4 @@
     object Diagnosis1: TMenuItem
       Caption = '&Diagnosis...'
-      Enabled = False
       ShortCut = 32836
       OnClick = buOrdersDiagnosisClick
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrdersSign.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrdersSign.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrdersSign.pas	(revision 460)
@@ -114,5 +114,5 @@
 uses
   Hash, rCore, rOrders, uConst, fOrdersPrint, uCore, uOrders, uSignItems, fOrders,
-  fPCELex, rPCE, fODConsult, fBALocalDiagnoses;
+  fPCELex, rPCE, fODConsult, fBALocalDiagnoses, fClinicWardMeds, fFrame;
 
 const
@@ -208,4 +208,5 @@
   cProvDUZ: Int64;
   OrderText: string;
+  PrintLoc: Integer;
  // tempOrderID: string;
 
@@ -251,6 +252,5 @@
   Result := False;
   DigSigErr := True;
-  DigStoreErr := False;
-  Obj := Nil;
+  PrintLoc := 0;
   if SelectedList.Count = 0 then Exit;
   if BILLING_AWARE then
@@ -418,8 +418,24 @@
           if SignList.Count > 0 then
           begin
+
+          //hds7591  Clinic/Ward movement.  Patient Admission IMO
+          if not frmFrame.TimedOut then
+          begin
+             if IsValidIMOLoc(uCore.TempEncounterLoc,Patient.DFN) then
+                frmClinicWardMeds.ClinicOrWardLocation(SignList, Encounter.Location,uCore.Encounter.LocationName, PrintLoc)
+             else
+                if (IsValidIMOLoc(Encounter.Location,Patient.DFN)) and ((frmClinicWardMeds.rpcIsPatientOnWard(patient.DFN)) and (Patient.Inpatient = false)) then
+                   frmClinicWardMeds.ClinicOrWardLocation(SignList, Encounter.Location,Encounter.LocationName, PrintLoc);
+          end;
+          uCore.TempEncounterLoc := 0;
+          uCore.TempEncounterLocName := '';
+          //hds7591  Clinic/Ward movement  Patient Admission IMO
+
             SigItems.SaveSettings; // Save CoPay FIRST!
             SendOrders(SignList, frmSignOrders.ESCode);
-          end;
-          with SignList do if Count > 0 then for i := 0 to Count - 1 do
+
+        end;
+
+            with SignList do if Count > 0 then for i := 0 to Count - 1 do
             begin
               if Pos('E', Piece(SignList[i], U, 2)) > 0 then
@@ -443,5 +459,5 @@
               if theSts = 10 then  SignList.Delete(cnt);  //signed delayed order should not be printed.
           end;
-          PrintOrdersOnSignRelease(SignList, NO_PROVIDER);
+          PrintOrdersOnSignRelease(SignList, NO_PROVIDER, PrintLoc);
         finally
           SignList.Free;
@@ -505,8 +521,4 @@
 
 procedure TfrmSignOrders.cmdOKClick(Sender: TObject);
-{Begin BillingAware}
-var
-   BABillingRecs: TStringList;
-{End BillingAware}
 const
   TX_NO_CODE  = 'An electronic signature code must be entered to sign orders.';
@@ -519,12 +531,5 @@
 begin
   inherited;
-{Begin BillingAware}
-  if  BILLING_AWARE then
-  begin
-      BABillingRecs := TStringList.Create;
-      BABillingRecs.Clear;
-  end;
-{End BillingAware}
- 
+
   if txtESCode.Visible and (Length(txtESCode.Text) = 0) then
   begin
@@ -545,5 +550,6 @@
   begin
     if SigItems.OK2SaveSettings then
-      if Not BADxEntered then   //  if Dx have been entered and OK is pressed
+   
+      if Not UBACore.BADxEntered then   //  if Dx have been entered and OK is pressed
          begin                     // billing data will be saved. otherwise error message!
             InfoBox(TX_NO_DX, 'Sign Orders', MB_OK);
@@ -781,5 +787,4 @@
     begin
        //Billing Awareness 'flyover' hint includes Dx code(s) when Dx code(s) have been assigned to an order
-           thisRec := TBADxRecord.Create;
            thisOrderID := TChangeItem(fOrdersSign.frmSignOrders.clstOrders.Items.Objects[Itm]).ID;
 
@@ -909,5 +914,4 @@
 {Begin BillingAware}
 
-  numSelected := 0;
   match := false;
   allBlank := false;
@@ -1264,6 +1268,5 @@
   j: integer; //CQ5054
 begin
-   //if BILLING_AWARE then
-    //begin
+
        if FOSTFHintWndActive then
        begin
@@ -1290,6 +1293,4 @@
            //end CQ5054
        end;
-
-    //end  //if BILLING_AWARE
 end;
 
@@ -1315,7 +1316,4 @@
         end;
   end;
-
-   x := 0;
-   y := 0;
 
   try
@@ -1398,13 +1396,10 @@
 begin
    try
-      if BILLING_AWARE then
-         begin
-           if FOSTFhintWndActive then
-              begin
-              FOSTFhintWindow.ReleaseHandle;
-              FOSTFHintWndActive := False;
-              Application.ProcessMessages;
-              end;
-         end;
+      if FOSTFhintWndActive then
+      begin
+         FOSTFhintWindow.ReleaseHandle;
+         FOSTFHintWndActive := False;
+         Application.ProcessMessages;
+      end;
   except
      on E: Exception do
@@ -1518,10 +1513,11 @@
 procedure TfrmSignOrders.FormatListForScreenReader;
 var
-  ListStateOn : boolean;
+  ListStateOn : longbool;
+  Success: longbool;
 begin
   //Determine if a screen reader is currently being used.
-  SystemParametersInfo(SPI_GETSCREENREADER, 0, @ListStateOn,0);
-  if ListStateOn then
-    SetItemTextToState
+  Success := SystemParametersInfo(SPI_GETSCREENREADER, 0, @ListStateOn,0);
+  if Success and ListStateOn then
+    SetItemTextToState;
 end;
 
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fOtherSchedule.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fOtherSchedule.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fOtherSchedule.dfm	(revision 460)
@@ -1,9 +1,9 @@
 object frmOtherSchedule: TfrmOtherSchedule
-  Left = 355
-  Top = 154
+  Left = 544
+  Top = 262
   AutoScroll = False
   Caption = 'Order with schedule '#39'OTHER'#39
   ClientHeight = 362
-  ClientWidth = 341
+  ClientWidth = 369
   Color = clBtnFace
   Constraints.MinHeight = 70
@@ -23,5 +23,5 @@
     Left = 0
     Top = 82
-    Width = 341
+    Width = 369
     Height = 8
     Cursor = crVSplit
@@ -33,5 +33,5 @@
     Left = 0
     Top = 0
-    Width = 341
+    Width = 369
     Height = 82
     Align = alTop
@@ -50,5 +50,5 @@
       Left = 52
       Top = 4
-      Width = 285
+      Width = 313
       Height = 74
       Align = alClient
@@ -64,5 +64,5 @@
     Left = 0
     Top = 90
-    Width = 341
+    Width = 369
     Height = 272
     Align = alClient
@@ -72,5 +72,5 @@
       Left = 1
       Top = 1
-      Width = 144
+      Width = 176
       Height = 202
       Align = alLeft
@@ -79,5 +79,5 @@
       object cbo7: TCheckBox
         Tag = 1
-        Left = 45
+        Left = 86
         Top = 21
         Width = 60
@@ -89,5 +89,5 @@
       object cbo1: TCheckBox
         Tag = 2
-        Left = 44
+        Left = 85
         Top = 48
         Width = 60
@@ -99,5 +99,5 @@
       object cbo2: TCheckBox
         Tag = 3
-        Left = 44
+        Left = 85
         Top = 75
         Width = 60
@@ -109,5 +109,5 @@
       object cbo3: TCheckBox
         Tag = 4
-        Left = 44
+        Left = 85
         Top = 102
         Width = 60
@@ -119,5 +119,5 @@
       object cbo4: TCheckBox
         Tag = 5
-        Left = 44
+        Left = 85
         Top = 129
         Width = 60
@@ -129,5 +129,5 @@
       object cbo5: TCheckBox
         Tag = 6
-        Left = 44
+        Left = 85
         Top = 156
         Width = 60
@@ -139,5 +139,5 @@
       object cbo6: TCheckBox
         Tag = 7
-        Left = 44
+        Left = 85
         Top = 183
         Width = 60
@@ -147,7 +147,16 @@
         OnClick = cbo6Click
       end
+      object Button1: TButton
+        Left = 8
+        Top = 64
+        Width = 60
+        Height = 19
+        Caption = 'Everyday'
+        TabOrder = 7
+        OnClick = Button1Click
+      end
     end
     object GroupBox2: TGroupBox
-      Left = 152
+      Left = 180
       Top = 1
       Width = 188
@@ -214,11 +223,26 @@
       end
       object btnRemove: TButton
-        Left = 114
+        Left = 118
         Top = 94
         Width = 60
         Height = 19
+        Hint = 'Remove the selected time from the Day-of-Week schedule.'
         Caption = 'Remove'
+        ParentShowHint = False
+        ShowHint = True
         TabOrder = 2
         OnClick = btnRemoveClick
+      end
+      object btnAdd: TButton
+        Left = 118
+        Top = 64
+        Width = 60
+        Height = 19
+        Hint = 'Add the selected time to the Day-of-Week schedule'
+        Caption = 'Add'
+        ParentShowHint = False
+        ShowHint = True
+        TabOrder = 3
+        OnClick = btnAddClick
       end
     end
@@ -226,10 +250,10 @@
       Left = 1
       Top = 203
-      Width = 339
+      Width = 367
       Height = 68
       Align = alBottom
       TabOrder = 2
       DesignSize = (
-        339
+        367
         68)
       object Label1: TLabel
@@ -241,5 +265,5 @@
       end
       object btn0k1: TButton
-        Left = 176
+        Left = 204
         Top = 43
         Width = 75
@@ -251,5 +275,5 @@
       end
       object btnCancel: TButton
-        Left = 257
+        Left = 285
         Top = 42
         Width = 75
@@ -264,7 +288,16 @@
         Left = 64
         Top = 8
-        Width = 268
+        Width = 296
         Height = 21
         Anchors = [akLeft, akTop, akRight]
+        Color = clInfoBk
+        Enabled = False
+        Font.Charset = DEFAULT_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -11
+        Font.Name = 'MS Sans Serif'
+        Font.Style = [fsBold]
+        ParentFont = False
+        ReadOnly = True
         TabOrder = 0
         OnChange = txtScheduleChange
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/fOtherSchedule.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/fOtherSchedule.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/fOtherSchedule.pas	(revision 460)
@@ -35,4 +35,6 @@
     memMessage: TMemo;
     Splitter1: TSplitter;
+    btnAdd: TButton;
+    Button1: TButton;
     procedure FormCreate(Sender: TObject);
     procedure btnCancelClick(Sender: TObject);
@@ -55,4 +57,5 @@
     procedure lstMinuteKeyDown(Sender: TObject; var Key: Word;
       Shift: TShiftState);
+    procedure Button1Click(Sender: TObject);
   private
     FDaySchedule: array [1..7] of string;
@@ -66,4 +69,5 @@
     procedure UpdateOnFreeTextInput;
     function CheckDay(ADayStr: string): string;
+    
   public
   end;
@@ -87,5 +91,5 @@
    if frmOtherSchedule.ShowModal = mrOK then
    begin
-     ASchedule := frmOtherSchedule.FOtherSchedule;
+     ASchedule := UpperCase(frmOtherSchedule.FOtherSchedule);
      Result := True;
    end;
@@ -121,4 +125,10 @@
 procedure TfrmOtherSchedule.btn0k1Click(Sender: TObject);
 begin
+  if (cbo1.Checked = false) and (cbo2.Checked = false) and (cbo3.Checked = false) and (cbo4.Checked = false) and (cbo5.Checked = false) and
+    (cbo6.Checked = false) and (cbo7.Checked = false) then
+    begin
+      ShowMessage('A day of week must be selected!');
+      Exit;
+    end;
   if not IsValidSchStr(FOtherSchedule) then
   begin
@@ -176,8 +186,11 @@
 var
   i : integer;
-  TimePart, DayPart: string;
+  TimePart, DayPart,APRN,ASearchTxt: string;
 begin
   TimePart := '';
   DayPart := '';
+  APRN := '';
+  ASearchTxt := UpperCase(txtSchedule.Text);
+  if StrPos(PChar(ASearchTxt),PChar('PRN')) <> nil then APRN := ' PRN'; //hds8326 retain PRN free text if data time entered
   for i := 0 to FTimeSchedule.Count - 1 do
   begin
@@ -201,4 +214,5 @@
   end
   else FOtherSchedule := TimePart;
+  if Length(APRN) > 0 then FOtherSchedule := FOtherSchedule + APRN; //hds8326 retain PRN free text if data time entered
   txtSchedule.Text := FOtherSchedule;
 end;
@@ -368,7 +382,13 @@
   var
     idx: integer;
+    x: string;
   begin
     for idx := aDList.Count - 1 downto 0 do
     begin
+    // cq hds8326 PRN entered manually split PRN from DOW to retain last DOW
+      x := UpperCase(aDList.Strings[idx]); // added to properly process DOW when followed by a space "PRN".
+      if Piece(x,' ',2) = 'PRN' then
+         aDLIst.Strings[idx] := Piece(x,' ',1);
+    // cq hds8326
       if ((CheckDay(aDList[idx]) = 'SUN') or (CheckDay(aDList[idx]) = 'SU')) then
         begin
@@ -419,5 +439,4 @@
 begin
   inherited;
-  i := 0;
   dayStr  := '';
   timeStr := '';
@@ -437,4 +456,5 @@
   begin
     Val(Piece(txtSchedule.Text,'-',1), i, Code);
+    if i = 0 then begin end;  // just to make compiler not give hint
     if Code <> 0 then dayStr := Trim(txtSchedule.Text)
     else timeStr := Trim(txtSchedule.Text);
@@ -463,5 +483,5 @@
 begin
   inherited;
-  lstMinute.ItemIndex := -1;
+  if lstMinute.ItemIndex = -1 then lstMinute.ItemIndex :=0;
 end;
 
@@ -509,5 +529,5 @@
   FFromCheckBox := True;
   if lstHour.ItemIndex < 0 then Exit;
-  btnAddClick(Self);
+  //btnAddClick(Self);
   FFromCheckBox := False;
 end;
@@ -521,9 +541,21 @@
     FFromCheckBox := True;
     if lstHour.ItemIndex < 0 then Exit;
-    btnAddClick(Self);
+    //btnAddClick(Self);
     FFromCheckBox := False;
   end;
 end;
 
+procedure TfrmOtherSchedule.Button1Click(Sender: TObject);
+begin
+  inherited;
+   cbo1.Checked := true;
+   cbo2.Checked := true;
+   cbo3.Checked := true;
+   cbo4.Checked := true;
+   cbo5.Checked := true;
+   cbo6.Checked := true;
+   cbo7.Checked := true;
+end;
+
 end.
 
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/rODAllergy.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/rODAllergy.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/rODAllergy.pas	(revision 460)
@@ -49,4 +49,10 @@
   end;
 
+  TARTClinUser = record
+    IsClinUser: boolean;
+    ReasonFailed: string;
+    AccessChecked: boolean;
+  end;
+
 function SearchForAllergies(StringToMatch: string): TStrings;
 function SubsetofSymptoms(const StartFrom: string; Direction: Integer): TStrings;
@@ -64,4 +70,5 @@
 function RequireOriginatorComments: boolean;
 function EnableErrorComments: boolean;
+function IsARTClinicalUser(var AMessage: string): boolean;
 
 implementation
@@ -73,4 +80,5 @@
   uARTPatchInstalled: TARTPatchInstalled;
   uGMRASiteParams: TGMRASiteParams;
+  uARTClinUser: TARTClinUser;
 
 function ODForAllergies: TStrings;
@@ -326,3 +334,32 @@
 end;
 
+(*function IsARTClinicalUser(var AMessage: string): boolean;
+const
+  TX_NO_AUTH = 'You are not authorized to perform this action.' + CRLF +
+               'Either the ORES or ORELSE key is required.';
+begin
+  Result := (User.UserClass > UC_CLERK);     // User has ORES or ORELSE key
+  if not Result then AMessage := TX_NO_AUTH else AMessage := '';
+end;*)
+
+function IsARTClinicalUser(var AMessage: string): boolean;
+const
+  TX_NO_AUTH = 'You are not authorized to perform this action.' + CRLF;
+var
+  x: string;
+begin
+  with uARTClinUser do
+  begin
+    if not AccessChecked then
+      begin
+        x := sCallV('ORWDAL32 CLINUSER',[nil]);
+        IsClinUser := (Piece(x, U, 1) = '1');
+        if not IsClinUser then ReasonFailed := TX_NO_AUTH + Piece(x, U, 2) else ReasonFailed := '';
+        AccessChecked := True;
+      end;
+    Result   := IsClinUser;
+    AMessage := ReasonFailed ;
+  end;
+end;
+
 end.
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/rODBase.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/rODBase.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/rODBase.pas	(revision 460)
@@ -68,4 +68,9 @@
   end;
 
+  TPFSSActive = record
+    PFSSActive: boolean;
+    PFSSChecked: boolean;
+  end;
+
 { General Calls }
 function AskAnotherOrder(ADialog: Integer): Boolean;
@@ -75,5 +80,6 @@
 procedure LoadDialogDefinition(Dest: TList; const DialogName: string);
 procedure LoadOrderPrompting(Dest: TList; ADialog: Integer);
-procedure LoadResponses(Dest: TList; const OrderID: string);
+//procedure LoadResponses(Dest: TList; const OrderID: string);
+procedure LoadResponses(Dest: TList; const OrderID: string; var HasObjects: boolean);
 procedure PutNewOrder(var AnOrder: TOrder; ConstructOrder: TConstructOrder; OrderSource: string);
 //procedure PutNewOrderAuto(var AnOrder: TOrder; ADialog: Integer); // no longer used
@@ -88,5 +94,5 @@
 procedure SetDefaultCoPayToNewOrder(AnOrderID, CoPayInfo:string);
 procedure ValidateNumericStr(const x, Dom: string; var ErrMsg: string);
-
+function IsPFSSActive: boolean;
 
 { Quick Order Calls }
@@ -126,5 +132,5 @@
 implementation
 
-uses TRPCB,uOrders;
+uses TRPCB, uOrders, uODBase;
 
 var
@@ -133,4 +139,5 @@
   uLastQuantityMsg: string;
   uMedRoutes: TStringList;
+  uPFSSActive: TPFSSActive;
 
 { Common Internal Calls }
@@ -175,20 +182,20 @@
         begin
           IVDurVal := Copy(IVDuration,1,length(IVDuration)-1);
-          TResponse(ResponseList.Items[j]).IValue := 'for ' + IVDurVal + ' hours';
+          TResponse(ResponseList.Items[j]).IValue := 'for ' + IVDurVal + 'hours';
         end
         else if (Pos('D',upperCase(IVDuration))>0) then
         begin
           IVDurVal := Copy(IVDuration,1,length(IVDuration)-1);
-          TResponse(ResponseList.Items[j]).IValue := 'for ' + IVDurVal + ' days';
+          TResponse(ResponseList.Items[j]).IValue := 'for ' + IVDurVal + 'days';
         end
         else if ((Pos('ML',upperCase(IVDuration))>0) or (Pos('CC',upperCase(IVDuration))>0)) then
         begin
           IVDurVal := Copy(IVDuration,1,length(IVDuration)-2);
-          TResponse(ResponseList.Items[j]).IValue := 'with total volume ' + IVDurVal + ' ml';
+          TResponse(ResponseList.Items[j]).IValue := 'with total volume ' + IVDurVal + 'ml';
         end
         else if (Pos('L',upperCase(IVDuration))>0) then
         begin
           IVDurVal := Copy(IVDuration,0,length(IVDuration)-1);
-          TResponse(ResponseList.Items[j]).IValue := 'with total volume ' + IVDurVal + ' L';
+          TResponse(ResponseList.Items[j]).IValue := 'with total volume ' + IVDurVal + 'L';
         end;
       end;
@@ -371,44 +378,56 @@
 end;
 
-procedure ExtractToResponses(Dest: TList);
+procedure ExtractToResponses(Dest: TList; var HasObjects: boolean);
 { load a list with TResponse records, assumes source strings are in RPCBrokerV.Results }
 var
   i: Integer;
   AResponse: TResponse;
+  WPContainsObjects, TxContainsObjects: boolean;
+  TempBroker: TStrings;
 begin
   i := 0;
-  with RPCBrokerV do while i < Results.Count do
-  begin
-    if CharAt(Results[i], 1) = '~' then
+  HasObjects := FALSE;
+  TempBroker := TStringlist.Create;
+  TempBroker.Assign(RPCBrokerV.Results);
+  try
+  with TempBroker do while i < Count do
+  begin
+    if CharAt(Strings[i], 1) = '~' then
     begin
       AResponse := TResponse.Create;
       with AResponse do
       begin
-        PromptIEN := StrToIntDef(Piece(Copy(Results[i], 2, 255), U, 1), 0);
-        Instance := StrToIntDef(Piece(Results[i], U, 2), 0);
-        PromptID := Piece(Results[i], U, 3);
+        PromptIEN := StrToIntDef(Piece(Copy(Strings[i], 2, 255), U, 1), 0);
+        Instance := StrToIntDef(Piece(Strings[i], U, 2), 0);
+        PromptID := Piece(Strings[i], U, 3);
         Inc(i);
-        while (i < Results.Count) and (CharAt(Results[i], 1) <> '~') do
+        while (i < Count) and (CharAt(Strings[i], 1) <> '~') do
         begin
-          if CharAt(Results[i], 1) = 'i' then IValue := Copy(Results[i], 2, 255);
-          if CharAt(Results[i], 1) = 'e' then EValue := Copy(Results[i], 2, 255);
-          if CharAt(Results[i], 1) = 't' then
+          if CharAt(Strings[i], 1) = 'i' then IValue := Copy(Strings[i], 2, 255);
+          if CharAt(Strings[i], 1) = 'e' then EValue := Copy(Strings[i], 2, 255);
+          if CharAt(Strings[i], 1) = 't' then
           begin
             if Length(EValue) > 0 then EValue := EValue + CRLF;
-            EValue := EValue + Copy(Results[i], 2, 255);
+            EValue := EValue + Copy(Strings[i], 2, 255);
             IValue := TX_WPTYPE;  // signals that this is a word processing field
           end;
           Inc(i);
         end; {while i}
+        if IValue <> TX_WPTYPE then ExpandOrderObjects(IValue, TxContainsObjects);
+        ExpandOrderObjects(EValue, WPContainsObjects);
+        HasObjects := HasObjects or WPContainsObjects or TxContainsObjects;
         Dest.Add(AResponse);
       end; {with AResponse}
     end; {if CharAt}
   end; {With RPCBrokerV}
-end;
-
-procedure LoadResponses(Dest: TList; const OrderID: string);
+  finally
+    TempBroker.Free;
+  end;
+end;
+
+procedure LoadResponses(Dest: TList; const OrderID: string; var HasObjects: boolean);
 begin
   CallV('ORWDX LOADRSP', [OrderID]);
-  ExtractToResponses(Dest);
+  ExtractToResponses(Dest, HasObjects);
 end;
 
@@ -427,4 +446,6 @@
     Param[1].Value := IntToStr(Encounter.Provider);
     Param[2].PType := literal;
+    (*if loc > 0 then Param[2].Value := IntToStr(Loc)
+    else Param[2].Value := IntToStr(Encounter.Location);*)
     Param[2].Value := IntToStr(Encounter.Location);
     Param[3].PType := literal;
@@ -659,4 +680,14 @@
 end;
 
+function IsPFSSActive: boolean;
+begin
+  with uPFSSActive do
+    if not PFSSChecked then
+      begin
+        PFSSActive := (sCallV('ORWPFSS IS PFSS ACTIVE?', [nil]) = '1');
+        PFSSChecked := True;
+      end;
+  Result := uPFSSActive.PFSSActive
+end;
 
 { Medication Calls }
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/rODDiet.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/rODDiet.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/rODDiet.pas	(revision 460)
@@ -31,4 +31,5 @@
     Alarms: string;
     OPMaxDays: integer;
+    OPDefaultDiet: integer;
   end;
 
@@ -39,5 +40,5 @@
 procedure AppendTFProducts(Dest: TStrings);
 function SubSetOfDiets(const StartFrom: string; Direction: Integer): TStrings;
-function SubSetOfOPDiets(const StartFrom: string; Direction: Integer): TStrings;
+function SubSetOfOPDiets: TStrings;
 procedure OrderLateTray(NewOrder: TOrder; Meal: Char; const MealTime: string; Bagged: Boolean);
 function IsolationID: string;
@@ -48,4 +49,6 @@
 function OutpatientPatchInstalled: boolean;
 function UserHasFHAUTHKey: boolean;
+procedure GetCurrentRecurringOPMeals(Dest: TStrings; MealType: string = '');
+function OutpatientLocationConfigured(ALocation: string): boolean;
 
 
@@ -96,4 +99,6 @@
     else
       OPMaxDays := 30;
+    if Results.Count > 4 then
+      OPDefaultDiet := StrToIntDef(Results[4], 0)
   end;
 end;
@@ -131,7 +136,7 @@
 end;
 
-function SubSetOfOPDiets(const StartFrom: string; Direction: Integer): TStrings;
-begin
-  CallV('ORWDFH OPDIETS', [StartFrom, Direction]);
+function SubSetOfOPDiets: TStrings;
+begin
+  CallV('ORWDFH OPDIETS', [nil]);
   Result := RPCBrokerV.Results;
 end;
@@ -176,7 +181,7 @@
     if not PatchChecked then
       begin
-        PatchInstalled := False;
-{ TODO -oRich V. -cOutpatient Meals : Uncomment when patch available - need number }
-        //PatchInstalled := ServerHasPatch('FH_TEST*1.0*1');
+        //PatchInstalled := True;
+        { TODO -oRich V. -cOutpatient Meals : Uncomment when available }
+        PatchInstalled := (PackageVersion('FH') >= '5.5');
         PatchChecked := True;
       end;
@@ -195,3 +200,15 @@
 end;
 
+procedure GetCurrentRecurringOPMeals(Dest: TStrings; MealType: string = '');
+begin
+  CallV('ORWDFH CURRENT MEALS', [Patient.DFN, MealType]);
+  Dest.Assign(RPCBrokerV.Results);
+  MixedCaseList(Dest);
+end;
+
+function OutpatientLocationConfigured(ALocation: string): boolean;
+begin
+  Result := (sCallV('ORWDFH NFSLOC READY', [ALocation]) = '1');
+end;
+
 end.
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/rODLab.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/rODLab.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/rODLab.pas	(revision 460)
@@ -22,4 +22,9 @@
 procedure GetLabTimesForDate(Dest: TStrings; LabDate: TFMDateTime; Location: integer);
 function  GetLastCollectionTime: string;
+procedure GetPatientBBInfo(Dest: TStrings; PatientID: string; Loc: integer);
+procedure GetPatientBloodResults(Dest: TStrings; PatientID: string; ATests: TStringList);
+procedure GetPatientBloodResultsRaw(Dest: TStrings; PatientID: string; ATests: TStringList);
+function  StatAllowed(PatientID: string): boolean;
+procedure GetBloodComponents(Dest: TStrings);
 
 implementation
@@ -27,4 +32,29 @@
 uses  rODBase;
 (*    fODBase, rODBase, fODLab;*)
+
+procedure GetBloodComponents(Dest: TStrings);
+begin
+  tCallV(Dest, 'ORWDXVB COMPORD', []);
+end;
+
+function  StatAllowed(PatientID: string): boolean;
+begin
+  Result := (StrToInt(sCallV('ORWDXVB STATALOW',[PatientID])) > 0);
+end;
+
+procedure GetPatientBloodResultsRaw(Dest: TStrings; PatientID: string; ATests: TStringList);
+begin
+  tCallV(Dest, 'ORWDXVB RAW', [PatientID, ATests]);
+end;
+
+procedure GetPatientBloodResults(Dest: TStrings; PatientID: string; ATests: TStringList);
+begin
+  tCallV(Dest, 'ORWDXVB RESULTS', [PatientID, ATests]);
+end;
+
+procedure GetPatientBBInfo(Dest: TStrings; PatientID: string; Loc: integer);
+begin
+  tCallV(Dest, 'ORWDXVB GETALL', [PatientID, Loc]);
+end;
 
 function ODForLab(Location, Division: integer): TStrings;
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/rOrders.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/rOrders.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/rOrders.pas	(revision 460)
@@ -38,4 +38,5 @@
     ParentID    : string;
     LinkObject:   TObject;
+    EnteredInError:     Integer; //AGP Changes 26.12 PSI-04-053
     procedure Assign(Source: TOrder);
     procedure Clear;
@@ -604,4 +605,7 @@
     DGroupSeq  := SeqOfDGroup(DGroup);
     DGroupName := TopNameOfDGroup(DGroup);
+    //AGP Changes 26.15 PSI-04-063
+    if (pos('Entered in error',Text)>0) then AnOrder.EnteredInError := 1
+    else AnOrder.EnteredInError := 0;
     //if DGroupName = 'Non-VA Meds' then Text := 'Non-VA  ' + Text;
   end;
@@ -680,6 +684,6 @@
   with RPCBrokerV do for i := 1 to Results.Count - 1 do   // if orders found (skip 0 element)
   begin
-    if (Piece(RPCBrokerV.Results[i], U, 1) = '0') or (Piece(RPCBrokerV.Results[i], U, 1) = '') then Continue;
-    if (DelimCount(Results[i],U) = 2) then Continue;
+    if (Piece(RPCBrokerV.Results[i], U, 1) = '0') or (Piece(RPCBrokerV.Results[i], U, 1) = '') then Continue;  
+    if (DelimCount(Results[i],U) = 2) then Continue;  
     AnOrder := TOrder.Create;
     with AnOrder do
@@ -1126,9 +1130,12 @@
 var
   DelayEvent, x, TheOrder: string;
-  Idx,PickupIdx, ForIMOResponses: integer;
+  Idx, tmpOrderGroup, PickupIdx, ForIMOResponses: integer;
   IfUDGrp: Boolean;
   IfUDGrpForQO: Boolean;
+  temp: string;
 begin
   ForIMOResponses := 0;
+  tmpOrderGroup := 0;
+  temp := '';
   if ForIMO then ForIMOResponses := 1;
   PickupIdx := 0;
@@ -1139,9 +1146,12 @@
   begin
     Delete(TheOrder,1,1);
-    if CheckOrderGroup(TheOrder)=1 then IfUDGrp := True else IfUDGrp := False;
+    tmpOrderGroup := CheckOrderGroup(TheOrder);
+    if tmpOrderGroup = 1 then IfUDGrp := True else IfUDGrp := False;
   end;
   if (not IfUDGrp) and (AnEvent.EventType in ['A','T']) then
     IfUDGrp := True;
   //FLDS=DFN^LOC^ORNP^INPT^SEX^AGE^EVENT^SC%^^^Key Variables
+  if (Patient.Inpatient = true) and (tmpOrderGroup = 2) then temp := '0';
+  if temp <> '0' then temp := BoolChars[Patient.Inpatient];
   with AnEvent do
   begin
@@ -1451,33 +1461,30 @@
 
     with RPCBrokerV do
-       begin
-         ClearParameters := True;
-         RemoteProcedure := 'ORWDXR RENEW';
-         Param[0].PType := literal;
-         Param[0].Value := AnOrder.ID;
-         Param[1].PType := literal;
-         Param[1].Value := Patient.DFN;
-         Param[2].PType := literal;
-         Param[2].Value := IntToStr(Encounter.Provider);
-         Param[3].PType := literal;
-         Param[3].Value := IntToStr(Encounter.Location);
-         Param[4].PType := list;
-
-         for i := 0 to tmplst.Count - 1 do
-           Param[4].Mult[IntToStr(i+1)] := tmplst[i];
-
-         Param[4].Mult['"ORCHECK"'] := IntToStr(OCList.Count);
-
-         for i := 0 to OCList.Count - 1 do
-         begin
-           // put quotes around everything to prevent broker from choking
-           y := '"ORCHECK","' + Piece(OCList[i], U, 1) + '","' + Piece(OCList[i], U, 3) + '","' + IntToStr(i+1) + '"';
-           Param[4].Mult[y] := Pieces(OCList[i], U, 2, 4);
-         end;
-         Param[5].PType := literal;
-         Param[5].Value := IntToStr(IsComplex);
-         Param[6].PType := literal;
-         Param[6].Value := FloatToStr(AnIMOOrderAppt);
-
+    begin
+      ClearParameters := True;
+      RemoteProcedure := 'ORWDXR RENEW';
+      Param[0].PType := literal;
+      Param[0].Value := AnOrder.ID;
+      Param[1].PType := literal;
+      Param[1].Value := Patient.DFN;
+      Param[2].PType := literal;
+      Param[2].Value := IntToStr(Encounter.Provider);
+      Param[3].PType := literal;
+      Param[3].Value := IntToStr(Encounter.Location);
+      Param[4].PType := list;
+      for i := 0 to tmplst.Count - 1 do
+        Param[4].Mult[IntToStr(i+1)] := tmplst[i];
+      Param[4].Mult['"ORCHECK"'] := IntToStr(OCList.Count);
+      for i := 0 to OCList.Count - 1 do
+      begin
+      // put quotes around everything to prevent broker from choking
+      y := '"ORCHECK","' + Piece(OCList[i], U, 1) + '","' + Piece(OCList[i], U, 3) +
+        '","' + IntToStr(i+1) + '"';
+      Param[4].Mult[y] := Pieces(OCList[i], U, 2, 4);
+    end;
+    Param[5].PType := literal;
+    Param[5].Value := IntToStr(IsComplex);
+    Param[6].PType := literal;
+    Param[6].Value := FloatToStr(AnIMOOrderAppt);
     CallBroker;
     SetOrderFromResults(AnOrder);
@@ -1510,5 +1517,6 @@
   CallV('ORWDXA DCREASON', [nil]);
   ExtractItems(Dest, RPCBrokerV.Results, 'DCReason');
-  DefaultIEN := StrToIntDef(Piece(ExtractDefault(RPCBrokerV.Results, 'DCReason'), U, 1), 0);
+  //AGP Change 26.15 for PSI-04-63
+  //DefaultIEN := StrToIntDef(Piece(ExtractDefault(RPCBrokerV.Results, 'DCReason'), U, 1), 0);
 end;
 
@@ -1528,5 +1536,4 @@
   SetOrderFromResults(AnOrder);
   AnOrder.ParentID := AParentID;
-
 end;
 
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/uODBase.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/uODBase.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/uODBase.pas	(revision 460)
@@ -22,6 +22,10 @@
 procedure PopKeyVars(NumLevels: Integer = 1);
 procedure PushKeyVars(const NewVals: string);
+procedure ExpandOrderObjects(var Txt: string; var ContainsObjects: boolean; msg: string = '');
 
 implementation
+
+uses
+  dShared, Windows, rTemplates;
 
 var
@@ -118,4 +122,72 @@
 end;
 
+procedure ExpandOrderObjects(var Txt: string; var ContainsObjects: boolean; msg: string = '');
+var
+  ObjList: TStringList;
+  Err: TStringList;
+  i, j, k, oLen: integer;
+  obj, ObjTxt: string;
+const
+  CRDelim = #13;
+  TC_BOILER_ERR  = 'Order Boilerplate Object Error';
+  TX_BOILER_ERR  = 'Contact IRM and inform them about this error.' + CRLF +
+                   'Make sure you give them the name of the quick' + CRLF +
+                   'order that you are processing.' ;
+begin
+  ObjList := TStringList.Create;
+  try
+    Err := nil;
+    if(not dmodShared.BoilerplateOK(Txt, CRDelim, ObjList, Err)) and (assigned(Err)) then
+    begin
+      try
+        Err.Add(CRLF + TX_BOILER_ERR);
+        InfoBox(Err.Text, TC_BOILER_ERR, MB_OK + MB_ICONERROR);
+      finally
+        Err.Free;
+      end;
+    end;
+    if(ObjList.Count > 0) then
+    begin
+      ContainsObjects := True;
+      GetTemplateText(ObjList);
+      i := 0;
+      while (i < ObjList.Count) do
+      begin
+        if(pos(ObjMarker, ObjList[i]) = 1) then
+        begin
+          obj := copy(ObjList[i], ObjMarkerLen+1, MaxInt);
+          if(obj = '') then break;
+          j := i + 1;
+          while (j < ObjList.Count) and (pos(ObjMarker, ObjList[j]) = 0) do
+            inc(j);
+          if((j - i) > 2) then
+          begin
+            ObjTxt := '';
+            for k := i+1 to j-1 do
+              ObjTxt := ObjTxt + #13 + ObjList[k];
+          end
+          else
+            ObjTxt := ObjList[i+1];
+          i := j;
+          obj := '|' + obj + '|';
+          oLen := length(obj);
+          repeat
+            j := pos(obj, Txt);
+            if(j > 0) then
+            begin
+              delete(Txt, j, OLen);
+              insert(ObjTxt, Txt, j);
+            end;
+          until(j = 0);
+        end
+        else
+          inc(i);
+      end
+    end;
+  finally
+    ObjList.Free;
+  end;
+end;
+
 initialization
   uOrderEventType := #0;
Index: cprs/branches/foia-cprs/CPRS-Chart/Orders/uOrders.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Orders/uOrders.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Orders/uOrders.pas	(revision 460)
@@ -58,5 +58,5 @@
 procedure QuickOrderListEdit;
 function RefNumFor(AnOwner: TComponent): Integer;
-procedure PrintOrdersOnSignRelease(OrderList: TStringList; Nature: Char);
+procedure PrintOrdersOnSignRelease(OrderList: TStringList; Nature: Char; PrintLoc : Integer =0);
 procedure SetFontSize( FontSize: integer);
 procedure NextMove(var NMRec: TNextMoveRec; LastIndex: Integer; NewIndex: Integer);
@@ -74,7 +74,9 @@
 MedsDisp : Integer;
 ClinDisp : Integer; //IMO
+NurDisp  : Integer;
 IVDisp   : Integer;
 CsltDisp : Integer;
 ProcDisp : Integer;
+ImgDisp  : Integer;
 NonVADisp: Integer;
 MedsInDlgIen  : Integer;
@@ -94,9 +96,9 @@
 
 uses fODDiet, fODMisc, fODGen, fODMedIn, fODMedOut, fODText, fODConsult, fODProc, fODRad,
-     fODLab, fODMeds, fODMedIV, fODVitals, fODAuto, fODAllgy, fOMNavA, rCore, uCore, fFrame,
+     fODLab, fodBBank, fODMeds, fODMedIV, fODVitals, fODAuto, (*fODAllgy,*) fOMNavA, rCore, uCore, fFrame,
      fEncnt, fEffectDate, fOMVerify, fOrderSaveQuick, fOMSet, rMisc, uODBase, rODMeds,
      fLkUpLocation, fOrdersPrint, fOMAction, fARTAllgy, fOMHTML, fOrders, rODBase,
      fODChild, fMeds, rMeds, rPCE, frptBox, fODMedNVA, fODChangeUnreleasedRenew, rODAllergy,
-     UBAGlobals;
+     UBAGlobals, fClinicWardMeds, uTemplateFields;
 
 var
@@ -142,4 +144,7 @@
   TX_NO_QUICK   = 'This ordering dialog does not support quick orders.';
   TC_NO_QUICK   = 'Save/Edit Quick Orders';
+  TX_CANT_SAVE_QO = 'This order contains TIU objects, which may result in patient-specific' + CRLF +
+                    'information being included in the order.  For this reason, it may not' + CRLF +
+                    'be saved as a personal quick order for later reuse.';
   TX_NO_COPY    = CRLF + CRLF + '- cannot be copied.' + CRLF + CRLF + 'Reason: ';
   TC_NO_COPY    = 'Unable to Copy Order';
@@ -152,7 +157,7 @@
   STEP_FORWARD  = 1;
   STEP_BACK     = -1;
-  TX_NOINPT     = 'You can not place inpatient medication order on a clinic location for selected inpatient.';
+  TX_NOINPT     = ': You cannot place inpatient medication orders from a clinic location for selected patient.';
   TX_IMO_WARNING1 = 'You are ';
-  TX_IMO_WARNING2 = ' Clinic Medication orders. The New orders will be saved as Clinic Medication orders and will NOT be available in BCMA';
+  TX_IMO_WARNING2 = ' Clinic Orders. The New orders will be saved as Clinic Orders and MAY NOT be available in BCMA';
 
 
@@ -200,9 +205,10 @@
   OD_DIET:      DialogClass := TfrmODDiet;
   OD_LAB:       DialogClass := TfrmODLab;
+  OD_BB:        DialogClass := TfrmODBBank;
   OD_CONSULT:   DialogClass := TfrmODCslt;
   OD_PROCEDURE: DialogClass := TfrmODProc;
   OD_TEXTONLY:  DialogClass := TfrmODText;
   OD_VITALS:    DialogClass := TfrmODVitals;
-  OD_ALLERGY:   DialogClass := TfrmODAllergy;
+  //OD_ALLERGY:   DialogClass := TfrmODAllergy;
   OD_AUTOACK:   DialogClass := TfrmODAuto;
   else Exit;
@@ -391,7 +397,17 @@
       else
       begin
-        ResolvedDialog.DisplayGroup := InptDisp;
-        ResolvedDialog.DialogIEN    := MedsInDlgIen;
-        ResolvedDialog.FormID       := MedsInDlgFormId;
+        //AGP changes to handle IMO INV Dialog opening the unit dose dialog.
+        if (ResolvedDialog.DisplayGroup = ClinDisp) and (Resolveddialog.DialogIEN = MedsIVDlgIEN) and (ResolvedDialog.FormID = MedsIVDlgFormId) then
+          begin
+            ResolvedDialog.DisplayGroup := IVDisp;
+            ResolvedDialog.DialogIEN    := MedsIVDlgIen;
+            ResolvedDialog.FormID       := MedsIVDlgFormId;
+          end
+        else
+          begin
+            ResolvedDialog.DisplayGroup := InptDisp;
+            ResolvedDialog.DialogIEN    := MedsInDlgIen;
+            ResolvedDialog.FormID       := MedsInDlgFormId;
+          end;
         if Length(ResolvedDialog.ShowText)>0 then
           ResolvedDialog.QuickLevel   := 2;
@@ -452,6 +468,8 @@
   IVDisp   := DisplayGroupByName('IV RX');
   ClinDisp := DisplayGroupByName('C RX');
+  NurDisp  := DisplayGroupByName('NURS');
   CsltDisp := DisplayGroupByName('CSLT');
   ProcDisp := DisplayGroupByName('PROC');
+  ImgDisp  := DisplayGroupByName('XRAY');
   NonVADisp := DisplayGroupByName('NV RX');
   MedsInDlgIen  := DlgIENForName('PSJ OR PAT OE');
@@ -817,4 +835,5 @@
     ResolvedDialog.DisplayGroup := ClinDisp;
   ResetDialogProperties(AnID, AnEvent, ResolvedDialog);
+ {* AGP CHANGE 26.20 Remove restriction to allowed for ordering of inpatient medication for an inpatient from an outpatient location
    //jd imo change
    if (ResolvedDialog.DisplayGroup = InptDisp) and (Patient.Inpatient) and (AnEvent.EventIFN < 1) then
@@ -826,5 +845,5 @@
      end;
    end;
-   //jd imo change end
+   //jd imo change end  *}
    if (ResolvedDialog.DisplayGroup = InptDisp) or
       (ResolvedDialog.DisplayGroup = OutptDisp) or
@@ -865,4 +884,5 @@
     if NSSchedule then ResolvedDialog.QuickLevel := 0;
   end;
+  with ResolvedDialog do if (QuickLevel = QL_VERIFY) and (HasTemplateField(ShowText)) then QuickLevel := QL_DIALOG;
   with ResolvedDialog do
   begin
@@ -1003,5 +1023,4 @@
                        begin
                        ShowModal;
-                       //Application.ProcessMessages;
                        Result := uOrderDialog.AcceptOK;
                        uOrderDialog.Destroy;
@@ -1010,5 +1029,4 @@
                        begin
                        Show;
-                       //Application.ProcessMessages;
                        Result := True;
                        end;
@@ -1050,5 +1068,12 @@
   OrdList: TList;
   theOrder: TOrder;
-begin
+ // i: integer;
+begin
+ // if Assigned(OrdList) then
+ // begin
+ //    for i := 0 to pred(OrdList.Count) do
+ //       TObject(OrdList[i]).Free;
+  //   UBAGlobals.tempDxList := nil;
+ // end;
   OrdList := TList.Create;
   theOrder := TOrder.Create;
@@ -1057,4 +1082,5 @@
   RetrieveOrderFields(OrdList, 0, 0);
   Result := TOrder(OrdList.Items[0]).Text;
+  if Assigned(OrdList) then OrdList.Free; //CQ:7554
 end;
 
@@ -1349,5 +1375,5 @@
         param2 := FieldsForEditRenewOrder.StopTime;
       end;
-       UBAGlobals.SourceOrderID := AList[i]; //hds6265 added
+      UBAGlobals.SourceOrderID := AList[i]; //hds6265 added
       ExecuteChangeRenewedOrder(AList[i], param1, param2, txtOrder);
       AnOrder := TOrder.Create;
@@ -1393,5 +1419,5 @@
 var
   i: Integer;
-  xx,xy: string;
+  xx: string;
   IsIMOOD,ForIVAlso: boolean;
 begin
@@ -1602,4 +1628,9 @@
       Exit;
     end;
+    if Responses.OrderContainsObjects then
+    begin
+      InfoBox(TX_CANT_SAVE_QO, TC_NO_QUICK, MB_ICONERROR or MB_OK);
+      Exit;
+    end;
     SaveAsQuickOrder(Responses);
   end;
@@ -1639,5 +1670,5 @@
 
 
-procedure PrintOrdersOnSignRelease(OrderList: TStringList; Nature: Char);
+procedure PrintOrdersOnSignRelease(OrderList: TStringList; Nature: Char; PrintLoc : Integer =0);
 const
   TX_NEW_LOC1   = 'The patient''s location has changed to ';
@@ -1652,11 +1683,15 @@
   PrintIt: Boolean;
 begin
-  CurrentLocationForPatient(Patient.DFN, ALocation, AName, ASvc);
-  if (ALocation > 0) and (ALocation <> Encounter.Location) then
-  begin
-    Encounter.Location := ALocation;
-    if InfoBox(TX_NEW_LOC1 + AName + TX_NEW_LOC2, TC_NEW_LOC, MB_YESNO) = IDYES
-      then Encounter.Location := ALocation;
-  end;
+  if PrintLoc = 0 then
+    begin
+      CurrentLocationForPatient(Patient.DFN, ALocation, AName, ASvc);
+      if (ALocation > 0) and (ALocation <> Encounter.Location) then
+        begin
+          if InfoBox(TX_NEW_LOC1 + AName + TX_NEW_LOC2, TC_NEW_LOC, MB_YESNO) = IDYES
+          then Encounter.Location := ALocation;
+        end;
+    end
+  else
+    Encounter.Location := PrintLoc;
   if Encounter.Location = 0
     then Encounter.Location := CommonLocationForOrders(OrderList);
@@ -1747,5 +1782,5 @@
         if CharAt(AnID,1) = 'X' then actName := 'change';
         if CharAt(AnID,1) = 'C' then actName := 'copy';
-        x := 'You can not ' + actName + ' the clinical medication order.';
+        x := 'You cannot ' + actName + ' the clinical medication order.';
         x := RetrieveOrderText(Copy(AnID, 2, Length(AnID))) + #13#13#10 + x;
         UnlockOrder(Copy(AnID, 2, Length(AnID)));
@@ -1774,5 +1809,5 @@
       if (not AllowActionOnIMO(AnEventType)) then
       begin
-        x := 'You can not renew the the clinical medication order.';
+        x := 'You cannot renew the clinical medication order.';
         x := RetrieveOrderText(Piece(AnID,'^',2)) + #13#13#10 + x;
         UnlockOrder(Piece(AnID,'^',2));
@@ -1809,3 +1844,4 @@
   OriginalMedsInHeight    := 0;
   OriginalNonVAMedsHeight := 0;
+
 end.
Index: cprs/branches/foia-cprs/CPRS-Chart/README.TXT
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/README.TXT	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/README.TXT	(revision 460)
@@ -0,0 +1,72 @@
+5/9/2003
+========
+
+			   IMPORTANT NOTE
+	TO ALL SITES UTILIZING DELPHI CPRS GUI SOURCE CODE:
+
+A problem was found in Delphis ComServ.pas file which causes problems 
+with COM object registration during installation of an application 
+utilizing such objects.  This file explains the problem and the fix 
+for it.  
+
+EACH SITE MUST IMPLEMENT THIS FIX MANUALLY in order to compile CPRS.  
+
+You must have the Delphi Source code to implement this fix; it is 
+available only with Delphi Prossional or Delphi Enterprise (unknown: 
+Delphi Developer version?).  The assumption is that anyone involved 
+with local modifications will have a properly-licensed version.  
+
+After making the fix, DO NOT distribute the modified source code - anywhere.  
+
+Explanation:
+
+If you try to register Com objects as a Restricted User (not a Power User 
+or Administrator) on Win2000 or XP, ComServ.pas will always throw an unhandled 
+error during program initialization because you don't have write permissions 
+to the registry.
+
+The TComServer.Initialize code attempts to "squelch the exception unless 
+we were explicitly told to register."  But, it only traps the Ole 
+Registration Error and not the Ole Sys Error that was raised in 
+RegisterTypeLibrary from the OleCheck call.
+
+Two added lines were placed in the following code in the 
+TComServer.Initialize procedure of the ComServ.pas unit as a 
+workaround:
+
+procedure TComServer.Initialize;
+begin
+  try
+    UpdateRegistry(FStartMode <> smUnregServer);
+  except
+    on E: EOleRegistrationError do
+      // User may not have write access to the registry.
+      // Squelch the exception unless we were explicitly told to register.
+      if FStartMode = smRegServer then raise;
+    on E: EOleSysError do
+      if FStartMode = smRegServer then raise;
+  end;
+  if FStartMode in [smRegServer, smUnregServer] then Halt;
+  ComClassManager.ForEachFactory(Self, FactoryRegisterClassObject);
+end;
+
+To utilize this fix, copy the unit ComServ.pas into the CPRS-Chart 
+directory, rename it to uComServ.pas and then make the change above to 
+the TComServer.Initialize procedure of the new uComserv.pas file.  
+Then add uComServ.pas to the project.  Finally, change the "Uses" clause 
+of everything that used to use "ComServ" to "uComServ" instead -- currently, 
+this consists of the files uAccessibleListBox.pas, uAccessibleStringGrid.pas, 
+uAccessibleTreeNode.pas, and uAccessibleTreeView.pas.
+
+NOTE that a ComServ.pas file IS NOT included in this zip distribution.  
+You must create this file yourself (by copying and modifying) and place 
+it in the CPRS-Chart directory.  The four units listed above already 
+have uComServ in their Uses clauses (in place of the ComServ unit 
+formerly listed).
+
+This fix allows COM objects included with CPRS GUI to be registered on 
+an installation machine.  (Note that machines where disabled users 
+will utilize applications accessing those COM objects need to have a 
+Power User or Adminstrator user run the application one time (unless 
+the disabled user is already a Power User or Adminstrator user) before 
+ongoing usage.  
Index: cprs/branches/foia-cprs/CPRS-Chart/Templates/fTemplateDialog.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Templates/fTemplateDialog.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Templates/fTemplateDialog.dfm	(revision 460)
@@ -25,5 +25,5 @@
     Top = 0
     Width = 632
-    Height = 383
+    Height = 375
     VertScrollBar.Tracking = True
     Align = alClient
@@ -36,17 +36,14 @@
     TabOrder = 0
   end
-  object pnlBottom: TPanel
+  object pnlBottom: TScrollBox
     Left = 0
-    Top = 383
+    Top = 375
     Width = 632
-    Height = 30
+    Height = 38
     Align = alBottom
     TabOrder = 1
-    DesignSize = (
-      632
-      30)
     object lblFootnote: TStaticText
       Left = 196
-      Top = 9
+      Top = 7
       Width = 134
       Height = 17
@@ -57,8 +54,7 @@
     object btnCancel: TButton
       Left = 551
-      Top = 5
+      Top = 3
       Width = 75
       Height = 21
-      Anchors = [akTop, akRight]
       Cancel = True
       Caption = 'Cancel'
@@ -68,8 +64,7 @@
     object btnOK: TButton
       Left = 472
-      Top = 5
+      Top = 3
       Width = 75
       Height = 21
-      Anchors = [akTop, akRight]
       Caption = 'OK'
       ModalResult = 1
@@ -79,5 +74,5 @@
     object btnAll: TButton
       Left = 6
-      Top = 5
+      Top = 3
       Width = 75
       Height = 21
@@ -88,5 +83,5 @@
     object btnNone: TButton
       Left = 86
-      Top = 5
+      Top = 3
       Width = 75
       Height = 21
@@ -97,5 +92,5 @@
     object btnPreview: TButton
       Left = 360
-      Top = 5
+      Top = 3
       Width = 75
       Height = 21
Index: cprs/branches/foia-cprs/CPRS-Chart/Templates/fTemplateDialog.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Templates/fTemplateDialog.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Templates/fTemplateDialog.pas	(revision 460)
@@ -10,5 +10,5 @@
   TfrmTemplateDialog = class(TForm)
     sbMain: TScrollBox;
-    pnlBottom: TPanel;
+    pnlBottom: TScrollBox;
     btnCancel: TButton;
     btnOK: TButton;
@@ -42,4 +42,5 @@
     FCheck4Required: boolean;
     FSilent: boolean;
+    procedure SizeFormToCancelBtn();
     procedure ChkAll(Chk: boolean);
     procedure BuildCB(CBidx: integer; var Y: integer; FirstTime: boolean);
@@ -71,5 +72,5 @@
 implementation
 
-uses dShared, uConst, uTemplateFields, fRptBox, uInit;
+uses dShared, uConst, uTemplateFields, fRptBox, uInit, rMisc;
 
 {$R *.DFM}
@@ -391,6 +392,6 @@
 procedure TfrmTemplateDialog.BuildCB(CBidx: integer; var Y: integer; FirstTime: boolean);
 var
-  bGap, Indent, i, idx, idx2, p1, p2: integer;
-  EID, ID, PID, DlgProps, tmp, txt, tmpID, ObjID: string;
+  bGap, Indent, i, idx, p1, p2: integer;
+  EID, ID, PID, DlgProps, tmp, txt, tmpID: string;
   pctrl, ctrl: TControl;
   pnl: TPanel;
@@ -637,4 +638,6 @@
   ResizeAnchoredFormToFont(Self);
   FMaxPnlWidth := FontWidthPixel(sbMain.Font.Handle) * MAX_ENTRY_WIDTH; //AGP change Template Dialog to wrap at 80 instead of 74
+  SetFormPosition(Self);
+  SizeFormToCancelBtn();
 end;
 
@@ -738,4 +741,16 @@
 begin
   Application.OnShowHint := FOldHintEvent;
+  SaveUserBounds(Self);
+end;
+
+procedure TfrmTemplateDialog.SizeFormToCancelBtn;
+const
+  RIGHT_MARGIN = 12;
+var
+  minWidth : integer;
+begin
+  minWidth := btnCancel.Left + btnCancel.Width + RIGHT_MARGIN;
+  if minWidth > Self.Width then
+    Self.Width := minWidth;
 end;
 
Index: cprs/branches/foia-cprs/CPRS-Chart/Templates/uTemplateFields.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Templates/uTemplateFields.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Templates/uTemplateFields.pas	(revision 460)
@@ -918,5 +918,5 @@
       edt.Text := s;
   end;
-  edt.SelStart := edt.GetTextLen;
+  edt.SelStart := edt.GetTextLen;    
 end;
 
Index: cprs/branches/foia-cprs/CPRS-Chart/VERGENCECONTEXTORLib_TLB.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/VERGENCECONTEXTORLib_TLB.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/VERGENCECONTEXTORLib_TLB.pas	(revision 460)
@@ -12,11 +12,20 @@
 // ************************************************************************ //
 
-// PASTLWTR : $Revision:   1.130.1.0.1.0.1.6  $
-// File generated on 2/20/2003 12:37:40 PM from Type Library described below.
-
-// ************************************************************************  //
-// Type Lib: C:\Program Files\Sentillion\Sdk\WindowsComponents\VergenceContextor.dll (1)
-// LIBID: {30AFBABD-5FD3-11D3-8727-0060B0B5E137}
-// LCID: 0
+// PASTLWTR : $Revision:   1.88.1.0.1.0  $
+// File generated on 2/9/2004 9:12:53 AM from Type Library described below.
+
+// *************************************************************************//
+// NOTE:                                                                      
+// Items guarded by $IFDEF_LIVE_SERVER_AT_DESIGN_TIME are used by properties  
+// which return objects that may need to be explicitly created via a function 
+// call prior to any access via the property. These items have been disabled  
+// in order to prevent accidental use from within the object inspector. You   
+// may enable them by defining LIVE_SERVER_AT_DESIGN_TIME or by selectively   
+// removing them from the $IFDEF blocks. However, such items must still be    
+// programmatically created via a method of the appropriate CoClass before    
+// they can be used.                                                          
+// ************************************************************************ //
+// Type Lib: D:\Development\BDK32_p40\Source\VergenceContextor.dll (1)
+// IID\LCID: {30AFBABD-5FD3-11D3-8727-0060B0B5E137}\0
 // Helpfile: 
 // DepndLst: 
@@ -25,14 +34,14 @@
 // Errors:
 //   Hint: Member 'Set' of 'IResponseDialogAccessor' changed to 'Set_'
+//   Error creating palette bitmap of (TContextor) : Invalid GUID format
+//   Error creating palette bitmap of (TContextItemCollection) : Invalid GUID format
+//   Error creating palette bitmap of (TContextItem) : Invalid GUID format
+//   Error creating palette bitmap of (TResponseDialog) : Invalid GUID format
+//   Error creating palette bitmap of (TContextorParticipant) : Invalid GUID format
 // ************************************************************************ //
 {$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. 
-{$WARN SYMBOL_PLATFORM OFF}
-{$WRITEABLECONST ON}
-{$VARPROPSETTER ON}
 interface
 
-uses Windows, ActiveX, Classes, Graphics, OleCtrls, OleServer, StdVCL, Variants;
-  
-
+uses Windows, ActiveX, Classes, Graphics, OleServer, OleCtrls, StdVCL;
 
 // *********************************************************************//
@@ -162,13 +171,14 @@
     procedure Suspend; safecall;
     procedure Resume; safecall;
-    function Get_State: ContextorState; safecall;
-    function GetPrivilege(const subj: WideString): AccessPrivilege; safecall;
-    function Get_CurrentContext: IContextItemCollection; safecall;
+    function  Get_State: ContextorState; safecall;
+    function  GetPrivilege(const subj: WideString): AccessPrivilege; safecall;
+    function  Get_CurrentContext: IContextItemCollection; safecall;
     procedure StartContextChange; safecall;
-    function EndContextChange(commit: WordBool; const aContextItemCollection: IContextItemCollection): UserResponse; safecall;
+    function  EndContextChange(commit: WordBool; 
+                               const aContextItemCollection: IContextItemCollection): UserResponse; safecall;
     procedure SetSurveyResponse(const reason: WideString); safecall;
-    function Get_NotificationFilter: WideString; safecall;
+    function  Get_NotificationFilter: WideString; safecall;
     procedure Set_NotificationFilter(const filter: WideString); safecall;
-    function Get_Name: WideString; safecall;
+    function  Get_Name: WideString; safecall;
     property State: ContextorState read Get_State;
     property CurrentContext: IContextItemCollection read Get_CurrentContext;
@@ -189,8 +199,9 @@
     procedure Resume; dispid 3;
     property State: ContextorState readonly dispid 4;
-    function GetPrivilege(const subj: WideString): AccessPrivilege; dispid 5;
+    function  GetPrivilege(const subj: WideString): AccessPrivilege; dispid 5;
     property CurrentContext: IContextItemCollection readonly dispid 6;
     procedure StartContextChange; dispid 7;
-    function EndContextChange(commit: WordBool; const aContextItemCollection: IContextItemCollection): UserResponse; dispid 8;
+    function  EndContextChange(commit: WordBool; 
+                               const aContextItemCollection: IContextItemCollection): UserResponse; dispid 8;
     procedure SetSurveyResponse(const reason: WideString); dispid 9;
     property NotificationFilter: WideString dispid 10;
@@ -205,5 +216,5 @@
   IContextParticipant = interface(IDispatch)
     ['{3E3DD272-998E-11D0-808D-00A0240943E4}']
-    function ContextChangesPending(contextCoupon: Integer; var reason: WideString): WideString; safecall;
+    function  ContextChangesPending(contextCoupon: Integer; var reason: WideString): WideString; safecall;
     procedure ContextChangesAccepted(contextCoupon: Integer); safecall;
     procedure ContextChangesCanceled(contextCoupon: Integer); safecall;
@@ -219,5 +230,5 @@
   IContextParticipantDisp = dispinterface
     ['{3E3DD272-998E-11D0-808D-00A0240943E4}']
-    function ContextChangesPending(contextCoupon: Integer; var reason: WideString): WideString; dispid 1610743808;
+    function  ContextChangesPending(contextCoupon: Integer; var reason: WideString): WideString; dispid 1610743808;
     procedure ContextChangesAccepted(contextCoupon: Integer); dispid 1610743809;
     procedure ContextChangesCanceled(contextCoupon: Integer); dispid 1610743810;
@@ -233,11 +244,11 @@
   IContextItemCollection = interface(IDispatch)
     ['{AC4C0271-615A-11D3-84B5-0000861FDD4F}']
-    function Count: Integer; safecall;
+    function  Count: Integer; safecall;
     procedure Add(const aContextItem: IContextItem); safecall;
     procedure Remove(const contextItemName: WideString); safecall;
     procedure RemoveAll; safecall;
-    function Present(key: OleVariant): IContextItem; safecall;
-    function Get__NewEnum: IUnknown; safecall;
-    function Item(key: OleVariant): IContextItem; safecall;
+    function  Present(key: OleVariant): IContextItem; safecall;
+    function  Get__NewEnum: IUnknown; safecall;
+    function  Item(key: OleVariant): IContextItem; safecall;
     property _NewEnum: IUnknown read Get__NewEnum;
   end;
@@ -250,11 +261,11 @@
   IContextItemCollectionDisp = dispinterface
     ['{AC4C0271-615A-11D3-84B5-0000861FDD4F}']
-    function Count: Integer; dispid 1;
+    function  Count: Integer; dispid 1;
     procedure Add(const aContextItem: IContextItem); dispid 2;
     procedure Remove(const contextItemName: WideString); dispid 3;
     procedure RemoveAll; dispid 4;
-    function Present(key: OleVariant): IContextItem; dispid 5;
+    function  Present(key: OleVariant): IContextItem; dispid 5;
     property _NewEnum: IUnknown readonly dispid -4;
-    function Item(key: OleVariant): IContextItem; dispid 0;
+    function  Item(key: OleVariant): IContextItem; dispid 0;
   end;
 
@@ -266,17 +277,17 @@
   IContextItem = interface(IDispatch)
     ['{AC4C0273-615A-11D3-84B5-0000861FDD4F}']
-    function Get_Subject: WideString; safecall;
+    function  Get_Subject: WideString; safecall;
     procedure Set_Subject(const pVal: WideString); safecall;
-    function Get_Role: WideString; safecall;
+    function  Get_Role: WideString; safecall;
     procedure Set_Role(const pVal: WideString); safecall;
-    function Get_Prefix: WideString; safecall;
+    function  Get_Prefix: WideString; safecall;
     procedure Set_Prefix(const pVal: WideString); safecall;
-    function Get_Suffix: WideString; safecall;
+    function  Get_Suffix: WideString; safecall;
     procedure Set_Suffix(const pVal: WideString); safecall;
-    function Get_Name: WideString; safecall;
+    function  Get_Name: WideString; safecall;
     procedure Set_Name(const pVal: WideString); safecall;
-    function Get_Value: WideString; safecall;
+    function  Get_Value: WideString; safecall;
     procedure Set_Value(const pVal: WideString); safecall;
-    function Clone: IContextItem; safecall;
+    function  Clone: IContextItem; safecall;
     property Subject: WideString read Get_Subject write Set_Subject;
     property Role: WideString read Get_Role write Set_Role;
@@ -300,5 +311,5 @@
     property Name: WideString dispid 5;
     property Value: WideString dispid 6;
-    function Clone: IContextItem; dispid 7;
+    function  Clone: IContextItem; dispid 7;
   end;
 
@@ -311,7 +322,7 @@
     ['{CBC6D968-9F6D-416A-8AA7-99172E588DF0}']
     procedure StartResponseContextChange; safecall;
-    function EndResponseContextChange(commit: WordBool; 
-                                      const aContextItemCollection: IContextItemCollection; 
-                                      var noContinue: WordBool): OleVariant; safecall;
+    function  EndResponseContextChange(commit: WordBool; 
+                                       const aContextItemCollection: IContextItemCollection; 
+                                       var noContinue: WordBool): OleVariant; safecall;
     procedure CommitContextChange; safecall;
     procedure CancelContextChange; safecall;
@@ -326,7 +337,7 @@
     ['{CBC6D968-9F6D-416A-8AA7-99172E588DF0}']
     procedure StartResponseContextChange; dispid 1;
-    function EndResponseContextChange(commit: WordBool; 
-                                      const aContextItemCollection: IContextItemCollection; 
-                                      var noContinue: WordBool): OleVariant; dispid 2;
+    function  EndResponseContextChange(commit: WordBool; 
+                                       const aContextItemCollection: IContextItemCollection; 
+                                       var noContinue: WordBool): OleVariant; dispid 2;
     procedure CommitContextChange; dispid 3;
     procedure CancelContextChange; dispid 4;
@@ -386,5 +397,5 @@
   IResponseDialog = interface(IDispatch)
     ['{9D33ECF1-8277-11D3-8525-0000861FDD4F}']
-    function ProcessSurveyResults(responses: OleVariant; noContinue: WordBool): UserResponse; safecall;
+    function  ProcessSurveyResults(responses: OleVariant; noContinue: WordBool): UserResponse; safecall;
   end;
 
@@ -396,5 +407,5 @@
   IResponseDialogDisp = dispinterface
     ['{9D33ECF1-8277-11D3-8525-0000861FDD4F}']
-    function ProcessSurveyResults(responses: OleVariant; noContinue: WordBool): UserResponse; dispid 1;
+    function  ProcessSurveyResults(responses: OleVariant; noContinue: WordBool): UserResponse; dispid 1;
   end;
 
@@ -430,4 +441,93 @@
     class function CreateRemote(const MachineName: string): IContextor;
   end;
+
+  TContextorPending = procedure(Sender: TObject; var aContextItemCollection: OleVariant) of object;
+
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object    : TContextor
+// Help String      : Vergence Contextor
+// Default Interface: IContextor
+// Def. Intf. DISP? : No
+// Event   Interface: _IContextChangesSink
+// TypeFlags        : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+  TContextorProperties= class;
+{$ENDIF}
+  TContextor = class(TOleServer)
+  private
+    FOnPending: TContextorPending;
+    FOnCommitted: TNotifyEvent;
+    FOnCanceled: TNotifyEvent;
+    FIntf:        IContextor;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+    FProps:       TContextorProperties;
+    function      GetServerProperties: TContextorProperties;
+{$ENDIF}
+    function      GetDefaultInterface: IContextor;
+  protected
+    procedure InitServerData; override;
+    procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); override;
+    function  Get_State: ContextorState;
+    function  Get_CurrentContext: IContextItemCollection;
+    function  Get_NotificationFilter: WideString;
+    procedure Set_NotificationFilter(const filter: WideString);
+    function  Get_Name: WideString;
+  public
+    constructor Create(AOwner: TComponent); override;
+    destructor  Destroy; override;
+    procedure Connect; override;
+    procedure ConnectTo(svrIntf: IContextor);
+    procedure Disconnect; override;
+    procedure Run(const applicationLabel: WideString; const passcode: WideString; survey: WordBool; 
+                  const initialNotificationFilter: WideString);
+    procedure Suspend;
+    procedure Resume;
+    function  GetPrivilege(const subj: WideString): AccessPrivilege;
+    procedure StartContextChange;
+    function  EndContextChange(commit: WordBool; 
+                               const aContextItemCollection: IContextItemCollection): UserResponse;
+    procedure SetSurveyResponse(const reason: WideString);
+    property  DefaultInterface: IContextor read GetDefaultInterface;
+    property State: ContextorState read Get_State;
+    property CurrentContext: IContextItemCollection read Get_CurrentContext;
+    property Name: WideString read Get_Name;
+    property NotificationFilter: WideString read Get_NotificationFilter write Set_NotificationFilter;
+  published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+    property Server: TContextorProperties read GetServerProperties;
+{$ENDIF}
+    property OnPending: TContextorPending read FOnPending write FOnPending;
+    property OnCommitted: TNotifyEvent read FOnCommitted write FOnCommitted;
+    property OnCanceled: TNotifyEvent read FOnCanceled write FOnCanceled;
+  end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object    : TContextor
+// (This object is used by the IDE's Property Inspector to allow editing
+//  of the properties of this server)
+// *********************************************************************//
+ TContextorProperties = class(TPersistent)
+  private
+    FServer:    TContextor;
+    function    GetDefaultInterface: IContextor;
+    constructor Create(AServer: TContextor);
+  protected
+    function  Get_State: ContextorState;
+    function  Get_CurrentContext: IContextItemCollection;
+    function  Get_NotificationFilter: WideString;
+    procedure Set_NotificationFilter(const filter: WideString);
+    function  Get_Name: WideString;
+  public
+    property DefaultInterface: IContextor read GetDefaultInterface;
+  published
+    property NotificationFilter: WideString read Get_NotificationFilter write Set_NotificationFilter;
+  end;
+{$ENDIF}
+
 
 
@@ -453,5 +553,5 @@
     procedure CreateControl;
     procedure InitControlData; override;
-    function Get_CurrentContext: IContextItemCollection;
+    function  Get_CurrentContext: IContextItemCollection;
   public
     procedure Run(const applicationLabel: WideString; const passcode: WideString; survey: WordBool; 
@@ -459,7 +559,8 @@
     procedure Suspend;
     procedure Resume;
-    function GetPrivilege(const subj: WideString): AccessPrivilege;
+    function  GetPrivilege(const subj: WideString): AccessPrivilege;
     procedure StartContextChange;
-    function EndContextChange(commit: WordBool; const aContextItemCollection: IContextItemCollection): UserResponse;
+    function  EndContextChange(commit: WordBool; 
+                               const aContextItemCollection: IContextItemCollection): UserResponse;
     procedure SetSurveyResponse(const reason: WideString);
     property  ControlInterface: IContextor read GetControlInterface;
@@ -487,4 +588,69 @@
   end;
 
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object    : TContextItemCollection
+// Help String      : Vergence ContextItemCollection
+// Default Interface: IContextItemCollection
+// Def. Intf. DISP? : No
+// Event   Interface: 
+// TypeFlags        : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+  TContextItemCollectionProperties= class;
+{$ENDIF}
+  TContextItemCollection = class(TOleServer)
+  private
+    FIntf:        IContextItemCollection;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+    FProps:       TContextItemCollectionProperties;
+    function      GetServerProperties: TContextItemCollectionProperties;
+{$ENDIF}
+    function      GetDefaultInterface: IContextItemCollection;
+  protected
+    procedure InitServerData; override;
+    function  Get__NewEnum: IUnknown;
+  public
+    constructor Create(AOwner: TComponent); override;
+    destructor  Destroy; override;
+    procedure Connect; override;
+    procedure ConnectTo(svrIntf: IContextItemCollection);
+    procedure Disconnect; override;
+    function  Count: Integer;
+    procedure Add(const aContextItem: IContextItem);
+    procedure Remove(const contextItemName: WideString);
+    procedure RemoveAll;
+    function  Present(key: OleVariant): IContextItem;
+    function  Item(key: OleVariant): IContextItem;
+    property  DefaultInterface: IContextItemCollection read GetDefaultInterface;
+    property _NewEnum: IUnknown read Get__NewEnum;
+  published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+    property Server: TContextItemCollectionProperties read GetServerProperties;
+{$ENDIF}
+  end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object    : TContextItemCollection
+// (This object is used by the IDE's Property Inspector to allow editing
+//  of the properties of this server)
+// *********************************************************************//
+ TContextItemCollectionProperties = class(TPersistent)
+  private
+    FServer:    TContextItemCollection;
+    function    GetDefaultInterface: IContextItemCollection;
+    constructor Create(AServer: TContextItemCollection);
+  protected
+    function  Get__NewEnum: IUnknown;
+  public
+    property DefaultInterface: IContextItemCollection read GetDefaultInterface;
+  published
+  end;
+{$ENDIF}
+
+
 // *********************************************************************//
 // The Class CoContextItem provides a Create and CreateRemote method to          
@@ -499,4 +665,97 @@
   end;
 
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object    : TContextItem
+// Help String      : Vergence ContextItem
+// Default Interface: IContextItem
+// Def. Intf. DISP? : No
+// Event   Interface: 
+// TypeFlags        : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+  TContextItemProperties= class;
+{$ENDIF}
+  TContextItem = class(TOleServer)
+  private
+    FIntf:        IContextItem;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+    FProps:       TContextItemProperties;
+    function      GetServerProperties: TContextItemProperties;
+{$ENDIF}
+    function      GetDefaultInterface: IContextItem;
+  protected
+    procedure InitServerData; override;
+    function  Get_Subject: WideString;
+    procedure Set_Subject(const pVal: WideString);
+    function  Get_Role: WideString;
+    procedure Set_Role(const pVal: WideString);
+    function  Get_Prefix: WideString;
+    procedure Set_Prefix(const pVal: WideString);
+    function  Get_Suffix: WideString;
+    procedure Set_Suffix(const pVal: WideString);
+    function  Get_Name: WideString;
+    procedure Set_Name(const pVal: WideString);
+    function  Get_Value: WideString;
+    procedure Set_Value(const pVal: WideString);
+  public
+    constructor Create(AOwner: TComponent); override;
+    destructor  Destroy; override;
+    procedure Connect; override;
+    procedure ConnectTo(svrIntf: IContextItem);
+    procedure Disconnect; override;
+    function  Clone: IContextItem;
+    property  DefaultInterface: IContextItem read GetDefaultInterface;
+    property Subject: WideString read Get_Subject write Set_Subject;
+    property Role: WideString read Get_Role write Set_Role;
+    property Prefix: WideString read Get_Prefix write Set_Prefix;
+    property Suffix: WideString read Get_Suffix write Set_Suffix;
+    property Name: WideString read Get_Name write Set_Name;
+    property Value: WideString read Get_Value write Set_Value;
+  published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+    property Server: TContextItemProperties read GetServerProperties;
+{$ENDIF}
+  end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object    : TContextItem
+// (This object is used by the IDE's Property Inspector to allow editing
+//  of the properties of this server)
+// *********************************************************************//
+ TContextItemProperties = class(TPersistent)
+  private
+    FServer:    TContextItem;
+    function    GetDefaultInterface: IContextItem;
+    constructor Create(AServer: TContextItem);
+  protected
+    function  Get_Subject: WideString;
+    procedure Set_Subject(const pVal: WideString);
+    function  Get_Role: WideString;
+    procedure Set_Role(const pVal: WideString);
+    function  Get_Prefix: WideString;
+    procedure Set_Prefix(const pVal: WideString);
+    function  Get_Suffix: WideString;
+    procedure Set_Suffix(const pVal: WideString);
+    function  Get_Name: WideString;
+    procedure Set_Name(const pVal: WideString);
+    function  Get_Value: WideString;
+    procedure Set_Value(const pVal: WideString);
+  public
+    property DefaultInterface: IContextItem read GetDefaultInterface;
+  published
+    property Subject: WideString read Get_Subject write Set_Subject;
+    property Role: WideString read Get_Role write Set_Role;
+    property Prefix: WideString read Get_Prefix write Set_Prefix;
+    property Suffix: WideString read Get_Suffix write Set_Suffix;
+    property Name: WideString read Get_Name write Set_Name;
+    property Value: WideString read Get_Value write Set_Value;
+  end;
+{$ENDIF}
+
+
 // *********************************************************************//
 // The Class CoResponseDialog provides a Create and CreateRemote method to          
@@ -511,4 +770,61 @@
   end;
 
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object    : TResponseDialog
+// Help String      : Vergence ResponseDialog
+// Default Interface: IResponseDialog
+// Def. Intf. DISP? : No
+// Event   Interface: 
+// TypeFlags        : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+  TResponseDialogProperties= class;
+{$ENDIF}
+  TResponseDialog = class(TOleServer)
+  private
+    FIntf:        IResponseDialog;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+    FProps:       TResponseDialogProperties;
+    function      GetServerProperties: TResponseDialogProperties;
+{$ENDIF}
+    function      GetDefaultInterface: IResponseDialog;
+  protected
+    procedure InitServerData; override;
+  public
+    constructor Create(AOwner: TComponent); override;
+    destructor  Destroy; override;
+    procedure Connect; override;
+    procedure ConnectTo(svrIntf: IResponseDialog);
+    procedure Disconnect; override;
+    function  ProcessSurveyResults(responses: OleVariant; noContinue: WordBool): UserResponse;
+    property  DefaultInterface: IResponseDialog read GetDefaultInterface;
+  published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+    property Server: TResponseDialogProperties read GetServerProperties;
+{$ENDIF}
+  end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object    : TResponseDialog
+// (This object is used by the IDE's Property Inspector to allow editing
+//  of the properties of this server)
+// *********************************************************************//
+ TResponseDialogProperties = class(TPersistent)
+  private
+    FServer:    TResponseDialog;
+    function    GetDefaultInterface: IResponseDialog;
+    constructor Create(AServer: TResponseDialog);
+  protected
+  public
+    property DefaultInterface: IResponseDialog read GetDefaultInterface;
+  published
+  end;
+{$ENDIF}
+
+
 // *********************************************************************//
 // The Class CoContextorParticipant provides a Create and CreateRemote method to          
@@ -523,9 +839,67 @@
   end;
 
+
+// *********************************************************************//
+// OLE Server Proxy class declaration
+// Server Object    : TContextorParticipant
+// Help String      : ContextorParticipant Class
+// Default Interface: IContextParticipant
+// Def. Intf. DISP? : No
+// Event   Interface: 
+// TypeFlags        : (2) CanCreate
+// *********************************************************************//
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+  TContextorParticipantProperties= class;
+{$ENDIF}
+  TContextorParticipant = class(TOleServer)
+  private
+    FIntf:        IContextParticipant;
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+    FProps:       TContextorParticipantProperties;
+    function      GetServerProperties: TContextorParticipantProperties;
+{$ENDIF}
+    function      GetDefaultInterface: IContextParticipant;
+  protected
+    procedure InitServerData; override;
+  public
+    constructor Create(AOwner: TComponent); override;
+    destructor  Destroy; override;
+    procedure Connect; override;
+    procedure ConnectTo(svrIntf: IContextParticipant);
+    procedure Disconnect; override;
+    function  ContextChangesPending(contextCoupon: Integer; var reason: WideString): WideString;
+    procedure ContextChangesAccepted(contextCoupon: Integer);
+    procedure ContextChangesCanceled(contextCoupon: Integer);
+    procedure CommonContextTerminated;
+    procedure Ping;
+    property  DefaultInterface: IContextParticipant read GetDefaultInterface;
+  published
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+    property Server: TContextorParticipantProperties read GetServerProperties;
+{$ENDIF}
+  end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+// *********************************************************************//
+// OLE Server Properties Proxy Class
+// Server Object    : TContextorParticipant
+// (This object is used by the IDE's Property Inspector to allow editing
+//  of the properties of this server)
+// *********************************************************************//
+ TContextorParticipantProperties = class(TPersistent)
+  private
+    FServer:    TContextorParticipant;
+    function    GetDefaultInterface: IContextParticipant;
+    constructor Create(AServer: TContextorParticipant);
+  protected
+  public
+    property DefaultInterface: IContextParticipant read GetDefaultInterface;
+  published
+  end;
+{$ENDIF}
+
+{
 procedure Register;
-
-resourcestring
-  dtlServerPage = 'ActiveX';
-
+}
 implementation
 
@@ -541,4 +915,189 @@
   Result := CreateRemoteComObject(MachineName, CLASS_Contextor) as IContextor;
 end;
+
+procedure TContextor.InitServerData;
+const
+  CServerData: TServerData = (
+    ClassID:   '{D5C9CC98-5FDB-11D3-8727-0060B0B5E137}';
+    IntfIID:   '{8D879F5D-5FE6-11D3-8727-0060B0B5E137}';
+    EventIID:  '{6BED8971-B3DD-11D3-8736-0060B0B5E137}';
+    LicenseKey: nil;
+    Version: 500);
+begin
+  ServerData := @CServerData;
+end;
+
+procedure TContextor.Connect;
+var
+  punk: IUnknown;
+begin
+  if FIntf = nil then
+  begin
+    punk := GetServer;
+    ConnectEvents(punk);
+    Fintf:= punk as IContextor;
+  end;
+end;
+
+procedure TContextor.ConnectTo(svrIntf: IContextor);
+begin
+  Disconnect;
+  FIntf := svrIntf;
+  ConnectEvents(FIntf);
+end;
+
+procedure TContextor.DisConnect;
+begin
+  if Fintf <> nil then
+  begin
+    DisconnectEvents(FIntf);
+    FIntf := nil;
+  end;
+end;
+
+function TContextor.GetDefaultInterface: IContextor;
+begin
+  if FIntf = nil then
+    Connect;
+  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+  Result := FIntf;
+end;
+
+constructor TContextor.Create(AOwner: TComponent);
+begin
+  inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+  FProps := TContextorProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TContextor.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+  FProps.Free;
+{$ENDIF}
+  inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TContextor.GetServerProperties: TContextorProperties;
+begin
+  Result := FProps;
+end;
+{$ENDIF}
+
+procedure TContextor.InvokeEvent(DispID: TDispID; var Params: TVariantArray);
+begin
+  case DispID of
+    -1: Exit;  // DISPID_UNKNOWN
+   1: if Assigned(FOnPending) then
+            FOnPending(Self, Params[0] {const IDispatch});
+   2: if Assigned(FOnCommitted) then
+            FOnCommitted(Self);
+   3: if Assigned(FOnCanceled) then
+            FOnCanceled(Self);
+  end; {case DispID}
+end;
+
+function  TContextor.Get_State: ContextorState;
+begin
+  Result := DefaultInterface.Get_State;
+end;
+
+function  TContextor.Get_CurrentContext: IContextItemCollection;
+begin
+  Result := DefaultInterface.Get_CurrentContext;
+end;
+
+function  TContextor.Get_NotificationFilter: WideString;
+begin
+  Result := DefaultInterface.Get_NotificationFilter;
+end;
+
+procedure TContextor.Set_NotificationFilter(const filter: WideString);
+begin
+  DefaultInterface.Set_NotificationFilter(filter);
+end;
+
+function  TContextor.Get_Name: WideString;
+begin
+  Result := DefaultInterface.Get_Name;
+end;
+
+procedure TContextor.Run(const applicationLabel: WideString; const passcode: WideString; 
+                         survey: WordBool; const initialNotificationFilter: WideString);
+begin
+  DefaultInterface.Run(applicationLabel, passcode, survey, initialNotificationFilter);
+end;
+
+procedure TContextor.Suspend;
+begin
+  DefaultInterface.Suspend;
+end;
+
+procedure TContextor.Resume;
+begin
+  DefaultInterface.Resume;
+end;
+
+function  TContextor.GetPrivilege(const subj: WideString): AccessPrivilege;
+begin
+  Result := DefaultInterface.GetPrivilege(subj);
+end;
+
+procedure TContextor.StartContextChange;
+begin
+  DefaultInterface.StartContextChange;
+end;
+
+function  TContextor.EndContextChange(commit: WordBool; 
+                                      const aContextItemCollection: IContextItemCollection): UserResponse;
+begin
+  Result := DefaultInterface.EndContextChange(commit, aContextItemCollection);
+end;
+
+procedure TContextor.SetSurveyResponse(const reason: WideString);
+begin
+  DefaultInterface.SetSurveyResponse(reason);
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TContextorProperties.Create(AServer: TContextor);
+begin
+  inherited Create;
+  FServer := AServer;
+end;
+
+function TContextorProperties.GetDefaultInterface: IContextor;
+begin
+  Result := FServer.DefaultInterface;
+end;
+
+function  TContextorProperties.Get_State: ContextorState;
+begin
+  Result := DefaultInterface.Get_State;
+end;
+
+function  TContextorProperties.Get_CurrentContext: IContextItemCollection;
+begin
+  Result := DefaultInterface.Get_CurrentContext;
+end;
+
+function  TContextorProperties.Get_NotificationFilter: WideString;
+begin
+  Result := DefaultInterface.Get_NotificationFilter;
+end;
+
+procedure TContextorProperties.Set_NotificationFilter(const filter: WideString);
+begin
+  DefaultInterface.Set_NotificationFilter(filter);
+end;
+
+function  TContextorProperties.Get_Name: WideString;
+begin
+  Result := DefaultInterface.Get_Name;
+end;
+
+{$ENDIF}
 
 procedure TContextorControl.InitControlData;
@@ -576,7 +1135,7 @@
 end;
 
-function TContextorControl.Get_CurrentContext: IContextItemCollection;
-begin
-    Result := DefaultInterface.CurrentContext;
+function  TContextorControl.Get_CurrentContext: IContextItemCollection;
+begin
+  Result := DefaultInterface.Get_CurrentContext;
 end;
 
@@ -597,5 +1156,5 @@
 end;
 
-function TContextorControl.GetPrivilege(const subj: WideString): AccessPrivilege;
+function  TContextorControl.GetPrivilege(const subj: WideString): AccessPrivilege;
 begin
   Result := DefaultInterface.GetPrivilege(subj);
@@ -607,6 +1166,6 @@
 end;
 
-function TContextorControl.EndContextChange(commit: WordBool; 
-                                            const aContextItemCollection: IContextItemCollection): UserResponse;
+function  TContextorControl.EndContextChange(commit: WordBool; 
+                                             const aContextItemCollection: IContextItemCollection): UserResponse;
 begin
   Result := DefaultInterface.EndContextChange(commit, aContextItemCollection);
@@ -628,4 +1187,126 @@
 end;
 
+procedure TContextItemCollection.InitServerData;
+const
+  CServerData: TServerData = (
+    ClassID:   '{AC4C0272-615A-11D3-84B5-0000861FDD4F}';
+    IntfIID:   '{AC4C0271-615A-11D3-84B5-0000861FDD4F}';
+    EventIID:  '';
+    LicenseKey: nil;
+    Version: 500);
+begin
+  ServerData := @CServerData;
+end;
+
+procedure TContextItemCollection.Connect;
+var
+  punk: IUnknown;
+begin
+  if FIntf = nil then
+  begin
+    punk := GetServer;
+    Fintf:= punk as IContextItemCollection;
+  end;
+end;
+
+procedure TContextItemCollection.ConnectTo(svrIntf: IContextItemCollection);
+begin
+  Disconnect;
+  FIntf := svrIntf;
+end;
+
+procedure TContextItemCollection.DisConnect;
+begin
+  if Fintf <> nil then
+  begin
+    FIntf := nil;
+  end;
+end;
+
+function TContextItemCollection.GetDefaultInterface: IContextItemCollection;
+begin
+  if FIntf = nil then
+    Connect;
+  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+  Result := FIntf;
+end;
+
+constructor TContextItemCollection.Create(AOwner: TComponent);
+begin
+  inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+  FProps := TContextItemCollectionProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TContextItemCollection.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+  FProps.Free;
+{$ENDIF}
+  inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TContextItemCollection.GetServerProperties: TContextItemCollectionProperties;
+begin
+  Result := FProps;
+end;
+{$ENDIF}
+
+function  TContextItemCollection.Get__NewEnum: IUnknown;
+begin
+  Result := DefaultInterface.Get__NewEnum;
+end;
+
+function  TContextItemCollection.Count: Integer;
+begin
+  Result := DefaultInterface.Count;
+end;
+
+procedure TContextItemCollection.Add(const aContextItem: IContextItem);
+begin
+  DefaultInterface.Add(aContextItem);
+end;
+
+procedure TContextItemCollection.Remove(const contextItemName: WideString);
+begin
+  DefaultInterface.Remove(contextItemName);
+end;
+
+procedure TContextItemCollection.RemoveAll;
+begin
+  DefaultInterface.RemoveAll;
+end;
+
+function  TContextItemCollection.Present(key: OleVariant): IContextItem;
+begin
+  Result := DefaultInterface.Present(key);
+end;
+
+function  TContextItemCollection.Item(key: OleVariant): IContextItem;
+begin
+  Result := DefaultInterface.Item(key);
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TContextItemCollectionProperties.Create(AServer: TContextItemCollection);
+begin
+  inherited Create;
+  FServer := AServer;
+end;
+
+function TContextItemCollectionProperties.GetDefaultInterface: IContextItemCollection;
+begin
+  Result := FServer.DefaultInterface;
+end;
+
+function  TContextItemCollectionProperties.Get__NewEnum: IUnknown;
+begin
+  Result := DefaultInterface.Get__NewEnum;
+end;
+
+{$ENDIF}
+
 class function CoContextItem.Create: IContextItem;
 begin
@@ -638,4 +1319,211 @@
 end;
 
+procedure TContextItem.InitServerData;
+const
+  CServerData: TServerData = (
+    ClassID:   '{AC4C0274-615A-11D3-84B5-0000861FDD4F}';
+    IntfIID:   '{AC4C0273-615A-11D3-84B5-0000861FDD4F}';
+    EventIID:  '';
+    LicenseKey: nil;
+    Version: 500);
+begin
+  ServerData := @CServerData;
+end;
+
+procedure TContextItem.Connect;
+var
+  punk: IUnknown;
+begin
+  if FIntf = nil then
+  begin
+    punk := GetServer;
+    Fintf:= punk as IContextItem;
+  end;
+end;
+
+procedure TContextItem.ConnectTo(svrIntf: IContextItem);
+begin
+  Disconnect;
+  FIntf := svrIntf;
+end;
+
+procedure TContextItem.DisConnect;
+begin
+  if Fintf <> nil then
+  begin
+    FIntf := nil;
+  end;
+end;
+
+function TContextItem.GetDefaultInterface: IContextItem;
+begin
+  if FIntf = nil then
+    Connect;
+  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+  Result := FIntf;
+end;
+
+constructor TContextItem.Create(AOwner: TComponent);
+begin
+  inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+  FProps := TContextItemProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TContextItem.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+  FProps.Free;
+{$ENDIF}
+  inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TContextItem.GetServerProperties: TContextItemProperties;
+begin
+  Result := FProps;
+end;
+{$ENDIF}
+
+function  TContextItem.Get_Subject: WideString;
+begin
+  Result := DefaultInterface.Get_Subject;
+end;
+
+procedure TContextItem.Set_Subject(const pVal: WideString);
+begin
+  DefaultInterface.Set_Subject(pVal);
+end;
+
+function  TContextItem.Get_Role: WideString;
+begin
+  Result := DefaultInterface.Get_Role;
+end;
+
+procedure TContextItem.Set_Role(const pVal: WideString);
+begin
+  DefaultInterface.Set_Role(pVal);
+end;
+
+function  TContextItem.Get_Prefix: WideString;
+begin
+  Result := DefaultInterface.Get_Prefix;
+end;
+
+procedure TContextItem.Set_Prefix(const pVal: WideString);
+begin
+  DefaultInterface.Set_Prefix(pVal);
+end;
+
+function  TContextItem.Get_Suffix: WideString;
+begin
+  Result := DefaultInterface.Get_Suffix;
+end;
+
+procedure TContextItem.Set_Suffix(const pVal: WideString);
+begin
+  DefaultInterface.Set_Suffix(pVal);
+end;
+
+function  TContextItem.Get_Name: WideString;
+begin
+  Result := DefaultInterface.Get_Name;
+end;
+
+procedure TContextItem.Set_Name(const pVal: WideString);
+begin
+  DefaultInterface.Set_Name(pVal);
+end;
+
+function  TContextItem.Get_Value: WideString;
+begin
+  Result := DefaultInterface.Get_Value;
+end;
+
+procedure TContextItem.Set_Value(const pVal: WideString);
+begin
+  DefaultInterface.Set_Value(pVal);
+end;
+
+function  TContextItem.Clone: IContextItem;
+begin
+  Result := DefaultInterface.Clone;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TContextItemProperties.Create(AServer: TContextItem);
+begin
+  inherited Create;
+  FServer := AServer;
+end;
+
+function TContextItemProperties.GetDefaultInterface: IContextItem;
+begin
+  Result := FServer.DefaultInterface;
+end;
+
+function  TContextItemProperties.Get_Subject: WideString;
+begin
+  Result := DefaultInterface.Get_Subject;
+end;
+
+procedure TContextItemProperties.Set_Subject(const pVal: WideString);
+begin
+  DefaultInterface.Set_Subject(pVal);
+end;
+
+function  TContextItemProperties.Get_Role: WideString;
+begin
+  Result := DefaultInterface.Get_Role;
+end;
+
+procedure TContextItemProperties.Set_Role(const pVal: WideString);
+begin
+  DefaultInterface.Set_Role(pVal);
+end;
+
+function  TContextItemProperties.Get_Prefix: WideString;
+begin
+  Result := DefaultInterface.Get_Prefix;
+end;
+
+procedure TContextItemProperties.Set_Prefix(const pVal: WideString);
+begin
+  DefaultInterface.Set_Prefix(pVal);
+end;
+
+function  TContextItemProperties.Get_Suffix: WideString;
+begin
+  Result := DefaultInterface.Get_Suffix;
+end;
+
+procedure TContextItemProperties.Set_Suffix(const pVal: WideString);
+begin
+  DefaultInterface.Set_Suffix(pVal);
+end;
+
+function  TContextItemProperties.Get_Name: WideString;
+begin
+  Result := DefaultInterface.Get_Name;
+end;
+
+procedure TContextItemProperties.Set_Name(const pVal: WideString);
+begin
+  DefaultInterface.Set_Name(pVal);
+end;
+
+function  TContextItemProperties.Get_Value: WideString;
+begin
+  Result := DefaultInterface.Get_Value;
+end;
+
+procedure TContextItemProperties.Set_Value(const pVal: WideString);
+begin
+  DefaultInterface.Set_Value(pVal);
+end;
+
+{$ENDIF}
+
 class function CoResponseDialog.Create: IResponseDialog;
 begin
@@ -648,4 +1536,91 @@
 end;
 
+procedure TResponseDialog.InitServerData;
+const
+  CServerData: TServerData = (
+    ClassID:   '{9D33ECF2-8277-11D3-8525-0000861FDD4F}';
+    IntfIID:   '{9D33ECF1-8277-11D3-8525-0000861FDD4F}';
+    EventIID:  '';
+    LicenseKey: nil;
+    Version: 500);
+begin
+  ServerData := @CServerData;
+end;
+
+procedure TResponseDialog.Connect;
+var
+  punk: IUnknown;
+begin
+  if FIntf = nil then
+  begin
+    punk := GetServer;
+    Fintf:= punk as IResponseDialog;
+  end;
+end;
+
+procedure TResponseDialog.ConnectTo(svrIntf: IResponseDialog);
+begin
+  Disconnect;
+  FIntf := svrIntf;
+end;
+
+procedure TResponseDialog.DisConnect;
+begin
+  if Fintf <> nil then
+  begin
+    FIntf := nil;
+  end;
+end;
+
+function TResponseDialog.GetDefaultInterface: IResponseDialog;
+begin
+  if FIntf = nil then
+    Connect;
+  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+  Result := FIntf;
+end;
+
+constructor TResponseDialog.Create(AOwner: TComponent);
+begin
+  inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+  FProps := TResponseDialogProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TResponseDialog.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+  FProps.Free;
+{$ENDIF}
+  inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TResponseDialog.GetServerProperties: TResponseDialogProperties;
+begin
+  Result := FProps;
+end;
+{$ENDIF}
+
+function  TResponseDialog.ProcessSurveyResults(responses: OleVariant; noContinue: WordBool): UserResponse;
+begin
+  Result := DefaultInterface.ProcessSurveyResults(responses, noContinue);
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TResponseDialogProperties.Create(AServer: TResponseDialog);
+begin
+  inherited Create;
+  FServer := AServer;
+end;
+
+function TResponseDialogProperties.GetDefaultInterface: IResponseDialog;
+begin
+  Result := FServer.DefaultInterface;
+end;
+
+{$ENDIF}
+
 class function CoContextorParticipant.Create: IContextParticipant;
 begin
@@ -658,8 +1633,117 @@
 end;
 
+procedure TContextorParticipant.InitServerData;
+const
+  CServerData: TServerData = (
+    ClassID:   '{4BA034A2-D0FA-11D3-818B-0050049598B2}';
+    IntfIID:   '{3E3DD272-998E-11D0-808D-00A0240943E4}';
+    EventIID:  '';
+    LicenseKey: nil;
+    Version: 500);
+begin
+  ServerData := @CServerData;
+end;
+
+procedure TContextorParticipant.Connect;
+var
+  punk: IUnknown;
+begin
+  if FIntf = nil then
+  begin
+    punk := GetServer;
+    Fintf:= punk as IContextParticipant;
+  end;
+end;
+
+procedure TContextorParticipant.ConnectTo(svrIntf: IContextParticipant);
+begin
+  Disconnect;
+  FIntf := svrIntf;
+end;
+
+procedure TContextorParticipant.DisConnect;
+begin
+  if Fintf <> nil then
+  begin
+    FIntf := nil;
+  end;
+end;
+
+function TContextorParticipant.GetDefaultInterface: IContextParticipant;
+begin
+  if FIntf = nil then
+    Connect;
+  Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
+  Result := FIntf;
+end;
+
+constructor TContextorParticipant.Create(AOwner: TComponent);
+begin
+  inherited Create(AOwner);
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+  FProps := TContextorParticipantProperties.Create(Self);
+{$ENDIF}
+end;
+
+destructor TContextorParticipant.Destroy;
+begin
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+  FProps.Free;
+{$ENDIF}
+  inherited Destroy;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+function TContextorParticipant.GetServerProperties: TContextorParticipantProperties;
+begin
+  Result := FProps;
+end;
+{$ENDIF}
+
+function  TContextorParticipant.ContextChangesPending(contextCoupon: Integer; var reason: WideString): WideString;
+begin
+  Result := DefaultInterface.ContextChangesPending(contextCoupon, reason);
+end;
+
+procedure TContextorParticipant.ContextChangesAccepted(contextCoupon: Integer);
+begin
+  DefaultInterface.ContextChangesAccepted(contextCoupon);
+end;
+
+procedure TContextorParticipant.ContextChangesCanceled(contextCoupon: Integer);
+begin
+  DefaultInterface.ContextChangesCanceled(contextCoupon);
+end;
+
+procedure TContextorParticipant.CommonContextTerminated;
+begin
+  DefaultInterface.CommonContextTerminated;
+end;
+
+procedure TContextorParticipant.Ping;
+begin
+  DefaultInterface.Ping;
+end;
+
+{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
+constructor TContextorParticipantProperties.Create(AServer: TContextorParticipant);
+begin
+  inherited Create;
+  FServer := AServer;
+end;
+
+function TContextorParticipantProperties.GetDefaultInterface: IContextParticipant;
+begin
+  Result := FServer.DefaultInterface;
+end;
+
+{$ENDIF}
+{
 procedure Register;
 begin
-  RegisterComponents('ActiveX',[TContextorControl]);
-end;
-
+  RegisterComponents('Kernel',[TContextorControl]);
+  RegisterComponents('Kernel',[TContextor, TContextItemCollection, TContextItem, TResponseDialog,
+    TContextorParticipant]);
+end;
+}
 end.
Index: cprs/branches/foia-cprs/CPRS-Chart/Vitals/uVitals.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/Vitals/uVitals.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/Vitals/uVitals.pas	(revision 460)
@@ -5,5 +5,7 @@
 
 uses
-  SysUtils, Dialogs, Controls, Windows, Classes, ORClasses, ORCtrls, ORFn, Forms;
+  SysUtils, Dialogs, Controls, Windows, Classes, ORClasses, ORCtrls, ORFn, Forms
+  , TRPCB
+  ;
 
 const
@@ -32,6 +34,7 @@
 procedure SetVitalsMetric(const Value: boolean);
 procedure SetVitCVPmmHg(const Value: boolean);
-function ValidVitalsDate(var ADate: TFMDateTime; SkipFirst: boolean = FALSE): boolean;
+function ValidVitalsDate(var ADate: TFMDateTime; SkipFirst: boolean = FALSE; Show: boolean = true): boolean;
 function IsNumericWeight(const x: string): Boolean;
+procedure CloseVitalsDLL;
 
 const
@@ -77,6 +80,53 @@
   VitalLocationStr = 'VST^HL^';
 
+  SHARE_DIR = '\VISTA\Common Files\';
+  GMV_CONTEXT = 'OR CPRS GUI CHART';
+  GMV_APP_SIGNATURE = 'CPRS';
+  GMV_DEFAULT_TEMPLATE = '';
+
 type
   VitalTags = TAG_VITBP..TAG_VITPAIN;
+
+  TGMV_VitalsEnterForm = function(
+        aBroker:TRPCBroker;
+        aPatient, aLocation, aTemplate,aSignature:String;
+        aDateTime:TDateTime): TCustomForm; stdcall;
+
+  TGMV_VitalsEnterDLG = function(
+        aBroker:TRPCBroker;
+        aDFN, aLocation, aTemplate,aSignature:String;
+        aDateTime:TDateTime;
+        aName,anInfo:String): Integer; stdcall;
+
+  TGFM_VitalsViewDLG = function(
+        aBroker:TRPCBroker;
+        aDFN, aLocation,
+        DateStart, DateStop,
+        aSignature,
+        aContextIn,aContextOut,
+        aName,anInfo,aHospitalName:String): Integer; stdcall;
+
+  TGMV_VitalsViewForm = function(
+        aBroker:TRPCBroker;
+        aDFN, aLocation,
+        DateStart, DateStop,
+        aSignature,
+        aContextIn,aContextOut,
+        aName,anInfo,
+        aDynamicParameter {HospitolName^Vital Type Abbreviation} :String): TCustomForm; stdcall;
+
+  TGMV_LatestVitalsList = function (
+        aBroker:TRPCBroker;
+        aDFN,
+        aDelim:String;
+        bSilent:Boolean
+        ): TStringList; stdcall;
+
+  TGMV_VitalsExit = Procedure;
+
+var
+  VitalsDLLHandle : THandle;
+  DLLForceClose : Boolean = False;
+
 
 const
@@ -128,7 +178,20 @@
 uses
   uCore, rCore, rVitals, Contnrs, mVitBase, mVitMetric, fVitalsDate;
-
+  
 var
   uVitalFrames: TComponentList = nil;
+
+procedure CloseVitalsDLL;
+var
+  VitalsExit : TGMV_VitalsExit;
+begin
+  if VitalsDLLHandle <> 0 then
+  begin
+    @VitalsExit := GetProcAddress(VitalsDLLHandle,PChar('GMV_VitalsExit'));
+    if assigned(VitalsExit) then
+      VitalsExit();
+    DLLForceClose := True;
+  end;
+end;
 
 function VitalErrorText(VType: TVitalType): string;
@@ -545,5 +608,6 @@
 end;
 
-function ValidVitalsDate(var ADate: TFMDateTime; SkipFirst: boolean = FALSE): boolean;
+
+function ValidVitalsDate(var ADate: TFMDateTime; SkipFirst: boolean = FALSE; Show: boolean = true): boolean;   //AGP Change 26.1
 var
   frmVitalsDate: TfrmVitalsDate;
@@ -571,4 +635,5 @@
       try
         frmVitalsDate.dteVitals.FMDateTime := ADate;
+        frmVitalsDate.btnNow.Visible := Show; //AGP Change 26.1
         if frmVitalsDate.ShowModal = mrOK then
           ADate := frmVitalsDate.dteVitals.FMDateTime;
@@ -581,4 +646,5 @@
   end;
 end;
+
 function IsNumericWeight(const x: string): Boolean;
 var
Index: cprs/branches/foia-cprs/CPRS-Chart/dShared.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/dShared.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/dShared.dfm	(revision 460)
@@ -14,582 +14,1158 @@
     Bitmap = {
       494C01011E002200040010001000FFFFFF00FF10FFFFFFFFFFFFFFFF424D3600
-      0000000000003600000028000000400000009000000001001000000000000048
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000FF7F000000000000000000000000
-      00000000000000000000000000000000FF7FFF7F00000000000000000000007C
-      007C007C007C00000000000000000000FF7F0000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000FF7F104218631863186318631863
-      18631863186318631863186318630000FF7FFF7F104218631863007C007C007C
-      007C007C007C007C007C186318630000FF7F0000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000FF7F10421863FF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7F18630000FF7FFF7F10421863007C007CFF7FFF7F
-      FF7FFF7FFF7FFF7F007C007C18630000FF7F0000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000FF7F10421863FF7F18630040FF7F
-      FF7FFF7F1863FF7FFF7FFF7F18630000FF7FFF7F1042007C007C007C007CFF7F
-      FF7FFF7F1863FF7FFF7F007C007C0000FF7F0000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000FF7F10421863FF7F0040007C0040
-      FF7FFF7F1F001F001863FF7F18630000FF7FFF7F1042007C007CFF7F007C007C
-      FF7FFF7F1F001F001863007C007C0000FF7F0000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000FF7F10421863FF7F007CE07F0040
-      FF7FFF7FFF031F001F00FF7F18630000FF7FFF7F007C007CFF7F007CFF7F007C
-      007CFF7FFF031F001F00FF7F007C007CFF7F0000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000FF7F10421863FF7FFF7F007C0040
-      FF7FFF7F1F00FF7FFF7FFF7F18630000FF7FFF7F007C007CFF7FFF7F007CFF7F
-      007C007CFF7FFF7FFF7FFF7F007C007CFF7F0000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000FF7F10421863FF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7F18630000FF7FFF7F007C007CFF7FFF7FFF7FFF7F
-      FF7F007C007CFF7FFF7FFF7F007C007CFF7F0000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000FF7F104218631863186318631863
-      18631863186318631863186318630000FF7FFF7F1042007C007C186318631863
-      1863FF7F007C007C1863007C007C0000FF7F0000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000FF7F104218631000100010001000
-      10001000000000000000000018630000FF7FFF7F1042007C007C100010001000
-      10001000FF7F007C007C007C007C0000FF7F0000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000FF7F104218631000100010001000
-      10001000FF7F0000FF7F000018630000FF7FFF7F10421863007C007C10001000
-      10001000FF7FFF7F007C007C18630000FF7F0000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000FF7F104218631863186318631863
-      18631863186318631863186318630000FF7FFF7F104218631863007C007C007C
-      007C007C007C007C007C186318630000FF7F0000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000FF7F104210421042104210421042
-      10421042104210421042104210420000FF7FFF7F10421042104210421042007C
-      007C007C007C10421042104210420000FF7F0000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000FF7F000000000000000000000000
-      0000000000000000FF7FFF7FFF7FFF7FFF7FFF7F000000000000000000000000
-      0000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7F0000000000000000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      0000000000000000000000000000000000000000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07F0000FF7FFF7FFF7FFF7FFF7F00000000E07F1863E07F1863E07F
-      1863E07F1863E07F0000FF7FFF7FFF7FFF7FFF7F104210421863FF7F10421042
-      00000042E07FE07FE07FE07FE07F00420000FF7F104210421863FF7F10421042
-      0000E07FE07FE07FE07FE07FE07FE07F00000000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7F0000FF7FFF7FFF7FFF7FFF7F0000E07F0000E07F1863E07F1863
-      E07F1863E07F1863E07F0000FF7FFF7FFF7FFF7FFF7FFF7F1042104210421863
-      000018631863186318631863186318630000FF7FFF7FFF7F1042104210421863
-      0000186318631863186318631863186300000000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07F0000000000000000000000000000FF7FE07F0000E07F1863E07F
-      1863E07F1863E07F1863E07F000000000000FF7FFF7F1042104218631863FF7F
-      000018631042000018631863000018630000FF7FFF7F1042104218631863FF7F
-      0000186310420000186318630000186300000000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7F0000104210421042104200000000E07FFF7F0000000000000000
-      000000000000000000000000000010420000FF7FFF7F10421863186310421863
-      000018630000000000001863186318630000FF7FFF7F10421863186310421863
-      0000186300000000000018631863186300000000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07F0000104210421042104200000000FF7FE07F0000104210421042
-      104210421042104210421042104210420000FF7F1042FF7F1863FF7F18631042
-      000018631863186300001863000018630000FF7F1042FF7F1863FF7F18631042
-      0000186318631863000018630000186300000000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7F0000104200000000104200000000E07FFF7F0000104210420000
-      104210420000104200000000000010420000FF7F1042FF7F1042186318631863
-      000018631863186318631863186318630000FF7F1042FF7F1042186318631863
-      0000186318631863186318631863186300000000000000000000000000000000
-      0000000000001042104210421042104200000000FF7FE07F0000104200000000
-      000010421042104210421042104210420000FF7F10421863FF7F18631863FF7F
-      000010001F001F001F001F001F0010000000FF7F10421863FF7F18631863FF7F
-      00001F001F001F001F001F001F001F000000FF7F0000FF7F0000104210421042
-      104210421042104200000000104210420000FF7F0000FF7F0000104210421042
-      000010420000000000000000104210420000FF7FFF7F1042FF7FFF7F10421863
-      18630000000000000000000000000000FF7FFF7FFF7F1042FF7FFF7F10421863
-      000000000000000000000000000000000000FF7F104200000000104210421042
-      104210421042104210421042104210420000FF7F104200000000104210421042
-      104210421042104210421042104210420000FF7FFF7F10421042FF7FFF7F1863
-      104218631863186310421042FF7FFF7FFF7FFF7FFF7F10421042FF7FFF7F1863
-      104218631863186310421042FF7FFF7FFF7FFF7FFF7FFF7F0000104210420000
-      104210420000000010420000000010420000FF7FFF7FFF7F0000104210420000
-      10421042000000001042000000001042000010421042104210421042FF7FFF7F
-      FF7FFF7FFF7F10421042104210421042FF7F10421042104210421042FF7FFF7F
-      FF7FFF7FFF7F10421042104210421042FF7FFF7FFF7FFF7F0000104200000000
-      000010421042104210421042104210420000FF7FFF7FFF7F0000104200000000
-      0000104210421042104210421042104200001042FF7F18631863104210421042
-      10421042104210421863186318631042FF7F1042FF7F18631863104210421042
-      10421042104210421863186318631042FF7FFF7FFF7FFF7F0000104210421042
-      000010420000104200000000000010420000FF7FFF7FFF7F0000104210421042
-      00001042000010420000000000001042000010421863FF7F1863186318631042
-      104210421863FF7F1863186318631042FF7F10421863FF7F1863186318631042
-      104210421863FF7F1863186318631042FF7FFF7FFF7FFF7F0000104210421042
-      104210421042104210421042104210420000FF7FFF7FFF7F0000104210421042
-      104210421042104210421042104210420000FF7F10421863FF7FFF7F1042FF7F
-      1042FF7F10421863FF7FFF7F1042FF7FFF7FFF7F10421863FF7FFF7F1042FF7F
-      1042FF7F10421863FF7FFF7F1042FF7FFF7FFF7FFF7FFF7F0000100010001000
-      100010001000100010001000100010000000FF7FFF7FFF7F0000100010001000
-      100010001000100010001000100010000000FF7FFF7F104210421042FF7FFF7F
-      1042FF7FFF7F104210421042FF7FFF7FFF7FFF7FFF7F104210421042FF7FFF7F
-      1042FF7FFF7F104210421042FF7FFF7FFF7FFF7FFF7FFF7F0000000000000000
-      000000000000000000000000000000000000FF7FFF7FFF7F0000000000000000
-      000000000000000000000000000000000000FF7FFF7FFF7FFF7FFF7FFF7F1042
-      10421042FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F1042
-      10421042FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F000000000000000000000000
-      0000000000000000FF7FFF7FFF7FFF7FFF7FFF7F000000000000000000000000
-      0000000000000000FF7FFF7FFF7FFF7FFF7FFF7F000000000000000000000000
-      0000000000000000FF7FFF7FFF7FFF7FFF7FFF7F000000000000000000000000
-      0000000000000000FF7FFF7FFF7FFF7FFF7F0000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07F0000FF7FFF7FFF7FFF7FFF7F00000000E07F1863E07F1863E07F
-      1863E07F1863E07F0000FF7FFF7FFF7FFF7F0000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07F0000FF7FFF7FFF7FFF7FFF7F00000000E07F1863E07F1863E07F
-      1863E07F1863E07F0000FF7FFF7FFF7FFF7F0000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7F0000FF7FFF7FFF7FFF7FFF7F0000E07F0000E07F1863E07F1863
-      E07F1863E07F1863E07F0000FF7FFF7FFF7F0000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7F0000FF7FFF7FFF7FFF7FFF7F0000E07F0000E07F1863E07F1863
-      E07F1863E07F1863E07F0000FF7FFF7FFF7F0000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07F00000000000000000000FF7F0000FF7FE07F0000E07F1863E07F
-      1863E07F1863E07F1863E07F00000000FF7F0000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07F0000000000000000000000000000FF7FE07F0000E07F1863E07F
-      1863E07F1863E07F1863E07F0000000000000000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7F0000104210421042104200000000E07FFF7F0000000000000000
-      0000000000000000000000000000104200000000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7F0000186318631863186300000000E07FFF7F0000000000000000
-      0000000000000000000000000000186300000000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07F0000104210421042104200000000FF7FE07F0000104210421042
-      1042104210421042104210421042104200000000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07F0000186318631863186300000000FF7FE07F0000186318631863
-      1863186318631863186318631863186300000000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7F0000104200000000104200000000E07FFF7F0000104210420000
-      1042104200001042000000000000104200000000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7F0000186300000000186300000000E07FFF7F0000186310420000
-      1863186300001863000000000000186300000000000000000000000000000000
-      0000000000001042104210421042104200000000FF7FE07F0000104200000000
-      0000104210421042104210421042104200000000000000000000000000000000
-      0000000000001863186318631863186300000000FF7FE07F0000186300000000
-      000018631863186318631863186318630000FF7F0000FF7F0000104210421042
-      104210421042104200000000104210420000FF7F0000FF7F0000104210421042
-      000010420000000000000000104210420000FF7F0000FF7F0000186318631863
-      186318631863186300000000186318630000FF7F0000FF7F0000186318631863
-      000018630000000000000000186318630000FF7F104200000000104210421042
-      104210421042104210421042104210420000FF7F104200000000104210421042
-      104210421042104210421042104210420000FF7F104200000000186318631863
-      186318631863186318631863186318630000FF7F104200000000186318631863
-      186318631863186318631863186318630000FF7FFF7FFF7F0000104210420000
-      104210420000000010420000000010420000FF7FFF7FFF7F0000104210420000
-      104210420000000010420000000010420000FF7FFF7FFF7F0000186310420000
-      186318630000000018630000000018630000FF7FFF7FFF7F0000186310420000
-      186318630000000018630000000018630000FF7FFF7FFF7F0000104200000000
-      000010421042104210421042104210420000FF7FFF7FFF7F0000104200000000
-      000010421042104210421042104210420000FF7FFF7FFF7F0000186300000000
-      000018631863186318631863186318630000FF7FFF7FFF7F0000186300000000
-      000018631863186318631863186318630000FF7FFF7FFF7F0000104210421042
-      000010420000104200000000000010420000FF7FFF7FFF7F0000104210421042
-      000010420000104200000000000010420000FF7FFF7FFF7F0000186318631863
-      000018630000186300000000000018630000FF7FFF7FFF7F0000186318631863
-      000018630000186300000000000018630000FF7FFF7FFF7F0000104210421042
-      104210421042104210421042104210420000FF7FFF7FFF7F0000104210421042
-      104210421042104210421042104210420000FF7FFF7FFF7F0000186318631863
-      186318631863186318631863186318630000FF7FFF7FFF7F0000186318631863
-      186318631863186318631863186318630000FF7FFF7FFF7F0000100010001000
-      100010001000100010001000100010000000FF7FFF7FFF7F0000100010001000
-      100010001000100010001000100010000000FF7FFF7FFF7F00001F001F001F00
-      1F001F001F001F001F001F001F001F000000FF7FFF7FFF7F00001F001F001F00
-      1F001F001F001F001F001F001F001F000000FF7FFF7FFF7FFF7F000000000000
-      00000000000000000000000000000000FF7FFF7FFF7FFF7FFF7F000000000000
-      00000000000000000000000000000000FF7FFF7FFF7FFF7F0000000000000000
-      000000000000000000000000000000000000FF7FFF7FFF7F0000000000000000
-      000000000000000000000000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F000000000000000000000000
-      0000000000000000FF7FFF7FFF7FFF7FFF7FFF7F000000000000000000000000
-      0000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07F0000FF7FFF7FFF7FFF7FFF7F00000000E07F1863E07F1863E07F
-      1863E07F1863E07F0000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7F0000FF7FFF7FFF7FFF7FFF7F0000E07F0000E07F1863E07F1863
-      E07F1863E07F1863E07F0000FF7FFF7FFF7FFF7FFF7F00000000000000000000
-      000000000000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07F00000000000000000000FF7F0000FF7FE07F0000E07F1863E07F
-      1863E07F1863E07F1863E07F00000000FF7FFF7FFF7F0000E07FFF7FE07FFF7F
-      E07FFF7FE07FFF7FE07F0000FF7FFF7FFF7FFF7F000000000000000000000000
-      00000000000000000000FF7FFF7FFF7FFF7F0000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7F0000186318631863104200000000E07FFF7F0000000000000000
-      000000000000000000000000000010420000FF7FFF7F0000FF7FE07FFF7FE07F
-      FF7FE07FFF7FE07FFF7F0000FF7FFF7FFF7FFF7F00000000E07F1863E07F1863
-      E07F1863E07F1863E07F0000FF7FFF7FFF7F0000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07F0000186318631863186300000000FF7FE07F0000186318631863
-      186318631863186318631863186318630000FF7FFF7F0000E07FFF7FE07FFF7F
-      E07FFF7FE07FFF7FE07F0000FF7FFF7FFF7FFF7F0000FF7F0000E07F1863E07F
-      1863E07F1863E07F1863E07F0000FF7FFF7F0000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7F0000186300000000186300000000E07FFF7F0000186310420000
-      186318630000186300000000000018630000FF7FFF7F0000FF7FE07FFF7FE07F
-      FF7FE07FFF7FE07FFF7F0000FF7FFF7FFF7FFF7F0000E07FFF7F0000E07F1863
-      E07F1863E07F1863E07F1863E07F0000FF7F0000000000000000000000000000
-      0000000000001863186318631863186300000000FF7FE07F0000186300000000
-      000018631863186318631863186318630000FF7FFF7F0000E07FFF7FE07FFF7F
-      E07FFF7FE07FFF7FE07F0000FF7FFF7FFF7FFF7F0000FF7FE07FFF7F00000000
-      000000000000000000000000000000000000FF7F0000FF7F0000186318631863
-      186318631863186300000000186318630000FF7F0000FF7F0000186318631863
-      000018630000000000000000186318630000FF7FFF7F0000FF7FE07FFF7FE07F
-      FF7FE07FFF7FE07FFF7F0000FF7FFF7FFF7FFF7F0000E07FFF7FE07FFF7FE07F
-      FF7FE07FFF7FE07F0000FF7FFF7FFF7FFF7FFF7F104200000000186318631863
-      186318631863186318631863186318630000FF7F104200000000186318631863
-      186318631863186318631863186318630000FF7FFF7F00000000000000000000
-      000000000000000000000000FF7FFF7FFF7FFF7F0000FF7FE07FFF7FE07FFF7F
-      E07FFF7FE07FFF7F0000FF7FFF7FFF7FFF7FFF7FFF7FFF7F0000186310420000
-      186318630000000018630000000018630000FF7FFF7FFF7F0000186310420000
-      186318630000000018630000000018630000FF7FFF7FFF7F0000FF7FE07FFF7F
-      E07F0000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000FF7FE07FFF7FE07F
-      00000000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7F0000186300000000
-      000018631863186318631863186318630000FF7FFF7FFF7F0000186300000000
-      000018631863186318631863186318630000FF7FFF7FFF7F0000000000000000
-      00000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000E07FFF7FE07FFF7F
-      0000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000186318631863
-      000018630000186300000000000018630000FF7FFF7FFF7F0000186318631863
-      000018630000186300000000000018630000FF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000
-      0000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000186318631863
-      186318631863186318631863186318630000FF7FFF7FFF7F0000186318631863
-      186318631863186318631863186318630000FF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F000010001F001F00
-      1F001F001F001F001F001F001F0010000000FF7FFF7FFF7F000010001F001F00
-      1F001F001F001F001F001F001F0010000000FF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F000000000000
-      00000000000000000000000000000000FF7FFF7FFF7FFF7FFF7F000000000000
-      00000000000000000000000000000000FF7FFF7F000000000000000000000000
-      0000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F000000000000000000000000
-      0000000000000000FF7FFF7FFF7FFF7FFF7FFF7F000000000000000000000000
-      0000000000000000FF7FFF7FFF7FFF7FFF7F00000000E07F1863E07F1863E07F
-      1863E07F1863E07F00000000000000000000FF7FFF7FFF7F0000000000000000
-      000000000000000000000000FF7FFF7FFF7F0000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07F0000FF7FFF7FFF7FFF7FFF7F00000000E07F1863E07F1863E07F
-      1863E07F1863E07F000000000000000000000000E07F0000E07F1863E07F1863
-      E07F1863E07F1863E07F0000FF7FFF7F0000FF7FFF7FFF7F0000186318631863
-      186318631863186318630000FF7FFF7FFF7F0000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7F0000000000000000000000000000E07F0000E07F1863E07F1863
-      E07F1863E07F1863E07F00001863186300000000FF7FE07F0000E07F1863E07F
-      1863E07F1863E07F1863E07F0000FF7F0000FF7FFF7FFF7F0000186300000000
-      000000001863186318630000FF7FFF7FFF7F0000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07F0000186318631863186300000000FF7FE07F0000E07F1863E07F
-      1863E07F1863E07F1863E07F0000186300000000E07FFF7F0000000000000000
-      0000000000000000000000000000FF7F0000FF7FFF7FFF7F0000186318631863
-      186318631863186318630000FF7FFF7FFF7F0000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7F0000000000000000186300000000E07FFF7F0000000000000000
-      0000000000000000000000000000186300000000FF7FE07F0000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F0000186300000000
-      000000000000000018630000FF7FFF7FFF7F0000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07F0000186318631863186300000000FF7FE07F0000186300001863
-      0000186318631863186318631863186300000000E07FFF7F0000FF7F0000FF7F
-      0000FF7F00000000000000000000FF7F0000FF7FFF7FFF7F0000186318631863
-      186318631863186318630000FF7FFF7FFF7F0000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7F0000000000000000186300000000E07FFF7F0000186300001863
-      0000186300000000000000000000186300000000FF7FE07F0000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F0000186300000000
-      000000000000000018630000FF7FFF7FFF7F0000000000000000000000000000
-      0000000000001863186318631863186300000000FF7FE07F0000186300001863
-      000018631863186318631863186318630000FF7F0000FF7F0000FF7F0000FF7F
-      0000FF7F00000000000000000000FF7F0000FF7FFF7FFF7F0000186318631863
-      186318631863186318630000FF7FFF7FFF7FFF7F0000FF7F0000186300001863
-      000018630000000000000000000018630000FF7F0000FF7F0000186300001863
-      000018630000000000000000000018630000FF7F104200000000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F0000186300000000
-      000018630000000018630000FF7FFF7FFF7FFF7F104200000000186300001863
-      000018631863186318631863186318630000FF7F104200000000186300001863
-      000018631863186318631863186318630000FF7FFF7FFF7F0000FF7F0000FF7F
-      0000FF7F00000000FF7F00000000FF7F0000FF7FFF7FFF7F0000186318631863
-      186318631863186318630000FF7FFF7FFF7FFF7FFF7FFF7F0000186300001863
-      000018630000000018630000000018630000FF7FFF7FFF7F0000186300001863
-      000018630000000018630000000018630000FF7FFF7FFF7F0000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F0000186300000000
-      186300000000000018630000FF7FFF7FFF7FFF7FFF7FFF7F0000186300001863
-      000018631863186318631863186318630000FF7FFF7FFF7F0000186300001863
-      000018631863186318631863186318630000FF7FFF7FFF7F0000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F0000186318631863
-      186318631863186318630000FF7FFF7FFF7FFF7FFF7FFF7F0000186300001863
-      000018631863186318631863186318630000FF7FFF7FFF7F0000186300001863
-      000018631863186318631863186318630000FF7FFF7FFF7F0000FF7F0000FF7F
-      000000000000000000000000000000000000FF7FFF7FFF7F0000000000000000
-      000000000000000000000000FF7FFF7FFF7FFF7FFF7FFF7F0000186300001863
-      000000000000000000000000000000000000FF7FFF7FFF7F0000186300001863
-      000000000000000000000000000000000000FF7FFF7FFF7F0000FF7F00000000
-      0000000000000000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000186300000000
-      0000000000000000000000000000FF7FFF7FFF7FFF7FFF7F0000186300000000
-      0000000000000000000000000000FF7FFF7FFF7FFF7FFF7F0000000000000000
-      00000000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000000000000000
-      00000000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7F0000000000000000
-      00000000000000000000FF7FFF7FFF7FFF7FFF7F000000000000000000000000
-      0000000000000000FF7FFF7FFF7FFF7FFF7FFF7F000000000000000000000000
-      0000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F000000000000000000000000
-      0000000000000000FF7FFF7FFF7FFF7FFF7F0000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07F0000FF7FFF7FFF7FFF7FFF7F00000000E07F1863E07F1863E07F
-      1863E07F1863E07F00000000000000000000FF7FFF7FFF7F0000000000000000
-      000000000000000000000000FF7FFF7FFF7F0000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07F0000FF7FFF7FFF7FFF7FFF7F0000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7F0000000000000000000000000000E07F0000E07F1863E07F1863
-      E07F1863E07F1863E07F0000186318630000FF7FFF7FFF7F0000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F0000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7F0000000000000000000000000000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07F0000186318631863186300000000FF7FE07F0000E07F1863E07F
-      1863E07F1863E07F1863E07F000018630000FF7FFF7FFF7F0000FF7F00000000
-      00000000FF7FFF7FFF7F0000FF7FFF7FFF7F0000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07F0000FF7FFF7FFF7FFF7F00000000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7F0000000000000000186300000000E07FFF7F0000000000000000
-      000000000000000000000000000018630000FF7FFF7FFF7F0000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F0000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7F0000000000000000FF7F00000000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07F0000186318631863186300000000FF7FE07F0000186300001863
-      000018631863186318631863186318630000FF7FFF7FFF7F0000FF7F00000000
-      0000000000000000FF7F0000FF7FFF7FFF7F0000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07F0000FF7FFF7FFF7FFF7F00000000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7F0000000000000000186300000000E07FFF7F0000186300001863
-      000018630000000000000000000018630000FF7FFF7FFF7F0000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F0000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7F0000000000000000FF7F00000000000000000000000000000000
-      0000000000001863186318631863186300000000FF7FE07F0000186300001863
-      000018631863186318631863186318630000FF7FFF7FFF7F0000FF7F00000000
-      0000000000000000FF7F0000FF7FFF7FFF7F0000000000000000000000000000
-      000000000000FF7FFF7FFF7FFF7FFF7F0000FF7F0000FF7F0000186300001863
-      000018630000000000000000000018630000FF7F0000FF7F0000186300001863
-      000018630000000000000000000018630000FF7FFF7FFF7F0000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7FFF7F0000FF7F0000FF7F0000FF7F
-      0000FF7F00000000000000000000FF7F0000FF7F104200000000186300001863
-      000018631863186318631863186318630000FF7F104200000000186300001863
-      000018631863186318631863186318630000FF7FFF7FFF7F0000FF7F00000000
-      0000FF7F00000000FF7F0000FF7FFF7FFF7FFF7F104200000000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F0000186300001863
-      000018630000000018630000000000000000FF7FFF7FFF7F0000186300001863
-      000018630000000018630000000000000000FF7FFF7FFF7F0000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7FFF7FFF7FFF7F0000FF7F0000FF7F
-      0000FF7F00000000FF7F00000000FF7F0000FF7FFF7FFF7F0000186300001863
-      00001863186318631863000018630000FF7FFF7FFF7FFF7F0000186300001863
-      00001863186318631863000018630000FF7FFF7FFF7FFF7F0000FF7F00000000
-      FF7F000000000000FF7F0000FF7FFF7FFF7FFF7FFF7FFF7F0000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F0000186300001863
-      0000186318631863186300000000FF7FFF7FFF7FFF7FFF7F0000186300001863
-      0000186318631863186300000000FF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7FFF7FFF7FFF7F0000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F0000186300001863
-      000000000000000000000000FF7FFF7FFF7FFF7FFF7FFF7F0000186300001863
-      000000000000000000000000FF7FFF7FFF7FFF7FFF7FFF7F0000000000000000
-      000000000000000000000000FF7FFF7FFF7FFF7FFF7FFF7F0000FF7F0000FF7F
-      000000000000000000000000000000000000FF7FFF7FFF7F0000186300000000
-      0000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000186300000000
-      0000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7F00000000
-      0000000000000000000000000000FF7FFF7FFF7FFF7FFF7F0000000000000000
-      00000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000000000000000
-      00000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000000000000000
-      00000000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F000000000000000000000000
-      0000000000000000FF7FFF7FFF7FFF7FFF7FFF7F000000000000000000000000
-      0000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000000000000000
-      000000000000000000000000FF7FFF7FFF7F0000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07F0000FF7FFF7FFF7FFF7FFF7F00000000E07F1863E07F1863E07F
-      1863E07F1863E07F00000000000000000000FF7FFF7FFF7F0000000000000000
-      000000000000000000000000FF7FFF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F0000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7F0000000000000000000000000000E07F0000E07F1863E07F1863
-      E07F1863E07F1863E07F0000FF7FFF7F0000FF7FFF7FFF7F0000186318631863
-      186318631863186318630000FF7FFF7FFF7FFF7FFF7FFF7F0000FF7F00000000
-      00000000FF7FFF7FFF7F0000FF7FFF7FFF7F0000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07F0000FF7FFF7FFF7FFF7F00000000FF7FE07F0000E07F1863E07F
-      1863E07F1863E07F1863E07F0000FF7F0000FF7FFF7FFF7F0000186300000000
-      000000001863186318630000FF7FFF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F0000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7F0000000000000000FF7F00000000E07FFF7F0000000000000000
-      0000000000000000000000000000FF7F0000FF7FFF7FFF7F0000186318631863
-      186318631863186318630000FF7FFF7FFF7FFF7FFF7FFF7F0000FF7F00000000
-      0000000000000000FF7F0000FF7FFF7FFF7F0000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07F0000FF7FFF7FFF7FFF7F00000000FF7FE07F0000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F0000186300000000
-      000000000000000018630000FF7FFF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F0000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7F0000000000000000FF7F00000000E07FFF7F0000FF7F0000FF7F
-      0000FF7F00000000000000000000FF7F0000FF7FFF7FFF7F0000186318631863
-      186318631863186318630000FF7FFF7FFF7FFF7FFF7FFF7F0000FF7F00000000
-      0000000000000000FF7F0000FF7FFF7FFF7F0000000000000000000000000000
-      000000000000FF7FFF7FFF7FFF7FFF7F00000000FF7FE07F0000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F0000186300000000
-      000000000000000018630000FF7FFF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7FFF7F0000FF7F0000FF7F0000FF7F
-      0000FF7F00000000000000000000FF7F0000FF7F0000FF7F0000FF7F0000FF7F
-      0000FF7F00000000000000000000FF7F0000FF7FFF7FFF7F0000186318631863
-      186318631863186318630000FF7FFF7FFF7FFF7FFF7FFF7F0000FF7F00000000
-      0000FF7FFF7FFF7FFF7F0000FF7FFF7FFF7FFF7F104200000000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7F104200000000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F0000186300000000
-      000018631863186318630000FF7FFF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F
-      FF7FFF7F0000000000000000FF7FFF7FFF7FFF7FFF7FFF7F0000FF7F0000FF7F
-      0000FF7F00000000FF7F0000000000000000FF7FFF7FFF7F0000FF7F0000FF7F
-      0000FF7F00000000FF7F0000000000000000FF7FFF7FFF7F0000186318631863
-      186318630000000000000000FF7FFF7FFF7FFF7FFF7FFF7F0000FF7F00000000
-      FF7FFF7F0000FF7F0000FF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7F0000FF7F0000FF7FFF7FFF7FFF7F0000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7F0000FF7F0000FF7FFF7FFF7FFF7F0000186300000000
-      18631863000018630000FF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F
-      FF7FFF7F00000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7F00000000FF7FFF7FFF7FFF7FFF7F0000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7F00000000FF7FFF7FFF7FFF7FFF7F0000186318631863
-      1863186300000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000000000000000
-      000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7F0000FF7F
-      000000000000000000000000FF7FFF7FFF7FFF7FFF7FFF7F0000FF7F0000FF7F
-      000000000000000000000000FF7FFF7FFF7FFF7FFF7FFF7F0000000000000000
-      000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7F00000000
-      0000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7F00000000
-      0000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000000000000000
-      00000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000000000000000
-      00000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000
-      0000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000
-      0000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000
-      000000000000F75E0000FF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000
-      000000000000F75E0000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000E07FE07FE07F
-      E07FE07F00000000F75E0000FF7FFF7FFF7FFF7FFF7FFF7F0000E07FE07FE07F
-      E07FE07F00000000F75E0000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000E07F00000000
-      0000E07F000000420000F75E0000FF7FFF7FFF7FFF7FFF7F0000E07F00000000
-      0000E07F000000420000F75E0000FF7FFF7FFF7FFF7FFF7F0000000000000000
-      000000000000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000E07FE07FE07F
-      E07FE07F00000042004200000000FF7FFF7FFF7F000000000000000000000000
-      0000E07F00000042004200000000FF7FFF7FFF7FFF7F0000E07FFF7FE07FFF7F
-      E07FFF7FE07FFF7FE07F0000FF7FFF7FFF7FFF7FFF7F00000000000000000000
-      00000000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7F0000E07FE07FE07F
-      E07FE07F0000004200420000FF7FFF7FFF7FFF7F0000E07FE07FE07FE07FE07F
-      000000000000004200420000FF7FFF7FFF7FFF7FFF7F0000FF7FE07FFF7FE07F
-      FF7FE07FFF7FE07FFF7F0000FF7FFF7FFF7FFF7F00000000E07FF75EE07FF75E
-      E07FF75EE07FF75EE07F0000FF7FFF7FFF7FFF7FFF7FFF7F0000000000000000
-      000000000000004200420000FF7FFF7FFF7FFF7F0000E07F000000000000E07F
-      0000F75E0000004200420000FF7FFF7FFF7FFF7FFF7F0000E07FFF7FE07FFF7F
-      E07FFF7FE07FFF7FE07F0000FF7FFF7FFF7FFF7F0000FF7F0000E07FF75EE07F
-      F75EE07FF75EE07FF75EE07F0000FF7FFF7FFF7FFF7FFF7F0000E07FE07FE07F
-      E07FE07F0000004200420000FF7FFF7FFF7FFF7F0000E07FE07FE07FE07FE07F
-      0000F75E0000004200420000FF7FFF7FFF7FFF7FFF7F0000FF7FE07FFF7FE07F
-      FF7FE07FFF7FE07FFF7F0000FF7FFF7FFF7FFF7F0000E07FFF7F0000E07FF75E
-      E07FF75EE07FF75EE07FF75EE07F0000FF7FFF7FFF7FFF7F0000E07F00000000
-      0000E07F0000004200420000FF7FFF7FFF7FFF7F0000E07FE07FE07FE07FE07F
-      000000000000004200420000FF7FFF7FFF7FFF7FFF7F0000E07FFF7FE07FFF7F
-      E07FFF7FE07FFF7FE07F0000FF7FFF7FFF7FFF7F0000FF7FE07FFF7F00000000
-      00000000000000000000000000000000FF7FFF7FFF7FFF7F0000E07FE07FE07F
-      E07FE07F0000004200420000FF7FFF7FFF7FFF7F000000000000000000000000
-      0000EF3D0000004200420000FF7FFF7FFF7FFF7FFF7F0000FF7FE07FFF7FE07F
-      FF7FE07FFF7FE07FFF7F0000FF7FFF7FFF7FFF7F0000E07FFF7FE07FFF7FE07F
-      FF7FE07FFF7FE07F0000FF7FFF7FFF7FFF7FFF7FFF7FFF7F0000E07FE07FE07F
-      E07FE07F0000004200420000FF7FFF7FFF7FFF7FFF7FFF7F0000FF7FFF7FFF7F
-      EF3DEF3D0000004200420000FF7FFF7FFF7FFF7FFF7F00000000000000000000
-      00000000000000000000FF7FFF7FFF7FFF7FFF7F0000FF7FE07FFF7FE07FFF7F
-      E07FFF7FE07FFF7F0000FF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000
-      000000000000000000420000FF7FFF7FFF7FFF7FFF7F00000000000000000000
-      000000000000000000420000FF7FFF7FFF7FFF7FFF7FFF7F0000FF7FE07FFF7F
-      E07F0000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000E07FFF7FE07FFF7FE07F
-      FF7F000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7F0000EF3DEF3DEF3DEF3D
-      EF3DEF3DEF3D000000000000FF7FFF7FFF7FFF7FFF7F0000EF3DEF3DEF3DEF3D
-      EF3DEF3DEF3D000000000000FF7FFF7FFF7FFF7FFF7FFF7FEF3D000000000000
-      0000EF3DFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000E07FFF7FE07FFF7F
-      0000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000E07F0042
-      E07F0042E07F004200000000FF7FFF7FFF7FFF7FFF7FFF7F000000000042E07F
-      0042E07F0042E07F00000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FEF3D0000000000000000
-      EF3DFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000
-      0042E07F0042E07F004200000000FF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000
-      E07F0042E07F0042E07F00000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FEF3D
-      0000000000000000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FEF3D
-      0000000000000000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F424D3E000000000000003E000000
+      0000000000003600000028000000400000009000000001002000000000000090
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF0000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000FFFFFF00FFFFFF0000000000000000000000
+      000000000000000000000000FF000000FF000000FF000000FF00000000000000
+      0000000000000000000000000000FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF0084848400C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF0084848400C6C6C600C6C6
+      C6000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000
+      FF00C6C6C600C6C6C60000000000FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF0084848400C6C6C600FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00C6C6C60000000000FFFFFF00FFFFFF0084848400C6C6C6000000
+      FF000000FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      FF000000FF00C6C6C60000000000FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF0084848400C6C6C600FFFF
+      FF00C6C6C60000008400FFFFFF00FFFFFF00FFFFFF00C6C6C600FFFFFF00FFFF
+      FF00FFFFFF00C6C6C60000000000FFFFFF00FFFFFF00848484000000FF000000
+      FF000000FF000000FF00FFFFFF00FFFFFF00FFFFFF00C6C6C600FFFFFF00FFFF
+      FF000000FF000000FF0000000000FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF0084848400C6C6C600FFFF
+      FF00000084000000FF0000008400FFFFFF00FFFFFF00FF000000FF000000C6C6
+      C600FFFFFF00C6C6C60000000000FFFFFF00FFFFFF00848484000000FF000000
+      FF00FFFFFF000000FF000000FF00FFFFFF00FFFFFF00FF000000FF000000C6C6
+      C6000000FF000000FF0000000000FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF0084848400C6C6C600FFFF
+      FF000000FF0000FFFF0000008400FFFFFF00FFFFFF00FFFF0000FF000000FF00
+      0000FFFFFF00C6C6C60000000000FFFFFF00FFFFFF000000FF000000FF00FFFF
+      FF000000FF00FFFFFF000000FF000000FF00FFFFFF00FFFF0000FF000000FF00
+      0000FFFFFF000000FF000000FF00FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF0084848400C6C6C600FFFF
+      FF00FFFFFF000000FF0000008400FFFFFF00FFFFFF00FF000000FFFFFF00FFFF
+      FF00FFFFFF00C6C6C60000000000FFFFFF00FFFFFF000000FF000000FF00FFFF
+      FF00FFFFFF000000FF00FFFFFF000000FF000000FF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF000000FF000000FF00FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF0084848400C6C6C600FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00C6C6C60000000000FFFFFF00FFFFFF000000FF000000FF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000FF000000FF00FFFFFF00FFFF
+      FF00FFFFFF000000FF000000FF00FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF0084848400C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00848484000000FF000000
+      FF00C6C6C600C6C6C600C6C6C600C6C6C600FFFFFF000000FF000000FF00C6C6
+      C6000000FF000000FF0000000000FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF0084848400C6C6C6008400
+      0000840000008400000084000000840000008400000000000000000000000000
+      000000000000C6C6C60000000000FFFFFF00FFFFFF00848484000000FF000000
+      FF008400000084000000840000008400000084000000FFFFFF000000FF000000
+      FF000000FF000000FF0000000000FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF0084848400C6C6C6008400
+      00008400000084000000840000008400000084000000FFFFFF0000000000FFFF
+      FF0000000000C6C6C60000000000FFFFFF00FFFFFF0084848400C6C6C6000000
+      FF000000FF0084000000840000008400000084000000FFFFFF00FFFFFF000000
+      FF000000FF00C6C6C60000000000FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF0084848400C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF0084848400C6C6C600C6C6
+      C6000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000
+      FF00C6C6C600C6C6C60000000000FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF0084848400848484008484
+      8400848484008484840084848400848484008484840084848400848484008484
+      8400848484008484840000000000FFFFFF00FFFFFF0084848400848484008484
+      840084848400848484000000FF000000FF000000FF000000FF00848484008484
+      8400848484008484840000000000FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF0000000000000000000000
+      000000000000000000000000000000000000000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      000000000000000000000000000000000000000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000
+      0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000000000FFFF00C6C6
+      C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008484840084848400C6C6
+      C600FFFFFF008484840084848400000000000084840000FFFF0000FFFF0000FF
+      FF0000FFFF0000FFFF000084840000000000FFFFFF008484840084848400C6C6
+      C600FFFFFF0084848400848484000000000000FFFF0000FFFF0000FFFF0000FF
+      FF0000FFFF0000FFFF0000FFFF000000000000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FFFF000000000000FF
+      FF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008484
+      84008484840084848400C6C6C60000000000C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF008484
+      84008484840084848400C6C6C60000000000C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C600000000000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000
+      00000000000000000000000000000000000000000000FFFFFF0000FFFF000000
+      000000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6
+      C60000FFFF00000000000000000000000000FFFFFF00FFFFFF00848484008484
+      8400C6C6C600C6C6C600FFFFFF0000000000C6C6C6008484840000000000C6C6
+      C600C6C6C60000000000C6C6C60000000000FFFFFF00FFFFFF00848484008484
+      8400C6C6C600C6C6C600FFFFFF0000000000C6C6C6008484840000000000C6C6
+      C600C6C6C60000000000C6C6C6000000000000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000008484
+      8400848484008484840084848400000000000000000000FFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000008484840000000000FFFFFF00FFFFFF0084848400C6C6
+      C600C6C6C60084848400C6C6C60000000000C6C6C60000000000000000000000
+      0000C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF0084848400C6C6
+      C600C6C6C60084848400C6C6C60000000000C6C6C60000000000000000000000
+      0000C6C6C600C6C6C600C6C6C600000000000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000008484
+      84008484840084848400848484000000000000000000FFFFFF0000FFFF000000
+      0000848484008484840084848400848484008484840084848400848484008484
+      840084848400848484008484840000000000FFFFFF0084848400FFFFFF00C6C6
+      C600FFFFFF00C6C6C6008484840000000000C6C6C600C6C6C600C6C6C6000000
+      0000C6C6C60000000000C6C6C60000000000FFFFFF0084848400FFFFFF00C6C6
+      C600FFFFFF00C6C6C6008484840000000000C6C6C600C6C6C600C6C6C6000000
+      0000C6C6C60000000000C6C6C6000000000000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000008484
+      8400000000000000000084848400000000000000000000FFFF00FFFFFF000000
+      0000848484008484840000000000848484008484840000000000848484000000
+      000000000000000000008484840000000000FFFFFF0084848400FFFFFF008484
+      8400C6C6C600C6C6C600C6C6C60000000000C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF0084848400FFFFFF008484
+      8400C6C6C600C6C6C600C6C6C60000000000C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C600000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000848484008484
+      84008484840084848400848484000000000000000000FFFFFF0000FFFF000000
+      0000848484000000000000000000000000008484840084848400848484008484
+      840084848400848484008484840000000000FFFFFF0084848400C6C6C600FFFF
+      FF00C6C6C600C6C6C600FFFFFF000000000084000000FF000000FF000000FF00
+      0000FF000000FF0000008400000000000000FFFFFF0084848400C6C6C600FFFF
+      FF00C6C6C600C6C6C600FFFFFF0000000000FF000000FF000000FF000000FF00
+      0000FF000000FF000000FF00000000000000FFFFFF0000000000FFFFFF000000
+      0000848484008484840084848400848484008484840084848400848484000000
+      000000000000848484008484840000000000FFFFFF0000000000FFFFFF000000
+      0000848484008484840084848400000000008484840000000000000000000000
+      000000000000848484008484840000000000FFFFFF00FFFFFF0084848400FFFF
+      FF00FFFFFF0084848400C6C6C600C6C6C6000000000000000000000000000000
+      0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF0084848400FFFF
+      FF00FFFFFF0084848400C6C6C600000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF0084848400000000000000
+      0000848484008484840084848400848484008484840084848400848484008484
+      840084848400848484008484840000000000FFFFFF0084848400000000000000
+      0000848484008484840084848400848484008484840084848400848484008484
+      840084848400848484008484840000000000FFFFFF00FFFFFF00848484008484
+      8400FFFFFF00FFFFFF00C6C6C60084848400C6C6C600C6C6C600C6C6C6008484
+      840084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00848484008484
+      8400FFFFFF00FFFFFF00C6C6C60084848400C6C6C600C6C6C600C6C6C6008484
+      840084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000848484008484840000000000848484008484840000000000000000008484
+      840000000000000000008484840000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000848484008484840000000000848484008484840000000000000000008484
+      8400000000000000000084848400000000008484840084848400848484008484
+      840084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00848484008484
+      8400848484008484840084848400FFFFFF008484840084848400848484008484
+      840084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00848484008484
+      8400848484008484840084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000848484000000000000000000000000008484840084848400848484008484
+      840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000848484000000000000000000000000008484840084848400848484008484
+      84008484840084848400848484000000000084848400FFFFFF00C6C6C600C6C6
+      C60084848400848484008484840084848400848484008484840084848400C6C6
+      C600C6C6C600C6C6C60084848400FFFFFF0084848400FFFFFF00C6C6C600C6C6
+      C60084848400848484008484840084848400848484008484840084848400C6C6
+      C600C6C6C600C6C6C60084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000848484008484840084848400000000008484840000000000848484000000
+      000000000000000000008484840000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000848484008484840084848400000000008484840000000000848484000000
+      00000000000000000000848484000000000084848400C6C6C600FFFFFF00C6C6
+      C600C6C6C600C6C6C600848484008484840084848400C6C6C600FFFFFF00C6C6
+      C600C6C6C600C6C6C60084848400FFFFFF0084848400C6C6C600FFFFFF00C6C6
+      C600C6C6C600C6C6C600848484008484840084848400C6C6C600FFFFFF00C6C6
+      C600C6C6C600C6C6C60084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000848484008484840084848400848484008484840084848400848484008484
+      840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000848484008484840084848400848484008484840084848400848484008484
+      840084848400848484008484840000000000FFFFFF0084848400C6C6C600FFFF
+      FF00FFFFFF0084848400FFFFFF0084848400FFFFFF0084848400C6C6C600FFFF
+      FF00FFFFFF0084848400FFFFFF00FFFFFF00FFFFFF0084848400C6C6C600FFFF
+      FF00FFFFFF0084848400FFFFFF0084848400FFFFFF0084848400C6C6C600FFFF
+      FF00FFFFFF0084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000840000008400000084000000840000008400000084000000840000008400
+      000084000000840000008400000000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000840000008400000084000000840000008400000084000000840000008400
+      000084000000840000008400000000000000FFFFFF00FFFFFF00848484008484
+      840084848400FFFFFF00FFFFFF0084848400FFFFFF00FFFFFF00848484008484
+      840084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00848484008484
+      840084848400FFFFFF00FFFFFF0084848400FFFFFF00FFFFFF00848484008484
+      840084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00848484008484840084848400FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00848484008484840084848400FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      000000000000000000000000000000000000000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      000000000000000000000000000000000000000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      000000000000000000000000000000000000000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      000000000000000000000000000000000000000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000000000FFFF00C6C6
+      C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000000000FFFF00C6C6
+      C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FFFF000000000000FF
+      FF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FFFF000000000000FF
+      FF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000
+      0000000000000000000000000000FFFFFF0000000000FFFFFF0000FFFF000000
+      000000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6
+      C60000FFFF000000000000000000FFFFFF000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000
+      00000000000000000000000000000000000000000000FFFFFF0000FFFF000000
+      000000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6
+      C60000FFFF0000000000000000000000000000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000008484
+      8400848484008484840084848400000000000000000000FFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000848484000000000000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000000000C6C6
+      C600C6C6C600C6C6C600C6C6C600000000000000000000FFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000C6C6C600000000000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000008484
+      84008484840084848400848484000000000000000000FFFFFF0000FFFF000000
+      0000848484008484840084848400848484008484840084848400848484008484
+      8400848484008484840084848400000000000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0000000000C6C6
+      C600C6C6C600C6C6C600C6C6C6000000000000000000FFFFFF0000FFFF000000
+      0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C6000000000000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000008484
+      8400000000000000000084848400000000000000000000FFFF00FFFFFF000000
+      0000848484008484840000000000848484008484840000000000848484000000
+      00000000000000000000848484000000000000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000000000C6C6
+      C6000000000000000000C6C6C600000000000000000000FFFF00FFFFFF000000
+      0000C6C6C6008484840000000000C6C6C600C6C6C60000000000C6C6C6000000
+      00000000000000000000C6C6C600000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000848484008484
+      84008484840084848400848484000000000000000000FFFFFF0000FFFF000000
+      0000848484000000000000000000000000008484840084848400848484008484
+      8400848484008484840084848400000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C6000000000000000000FFFFFF0000FFFF000000
+      0000C6C6C600000000000000000000000000C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF0000000000FFFFFF000000
+      0000848484008484840084848400848484008484840084848400848484000000
+      000000000000848484008484840000000000FFFFFF0000000000FFFFFF000000
+      0000848484008484840084848400000000008484840000000000000000000000
+      000000000000848484008484840000000000FFFFFF0000000000FFFFFF000000
+      0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000
+      000000000000C6C6C600C6C6C60000000000FFFFFF0000000000FFFFFF000000
+      0000C6C6C600C6C6C600C6C6C60000000000C6C6C60000000000000000000000
+      000000000000C6C6C600C6C6C60000000000FFFFFF0084848400000000000000
+      0000848484008484840084848400848484008484840084848400848484008484
+      840084848400848484008484840000000000FFFFFF0084848400000000000000
+      0000848484008484840084848400848484008484840084848400848484008484
+      840084848400848484008484840000000000FFFFFF0084848400000000000000
+      0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF0084848400000000000000
+      0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000848484008484840000000000848484008484840000000000000000008484
+      840000000000000000008484840000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000848484008484840000000000848484008484840000000000000000008484
+      840000000000000000008484840000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C6008484840000000000C6C6C600C6C6C6000000000000000000C6C6
+      C6000000000000000000C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C6008484840000000000C6C6C600C6C6C6000000000000000000C6C6
+      C6000000000000000000C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000848484000000000000000000000000008484840084848400848484008484
+      840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000848484000000000000000000000000008484840084848400848484008484
+      840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600000000000000000000000000C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600000000000000000000000000C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000848484008484840084848400000000008484840000000000848484000000
+      000000000000000000008484840000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000848484008484840084848400000000008484840000000000848484000000
+      000000000000000000008484840000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600C6C6C600C6C6C60000000000C6C6C60000000000C6C6C6000000
+      00000000000000000000C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600C6C6C600C6C6C60000000000C6C6C60000000000C6C6C6000000
+      00000000000000000000C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000848484008484840084848400848484008484840084848400848484008484
+      840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000848484008484840084848400848484008484840084848400848484008484
+      840084848400848484008484840000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000840000008400000084000000840000008400000084000000840000008400
+      000084000000840000008400000000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000840000008400000084000000840000008400000084000000840000008400
+      000084000000840000008400000000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00
+      0000FF000000FF000000FF00000000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00
+      0000FF000000FF000000FF00000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      000000000000000000000000000000000000000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      000000000000000000000000000000000000000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000000000FFFF00C6C6
+      C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FFFF000000000000FF
+      FF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00000000000000
+      0000000000000000000000000000FFFFFF0000000000FFFFFF0000FFFF000000
+      000000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6
+      C60000FFFF000000000000000000FFFFFF00FFFFFF00FFFFFF000000000000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000000000C6C6
+      C600C6C6C600C6C6C60084848400000000000000000000FFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000008484840000000000FFFFFF00FFFFFF0000000000FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000000000FF
+      FF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0000000000C6C6
+      C600C6C6C600C6C6C600C6C6C6000000000000000000FFFFFF0000FFFF000000
+      0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF000000000000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF000000
+      000000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6
+      C60000FFFF0000000000FFFFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000000000C6C6
+      C6000000000000000000C6C6C600000000000000000000FFFF00FFFFFF000000
+      0000C6C6C6008484840000000000C6C6C600C6C6C60000000000C6C6C6000000
+      00000000000000000000C6C6C60000000000FFFFFF00FFFFFF0000000000FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FFFF00FFFF
+      FF000000000000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FF
+      FF00C6C6C60000FFFF0000000000FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C6000000000000000000FFFFFF0000FFFF000000
+      0000C6C6C600000000000000000000000000C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF000000000000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF0000FF
+      FF00FFFFFF000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF0000000000FFFFFF000000
+      0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000
+      000000000000C6C6C600C6C6C60000000000FFFFFF0000000000FFFFFF000000
+      0000C6C6C600C6C6C600C6C6C60000000000C6C6C60000000000000000000000
+      000000000000C6C6C600C6C6C60000000000FFFFFF00FFFFFF0000000000FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0084848400000000000000
+      0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF0084848400000000000000
+      0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C6008484840000000000C6C6C600C6C6C6000000000000000000C6C6
+      C6000000000000000000C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C6008484840000000000C6C6C600C6C6C6000000000000000000C6C6
+      C6000000000000000000C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF0000FFFF00FFFFFF0000FFFF0000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF
+      FF0000FFFF00FFFFFF0000FFFF00000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600000000000000000000000000C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600000000000000000000000000C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600C6C6C600C6C6C60000000000C6C6C60000000000C6C6C6000000
+      00000000000000000000C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600C6C6C600C6C6C60000000000C6C6C60000000000C6C6C6000000
+      00000000000000000000C6C6C60000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000
+      000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      000084000000FF000000FF000000FF000000FF000000FF000000FF000000FF00
+      0000FF000000FF0000008400000000000000FFFFFF00FFFFFF00FFFFFF000000
+      000084000000FF000000FF000000FF000000FF000000FF000000FF000000FF00
+      0000FF000000FF0000008400000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000FFFFFF00FFFFFF0000000000000000000000
+      000000000000000000000000000000000000000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      000000000000000000000000000000000000000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      000000000000000000000000000000000000000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000000000FFFF00C6C6
+      C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF000000
+      000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000FFFFFF00FFFFFF00FFFFFF000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000000000FFFF00C6C6
+      C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF000000
+      0000000000000000000000000000000000000000000000FFFF000000000000FF
+      FF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FF
+      FF0000000000FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6
+      C60000000000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000
+      0000000000000000000000000000000000000000000000FFFF000000000000FF
+      FF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FF
+      FF0000000000C6C6C600C6C6C6000000000000000000FFFFFF0000FFFF000000
+      000000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6
+      C60000FFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C60000000000000000000000000000000000C6C6C600C6C6C600C6C6
+      C60000000000FFFFFF00FFFFFF00FFFFFF000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0000000000C6C6
+      C600C6C6C600C6C6C600C6C6C6000000000000000000FFFFFF0000FFFF000000
+      000000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6
+      C60000FFFF0000000000C6C6C600000000000000000000FFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6
+      C60000000000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000
+      00000000000000000000C6C6C600000000000000000000FFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000C6C6C6000000000000000000FFFFFF0000FFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600000000000000000000000000000000000000000000000000C6C6
+      C60000000000FFFFFF00FFFFFF00FFFFFF000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0000000000C6C6
+      C600C6C6C600C6C6C600C6C6C6000000000000000000FFFFFF0000FFFF000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C600000000000000000000FFFF00FFFFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000000000000000
+      00000000000000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6
+      C60000000000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000
+      00000000000000000000C6C6C600000000000000000000FFFF00FFFFFF000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C60000000000000000000000
+      00000000000000000000C6C6C6000000000000000000FFFFFF0000FFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600000000000000000000000000000000000000000000000000C6C6
+      C60000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C6000000000000000000FFFFFF0000FFFF000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF0000000000FFFFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000000000000000
+      00000000000000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6
+      C60000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C60000000000000000000000
+      00000000000000000000C6C6C60000000000FFFFFF0000000000FFFFFF000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C60000000000000000000000
+      00000000000000000000C6C6C60000000000FFFFFF0084848400000000000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600000000000000000000000000C6C6C6000000000000000000C6C6
+      C60000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF0084848400000000000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF0084848400000000000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF000000000000000000FFFF
+      FF000000000000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6
+      C60000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C6000000000000000000C6C6
+      C6000000000000000000C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C6000000000000000000C6C6
+      C6000000000000000000C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C6000000000000000000C6C6C600000000000000000000000000C6C6
+      C60000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6
+      C60000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF0000000000FFFFFF00000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C60000000000C6C6C600000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C60000000000C6C6C600000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF000000000000000000000000000000000000000000000000000000
+      00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C6000000000000000000000000000000000000000000000000000000
+      00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C6000000000000000000000000000000000000000000000000000000
+      00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      000000000000000000000000000000000000000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      000000000000000000000000000000000000000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      000000000000000000000000000000000000000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000000000FFFF00C6C6
+      C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF000000
+      000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000FFFFFF00FFFFFF00FFFFFF000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000
+      0000000000000000000000000000000000000000000000FFFF000000000000FF
+      FF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FF
+      FF0000000000C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000
+      0000000000000000000000000000000000000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0000000000C6C6
+      C600C6C6C600C6C6C600C6C6C6000000000000000000FFFFFF0000FFFF000000
+      000000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6
+      C60000FFFF0000000000C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000
+      00000000000000000000C6C6C600000000000000000000FFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000
+      00000000000000000000FFFFFF00000000000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0000000000C6C6
+      C600C6C6C600C6C6C600C6C6C6000000000000000000FFFFFF0000FFFF000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF00000000000000000000000000000000000000000000000000FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000
+      00000000000000000000C6C6C600000000000000000000FFFF00FFFFFF000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C60000000000000000000000
+      00000000000000000000C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000
+      00000000000000000000FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C6000000000000000000FFFFFF0000FFFF000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF00000000000000000000000000000000000000000000000000FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF0000000000FFFFFF000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C60000000000000000000000
+      00000000000000000000C6C6C60000000000FFFFFF0000000000FFFFFF000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C60000000000000000000000
+      00000000000000000000C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000000000000000
+      00000000000000000000FFFFFF0000000000FFFFFF0084848400000000000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF0084848400000000000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C600C6C6C600C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF00000000000000000000000000FFFFFF000000000000000000FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF0084848400000000000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C6000000000000000000C6C6
+      C60000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C6000000000000000000C6C6
+      C60000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF000000000000000000FFFF
+      FF000000000000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C600C6C6C600C6C6C600C6C6
+      C60000000000C6C6C60000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C600C6C6C600C6C6C600C6C6
+      C60000000000C6C6C60000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF000000000000000000FFFFFF00000000000000000000000000FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C600C6C6C600C6C6C600C6C6
+      C6000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C600C6C6C600C6C6C600C6C6
+      C6000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C60000000000C6C6C600000000000000000000000000000000000000
+      000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C60000000000C6C6C600000000000000000000000000000000000000
+      000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF0000000000FFFFFF00000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600000000000000000000000000000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600000000000000000000000000000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF000000000000000000000000000000000000000000000000000000
+      00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      000000000000000000000000000000000000000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      000000000000000000000000000000000000000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000FFFFFF00FFFFFF00FFFFFF000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000000000FFFF00C6C6
+      C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF000000
+      000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000
+      0000000000000000000000000000000000000000000000FFFF000000000000FF
+      FF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FF
+      FF0000000000FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6
+      C60000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF0000FFFF000000
+      000000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6
+      C60000FFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C60000000000000000000000000000000000C6C6C600C6C6C600C6C6
+      C60000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000
+      00000000000000000000FFFFFF00000000000000000000FFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6
+      C60000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF00000000000000000000000000000000000000000000000000FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF0000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF0000FFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600000000000000000000000000000000000000000000000000C6C6
+      C60000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000
+      00000000000000000000FFFFFF00000000000000000000FFFF00FFFFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000000000000000
+      00000000000000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6
+      C60000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF00000000000000000000000000000000000000000000000000FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFFFF0000FFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600000000000000000000000000000000000000000000000000C6C6
+      C60000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000000000000000
+      00000000000000000000FFFFFF0000000000FFFFFF0000000000FFFFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000000000000000
+      00000000000000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6C600C6C6
+      C60000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF0084848400000000000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF0084848400000000000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600000000000000000000000000C6C6C600C6C6C600C6C6C600C6C6
+      C60000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF000000000000000000FFFF
+      FF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF000000000000000000FFFF
+      FF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C60000000000000000000000
+      000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF000000000000000000FFFFFF00FFFFFF0000000000FFFFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C6000000000000000000C6C6C600C6C6C60000000000C6C6C6000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000C6C6C600C6C6C600C6C6C600C6C6C600C6C6C6000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF0000000000FFFFFF00000000000000000000000000000000000000
+      000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF0000000000FFFFFF00000000000000000000000000000000000000
+      000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF00000000000000000000000000000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF00000000000000000000000000000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000
+      000000000000000000000000000000000000000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000
+      000000000000000000000000000000000000000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000
+      0000000000000000000000000000000000000000000000000000BDBDBD000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000
+      0000000000000000000000000000000000000000000000000000BDBDBD000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000000000000000BDBD
+      BD0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000000000000000BDBD
+      BD0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      000000FFFF0000000000000000000000000000FFFF0000000000008484000000
+      0000BDBDBD0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      000000FFFF0000000000000000000000000000FFFF0000000000008484000000
+      0000BDBDBD0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000008484000084
+      84000000000000000000FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      00000000000000000000000000000000000000FFFF0000000000008484000084
+      84000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000008484000084
+      840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FFFF0000FF
+      FF0000FFFF0000FFFF0000FFFF00000000000000000000000000008484000084
+      840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000000000FF
+      FF00BDBDBD0000FFFF00BDBDBD0000FFFF00BDBDBD0000FFFF00BDBDBD0000FF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000008484000084
+      840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FFFF000000
+      0000000000000000000000FFFF0000000000BDBDBD0000000000008484000084
+      840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF000000
+      000000FFFF00BDBDBD0000FFFF00BDBDBD0000FFFF00BDBDBD0000FFFF00BDBD
+      BD0000FFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000008484000084
+      840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FFFF0000FF
+      FF0000FFFF0000FFFF0000FFFF0000000000BDBDBD0000000000008484000084
+      840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FFFF00FFFF
+      FF000000000000FFFF00BDBDBD0000FFFF00BDBDBD0000FFFF00BDBDBD0000FF
+      FF00BDBDBD0000FFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      000000FFFF0000000000000000000000000000FFFF0000000000008484000084
+      840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FFFF0000FF
+      FF0000FFFF0000FFFF0000FFFF00000000000000000000000000008484000084
+      840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF0000FF
+      FF00FFFFFF000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000008484000084
+      840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      0000000000000000000000000000000000007B7B7B0000000000008484000084
+      840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000008484000084
+      840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF007B7B7B007B7B7B0000000000008484000084
+      840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000
+      0000000000000000000000000000000000000000000000000000000000000084
+      840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000
+      0000000000000000000000000000000000000000000000000000000000000084
+      840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF0000FFFF00FFFFFF0000FFFF0000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000007B7B
+      7B007B7B7B007B7B7B007B7B7B007B7B7B007B7B7B007B7B7B00000000000000
+      000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000007B7B
+      7B007B7B7B007B7B7B007B7B7B007B7B7B007B7B7B007B7B7B00000000000000
+      000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF007B7B
+      7B00000000000000000000000000000000007B7B7B00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      00000000000000FFFF000084840000FFFF000084840000FFFF00008484000000
+      000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000000000000084840000FFFF000084840000FFFF000084840000FFFF000000
+      000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF007B7B7B000000
+      00000000000000000000000000007B7B7B00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF0000000000000000000084840000FFFF000084840000FFFF000084
+      84000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00000000000000000000FFFF000084840000FFFF000084840000FF
+      FF000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF007B7B7B00000000000000000000000000000000000000
+      00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF007B7B7B00000000000000000000000000000000000000
+      00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00424D3E000000000000003E000000
       2800000040000000900000000100010000000000800400000000000000000000
       000000000000000000000000FFFFFF0000000000000000000000000000000000
@@ -640,246 +1216,486 @@
     Bitmap = {
       494C010108000900040014001000FFFFFF00FF10FFFFFFFFFFFFFFFF424D3600
-      000000000000360000002800000050000000300000000100100000000000001E
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000FF7FFF7FFF7FFF7FFF7F00000000
-      000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7F000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F000000000000000000000000
-      00000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000
-      000000000000000000000000FF7FFF7FFF7FFF7FFF7FFF7F0000000010421042
-      10421042104200000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7F00001002100210020000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000E07FE07FE07FE07FE07F
-      E07F0000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000E07F
-      E07FFF7FFF7FE07FE07F0000FF7FFF7FFF7FFF7FFF7F0000104210421863FF7F
-      FF7FFF7F1863104210420000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7F00001002100210020000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F000010421042104210421042
-      10420000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00001042
-      FF7F007C0000FF7F10420000FF7FFF7FFF7FFF7F000010421042FF7FFF7FFF7F
-      1F00FF7FFF7FFF7F104210420000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7F000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F000018631863186318631863
-      18630000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00001863
-      FF7F007C007C0000FF7F0000FF7FFF7FFF7FFF7F00001042FF7F1F00FF7FFF7F
-      FF7FFF7FFF7F1F00FF7F10420000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7F00001002100210020000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F000018630000186300000000
-      18630000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7F
-      007C007C007C0000FF7F0000FF7FFF7FFF7F000010421863FF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F186310420000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7F00001002100210020000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F000018631863186318631863
-      18630000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F1042
-      007C007C007C007C0000FF7FFF7FFF7FFF7F00001042FF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7F10420000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7F000010021002100210020000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F000010001000100010001000
-      10000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F1042007C
-      007C0000007C007C0000FF7FFF7FFF7FFF7F00001042FF7F0000000000000000
-      007CFF7FFF7FFF7F1F00FF7F10420000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7F000010021002100210020000FF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F000000000000000000000000
-      00000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F007C007C0000
-      FF7FFF7F1042007C007C0000FF7FFF7FFF7F00001042FF7FFF7FFF7FFF7FFF7F
-      FF7F0000FF7FFF7FFF7FFF7F10420000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7F000010021002100210020000FF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7F007C007C0000FF7FFF7FFF7F000010421863FF7FFF7FFF7FFF7F
-      FF7FFF7F0000FF7FFF7F186310420000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      000000000000FF7FFF7F00001002100210020000FF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7F007C007C0000FF7FFF7FFF7F00001042FF7F1F00FF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F10420000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000
-      1002100210020000000000001002100210020000FF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7F1042007C0000FF7FFF7FFF7F000010421042FF7FFF7FFF7F
-      1F00FF7FFF7FFF7F104210420000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000
-      1002100210021002100210021002100210020000FF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F1042007C0000FF7FFF7FFF7F0000104210421863FF7F
-      1F00FF7F1863104210420000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000
-      1002100210021002100210021002100210020000FF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7F1042007C0000FF7FFF7FFF7F0000000010421042
-      10421042104200000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      000000001002100210021002100200000000FF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000
-      000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7F00000000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7F000000000040FF7F00000000000000000000FF7F004000000000FF7F
-      FF7FFF7FFF7FFF7FFF7FFF7F000000001002FF7F00000000000000000000FF7F
-      100200000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7F0040000000000000007C0000007C0000000000000040FF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7F1002000000000000FF030000FF0300000000
-      00001002FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7F00000000007C1863FF7F0000FF7F1863007C00000000FF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000FF031863FF7F0000FF7F1863FF03
-      00000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000000000000000
-      000000000000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      0000000000000000000000000000000000000000FF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7F10420000007C18630000FF7FFF7FFF7F00001863007C00001042FF7F
-      FF7FFF7FFF7FFF7FFF7FFF7F10420000FF0318630000FF7FFF7FFF7F00001863
-      FF0300001042FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000E07FFF7FE07FFF7F
-      E07FFF7FE07FFF7FE07F0000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000
-      0000E07F1863E07F1863E07F1863E07F1863E07F0000FF7FFF7FFF7FFF7FFF7F
-      FF7FFF7F0000007C007CFF7FFF7FFF7FFF7FFF7FFF7FFF7F007C007C0000FF7F
-      FF7FFF7FFF7FFF7FFF7FFF7F0000FF03FF03FF7FFF7F0000FF7FFF7FFF7FFF7F
-      FF03FF030000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7FE07FFF7FE07F
-      FF7FE07FFF7FE07FFF7F0000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000
-      FF7F0000E07F1863E07F1863E07F1863E07F1863E07F0000FF7FFF7FFF7FFF7F
-      FF7FFF7F0000007C0000FF7F000000000000FF7FFF7F00000000007C0000FF7F
-      FF7FFF7FFF7FFF7FFF7FFF7F0000FF030000FF7FFF7FFF7F0000FF7FFF7F0000
-      0000FF030000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000E07FFF7FE07FFF7F
-      E07FFF7FE07FFF7FE07F0000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000
-      E07FFF7F0000E07F1863E07F1863E07F1863E07F1863E07F0000FF7FFF7FFF7F
-      FF7FE07F0000007C007CFF7FFF7FFF7F0000FF7FFF7FFF7F007C007C0000E07F
-      FF7FFF7FFF7FFF7FFF7FFF7F0000FF03FF03FF7FFF7FFF7F0000FF7FFF7FFF7F
-      FF03FF030000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7FE07FFF7FE07F
-      FF7FE07FFF7FE07FFF7F0000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000
-      FF7FE07FFF7F0000000000000000000000000000000000000000FF7FFF7FFF7F
-      FF7F000010420000007C18630000FF7F0000FF7F00001863007C000010420000
-      FF7FFF7FFF7FFF7FFF7FFF7F10420000FF0318630000FF7F0000FF7F00001863
-      FF0300001042FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000E07FFF7FE07FFF7F
-      E07FFF7FE07FFF7FE07F0000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000
-      E07FFF7FE07FFF7FE07FFF7FE07FFF7FE07F0000FF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FE07FE07F00000000007C1863FF7F0000FF7F1863007C00000000E07FE07F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000FF031863FF7F0000FF7F1863FF03
-      00000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7FE07FFF7FE07F
-      FF7FE07FFF7FE07FFF7F0000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000
-      FF7FE07FFF7FE07FFF7FE07FFF7FE07FFF7F0000FF7FFF7FFF7FFF7FFF7FFF7F
-      FF7F00000000000000000000007C007C007C007C007C00000000000000000000
-      FF7FFF7FFF7FFF7FFF7F00000000000000000000FF03FF03FF03FF03FF030000
-      0000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000
-      00000000000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000
-      E07FFF7FE07FFF7FE07FFF7F000000000000FF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7F000018631863104200000000000000000000000000001863104210420000
-      FF7FFF7FFF7FFF7FFF7F00001863186310420000000000000000000000000000
-      1863104210420000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000FF7FE07FFF7F
-      E07F0000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      0000E07FFF7FE07FFF7F0000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7F000018631863186318631042104200001042186318631863186310420000
-      FF7FFF7FFF7FFF7FFF7F00001863186318631863104210420000104218631863
-      1863186310420000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F1042000000000000
-      00001042FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      104200000000000000001042FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FE07F000010421863186300000000E07F000000001863186310420000E07F
-      FF7FFF7FFF7FFF7FFF7FFF7F0000104218631863000010420000104200001863
-      186310420000FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7F0000FF7F104200000000E07FE07FE07FE07FE07F000000001042FF7F0000
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7F104200000000FF7FFF7F0000FF7FFF7F0000
-      00001042FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7F0000E07FE07F0000E07F0000E07F0000E07FE07F0000FF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F000000000000FF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7F0000E07FE07F0000FF7FE07F0000E07FFF7F0000E07FE07F0000FF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F424D3E000000000000003E000000
+      000000000000360000002800000050000000300000000100200000000000003C
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000
+      000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF000000000000000000000000000000000000000000000000000000
+      000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000000000008484840084848400848484008484840084848400000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000848400008484
+      00008484000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FFFF0000FF
+      FF0000FFFF0000FFFF0000FFFF0000FFFF0000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF000000000000FFFF0000FFFF00FFFFFF00FFFFFF0000FFFF0000FF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000008484
+      840084848400C6C6C600FFFFFF00FFFFFF00FFFFFF00C6C6C600848484008484
+      840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000848400008484
+      00008484000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000848484008484
+      84008484840084848400848484008484840000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF000000000084848400FFFFFF000000FF0000000000FFFFFF008484
+      840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000848484008484
+      8400FFFFFF00FFFFFF00FFFFFF00FF000000FFFFFF00FFFFFF00FFFFFF008484
+      84008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000
+      000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF0000000000C6C6C600FFFFFF000000FF000000FF0000000000FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000084848400FFFF
+      FF00FF000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF000000FFFF
+      FF008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000848400008484
+      00008484000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000C6C6C6000000
+      0000C6C6C6000000000000000000C6C6C60000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF0000000000FFFFFF000000FF000000FF000000FF0000000000FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF000000000084848400C6C6C600FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00C6C6C6008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000848400008484
+      00008484000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000C6C6C600C6C6
+      C600C6C6C600C6C6C600C6C6C600C6C6C60000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00848484000000FF000000FF000000FF000000FF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000084848400FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000848400008484
+      0000848400008484000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000840000008400
+      00008400000084000000840000008400000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00848484000000FF000000FF00000000000000FF000000FF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000084848400FFFFFF000000
+      00000000000000000000000000000000FF00FFFFFF00FFFFFF00FFFFFF00FF00
+      0000FFFFFF008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000008484
+      000084840000848400008484000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF000000FF000000FF0000000000FFFFFF00FFFFFF00848484000000FF000000
+      FF0000000000FFFFFF00FFFFFF00FFFFFF000000000084848400FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      00008484000084840000848400008484000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000FF000000
+      FF0000000000FFFFFF00FFFFFF00FFFFFF000000000084848400C6C6C600FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFF
+      FF00C6C6C6008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000FFFFFF00FFFF
+      FF000000000084840000848400008484000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      FF000000FF0000000000FFFFFF00FFFFFF00FFFFFF000000000084848400FFFF
+      FF00FF000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000848400008484000084840000000000000000
+      00000000000084840000848400008484000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008484
+      84000000FF0000000000FFFFFF00FFFFFF00FFFFFF0000000000848484008484
+      8400FFFFFF00FFFFFF00FFFFFF00FF000000FFFFFF00FFFFFF00FFFFFF008484
+      84008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000848400008484000084840000848400008484
+      00008484000084840000848400008484000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00848484000000FF0000000000FFFFFF00FFFFFF00FFFFFF00000000008484
+      840084848400C6C6C600FFFFFF00FF000000FFFFFF00C6C6C600848484008484
+      840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000848400008484000084840000848400008484
+      00008484000084840000848400008484000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00848484000000FF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000000000008484840084848400848484008484840084848400000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00000000000000000084840000848400008484
+      000084840000848400000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      8400FFFFFF000000000000000000000000000000000000000000FFFFFF000000
+      84000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00000000000000000084840000FFFFFF0000000000000000000000
+      00000000000000000000FFFFFF00848400000000000000000000FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000084000000
+      000000000000000000000000FF00000000000000FF0000000000000000000000
+      000000008400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0084840000000000000000000000000000FFFF00000000
+      0000FFFF000000000000000000000000000084840000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000
+      00000000FF00C6C6C600FFFFFF0000000000FFFFFF00C6C6C6000000FF000000
+      000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF000000000000000000FFFF0000C6C6C600FFFFFF000000
+      0000FFFFFF00C6C6C600FFFF00000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0084848400000000000000
+      FF00C6C6C60000000000FFFFFF00FFFFFF00FFFFFF0000000000C6C6C6000000
+      FF000000000084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF008484840000000000FFFF0000C6C6C60000000000FFFFFF00FFFF
+      FF00FFFFFF0000000000C6C6C600FFFF00000000000084848400FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00000000000000000000FFFF00C6C6C60000FFFF00C6C6
+      C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF0000000000FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000FF000000
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      FF000000FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF0000000000FFFF0000FFFF0000FFFFFF00FFFFFF0000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFF0000FFFF000000000000FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000FFFFFF000000000000FFFF00C6C6C60000FF
+      FF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF0000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000FF000000
+      0000FFFFFF00000000000000000000000000FFFFFF00FFFFFF00000000000000
+      00000000FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF0000000000FFFF000000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF000000000000000000FFFF000000000000FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF000000000000FFFF00FFFFFF000000000000FFFF00C6C6
+      C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF00000000000000FF000000
+      FF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      FF000000FF000000000000FFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF0000000000FFFF0000FFFF0000FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFF0000FFFF000000000000FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFFFF00000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000084848400000000000000
+      FF00C6C6C60000000000FFFFFF0000000000FFFFFF0000000000C6C6C6000000
+      FF00000000008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF008484840000000000FFFF0000C6C6C60000000000FFFFFF000000
+      0000FFFFFF0000000000C6C6C600FFFF00000000000084848400FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF0000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF0000FFFF00000000000000
+      00000000FF00C6C6C600FFFFFF0000000000FFFFFF00C6C6C6000000FF000000
+      00000000000000FFFF0000FFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF000000000000000000FFFF0000C6C6C600FFFFFF000000
+      0000FFFFFF00C6C6C600FFFF00000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000
+      0000000000000000FF000000FF000000FF000000FF000000FF00000000000000
+      0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF000000000000000000000000000000000000000000FFFF0000FFFF0000FFFF
+      0000FFFF0000FFFF00000000000000000000000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
+      FF00FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000C6C6C600C6C6C6008484
+      840000000000000000000000000000000000000000000000000000000000C6C6
+      C600848484008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000C6C6C600C6C6C600848484000000000000000000000000000000
+      0000000000000000000000000000C6C6C600848484008484840000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF0000FFFF00FFFFFF0000FFFF0000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF000000000000FFFF00FFFFFF0000FFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000C6C6C600C6C6C600C6C6
+      C600C6C6C60084848400848484000000000084848400C6C6C600C6C6C600C6C6
+      C600C6C6C6008484840000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000C6C6C600C6C6C600C6C6C600C6C6C60084848400848484000000
+      000084848400C6C6C600C6C6C600C6C6C600C6C6C6008484840000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF008484
+      84000000000000000000000000000000000084848400FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00848484000000000000000000000000000000
+      000084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000FFFF000000000084848400C6C6
+      C600C6C6C600000000000000000000FFFF000000000000000000C6C6C600C6C6
+      C600848484000000000000FFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF000000000084848400C6C6C600C6C6C60000000000848484000000
+      00008484840000000000C6C6C600C6C6C6008484840000000000FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00848484000000
+      00000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF00000000000000
+      000084848400FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00848484000000000000000000FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF00000000000000000084848400FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FF
+      FF0000FFFF000000000000FFFF000000000000FFFF000000000000FFFF0000FF
+      FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000
+      000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000FFFF0000FF
+      FF0000000000FFFFFF0000FFFF000000000000FFFF00FFFFFF000000000000FF
+      FF0000FFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00424D3E000000000000003E000000
       2800000050000000300000000100010000000000400200000000000000000000
       000000000000000000000000FFFFFF0000000000000000000000000000000000
@@ -909,324 +1725,644 @@
     Bitmap = {
       494C01010F001300040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
-      0000000000003600000028000000400000005000000001001000000000000028
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      FF7FFF7F00000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000000000001042FF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F00000000000000000000000000000000000000001042
-      1042FF7FFF7F0000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000104210420000
-      000000000000FF7FFF7F00000000000000000000000000000000000000001042
-      00000000FF7F0000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000010420000
-      000000000000FF7F000000000000000000000000000000000000000010421042
-      00000000FF7FFF7F000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000010421042
-      00000000FF7FFF7F000000000000000000000000000000000000000010420000
-      000000000000FF7F000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000001042
-      00000000FF7F0000000000000000000000000000000000000000104210420000
-      000000000000FF7FFF7F00000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000001042
-      1042FF7FFF7F0000000000000000000000000000000000000000104210421042
-      1042104210421042FF7F00000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      1042FF7F00000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F00000000000000000000000000000000000000000000
-      FF7F0000000000000000FF7FFF7FFF7F00000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F00000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000FF7F00000000
-      00000000FF7FFF7FFF7F00000000000000000000FF7FFF7FFF7FFF7FFF7F0000
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F00000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F00000000000000000000FF7FFF7FFF7FFF7FFF7F0000
-      FF7F000000000000000000000000FF7F00000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F0000000000000000000000000000E07F1863E07F1863
-      E07F0000E07F1863E07F00000000000000000000000000000000FF7F00000000
-      0000000000000000FF7F00000000000000000000FF7FFF7FFF7FFF7FFF7F0000
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F000000000000000000000000FF7F0000E07F1863E07F
-      00000000000000001863E07F0000000000000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F00000000000000000000FF7FFF7FFF7FFF7FFF7F0000
-      FF7F000000000000000000000000FF7F00000000000000000000FF7FFF7FFF7F
-      0000FF7FFF7FFF7FFF7F000000000000000000000000E07FFF7F0000E07F1863
-      E07F186300001863E07F1863E07F000000000000000000000000FF7F00000000
-      0000000000000000FF7F00000000000000000000FF7FFF7F0000FF7FFF7F0000
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000FF7FFF7FFF7F
-      0000FF7FFF7FFF7FFF7F000000000000000000000000FF7FE07F000000000000
-      0000000000000000000000000000000000000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F00000000000000000000FF7FFF7F0000FF7FFF7F0000
-      FF7F000000000000FF7FFF7FFF7FFF7F00000000000000000000FF7F00000000
-      000000000000FF7FFF7F000000000000000000000000E07FFF7FE07FFF7FE07F
-      FF7FE07FFF7FE07F000000000000000000000000000000000000FF7F00000000
-      0000FF7FFF7FFF7FFF7F00000000000000000000000000000000000000000000
-      FF7FFF7FFF7FFF7FFF7F00000000000000000000000000000000FF7FFF7FFF7F
-      0000FF7FFF7FFF7FFF7F000000000000000000000000FF7FE07FFF7FE07FFF7F
-      E07FFF7FE07FFF7F000000000000000000000000000000000000FF7FFF7FFF7F
-      FF7FFF7F00000000000000000000000000000000FF7FFF7F0000FF7FFF7F0000
-      FF7F00000000FF7FFF7F0000FF7F000000000000000000000000FF7FFF7FFF7F
-      0000FF7FFF7FFF7FFF7F000000000000000000000000E07FFF7FE07FFF7FE07F
-      FF7F000000000000000000000000000000000000000000000000FF7F00000000
-      FF7FFF7F0000FF7F000000000000000000000000FF7FFF7F0000FF7FFF7F0000
-      FF7FFF7FFF7FFF7FFF7F00000000000000000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F0000000000000000000000000000E07FFF7FE07FFF7F
-      0000000000000000000000000000000000000000000000000000FF7FFF7FFF7F
-      FF7FFF7F00000000000000000000000000000000FF7FFF7FFF7FFF7FFF7F0000
-      0000000000000000000000000000000000000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F00000000000000000000000010420000000000000000
-      1042000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000FF7FFF7FFF7FFF7FFF7FFF7F
-      FF7F000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      FF7F0000000000000000FF7FFF7FFF7F00000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000FF7FFF7FFF7FFF7FFF7F0000
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000FF7FFF7FFF7FFF7FFF7F0000
-      FF7F000000000000000000000000FF7F0000000000000000E07FFF7FE07FFF7F
-      E07FFF7FE07FFF7FE07F00000000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000000000E07FFF7FE07FFF7F
-      0000FF7FE07FFF7FE07F00000000000000000000FF7FFF7FFF7FFF7FFF7F0000
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000000000000000FF7FE07FFF7FE07F
-      FF7FE07FFF7FE07FFF7F0000000000000000000000000000E07FF75EE07FF75E
-      E07FF75EE07FF75EE07F0000000000000000000000000000FF7FE07FFF7FE07F
-      0000E07FFF7FE07FFF7F00000000000000000000FF7FFF7FFF7FFF7FFF7F0000
-      FF7F000000000000000000000000FF7F0000000000000000E07FFF7FE07FFF7F
-      E07FFF7FE07FFF7FE07F000000000000000000000000FF7F0000E07FF75EE07F
-      F75EE07FF75EE07FF75EE07F000000000000000000000000E07FFF7F00000000
-      000000000000FF7FE07F00000000000000000000FF7FFF7F0000FF7FFF7F0000
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000000000000000FF7FE07FFF7FE07F
-      FF7FE07FFF7FE07FFF7F000000000000000000000000E07FFF7F0000E07FF75E
-      E07FF75EE07FF75EE07FF75EE07F00000000000000000000FF7FE07FFF7FE07F
-      0000E07FFF7FE07FFF7F00000000000000000000FF7FFF7F0000FF7FFF7F0000
-      FF7F000000000000FF7F00000000FF7F0000000000000000E07FFF7FE07FFF7F
-      E07FFF7FE07FFF7FE07F000000000000000000000000FF7FE07FFF7F00000000
-      000000000000000000000000000000000000000000000000E07FFF7FE07FFF7F
-      0000FF7FE07FFF7FE07F00000000000000000000000000000000000000000000
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F0000000000000000FF7FE07FFF7FE07F
-      FF7FE07FFF7FE07FFF7F000000000000000000000000E07FFF7FE07FFF7FE07F
-      FF7FE07FFF7FE07F00000000000000000000000000000000FF7FE07FFF7FE07F
-      FF7FE07FFF7FE07FFF7F00000000000000000000FF7FFF7F0000FF7FFF7F0000
-      FF7F00000000FF7F000000000000FF7F00000000000000000000000000000000
-      00000000000000000000000000000000000000000000FF7FE07FFF7FE07FFF7F
-      E07FFF7FE07FFF7F000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000FF7FFF7F0000FF7FFF7F0000
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000FF7FE07FFF7F
-      E07F0000000000000000000000000000000000000000E07FFF7FE07FFF7FE07F
-      FF7F000000000000000000000000000000000000000000000000FF7FE07FFF7F
-      E07F000000000000000000000000000000000000FF7FFF7FFF7FFF7FFF7F0000
-      000000000000000000000000000000000000000000000000EF3D000000000000
-      0000EF3D0000000000000000000000000000000000000000E07FFF7FE07FFF7F
-      0000000000000000000000000000000000000000000000001042000000000000
-      0000104200000000000000000000000000000000FF7FFF7FFF7FFF7FFF7FFF7F
-      FF7F000000000000000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000EF3D0000000000000000
-      EF3D000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000F75E000000000000000000000000000000000000000000000000
-      000000000000F75E000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000E07FE07FE07F
-      E07FE07F00000000F75E00000000000000000000000000000000E07FE07FE07F
-      E07FE07F00000000F75E00000000000000000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F000000000000000000000000000000000000E07FE07F
-      E07F000000000000000000000000000000000000000000000000E07F00000000
-      0000E07F000000420000F75E0000000000000000000000000000E07F00000000
-      0000E07F000000420000F75E0000000000000000000000000000FF7F00000000
-      00000000FF7FFF7FFF7F000000000000000000000000000000000000E07FE07F
-      0000000000000000000000000000000000000000000000000000E07FE07FE07F
-      E07FE07F00000042004200000000000000000000000000000000000000000000
-      0000E07F00000042004200000000000000000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F00000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000E07FE07FE07F
-      E07FE07F000000420042000000000000000000000000E07FE07FE07FE07FE07F
-      0000000000000042004200000000000000000000000000000000FF7F00000000
-      0000000000000000FF7F00000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      00000000000000420042000000000000000000000000E07F000000000000E07F
-      0000F75E00000042004200000000000000000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F00000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000E07FE07FE07F
-      E07FE07F000000420042000000000000000000000000E07FE07FE07FE07FE07F
-      0000F75E00000042004200000000000000000000000000000000FF7F00000000
-      0000000000000000FF7F000000000000000000000000000000000000E07FE07F
-      E07F000000000000000000000000000000000000000000000000E07F00000000
-      0000E07F000000420042000000000000000000000000E07FE07FE07FE07FE07F
-      0000000000000042004200000000000000000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F000000000000000000000000000000000000E07FE07F
-      0000000000000000000000000000000000000000000000000000E07FE07FE07F
-      E07FE07F00000042004200000000000000000000000000000000000000000000
-      0000EF3D00000042004200000000000000000000000000000000FF7F00000000
-      0000FF7F00000000FF7F00000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000E07FE07FE07F
-      E07FE07F00000042004200000000000000000000000000000000FF7FFF7FFF7F
-      EF3DEF3D00000042004200000000000000000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F00000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000004200000000000000000000000000000000000000000000
-      0000000000000000004200000000000000000000000000000000FF7F00000000
-      FF7F000000000000FF7F00000000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000000000EF3DEF3DEF3DEF3D
-      EF3DEF3DEF3D000000000000000000000000000000000000EF3DEF3DEF3DEF3D
-      EF3DEF3DEF3D0000000000000000000000000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F00000000000000000000E07FE07FE07F000000000000
-      00000000000000000000000000000000000000000000000000000000E07F0042
-      E07F0042E07F004200000000000000000000000000000000000000000042E07F
-      0042E07F0042E07F000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000E07FE07F0000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0042E07F0042E07F004200000000000000000000000000000000000000000000
-      E07F0042E07F0042E07F00000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000000000000000000000EF3D
-      000000000000000000000000000000000000000000000000000000000000EF3D
+      0000000000003600000028000000400000005000000001002000000000000050
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000FFFFFF00FFFFFF0000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000084848400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      000000000000000000008484840084848400FFFFFF00FFFFFF00000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000848484008484840000000000000000000000000000000000FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000848484000000000000000000FFFFFF00000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000008484840000000000000000000000000000000000FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000084848400848484000000000000000000FFFFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000084848400848484000000000000000000FFFFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000008484840000000000000000000000000000000000FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000848484000000000000000000FFFFFF00000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000848484008484840000000000000000000000000000000000FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000008484840084848400FFFFFF00FFFFFF00000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000084848400848484008484840084848400848484008484840084848400FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000084848400FFFFFF0000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000FFFFFF000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000FFFFFF000000000000000000000000000000
+      00000000000000000000FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF000000000000000000000000000000000000000000000000000000000000FF
+      FF00C6C6C60000FFFF00C6C6C60000FFFF000000000000FFFF00C6C6C60000FF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00000000000000000000000000000000000000000000000000FFFF
+      FF000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000FFFFFF000000
+      000000FFFF00C6C6C60000FFFF0000000000000000000000000000000000C6C6
+      C60000FFFF000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000FFFFFF000000000000000000000000000000
+      00000000000000000000FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000000000000000000000000000000000000000000000FFFF00FFFF
+      FF000000000000FFFF00C6C6C60000FFFF00C6C6C60000000000C6C6C60000FF
+      FF00C6C6C60000FFFF0000000000000000000000000000000000000000000000
+      0000FFFFFF00000000000000000000000000000000000000000000000000FFFF
+      FF000000000000000000000000000000000000000000FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000FFFFFF0000FF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF000000000000000000000000000000000000000000FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF0000000000FFFFFF00000000000000000000000000FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF
+      FF0000000000000000000000000000000000000000000000000000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      00000000000000000000000000000000000000000000FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF0000000000FFFFFF000000000000000000FFFFFF00FFFF
+      FF0000000000FFFFFF0000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000000000000000000000000000000000000000000000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF000000000000000000FFFFFF00FFFFFF0000000000FFFFFF000000
+      00000000000000000000000000000000000000000000FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF000000000000000000000000000000000000000000000000000000000000FF
+      FF00FFFFFF0000FFFF00FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000848484000000
+      0000000000000000000000000000848484000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000FFFFFF000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000FFFFFF000000000000000000000000000000
+      00000000000000000000FFFFFF000000000000000000000000000000000000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000000000000000000000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFFFF0000FF
+      FF000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+      FF000000000000000000000000000000000000000000000000000000000000FF
+      FF00BDBDBD0000FFFF00BDBDBD0000FFFF00BDBDBD0000FFFF00BDBDBD0000FF
+      FF0000000000000000000000000000000000000000000000000000000000FFFF
+      FF0000FFFF00FFFFFF0000FFFF000000000000FFFF00FFFFFF0000FFFF00FFFF
+      FF000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000FFFFFF000000000000000000000000000000
+      00000000000000000000FFFFFF000000000000000000000000000000000000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
+      FF00000000000000000000000000000000000000000000000000FFFFFF000000
+      000000FFFF00BDBDBD0000FFFF00BDBDBD0000FFFF00BDBDBD0000FFFF00BDBD
+      BD0000FFFF0000000000000000000000000000000000000000000000000000FF
+      FF00FFFFFF000000000000000000000000000000000000000000FFFFFF0000FF
+      FF000000000000000000000000000000000000000000FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+      FF0000000000000000000000000000000000000000000000000000FFFF00FFFF
+      FF000000000000FFFF00BDBDBD0000FFFF00BDBDBD0000FFFF00BDBDBD0000FF
+      FF00BDBDBD0000FFFF000000000000000000000000000000000000000000FFFF
+      FF0000FFFF00FFFFFF0000FFFF000000000000FFFF00FFFFFF0000FFFF00FFFF
+      FF000000000000000000000000000000000000000000FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF0000000000FFFFFF00000000000000000000000000FFFF
+      FF000000000000000000FFFFFF000000000000000000000000000000000000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
+      FF00000000000000000000000000000000000000000000000000FFFFFF0000FF
+      FF00FFFFFF000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000000000000000000000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000000000FFFFFF0000FFFF00FFFFFF0000FF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF0000000000000000000000000000000000FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+      FF0000000000000000000000000000000000000000000000000000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF000000
+      000000000000000000000000000000000000000000000000000000000000FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+      FF000000000000000000000000000000000000000000FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF0000000000FFFFFF000000000000000000FFFFFF000000
+      00000000000000000000FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF0000FFFF00FFFFFF0000FFFF000000000000000000000000000000
+      000000000000000000000000000000000000000000000000000000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF0000FFFF00FFFFFF0000FFFF000000000000000000000000000000
+      00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000007B7B
+      7B00000000000000000000000000000000007B7B7B0000000000000000000000
+      00000000000000000000000000000000000000000000000000000000000000FF
+      FF00FFFFFF0000FFFF00FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      8400000000000000000000000000000000008484840000000000000000000000
+      00000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000000000007B7B7B000000
+      00000000000000000000000000007B7B7B000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000BDBDBD000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000BDBDBD000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000000000000000BDBD
+      BD00000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000000000000000BDBD
+      BD00000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      00000000000000FFFF0000FFFF0000FFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000000000000000000000000000FFFF0000000000008484000000
+      0000BDBDBD000000000000000000000000000000000000000000000000000000
+      000000FFFF0000000000000000000000000000FFFF0000000000008484000000
+      0000BDBDBD000000000000000000000000000000000000000000000000000000
+      0000FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      00000000000000FFFF0000FFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000008484000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000FFFF0000000000008484000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000008484000084
+      840000000000000000000000000000000000000000000000000000FFFF0000FF
+      FF0000FFFF0000FFFF0000FFFF00000000000000000000000000008484000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00000000000000000000000000000000000000000000000000FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000008484000084
+      840000000000000000000000000000000000000000000000000000FFFF000000
+      0000000000000000000000FFFF0000000000BDBDBD0000000000008484000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000008484000084
+      840000000000000000000000000000000000000000000000000000FFFF0000FF
+      FF0000FFFF0000FFFF0000FFFF0000000000BDBDBD0000000000008484000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00000000000000000000000000000000000000000000000000FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      00000000000000FFFF0000FFFF0000FFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000000000000000000000000000FFFF0000000000008484000084
+      840000000000000000000000000000000000000000000000000000FFFF0000FF
+      FF0000FFFF0000FFFF0000FFFF00000000000000000000000000008484000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      00000000000000FFFF0000FFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000008484000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000007B7B7B0000000000008484000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00000000000000000000000000FFFFFF000000000000000000FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000008484000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF007B7B7B007B7B7B0000000000008484000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF000000000000000000FFFFFF00000000000000000000000000FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000007B7B
+      7B007B7B7B007B7B7B007B7B7B007B7B7B007B7B7B007B7B7B00000000000000
+      0000000000000000000000000000000000000000000000000000000000007B7B
+      7B007B7B7B007B7B7B007B7B7B007B7B7B007B7B7B007B7B7B00000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000FFFF0000FFFF0000FF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000FFFF000084840000FFFF000084840000FFFF00008484000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000084840000FFFF000084840000FFFF000084840000FFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000FFFF0000FFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000084840000FFFF000084840000FFFF000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000FFFF000084840000FFFF000084840000FF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000007B7B7B00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000007B7B7B00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       000000000000000000000000000000000000424D3E000000000000003E000000
@@ -1260,198 +2396,390 @@
     Bitmap = {
       494C010106000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
-      0000000000003600000028000000400000003000000001001000000000000018
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000001042000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000000010421F001F001F00
-      1F001F001F001F001F000000000000000000000000000000007C007C10421042
-      1042104210421042104200000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000000010421F001F001F00
-      1F001F001F001F001F000000000000000000000000000000007C007C007C1042
-      1042104210421042104200000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000000010421F0000000000
-      0000000000000000000000000000000000000000000000000000007C007C1042
-      1042104210421863186300000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000001042FF0300000000
-      0000000000000000000000000000000000000000000000000000007C007C007C
-      0000186318631863186300000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000001042000000000000
-      00000000000000000000000000000000000000000000000000000000007C007C
-      007C007C18631863186300000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000001042FF0300000000
-      0000000000000000000000000000000000000000000000000000186318631863
-      007C007C18631863000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000000000104218630000E07F
-      FF030000FF030000FF0300000000000000000000000000000000186300001863
-      007C007C007C0000186300000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000000010421863E07F0000
-      1863FF030000FF03000000000000000000000000000000000000186318630000
-      1863007C007C007C000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000001042000018631863
-      FF030000FF030000FF0300000000000000000000000000000000000018631863
-      18630000007C007C007C00000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000001042FF030000FF03
-      0000FF030000FF03000000000000000000000000000000000000186300001863
-      0000186300001863007C00000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000001042104210421042
-      1042104210421042104210420000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000010420000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000104200000000
-      0000000000000000000000000000000000000000000000000000000010421F00
-      1F001F001F001F001F001F001F00000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000001042000000000000
-      000000000000000000000000000000000000000000000000000010421F001F00
-      1F001F001F001F001F001F000000000000000000000000001042000010421F00
-      1F001F001F001F001F001F001F00000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000000010421F001F001F00
-      1F001F001F001F001F000000000000000000000000001042000010421F001F00
-      1F001F001F001F001F001F0000000000000000000000000010421F0010421F00
-      1F001F001F001F001F0000020002000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000000010421F001F001F00
-      1F001F001F001F001F0000000000000000000000000010421F0010421F001F00
-      1F001F001F001F000002000200000000000000001042000010421F001042FF03
-      0000FF0300000002000200020002000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000000010421F001F001F00
-      1F001F001F000002000200000000000000000000000010421F001042FF030000
-      FF0300000002000200020002000000000000000010421F0010421F0010420000
-      FF030000FF030000FF0300020002000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000001042FF030000FF03
-      0000000200020002000200000000000000000000000010421F0010420000FF03
-      0000FF030000FF0300020002000000000000000010421F001042FF031042FF03
-      186318630000FF030000FF030000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000000010420000FF030000
-      FF030000FF03000200020000000000000000000000001042FF031042FF031863
-      18630000FF030000FF030000000000000000000010421F001042000010421863
-      0000E07F18630000FF030000FF03000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000001042FF0318631863
-      0000FF030000FF03000000000000000000000000000010420000104218630000
-      E07F18630000FF030000FF0300000000000000001042FF031042FF0310421863
-      E07F00001863FF030000FF030000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000000000104218630000E07F
-      18630000FF030000FF030000000000000000000000001042FF0310421863E07F
-      00001863FF030000FF0300000000000000000000104200001042186310420000
-      18631863FF030000FF030000FF03000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000000010421863E07F0000
-      1863FF030000FF03000000000000000000000000000010421863104200001863
-      1863FF030000FF030000FF0300000000000000001042FF03104218631042FF03
-      0000FF030000FF030000FF030000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000001042000018631863
-      FF030000FF030000FF03000000000000000000000000104218631042FF030000
-      FF030000FF030000FF0300000000000000000000104218631042000010421042
-      1042104210421042104210421042104200000000000000000000000000000000
-      0000000000000000000000000000000000000000000000001042FF030000FF03
-      0000FF030000FF03000000000000000000000000000010420000104210421042
-      1042104210421042104210421042000000000000104218631042FF030000FF03
-      0000FF030000FF03000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000001042104210421042
-      104210421042104210421042000000000000000000001042FF030000FF030000
-      FF030000FF030000000000000000000000000000104200001042104210421042
-      1042104210421042104210420000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000010421042104210421042
-      10421042104210421042000000000000000000001042FF030000FF030000FF03
-      0000FF0300000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000104210421042104210421042
-      104210421042104200000000000000000000424D3E000000000000003E000000
+      0000000000003600000028000000400000003000000001002000000000000030
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      8400FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00
+      0000000000000000000000000000000000000000000000000000000000000000
+      FF000000FF008484840084848400848484008484840084848400848484008484
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      8400FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00
+      0000000000000000000000000000000000000000000000000000000000000000
+      FF000000FF000000FF0084848400848484008484840084848400848484008484
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      8400FF0000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000FF000000FF0084848400848484008484840084848400C6C6C600C6C6
+      C600000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      8400FFFF00000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000FF000000FF000000FF0000000000C6C6C600C6C6C600C6C6C600C6C6
+      C600000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000FF000000FF000000FF000000FF00C6C6C600C6C6C600C6C6
+      C600000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      8400FFFF00000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000C6C6C600C6C6C600C6C6C6000000FF000000FF00C6C6C600C6C6C6000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      8400C6C6C6000000000000FFFF00FFFF000000000000FFFF000000000000FFFF
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000C6C6C60000000000C6C6C6000000FF000000FF000000FF0000000000C6C6
+      C600000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      8400C6C6C60000FFFF0000000000C6C6C600FFFF000000000000FFFF00000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000C6C6C600C6C6C60000000000C6C6C6000000FF000000FF000000FF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      840000000000C6C6C600C6C6C600FFFF000000000000FFFF000000000000FFFF
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000C6C6C600C6C6C600C6C6C600000000000000FF000000FF000000
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      8400FFFF000000000000FFFF000000000000FFFF000000000000FFFF00000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000C6C6C60000000000C6C6C60000000000C6C6C60000000000C6C6C6000000
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      8400848484008484840084848400848484008484840084848400848484008484
+      8400848484000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000848484000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000084848400FF000000FF000000FF000000FF000000FF000000FF00
+      0000FF000000FF00000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000084848400FF000000FF000000FF000000FF000000FF000000FF000000FF00
+      0000FF0000000000000000000000000000000000000000000000000000008484
+      84000000000084848400FF000000FF000000FF000000FF000000FF000000FF00
+      0000FF000000FF00000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      8400FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00
+      0000000000000000000000000000000000000000000000000000848484000000
+      000084848400FF000000FF000000FF000000FF000000FF000000FF000000FF00
+      0000FF0000000000000000000000000000000000000000000000000000008484
+      8400FF00000084848400FF000000FF000000FF000000FF000000FF000000FF00
+      0000008400000084000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      8400FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF00
+      000000000000000000000000000000000000000000000000000084848400FF00
+      000084848400FF000000FF000000FF000000FF000000FF000000FF0000000084
+      0000008400000000000000000000000000000000000084848400000000008484
+      8400FF00000084848400FFFF000000000000FFFF000000000000008400000084
+      0000008400000084000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      8400FF000000FF000000FF000000FF000000FF000000FF000000008400000084
+      000000000000000000000000000000000000000000000000000084848400FF00
+      000084848400FFFF000000000000FFFF00000000000000840000008400000084
+      0000008400000000000000000000000000000000000084848400FF0000008484
+      8400FF0000008484840000000000FFFF000000000000FFFF000000000000FFFF
+      0000008400000084000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      8400FFFF000000000000FFFF0000000000000084000000840000008400000084
+      000000000000000000000000000000000000000000000000000084848400FF00
+      00008484840000000000FFFF000000000000FFFF000000000000FFFF00000084
+      0000008400000000000000000000000000000000000084848400FF0000008484
+      8400FFFF000084848400FFFF0000C6C6C600C6C6C60000000000FFFF00000000
+      0000FFFF00000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      840000000000FFFF000000000000FFFF000000000000FFFF0000008400000084
+      000000000000000000000000000000000000000000000000000084848400FFFF
+      000084848400FFFF0000C6C6C600C6C6C60000000000FFFF000000000000FFFF
+      0000000000000000000000000000000000000000000084848400FF0000008484
+      84000000000084848400C6C6C6000000000000FFFF00C6C6C60000000000FFFF
+      000000000000FFFF000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      8400FFFF0000C6C6C600C6C6C60000000000FFFF000000000000FFFF00000000
+      0000000000000000000000000000000000000000000000000000848484000000
+      000084848400C6C6C6000000000000FFFF00C6C6C60000000000FFFF00000000
+      0000FFFF00000000000000000000000000000000000084848400FFFF00008484
+      8400FFFF000084848400C6C6C60000FFFF0000000000C6C6C600FFFF00000000
+      0000FFFF00000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      8400C6C6C6000000000000FFFF00C6C6C60000000000FFFF000000000000FFFF
+      000000000000000000000000000000000000000000000000000084848400FFFF
+      000084848400C6C6C60000FFFF0000000000C6C6C600FFFF000000000000FFFF
+      0000000000000000000000000000000000000000000084848400000000008484
+      8400C6C6C6008484840000000000C6C6C600C6C6C600FFFF000000000000FFFF
+      000000000000FFFF000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      8400C6C6C60000FFFF0000000000C6C6C600FFFF000000000000FFFF00000000
+      000000000000000000000000000000000000000000000000000084848400C6C6
+      C6008484840000000000C6C6C600C6C6C600FFFF000000000000FFFF00000000
+      0000FFFF00000000000000000000000000000000000084848400FFFF00008484
+      8400C6C6C60084848400FFFF000000000000FFFF000000000000FFFF00000000
+      0000FFFF00000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      840000000000C6C6C600C6C6C600FFFF000000000000FFFF000000000000FFFF
+      000000000000000000000000000000000000000000000000000084848400C6C6
+      C60084848400FFFF000000000000FFFF000000000000FFFF000000000000FFFF
+      0000000000000000000000000000000000000000000084848400C6C6C6008484
+      8400000000008484840084848400848484008484840084848400848484008484
+      8400848484008484840084848400000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      8400FFFF000000000000FFFF000000000000FFFF000000000000FFFF00000000
+      0000000000000000000000000000000000000000000000000000848484000000
+      0000848484008484840084848400848484008484840084848400848484008484
+      8400848484008484840000000000000000000000000084848400C6C6C6008484
+      8400FFFF000000000000FFFF000000000000FFFF000000000000FFFF00000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      8400848484008484840084848400848484008484840084848400848484008484
+      840084848400000000000000000000000000000000000000000084848400FFFF
+      000000000000FFFF000000000000FFFF000000000000FFFF0000000000000000
+      0000000000000000000000000000000000000000000084848400000000008484
+      8400848484008484840084848400848484008484840084848400848484008484
+      8400848484000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000848484008484
+      8400848484008484840084848400848484008484840084848400848484008484
+      8400000000000000000000000000000000000000000084848400FFFF00000000
+      0000FFFF000000000000FFFF000000000000FFFF000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000084848400848484008484
+      8400848484008484840084848400848484008484840084848400848484000000
+      000000000000000000000000000000000000424D3E000000000000003E000000
       2800000040000000300000000100010000000000800100000000000000000000
       000000000000000000000000FFFFFF0000000000000000000000000000000000
@@ -1476,514 +2804,1026 @@
     Bitmap = {
       494C01010A000E00040020001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
-      0000000000003600000028000000800000004000000001001000000000000040
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000000000E07F1863E07F1863
-      E07F1863E07F1863E07F00000000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000000000E07F1863E07F1863
-      E07F1863E07F1863E07F00000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000FF7F0000E07F1863E07F
-      1863E07F1863E07F1863E07F0000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000FF7F0000E07F1863E07F
-      1863E07F1863E07F1863E07F0000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000E07FFF7F0000E07F1863
-      E07F1863E07F1863E07F1863E07F000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000E07FFF7F0000E07F1863
-      E07F1863E07F1863E07F1863E07F000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000FF7FE07FFF7F00000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000FF7FE07FFF7F00000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000E07FFF7FE07FFF7FE07F
-      FF7FE07FFF7FE07F000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000E07FFF7FE07FFF7FE07F
-      FF7FE07FFF7FE07F000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000FF7FE07FFF7FE07FFF7F
-      E07FFF7FE07FFF7F000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000FF7FE07FFF7FE07FFF7F
-      E07FFF7FE07FFF7F000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000E07FFF7FE07FFF7FE07F
-      FF7F000000000000000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000E07FFF7FE07FFF7FE07F
-      FF7F000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000000000E07FFF7FE07FFF7F
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000000000E07FFF7FE07FFF7F
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000010420000000000000000
-      1042000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000010420000000000000000
-      1042000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000010421042
-      1042104210420000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000010421042
-      1042104210420000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000000000104210421863FF7F
-      FF7FFF7F18631042104200000000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000000000104210421863FF7F
-      FF7FFF7F18631042104200000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000010421042FF7FFF7FFF7F
-      1F00FF7FFF7FFF7F104210420000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000010421042FF7FFF7FFF7F
-      1F00FF7FFF7FFF7F104210420000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000001042FF7F1F00FF7FFF7F
-      FF7FFF7FFF7F1F00FF7F10420000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000001042FF7F1F00FF7FFF7F
-      FF7FFF7FFF7F1F00FF7F10420000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000000010421863FF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F18631042000000000000000000000000000000000000
-      000000000000000000000000000000000000000010421863FF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F18631042000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000001042FF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7F1042000000000000000000000000000000000000
-      00000000000000000000000000000000000000001042FF7FFF7FFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7F1042000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000001042FF7F0000000000000000
-      007CFF7FFF7FFF7F1F00FF7F1042000000000000000000000000000000000000
-      00000000000000000000000000000000000000001042FF7F0000000000000000
-      007CFF7FFF7FFF7F1F00FF7F1042000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000001042FF7FFF7FFF7FFF7FFF7F
-      FF7F0000FF7FFF7FFF7FFF7F1042000000000000000000000000000000000000
-      00000000000000000000000000000000000000001042FF7FFF7FFF7FFF7FFF7F
-      FF7F0000FF7FFF7FFF7FFF7F1042000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000000010421863FF7FFF7FFF7FFF7F
-      FF7FFF7F0000FF7FFF7F18631042000000000000000000000000000000000000
-      000000000000000000000000000000000000000010421863FF7FFF7FFF7FFF7F
-      FF7FFF7F0000FF7FFF7F18631042000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000001042FF7F1F00FF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F10420000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000001042FF7F1F00FF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F10420000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000010421042FF7FFF7FFF7F
-      1F00FF7FFF7FFF7F104210420000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000010421042FF7FFF7FFF7F
-      1F00FF7FFF7FFF7F104210420000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000000000104210421863FF7F
-      1F00FF7F18631042104200000000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000000000104210421863FF7F
-      1F00FF7F18631042104200000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000010421042
-      1042104210420000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000010421042
-      1042104210420000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000040000000000000
-      0000000000000000004000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000040000000000000
-      0000000000000000004000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000001002000000000000
-      0000000000000000100200000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000001002000000000000
-      0000000000000000100200000000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000000040000000000000007C
-      0000007C00000000000000400000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000000040000000000000007C
-      0000007C00000000000000400000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000001002000000000000FF03
-      0000FF0300000000000010020000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000001002000000000000FF03
-      0000FF0300000000000010020000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000007C1863FF7F
-      0000FF7F1863007C000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000007C1863FF7F
-      0000FF7F1863007C000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000FF031863FF7F
-      0000FF7F1863FF03000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000FF031863FF7F
-      0000FF7F1863FF03000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000000010420000007C18630000FF7F
-      FF7FFF7F00001863007C00001042000000000000000000000000000000000000
-      000000000000000000000000000000000000000010420000007C18630000FF7F
-      FF7FFF7F00001863007C00001042000000000000000000000000000000000000
-      000000000000000000000000000000000000000010420000FF0318630000FF7F
-      FF7FFF7F00001863FF0300001042000000000000000000000000000000000000
-      000000000000000000000000000000000000000010420000FF0318630000FF7F
-      FF7FFF7F00001863FF0300001042000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000007C007CFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7F007C007C0000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000007C007CFF7FFF7FFF7F
-      FF7FFF7FFF7FFF7F007C007C0000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000FF03FF03FF7FFF7F0000
-      FF7FFF7FFF7FFF7FFF03FF030000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000FF03FF03FF7FFF7F0000
-      FF7FFF7FFF7FFF7FFF03FF030000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000007C0000FF7F00000000
-      0000FF7FFF7F00000000007C0000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000007C0000FF7F00000000
-      0000FF7FFF7F00000000007C0000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000FF030000FF7FFF7FFF7F
-      0000FF7FFF7F00000000FF030000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000FF030000FF7FFF7FFF7F
-      0000FF7FFF7F00000000FF030000000000000000000000000000000000000000
-      000000000000000000000000000000000000E07F0000007C007CFF7FFF7FFF7F
-      0000FF7FFF7FFF7F007C007C0000E07F00000000000000000000000000000000
-      000000000000000000000000000000000000E07F0000007C007CFF7FFF7FFF7F
-      0000FF7FFF7FFF7F007C007C0000E07F00000000000000000000000000000000
-      00000000000000000000000000000000000000000000FF03FF03FF7FFF7FFF7F
-      0000FF7FFF7FFF7FFF03FF030000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000FF03FF03FF7FFF7FFF7F
-      0000FF7FFF7FFF7FFF03FF030000000000000000000000000000000000000000
-      000000000000000000000000000000000000000010420000007C18630000FF7F
-      0000FF7F00001863007C00001042000000000000000000000000000000000000
-      000000000000000000000000000000000000000010420000007C18630000FF7F
-      0000FF7F00001863007C00001042000000000000000000000000000000000000
-      000000000000000000000000000000000000000010420000FF0318630000FF7F
-      0000FF7F00001863FF0300001042000000000000000000000000000000000000
-      000000000000000000000000000000000000000010420000FF0318630000FF7F
-      0000FF7F00001863FF0300001042000000000000000000000000000000000000
-      000000000000000000000000000000000000E07FE07F00000000007C1863FF7F
-      0000FF7F1863007C00000000E07FE07F00000000000000000000000000000000
-      000000000000000000000000000000000000E07FE07F00000000007C1863FF7F
-      0000FF7F1863007C00000000E07FE07F00000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000FF031863FF7F
-      0000FF7F1863FF03000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000FF031863FF7F
-      0000FF7F1863FF03000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000000000000000007C007C
-      007C007C007C0000000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000000000000000007C007C
-      007C007C007C0000000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000000000000000FF03FF03
-      FF03FF03FF030000000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000000000000000FF03FF03
-      FF03FF03FF030000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000186318631042000000000000
-      0000000000000000186310421042000000000000000000000000000000000000
-      0000000000000000000000000000000000000000186318631042000000000000
-      0000000000000000186310421042000000000000000000000000000000000000
-      0000000000000000000000000000000000000000186318631042000000000000
-      0000000000000000186310421042000000000000000000000000000000000000
-      0000000000000000000000000000000000000000186318631042000000000000
-      0000000000000000186310421042000000000000000000000000000000000000
-      0000000000000000000000000000000000000000186318631863186310421042
-      0000104218631863186318631042000000000000000000000000000000000000
-      0000000000000000000000000000000000000000186318631863186310421042
-      0000104218631863186318631042000000000000000000000000000000000000
-      0000000000000000000000000000000000000000186318631863186310421042
-      0000104218631863186318631042000000000000000000000000000000000000
-      0000000000000000000000000000000000000000186318631863186310421042
-      0000104218631863186318631042000000000000000000000000000000000000
-      000000000000000000000000000000000000E07F000010421863186300000000
-      E07F000000001863186310420000E07F00000000000000000000000000000000
-      000000000000000000000000000000000000E07F000010421863186300000000
-      E07F000000001863186310420000E07F00000000000000000000000000000000
-      0000000000000000000000000000000000000000000010421863186300001042
-      0000104200001863186310420000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000010421863186300001042
-      0000104200001863186310420000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000104200000000E07FE07F
-      E07FE07FE07F0000000010420000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000104200000000E07FE07F
-      E07FE07FE07F0000000010420000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000010420000000000000000
-      0000000000000000000010420000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000010420000000000000000
-      0000000000000000000010420000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000000000E07FE07F0000E07F
-      0000E07F0000E07FE07F00000000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000000000E07FE07F0000E07F
-      0000E07F0000E07FE07F00000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000E07FE07F00000000E07F
-      0000E07F00000000E07FE07F0000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000E07FE07F00000000E07F
-      0000E07F00000000E07FE07F0000000000000000000000000000000000000000
+      0000000000003600000028000000800000004000000001002000000000000080
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000000000000000000000FF
+      FF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000000000000000000000FF
+      FF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000FFFFFF000000
+      000000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6
+      C60000FFFF000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000FFFFFF000000
+      000000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6
+      C60000FFFF000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000000000000000FFFF00FFFF
+      FF000000000000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FF
+      FF00C6C6C60000FFFF0000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000000000000000FFFF00FFFF
+      FF000000000000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FF
+      FF00C6C6C60000FFFF0000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000FFFFFF0000FF
+      FF00FFFFFF000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000FFFFFF0000FF
+      FF00FFFFFF000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000000000000000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000000000000000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000000000000000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000000000000000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000000000000000000000FF
+      FF00FFFFFF0000FFFF00FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000000000000000000000FF
+      FF00FFFFFF0000FFFF00FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000848484000000
+      0000000000000000000000000000848484000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000848484000000
+      0000000000000000000000000000848484000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000008484840084848400848484008484840084848400000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000008484840084848400848484008484840084848400000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      840084848400C6C6C600FFFFFF00FFFFFF00FFFFFF00C6C6C600848484008484
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      840084848400C6C6C600FFFFFF00FFFFFF00FFFFFF00C6C6C600848484008484
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000848484008484
+      8400FFFFFF00FFFFFF00FFFFFF00FF000000FFFFFF00FFFFFF00FFFFFF008484
+      8400848484000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000848484008484
+      8400FFFFFF00FFFFFF00FFFFFF00FF000000FFFFFF00FFFFFF00FFFFFF008484
+      8400848484000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000000000000084848400FFFF
+      FF00FF000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF000000FFFF
+      FF00848484000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000000000000084848400FFFF
+      FF00FF000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF000000FFFF
+      FF00848484000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000084848400C6C6C600FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00C6C6C6008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000084848400C6C6C600FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00C6C6C6008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000084848400FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000084848400FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000084848400FFFFFF000000
+      00000000000000000000000000000000FF00FFFFFF00FFFFFF00FFFFFF00FF00
+      0000FFFFFF008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000084848400FFFFFF000000
+      00000000000000000000000000000000FF00FFFFFF00FFFFFF00FFFFFF00FF00
+      0000FFFFFF008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000084848400FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000084848400FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000084848400C6C6C600FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFF
+      FF00C6C6C6008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000084848400C6C6C600FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFF
+      FF00C6C6C6008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000000000000084848400FFFF
+      FF00FF000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00848484000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000000000000084848400FFFF
+      FF00FF000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00848484000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000848484008484
+      8400FFFFFF00FFFFFF00FFFFFF00FF000000FFFFFF00FFFFFF00FFFFFF008484
+      8400848484000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000848484008484
+      8400FFFFFF00FFFFFF00FFFFFF00FF000000FFFFFF00FFFFFF00FFFFFF008484
+      8400848484000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      840084848400C6C6C600FFFFFF00FF000000FFFFFF00C6C6C600848484008484
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      840084848400C6C6C600FFFFFF00FF000000FFFFFF00C6C6C600848484008484
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000008484840084848400848484008484840084848400000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000008484840084848400848484008484840084848400000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      8400000000000000000000000000000000000000000000000000000000000000
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      8400000000000000000000000000000000000000000000000000000000000000
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      0000000000000000000000000000000000000000000000000000000000008484
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      0000000000000000000000000000000000000000000000000000000000008484
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000084000000
+      000000000000000000000000FF00000000000000FF0000000000000000000000
+      0000000084000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000084000000
+      000000000000000000000000FF00000000000000FF0000000000000000000000
+      0000000084000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000848400000000
+      00000000000000000000FFFF000000000000FFFF000000000000000000000000
+      0000848400000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000848400000000
+      00000000000000000000FFFF000000000000FFFF000000000000000000000000
+      0000848400000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000FF00C6C6C600FFFFFF0000000000FFFFFF00C6C6C6000000FF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000FF00C6C6C600FFFFFF0000000000FFFFFF00C6C6C6000000FF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFF0000C6C6C600FFFFFF0000000000FFFFFF00C6C6C600FFFF00000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFF0000C6C6C600FFFFFF0000000000FFFFFF00C6C6C600FFFF00000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000084848400000000000000
+      FF00C6C6C60000000000FFFFFF00FFFFFF00FFFFFF0000000000C6C6C6000000
+      FF00000000008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000084848400000000000000
+      FF00C6C6C60000000000FFFFFF00FFFFFF00FFFFFF0000000000C6C6C6000000
+      FF00000000008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000008484840000000000FFFF
+      0000C6C6C60000000000FFFFFF00FFFFFF00FFFFFF0000000000C6C6C600FFFF
+      0000000000008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000008484840000000000FFFF
+      0000C6C6C60000000000FFFFFF00FFFFFF00FFFFFF0000000000C6C6C600FFFF
+      0000000000008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000000000000000FF000000
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      FF000000FF000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000000000000000FF000000
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+      FF000000FF000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000FFFF0000FFFF
+      0000FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      0000FFFF00000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000FFFF0000FFFF
+      0000FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      0000FFFF00000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000000000000000FF000000
+      0000FFFFFF00000000000000000000000000FFFFFF00FFFFFF00000000000000
+      00000000FF000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000000000000000FF000000
+      0000FFFFFF00000000000000000000000000FFFFFF00FFFFFF00000000000000
+      00000000FF000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000FFFF00000000
+      0000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00000000000000
+      0000FFFF00000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000FFFF00000000
+      0000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00000000000000
+      0000FFFF00000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000FFFF00000000000000FF000000
+      FF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      FF000000FF000000000000FFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000FFFF00000000000000FF000000
+      FF00FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      FF000000FF000000000000FFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000FFFF0000FFFF
+      0000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      0000FFFF00000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000FFFF0000FFFF
+      0000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      0000FFFF00000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000084848400000000000000
+      FF00C6C6C60000000000FFFFFF0000000000FFFFFF0000000000C6C6C6000000
+      FF00000000008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000084848400000000000000
+      FF00C6C6C60000000000FFFFFF0000000000FFFFFF0000000000C6C6C6000000
+      FF00000000008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000008484840000000000FFFF
+      0000C6C6C60000000000FFFFFF0000000000FFFFFF0000000000C6C6C600FFFF
+      0000000000008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000008484840000000000FFFF
+      0000C6C6C60000000000FFFFFF0000000000FFFFFF0000000000C6C6C600FFFF
+      0000000000008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000FFFF0000FFFF00000000000000
+      00000000FF00C6C6C600FFFFFF0000000000FFFFFF00C6C6C6000000FF000000
+      00000000000000FFFF0000FFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000FFFF0000FFFF00000000000000
+      00000000FF00C6C6C600FFFFFF0000000000FFFFFF00C6C6C6000000FF000000
+      00000000000000FFFF0000FFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFF0000C6C6C600FFFFFF0000000000FFFFFF00C6C6C600FFFF00000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFF0000C6C6C600FFFFFF0000000000FFFFFF00C6C6C600FFFF00000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000FF000000FF000000FF000000FF000000FF00000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000FF000000FF000000FF000000FF000000FF00000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000C6C6C600C6C6C6008484
+      840000000000000000000000000000000000000000000000000000000000C6C6
+      C600848484008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000C6C6C600C6C6C6008484
+      840000000000000000000000000000000000000000000000000000000000C6C6
+      C600848484008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000C6C6C600C6C6C6008484
+      840000000000000000000000000000000000000000000000000000000000C6C6
+      C600848484008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000C6C6C600C6C6C6008484
+      840000000000000000000000000000000000000000000000000000000000C6C6
+      C600848484008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000C6C6C600C6C6C600C6C6
+      C600C6C6C60084848400848484000000000084848400C6C6C600C6C6C600C6C6
+      C600C6C6C6008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000C6C6C600C6C6C600C6C6
+      C600C6C6C60084848400848484000000000084848400C6C6C600C6C6C600C6C6
+      C600C6C6C6008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000C6C6C600C6C6C600C6C6
+      C600C6C6C60084848400848484000000000084848400C6C6C600C6C6C600C6C6
+      C600C6C6C6008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000C6C6C600C6C6C600C6C6
+      C600C6C6C60084848400848484000000000084848400C6C6C600C6C6C600C6C6
+      C600C6C6C6008484840000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000FFFF000000000084848400C6C6
+      C600C6C6C600000000000000000000FFFF000000000000000000C6C6C600C6C6
+      C600848484000000000000FFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000FFFF000000000084848400C6C6
+      C600C6C6C600000000000000000000FFFF000000000000000000C6C6C600C6C6
+      C600848484000000000000FFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000000000000084848400C6C6
+      C600C6C6C6000000000084848400000000008484840000000000C6C6C600C6C6
+      C600848484000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000000000000084848400C6C6
+      C600C6C6C6000000000084848400000000008484840000000000C6C6C600C6C6
+      C600848484000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000848484000000
+      00000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF00000000000000
+      0000848484000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000848484000000
+      00000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF00000000000000
+      0000848484000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000848484000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000848484000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000848484000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000848484000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000000000000000000000FF
+      FF0000FFFF000000000000FFFF000000000000FFFF000000000000FFFF0000FF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000000000000000000000FF
+      FF0000FFFF000000000000FFFF000000000000FFFF000000000000FFFF0000FF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000000000000000FFFF0000FF
+      FF00000000000000000000FFFF000000000000FFFF00000000000000000000FF
+      FF0000FFFF000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000000000000000FFFF0000FF
+      FF00000000000000000000FFFF000000000000FFFF00000000000000000000FF
+      FF0000FFFF000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
@@ -2031,260 +3871,516 @@
     Bitmap = {
       494C010109000E00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
-      0000000000003600000028000000400000004000000001001000000000000020
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000008D048D048D048D048D048D040000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000008D048D048D048D048D048D040000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000008D048D04000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      007C10000000000000008D048D04000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000001002
-      104010420000000000008D048D04000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000000000000000000000FF03
-      007C18630000000000008D048D04000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000001863
-      0040104200008D048D048D048D048D048D040000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000010420000
-      1863000000008D048D048D048D048D048D040000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      1000100200000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      1863000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000001042100210021863
-      1863186310001002186300000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000100210021002100210021002
-      1863100210021002100210021002000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000001042100210021002100210021000
-      1863100210021002100210021002104200000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000100210020000
-      1002000010021002000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000186300000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000007C007C007C007C007C007C
-      007C0000007C007C007C007C007C007C00000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000007C00000000000000000000
-      0000000000000000000000000000007C00000000000000000000000000000000
-      00000000000000000000000000000000000000000000000000000000FF038D04
-      8D048D048D048D048D0400000000000000000000000000000000000000000000
-      0000104200000000000000000000000000000000007C00000000000000000000
-      0000007C10000000000000000000007C00000000000000000000000000000000
-      0000007C10000000000000000000000000000000000000000000000000008D04
-      8D048D048D048D048D0400000000000000000000000000000000000000000000
-      1042000010420000000000000000000000000000007C00000000000000000000
-      1002104010420000000000000000007C00000000000000000000000000000000
-      10021040104200000000000000000000000000000000000000000000FF03FF03
-      FF038D048D04FF03FF0300000000000000000000000000000000000000000000
-      1863104218630000000000000000000000000000007C00000000000000000000
-      FF03007C18630000000000000000007C00000000000000000000000000000000
-      FF03007C1863000000000000000000000000000000000000000000000000EF3D
-      EF3D8D048D040000000000000000000000000000000000000000000000000000
-      1863000010420000000000000000000000000000007C00000000000000000000
-      1863004010420000000000000000007C00000000000000000000000000000000
-      18630040104200000000000000000000000000000000000000000000FF03FF03
-      FF038D048D04FF03FF0300000000000000000000000000000000000000001042
-      0000186300000000000000000000000000000000007C00000000000000001042
-      0000186300000000000000000000007C00000000000000000000000000001042
-      000018630000000000000000000000000000000000000000000000000000EF3D
-      00008D048D04EF3D000000000000000000000000000000000000000000000000
-      0000000010420000000000000000000000000000007C00000000000000000000
-      0000100010020000000000000000007C00000000000000000000000000000000
-      00001000100200000000000000000000000000000000000000000000FF038D04
-      8D048D048D048D048D0400000000000000000000000000000000000000000000
-      0000186300000000000000000000000000000000007C00000000000000000000
-      0000186300000000000000000000007C00000000000000000000000000000000
-      0000186300000000000000000000000000000000000000000000000000008D04
-      8D048D048D048D048D0400000000000000000000000000000000104210421042
-      1863186318630000104218630000000000000000007C00000000104210021002
-      1863186318631000100218630000007C00000000000000000000104210021002
-      18631863186310001002186300000000000000000000000000000000FF03FF03
-      FF03FF03FF03FF03FF0300000000000000000000000010421042104210421042
-      1042186310421042104210421042104200000000007C10021002100210021002
-      1002186310021002100210021002100200000000000010021002100210021002
-      1002186310021002100210021002100200000000000000000000000000000000
-      0000000000000000000000000000000000000000104210421042104210421042
-      0000186310421042104210421042104218630000104210021002100210021002
-      1000186310021002100210021002100210420000104210021002100210021002
-      1000186310021002100210021002100210420000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000010421042
-      0000104200001042104200000000000000000000007C00000000000010021002
-      0000100200001002100200000000007C00000000000000000000000010021002
-      00001002000010021002000000000000000000000000000000000000EF3D0000
-      EF3D0000EF3D0000EF3D00000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000007C007C007C007C007C007C
-      007C007C007C007C007C007C007C007C00000000000000000000000000000000
-      00000000000000000000000000000000000000000000000000000000EF3D0000
-      EF3D0000EF3D0000EF3D00000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      000000000000F75E000000000000000000000000000000000000000000000000
-      000000000000F75E000000000000000000000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7F0000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000E07FE07FE07F
-      E07FE07F00000000F75E00000000000000000000000000000000E07FE07FE07F
-      E07FE07F00000000F75E000000000000000000000000FF7F0000FF7FFF03FF03
-      FF03FF03FF03FF03FF03FF7F00000000000000000000000000000000E07FE07F
-      E07F000000000000000000000000000000000000000000000000E07F00000000
-      0000E07F000000420000F75E0000000000000000000000000000E07F00000000
-      0000E07F000000420000F75E00000000000000000000FF7F0000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000000000000000E07FE07F
-      0000000000000000000000000000000000000000000000000000E07FE07FE07F
-      E07FE07F00000042004200000000000000000000000000000000000000000000
-      0000E07F000000420042000000000000000000000000FF7F0000FF7FFF03FF03
-      FF03FF03FF03FF03FF03FF7F0000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000E07FE07FE07F
-      E07FE07F000000420042000000000000000000000000E07FE07FE07FE07FE07F
-      00000000000000420042000000000000000000000000FF7F0000FF7FFF7FEF3D
-      EF3DEF3DFF7FFF7FFF7FFF7F0000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      00000000000000420042000000000000000000000000E07F000000000000E07F
-      0000F75E000000420042000000000000000000000000FF7F0000FF7FFF03FF03
-      FF03FF03FF03FF03FF03FF7F0000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000E07FE07FE07F
-      E07FE07F000000420042000000000000000000000000E07FE07FE07FE07FE07F
-      0000F75E000000420042000000000000000000000000FF7F0000FF7FFF7FEF3D
-      FF7FEF3DEF3DEF3DFF7FFF7F00000000000000000000000000000000E07FE07F
-      E07F000000000000000000000000000000000000000000000000E07F00000000
-      0000E07F000000420042000000000000000000000000E07FE07FE07FE07FE07F
-      00000000000000420042000000000000000000000000FF7F0000FF7FFF03FF03
-      FF03FF03FF03FF03FF03FF7F00000000000000000000000000000000E07FE07F
-      0000000000000000000000000000000000000000000000000000E07FE07FE07F
-      E07FE07F00000042004200000000000000000000000000000000000000000000
-      0000EF3D000000420042000000000000000000000000FF7F0000FF7FFF7FEF3D
-      EF3DFF7FEF3DFF7FFF7FFF7F0000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000E07FE07FE07F
-      E07FE07F00000042004200000000000000000000000000000000FF7FFF7FFF7F
-      EF3DEF3D000000420042000000000000000000000000FF7F0000FF7FFF03FF03
-      FF03FF03FF03FF03FF03FF7F0000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000004200000000000000000000000000000000000000000000
-      00000000000000000042000000000000000000000000FF7F0000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7FFF7F0000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000000000EF3DEF3DEF3DEF3D
-      EF3DEF3DEF3D000000000000000000000000000000000000EF3DEF3DEF3DEF3D
-      EF3DEF3DEF3D00000000000000000000000000000000FF7F00000000FF7F0000
-      FF7F0000FF7F0000FF7F00000000000000000000E07FE07FE07F000000000000
-      00000000000000000000000000000000000000000000000000000000E07F0042
-      E07F0042E07F004200000000000000000000000000000000000000000042E07F
-      0042E07F0042E07F0000000000000000000000000000000000000000EF3D0000
-      EF3D0000EF3D0000EF3D00000000000000000000E07FE07F0000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0042E07F0042E07F004200000000000000000000000000000000000000000000
-      E07F0042E07F0042E07F000000000000000000000000000000000000EF3D0000
-      EF3D0000EF3D0000EF3D00000000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000000000000000000000EF3D
-      000000000000000000000000000000000000000000000000000000000000EF3D
+      0000000000003600000028000000400000004000000001002000000000000040
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000000000006B2108006B21
+      08006B2108006B2108006B2108006B2108000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000000000006B2108006B21
+      08006B2108006B2108006B2108006B2108000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00006B2108006B21080000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000FF008400000000000000000000000000
+      00006B2108006B21080000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000084840000840084008484840000000000000000000000
+      00006B2108006B21080000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000FFFF00000000FF00C6C6C60000000000000000000000
+      00006B2108006B21080000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000C6C6C6000000840084848400000000006B2108006B21
+      08006B2108006B2108006B2108006B2108000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000008484840000000000C6C6C60000000000000000006B2108006B21
+      08006B2108006B2108006B2108006B2108000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000840000008484000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000C6C6C6000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      84008484000084840000C6C6C600C6C6C600C6C6C6008400000084840000C6C6
+      C600000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000084840000848400008484
+      0000848400008484000084840000C6C6C6008484000084840000848400008484
+      0000848400008484000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000008484840084840000848400008484
+      0000848400008484000084000000C6C6C6008484000084840000848400008484
+      0000848400008484000084848400000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000848400008484000000000000848400000000000084840000848400000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000C6C6C60000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000000000FF000000FF000000
+      FF000000FF000000FF000000FF000000FF00000000000000FF000000FF000000
+      FF000000FF000000FF000000FF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000000000FF00000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000FF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000FFFF00006B2108006B2108006B2108006B2108006B2108006B21
+      0800000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000008484840000000000000000000000
+      000000000000000000000000000000000000000000000000FF00000000000000
+      0000000000000000000000000000000000000000FF0084000000000000000000
+      000000000000000000000000FF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000FF0084000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000006B2108006B2108006B2108006B2108006B2108006B21
+      0800000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000848484000000000084848400000000000000
+      000000000000000000000000000000000000000000000000FF00000000000000
+      0000000000000000000000000000848400008400840084848400000000000000
+      000000000000000000000000FF00000000000000000000000000000000000000
+      0000000000000000000000000000848400008400840084848400000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000FFFF0000FFFF0000FFFF00006B2108006B210800FFFF0000FFFF
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000C6C6C60084848400C6C6C600000000000000
+      000000000000000000000000000000000000000000000000FF00000000000000
+      0000000000000000000000000000FFFF00000000FF00C6C6C600000000000000
+      000000000000000000000000FF00000000000000000000000000000000000000
+      0000000000000000000000000000FFFF00000000FF00C6C6C600000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000007B7B7B007B7B7B006B2108006B210800000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000C6C6C6000000000084848400000000000000
+      000000000000000000000000000000000000000000000000FF00000000000000
+      0000000000000000000000000000C6C6C6000000840084848400000000000000
+      000000000000000000000000FF00000000000000000000000000000000000000
+      0000000000000000000000000000C6C6C6000000840084848400000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000FFFF0000FFFF0000FFFF00006B2108006B210800FFFF0000FFFF
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000008484840000000000C6C6C60000000000000000000000
+      000000000000000000000000000000000000000000000000FF00000000000000
+      000000000000000000008484840000000000C6C6C60000000000000000000000
+      000000000000000000000000FF00000000000000000000000000000000000000
+      000000000000000000008484840000000000C6C6C60000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000007B7B7B00000000006B2108006B2108007B7B7B000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000084848400000000000000
+      000000000000000000000000000000000000000000000000FF00000000000000
+      0000000000000000000000000000000000008400000084840000000000000000
+      000000000000000000000000FF00000000000000000000000000000000000000
+      0000000000000000000000000000000000008400000084840000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000FFFF00006B2108006B2108006B2108006B2108006B2108006B21
+      0800000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000C6C6C60000000000000000000000
+      000000000000000000000000000000000000000000000000FF00000000000000
+      000000000000000000000000000000000000C6C6C60000000000000000000000
+      000000000000000000000000FF00000000000000000000000000000000000000
+      000000000000000000000000000000000000C6C6C60000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000006B2108006B2108006B2108006B2108006B2108006B21
+      0800000000000000000000000000000000000000000000000000000000000000
+      0000848484008484840084848400C6C6C600C6C6C600C6C6C600000000008484
+      8400C6C6C600000000000000000000000000000000000000FF00000000000000
+      0000848484008484000084840000C6C6C600C6C6C600C6C6C600840000008484
+      0000C6C6C600000000000000FF00000000000000000000000000000000000000
+      0000848484008484000084840000C6C6C600C6C6C600C6C6C600840000008484
+      0000C6C6C6000000000000000000000000000000000000000000000000000000
+      000000000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF
+      0000000000000000000000000000000000000000000000000000848484008484
+      840084848400848484008484840084848400C6C6C60084848400848484008484
+      840084848400848484008484840000000000000000000000FF00848400008484
+      000084840000848400008484000084840000C6C6C60084840000848400008484
+      0000848400008484000084840000000000000000000000000000848400008484
+      000084840000848400008484000084840000C6C6C60084840000848400008484
+      0000848400008484000084840000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000084848400848484008484
+      840084848400848484008484840000000000C6C6C60084848400848484008484
+      8400848484008484840084848400C6C6C6000000000084848400848400008484
+      000084840000848400008484000084000000C6C6C60084840000848400008484
+      0000848400008484000084840000848484000000000084848400848400008484
+      000084840000848400008484000084000000C6C6C60084840000848400008484
+      0000848400008484000084840000848484000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000008484840084848400000000008484840000000000848484008484
+      840000000000000000000000000000000000000000000000FF00000000000000
+      0000000000008484000084840000000000008484000000000000848400008484
+      000000000000000000000000FF00000000000000000000000000000000000000
+      0000000000008484000084840000000000008484000000000000848400008484
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000007B7B7B00000000007B7B7B00000000007B7B7B00000000007B7B
+      7B00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000000000FF000000FF000000
+      FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000
+      FF000000FF000000FF000000FF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000007B7B7B00000000007B7B7B00000000007B7B7B00000000007B7B
+      7B00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000BDBDBD000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000BDBDBD000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000000000000000BDBD
+      BD00000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000000000000000BDBD
+      BD00000000000000000000000000000000000000000000000000FFFFFF000000
+      0000FFFFFF00FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF
+      0000FFFFFF000000000000000000000000000000000000000000000000000000
+      00000000000000FFFF0000FFFF0000FFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000000000000000000000000000FFFF0000000000008484000000
+      0000BDBDBD000000000000000000000000000000000000000000000000000000
+      000000FFFF0000000000000000000000000000FFFF0000000000008484000000
+      0000BDBDBD000000000000000000000000000000000000000000FFFFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF000000000000000000000000000000000000000000000000000000
+      00000000000000FFFF0000FFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000008484000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000FFFF0000000000008484000084
+      8400000000000000000000000000000000000000000000000000FFFFFF000000
+      0000FFFFFF00FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF
+      0000FFFFFF000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000008484000084
+      840000000000000000000000000000000000000000000000000000FFFF0000FF
+      FF0000FFFF0000FFFF0000FFFF00000000000000000000000000008484000084
+      8400000000000000000000000000000000000000000000000000FFFFFF000000
+      0000FFFFFF00FFFFFF007B7B7B007B7B7B007B7B7B00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000008484000084
+      840000000000000000000000000000000000000000000000000000FFFF000000
+      0000000000000000000000FFFF0000000000BDBDBD0000000000008484000084
+      8400000000000000000000000000000000000000000000000000FFFFFF000000
+      0000FFFFFF00FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF
+      0000FFFFFF000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000008484000084
+      840000000000000000000000000000000000000000000000000000FFFF0000FF
+      FF0000FFFF0000FFFF0000FFFF0000000000BDBDBD0000000000008484000084
+      8400000000000000000000000000000000000000000000000000FFFFFF000000
+      0000FFFFFF00FFFFFF007B7B7B00FFFFFF007B7B7B007B7B7B007B7B7B00FFFF
+      FF00FFFFFF000000000000000000000000000000000000000000000000000000
+      00000000000000FFFF0000FFFF0000FFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000000000000000000000000000FFFF0000000000008484000084
+      840000000000000000000000000000000000000000000000000000FFFF0000FF
+      FF0000FFFF0000FFFF0000FFFF00000000000000000000000000008484000084
+      8400000000000000000000000000000000000000000000000000FFFFFF000000
+      0000FFFFFF00FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF
+      0000FFFFFF000000000000000000000000000000000000000000000000000000
+      00000000000000FFFF0000FFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000008484000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000007B7B7B0000000000008484000084
+      8400000000000000000000000000000000000000000000000000FFFFFF000000
+      0000FFFFFF00FFFFFF007B7B7B007B7B7B00FFFFFF007B7B7B00FFFFFF00FFFF
+      FF00FFFFFF000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000008484000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF007B7B7B007B7B7B0000000000008484000084
+      8400000000000000000000000000000000000000000000000000FFFFFF000000
+      0000FFFFFF00FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF
+      0000FFFFFF000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000084
+      8400000000000000000000000000000000000000000000000000FFFFFF000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000007B7B
+      7B007B7B7B007B7B7B007B7B7B007B7B7B007B7B7B007B7B7B00000000000000
+      0000000000000000000000000000000000000000000000000000000000007B7B
+      7B007B7B7B007B7B7B007B7B7B007B7B7B007B7B7B007B7B7B00000000000000
+      0000000000000000000000000000000000000000000000000000FFFFFF000000
+      000000000000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000FFFF
+      FF00000000000000000000000000000000000000000000FFFF0000FFFF0000FF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000FFFF000084840000FFFF000084840000FFFF00008484000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000084840000FFFF000084840000FFFF000084840000FFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000007B7B7B00000000007B7B7B00000000007B7B7B00000000007B7B
+      7B00000000000000000000000000000000000000000000FFFF0000FFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000084840000FFFF000084840000FFFF000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000FFFF000084840000FFFF000084840000FF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000007B7B7B00000000007B7B7B00000000007B7B7B00000000007B7B
+      7B00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000007B7B7B00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000007B7B7B00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
       0000000000000000000000000000000000000000000000000000000000000000
       000000000000000000000000000000000000424D3E000000000000003E000000
@@ -2314,261 +4410,517 @@
     Bitmap = {
       494C01010D000E00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
-      0000000000003600000028000000400000004000000001001000000000000020
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000E07F1863E07F1863E07F
-      1863E07F1863E07F000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000E07F0000E07F1863E07F1863
-      E07F1863E07F1863E07F0000FF7FFF7F00000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000FF7FE07F0000E07F1863E07F
-      1863E07F1863E07F1863E07F0000FF7F00000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000E07FFF7F0000000000000000
-      0000000000000000000000000000FF7F00000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000FF7FE07F0000FF7F0000FF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000E07FFF7F0000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7FFF7F0000FF7F00000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000FF7FE07F0000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7F00000000FF7F00000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000FF7F0000FF7F0000FF7F
-      0000FF7FFF7FFF7F0000FF7F0000FF7F00000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000104200000000FF7F0000FF7F
-      0000FF7FFF7F0000FF7FFF7F0000FF7F00000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000FF7F0000FF7F
-      0000FF7F0000FF7FFF7FFF7F0000FF7F00000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000FF7F0000FF7F
-      00000000FF7FFF7FFF7FFF7F0000FF7F00000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7FFF7F0000FF7F00000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000FF7F0000FF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000FF7F00000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07FFF7FE07F00000000000000000000000000000000000000000000
-      FF7F0000000000000000FF7FFF7FFF7F00000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F0000000000000000000000000000E07FFF7FE07FFF7F
-      E07FFF7FE07FFF7FE07FFF7FE07F000000000000FF7FE07FFF7F0000FF7FE07F
-      FF7FE07F0000E07FFF7F00000000000000000000FF7FFF7FFF7FFF7FFF7F0000
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F0000000000000000000000000000FF7FE07F0000E07F
-      FF7FE07FFF7F00000000E07FFF7F000000000000E07FFF7FE07F0000E07FFF7F
-      E07F00000000FF7FE07F0000FF7FFF7F00000000FF7FFF7FFF7FFF7FFF7F0000
-      FF7F000000000000000000000000FF7F00000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F0000000000000000000000000000E07FFF7F0000FF7F
-      E07FFF7F0000FF7F0000FF7FE07F000000000000FF7FE07FFF7F0000FF7FE07F
-      0000E07F0000E07FFF7F00000000FF7F00000000FF7FFF7FFF7FFF7FFF7F0000
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F0000000000000000000000000000FF7FE07F0000E07F
-      FF7F0000FF7FE07F0000E07FFF7F000000000000E07FFF7FE07F0000E07F0000
-      E07FFF7F0000FF7FE07F0000FF7FFF7F00000000FF7FFF7FFF7FFF7FFF7F0000
-      FF7F000000000000000000000000FF7F00000000000000000000FF7FFF7FFF7F
-      0000FF7FFF7FFF7FFF7F0000000000000000000000000000E07FFF7F0000FF7F
-      0000FF7FE07FFF7F0000FF7FE07F000000000000FF7FE07FFF7F00000000E07F
-      FF7FE07F0000E07FFF7F00000000FF7F00000000FF7FFF7F0000FF7FFF7F0000
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000FF7FFF7FFF7F
-      0000FF7FFF7FFF7FFF7F0000000000000000000000000000FF7FE07F00000000
-      FF7FE07FFF7FE07F0000E07FFF7F000000000000E07FFF7FE07F0000E07FFF7F
-      E07FFF7F0000FF7FE07F0000FF7FFF7F00000000FF7FFF7F0000FF7FFF7F0000
-      FF7F000000000000FF7F00000000FF7F00000000000000000000FF7F00000000
-      000000000000FF7FFF7F0000000000000000000000000000E07FFF7F0000FF7F
-      E07FFF7FE07FFF7F0000FF7FE07F000000000000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7FE07FFF7F00000000FF7F00000000000000000000000000000000
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000FF7FFF7FFF7F
-      0000FF7FFF7FFF7FFF7F0000000000000000000000000000FF7FE07FFF7FE07F
-      FF7FE07FFF7FE07FFF7FE07FFF7F000000000000000000000000000000000000
-      000000000000000000000000FF7FFF7F00000000FF7FFF7F0000FF7FFF7F0000
-      FF7F00000000FF7F000000000000FF7F00000000000000000000FF7FFF7FFF7F
-      0000FF7FFF7FFF7FFF7F00000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000FF7F0000FF7F
-      0000FF7F00000000FF7F00000000000000000000FF7FFF7F0000FF7FFF7F0000
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F00000000000000000000000000000000FF7FE07FFF7F
-      E07F000000000000000000000000000000000000000000000000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7F0000FF7F000000000000FF7FFF7FFF7FFF7FFF7F0000
-      0000000000000000000000000000000000000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F00000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7F00000000000000000000FF7FFF7FFF7FFF7FFF7FFF7F
-      FF7F000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000FF7F0000FF7F
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000FF7F00000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000E07FFF7FE07FFF7FE07FFF7F
-      E07FFF7FE07FFF7FE07F000000000000000000000000E07F1863E07F1863E07F
-      1863E07F1863E07F000000000000000000000000000000000000000000000000
-      000000000000000000000000000000000000000000000000E07FFF7FE07FFF7F
-      E07FFF7FE07FFF7FE07FFF7FE07F000000000000FF7FE07FFF7FE07F00000000
-      00000000FF7FE07FFF7F00000000000000000000E07F0000E07F1863E07F1863
-      E07F1863E07F1863E07F0000FF7FFF7F00000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F0000000000000000000000000000FF7FE07FFF7FE07F
-      000000000000E07FFF7FE07FFF7F000000000000E07FFF7FE07F0000E07FFF7F
-      E07FFF7F0000FF7FE07F0000FF7FFF7F00000000FF7FE07F0000E07F1863E07F
-      1863E07F1863E07F1863E07F0000FF7F00000000000000000000FF7F00000000
-      00000000FF7FFF7FFF7F0000000000000000000000000000E07FFF7FE07F0000
-      E07FFF7FE07F0000E07FFF7FE07F000000000000FF7FE07F0000E07FFF7FE07F
-      FF7FE07FFF7F0000FF7F00000000FF7F00000000E07FFF7F0000000000000000
-      0000000000000000000000000000FF7F00000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F0000000000000000000000000000FF7FE07F0000E07F
-      FF7FE07FFF7FE07F0000E07FFF7F000000000000E07FFF7F0000FF7FE07FFF7F
-      E07FFF7FE07F0000E07F0000FF7FFF7F00000000FF7FE07F0000FF7F0000FF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000FF7F00000000
-      0000000000000000FF7F0000000000000000000000000000E07FFF7F0000FF7F
-      E07FFF7FE07FFF7F0000FF7FE07F000000000000FF7FE07FFF7F0000FF7FE07F
-      FF7FE07F0000E07FFF7F00000000FF7F00000000E07FFF7F0000FF7F0000FF7F
-      FF7FFF7F000000000000FF7FFF7FFF7F00000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F0000000000000000000000000000FF7FE07F0000E07F
-      FF7FE07FFF7FE07F0000E07FFF7F000000000000E07FFF7FE07FFF7F00000000
-      00000000E07FFF7FE07F0000FF7FFF7F00000000FF7FE07F0000FF7F0000FF7F
-      FF7F0000FF7FFF7FFF7F0000FF7FFF7F00000000000000000000FF7F00000000
-      0000000000000000FF7F0000000000000000000000000000E07FFF7FE07F0000
-      E07FFF7FE07F0000E07FFF7FE07F000000000000FF7FE07FFF7FE07FFF7FE07F
-      FF7FE07FFF7FE07FFF7F00000000FF7F000000000000FF7F0000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7FFF7F0000FF7F00000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F0000000000000000000000000000FF7FE07FFF7FE07F
-      000000000000E07FFF7FE07FFF7F000000000000000000000000000000000000
-      000000000000000000000000FF7FFF7F00000000104200000000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7FFF7F0000FF7F00000000000000000000FF7F00000000
-      0000FF7F00000000FF7F00000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000FF7F0000FF7F
-      0000FF7F00000000FF7F00000000000000000000000000000000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7FFF7F0000FF7F00000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F00000000000000000000000000000000FF7FE07FFF7F
-      E07F000000000000000000000000000000000000000000000000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7F0000FF7F000000000000000000000000FF7F0000FF7F
-      FF7F0000FF7FFF7FFF7F0000FF7FFF7F00000000000000000000FF7F00000000
-      FF7F000000000000FF7F00000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000FF7F0000FF7F
-      0000FF7FFF7FFF7FFF7F00000000000000000000000000000000FF7F0000FF7F
-      FF7FFF7F000000000000FF7FFF7FFF7F00000000000000000000FF7FFF7FFF7F
-      FF7FFF7FFF7FFF7FFF7F00000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000FF7F0000FF7F
-      0000000000000000000000000000000000000000000000000000FF7F0000FF7F
-      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000FF7F00000000
-      0000000000000000000000000000000000000000000000000000FF7F00000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000001863000000000000000000000000000000000000000000000000
-      0000000000001863000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000E07FE07FE07F
-      E07FE07F00000000186300000000000000000000000000000000E07FE07FE07F
-      E07FE07F00000000186300000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000000000000000E07FE07F
-      E07F000000000000000000000000000000000000000000000000E07F00000000
-      0000E07F00000042000018630000000000000000000000000000E07F00000000
-      0000E07F00000042000018630000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000000000000000E07FE07F
-      0000000000000000000000000000000000000000000000000000E07FE07FE07F
-      E07FE07F00000042004200000000000000000000000000000000000000000000
-      0000E07F00000042004200000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000E07FE07FE07F
-      E07FE07F000000420042000000000000000000000000E07FE07FE07FE07FE07F
-      0000000000000042004200000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      00000000000000420042000000000000000000000000E07F000000000000E07F
-      0000186300000042004200000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000E07FE07FE07F
-      E07FE07F000000420042000000000000000000000000E07FE07FE07FE07FE07F
-      0000186300000042004200000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000000000000000E07FE07F
-      E07F000000000000000000000000000000000000000000000000E07F00000000
-      0000E07F000000420042000000000000000000000000E07FE07FE07FE07FE07F
-      0000000000000042004200000000000000000000000000000000000000000000
-      00000000000000000000000000000000000000000000000000000000E07FE07F
-      0000000000000000000000000000000000000000000000000000E07FE07FE07F
-      E07FE07F00000042004200000000000000000000000000000000000000000000
-      0000104200000042004200000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000E07FE07FE07F
-      E07FE07F00000042004200000000000000000000000000000000FF7FFF7FFF7F
-      1042104200000042004200000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000004200000000000000000000000000000000000000000000
-      0000000000000000004200000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000001042104210421042
-      1042104210420000000000000000000000000000000000001042104210421042
-      1042104210420000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000E07FE07FE07F000000000000
-      00000000000000000000000000000000000000000000000000000000E07F0042
-      E07F0042E07F004200000000000000000000000000000000000000000042E07F
-      0042E07F0042E07F000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000E07FE07F0000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0042E07F0042E07F004200000000000000000000000000000000000000000000
-      E07F0042E07F0042E07F00000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000000000
-      0000000000000000000000000000000000000000000000000000000000001042
-      0000000000000000000000000000000000000000000000000000000000001042
+      0000000000003600000028000000400000004000000001002000000000000040
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000000000000000000000000000FFFF00C6C6
+      C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000FFFF000000000000FF
+      FF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FF
+      FF0000000000FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000FFFFFF0000FFFF000000
+      000000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6
+      C60000FFFF0000000000FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000FFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000FFFFFF0000FFFF000000
+      0000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000FFFF00FFFFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF0000000000FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000FFFFFF0000FFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF000000000000000000FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000FFFFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF000000
+      0000FFFFFF0000000000FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000084848400000000000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF0000000000FFFF
+      FF00FFFFFF0000000000FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFF
+      FF00FFFFFF0000000000FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF0000000000FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF0000000000FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF0000000000FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000FFFFFF000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF000000000000000000000000000000000000000000000000000000000000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00000000000000000000000000FFFFFF0000FFFF00FFFF
+      FF0000000000FFFFFF0000FFFF00FFFFFF0000FFFF000000000000FFFF00FFFF
+      FF000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000000000000000000000000000000000000000000000000000FFFF
+      FF0000FFFF000000000000FFFF00FFFFFF0000FFFF00FFFFFF00000000000000
+      000000FFFF00FFFFFF0000000000000000000000000000FFFF00FFFFFF0000FF
+      FF000000000000FFFF00FFFFFF0000FFFF000000000000000000FFFFFF0000FF
+      FF0000000000FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000FFFFFF000000000000000000000000000000
+      00000000000000000000FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF000000000000000000000000000000000000000000000000000000000000FF
+      FF00FFFFFF0000000000FFFFFF0000FFFF00FFFFFF0000000000FFFFFF000000
+      0000FFFFFF0000FFFF00000000000000000000000000FFFFFF0000FFFF00FFFF
+      FF0000000000FFFFFF0000FFFF000000000000FFFF000000000000FFFF00FFFF
+      FF000000000000000000FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000000000000000000000000000000000000000000000000000FFFF
+      FF0000FFFF000000000000FFFF00FFFFFF0000000000FFFFFF0000FFFF000000
+      000000FFFF00FFFFFF0000000000000000000000000000FFFF00FFFFFF0000FF
+      FF000000000000FFFF000000000000FFFF00FFFFFF0000000000FFFFFF0000FF
+      FF0000000000FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000FFFFFF000000000000000000000000000000
+      00000000000000000000FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF000000000000000000000000000000000000000000000000000000000000FF
+      FF00FFFFFF0000000000FFFFFF0000000000FFFFFF0000FFFF00FFFFFF000000
+      0000FFFFFF0000FFFF00000000000000000000000000FFFFFF0000FFFF00FFFF
+      FF00000000000000000000FFFF00FFFFFF0000FFFF000000000000FFFF00FFFF
+      FF000000000000000000FFFFFF000000000000000000FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000000000000000000000000000000000000000000000000000FFFF
+      FF0000FFFF000000000000000000FFFFFF0000FFFF00FFFFFF0000FFFF000000
+      000000FFFF00FFFFFF0000000000000000000000000000FFFF00FFFFFF0000FF
+      FF000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000000000FFFFFF0000FF
+      FF0000000000FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF0000000000FFFFFF00000000000000000000000000FFFF
+      FF000000000000000000FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF000000000000000000000000000000000000000000FFFFFF00FFFF
+      FF000000000000000000000000000000000000000000000000000000000000FF
+      FF00FFFFFF0000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF000000
+      0000FFFFFF0000FFFF00000000000000000000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+      FF000000000000000000FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000000000000000000000000000000000000000000000000000FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000FFFFFF00FFFFFF000000000000000000FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF0000000000FFFFFF000000000000000000FFFFFF000000
+      00000000000000000000FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF000000000000000000FFFF
+      FF000000000000000000000000000000000000000000FFFFFF00FFFFFF000000
+      0000FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF0000FFFF00FFFFFF0000FFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000FFFFFF00000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF0000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF000000000000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF0000000000FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
+      FF0000000000000000000000000000000000000000000000000000FFFF00C6C6
+      C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000000000000000000000000000FF
+      FF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FF
+      FF00FFFFFF0000FFFF00000000000000000000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF0000000000000000000000000000000000FFFFFF0000FFFF00FFFF
+      FF00000000000000000000000000000000000000000000FFFF000000000000FF
+      FF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FF
+      FF0000000000FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000000000000000000000000000000000000000000000000000FFFF
+      FF0000FFFF00FFFFFF0000FFFF0000000000000000000000000000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000000000000000000000000000FFFF00FFFFFF0000FF
+      FF000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000000000FFFFFF0000FF
+      FF0000000000FFFFFF00FFFFFF000000000000000000FFFFFF0000FFFF000000
+      000000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6C60000FFFF00C6C6
+      C60000FFFF0000000000FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF0000000000000000000000000000000000FFFFFF00FFFFFF00FFFF
+      FF000000000000000000000000000000000000000000000000000000000000FF
+      FF00FFFFFF0000FFFF000000000000FFFF00FFFFFF0000FFFF000000000000FF
+      FF00FFFFFF0000FFFF00000000000000000000000000FFFFFF0000FFFF000000
+      000000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000000000FFFF
+      FF000000000000000000FFFFFF00000000000000000000FFFF00FFFFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000000000000000000000000000000000000000000000000000FFFF
+      FF0000FFFF000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF000000
+      000000FFFF00FFFFFF0000000000000000000000000000FFFF00FFFFFF000000
+      0000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF000000000000FF
+      FF0000000000FFFFFF00FFFFFF000000000000000000FFFFFF0000FFFF000000
+      0000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF00000000000000000000000000000000000000000000000000FFFF
+      FF000000000000000000000000000000000000000000000000000000000000FF
+      FF00FFFFFF0000000000FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF000000
+      0000FFFFFF0000FFFF00000000000000000000000000FFFFFF0000FFFF00FFFF
+      FF0000000000FFFFFF0000FFFF00FFFFFF0000FFFF000000000000FFFF00FFFF
+      FF000000000000000000FFFFFF00000000000000000000FFFF00FFFFFF000000
+      0000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000000000000000000000000000000000000000000000000000FFFF
+      FF0000FFFF000000000000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF000000
+      000000FFFF00FFFFFF0000000000000000000000000000FFFF00FFFFFF0000FF
+      FF00FFFFFF000000000000000000000000000000000000FFFF00FFFFFF0000FF
+      FF0000000000FFFFFF00FFFFFF000000000000000000FFFFFF0000FFFF000000
+      0000FFFFFF0000000000FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF00000000000000000000000000000000000000000000000000FFFF
+      FF000000000000000000000000000000000000000000000000000000000000FF
+      FF00FFFFFF0000FFFF000000000000FFFF00FFFFFF0000FFFF000000000000FF
+      FF00FFFFFF0000FFFF00000000000000000000000000FFFFFF0000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFFFF0000FFFF00FFFF
+      FF000000000000000000FFFFFF00000000000000000000000000FFFFFF000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF0000000000FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000000000000000000000000000000000000000000000000000FFFF
+      FF0000FFFF00FFFFFF0000FFFF0000000000000000000000000000FFFF00FFFF
+      FF0000FFFF00FFFFFF0000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000000000FFFFFF00FFFFFF00000000000000000084848400000000000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF0000000000FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF00000000000000000000000000FFFFFF000000000000000000FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF000000000000000000FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF0000000000FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF0000FFFF00FFFFFF0000FFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF0000000000FFFFFF0000000000000000000000000000000000000000000000
+      0000FFFFFF0000000000FFFFFF00FFFFFF0000000000FFFFFF00FFFFFF00FFFF
+      FF0000000000FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF000000000000000000FFFFFF00000000000000000000000000FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF0000000000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF0000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF0000000000FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
+      FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000C6C6C6000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000C6C6C6000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000000000000000C6C6
+      C600000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000000000000000000C6C6
+      C600000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000FFFF0000FFFF0000FFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000000000000000000000000000FFFF0000000000008484000000
+      0000C6C6C6000000000000000000000000000000000000000000000000000000
+      000000FFFF0000000000000000000000000000FFFF0000000000008484000000
+      0000C6C6C6000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000FFFF0000FFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000008484000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000000000000FFFF0000000000008484000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000008484000084
+      840000000000000000000000000000000000000000000000000000FFFF0000FF
+      FF0000FFFF0000FFFF0000FFFF00000000000000000000000000008484000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000008484000084
+      840000000000000000000000000000000000000000000000000000FFFF000000
+      0000000000000000000000FFFF0000000000C6C6C60000000000008484000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000008484000084
+      840000000000000000000000000000000000000000000000000000FFFF0000FF
+      FF0000FFFF0000FFFF0000FFFF0000000000C6C6C60000000000008484000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000FFFF0000FFFF0000FFFF000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000000000000000000000000000FFFF0000000000008484000084
+      840000000000000000000000000000000000000000000000000000FFFF0000FF
+      FF0000FFFF0000FFFF0000FFFF00000000000000000000000000008484000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000FFFF0000FFFF00000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000008484000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000008484840000000000008484000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      000000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000000000008484000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000FFFFFF00FFFFFF00FFFFFF00848484008484840000000000008484000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      8400848484008484840084848400848484008484840084848400000000000000
+      0000000000000000000000000000000000000000000000000000000000008484
+      8400848484008484840084848400848484008484840084848400000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000FFFF0000FFFF0000FF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000FFFF000084840000FFFF000084840000FFFF00008484000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000084840000FFFF000084840000FFFF000084840000FFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000FFFF0000FFFF000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      00000000000000000000000000000084840000FFFF000084840000FFFF000084
+      8400000000000000000000000000000000000000000000000000000000000000
+      000000000000000000000000000000FFFF000084840000FFFF000084840000FF
+      FF00000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000084848400000000000000000000000000000000000000
+      0000000000000000000000000000000000000000000000000000000000000000
+      0000000000000000000084848400000000000000000000000000000000000000
       000000000000000000000000000000000000424D3E000000000000003E000000
       2800000040000000400000000100010000000000000200000000000000000000
Index: cprs/branches/foia-cprs/CPRS-Chart/dShared.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/dShared.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/dShared.pas	(revision 460)
@@ -524,5 +524,6 @@
   if(not assigned(FTIUObjects)) or (FRefreshObject = true)  then
   begin
-   FTIUObjects := TStringList.Create;
+    if(not assigned(FTIUObjects)) then
+      FTIUObjects := TStringList.Create;
     FTIUObjects.Clear;
     GetObjectList;
Index: cprs/branches/foia-cprs/CPRS-Chart/fARTAllgy.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fARTAllgy.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fARTAllgy.dfm	(revision 460)
@@ -260,4 +260,6 @@
           Height = 17
           Caption = 'Marked On Chart'
+          Checked = True
+          State = cbChecked
           TabOrder = 18
           Visible = False
@@ -285,5 +287,5 @@
           ItemTipColor = clWindow
           ItemTipEnable = True
-          ListItemsOnly = False
+          ListItemsOnly = True
           LongList = True
           LookupPiece = 0
@@ -368,4 +370,5 @@
           TabOrder = 9
           OnChange = ControlChange
+          OnExit = ControlChange
           CharsNeedMatch = 1
         end
@@ -534,5 +537,5 @@
           Left = 0
           Top = 330
-          Width = 83
+          Width = 521
           Height = 13
           Align = alBottom
@@ -567,4 +570,5 @@
           Font.Style = []
           ParentFont = False
+          ScrollBars = ssVertical
           TabOrder = 1
           OnExit = memCommentsExit
Index: cprs/branches/foia-cprs/CPRS-Chart/fARTAllgy.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fARTAllgy.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fARTAllgy.pas	(revision 460)
@@ -60,5 +60,5 @@
     btnSevHelp: TORAlignButton;
     procedure btnAgentClick(Sender: TObject);
-    procedure FormCreate(Sender: TObject);
+    procedure FormCreate(Sender: TObject); 
     procedure cboOriginatorNeedData(Sender: TObject; const StartFrom: String;
       Direction, InsertAt: Integer);
@@ -160,4 +160,5 @@
                    'HISTORICAL: reported by the patient as occurring in the past;' + CRLF +
                    'no longer requires intervention' ;
+
  NEW_ALLERGY = True;
  ENTERED_IN_ERROR = True;
@@ -190,4 +191,5 @@
   Result := False;
   frmARTAllergy := TfrmARTAllergy.Create(Application);
+  if frmARTAllergy.AbortAction then exit;
   with frmARTAllergy do
     try
@@ -286,4 +288,5 @@
   ExtractItems(cboSymptoms.Items, Defaults, 'Top Ten');
   cboSymptoms.InsertSeparator;
+  cboSymptoms.InitLongList('');
   cboOriginator.InitLongList(User.Name) ;
   cboOriginator.SelectByIEN(User.DUZ);
@@ -301,6 +304,15 @@
 var
   Allergy: string;
-begin
-  inherited;
+  //ErrMsg: string;
+begin
+  inherited;
+  // since this only allows entry of new allergies, key check is irrelevant, eff. v26.12
+(*  if not IsARTClinicalUser(ErrMsg) then
+  begin
+    InfoBox(ErrMsg, 'No Authorization', MB_ICONWARNING or MB_OK);
+    AbortAction := True;
+    Close;
+    Exit;
+  end;*)
   Changing := True;
   FOldHintPause := Application.HintHidePause;
@@ -441,5 +453,5 @@
         begin
           if (lstSelectedSymptoms.Items.Count = 0)   then SetError(TX_NO_SYMPTOMS);
-          if (grpObsHist.Enabled) and RequireOriginatorComments and (memComments.Text = '')  then
+          if (grpObsHist.Enabled) and RequireOriginatorComments and (not ContainsVisibleChar(memComments.Text))  then
             SetError(TX_ORIG_CMTS_REQD);
           if (grpObsHist.Enabled) and (calObservedDate.Text = '')  then
@@ -627,6 +639,8 @@
               if tmpDate > 0 then ReactionDate := tmpDate;*)
               with cboSeverity do
-                if ItemID <> '' then
-                  Severity := ItemID;
+                if (ItemID <> '') and (Text <> '') then
+                  Severity := ItemID
+                else
+                  Severity := '';
               with memComments do
                 if GetTextLen > 0 then
@@ -886,12 +900,20 @@
 
 procedure TfrmARTAllergy.cboSymptomsMouseClick(Sender: TObject);
+const
+  TC_SS_MAX = 'Too many signs/symptoms';
+  TX_SS_MAX = 'A maximum of 38 signs/symptoms may be selected.';
 var
   x: string;
 begin
   inherited;
-  if (cboSymptoms.ItemIndex < 0) and (cboSymptoms.Text = '') then exit;
-  Changing := True;
+  with cboSymptoms do if (ItemIndex < 0) or (Text = '') or (ItemID = '') then exit;
   if (lstSelectedSymptoms.SelectByID(cboSymptoms.ItemID) > -1) or
      (lstSelectedSymptoms.Items.IndexOf(cboSymptoms.Text) > -1) then exit;
+  if (lstSelectedSymptoms.Count + 1) > 38 then
+  begin
+    InfoBox(TX_SS_MAX, TC_SS_MAX, MB_ICONERROR or MB_OK);
+    exit;
+  end;
+  Changing := True;
   if cboSymptoms.ItemIndex > -1 then
     begin
@@ -906,11 +928,11 @@
           SelectByID(cboSymptoms.ItemID);
         end;
-    end
-  else
+    end ;
+(*  else                             Free-text entries no longer allowed.
     with lstSelectedSymptoms do
       begin
         Items.Add('FT' + U + cboSymptoms.Text);
         ItemIndex := Items.Count - 1;
-      end;
+      end;*)
   Changing := False;
   ControlChange(Self)
Index: cprs/branches/foia-cprs/CPRS-Chart/fARTFreeTextMsg.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fARTFreeTextMsg.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fARTFreeTextMsg.dfm	(revision 460)
@@ -7,5 +7,4 @@
   Constraints.MinHeight = 180
   Constraints.MinWidth = 394
-  FormStyle = fsStayOnTop
   Position = poMainFormCenter
   PixelsPerInch = 96
Index: cprs/branches/foia-cprs/CPRS-Chart/fActivateDeactivate.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fActivateDeactivate.dfm	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/fActivateDeactivate.dfm	(revision 460)
@@ -0,0 +1,62 @@
+object frmActivateDeactive: TfrmActivateDeactive
+  Left = 491
+  Top = 376
+  AutoScroll = False
+  BorderIcons = []
+  Caption = 'Renew Order'
+  ClientHeight = 185
+  ClientWidth = 353
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  OldCreateOrder = False
+  DesignSize = (
+    353
+    185)
+  PixelsPerInch = 96
+  TextHeight = 13
+  object TActivate: TButton
+    Left = 143
+    Top = 160
+    Width = 56
+    Height = 25
+    Anchors = [akLeft, akTop, akRight, akBottom]
+    Caption = 'No'
+    TabOrder = 2
+    OnClick = TActivateClick
+  end
+  object TDeactive: TButton
+    Left = 63
+    Top = 160
+    Width = 56
+    Height = 25
+    Caption = 'Yes'
+    TabOrder = 1
+    OnClick = TDeactiveClick
+  end
+  object Memo1: TMemo
+    Left = 0
+    Top = 0
+    Width = 345
+    Height = 145
+    BorderStyle = bsNone
+    Color = clBtnFace
+    Lines.Strings = (
+      'Memo1')
+    ReadOnly = True
+    ScrollBars = ssVertical
+    TabOrder = 0
+  end
+  object TCancel: TButton
+    Left = 225
+    Top = 160
+    Width = 56
+    Height = 25
+    Caption = 'Cancel'
+    TabOrder = 3
+    OnClick = TCancelClick
+  end
+end
Index: cprs/branches/foia-cprs/CPRS-Chart/fActivateDeactivate.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fActivateDeactivate.pas	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/fActivateDeactivate.pas	(revision 460)
@@ -0,0 +1,182 @@
+unit fActivateDeactivate;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, StrUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs, fAutoSz, StdCtrls, ExtCtrls, ORCtrls,ORFn, rCore, uCore, oRNet, Math, fOrders, ORClasses, rOrders,
+  fMeds, rMeds;
+
+type
+  TfrmActivateDeactive = class(TfrmAutoSz)
+    TActivate: TButton;
+    TDeactive: TButton;
+    Memo1: TMemo;
+    TCancel: TButton;
+    procedure TActivateClick(Sender: TObject);
+    procedure TDeactiveClick(Sender: TObject);
+    procedure TCancelClick(Sender: TObject);
+  private
+    { Private declarations }
+    procedure GetOriginalOrders(OrderID: TStringList; var OriginalOrder: TORStringList);
+    procedure BuildForm(Str1: String);
+    function PromptForm(Text: String): String;
+  public
+     { Public declarations }
+
+    procedure fActivateDeactive(OrderID: TStringList); overload;
+    procedure fActivateDeactive(OrderID: TStringList; AList: TListBox); overload;
+  end;
+
+var
+  frmActivateDeactive: TfrmActivateDeactive;
+  Act: Boolean;
+  Deact: Boolean;
+  CancelProcess: Boolean;
+
+implementation
+
+{$R *.dfm}
+
+{ TfrmActivateDeactive }
+
+procedure TfrmActivateDeactive.BuildForm(Str1: String);
+var
+ str: string;
+begin
+  with frmActivateDeactive do
+     begin
+        str := 'This order ' + str1 +' is currently in a pending status. ';
+        str := str + CRLF + 'If this order is discontinued, the original order status will be changed to active, unless it is discontinued.';
+        str := str + CRLF + CRLF + 'Click:';
+        str := str + CRLF + '     "Yes" to discontinue the original order';
+        str := str + CRLF + '     "No" to change the status to active';
+        str := str + CRLF + '     "Cancel" to stop the discontinue process for this order';
+        Memo1.ReadOnly := False;
+        Memo1.Text := str;
+        Memo1.ReadOnly := True;
+     end;
+    ResizeAnchoredFormToFont(frmActivateDeactive);
+    frmActivateDeactive.ShowModal;
+    frmActivateDeactive.Release;
+end;
+
+procedure TfrmActivateDeactive.fActivateDeactive(OrderID: TStringList);
+var
+i,j,Pos: integer;
+tmpArr: TORStringList;
+ActDeact: string;
+AnOrder,AnOrder1: TOrder;
+begin
+  //called from order tab
+  tmpArr := TORStringList.Create;
+  GetOriginalOrders(OrderID,tmpArr);
+      with forders.frmOrders.lstOrders do for i := 0 to items.Count-1 do if Selected[i] then
+        begin
+          AnOrder := TOrder(Items.Objects[i]);
+          Pos := tmpArr.IndexOfPiece(AnOrder.ID,U,1);
+          if Pos > -1 then
+            begin
+              ActDeact := PromptForm(AnOrder.Text);
+              if ActDeact = 'D' then
+                begin
+                  for j := 0 to forders.frmOrders.lstOrders.Items.Count-1 do
+                    begin
+                      AnOrder1 := TOrder(forders.frmOrders.lstOrders.Items.Objects[j]);
+                      if AnOrder1.ID = Piece(tmpArr.Strings[Pos],U,2) then
+                        forders.frmOrders.lstOrders.Selected[j] := True;
+                    end;
+                end;
+              if ActDeact = 'C' then Selected[i] := False;
+            end;
+        end;
+end;
+
+procedure TfrmActivateDeactive.fActivateDeactive(OrderID: TStringList; AList: TListBox);
+var
+i,j,Pos: integer;
+tmpArr: TORStringList;
+ActDeact: String;
+AMed,AMed1: TMedListRec;
+begin
+  //called from Med tab
+  tmpArr := TORStringList.Create;
+  GetOriginalOrders(OrderID,tmpArr);
+      with AList do for i := 0 to items.Count-1 do if Selected[i] then
+        begin
+          AMed := TMedListRec(Items.Objects[i]);
+          Pos := tmpArr.IndexOfPiece(AMed.OrderID,U,1);
+          if Pos > -1 then
+            begin
+              ActDeact := PromptForm(Alist.Items.Strings[i]);
+              if ActDeact = 'D' then
+                begin
+                  for j := 0 to Alist.Items.Count-1 do
+                    begin
+                      AMed1 := TMedListRec(Alist.Items.Objects[j]);
+                      if AMed1.OrderID = Piece(tmpArr.Strings[Pos],U,2) then
+                        begin
+                          Alist.Selected[j] := True;
+                          break;
+                        end;
+                      //some med orders may not have an action defined tends to be renew order of orders that were renew from another
+                      //order and outpatient orders
+                      if (AMed1.OrderID = Piece(Piece(tmpArr.Strings[Pos],U,2),';',1)) then
+                        begin
+                          Alist.Selected[j] := True;
+                          break;
+                        end;
+
+                    end;
+                end;
+              if ActDeact = 'C' then Selected[i] := False;
+            end;
+        end;
+end;
+
+procedure TfrmActivateDeactive.GetOriginalOrders(OrderID: TStringList; var OriginalOrder: TORStringList);
+var
+i: integer;
+begin
+  CallV('ORWDX1 DCREN', [OrderID]);
+  for i := 0 to RPCBrokerV.Results.Count-1 do
+    OriginalOrder.Add(RPCBrokerV.Results.Strings[i]);
+end;
+
+function TfrmActivateDeactive.PromptForm(Text: String): String;
+begin
+  frmActivateDeactive := TfrmActivateDeactive.create(Application);
+  BuildForm(Text);
+  if Deact = True then Result := 'D';
+  if Act = True then Result := 'A';
+  if CancelProcess = True then Result := 'C';
+end;
+
+procedure TfrmActivateDeactive.TActivateClick(Sender: TObject);
+begin
+  inherited;
+   Act := True;
+   Deact := False;
+   CancelProcess := False;
+   frmActivateDeactive.Close;
+end;
+
+procedure TfrmActivateDeactive.TDeactiveClick(Sender: TObject);
+begin
+  inherited;
+   Act := False;
+   Deact := True;
+   CancelProcess := False;
+   frmActivateDeactive.Close;
+end;
+
+procedure TfrmActivateDeactive.TCancelClick(Sender: TObject);
+begin
+  inherited;
+  Act := False;
+  Deact := False;
+  CancelProcess := True;
+  frmActivateDeactive.Close;
+end;
+
+end.
Index: cprs/branches/foia-cprs/CPRS-Chart/fAddlSigners.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fAddlSigners.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fAddlSigners.dfm	(revision 460)
@@ -103,4 +103,5 @@
         OnMouseClick = cboSrcListMouseClick
         OnNeedData = NewPersonNeedData
+        CharsNeedMatch = 1
       end
       object DstList: TORListBox
@@ -187,4 +188,5 @@
         OnExit = cboCosignerExit
         OnNeedData = cboCosignerNeedData
+        CharsNeedMatch = 1
       end
       object txtAuthor: TCaptionEdit
Index: cprs/branches/foia-cprs/CPRS-Chart/fAddlSigners.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fAddlSigners.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fAddlSigners.pas	(revision 460)
@@ -46,4 +46,5 @@
     FChanged: Boolean;
     FNoteIEN: integer;
+    FRefDate: TFMDateTime;
     FToday: string;
     FTabID: integer;
@@ -58,5 +59,5 @@
 
 procedure SelectAdditionalSigners(FontSize, NoteIEN, SigAction: Integer; Exclusions: TStrings;
-          var SignerList: TSignerList; TabID: integer) ;
+          var SignerList: TSignerList; TabID: integer; ARefDate: TFMDateTime) ;
 
 const
@@ -83,6 +84,6 @@
 
 
-procedure SelectAdditionalSigners(FontSize, NoteIEN, SigAction: Integer; {Status: string;} Exclusions: TStrings;
-          var SignerList: TSignerList; TabID: integer) ;
+procedure SelectAdditionalSigners(FontSize, NoteIEN, SigAction: Integer; Exclusions: TStrings;
+          var SignerList: TSignerList; TabID: integer; ARefDate: TFMDateTime) ;
 { displays additional signer form for notes and returns a record of the selection }
 var
@@ -97,4 +98,5 @@
       FSigAction := SigAction;
       FNoteIEN := NoteIEN;
+      FRefDate := ARefDate;
       FExclusions.Assign(Exclusions);
       FToday := FloatToStr(FMToday);
@@ -209,5 +211,5 @@
           begin
             j := FExclusions.IndexOf(Items[i]);
-            FSigners.Add(Items[i]+'^REMOVE');
+            FSigners.Add(ORFn.Pieces(Items[i], U, 1, 2) + '^REMOVE');
             if j > -1 then FExclusions.Delete(j);
             Items.Delete(i) ;
@@ -227,5 +229,5 @@
     begin
       DstList.Items.Delete(i);
-      FSigners.Add(cboCosigner.Items[cboCosigner.ItemIndex] + '^REMOVE');
+      FSigners.Add(ORFn.Pieces(cboCosigner.Items[cboCosigner.ItemIndex], U, 1, 2) + '^REMOVE');
     end;
 end;
@@ -271,5 +273,5 @@
   case FTabID of
     CT_NOTES, CT_CONSULTS:
-      if (not CanCosign(TitleForNote(FNoteIEN), 0, cboCosigner.ItemIEN)) then
+      if (not CanCosign(TitleForNote(FNoteIEN), 0, cboCosigner.ItemIEN, FRefDate)) then
         begin
           InfoBox(cboCosigner.Text + TX_NO_COSIGNER, TX_NO_COSIGNER_CAP, MB_OK or MB_ICONWARNING);
Index: cprs/branches/foia-cprs/CPRS-Chart/fAllgyBox.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fAllgyBox.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fAllgyBox.pas	(revision 460)
@@ -32,5 +32,5 @@
 {$R *.dfm}
 
-uses rCover, fCover;
+uses rCover, fCover, rODAllergy;
 
 const
@@ -47,4 +47,5 @@
   BtnLeft:  array of integer;
   j, k: integer;
+  x: string;
 begin
   Result := TfrmAllgyBox.Create(Application);
@@ -68,5 +69,4 @@
         if AWidth > MaxWidth then MaxWidth := AWidth;
       end;
-      cmdPrint.Visible := AllowPrint;
       MaxWidth := MaxWidth + GetSystemMetrics(SM_CXVSCROLL);
       AHeight := (ReportText.Count * (lblFontTest.Height + 2)) + pnlbutton.Height;
@@ -87,4 +87,8 @@
       Caption := ReportTitle;
       memReport.SelStart := 0;
+      cmdPrint.Visible := AllowPrint;
+      cmdAdd.Enabled := True;  //IsARTClinicalUser(x);   v26.12
+      cmdEdit.Enabled := IsARTClinicalUser(x);  
+      cmdInError.Enabled := IsARTClinicalUser(x);
     end;
   except
Index: cprs/branches/foia-cprs/CPRS-Chart/fAllgyFind.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fAllgyFind.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fAllgyFind.dfm	(revision 460)
@@ -4,8 +4,7 @@
   BorderIcons = []
   BorderStyle = bsDialog
-  Caption = 'Allergy Reactant Lookup'
-  ClientHeight = 410
-  ClientWidth = 443
-  FormStyle = fsStayOnTop
+  Caption = 'Causative Agent Lookup'
+  ClientHeight = 472
+  ClientWidth = 445
   Position = poScreenCenter
   OnCreate = FormCreate
@@ -13,28 +12,51 @@
   TextHeight = 13
   object lblSearch: TLabel
+    Left = 0
+    Top = 0
+    Width = 445
+    Height = 25
+    Align = alTop
+    AutoSize = False
+    Caption = 'Enter causative agent for Allergy or Adverse Drug Reaction:'
+    Font.Charset = DEFAULT_CHARSET
+    Font.Color = clWindowText
+    Font.Height = -11
+    Font.Name = 'MS Sans Serif'
+    Font.Style = [fsBold]
+    ParentFont = False
+    Layout = tlBottom
+  end
+  object lblSelect: TLabel
+    Left = 5
+    Top = 124
+    Width = 152
+    Height = 13
+    Caption = 'Select one of the following items'
+    Visible = False
+  end
+  object lblDetail: TLabel
+    Left = 0
+    Top = 25
+    Width = 445
+    Height = 39
+    Align = alTop
+    AutoSize = False
+    Caption = 
+      '(Enter the FIRST FEW LETTERS of the causative agent (minimum of ' +
+      '3) to allow for a comprehensive search. Only one reactant may be' +
+      ' entered at a time)'
+    Layout = tlBottom
+    WordWrap = True
+  end
+  object lblSearchCaption: TLabel
     Left = 6
-    Top = 9
-    Width = 282
+    Top = 73
+    Width = 52
     Height = 13
-    Caption = 'Enter causative agent for Allergy or Adverse Drug Reaction:'
-  end
-  object lblSelect: TLabel
-    Left = 6
-    Top = 67
-    Width = 175
-    Height = 13
-    Caption = 'Select from one of the following items'
-    Visible = False
-  end
-  object Label1: TLabel
-    Left = 6
-    Top = 23
-    Width = 130
-    Height = 13
-    Caption = '(Enter at least 3 characters)'
+    Caption = 'Search for:'
   end
   object txtSearch: TCaptionEdit
-    Left = 5
-    Top = 38
+    Left = 4
+    Top = 88
     Width = 331
     Height = 21
@@ -46,6 +68,6 @@
   end
   object cmdSearch: TButton
-    Left = 363
-    Top = 38
+    Left = 362
+    Top = 88
     Width = 75
     Height = 21
@@ -56,6 +78,6 @@
   end
   object cmdOK: TButton
-    Left = 264
-    Top = 365
+    Left = 263
+    Top = 422
     Width = 75
     Height = 22
@@ -65,6 +87,6 @@
   end
   object cmdCancel: TButton
-    Left = 346
-    Top = 365
+    Left = 345
+    Top = 422
     Width = 75
     Height = 22
@@ -76,6 +98,6 @@
   object stsFound: TStatusBar
     Left = 0
-    Top = 391
-    Width = 443
+    Top = 453
+    Width = 445
     Height = 19
     Panels = <>
@@ -83,6 +105,6 @@
   end
   object ckNoKnownAllergies: TCheckBox
-    Left = 80
-    Top = 368
+    Left = 320
+    Top = 118
     Width = 119
     Height = 17
@@ -92,6 +114,6 @@
   end
   object tvAgent: TORTreeView
-    Left = 3
-    Top = 81
+    Left = 2
+    Top = 138
     Width = 437
     Height = 270
@@ -106,6 +128,6 @@
   end
   object imTree: TImageList
-    Left = 397
-    Top = 93
+    Left = 396
+    Top = 150
     Bitmap = {
       494C010103000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
Index: cprs/branches/foia-cprs/CPRS-Chart/fAllgyFind.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fAllgyFind.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fAllgyFind.pas	(revision 460)
@@ -19,5 +19,6 @@
     tvAgent: TORTreeView;
     imTree: TImageList;
-    Label1: TLabel;
+    lblDetail: TLabel;
+    lblSearchCaption: TLabel;
     procedure cmdSearchClick(Sender: TObject);
     procedure cmdCancelClick(Sender: TObject);
@@ -49,6 +50,6 @@
   ST_FOUND      = 'Select from the matching entries on the list, or search again.';
   ST_NONE_FOUND = 'No matching items were found.';
-  TC_FREE_TEXT  = 'Causative Agent Not On File';
-  TX_FREE_TEXT  = 'Would you like to request that this term be added to' + #13#10 +
+  TC_FREE_TEXT  = 'Causative Agent Not On File - No Matches for ';
+(*  TX_FREE_TEXT  = 'Would you like to request that this term be added to' + #13#10 +
                   'the list of available allergies?' + #13#10 + #13#10 +
                   '"YES" will send a bulletin to request addition of your' + #13#10 +
@@ -58,6 +59,25 @@
                   'check your spelling, try alternate spellings or a trade name,' + #13#10 +
                   'or contact your allergy coordinator for assistance.' + #13#10 + #13#10 +
-                  '"CANCEL" will abort this entry process completely.';
-  TX_BULLETIN   = 'Bulletin has been sent.';
+                  '"CANCEL" will abort this entry process completely.';*)
+  // NEW TEXT SUBSTITUTED IN V26.50 - RV
+  TX_FREE_TEXT  = 'The agent you typed was not found in the database.'  + CRLF +
+                  'Consider the common causes of search failure:'       + CRLF +
+                  '      Misspellings'                                  + CRLF +
+	          '      Typing more than one agent in a single entry ' + CRLF +
+	          '      Typing "No known allergies"'                   + CRLF +
+                   CRLF +
+                   'Select "NO" to attempt the search again.  Carefully check your spelling,'+ CRLF +
+                   'try an alternate spelling, a trade name, a generic name or just entering' + CRLF +
+                   'the first few characters (minimum of 3).  Enter only one allergy at a time.' + CRLF +
+                   'Use the "No Known Allergies" check box to mark a patient as NKA.' + CRLF +
+                   CRLF +
+                   'Select "YES" to send a bulletin to the allergy coordinator to request assistance.'  + CRLF +
+                   'Only do this if you''ve tried alternate methods of finding the causative agent'  + CRLF +
+                   'and have been unsuccessful.'  + CRLF +
+                   CRLF +
+                  'Select "CANCEL" to abort this entry process.';
+
+  TX_BULLETIN   = 'Bulletin has been sent.' + CRLF +
+                  'NOTE: This reactant was NOT added for this patient.';
   TC_BULLETIN_ERROR = 'Unable to Send Bulletin';
   TX_BULLETIN_ERROR = 'Free text entries are no longer allowed.' + #13#10 +
@@ -186,5 +206,5 @@
   x: string;
   tmpList: TStringList;
-  OKtoContinue: boolean;
+  OKtoContinue: boolean ;
 begin
   inherited;
@@ -206,5 +226,5 @@
     begin
       FAllergy := '';
-      case InfoBox(TX_FREE_TEXT, TC_FREE_TEXT, MB_YESNOCANCEL or MB_DEFBUTTON2 or MB_ICONQUESTION)of
+      case InfoBox(TX_FREE_TEXT, TC_FREE_TEXT + UpperCase(txtSearch.Text), MB_YESNOCANCEL or MB_DEFBUTTON2 or MB_ICONQUESTION)of
         ID_YES   :  // send bulletin and abort free-text entry
                     begin
Index: cprs/branches/foia-cprs/CPRS-Chart/fClinicWardMeds.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fClinicWardMeds.dfm	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/fClinicWardMeds.dfm	(revision 460)
@@ -0,0 +1,54 @@
+inherited frmClinicWardMeds: TfrmClinicWardMeds
+  Left = 523
+  Top = 389
+  Width = 306
+  Height = 122
+  BorderIcons = []
+  Caption = 'Patient Location'
+  PixelsPerInch = 96
+  TextHeight = 13
+  object stxtLine3: TStaticText
+    Left = 16
+    Top = 35
+    Width = 29
+    Height = 17
+    Caption = 'line 3'
+    TabOrder = 0
+  end
+  object stxtLine2: TStaticText
+    Left = 16
+    Top = 20
+    Width = 29
+    Height = 17
+    Caption = 'line 2'
+    TabOrder = 1
+  end
+  object stxtLine1: TStaticText
+    Left = 16
+    Top = 5
+    Width = 29
+    Height = 17
+    Caption = 'line 1'
+    TabOrder = 2
+  end
+  object btnClinic: TButton
+    Left = 31
+    Top = 62
+    Width = 58
+    Height = 24
+    Anchors = [akLeft, akBottom]
+    BiDiMode = bdLeftToRight
+    ParentBiDiMode = False
+    TabOrder = 3
+    OnClick = btnClinicClick
+  end
+  object btnWard: TButton
+    Left = 159
+    Top = 62
+    Width = 58
+    Height = 24
+    Anchors = [akLeft, akBottom]
+    TabOrder = 4
+    OnClick = btnWardClick
+  end
+end
Index: cprs/branches/foia-cprs/CPRS-Chart/fClinicWardMeds.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fClinicWardMeds.pas	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/fClinicWardMeds.pas	(revision 460)
@@ -0,0 +1,190 @@
+unit fClinicWardMeds;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs, fAutoSz, StdCtrls, ExtCtrls, ORCtrls,ORFn, rCore, uCore, oRNet, Math;
+
+type
+  TfrmClinicWardMeds = class(TfrmAutoSz)
+    stxtLine3: TStaticText;
+    stxtLine2: TStaticText;
+    stxtLine1: TStaticText;
+    btnClinic: TButton;
+    btnWard: TButton;
+    procedure btnClinicClick(Sender: TObject);
+    procedure btnWardClick(Sender: TObject);
+
+  private
+    { Private declarations }
+    procedure StartLocationCheck;
+    procedure rpcChangeOrderLocation(pOrderList:TStringList);
+    procedure BuildMessage(MsgSw:string);
+    function  BuildOrderLocList(pOrderList:TStringList; pLocation:integer):TStringList;
+
+  public
+    { Public declarations }
+    // passes order list and selected locations to rpc to be saved with order.
+    procedure ClinicOrWardLocation(pOrderList:TStringList; pEncounterLoc: integer; pEncounterLocName: string; var RetLoc: integer); overload;
+    // returns Location selected by user.
+    function  ClinicOrWardLocation(pEncounterLoc: integer):integer;overLoad;
+    function  rpcIsPatientOnWard(Patient: string): boolean;
+    function  SelectPrintLocation(pEncounterLoc:integer):integer;
+  end;
+
+var
+  frmClinicWardMeds: TfrmClinicWardMeds;
+  ALocation,AWardLoc, AClinicLoc : integer;
+  ASelectedLoc: integer;
+  AName, ASvc, AWardName, AClinicName: string;
+  AOrderLocList: TStringList;
+  AMsgSw: string;
+
+const
+  LOCATION_CHANGE_1 = 'This patient is currently admitted to ward';
+  LOCATION_CHANGE_2 = 'These orders are written at clinic';
+  LOCATION_CHANGE_3 = 'Where do you want the orders administered?';
+   //GE CQ9537  - Message text
+  PRINT_LOCATION_1 = 'The patient has been admitted to Ward ';
+  PRINT_LOCATION_2 =  'Should the orders be printed using the new location?';
+  LOC_PRINT_MSG    = 'P';
+  LOC_MSG          = 'L';
+
+implementation
+
+uses fFrame;
+
+{$R *.dfm}
+
+//entry point
+function  TfrmClinicWardMeds.ClinicOrWardLocation(pEncounterLoc:integer):integer;
+begin
+  // Patient's current location
+   AClinicLoc  := pEncounterLoc;
+   AClinicName := Encounter.LocationName;
+   AMsgSw := LOC_MSG;
+   StartLocationCheck;
+   Result := ASelectedLoc;
+   frmClinicWardMeds.Close;
+end;
+
+//entry point
+procedure TfrmClinicWardMeds.ClinicOrWardLocation(pOrderList:TStringList;pEncounterLoc:integer;pEncounterLocName:string; var RetLoc: integer);
+begin
+  AClinicLoc        := pEncounterLoc;
+  AClinicName       := pEncounterLocName;
+  AOrderLocList     := TStringList.create;
+  AOrderLocList.Clear;
+  AMsgSw := LOC_MSG;
+  StartLocationCheck;
+  if pOrderList.Count > 0 then
+     begin
+       rpcChangeOrderLocation(BuildOrderLocList(pOrderList, ASelectedLoc));
+       RetLoc := ASelectedLoc
+     end;
+  if Assigned(AOrderLocList) then FreeAndNil(AOrderLocList);
+  frmClinicWardMeds.Close;
+end;
+
+// returns button selected by user - ward or clinic.  print location
+//entry point  -
+function  TfrmClinicWardMeds.SelectPrintLocation(pEncounterLoc:integer):integer;
+begin
+   AClinicLoc        := pEncounterLoc;
+   AMsgSw            := LOC_PRINT_MSG;
+   StartLocationCheck;
+   Result := ASelectedLoc;
+   frmClinicWardMeds.Close;
+end;
+
+procedure TfrmClinicWardMeds.StartLocationCheck;
+begin
+
+  frmClinicWardMeds := TfrmClinicWardMeds.Create(Application);
+ // ResizeFormToFont(TForm(frmClinicWardMeds));
+  CurrentLocationForPatient(Patient.DFN, ALocation, AName, ASvc);
+  AWardLoc := ALocation; //current location
+  AWardName := AName; // current location name
+  if AMsgSW = LOC_PRINT_MSG then BuildMessage(AMsgSw)
+  else
+     if (ALocation > 0) and (ALocation <> AClinicLoc) then BuildMessage(AMsgSw); //Location has changed, patient admitted
+end;
+
+procedure TfrmClinicWardMeds.btnClinicClick(Sender: TObject);
+begin
+  inherited;
+  ASelectedLoc := AClinicLoc;
+  frmClinicWardMeds.Close;
+end;
+
+procedure TfrmClinicWardMeds.btnWardClick(Sender: TObject);
+begin
+  inherited;
+   ASelectedLoc := AWardLoc;
+   frmClinicWardMeds.Close;
+end;
+
+procedure TfrmClinicWardMeds.BuildMessage(MsgSw:string);
+var
+ ALine1Len, ALine2Len, ALine3Len, ALongLine: integer;
+begin
+    with frmClinicWardMeds do
+    begin
+       btnWard.Caption   := 'Ward';
+       btnClinic.Caption := 'Clinic';
+       // message text
+       if MsgSw = LOC_MSG then
+       begin
+          //AClinicName := 'this is my long test clinic Name';
+          stxtLine1.Caption := LOCATION_CHANGE_1 + ' :' + AWardName;
+          stxtLine2.Caption := LOCATION_CHANGE_2+ ' :' + AClinicName;
+          stxtLine3.Caption := LOCATION_CHANGE_3;
+       end
+       else
+          begin
+              stxtLine1.Caption := PRINT_LOCATION_1 + ':' + AWardName;
+              stxtLine2.Caption := PRINT_LOCATION_2;
+              stxtLine3.Caption := '';
+          end;
+    stxtLine2.Left := stxtLine1.left;
+    stxtLine3.Left := stxtLine1.left;
+    ALine1Len := TextWidthByFont(frmClinicWardMeds.stxtLine1.Font.Handle, frmClinicWardMeds.stxtLine1.Caption);
+    ALine2Len := TextWidthByFont(frmClinicWardMeds.stxtLine2.Font.Handle, frmClinicWardMeds.stxtLine2.Caption);
+    ALine3Len := TextWidthByFont(frmClinicWardMeds.stxtLine3.Font.Handle, frmClinicWardMeds.stxtLine3.Caption)+25;
+    ALongLine := Max(ALine1Len,ALine2Len);
+    ALongLine := Max(ALine3Len,ALongLine);
+    frmClinicWardMeds.Width := (ALongLine + frmClinicWardMeds.stxtLine1.Left + 15);
+    end;
+    frmClinicWardMeds.ShowModal;
+    frmClinicWardMeds.Release;
+
+end;
+
+function  TfrmClinicWardMeds.BuildOrderLocList(pOrderList:TStringList; pLocation:integer):TStringList;
+var i:integer;
+    AOrderLoc: string;
+begin
+   AOrderLocList.clear;
+   for i := 0 to pOrderList.Count -1 do
+   begin
+      AOrderLoc := Piece(pOrderList.Strings[i],U,1) + U + IntToStr(pLocation);
+      AOrderLocList.Add(AOrderLoc);
+   end;
+   Result := AOrderLocList; //return value
+end;
+
+procedure TfrmClinicWardMeds.rpcChangeOrderLocation(pOrderList:TStringList);
+begin
+// OrderIEN^Location  -- used to alter location if ward is selected.
+
+   CallV('ORWDX CHANGE',[pOrderList, Patient.DFN]);
+end;
+
+function TfrmClinicWardMeds.rpcIsPatientOnWard(Patient: string): boolean;
+begin
+  result := sCallV('ORWDX1 PATWARD',[Patient]) = '1';
+end;
+
+
+end.
Index: cprs/branches/foia-cprs/CPRS-Chart/fCover.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fCover.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fCover.dfm	(revision 460)
@@ -1,5 +1,5 @@
 inherited frmCover: TfrmCover
-  Left = 334
-  Top = 187
+  Left = 256
+  Top = 280
   HelpContext = 1000
   BorderIcons = []
Index: cprs/branches/foia-cprs/CPRS-Chart/fCover.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fCover.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fCover.pas	(revision 460)
@@ -101,8 +101,14 @@
     procedure NotifyOrder(OrderAction: Integer; AnOrder: TOrder); override;       {REV}
     procedure UpdateAllergiesList;
+    procedure UpdateVAAButton;
   end;
 
 var
   frmCover: TfrmCover;
+  VAAFlag: TStringList;
+  MHVFlag: TStringList;
+  VAA_DFN: string;
+  PtIsVAA: boolean;
+  PtIsMHV: boolean;  
 
 const
@@ -114,6 +120,6 @@
 {$R *.DFM}
 
-uses ORNet, ORFn, fRptBox, fVitals, fvit, fFrame, uCore, TRPCB, uConst,
-  uReminders, rReminders, fARTAllgy, uOrPtf, fPatientFlagMulti, rODAllergy;
+uses ORNet, ORFn, fRptBox, fVitals, fvit, fFrame, uCore, TRPCB, uConst, uInit,
+  uReminders, rReminders, fARTAllgy, uOrPtf, fPatientFlagMulti, rODAllergy, rMisc;
 
 const
@@ -436,17 +442,9 @@
              if ItemID <> '' then
                begin
-                 SelectVitals(Font.Size);
-                 StatusText('Searching for recent vitals...');
-                 with frmCover do
-                  for i := ComponentCount - 1 downto 0 do
-                    begin
-                      if Components[i] is TORListBox then
-                        begin
-                          case Components[i].Tag of
-                            70: ListVitals((Components[i] as TORListBox).Items);
-                          end;
-                        end;
-                    end;
-                 StatusText('');
+                 frmFrame.VitalsDLLActive := True;
+                 SelectVitals(Piece(DisplayText[ItemIndex],Char(9),1)); //Char(9) = Tab Character
+                 frmFrame.VitalsDLLActive := False;
+                 ClearPtData;
+                 DisplayPage;
                end;
 
@@ -457,5 +455,8 @@
       //don't try to display a detail report
     end;
-    ItemIndex := -1;
+    if uInit.TimedOut then                       // Fix for CQ: 8011
+      Abort
+    else
+      ItemIndex := -1;
   end;
 end;
@@ -612,14 +613,29 @@
   begin
     lb.Clear;
-    i := -1;
-    repeat
-      i := ActiveReminders.IndexOfPiece('1',U,6,i);
-      if(i >= 0) then
+   //i := -1;
+    //AGP Change 26.8 this changes allowed Reminders to display on the coversheet
+    //even if they had an error on evaluation
+    for i := 0 to ActiveReminders.Count-1 do
       begin
-        tmp := ActiveReminders[i];
-        SetPiece(tmp, U, 3, FormatFMDateTimeStr('mmm dd,yy', Piece(tmp, U, 3)));
-        lb.Items.Add(tmp);
+        if Piece(ActiveReminders.Strings[i],U,6)='1' then
+           begin
+             tmp := ActiveReminders[i];
+             SetPiece(tmp, U, 3, FormatFMDateTimeStr('mmm dd,yy', Piece(tmp, U, 3)));
+             lb.Items.Add(tmp);
+           end;
+        if Piece(ActiveReminders.Strings[i],U,6)='3' then
+           begin
+             tmp := ActiveReminders[i];
+             SetPiece(tmp, U, 3, 'Error');
+             lb.Items.Add(tmp);
+           end;
+        if Piece(ActiveReminders.Strings[i],U,6)='4' then
+           begin
+             tmp := ActiveReminders[i];
+             SetPiece(tmp, U, 3, 'CNBD');
+             lb.Items.Add(tmp);
+           end;
       end;
-    until(i < 0);
+      //AGP End Change for 26.8
     if(RemindersEvaluatingInBackground) then
       lb.Items.Insert(0,'0^Evaluating Reminders...')
@@ -745,11 +761,14 @@
 var
   AListBox: TORListBox;
+  x: string;
 begin
   inherited;
   AListBox := (popMenuAllergies.PopupComponent as TORListBox);
-  popEditAllergy.Enabled := AListBox.ItemIEN > 0;
-  popEnteredInError.Enabled := AListBox.ItemIEN > 0;
+  popEditAllergy.Enabled := (AListBox.ItemIEN > 0) and IsARTClinicalUser(x);
+  popEnteredInError.Enabled := (AListBox.ItemIEN > 0) and IsARTClinicalUser(x);
   popNKA.Enabled := (AListBox.Items.Count = 1) and
                     (Piece(AListBox.Items[0], U, 2) = NO_ASSESSMENT);
+                    //and  IsARTClinicalUser(x);           v26.12
+  popNewAllergy.Enabled := True;  //IsARTClinicalUser(x);  v26.12
 end;
 
@@ -867,4 +886,115 @@
 end;
 
+procedure TfrmCover.UpdateVAAButton;
+const
+  MHVLabelOrigTop = 3;
+  PtInsLabelOrigTop = 27;
+//var
+//  PtIsVAA: boolean;
+//  PtIsMHV: boolean;
+
+begin
+//VAA & MHV
+  PtIsVAA := false;
+  PtIsMHV := false;
+
+  VAAFlag := TStringList.Create;
+  MHVFlag := TStringList.Create;
+  VAA_DFN := Patient.DFN;
+  tCallV(VAAFlag, 'ORVAA VAA', [VAA_DFN]);
+  tCallV(MHVFlag, 'ORWMHV MHV', [VAA_DFN]);
+
+  if VAAFlag[0] <> '0' then
+     begin
+     PtIsVAA := true;
+
+     with frmFrame do
+        begin
+        laVAA2.Caption := Piece(VAAFlag[0], '^', 0);
+        laVAA2.Hint := Piece(VAAFlag[0], '^', 2); //CQ7626 was piece '6'
+        end;
+     end
+  else
+     begin
+     with frmFrame do
+        begin
+        laVAA2.Caption := #0;
+        laVAA2.Hint := 'No active insurance'; //CQ7626 added this line
+        end;
+     end;
+
+  //MHV flag
+  if MHVFlag[0] <> '0' then
+     begin
+     PtIsMHV := true;
+
+      with frmFrame do
+        begin
+         laMHV.Caption := Piece(MHVFlag[0], '^', 1);
+         laMHV.Hint := Piece(MHVFlag[0], '^', 2);
+
+         if VAAFlag[0] = '0' then
+           laMHV.Caption := 'MHV';
+        end;
+     end
+  else
+     begin
+     with frmFrame do
+        begin
+        laMHV.Caption := #0;
+        laMHV.Hint := 'No MyHealthyVet data'; //CQ7626 added this line
+        end;
+     end;
+
+  with frmFrame do
+     begin
+     //Modified this 'with' section for CQ7783
+     paVAA.Hide; //Start by hiding it.  Show it only if one of the conditions below is true, else it stays invisible.
+     paVAA.Height := pnlPrimaryCare.Height;
+
+     if ((PtIsVAA and PtIsMHV)) then  //CQ7411 - this line
+        begin
+        laMHV.Top := paVAA.Top;
+        laMHV.Width := paVAA.Width - 1;
+        laMHV.Height := (paVAA.ClientHeight div 2) - 1;
+        laMHV.Visible := true;
+
+        laVAA2.Top := laMHV.Top + laMHV.Height + 1;
+        laVAA2.Width := paVAA.Width - 1;
+        laVAA2.Height := (paVAA.ClientHeight div 2);
+        laVAA2.Visible := true;
+
+        paVAA.Show;
+        end
+     else
+        if ((PtIsMHV and (not PtIsVAA))) then
+           begin
+           laMHV.Top := paVAA.Top;
+           paVAA.Height := pnlPrimaryCare.Height;
+           laMHV.Height := paVAA.ClientHeight - 1;
+           laMHV.Visible := true;
+           laVAA2.Visible  := false;
+           paVAA.Show;
+           end
+     else
+        if ((PtIsVAA and (not PtIsMHV))) then
+           begin
+           laVAA2.Top := paVAA.Top;
+           paVAA.Height := pnlPrimaryCare.Height-2;
+           laVAA2.Height := paVAA.ClientHeight - 1;
+           laVAA2.Visible := true;
+           laMHV.Visible := false;
+
+           paVAA.Show;
+           end;
+  end; //with
+//end VAA & MHV
+end;
+
+initialization
+
+finalization
+  if Assigned(fCover.VAAFlag) then fCover.VAAFlag.Free; //VAA
+
 end.
 
Index: cprs/branches/foia-cprs/CPRS-Chart/fDCSumm.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fDCSumm.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fDCSumm.dfm	(revision 460)
@@ -1,5 +1,5 @@
 inherited frmDCSumm: TfrmDCSumm
-  Left = 180
-  Top = 193
+  Left = 488
+  Top = 83
   Width = 687
   Height = 409
@@ -481,4 +481,54 @@
         end
       end
+      object mnuViewInformation: TMenuItem
+        Caption = 'Information'
+        OnClick = mnuViewInformationClick
+        object mnuViewDemo: TMenuItem
+          Tag = 1
+          Caption = 'De&mographics...'
+          OnClick = ViewInfo
+        end
+        object mnuViewVisits: TMenuItem
+          Tag = 2
+          Caption = 'Visits/Pr&ovider...'
+          OnClick = ViewInfo
+        end
+        object mnuViewPrimaryCare: TMenuItem
+          Tag = 3
+          Caption = 'Primary &Care...'
+          OnClick = ViewInfo
+        end
+        object mnuViewMyHealtheVet: TMenuItem
+          Tag = 4
+          Caption = 'MyHealthe&Vet...'
+          OnClick = ViewInfo
+        end
+        object mnuInsurance: TMenuItem
+          Tag = 5
+          Caption = '&Insurance...'
+          OnClick = ViewInfo
+        end
+        object mnuViewFlags: TMenuItem
+          Tag = 6
+          Caption = '&Flags...'
+          OnClick = ViewInfo
+        end
+        object mnuViewRemoteData: TMenuItem
+          Tag = 7
+          Caption = 'Remote &Data...'
+          OnClick = ViewInfo
+        end
+        object mnuViewReminders: TMenuItem
+          Tag = 8
+          Caption = '&Reminders...'
+          Enabled = False
+          OnClick = ViewInfo
+        end
+        object mnuViewPostings: TMenuItem
+          Tag = 9
+          Caption = '&Postings...'
+          OnClick = ViewInfo
+        end
+      end
       object Z3: TMenuItem
         Caption = '-'
Index: cprs/branches/foia-cprs/CPRS-Chart/fDCSumm.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fDCSumm.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fDCSumm.pas	(revision 460)
@@ -134,4 +134,14 @@
     popSummMemoInsTemplate: TMenuItem;
     popSummMemoEncounter: TMenuItem;
+    mnuViewInformation: TMenuItem;
+    mnuViewDemo: TMenuItem;
+    mnuViewVisits: TMenuItem;
+    mnuViewPrimaryCare: TMenuItem;
+    mnuViewMyHealtheVet: TMenuItem;
+    mnuInsurance: TMenuItem;
+    mnuViewFlags: TMenuItem;
+    mnuViewReminders: TMenuItem;
+    mnuViewRemoteData: TMenuItem;
+    mnuViewPostings: TMenuItem;
     procedure mnuChartTabClick(Sender: TObject);
     procedure lstSummsClick(Sender: TObject);
@@ -211,4 +221,6 @@
     procedure tvSummsAddition(Sender: TObject; Node: TTreeNode);
     procedure tvSummsDeletion(Sender: TObject; Node: TTreeNode);
+    procedure ViewInfo(Sender: TObject);
+    procedure mnuViewInformationClick(Sender: TObject);
   private
     FEditingIndex: Integer;                      // index of Summary being currently edited
@@ -230,5 +242,5 @@
     procedure ClearEditControls;
     function StartNewEdit(NewNoteType: integer): Boolean;
-    procedure DoAutoSave;
+    procedure DoAutoSave(Suppress: integer = 1);
     function LacksRequiredForCreate: Boolean;
     function GetTitleText(AnIndex: Integer): string;
@@ -1726,11 +1738,14 @@
 procedure TfrmDCSumm.SaveSignItem(const ItemID, ESCode: string);
 { saves and optionally signs a Discharge Summary or addendum }
+const
+  SIG_COSIGN = 'COSIGNATURE';
+  SIG_SIGN   = 'SIGNATURE';
 var
   AnIndex, IEN, i: Integer;
   Saved, ContinueSign: Boolean;   {*RAB* 8/26/99}
-  SignSts: TActionRec;
+  ActionSts, SignSts: TActionRec;
   APCEObject: TPCEData;
   OK: boolean;
-
+  ActionType, SignTitle: string;
 begin
   AnIndex := -1;
@@ -1757,5 +1772,20 @@
   if Length(ESCode) > 0 then
   begin
-    if not NoteHasText(IEN) then
+    if CosignDocument(IEN) then
+    begin
+      SignTitle := TX_COSIGN;
+      ActionType := SIG_COSIGN;
+    end else
+    begin
+      SignTitle := TX_SIGN;
+      ActionType := SIG_SIGN;
+    end;
+    ActOnDocument(ActionSts, IEN, ActionType);
+    if not ActionSts.Success then
+      begin
+        InfoBox(ActionSts.Reason, TX_IN_AUTH, MB_OK);
+        ContinueSign := False;
+      end
+    else if not NoteHasText(IEN) then
       begin
         InfoBox(TX_EMPTY_SUMM1, TC_EMPTY_SUMM, MB_OK or MB_ICONERROR);
@@ -1910,9 +1940,11 @@
 begin
   inherited;
-  DoAutoSave;
+  DoAutoSave(0);
   timAutoSave.Enabled := False;
   try
     SpellCheckForControl(memNewSumm);
   finally
+    FChanged := True;
+    DoAutoSave(0);
     timAutoSave.Enabled := True;
   end;
@@ -1922,9 +1954,11 @@
 begin
   inherited;
-  DoAutoSave;
+  DoAutoSave(0);
   timAutoSave.Enabled := False;
   try
     GrammarCheckForControl(memNewSumm);
   finally
+    FChanged := True;
+    DoAutoSave(0);
     timAutoSave.Enabled := True;
   end;
@@ -2013,4 +2047,5 @@
   SigAction: integer;
   SavedDocID: string;
+  ARefDate: TFMDateTime;
 begin
   inherited;
@@ -2052,5 +2087,8 @@
 
   Exclusions := GetCurrentSigners(lstSumms.ItemIEN);
-  SelectAdditionalSigners(Font.Size, lstSumms.ItemIEN, SigAction, Exclusions, SignerList, CT_DCSUMM);
+  ARefDate := ExtractFloat(Piece(Piece(lstSumms.Items[lstSumms.ItemIndex], U, 9), ';', 2));
+  if ARefDate = 0 then        //no discharge date, so use note date
+    ARefDate := StrToFloat(Piece(lstSumms.Items[lstSumms.ItemIndex], U, 3));
+  SelectAdditionalSigners(Font.Size, lstSumms.ItemIEN, SigAction, Exclusions, SignerList, CT_DCSUMM, ARefDate);
   with SignerList do
     begin
@@ -2308,4 +2346,5 @@
 var
   CurTitle: Integer;
+  ADateTime:  TFMDateTime;
 begin
   Result := False;
@@ -2321,5 +2360,9 @@
     begin
       if Title > 0 then CurTitle := Title else CurTitle := DocType;
-      if AskCosignerForTitle(CurTitle, Dictator) and (Cosigner <= 0) then Result := True;
+      if DischargeDateTime > 0 then
+        ADateTime := DischargeDateTime
+      else
+        ADateTime := DictDateTime;
+      if AskCosignerForTitle(CurTitle, Dictator, ADateTime) and (Cosigner <= 0) then Result := True;
     end;
   end;
@@ -2357,5 +2400,5 @@
 end;
 
-procedure TfrmDCSumm.DoAutoSave;
+procedure TfrmDCSumm.DoAutoSave(Suppress: integer = 1);
 var
   ErrMsg: string;
@@ -2367,5 +2410,5 @@
     timAutoSave.Enabled := False;
     try
-      SetText(ErrMsg, memNewSumm.Lines, lstSumms.GetIEN(EditingIndex),1);
+      SetText(ErrMsg, memNewSumm.Lines, lstSumms.GetIEN(EditingIndex), Suppress);
     finally
       timAutoSave.Enabled := True;
@@ -3216,4 +3259,24 @@
 end;
 
+procedure TfrmDCSumm.ViewInfo(Sender: TObject);
+begin
+  inherited;
+  frmFrame.ViewInfo(Sender);
+end;
+
+procedure TfrmDCSumm.mnuViewInformationClick(Sender: TObject);
+begin
+  inherited;
+  mnuViewDemo.Enabled := frmFrame.pnlPatient.Enabled;
+  mnuViewVisits.Enabled := frmFrame.pnlVisit.Enabled;
+  mnuViewPrimaryCare.Enabled := frmFrame.pnlPrimaryCare.Enabled;
+  mnuViewMyHealtheVet.Enabled := not (Copy(frmFrame.laMHV.Hint, 1, 2) = 'No');
+  mnuInsurance.Enabled := not (Copy(frmFrame.laVAA2.Hint, 1, 2) = 'No');
+  mnuViewFlags.Enabled := frmFrame.lblFlag.Enabled;
+  mnuViewRemoteData.Enabled := frmFrame.lblCirn.Enabled;
+  mnuViewReminders.Enabled := frmFrame.pnlReminders.Enabled;
+  mnuViewPostings.Enabled := frmFrame.pnlPostings.Enabled;
+end;
+
 initialization
   uPCEEdit := TPCEData.Create;
Index: cprs/branches/foia-cprs/CPRS-Chart/fDCSummProps.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fDCSummProps.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fDCSummProps.dfm	(revision 460)
@@ -15,4 +15,5 @@
   OldCreateOrder = False
   Position = poScreenCenter
+  OnClose = FormClose
   OnShow = FormShow
   PixelsPerInch = 96
@@ -94,4 +95,5 @@
       OnMouseClick = cboNewTitleMouseClick
       OnNeedData = cboNewTitleNeedData
+      CharsNeedMatch = 1
     end
     object calSumm: TORDateBox
@@ -132,4 +134,5 @@
       OnMouseClick = cboAuthorMouseClick
       OnNeedData = cboAuthorNeedData
+      CharsNeedMatch = 1
     end
     object cboAttending: TORComboBox
@@ -158,4 +161,5 @@
       OnExit = cboAttendingExit
       OnNeedData = cboAttendingNeedData
+      CharsNeedMatch = 1
     end
     object cmdOK: TButton
@@ -229,4 +233,5 @@
       TabOrder = 0
       OnNeedData = cboAuthorNeedData
+      CharsNeedMatch = 1
     end
     object cboUrgency: TORComboBox
@@ -251,4 +256,5 @@
       SynonymChars = '<>'
       TabOrder = 1
+      CharsNeedMatch = 1
     end
   end
Index: cprs/branches/foia-cprs/CPRS-Chart/fDCSummProps.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fDCSummProps.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fDCSummProps.pas	(revision 460)
@@ -54,4 +54,5 @@
     procedure lstAdmissionsChange(Sender: TObject);
     procedure cboNewTitleDblClick(Sender: TObject);
+    procedure FormClose(Sender: TObject; var Action: TCloseAction);
   private
     FCosignIEN: Int64;      // store cosigner that was passed in
@@ -87,5 +88,5 @@
 {$R *.DFM}
 
-uses ORFn, uCore, rCore, uPCE, rPCE;
+uses ORFn, uCore, rCore, uPCE, rPCE, rMisc;
 { Initial values in ASumm
 
@@ -231,4 +232,5 @@
 procedure TfrmDCSummProperties.FormShow(Sender: TObject);
 begin
+  SetFormPosition(Self);
   //if cboNewTitle.Text = '' then PostMessage(Handle, UM_DELAYEVENT, 0, 0);
 end;
@@ -512,3 +514,9 @@
 end;
 
+procedure TfrmDCSummProperties.FormClose(Sender: TObject;
+  var Action: TCloseAction);
+begin
+  SaveUserBounds(Self);
+end;
+
 end.
Index: cprs/branches/foia-cprs/CPRS-Chart/fDeviceSelect.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fDeviceSelect.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fDeviceSelect.dfm	(revision 460)
@@ -1,8 +1,9 @@
 object frmDeviceSelect: TfrmDeviceSelect
-  Left = 389
-  Top = 375
-  Width = 445
-  Height = 276
+  Left = 378
+  Top = 340
+  AutoScroll = False
   Caption = 'Orders Print Device Selection'
+  ClientHeight = 235
+  ClientWidth = 415
   Color = clBtnFace
   Font.Charset = DEFAULT_CHARSET
@@ -13,4 +14,6 @@
   OldCreateOrder = True
   Position = poScreenCenter
+  OnClose = FormClose
+  OnShow = FormShow
   PixelsPerInch = 96
   TextHeight = 13
@@ -22,50 +25,18 @@
   end
   object grpDevice: TGroupBox
-    Left = 10
-    Top = 8
-    Width = 411
-    Height = 192
+    Left = 0
+    Top = 0
+    Width = 415
+    Height = 194
+    Align = alClient
     Caption = 'Device'
     TabOrder = 0
-    object lblMargin: TLabel
-      Left = 8
-      Top = 166
-      Width = 60
-      Height = 13
-      Caption = 'Right Margin'
-    end
-    object lblLength: TLabel
-      Left = 120
-      Top = 166
-      Width = 61
-      Height = 13
-      Caption = 'Page Length'
-    end
-    object txtRightMargin: TMaskEdit
-      Left = 72
-      Top = 164
-      Width = 34
-      Height = 19
-      AutoSize = False
-      EditMask = '99999;0; '
-      MaxLength = 5
-      TabOrder = 1
-    end
-    object txtPageLength: TMaskEdit
-      Left = 184
-      Top = 164
-      Width = 34
-      Height = 19
-      AutoSize = False
-      EditMask = '99999;0; '
-      MaxLength = 5
-      TabOrder = 2
-    end
     object cboDevice: TORComboBox
-      Left = 7
+      Left = 2
       Top = 15
-      Width = 395
-      Height = 140
+      Width = 411
+      Height = 145
       Style = orcsSimple
+      Align = alClient
       AutoSelect = True
       Caption = 'Device'
@@ -77,4 +48,5 @@
       ListItemsOnly = False
       LongList = True
+      LookupPiece = 0
       MaxLength = 0
       ParentShowHint = False
@@ -88,32 +60,84 @@
       OnNeedData = cboDeviceNeedData
     end
+    object pnlGBBottom: TPanel
+      Left = 2
+      Top = 160
+      Width = 411
+      Height = 32
+      Align = alBottom
+      BevelOuter = bvNone
+      TabOrder = 1
+      object lblMargin: TLabel
+        Left = 8
+        Top = 12
+        Width = 60
+        Height = 13
+        Caption = 'Right Margin'
+      end
+      object lblLength: TLabel
+        Left = 120
+        Top = 12
+        Width = 61
+        Height = 13
+        Caption = 'Page Length'
+      end
+      object txtRightMargin: TMaskEdit
+        Left = 72
+        Top = 6
+        Width = 33
+        Height = 19
+        AutoSize = False
+        EditMask = '99999;0; '
+        MaxLength = 5
+        TabOrder = 0
+      end
+      object txtPageLength: TMaskEdit
+        Left = 184
+        Top = 6
+        Width = 34
+        Height = 19
+        AutoSize = False
+        EditMask = '99999;0; '
+        MaxLength = 5
+        TabOrder = 1
+      end
+    end
   end
-  object cmdOK: TButton
-    Left = 269
-    Top = 211
-    Width = 72
-    Height = 22
-    Caption = 'OK'
-    Default = True
-    TabOrder = 2
-    OnClick = cmdOKClick
-  end
-  object cmdCancel: TButton
-    Left = 349
-    Top = 211
-    Width = 72
-    Height = 22
-    Cancel = True
-    Caption = 'Cancel'
-    TabOrder = 3
-    OnClick = cmdCancelClick
-  end
-  object chkDefault: TCheckBox
-    Left = 12
-    Top = 218
-    Width = 163
-    Height = 17
-    Caption = 'Save as user'#39's default printer'
+  object pnlBottom: TPanel
+    Left = 0
+    Top = 194
+    Width = 415
+    Height = 41
+    Align = alBottom
+    BevelOuter = bvNone
     TabOrder = 1
+    object cmdOK: TButton
+      Left = 257
+      Top = 11
+      Width = 72
+      Height = 22
+      Caption = 'OK'
+      Default = True
+      TabOrder = 0
+      OnClick = cmdOKClick
+    end
+    object cmdCancel: TButton
+      Left = 337
+      Top = 11
+      Width = 72
+      Height = 22
+      Cancel = True
+      Caption = 'Cancel'
+      TabOrder = 1
+      OnClick = cmdCancelClick
+    end
+    object chkDefault: TCheckBox
+      Left = 12
+      Top = 16
+      Width = 163
+      Height = 17
+      Caption = 'Save as user'#39's default printer'
+      TabOrder = 2
+    end
   end
 end
Index: cprs/branches/foia-cprs/CPRS-Chart/fDeviceSelect.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fDeviceSelect.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fDeviceSelect.pas	(revision 460)
@@ -5,17 +5,19 @@
 uses
   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
-  StdCtrls, fAutoSz, ORCtrls, ORNet, Mask;
+  StdCtrls, fAutoSz, ORCtrls, ORNet, Mask, ExtCtrls;
 
 type
   TfrmDeviceSelect = class(TfrmAutoSz)
     grpDevice: TGroupBox;
-    lblMargin: TLabel;
-    lblLength: TLabel;
-    txtRightMargin: TMaskEdit;
-    txtPageLength: TMaskEdit;
     cboDevice: TORComboBox;
+    pnlBottom: TPanel;
     cmdOK: TButton;
     cmdCancel: TButton;
     chkDefault: TCheckBox;
+    pnlGBBottom: TPanel;
+    lblMargin: TLabel;
+    txtRightMargin: TMaskEdit;
+    lblLength: TLabel;
+    txtPageLength: TMaskEdit;
     procedure cboDeviceChange(Sender: TObject);
     procedure cmdOKClick(Sender: TObject);
@@ -23,4 +25,6 @@
     procedure cboDeviceNeedData(Sender: TObject; const StartFrom: String;
       Direction, InsertAt: Integer);
+    procedure FormShow(Sender: TObject);
+    procedure FormClose(Sender: TObject; var Action: TCloseAction);
   private
     FWinPrint: Boolean;
@@ -37,5 +41,5 @@
 {$R *.DFM}
 
-uses ORFn, rCore, uCore, rReports, Printers, fFrame;
+uses ORFn, rCore, uCore, rReports, Printers, fFrame, rMisc;
 
 const
@@ -143,3 +147,16 @@
 end;
 
+procedure TfrmDeviceSelect.FormShow(Sender: TObject);
+begin
+  SetFormPosition(Self);
+  inherited;
+end;
+
+procedure TfrmDeviceSelect.FormClose(Sender: TObject;
+  var Action: TCloseAction);
+begin
+  inherited;
+  SaveUserBounds(Self);
+end;
+
 end.
Index: cprs/branches/foia-cprs/CPRS-Chart/fEncnt.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fEncnt.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fEncnt.dfm	(revision 460)
@@ -1,11 +1,12 @@
 object frmEncounter: TfrmEncounter
-  Left = 302
-  Top = 180
+  Left = 481
+  Top = 242
+  Width = 470
+  Height = 450
+  Anchors = [akTop]
   BorderIcons = [biSystemMenu]
-  BorderStyle = bsDialog
   Caption = 'Provider & Location for Current Activities'
-  ClientHeight = 367
-  ClientWidth = 384
   Color = clBtnFace
+  Constraints.MinWidth = 470
   Font.Charset = DEFAULT_CHARSET
   Font.Color = clWindowText
@@ -15,10 +16,13 @@
   OldCreateOrder = True
   Position = poScreenCenter
+  Scaled = False
   OnClose = FormClose
   OnCreate = FormCreate
   OnDestroy = FormDestroy
+  OnResize = FormResize
+  OnShow = FormShow
   DesignSize = (
-    384
-    367)
+    462
+    423)
   PixelsPerInch = 96
   TextHeight = 13
@@ -38,9 +42,10 @@
     Tag = 9
     Left = 6
-    Top = 149
+    Top = 140
     Width = 93
     Height = 13
     Anchors = [akLeft, akBottom]
     Caption = 'Encounter Location'
+    Constraints.MinHeight = 12
   end
   object lblProvider: TLabel
@@ -51,198 +56,10 @@
     Caption = 'Encounter Provider'
   end
-  object cmdOK: TButton
-    Left = 306
+  object cboPtProvider: TORComboBox
+    Left = 6
     Top = 20
-    Width = 72
-    Height = 21
-    Caption = 'OK'
-    Default = True
-    TabOrder = 4
-    OnClick = cmdOKClick
-  end
-  object cmdCancel: TButton
-    Left = 306
-    Top = 49
-    Width = 72
-    Height = 21
-    Cancel = True
-    Caption = 'Cancel'
-    TabOrder = 5
-    OnClick = cmdCancelClick
-  end
-  object txtLocation: TCaptionEdit
-    Tag = 9
-    Left = 6
-    Top = 163
-    Width = 212
-    Height = 21
-    Anchors = [akLeft, akBottom]
-    Color = clBtnFace
-    ReadOnly = True
-    TabOrder = 1
-    Text = '< Select a location from the tabs below.... >'
-    Caption = 'Encounter Location'
-  end
-  object pgeVisit: TPageControl
-    Tag = 9
-    Left = 6
-    Top = 194
-    Width = 372
-    Height = 167
-    ActivePage = tabClinic
-    Anchors = [akLeft, akBottom]
-    TabIndex = 0
-    TabOrder = 2
-    OnChange = pgeVisitChange
-    object tabClinic: TTabSheet
-      Caption = 'Clinic Appointments'
-      object lblClinic: TLabel
-        Left = 4
-        Top = 4
-        Width = 127
-        Height = 13
-        Caption = 'Clinic Appointments / Visits'
-      end
-      object lblDateRange: TLabel
-        Left = 138
-        Top = 4
-        Width = 71
-        Height = 13
-        Caption = '(T-30 thru T+1)'
-      end
-      object lstClinic: TORListBox
-        Left = 4
-        Top = 18
-        Width = 352
-        Height = 117
-        ItemHeight = 13
-        ParentShowHint = False
-        ShowHint = True
-        TabOrder = 0
-        OnDblClick = cmdOKClick
-        Caption = 'Clinic Appointments / Visits (T-30 thru T+1)'
-        ItemTipColor = clWindow
-        LongList = False
-        Pieces = '3,2,4'
-        TabPositions = '20'
-        OnChange = lstClinicChange
-      end
-    end
-    object tabAdmit: TTabSheet
-      Caption = 'Hospital Admissions'
-      object lblAdmit: TLabel
-        Left = 4
-        Top = 4
-        Width = 93
-        Height = 13
-        Caption = 'Hospital Admissions'
-      end
-      object lstAdmit: TORListBox
-        Left = 4
-        Top = 18
-        Width = 352
-        Height = 117
-        ItemHeight = 13
-        ParentShowHint = False
-        ShowHint = True
-        TabOrder = 0
-        OnDblClick = cmdOKClick
-        Caption = 'Hospital Admissions'
-        ItemTipColor = clWindow
-        LongList = False
-        Pieces = '3,5,4'
-        TabPositions = '20'
-        OnChange = lstAdmitChange
-      end
-    end
-    object tabNewVisit: TTabSheet
-      Caption = 'New Visit'
-      object lblVisitDate: TLabel
-        Left = 220
-        Top = 4
-        Width = 85
-        Height = 13
-        Caption = 'Date/Time of Visit'
-        Visible = False
-      end
-      object lblNewVisit: TLabel
-        Left = 4
-        Top = 4
-        Width = 63
-        Height = 13
-        Caption = 'Visit Location'
-      end
-      object calVisitDate: TORDateBox
-        Left = 220
-        Top = 18
-        Width = 140
-        Height = 21
-        TabOrder = 1
-        Text = 'NOW'
-        OnChange = calVisitDateChange
-        OnExit = calVisitDateExit
-        DateOnly = False
-        RequireTime = True
-      end
-      object ckbHistorical: TORCheckBox
-        Left = 220
-        Top = 50
-        Width = 140
-        Height = 81
-        Caption = 
-          'Historical Visit: a visit that occurred at some time in the past' +
-          ' or at some other location (possibly non-VA) but is not used for' +
-          ' workload credit.'
-        ParentShowHint = False
-        ShowHint = True
-        TabOrder = 2
-        OnClick = ckbHistoricalClick
-        WordWrap = True
-        AutoSize = True
-      end
-      object cboNewVisit: TORComboBox
-        Left = 4
-        Top = 18
-        Width = 208
-        Height = 117
-        Style = orcsSimple
-        AutoSelect = True
-        Caption = 'Visit Location'
-        Color = clWindow
-        DropDownCount = 8
-        ItemHeight = 13
-        ItemTipColor = clWindow
-        ItemTipEnable = True
-        ListItemsOnly = True
-        LongList = True
-        LookupPiece = 0
-        MaxLength = 0
-        Pieces = '2'
-        Sorted = False
-        SynonymChars = '<>'
-        TabOrder = 0
-        OnChange = cboNewVisitChange
-        OnDblClick = cmdOKClick
-        OnNeedData = cboNewVisitNeedData
-        CharsNeedMatch = 1
-      end
-    end
-  end
-  object cmdDateRange: TButton
-    Tag = 9
-    Left = 288
-    Top = 177
-    Width = 90
-    Height = 21
-    Anchors = [akLeft, akBottom]
-    Caption = 'Date Range...'
-    TabOrder = 3
-    OnClick = cmdDateRangeClick
-  end
-  object cboPtProvider: TORComboBox
-    Left = 6
-    Top = 20
-    Width = 292
+    Width = 331
     Height = 117
+    Anchors = [akLeft, akTop, akRight, akBottom]
     Style = orcsSimple
     AutoSelect = True
@@ -265,4 +82,236 @@
     CharsNeedMatch = 1
   end
+  object cmdDateRange: TButton
+    Tag = 9
+    Left = 266
+    Top = 153
+    Width = 84
+    Height = 25
+    Anchors = [akLeft, akBottom]
+    Caption = 'Date Range...'
+    Constraints.MinHeight = 21
+    Constraints.MinWidth = 21
+    TabOrder = 2
+    OnClick = cmdDateRangeClick
+  end
+  object txtLocation: TCaptionEdit
+    Tag = 9
+    Left = 6
+    Top = 154
+    Width = 258
+    Height = 21
+    Anchors = [akLeft, akBottom]
+    AutoSize = False
+    Color = clBtnFace
+    Constraints.MinHeight = 21
+    ReadOnly = True
+    TabOrder = 1
+    Text = '< Select a location from the tabs below.... >'
+    Caption = 'Encounter Location'
+  end
+  object cmdCancel: TButton
+    Left = 341
+    Top = 45
+    Width = 84
+    Height = 23
+    Anchors = [akTop, akRight]
+    Cancel = True
+    Caption = 'Cancel'
+    Constraints.MinHeight = 21
+    Constraints.MinWidth = 21
+    TabOrder = 4
+    OnClick = cmdCancelClick
+  end
+  object cmdOK: TButton
+    Left = 340
+    Top = 20
+    Width = 84
+    Height = 23
+    Anchors = [akTop, akRight]
+    Caption = 'OK'
+    Constraints.MinHeight = 21
+    Constraints.MinWidth = 21
+    Default = True
+    TabOrder = 3
+    OnClick = cmdOKClick
+  end
+  object Panel1: TPanel
+    Left = 0
+    Top = 179
+    Width = 460
+    Height = 243
+    Anchors = [akLeft, akRight, akBottom]
+    TabOrder = 6
+    DesignSize = (
+      460
+      243)
+    object pgeVisit: TPageControl
+      Tag = 9
+      Left = 4
+      Top = 5
+      Width = 452
+      Height = 232
+      ActivePage = tabNewVisit
+      Anchors = [akLeft, akTop, akRight, akBottom]
+      Constraints.MinHeight = 150
+      RaggedRight = True
+      TabIndex = 2
+      TabOrder = 0
+      OnChange = pgeVisitChange
+      object tabClinic: TTabSheet
+        Caption = 'Clinic Appointments'
+        object lstClinic: TORListBox
+          Left = 0
+          Top = 20
+          Width = 444
+          Height = 184
+          Align = alClient
+          Constraints.MinHeight = 21
+          ItemHeight = 13
+          ParentShowHint = False
+          ScrollWidth = 353
+          ShowHint = True
+          TabOrder = 0
+          OnDblClick = cmdOKClick
+          Caption = 'Clinic Appointments / Visits (T-30 thru T+1)'
+          ItemTipColor = clWindow
+          LongList = False
+          Pieces = '3,2,4'
+          TabPositions = '30,50'
+          OnChange = lstClinicChange
+        end
+        object Panel2: TPanel
+          Left = 0
+          Top = 0
+          Width = 444
+          Height = 20
+          Align = alTop
+          TabOrder = 2
+          object lblDateRange: TLabel
+            Left = 138
+            Top = 4
+            Width = 71
+            Height = 13
+            Caption = '(T-30 thru T+1)'
+          end
+          object lblClinic: TLabel
+            Left = 4
+            Top = 4
+            Width = 127
+            Height = 13
+            Caption = 'Clinic Appointments / Visits'
+          end
+        end
+      end
+      object tabAdmit: TTabSheet
+        Caption = 'Hospital Admissions'
+        object lstAdmit: TORListBox
+          Left = 0
+          Top = 17
+          Width = 444
+          Height = 187
+          Align = alClient
+          ItemHeight = 13
+          ParentShowHint = False
+          ShowHint = True
+          TabOrder = 0
+          OnDblClick = cmdOKClick
+          Caption = 'Hospital Admissions'
+          ItemTipColor = clWindow
+          LongList = False
+          Pieces = '3,5,4'
+          TabPositions = '20'
+          OnChange = lstAdmitChange
+        end
+        object Panel3: TPanel
+          Left = 0
+          Top = 0
+          Width = 444
+          Height = 17
+          Align = alTop
+          TabOrder = 2
+          object lblAdmit: TLabel
+            Left = 4
+            Top = 1
+            Width = 93
+            Height = 13
+            Caption = 'Hospital Admissions'
+          end
+        end
+      end
+      object tabNewVisit: TTabSheet
+        Caption = 'New Visit'
+        object lblVisitDate: TLabel
+          Left = 220
+          Top = 4
+          Width = 85
+          Height = 13
+          Caption = 'Date/Time of Visit'
+          Visible = False
+        end
+        object lblNewVisit: TLabel
+          Left = 4
+          Top = 4
+          Width = 63
+          Height = 13
+          Caption = 'Visit Location'
+        end
+        object calVisitDate: TORDateBox
+          Left = 220
+          Top = 18
+          Width = 140
+          Height = 21
+          TabOrder = 1
+          Text = 'NOW'
+          OnChange = calVisitDateChange
+          OnExit = calVisitDateExit
+          DateOnly = False
+          RequireTime = True
+        end
+        object ckbHistorical: TORCheckBox
+          Left = 220
+          Top = 50
+          Width = 140
+          Height = 81
+          Caption = 
+            'Historical Visit: a visit that occurred at some time in the past' +
+            ' or at some other location (possibly non-VA) but is not used for' +
+            ' workload credit.'
+          ParentShowHint = False
+          ShowHint = True
+          TabOrder = 2
+          OnClick = ckbHistoricalClick
+          WordWrap = True
+          AutoSize = True
+        end
+        object cboNewVisit: TORComboBox
+          Left = 4
+          Top = 18
+          Width = 208
+          Height = 117
+          Style = orcsSimple
+          AutoSelect = True
+          Caption = 'Visit Location'
+          Color = clWindow
+          DropDownCount = 8
+          ItemHeight = 13
+          ItemTipColor = clWindow
+          ItemTipEnable = True
+          ListItemsOnly = True
+          LongList = True
+          LookupPiece = 0
+          MaxLength = 0
+          Pieces = '2'
+          Sorted = False
+          SynonymChars = '<>'
+          TabOrder = 0
+          OnChange = cboNewVisitChange
+          OnDblClick = cmdOKClick
+          OnNeedData = cboNewVisitNeedData
+          CharsNeedMatch = 1
+        end
+      end
+    end
+  end
   object dlgDateRange: TORDateRangeDlg
     DateOnly = True
Index: cprs/branches/foia-cprs/CPRS-Chart/fEncnt.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fEncnt.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fEncnt.pas	(revision 460)
@@ -23,11 +23,12 @@
     lblLocation: TLabel;
     txtLocation: TCaptionEdit;
+    dlgDateRange: TORDateRangeDlg;
+    cmdDateRange: TButton;
+    lblInstruct: TLabel;
+    Panel1: TPanel;
     pgeVisit: TPageControl;
     tabClinic: TTabSheet;
-    lblClinic: TLabel;
-    lblDateRange: TLabel;
     lstClinic: TORListBox;
     tabAdmit: TTabSheet;
-    lblAdmit: TLabel;
     lstAdmit: TORListBox;
     tabNewVisit: TTabSheet;
@@ -37,7 +38,9 @@
     ckbHistorical: TORCheckBox;
     cboNewVisit: TORComboBox;
-    dlgDateRange: TORDateRangeDlg;
-    cmdDateRange: TButton;
-    lblInstruct: TLabel;
+    Panel2: TPanel;
+    lblDateRange: TLabel;
+    lblClinic: TLabel;
+    Panel3: TPanel;
+    lblAdmit: TLabel;
     procedure FormCreate(Sender: TObject);
     procedure pgeVisitChange(Sender: TObject);
@@ -57,4 +60,6 @@
     procedure lstAdmitChange(Sender: TObject);
     procedure lstClinicChange(Sender: TObject);
+    procedure FormResize(Sender: TObject);
+    procedure FormShow(Sender: TObject);
   private
     CLINIC_TXT : String;
@@ -241,8 +246,14 @@
   inherited;
   cmdDateRange.Visible := pgeVisit.ActivePage = tabClinic;
-  if (pgeVisit.ActivePage = tabClinic) and (lstClinic.Items.Count = 0)
-    then ListApptAll(lstClinic.Items, Patient.DFN, FFromDate, FThruDate);
-  if (pgeVisit.ActivePage = tabAdmit)    and (lstAdmit.Items.Count = 0)
-    then ListAdmitAll(lstAdmit.Items, Patient.DFN);
+  if (pgeVisit.ActivePage = tabClinic) and (lstClinic.Items.Count = 0) then
+  begin
+    ListApptAll(lstClinic.Items, Patient.DFN, FFromDate, FThruDate);
+    ActiveControl := lstClinic;
+  end;
+  if (pgeVisit.ActivePage = tabAdmit)    and (lstAdmit.Items.Count = 0) then
+  begin
+    ListAdmitAll(lstAdmit.Items, Patient.DFN);
+    ActiveControl := lstAdmit;
+  end;
   if pgeVisit.ActivePage = tabNewVisit then
   begin
@@ -255,4 +266,5 @@
           cboNewVisit.InitLongList(uTIULocationName);
           cboNewVisit.SelectByIEN(uTIULocation);
+          cboNewVisitChange(Self);
         end
         else
@@ -264,7 +276,18 @@
         with calVisitDate do if FDateTime <> 0 then FMDateTime := FDateTime else Text := 'NOW';
         FFromSelf := False;
+        ActiveControl := cboNewVisit;
       end
-      else cboNewVisit.InitLongList('');
-      ckbHistorical.Checked := FVisitCategory = 'E';
+      else if FVisitCategory = 'E' then
+      begin
+        ckbHistorical.Checked := True;
+        ActiveControl := cboNewVisit;
+      end
+      else
+      begin
+        cboNewVisit.InitLongList('');
+        //ActiveControl := cboPtProvider;
+      end;
+      //ckbHistorical.Checked := FVisitCategory = 'E';
+      //ActiveControl := cboNewVisit;
     end; {if cboNewVisit}
   end; {if pgeVisit.ActivePage}
@@ -473,3 +496,45 @@
 end;
 
+procedure TfrmEncounter.FormResize(Sender: TObject);
+begin
+  //CQ7118
+  if cboPtProvider.Visible then
+     begin
+     cmdOK.Left := cboPtProvider.Left + cboPtProvider.Width + 1;
+     cmdCancel.Left := cboPtProvider.Left + cboPtProvider.Width + 1;
+     end
+  else
+     begin
+     cmdOK.Left := cmdDateRange.Left;
+     cmdCancel.Left := cmdDateRange.Left;
+     end;
+
+  cmdCancel.Top := cmdDateRange.Top - cmdCancel.Height - 10;
+  cmdOK.Top := cmdCancel.Top - cmdOK.Height - 1;
+
+  cmdCancel.Top := cmdOK.Top + cmdOK.Height + 1;
+  cmdCancel.Width := cmdOK.Width;
+  //end CQ7118
+end;
+
+procedure TfrmEncounter.FormShow(Sender: TObject);
+begin
+  //CQ7118
+  if cboPtProvider.Visible then
+     begin
+     cmdOK.Left := cboPtProvider.Left + cboPtProvider.Width + 1;
+     cmdCancel.Left := cboPtProvider.Left + cboPtProvider.Width + 1;
+     end
+  else
+     begin
+     cmdOK.Left := cmdDateRange.Left;
+     cmdCancel.Left := cmdDateRange.Left;
+     end;
+
+  cmdCancel.Top := cmdDateRange.Top - cmdCancel.Height - 10;
+  cmdOK.Top := cmdCancel.Top - cmdOK.Height - 1;
+  cmdCancel.Top := cmdOK.Top + cmdOK.Height + 1;
+  //end CQ7118
+end;
+
 end.
Index: cprs/branches/foia-cprs/CPRS-Chart/fEncntKEEP.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fEncntKEEP.dfm	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/fEncntKEEP.dfm	(revision 460)
@@ -0,0 +1,277 @@
+object frmEncounter: TfrmEncounter
+  Left = 435
+  Top = 175
+  Width = 351
+  Height = 350
+  BorderIcons = [biSystemMenu]
+  Caption = 'Provider & Location for Current Activities'
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  OldCreateOrder = True
+  Position = poScreenCenter
+  OnClose = FormClose
+  OnCreate = FormCreate
+  OnDestroy = FormDestroy
+  DesignSize = (
+    343
+    323)
+  PixelsPerInch = 96
+  TextHeight = 13
+  object lblInstruct: TLabel
+    Left = 6
+    Top = 6
+    Width = 253
+    Height = 31
+    AutoSize = False
+    Caption = 
+      'Select the appointment or visit that should be associated with t' +
+      'he note or orders .'
+    Visible = False
+    WordWrap = True
+  end
+  object lblLocation: TLabel
+    Tag = 9
+    Left = 6
+    Top = 133
+    Width = 93
+    Height = 13
+    Caption = 'Encounter Location'
+  end
+  object lblProvider: TLabel
+    Left = 6
+    Top = 6
+    Width = 91
+    Height = 13
+    Caption = 'Encounter Provider'
+  end
+  object cmdOK: TButton
+    Left = 250
+    Top = 20
+    Width = 72
+    Height = 21
+    Caption = 'OK'
+    Default = True
+    TabOrder = 4
+    OnClick = cmdOKClick
+  end
+  object cmdCancel: TButton
+    Left = 250
+    Top = 49
+    Width = 72
+    Height = 21
+    Cancel = True
+    Caption = 'Cancel'
+    TabOrder = 5
+    OnClick = cmdCancelClick
+  end
+  object txtLocation: TCaptionEdit
+    Tag = 9
+    Left = 6
+    Top = 147
+    Width = 212
+    Height = 21
+    Color = clBtnFace
+    ReadOnly = True
+    TabOrder = 1
+    Text = '< Select a location from the tabs below.... >'
+    Caption = 'Encounter Location'
+  end
+  object pgeVisit: TPageControl
+    Tag = 9
+    Left = 6
+    Top = 171
+    Width = 331
+    Height = 147
+    ActivePage = tabClinic
+    Anchors = [akLeft, akTop, akBottom]
+    TabIndex = 0
+    TabOrder = 2
+    OnChange = pgeVisitChange
+    object tabClinic: TTabSheet
+      Caption = 'Clinic Appointments'
+      DesignSize = (
+        323
+        119)
+      object lblClinic: TLabel
+        Left = 4
+        Top = 4
+        Width = 127
+        Height = 13
+        Caption = 'Clinic Appointments / Visits'
+      end
+      object lblDateRange: TLabel
+        Left = 138
+        Top = 4
+        Width = 71
+        Height = 13
+        Caption = '(T-30 thru T+1)'
+      end
+      object lstClinic: TORListBox
+        Left = 0
+        Top = 18
+        Width = 321
+        Height = 97
+        Anchors = [akLeft, akTop, akBottom]
+        ItemHeight = 13
+        ParentShowHint = False
+        ShowHint = True
+        TabOrder = 0
+        OnDblClick = cmdOKClick
+        Caption = 'Clinic Appointments / Visits (T-30 thru T+1)'
+        ItemTipColor = clWindow
+        LongList = False
+        Pieces = '3,2,4'
+        TabPositions = '20'
+        OnChange = lstClinicChange
+      end
+    end
+    object tabAdmit: TTabSheet
+      Caption = 'Hospital Admissions'
+      object lblAdmit: TLabel
+        Left = 4
+        Top = 4
+        Width = 93
+        Height = 13
+        Caption = 'Hospital Admissions'
+      end
+      object lstAdmit: TORListBox
+        Left = 4
+        Top = 18
+        Width = 352
+        Height = 117
+        ItemHeight = 13
+        ParentShowHint = False
+        ShowHint = True
+        TabOrder = 0
+        OnDblClick = cmdOKClick
+        Caption = 'Hospital Admissions'
+        ItemTipColor = clWindow
+        LongList = False
+        Pieces = '3,5,4'
+        TabPositions = '20'
+        OnChange = lstAdmitChange
+      end
+    end
+    object tabNewVisit: TTabSheet
+      Caption = 'New Visit'
+      object lblVisitDate: TLabel
+        Left = 220
+        Top = 4
+        Width = 85
+        Height = 13
+        Caption = 'Date/Time of Visit'
+        Visible = False
+      end
+      object lblNewVisit: TLabel
+        Left = 4
+        Top = 4
+        Width = 63
+        Height = 13
+        Caption = 'Visit Location'
+      end
+      object calVisitDate: TORDateBox
+        Left = 220
+        Top = 18
+        Width = 140
+        Height = 21
+        TabOrder = 1
+        Text = 'NOW'
+        OnChange = calVisitDateChange
+        OnExit = calVisitDateExit
+        DateOnly = False
+        RequireTime = True
+      end
+      object ckbHistorical: TORCheckBox
+        Left = 220
+        Top = 50
+        Width = 140
+        Height = 81
+        Caption = 
+          'Historical Visit: a visit that occurred at some time in the past' +
+          ' or at some other location (possibly non-VA) but is not used for' +
+          ' workload credit.'
+        ParentShowHint = False
+        ShowHint = True
+        TabOrder = 2
+        OnClick = ckbHistoricalClick
+        WordWrap = True
+        AutoSize = True
+      end
+      object cboNewVisit: TORComboBox
+        Left = 4
+        Top = 18
+        Width = 208
+        Height = 117
+        Style = orcsSimple
+        AutoSelect = True
+        Caption = 'Visit Location'
+        Color = clWindow
+        DropDownCount = 8
+        ItemHeight = 13
+        ItemTipColor = clWindow
+        ItemTipEnable = True
+        ListItemsOnly = True
+        LongList = True
+        LookupPiece = 0
+        MaxLength = 0
+        Pieces = '2'
+        Sorted = False
+        SynonymChars = '<>'
+        TabOrder = 0
+        OnChange = cboNewVisitChange
+        OnDblClick = cmdOKClick
+        OnNeedData = cboNewVisitNeedData
+        CharsNeedMatch = 1
+      end
+    end
+  end
+  object cmdDateRange: TButton
+    Tag = 9
+    Left = 224
+    Top = 145
+    Width = 90
+    Height = 21
+    Caption = 'Date Range...'
+    TabOrder = 3
+    OnClick = cmdDateRangeClick
+  end
+  object cboPtProvider: TORComboBox
+    Left = 6
+    Top = 20
+    Width = 235
+    Height = 93
+    Style = orcsSimple
+    AutoSelect = True
+    Caption = 'Encounter Provider'
+    Color = clWindow
+    DropDownCount = 8
+    ItemHeight = 13
+    ItemTipColor = clWindow
+    ItemTipEnable = True
+    ListItemsOnly = True
+    LongList = True
+    LookupPiece = 2
+    MaxLength = 0
+    Pieces = '2,3'
+    Sorted = False
+    SynonymChars = '<>'
+    TabOrder = 0
+    OnDblClick = cmdOKClick
+    OnNeedData = cboPtProviderNeedData
+    CharsNeedMatch = 1
+  end
+  object dlgDateRange: TORDateRangeDlg
+    DateOnly = True
+    Instruction = 'Show appointments / visits in the date range:'
+    LabelStart = 'From'
+    LabelStop = 'Through'
+    RequireTime = False
+    Format = 'mmm d,yyyy'
+    Left = 264
+    Top = 4
+  end
+end
Index: cprs/branches/foia-cprs/CPRS-Chart/fEncntKEEP.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fEncntKEEP.pas	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/fEncntKEEP.pas	(revision 460)
@@ -0,0 +1,475 @@
+unit fEncntKEEP;
+
+//Modifed: 7/26/99
+//By: Robert Bott
+//Location: ISL
+//Description of Mod:
+//  Moved asignment of historical visit category from the cboNewVisitChange event
+//   to the ckbHistoricalClick event.
+
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+  StdCtrls, ORCtrls, ORDtTm, ORFn, ExtCtrls, ComCtrls, ORDtTmRng, fAutoSz, rOptions;
+
+type
+  TfrmEncounter = class(TForm)
+    cboPtProvider: TORComboBox;
+    lblProvider: TLabel;
+    cmdOK: TButton;
+    cmdCancel: TButton;
+    lblLocation: TLabel;
+    txtLocation: TCaptionEdit;
+    pgeVisit: TPageControl;
+    tabClinic: TTabSheet;
+    lblClinic: TLabel;
+    lblDateRange: TLabel;
+    lstClinic: TORListBox;
+    tabAdmit: TTabSheet;
+    lblAdmit: TLabel;
+    lstAdmit: TORListBox;
+    tabNewVisit: TTabSheet;
+    lblVisitDate: TLabel;
+    lblNewVisit: TLabel;
+    calVisitDate: TORDateBox;
+    ckbHistorical: TORCheckBox;
+    cboNewVisit: TORComboBox;
+    dlgDateRange: TORDateRangeDlg;
+    cmdDateRange: TButton;
+    lblInstruct: TLabel;
+    procedure FormCreate(Sender: TObject);
+    procedure pgeVisitChange(Sender: TObject);
+    procedure cmdOKClick(Sender: TObject);
+    procedure cmdCancelClick(Sender: TObject);
+    procedure cboNewVisitNeedData(Sender: TObject; const StartFrom: String;
+      Direction, InsertAt: Integer);
+    procedure calVisitDateChange(Sender: TObject);
+    procedure cboNewVisitChange(Sender: TObject);
+    procedure calVisitDateExit(Sender: TObject);
+    procedure cboPtProviderNeedData(Sender: TObject;
+      const StartFrom: String; Direction, InsertAt: Integer);
+    procedure ckbHistoricalClick(Sender: TObject);
+    procedure cmdDateRangeClick(Sender: TObject);
+    procedure FormDestroy(Sender: TObject);
+    procedure FormClose(Sender: TObject; var Action: TCloseAction);
+    procedure lstAdmitChange(Sender: TObject);
+    procedure lstClinicChange(Sender: TObject);
+  private
+    CLINIC_TXT : String;
+    FFilter: Int64;
+    FPCDate: TFMDateTime;
+    FProvider: Int64;
+    FLocation: Integer;
+    FLocationName: string;
+    FDateTime: TFMDateTime;
+    FVisitCategory: Char;
+    FStandAlone: Boolean;
+    FFromSelf: Boolean;
+    FFromDate: TFMDateTime;
+    FThruDate: TFMDateTIme;
+    FEncFutureLimit: string;
+    FFromCreate: Boolean;
+    FOldHintEvent: TShowHintEvent;
+    OKPressed: Boolean;
+    procedure AppShowHint(var HintStr: string; var CanShow: Boolean;
+                          var HintInfo: THintInfo);
+    procedure SetVisitCat;
+  public
+    { Public declarations }
+  end;
+
+procedure UpdateEncounter(PersonFilter: Int64; ADate: TFMDateTime = 0; TIULocation: integer = 0);
+procedure UpdateVisit(FontSize: Integer); overload;
+procedure UpdateVisit(FontSize: Integer; TIULocation: integer); overload;
+
+implementation
+
+{$R *.DFM}
+
+uses rCore, uCore, uConst, fReview, uPCE, rPCE;
+
+const
+  TC_MISSING = 'Incomplete Encounter Information';
+  TX_NO_DATE = 'A valid date/time has not been entered.';
+  TX_NO_TIME = 'A valid time has not been entered.';
+  TX_NO_LOC  = 'A visit location has not been selected.';
+  TC_LOCONLY = 'Location for Current Activities';
+  TX_FUTURE_WARNING = 'You have selected a visit with a date in the future.  Are you sure?';
+  TC_FUTURE_WARNING = 'Visit Is In Future';
+
+var
+  uTIULocation: integer;
+  uTIULocationName: string;
+
+procedure UpdateVisit(FontSize: Integer);
+begin
+  UpdateEncounter(NPF_SUPPRESS);
+end;
+
+procedure UpdateVisit(FontSize: Integer; TIULocation: integer);
+begin
+  UpdateEncounter(NPF_SUPPRESS, 0, TIULocation);
+end;
+
+procedure UpdateEncounter(PersonFilter: Int64; ADate: TFMDateTime = 0;  TIULocation: integer = 0);
+const
+  UP_SHIFT = 85;
+var
+  frmEncounter: TfrmEncounter;
+  CanChange: Boolean;
+  TimedOut: Boolean;
+begin
+  uTIULocation := TIULocation;
+  if uTIULocation <> 0 then uTIULocationName := ExternalName(uTIULocation, FN_HOSPITAL_LOCATION);
+  frmEncounter := TfrmEncounter.Create(Application);
+  try
+    TimedOut := False;
+    ResizeAnchoredFormToFont(frmEncounter);
+    with frmEncounter do
+    begin
+      FFilter := PersonFilter;
+      FPCDate := ADate;
+      if PersonFilter = NPF_SUPPRESS then           // not prompting for provider
+      begin
+        lblProvider.Visible := False;
+        cboPtProvider.Visible := False;
+        lblInstruct.Visible := True;
+        Caption := TC_LOCONLY;
+        Height := frmEncounter.Height - UP_SHIFT;
+      end
+      else                                          // also prompt for provider
+      begin
+        // InitLongList must be done AFTER FFilter is set
+        cboPtProvider.InitLongList(Encounter.ProviderName);
+        cboPtProvider.SelectByIEN(FProvider);
+      end;
+      ShowModal;
+      if OKPressed then
+      begin
+        CanChange := True;
+        if (PersonFilter <> NPF_SUPPRESS) and
+           (((Encounter.Provider =  User.DUZ) and (FProvider <> User.DUZ)) or
+            ((Encounter.Provider <> User.DUZ) and (FProvider =  User.DUZ)))
+           then CanChange := ReviewChanges(TimedOut);
+        if CanChange then
+        begin
+          if PersonFilter <> NPF_SUPPRESS then Encounter.Provider := FProvider;
+          Encounter.Location      := FLocation;
+          Encounter.DateTime      := FDateTime;
+          Encounter.VisitCategory := FVisitCategory;
+          Encounter.StandAlone    := FStandAlone;
+        end;
+      end;
+    end;
+  finally
+    frmEncounter.Release;
+  end;
+end;
+
+procedure TfrmEncounter.FormCreate(Sender: TObject);
+var
+  ADateFrom, ADateThru: TDateTime;
+  BDateFrom, BDateThru: Integer;
+  BDisplayFrom, BDisplayThru: String;
+begin
+  inherited;
+  FProvider      := Encounter.Provider;
+  FLocation      := Encounter.Location;
+  FLocationName  := Encounter.LocationName;
+  FDateTime      := Encounter.DateTime;
+  FVisitCategory := Encounter.VisitCategory;
+  FStandAlone    := Encounter.StandAlone;
+  rpcGetEncFutureDays(FEncFutureLimit); 
+  rpcGetRangeForEncs(BDateFrom, BDateThru, False); // Get user's current date range settings.
+  if BDateFrom > 0 then
+    BDisplayFrom := 'T-' + IntToStr(BDateFrom)
+  else
+    BDisplayFrom := 'T';
+  if BDateThru > 0 then
+    BDisplayThru := 'T+' + IntToStr(BDateThru)
+  else
+    BDisplayThru := 'T';
+  lblDateRange.Caption := '(' + BDisplayFrom + ' thru ' + BDisplayThru + ')';
+  ADateFrom := (FMDateTimeToDateTime(FMToday) - BDateFrom);
+  ADateThru := (FMDateTimeToDateTime(FMToday) + BDateThru);
+  FFromDate      := DateTimeToFMDateTime(ADateFrom);
+  FThruDate      := DateTimeToFMDateTime(ADateThru) + 0.2359;
+  FFromCreate    := True;
+  with txtLocation do if Length(FLocationName) > 0 then
+  begin
+    Text := FLocationName + '  ';
+    if (FVisitCategory <> 'H') and (FDateTime <> 0) then
+      Text := Text + FormatFMDateTime('mmm dd,yy hh:nn', FDateTime);
+  end
+  else Text := '< Select a location from the tabs below.... >';
+  OKPressed := False;
+  pgeVisit.ActivePage := tabClinic;
+  pgeVisitChange(Self);
+  if lstClinic.Items.Count = 0 then
+  begin
+    pgeVisit.ActivePage := tabNewVisit;
+    pgeVisitChange(Self);
+  end;
+  ckbHistorical.Hint := 'A historical visit or encounter is a visit that occurred at some time' + CRLF +
+                        'in the past or at some other location (possibly non-VA).  Although these' + CRLF +
+                        'are not used for workload credit, they can be used for setting up the' + CRLF +
+                        'PCE reminder maintenance system, or other non-workload-related reasons.';
+  FOldHintEvent := Application.OnShowHint;
+  Application.OnShowHint := AppShowHint;
+  FFromCreate := False;
+  //JAWS will read the second caption if 2 are displayed, so Combining Labels
+  CLINIC_TXT := lblClinic.Caption+'  ';
+  lblClinic.Caption := CLINIC_TXT + lblDateRange.Caption;
+  lblDateRange.Hide;
+end;
+
+procedure TfrmEncounter.cboPtProviderNeedData(Sender: TObject; const StartFrom: string;
+  Direction, InsertAt: Integer);
+begin
+  inherited;
+  case FFilter of
+    NPF_PROVIDER:  cboPtProvider.ForDataUse(SubSetOfProviders(StartFrom, Direction));
+//    NPF_ENCOUNTER: cboPtProvider.ForDataUse(SubSetOfUsersWithClass(StartFrom, Direction, FloatToStr(FPCDate)));
+    else cboPtProvider.ForDataUse(SubSetOfPersons(StartFrom, Direction));
+  end;
+end;
+
+procedure TfrmEncounter.pgeVisitChange(Sender: TObject);
+begin
+  inherited;
+  cmdDateRange.Visible := pgeVisit.ActivePage = tabClinic;
+  if (pgeVisit.ActivePage = tabClinic) and (lstClinic.Items.Count = 0)
+    then ListApptAll(lstClinic.Items, Patient.DFN, FFromDate, FThruDate);
+  if (pgeVisit.ActivePage = tabAdmit)    and (lstAdmit.Items.Count = 0)
+    then ListAdmitAll(lstAdmit.Items, Patient.DFN);
+  if pgeVisit.ActivePage = tabNewVisit then
+  begin
+    if cboNewVisit.Items.Count = 0 then
+    begin
+      if FVisitCategory <> 'H' then
+      begin
+        if uTIULocation <> 0 then
+        begin
+          cboNewVisit.InitLongList(uTIULocationName);
+          cboNewVisit.SelectByIEN(uTIULocation);
+        end
+        else
+        begin
+          cboNewVisit.InitLongList(FLocationName);
+          if Encounter.Location <> 0 then cboNewVisit.SelectByIEN(FLocation);
+        end;
+        FFromSelf := True;
+        with calVisitDate do if FDateTime <> 0 then FMDateTime := FDateTime else Text := 'NOW';
+        FFromSelf := False;
+      end
+      else cboNewVisit.InitLongList('');
+      ckbHistorical.Checked := FVisitCategory = 'E';
+    end; {if cboNewVisit}
+  end; {if pgeVisit.ActivePage}
+end;
+
+procedure TfrmEncounter.cboNewVisitNeedData(Sender: TObject; const StartFrom: string;
+  Direction, InsertAt: Integer);
+begin
+  inherited;
+  cboNewVisit.ForDataUse(SubSetOfNewLocs(StartFrom, Direction));
+end;
+
+procedure TfrmEncounter.cmdDateRangeClick(Sender: TObject);
+begin
+  dlgDateRange.FMDateStart := FFromDate;
+  dlgDateRange.FMDateStop  := FThruDate;
+  if dlgDateRange.Execute then
+  begin
+    FFromDate := dlgDateRange.FMDateStart;
+    FThruDate := dlgDateRange.FMDateStop + 0.2359;
+    lblDateRange.Caption := '(' + dlgDateRange.RelativeStart + ' thru '
+                                + dlgDateRange.RelativeStop + ')';
+    //label
+    lblClinic.Caption := CLINIC_TXT + lblDateRange.Caption;
+    //list
+    lstClinic.Caption := lblClinic.Caption + ' ' + lblDateRange.Caption;
+    lstClinic.Items.Clear;
+    ListApptAll(lstClinic.Items, Patient.DFN, FFromDate, FThruDate);
+  end;
+end;
+
+procedure TfrmEncounter.cboNewVisitChange(Sender: TObject);
+begin
+  inherited;
+  with cboNewVisit do
+  begin
+    FLocation := ItemIEN;
+    FLocationName := DisplayText[ItemIndex];
+    FDateTime := calVisitDate.FMDateTime;
+    SetVisitCat;
+    with txtLocation do
+    begin
+      Text := FLocationName + '  ';
+      if FDateTime <> 0 then Text := Text + FormatFMDateTime('mmm dd,yy hh:nn', FDateTime);
+    end;
+  end;
+end;
+
+procedure TfrmEncounter.calVisitDateChange(Sender: TObject);
+begin
+  inherited;
+  // The FFromSelf was added because without it, a new visit (minus the seconds gets created.
+  // Setting the text of calVisit caused the text to be re-evaluated & changed the FMDateTime property.
+  if FFromSelf then Exit;
+  with cboNewVisit do
+  begin
+    FLocation := ItemIEN;
+    FLocationName := DisplayText[ItemIndex];
+    FDateTime := calVisitDate.FMDateTime;
+    SetVisitCat;
+    txtLocation.Text := FLocationName + '  ' + calVisitDate.Text;
+  end;
+end;
+
+procedure TfrmEncounter.calVisitDateExit(Sender: TObject);
+begin
+  inherited;
+  with cboNewVisit do if ItemIEN > 0 then
+  begin
+    FLocation := ItemIEN;
+    FLocationName := DisplayText[ItemIndex];
+    FDateTime := calVisitDate.FMDateTime;
+    SetVisitCat;
+    with txtLocation do
+    begin
+      Text := FLocationName + '  ';
+      if FDateTime <> 0 then Text := Text + FormatFMDateTime('mmm dd,yy hh:nn', FDateTime);
+    end;
+  end;
+end;
+
+procedure TfrmEncounter.cmdOKClick(Sender: TObject);
+var
+  msg: string;
+  ADate, AMaxDate: TDateTime;
+
+begin
+  inherited;
+  msg := '';
+  if FLocation = 0 then msg := TX_NO_LOC;
+  if FDateTime <= 0 then msg := msg + CRLF + TX_NO_DATE
+  else if(pos('.',FloatToStr(FDateTime)) = 0) then msg := msg + CRLF + TX_NO_TIME;
+  if(msg <> '') then
+  begin
+    InfoBox(msg, TC_MISSING, MB_OK);
+    Exit;
+  end
+  else
+  begin
+    ADate := FMDateTimeToDateTime(Trunc(FDateTime));
+    AMaxDate := FMDateTimeToDateTime(FMToday) + StrToIntDef(FEncFutureLimit, 0);
+    if ADate > AMaxDate then
+      if InfoBox(TX_FUTURE_WARNING, TC_FUTURE_WARNING, MB_YESNO or MB_ICONQUESTION) = MRNO then exit;
+  end;
+  if FFilter <> NPF_SUPPRESS then FProvider := cboPtProvider.ItemIEN;
+  OKPressed := True;
+  Close;
+end;
+
+procedure TfrmEncounter.cmdCancelClick(Sender: TObject);
+begin
+  inherited;
+  Close;
+end;
+
+procedure TfrmEncounter.ckbHistoricalClick(Sender: TObject);
+begin
+  SetVisitCat;
+end;
+
+{
+procedure TfrmEncounter.cboPtProviderChange(Sender: TObject);
+var
+  txt: string;
+  AIEN: Int64;
+
+begin
+  if(FFilter <> NPF_ENCOUNTER) then exit;
+  AIEN := cboPtProvider.ItemIEN;
+  if(AIEN <> 0) then
+  begin
+    txt := InvalidPCEProviderTxt(AIEN, FPCDate);
+    if(txt <> '') then
+    begin
+      InfoBox(cboPtProvider.text + txt, TX_BAD_PROV, MB_OK);
+      cboPtProvider.ItemIndex := -1;
+    end;
+  end;
+end;
+ }
+
+procedure TfrmEncounter.AppShowHint(var HintStr: string;
+  var CanShow: Boolean; var HintInfo: THintInfo);
+const
+  HistHintDelay = 30000; // 30 seconds
+
+begin
+  if (not Assigned(HintInfo.HintControl)) then exit;
+  if(HintInfo.HintControl = ckbHistorical) then
+    HintInfo.HideTimeout := HistHintDelay;
+  if(assigned(FOldHintEvent)) then
+    FOldHintEvent(HintStr, CanShow, HintInfo);
+end;
+
+procedure TfrmEncounter.FormDestroy(Sender: TObject);
+begin
+  //Application.OnShowHint := FOldHintEvent;     v22.11f - RV
+end;
+
+procedure TfrmEncounter.SetVisitCat;
+begin
+  if ckbHistorical.Checked then
+    FVisitCategory := 'E'
+  else
+    FVisitCategory := GetVisitCat('A', FLocation, Patient.Inpatient);
+  FStandAlone := (FVisitCategory = 'A');
+end;
+
+procedure TfrmEncounter.FormClose(Sender: TObject;
+  var Action: TCloseAction);
+begin
+  Application.OnShowHint := FOldHintEvent;
+end;
+
+procedure TfrmEncounter.lstAdmitChange(Sender: TObject);
+begin
+  inherited;
+  with lstAdmit do
+  begin
+    FLocation := StrToIntDef(Piece(Items[ItemIndex], U, 2), 0);
+    FLocationName := Piece(Items[ItemIndex], U, 3);
+    FDateTime := MakeFMDateTime(ItemID);
+    FVisitCategory := 'H';
+    FStandAlone := False;
+    txtLocation.Text := FLocationName;  // don't show admit date (could confuse user)
+  end;
+end;
+
+procedure TfrmEncounter.lstClinicChange(Sender: TObject);
+// V|A;DateTime;LocIEN^DateTime^LocName^Status
+begin
+  inherited;
+  with lstClinic do
+  begin
+    FLocation := StrToIntDef(Piece(ItemID, ';', 3), 0);
+    FLocationName := Piece(Items[ItemIndex], U, 3);
+    FDateTime := MakeFMDateTime(Piece(ItemID,';', 2));
+    FVisitCategory := 'A';
+    FStandAlone := CharAt(ItemID, 1) = 'V';
+    with txtLocation do
+    begin
+      Text := FLocationName + '  ';
+      if FDateTime <> 0 then Text := Text + FormatFMDateTime('mmm dd,yy hh:nn', FDateTime);
+    end;
+  end;
+end;
+
+end.
Index: cprs/branches/foia-cprs/CPRS-Chart/fFrame.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fFrame.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fFrame.dfm	(revision 460)
@@ -1,8 +1,8 @@
 object frmFrame: TfrmFrame
-  Left = 145
-  Top = 191
+  Left = 77
+  Top = 123
   Width = 684
-  Height = 487
-  Caption = 'CPRS Frame'
+  Height = 384
+  Caption = 'p'
   Color = clBtnFace
   Font.Charset = DEFAULT_CHARSET
@@ -30,5 +30,5 @@
     Top = 0
     Width = 676
-    Height = 441
+    Height = 330
     Align = alClient
     Caption = 'No patient is currently selected'
@@ -46,5 +46,5 @@
     Top = 0
     Width = 676
-    Height = 441
+    Height = 330
     Align = alClient
     TabOrder = 0
@@ -75,5 +75,5 @@
         Left = 0
         Top = 1
-        Width = 24
+        Width = 39
         Height = 39
         Align = alLeft
@@ -81,11 +81,11 @@
         ParentShowHint = False
         ShowHint = True
-        TabOrder = 7
+        TabOrder = 8
         object imgCCOW: TImage
           Left = 2
           Top = 2
-          Width = 20
+          Width = 35
           Height = 35
-          Align = alLeft
+          Align = alClient
           Center = True
           Picture.Data = {
@@ -120,5 +120,5 @@
       end
       object pnlPatient: TKeyClickPanel
-        Left = 24
+        Left = 39
         Top = 1
         Width = 187
@@ -202,5 +202,5 @@
       end
       object pnlVisit: TKeyClickPanel
-        Left = 211
+        Left = 226
         Top = 1
         Width = 168
@@ -263,7 +263,7 @@
       end
       object pnlPrimaryCare: TKeyClickPanel
-        Left = 379
+        Left = 394
         Top = 1
-        Width = 104
+        Width = 31
         Height = 39
         Hint = 'Primary Care Team / Primary Care Provider'
@@ -323,5 +323,5 @@
       end
       object pnlCIRN: TKeyClickPanel
-        Left = 518
+        Left = 520
         Top = 1
         Width = 49
@@ -338,29 +338,62 @@
         ParentShowHint = False
         ShowHint = True
-        TabOrder = 4
+        TabOrder = 5
         OnClick = pnlCIRNClick
         OnEnter = pnlPrimaryCareEnter
         OnExit = pnlPrimaryCareExit
+        OnMouseDown = pnlCIRNMouseDown
+        OnMouseUp = pnlCIRNMouseUp
         object lblCIRN: TLabel
-          Left = 3
-          Top = 4
-          Width = 37
+          Left = 2
+          Top = 2
+          Width = 45
           Height = 13
+          Align = alTop
+          Alignment = taCenter
           Caption = 'Remote'
           Enabled = False
+          Font.Charset = DEFAULT_CHARSET
+          Font.Color = clBtnFace
+          Font.Height = -8
+          Font.Name = 'MS Sans Serif'
+          Font.Style = []
+          ParentFont = False
           OnClick = pnlCIRNClick
         end
         object lblCIRNData: TLabel
-          Left = 11
-          Top = 22
-          Width = 23
+          Left = 2
+          Top = 15
+          Width = 45
           Height = 13
+          Align = alTop
+          Alignment = taCenter
           Caption = 'Data'
           Enabled = False
+          Font.Charset = DEFAULT_CHARSET
+          Font.Color = clBtnFace
+          Font.Height = -8
+          Font.Name = 'MS Sans Serif'
+          Font.Style = []
+          ParentFont = False
           OnClick = pnlCIRNClick
         end
+        object lblCIRNAvail: TLabel
+          Left = 2
+          Top = 28
+          Width = 45
+          Height = 9
+          Align = alClient
+          Alignment = taCenter
+          Font.Charset = DEFAULT_CHARSET
+          Font.Color = clBtnFace
+          Font.Height = -8
+          Font.Name = 'MS Sans Serif'
+          Font.Style = []
+          ParentFont = False
+          OnClick = pnlCIRNClick
+        end
       end
       object pnlReminders: TKeyClickPanel
-        Left = 567
+        Left = 569
         Top = 1
         Width = 35
@@ -377,5 +410,5 @@
         ParentShowHint = False
         ShowHint = True
-        TabOrder = 5
+        TabOrder = 6
         TabStop = True
         OnClick = pnlRemindersClick
@@ -405,5 +438,5 @@
       end
       object pnlFlag: TKeyClickPanel
-        Left = 483
+        Left = 485
         Top = 1
         Width = 35
@@ -415,5 +448,5 @@
         ParentShowHint = False
         ShowHint = True
-        TabOrder = 3
+        TabOrder = 4
         TabStop = True
         OnClick = pnlFlagClick
@@ -445,7 +478,7 @@
       end
       object pnlPostings: TKeyClickPanel
-        Left = 602
+        Left = 604
         Top = 1
-        Width = 72
+        Width = 70
         Height = 39
         Hint = 'Click to display patient postings.'
@@ -460,5 +493,5 @@
         ParentShowHint = False
         ShowHint = True
-        TabOrder = 6
+        TabOrder = 7
         TabStop = True
         OnClick = pnlPostingsClick
@@ -468,5 +501,5 @@
         OnMouseUp = pnlPostingsMouseUp
         object lblPtPostings: TStaticText
-          Left = 6
+          Left = 5
           Top = 4
           Width = 57
@@ -509,8 +542,55 @@
         end
       end
+      object paVAA: TKeyClickPanel
+        Left = 425
+        Top = 1
+        Width = 60
+        Height = 39
+        Align = alRight
+        BevelOuter = bvNone
+        Font.Charset = DEFAULT_CHARSET
+        Font.Color = clBtnFace
+        Font.Height = -11
+        Font.Name = 'MS Sans Serif'
+        Font.Style = []
+        ParentFont = False
+        ParentShowHint = False
+        ShowHint = False
+        TabOrder = 3
+        Visible = False
+        DesignSize = (
+          60
+          39)
+        object laVAA2: TButton
+          Left = 0
+          Top = 19
+          Width = 59
+          Height = 20
+          Hint = 'Click to display patient insurance data'
+          Anchors = [akLeft, akTop, akRight, akBottom]
+          Caption = 'laVAA2'
+          ParentShowHint = False
+          ShowHint = True
+          TabOrder = 1
+          OnClick = laVAA2Click
+        end
+        object laMHV: TButton
+          Left = 0
+          Top = 1
+          Width = 59
+          Height = 18
+          Hint = 'Click to display MHV data'
+          Anchors = [akLeft, akTop, akRight, akBottom]
+          Caption = 'laMHV'
+          ParentShowHint = False
+          ShowHint = True
+          TabOrder = 0
+          OnClick = laMHVClick
+        end
+      end
     end
     object stsArea: TStatusBar
       Left = 1
-      Top = 419
+      Top = 308
       Width = 674
       Height = 21
@@ -544,5 +624,5 @@
     object tabPage: TTabControl
       Left = 1
-      Top = 397
+      Top = 286
       Width = 674
       Height = 22
@@ -563,5 +643,5 @@
       Top = 42
       Width = 674
-      Height = 355
+      Height = 244
       Align = alClient
       BevelOuter = bvNone
@@ -607,6 +687,6 @@
   end
   object mnuFrame: TMainMenu
-    Left = 68
-    Top = 120
+    Left = 180
+    Top = 128
     object mnuFile: TMenuItem
       Caption = '&File'
@@ -715,4 +795,5 @@
             Tag = 8
             Caption = '8 pt'
+            RadioItem = True
             OnClick = mnuFontSizeClick
           end
@@ -720,4 +801,5 @@
             Tag = 10
             Caption = '10 pt'
+            RadioItem = True
             OnClick = mnuFontSizeClick
           end
@@ -725,4 +807,5 @@
             Tag = 12
             Caption = '12 pt'
+            RadioItem = True
             OnClick = mnuFontSizeClick
           end
@@ -730,4 +813,5 @@
             Tag = 14
             Caption = '14 pt'
+            RadioItem = True
             OnClick = mnuFontSizeClick
           end
@@ -735,4 +819,5 @@
             Tag = 18
             Caption = '18 pt'
+            RadioItem = True
             OnClick = mnuFontSizeClick
           end
@@ -740,4 +825,5 @@
             Tag = 24
             Caption = '24 pt'
+            RadioItem = True
             OnClick = mnuFontSizeClick
           end
@@ -811,16 +897,52 @@
         end
       end
-      object mnuViewDemo: TMenuItem
-        Caption = 'De&mographics'
-        OnClick = mnuViewDemoClick
-      end
-      object mnuViewPostings: TMenuItem
-        Caption = '&Postings'
-        OnClick = mnuViewPostingsClick
-      end
-      object mnuViewReminders: TMenuItem
-        Caption = '&Reminders'
-        Enabled = False
-        OnClick = mnuViewRemindersClick
+      object mnuViewInformation: TMenuItem
+        Caption = 'Information'
+        OnClick = mnuViewInformationClick
+        object mnuViewDemo: TMenuItem
+          Tag = 1
+          Caption = 'De&mographics...'
+          OnClick = ViewInfo
+        end
+        object mnuViewVisits: TMenuItem
+          Tag = 2
+          Caption = 'Visits/Pr&ovider...'
+          OnClick = ViewInfo
+        end
+        object mnuViewPrimaryCare: TMenuItem
+          Tag = 3
+          Caption = 'Primary &Care...'
+          OnClick = ViewInfo
+        end
+        object mnuViewMyHealtheVet: TMenuItem
+          Tag = 4
+          Caption = 'MyHealthe&Vet...'
+          OnClick = ViewInfo
+        end
+        object mnuInsurance: TMenuItem
+          Tag = 5
+          Caption = '&Insurance...'
+          OnClick = ViewInfo
+        end
+        object mnuViewFlags: TMenuItem
+          Tag = 6
+          Caption = '&Flags...'
+          OnClick = ViewInfo
+        end
+        object mnuViewRemoteData: TMenuItem
+          Tag = 7
+          Caption = 'Remote &Data...'
+          OnClick = ViewInfo
+        end
+        object mnuViewReminders: TMenuItem
+          Tag = 8
+          Caption = '&Reminders...'
+          OnClick = ViewInfo
+        end
+        object mnuViewPostings: TMenuItem
+          Tag = 9
+          Caption = '&Postings...'
+          OnClick = ViewInfo
+        end
       end
     end
@@ -832,4 +954,9 @@
         Caption = '-'
       end
+      object mnuToolsGraphing: TMenuItem
+        Caption = '&Graphing...'
+        ShortCut = 16455
+        OnClick = mnuToolsGraphingClick
+      end
       object LabInfo1: TMenuItem
         Caption = '&Lab Test Information...'
@@ -837,5 +964,5 @@
       end
       object mnuToolsOptions: TMenuItem
-        Caption = 'Options...'
+        Caption = '&Options...'
         OnClick = mnuToolsOptionsClick
       end
@@ -896,11 +1023,11 @@
   object OROpenDlg: TOpenDialog
     Filter = 'Exe file (*.exe)|*.exe'
-    Left = 460
-    Top = 369
+    Left = 260
+    Top = 257
   end
   object popAlerts: TPopupMenu
     AutoPopup = False
-    Left = 440
-    Top = 416
+    Left = 320
+    Top = 200
     object mnuAlertContinue: TMenuItem
       Caption = 'Continue'
@@ -918,6 +1045,7 @@
   object AppEvents: TApplicationEvents
     OnActivate = AppEventsActivate
-    Left = 496
-    Top = 368
+    OnShortCut = AppEventsShortCut
+    Left = 336
+    Top = 256
   end
 end
Index: cprs/branches/foia-cprs/CPRS-Chart/fFrame.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fFrame.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fFrame.pas	(revision 460)
@@ -5,4 +5,5 @@
 {$OPTIMIZATION OFF}                              // REMOVE AFTER UNIT IS DEBUGGED
 {$WARN SYMBOL_PLATFORM OFF}
+{$DEFINE CCOWBROKER}
 
 {.$define debug}
@@ -120,4 +121,16 @@
     mnuAlertRenew: TMenuItem;
     AppEvents: TApplicationEvents;
+    paVAA: TKeyClickPanel;
+    mnuToolsGraphing: TMenuItem;
+    laVAA2: TButton;
+    laMHV: TButton;
+    lblCIRNAvail: TLabel;
+    mnuViewInformation: TMenuItem;
+    mnuViewVisits: TMenuItem;
+    mnuViewPrimaryCare: TMenuItem;
+    mnuViewMyHealtheVet: TMenuItem;
+    mnuInsurance: TMenuItem;
+    mnuViewFlags: TMenuItem;
+    mnuViewRemoteData: TMenuItem;
     procedure tabPageChange(Sender: TObject);
     procedure FormCreate(Sender: TObject);
@@ -142,5 +155,4 @@
     procedure mnuHelpBrokerClick(Sender: TObject);
     procedure mnuFileEncounterClick(Sender: TObject);
-    procedure mnuViewDemoClick(Sender: TObject);
     procedure mnuViewPostingsClick(Sender: TObject);
     procedure mnuHelpAboutClick(Sender: TObject);
@@ -171,5 +183,4 @@
     function FormHelp(Command: Word; Data: Integer;
       var CallHelp: Boolean): Boolean;
-    procedure mnuViewRemindersClick(Sender: TObject);
     procedure pnlRemindersMouseDown(Sender: TObject; Button: TMouseButton;
       Shift: TShiftState; X, Y: Integer);
@@ -219,5 +230,15 @@
     procedure AppEventsActivate(Sender: TObject);
     procedure ScreenActiveFormChange(Sender: TObject);
+    procedure AppEventsShortCut(var Msg: TWMKey; var Handled: Boolean);
     procedure mnuToolsClick(Sender: TObject);
+    procedure mnuToolsGraphingClick(Sender: TObject);
+    procedure pnlCIRNMouseDown(Sender: TObject; Button: TMouseButton;
+      Shift: TShiftState; X, Y: Integer);
+    procedure pnlCIRNMouseUp(Sender: TObject; Button: TMouseButton;
+      Shift: TShiftState; X, Y: Integer);
+    procedure laMHVClick(Sender: TObject);
+    procedure laVAA2Click(Sender: TObject);
+    procedure ViewInfo(Sender: TObject);
+    procedure mnuViewInformationClick(Sender: TObject);
   private
     FJustEnteredApp : boolean;
@@ -228,4 +249,5 @@
     FCCOWBusy: boolean;
     FCCOWError: boolean;
+    FNoPatientSelected: boolean;
     FRefreshing: boolean;
     FClosing: boolean;
@@ -242,4 +264,5 @@
     FTabChanged: TNotifyEvent;
     FOldActivate: TNotifyEvent;
+    FOldActiveFormChange: TNotifyEvent;
     FECSAuthUser: Boolean;
     FFixedStatusWidth: integer;
@@ -248,5 +271,9 @@
     FFlagList: TStringList;
     FPrevPtID: string;
+    FVitalsDLLActive: boolean;
+    FGraphFloatActive: boolean;
+    FGraphContext: string;
     procedure RefreshFixedStatusWidth;
+    procedure FocusApplicationTopForm;
     procedure AppActivated(Sender: TObject);
     procedure AppDeActivated(Sender: TObject);
@@ -272,5 +299,5 @@
     procedure SetDebugMenu;
     procedure SetupPatient(AFlaggedList : TStringList = nil);
-    procedure SetUpCIRN;
+    //procedure SetUpCIRN;
     procedure RemindersChanged(Sender: TObject);
     procedure ReportsOnlyDisplay;
@@ -283,15 +310,19 @@
     procedure UpdateECSParameter(var CmdParameter: string);
     function  ValidECSUser: boolean;
-    function  AllowCCOWContextChange(NewDFN: string): boolean;
+    procedure StartCCOWContextor;
+    function  AllowCCOWContextChange(var CCOWResponse: UserResponse; NewDFN: string): boolean;
     procedure UpdateCCOWContext;
     procedure CheckHyperlinkResponse(aContextItemCollection: IDispatch; var HyperlinkReason: string);
     procedure CheckForDifferentPatient(aContextItemCollection: IDispatch; var PtChanged: boolean);
+{$IFDEF CCOWBROKER}
+    procedure CheckForDifferentUser(aContextItemCollection: IDispatch; var UserChanged: boolean);
+{$ENDIF}
     procedure HideEverything;
     procedure ShowEverything;
     //function FindBestCCOWDFN(var APatientName: string): string;
-    function  FindBestCCOWDFN: string;
+    function FindBestCCOWDFN: string;
     procedure HandleCCOWError(AMessage: string);
   public
-    EnduringPtSelSplitterPos: integer;
+   EnduringPtSelSplitterPos: integer;
     procedure SetBADxList;
 
@@ -309,4 +340,9 @@
     property Closing:         Boolean read FClosing;
     property OnTabChanged:    TNotifyEvent read FTabChanged write FTabChanged;
+    property VitalsDLLActive: boolean read FVitalsDLLActive write FVitalsDLLActive;
+    property GraphFloatActive: boolean read FGraphFloatActive write FGraphFloatActive;
+    property GraphContext: string read FGraphContext write FGraphContext;
+    procedure ToggleMenuItemChecked(Sender: TObject);
+    procedure SetUpCIRN;
   end;
 
@@ -331,10 +367,18 @@
 uses
   ORNet, rCore, fPtSelMsg, fPtSel, fCover, fProbs, fMeds, fOrders, rOrders, fNotes, fConsults, fDCSumm,
-  rMisc, Clipbrd, fLabs, fReports, fPtDemo, fEncnt, fPtCWAD, uCore, fAbout, fReview, fxBroker,
+  rMisc, Clipbrd, fLabs, fReports, rReports, fPtDemo, fEncnt, fPtCWAD, uCore, fAbout, fReview, fxBroker,
   fxLists, fxServer, ORSystem, fRptBox, fSplash, rODAllergy, uInit, fLabTests, fLabInfo,
   uReminders, fReminderTree, ORClasses, fDeviceSelect, fDrawers, fReminderDialog, ShellAPI, rVitals,
-  fOptions, rTemplates, fSurgery, rSurgery, uEventHooks, uSignItems, fDefaultEvent,rECS,
+  fOptions, fGraphs, rTemplates, fSurgery, rSurgery, uEventHooks, uSignItems, fDefaultEvent,rECS,
   fIconLegend, uOrders, fPtSelOptns, DateUtils, uSpell, uOrPtf, fPatientFlagMulti,
-  fAlertForward, UBAGlobals, fBAOptionsDiagnoses,UBACore,fOrdersSign;
+  fAlertForward, UBAGlobals, fBAOptionsDiagnoses, UBACore, fOrdersSign, uVitals, fOrdersRenew, uFormMonitor
+  {$IFDEF CCOWBROKER}
+  , CCOW_const
+  {$ENDIF}
+  ;
+
+var                                 //  RV 05/11/04
+  IsRunExecuted: Boolean = FALSE;           //  RV 05/11/04
+  GraphFloat: TfrmGraphs;
 
 const
@@ -410,5 +454,8 @@
 procedure TfrmFrame.TimeOutAction;
 begin
-  Close;
+  if frmFrame.VitalsDLLActive then
+    CloseVitalsDLL()
+  else
+    Close;
 end;
 
@@ -460,5 +507,5 @@
   FContextChanging := True;
   Result := True;
-  if COMObjectActive or SpellCheckInProgress then
+  if COMObjectActive or SpellCheckInProgress or VitalsDLLActive then
     begin
       Reason := 'COM_OBJECT_ACTIVE';
@@ -531,4 +578,13 @@
   HasFlag := False;
   HidePatientSelectMessages;
+  if (GraphFloat <> nil) and GraphFloatActive then
+  with GraphFloat do
+  begin
+    Initialize;
+    DisplayData('top');
+    DisplayData('bottom');
+    lstCheck.Items.Clear;
+    Caption := 'CPRS Graphing - Patient: ' + MixedCase(Patient.Name);
+  end;
 end;
 
@@ -564,18 +620,11 @@
   FJustEnteredApp := false;
   SizeHolder := TSizeHolder.Create;
+  FOldActiveFormChange := Screen.OnActiveFormChange;
   Screen.OnActiveFormChange := ScreenActiveFormChange;
   if not (ParamSearch('CCOW')='DISABLE') then
     try
-      ctxContextor := TContextorControl.Create(Self);
-      with ctxContextor do
-        begin
-          OnPending := ctxContextorPending;
-          OnCommitted := ctxContextorCommitted;
-          OnCanceled := ctxContextorCanceled;
-        end;
-      FCCOWBusy := False;
-      FCCOWInstalled := True;
-      FCCOWDrivedChange := False;
+      StartCCOWContextor;
     except
+      IsRunExecuted := False;
       FCCOWInstalled := False;
       pnlCCOW.Visible := False;
@@ -585,4 +634,5 @@
   else
     begin
+      IsRunExecuted := False;
       FCCOWInstalled := False;
       pnlCCOW.Visible := False;
@@ -603,8 +653,29 @@
   FCreateProgress := FCP_SERVER;
 
+{$IFDEF CCOWBROKER}
+  EnsureBroker;
+  if ctxContextor <> nil then
+  begin
+    if ParamSearch('CCOW') = 'PATIENTONLY' then
+      RPCBrokerV.Contextor := nil
+    else
+      RPCBrokerV.Contextor := ctxContextor;
+  end
+  else
+    RPCBrokerV.Contextor := nil;
+{$ENDIF}
+
   if not ConnectToServer(TX_OPTION) then
   begin
+    if Assigned(RPCBrokerV) then
+      InfoBox(RPCBrokerV.RPCBError, 'Error', MB_OK or MB_ICONERROR);
     Close;
     Exit;
+  end;
+
+  if ctxContextor <> nil then
+  begin
+    if not (ParamSearch('CCOW') = 'PATIENTONLY') then
+      ctxContextor.NotificationFilter := ctxContextor.NotificationFilter + ';User';
   end;
 
@@ -616,6 +687,6 @@
   FOldActivate := Application.OnActivate;
   Application.OnActivate := AppActivated;
-  Application.OnDeactivate := AppDeActivated;
-
+  Application.OnDeActivate := AppDeActivated;
+  
   // create initial core objects
   FCreateProgress := FCP_OBJECTS;
@@ -695,5 +766,4 @@
   HasFlag  := False;
   FlagList := TStringList.Create;
-  FPrevPtID := '';
   // set up structures specific to the user
   Caption := TX_IN_USE + MixedCase(User.Name) + '  (' + RPCBrokerV.Server + ')';
@@ -729,5 +799,8 @@
   FCreateProgress := FCP_FINISH;
   pnlReminders.Visible := InteractiveRemindersActive;
+  GraphFloatActive := false;
+  GraphContext := '';
   uRemoteType := '';
+  FPrevPtID := '';
   SetUserTools;
   EnduringPtSelSplitterPos := 0;
@@ -736,5 +809,4 @@
   InitialOrderVariables;
   PostMessage(Handle, UM_INITIATE, 0, 0);    // select patient after main form is created
-
 //  mnuFileOpenClick(Self);
 //  if Patient.DFN = '' then  //*DFN*
@@ -744,53 +816,70 @@
 //  end;
 //  if WindowState = wsMinimized then WindowState := wsNormal;
-end;
-
-procedure TfrmFrame.UMInitiate(var Message: TMessage);
-begin
-  NotifyOtherApps(NAE_OPEN, IntToStr(User.DUZ));
-
-  if FCCOWInstalled then      // Please see me re: changes here - Thanks - RV.
+  SetFormMonitoring(true);
+end;
+
+procedure TfrmFrame.StartCCOWContextor;
+begin
   try
-    // To re-enable the multiple instance functionality, remove the '#' from the following line
-    ctxContextor.Run('CPRSChart', '', TRUE, '*');
-
-    // Uncomment the following line to run in secure binding mode, once the vault is configured to do so.
-    //   Also comment out the 'ctxContextor.Run' line above.
-    //ctxContextor.Run('CPRSChart', PASSCODE, TRUE, '*');
+    ctxContextor := TContextorControl.Create(Self);
+    with ctxContextor do
+      begin
+        OnPending := ctxContextorPending;
+        OnCommitted := ctxContextorCommitted;
+        OnCanceled := ctxContextorCanceled;
+      end;
+    FCCOWBusy := False;
+    FCCOWInstalled := True;
+    FCCOWDrivedChange := False;
+    ctxContextor.Run('CPRSChart', '', TRUE, 'Patient');
+    IsRunExecuted := True;
   except
     on exc : EOleException do
-      begin
-        try
-          // Uncomment the following line to run in secure binding mode, once the vault is configured to do so.
-          ctxContextor.Run('CPRSChart' + '#', '', TRUE, '*');
-          //ctxContextor.Run('CPRSChart' + '#', PASSCODE, TRUE, '*');
-
-          if ParamSearch('CCOW') = 'FORCE' then
+    begin
+      IsRunExecuted := False;
+      FreeAndNil(ctxContextor);
+      try
+        ctxContextor := TContextorControl.Create(Self);
+        with ctxContextor do
           begin
-            mnuFileResumeContext.Enabled := False;
-            mnuFileBreakContext.Visible := True;
-            mnuFileBreakContext.Enabled := True;
-          end
-          else
-          begin
-            ctxContextor.Suspend;
-            mnuFileResumeContext.Visible := True;
-            mnuFileBreakContext.Visible := True;
-            mnuFileBreakContext.Enabled := False;
+            OnPending := ctxContextorPending;
+            OnCommitted := ctxContextorCommitted;
+            OnCanceled := ctxContextorCanceled;
           end;
-        except
-          on exc : EOleException do
-            begin
-              FCCOWInstalled := False;
-              pnlCCOW.Visible := False;
-              mnuFileResumeContext.Visible := False;
-              mnuFileBreakContext.Visible := False;
-            end;
+        FCCOWBusy := False;
+        FCCOWInstalled := True;
+        FCCOWDrivedChange := False;
+        ctxContextor.Run('CPRSChart' + '#', '', TRUE, 'Patient');
+        IsRunExecuted := True;
+        if ParamSearch('CCOW') = 'FORCE' then
+        begin
+          mnuFileResumeContext.Enabled := False;
+          mnuFileBreakContext.Visible := True;
+          mnuFileBreakContext.Enabled := True;
+        end
+        else
+        begin
+          ctxContextor.Suspend;
+          mnuFileResumeContext.Visible := True;
+          mnuFileBreakContext.Visible := True;
+          mnuFileBreakContext.Enabled := False;
         end;
-      end;   // on exc
-  end;  // try/except
-
+      except
+        IsRunExecuted := False;
+        FCCOWInstalled := False;
+        FreeAndNil(ctxContextor);
+        pnlCCOW.Visible := False;
+        mnuFileResumeContext.Visible := False;
+        mnuFileBreakContext.Visible := False;
+      end;
+    end;
+  end
+end;
+
+procedure TfrmFrame.UMInitiate(var Message: TMessage);
+begin
+  NotifyOtherApps(NAE_OPEN, IntToStr(User.DUZ));
   LoadUserPreferences;
-  GetBAStatus(User.DUZ,Encounter.Location);
+  GetBAStatus(User.DUZ,Patient.DFN);
   mnuFileOpenClick(Self);
   Enabled := True;
@@ -803,4 +892,5 @@
 begin
   Application.OnActivate := FOldActivate;
+  Screen.OnActiveFormChange := FOldActiveFormChange;
   FNextButtonBitmap.Free;
   uTabList.Free;
@@ -814,4 +904,5 @@
   User.Free;
   SizeHolder.Free;
+  ctxContextor.Free;
 end;
 
@@ -833,8 +924,4 @@
 
 procedure TfrmFrame.SetUserTools;
-const
-  TX_M_NOT_CONFIG = 'Tools/Options menu on M side not configured properly -'+
-                    ' please notify your IRM support immediately';
-  TC_M_NOT_CONFIG = 'Warning: Check Tools/Options Menu in M';
 var
   ToolItems: TToolItemList;
@@ -885,11 +972,5 @@
     UserTool.Hint := Action;
     UserTool.OnClick := ToolClick;
-    if i < mnuTools.Count then
-      mnuTools.Insert(i, UserTool)
-    else
-    begin
-      mnuTools.Add(UserTool);
-      InfoBox(TX_M_NOT_CONFIG, TC_M_NOT_CONFIG, MB_ICONWARNING or MB_OK)
-    end;
+    mnuTools.Insert(i, UserTool);
   end;
 end;
@@ -965,4 +1046,5 @@
 begin
   FClosing := TRUE;
+  SetFormMonitoring(false);
   if FCreateProgress < FCP_FINISH then FTerminate := True;
 
@@ -970,4 +1052,11 @@
   if FCreateProgress = FCP_FINISH then NotifyOtherApps(NAE_CLOSE, '');
   TerminateOtherAppNotification;
+
+  if GraphFloat <> nil then
+  begin
+    if frmFrame.GraphFloatActive then
+      GraphFloat.Close;
+    GraphFloat.Release;
+  end;
 
   // unhook the timeout hooks
@@ -976,5 +1065,5 @@
   if FCreateProgress = FCP_FINISH then Changes.Clear;
   // clear server side flag global tmp
-  ClearFlag;
+  if FCreateProgress = FCP_FINISH then ClearFlag;
   // save user preferences
   if FCreateProgress = FCP_FINISH then SaveUserPreferences;
@@ -1005,4 +1094,5 @@
   //Application.ProcessMessages;  // so everything finishes closing
   // if < FCP_FINISH we came here from inside FormCreate, so need to call terminate
+  //if GraphFloat <> nil then GraphFloat.Release;
   if FCreateProgress < FCP_FINISH then Application.Terminate;
 end;
@@ -1234,30 +1324,23 @@
       NotifyOtherApps(NAE_NEWPT, SSN + U + FloatToStr(DOB) + U + Name);
     SelectMsg := '';
-    if (not FRefreshing) then
-    begin
-      if not Assigned(AFlaggedList) then ShowFlags
-      else if (AFlaggedList.IndexOf(Patient.DFN) < 0) then ShowFlags;
-    end;
     if MeansTestRequired(Patient.DFN, AMsg) then SelectMsg := AMsg;
     if HasLegacyData(Patient.DFN, AMsg)     then SelectMsg := SelectMsg + CRLF + AMsg;
+
     HasActiveFlg(FlagList, HasFlag, Patient.DFN);
-    if FPrevPtID <> patient.DFN then
-    begin
-      if HasFlag then
-      begin
-        pnlFlag.Enabled := True;
-        lblFlag.Font.Color := clMaroon;
-        lblFlag.Enabled := True;
-        if not FReFreshing then
-          ShowFlags;
-      end else
-      begin
-        pnlFlag.Enabled := False;
-        lblFlag.Font.Color := clBtnFace;
-        lblFlag.Enabled := False;
-      end;
-      FPrevPtID := patient.DFN;
+    if HasFlag then
+    begin
+      pnlFlag.Enabled := True;
+      lblFlag.Font.Color := clMaroon;
+      lblFlag.Enabled := True;
+      if (not FReFreshing) and (TriggerPRFPopUp(Patient.DFN)) then
+        ShowFlags;
+    end else
+    begin
+      pnlFlag.Enabled := False;
+      lblFlag.Font.Color := clBtnFace;
+      lblFlag.Enabled := False;
     end;
-
+    FPrevPtID := patient.DFN;
+    frmCover.UpdateVAAButton; //VAA CQ7525  (moved here in v26.30 (RV))
     ProcessPatientChangeEventHook;
     if Length(SelectMsg) > 0 then ShowPatientSelectMessages(SelectMsg);
@@ -1270,4 +1353,5 @@
   NextIndex: Integer;
   Reason: string;
+  CCOWResponse: UserResponse;
 begin
   SaveDFN := Patient.DFN;
@@ -1293,5 +1377,5 @@
          HasActiveFlg(FlagList, HasFlag, NewDFN);
         end;
-        if (FCCOWInstalled and (ctxContextor.State = csSuspended)) or (AllowCCOWContextChange(Patient.DFN)) then
+        if (FCCOWInstalled and (ctxContextor.State = csSuspended)) or (AllowCCOWContextChange(CCOWResponse, Patient.DFN)) then
           begin
             if Patient.Inpatient then
@@ -1333,5 +1417,6 @@
     mnuFileNotifRemove.Enabled := Notifications.Followup in [NF_FLAGGED_ORDERS,
                                                              NF_ORDER_REQUIRES_ELEC_SIGNATURE,
-                                                             NF_MEDICATIONS_EXPIRING,
+                                                             NF_MEDICATIONS_EXPIRING_INPT,
+                                                             NF_MEDICATIONS_EXPIRING_OUTPT,
                                                              NF_UNVERIFIED_MEDICATION_ORDER,
                                                              NF_UNVERIFIED_ORDER,
@@ -1361,5 +1446,6 @@
         NextIndex := PageIDToTab(CT_REPORTS);
     NF_DNR_EXPIRING                  : NextIndex := PageIDToTab(CT_ORDERS);
-    NF_MEDICATIONS_EXPIRING          : NextIndex := PageIDToTab(CT_ORDERS);
+    NF_MEDICATIONS_EXPIRING_INPT     : NextIndex := PageIDToTab(CT_ORDERS);
+    NF_MEDICATIONS_EXPIRING_OUTPT    : NextIndex := PageIDToTab(CT_ORDERS);
     NF_UNVERIFIED_MEDICATION_ORDER   : NextIndex := PageIDToTab(CT_ORDERS);
     NF_NEW_ORDER                     : NextIndex := PageIDToTab(CT_ORDERS);
@@ -1431,7 +1517,9 @@
   SaveDFN, Reason: string;
   //NextTab: Integer;     // moved up for visibility - v23.4  rV
-  ok, OldRemindersStarted: boolean;
+  ok, OldRemindersStarted, PtSelCancelled: boolean;
   //i: smallint;
-begin
+  CCOWResponse: UserResponse;
+begin
+  PtSelCancelled := FALSE;
   DetermineNextTab;
 (*  if (FRefreshing or User.UseLastTab) and (not FFirstLoad) then
@@ -1471,5 +1559,9 @@
   end;
 
-  SaveDFN := Patient.DFN;
+  if FNoPatientSelected then
+    SaveDFN := ''
+  else
+    SaveDFN := Patient.DFN;
+    
   OldRemindersStarted := RemindersStarted;
   RemindersStarted := FALSE;
@@ -1502,5 +1594,6 @@
           end;
         if (Patient.DFN = '') or (Sender = mnuFileOpen) or (Sender = mnuFileNext) or (Sender = mnuViewDemo) then
-          SelectPatient(SHOW_NOTIFICATIONS, Font.Size);
+          SelectPatient(SHOW_NOTIFICATIONS, Font.Size, PtSelCancelled);
+        if PtSelCancelled then exit;
         ShowEverything;
         DisplayEncounterText;
@@ -1536,7 +1629,8 @@
       begin
         Notifications.Clear;
-        SelectPatient(False, Font.Size); // Call Pt. Sel. w/o notifications.
+        SelectPatient(False, Font.Size, PtSelCancelled); // Call Pt. Sel. w/o notifications.
+        if PtSelCancelled then exit;
         ShowEverything;
-        DisplayEncounterText;        
+        DisplayEncounterText;
         FPrevInPatient := Patient.Inpatient;
         ok := TRUE;
@@ -1547,5 +1641,5 @@
       if FCCOWInstalled and (ctxContextor.State = csParticipating) and (not FRefreshing) then
         begin
-          if (AllowCCOWContextChange(Patient.DFN)) then
+          if (AllowCCOWContextChange(CCOWResponse, Patient.DFN)) then
             begin
               SetupPatient;
@@ -1555,8 +1649,15 @@
           else
             begin
-              Patient.DFN := SaveDFN;
-              SetupPatient;
-              tabPage.TabIndex := PageIDToTab(NextTab);
-              tabPageChange(tabPage);
+              case CCOWResponse of
+                urCancel: UpdateCCOWContext;
+                urBreak:
+                  begin
+                    // do not revert to old DFN if context was manually broken by user - v26 (RV)
+                    if (ctxContextor.State = csParticipating) then Patient.DFN := SaveDFN;
+                    SetupPatient;
+                    tabPage.TabIndex := PageIDToTab(NextTab);
+                    tabPageChange(tabPage);
+                  end;
+              end;
             end;
         end
@@ -1576,5 +1677,5 @@
   if  BILLING_AWARE then frmFrame.SetBADxList; //end IsBillingAware
  {End BillingAware}
-
+ //frmCover.UpdateVAAButton; //VAA CQ7525   CQ#7933 - moved to SetupPatient, before event hook execution (RV)
 end;
 
@@ -1669,21 +1770,6 @@
 { View Menu Events ------------------------------------------------------------------------- }
 
-procedure TfrmFrame.mnuViewDemoClick(Sender: TObject);
-{ displays patient inquiry report (which optionally allows new patient to be selected) }
-var
-  SelectNew: Boolean;
-begin
-  StatusText(TX_PTINQ);
-  PatientInquiry(SelectNew);
-  if Assigned(FLastPage) then
-    FLastPage.FocusFirstControl;
-  StatusText('');
-  if SelectNew then mnuFileOpenClick(mnuViewDemo);
-end;
-
 procedure TfrmFrame.mnuViewPostingsClick(Sender: TObject);
-{ displays the window that shows crisis notes, warnings, allergies, & advance directives }
-begin
-  ShowCWAD;
+begin
 end;
 
@@ -1933,4 +2019,5 @@
 { emulate a button press in the patient identification panel }
 begin
+  if pnlPatient.BevelOuter = bvLowered then exit;
   pnlPatient.BevelOuter := bvLowered;
   with lblPtName do SetBounds(Left+2, Top+2, Width, Height);
@@ -1943,4 +2030,5 @@
 { emulate the button raising in the patient identification panel & call Patient Inquiry }
 begin
+  if pnlPatient.BevelOuter = bvRaised then exit;
   pnlPatient.BevelOuter := bvRaised;
   with lblPtName do SetBounds(Left-2, Top-2, Width, Height);
@@ -2034,4 +2122,5 @@
   SetUserBounds2(RemDlgSplitters, RemDlgSpltr1, RemDlgSpltr2, Dummy ,Dummy);
   SetUserBounds2(DrawerSplitters,s1, s2, s3, Dummy);
+  if Assigned(frmSurgery) then frmSurgery.Drawers.LastOpenSize := Dummy; //CQ7315
   frmNotes.Drawers.LastOpenSize := s1;
   frmConsults.Drawers.LastOpenSize := s2;
@@ -2045,7 +2134,9 @@
      frmMeds.pnlBottom.Height := panelBottom;
      frmMeds.pnlMedIn.Height := panelMedIn;
+     //Meds Tab Non-VA meds columns
+     SetUserColumns(TControl(hdrMedsNonVA)); //CQ7314
      end;
 
-  frmCover.DisableAlign;
+     frmCover.DisableAlign;
   try
     SetUserBounds2(CoverSplitters1, s1, s2, s3, s4);
@@ -2076,4 +2167,5 @@
 var
   SizeList: TStringList;
+  SurgTempHt: integer;
 begin
   SaveUserFontSize(MainFontSize);
@@ -2098,7 +2190,12 @@
       Add(StrUserBounds2(RemDlgName, RemDlgLeft, RemDlgTop, RemDlgWidth, RemDlgHeight));
       Add(StrUserBounds2(RemDlgSplitters, RemDlgSpltr1, RemDlgSpltr2, 0 ,0));
+
+      //v26.47 - RV - access violation if Surgery Tab not enabled.  Set to designer height as default.
+      if Assigned(frmSurgery) then SurgTempHt := frmSurgery.Drawers.pnlTemplates.Height else SurgTempHt := 85;
       Add(StrUserBounds2(DrawerSplitters, frmNotes.Drawers.LastOpenSize,
                                              frmConsults.Drawers.LastOpenSize,
-                                             frmDCSumm.Drawers.LastOpenSize,0));
+                                             frmDCSumm.Drawers.LastOpenSize,
+                                             SurgTempHt)); // last parameter = CQ7315
+
       Add(StrUserBounds2(CoverSplitters1,
         frmCover.pnl_1.Width,
@@ -2114,4 +2211,10 @@
       //Meds Tab Splitters
       Add(StrUserBounds2(frmMeds.Name+'Split',frmMeds.pnlBottom.Height,frmMeds.pnlMedIn.Height,0,0));
+
+      //Meds Tab Non-VA meds columns
+      Add(StrUserColumns(fMeds.frmMeds.hdrMedsNonVA)); //CQ7314
+
+      //Orders Tab columns
+      Add(StrUserColumns(fOrders.frmOrders.hdrOrders)); //CQ6328
 
       if EnduringPtSelSplitterPos <> 0 then
@@ -2185,4 +2288,6 @@
       with lstCIRNLocations do Font.Size := NewFontSize;
       with tabPage       do Font.Size := NewFontSize;
+      with laMHV         do Font.Size := NewFontSize; //VAA
+      with laVAA2        do Font.Size := NewFontSize; //VAA
 
       tabPage.Height := MainFontHeight + TAB_VOFFSET;   // resize tab selector
@@ -2192,4 +2297,17 @@
       stsArea.Panels[0].Width := ResizeWidth( OldFont, Font, stsArea.Panels[0].Width);
       stsArea.Panels[2].Width := ResizeWidth( OldFont, Font, stsArea.Panels[2].Width);
+
+      //VAA CQ8271
+      if ((fCover.PtIsVAA and fCover.PtIsMHV)) then
+        begin
+         laMHV.Height := (pnlToolBar.Height div 2) -1;
+         with laVAA2 do
+           begin
+           Top := laMHV.Top + laMHV.Height;
+           Height := (pnlToolBar.Height div 2) -1;
+           end;
+         end;
+      //end VAA
+
       RefreshFixedStatusWidth;
       FormResize( self );
@@ -2206,4 +2324,13 @@
     lblPtCWAD.Font.Color := clWindowText;
     lblFlag.Font.Color   := clWindowText;
+  end;
+
+  case (NewFontSize) of
+   8: mnu8pt.Checked := true;
+  10: mnu10pt1.Checked := true;
+  12: mnu12pt1.Checked := true;
+  14: mnu14pt1.Checked := true;
+  18: mnu18pt1.Checked := true;
+  24: mnu24pt1.Checked := true;
   end;
 
@@ -2223,4 +2350,5 @@
   if Assigned(frmRemDlg) then frmRemDlg.SetFontSize;
   if Assigned(frmReminderTree) then frmReminderTree.SetFontSize(NewFontSize);
+  if GraphFloat <> nil then ResizeAnchoredFormToFont(GraphFloat);
 end;
 
@@ -2231,6 +2359,7 @@
   VISIT_WIDTH   = 36;
   POSTING_WIDTH = 11.5;
-  FLAG_WIDTH    =5;
+  FLAG_WIDTH    = 5;
   CIRN_WIDTH    = 7;
+  MHV_WIDTH     = 6;
   LINES_HIGH    = 2;
   M_HORIZ       = 4;
@@ -2239,6 +2368,6 @@
   M_WVERT       = 6;
   TINY_MARGIN   = 2;
-var
-  WidthNeeded: integer;
+//var
+  //WidthNeeded: integer;
 begin
   pnlToolbar.Height  := (LINES_HIGH * lblPtName.Height) + M_HORIZ + M_MIDDLE + M_HORIZ;
@@ -2257,5 +2386,6 @@
   pnlFlag.Width      := Round(FLAG_WIDTH * MainFontWidth);
   pnlFlag.Width      := Round(FLAG_WIDTH * MainFontWidth);
-  pnlCIRN.Width  := Round(CIRN_WIDTH * MainFontWidth) + M_WVERT;
+  pnlCIRN.Width      := Round(CIRN_WIDTH * MainFontWidth) + M_WVERT;
+  paVAA.Width        := Round(MHV_WIDTH * MainFontWidth) + M_WVERT;
   with lblPtPostings do
     SetBounds(M_WVERT, M_HORIZ, pnlPostings.Width-M_WVERT-M_WVERT, lblPtName.Height);
@@ -2274,5 +2404,5 @@
   end;
   //If that is not enough, add scroll bars to form
-  if pnlPrimaryCare.Width < HigherOf( lblPtCare.Left + lblPtCare.Width, lblPtAttending.Left + lblPtAttending.Width) + TINY_MARGIN then
+  {if pnlPrimaryCare.Width < HigherOf( lblPtCare.Left + lblPtCare.Width, lblPtAttending.Left + lblPtAttending.Width) + TINY_MARGIN then
   begin
     WidthNeeded := HigherOf( lblPtCare.Left + lblPtCare.Width, lblPtAttending.Left + lblPtAttending.Width) + TINY_MARGIN - pnlPrimaryCare.Width;
@@ -2280,9 +2410,20 @@
     Width := Width + WidthNeeded;
   end
-  else
+  else }   // commented out - BA
     HorzScrollBar.Range := 0;
 end;
 
 { Temporary Calls -------------------------------------------------------------------------- }
+
+procedure TfrmFrame.ToggleMenuItemChecked(Sender: TObject);
+begin
+  with (Sender as TMenuItem) do
+     begin
+     if not Checked then
+        Checked := true
+     else
+        Checked := false;
+     end;
+end;
 
 procedure TfrmFrame.mnuFontSizeClick(Sender: TObject);
@@ -2290,8 +2431,16 @@
   if (frmRemDlg <> nil) then
     ShowMessage('Please close the reminder dialog before changing font sizes.')
-  else if (dlgProbs <> nil) then
+  else
+     if (dlgProbs <> nil) then
     ShowMessage('Font size cannot be changed while adding or editing a problem.')
   else
-    with Sender as TMenuItem do ChangeFont(Tag);
+     begin
+     with (Sender as TMenuItem) do
+        begin
+        ToggleMenuItemChecked(Sender);
+        fMeds.oldFont := MainFontSize; //CQ9182
+        ChangeFont(Tag);
+        end;
+     end;
 end;
 
@@ -2413,9 +2562,22 @@
     inherited;
   end;
-end;
-
-procedure TfrmFrame.mnuViewRemindersClick(Sender: TObject);
-begin
-  ViewReminderTree;
+  if Message.WParam = SC_MAXIMIZE then
+  begin
+    // form becomes maximized;
+    frmOrders.mnuOptimizeFieldsClick(self);
+    frmProblems.mnuOptimizeFieldsClick(self);
+    frmMeds.mnuOptimizeFieldsClick(self);
+  end
+  else if Message.WParam = SC_MINIMIZE then
+  begin
+    // form becomes maximized;
+  end
+  else if Message.WParam = SC_RESTORE then
+  begin
+    // form is restored (from maximized);
+    frmOrders.mnuOptimizeFieldsClick(self);
+    frmProblems.mnuOptimizeFieldsClick(self);
+    frmMeds.mnuOptimizeFieldsClick(self);
+  end;
 end;
 
@@ -2423,5 +2585,4 @@
 var
   ImgName: string;
-
 begin
   pnlReminders.tag := HAVE_REMINDERS;
@@ -2497,5 +2658,5 @@
   pnlReminders.BevelOuter := bvRaised;
   if(pnlReminders.tag = HAVE_REMINDERS) then
-    mnuViewRemindersClick(Self);
+    ViewInfo(mnuViewReminders);
 end;
 
@@ -2505,13 +2666,27 @@
 var
   i: integer;
+  aAutoQuery: string;
   ASite: TRemoteSite;
 begin
   with RemoteSites do
+  if UseVistaWeb then
     begin
       ChangePatient(Patient.DFN);
+      lblCIRN.Caption := 'Remote';      //VistaWeb On
+      lblCIRNData.Caption := 'Data*';
+      pnlCIRN.Caption := 'Remote Data';
+      lblCIRN.Width := 43;
+      lblCIRNData.Width := 43;
+      lblCIRNData.Alignment := taCenter;
+      lblCIRN.Alignment := taCenter;
+      lblCIRN.Enabled     := True;
+      lblCIRNData.Enabled := True;
+      lblCIRNAvail.Enabled := True;
+      pnlCIRN.TabStop     := True;
       if RemoteDataExists and (RemoteSites.Count > 0) then
         begin
           lblCIRN.Enabled     := True;
           lblCIRNData.Enabled := True;
+          lblCIRNAvail.Enabled := True;
           pnlCIRN.TabStop     := True;
           if ColorToRGB(clWindowText) = ColorToRGB(clBlack) then
@@ -2519,5 +2694,10 @@
               lblCIRN.Font.Color  := clBlue;
               lblCIRNData.Font.Color  := clBlue;
+              lblCIRNAvail.Font.Color := clBlue;
               lstCIRNLocations.Font.Color  := clBlue;
+              lblCIRN.Caption := 'Remote';
+              lblCIRNData.Caption := 'Data*';
+              lblCIRNAvail.Caption := 'Available';
+              pnlCIRN.Caption := 'Remote Data Available';
             end
           else
@@ -2525,7 +2705,59 @@
               lblCIRN.Font.Color  := clWindowText;
               lblCIRNData.Font.Color  := clWindowText;
+              lblCIRNAvail.Font.Color := clWindowText;
               lstCIRNLocations.Font.Color  := clWindowText;
             end;
+        end
+      else
+        begin
+          lblCIRN.Font.Color  := clWindowText;
+          lblCIRNData.Font.Color  := clWindowText;
+          lblCIRNAvail.Font.Color := clWindowText;
+          lblCIRN.Enabled     := False;
+          lblCIRNData.Enabled := False;
+          lblCIRNAvail.Enabled := False;
+          pnlCIRN.TabStop     := False;
+          pnlCIRN.Hint := NoDataReason;
+        end;
+      pnlCIRN.Hint := 'Click to open VistaWeb';
+    end
+  else
+    begin
+      ChangePatient(Patient.DFN);
+      lblCIRN.Caption := ' Remote';
+      lblCIRNData.Caption := 'Data';
+      pnlCIRN.Caption := 'Remote Data';
+      lblCIRNAvail.Caption := '';
+      lblCIRN.Width := 43;
+      lblCIRNData.Width := 43;
+      lblCIRNData.Alignment := taCenter;
+      lblCIRN.Alignment := taCenter;
+      if RemoteDataExists and (RemoteSites.Count > 0) then
+        begin
+          lblCIRN.Enabled     := True;
+          lblCIRNData.Enabled := True;
+          lblCIRNAvail.Enabled := True;
+          pnlCIRN.TabStop     := True;
+          if ColorToRGB(clWindowText) = ColorToRGB(clBlack) then
+            begin
+              lblCIRN.Font.Color  := clBlue;
+              lblCIRNData.Font.Color  := clBlue;
+              lblCIRNAvail.Font.Color := clBlue;
+              lstCIRNLocations.Font.Color  := clBlue;
+              lblCIRN.Caption := 'Remote';
+              lblCIRNData.Caption := 'Data';
+              lblCIRNAvail.Caption := 'Available';
+              pnlCIRN.Caption := 'Remote Data Available';
+            end
+          else
+            begin
+              lblCIRN.Font.Color  := clWindowText;
+              lblCIRNData.Font.Color  := clWindowText;
+              lblCIRNAvail.Font.Color := clWindowText;
+              lstCIRNLocations.Font.Color  := clWindowText;
+              lblCIRNAvail.Color := clWindowText;
+            end;
           pnlCIRN.Hint := 'Click to display other facilities having data for this patient.';
+          lstCIRNLocations.Items.Add('-1' + U + 'Use VistaWeb from now on');
           if RemoteSites.Count > 0 then
             lstCIRNLocations.Items.Add('0' + U + 'All Available Sites');
@@ -2541,14 +2773,39 @@
           lblCIRN.Font.Color  := clWindowText;
           lblCIRNData.Font.Color  := clWindowText;
+          lblCIRNAvail.Font.Color := clWindowText;
           lblCIRN.Enabled     := False;
           lblCIRNData.Enabled := False;
+          lblCIRNAvail.Enabled := False;
           pnlCIRN.TabStop     := False;
           pnlCIRN.Hint := NoDataReason;
         end;
+    aAutoQuery := AutoRDV;        //Check to see if Remote Queries should be used for all available sites
+    if (aAutoQuery = '1') and (lstCIRNLocations.Count > 0) then
+      begin
+        lstCIRNLocations.ItemIndex := 1;
+        lstCIRNLocations.Checked[1] := true;
+        lstCIRNLocationsClick(self);
+      end;
+  end;
+end;
+
+procedure TfrmFrame.pnlCIRNClick(Sender: TObject);
+//var
+//  aAddress: string;
+begin
+  {if UseVistaWeb then
+    begin
+      pnlCIRN.BevelOuter := bvRaised;
+      pnlCIRN.Hint := 'Click to open VistaWeb';
+      lblCIRN.Width := 43;
+      lblCIRNData.Width := 43;
+      lblCIRNData.Alignment := taCenter;
+      lblCIRN.Alignment := taCenter;
+      lstCIRNLocations.Visible := false;
+      lstCIRNLocations.SendToBack;
+      aAddress := GetVistaWebAddress(Patient.DFN);
+      ShellExecute(Handle, 'open', PChar(aAddress), PChar(''), '', SW_NORMAL);
+      Exit;
     end;
-end;
-
-procedure TfrmFrame.pnlCIRNClick(Sender: TObject);
-begin
   if not RemoteSites.RemoteDataExists then Exit;
   if (not lstCIRNLocations.Visible) then
@@ -2566,5 +2823,6 @@
       lstCIRNLocations.SendToBack;
       pnlCIRN.Hint := 'Click to display other facilities having data for this patient.';
-    end
+    end }
+  ViewInfo(mnuViewRemoteData);
 end;
 
@@ -2581,16 +2839,73 @@
   AccessStatus: integer;
 begin
-  iAll := 0;
+  iAll := 1;
   AccessStatus := 0;
+  iIndex := lstCIRNLocations.ItemIndex;
+  if iIndex = 0 then
+    if (piece(lstCIRNLocations.Items[0],'^',1) = '-1') and (lstCIRNLocations.Checked[iIndex] = true) then
+      begin
+        if MessageDlg('Are you sure you want to make VistaWeb your default for viewing Remote Data?',
+          mtConfirmation, [mbYes, mbNo], 0) = mrYes then
+          begin
+            ChangeVistaWebParam('1');
+            lblCIRN.Caption := 'Remote';          //VistaWeb On
+            lblCIRNData.Caption := 'Data*';
+            pnlCIRN.Caption := 'Remote Data';
+            lblCIRNAvail.Caption := '';
+            lblCIRN.Width := 43;
+            lblCIRNData.Width := 43;
+            lblCIRNData.Alignment := taCenter;
+            lblCIRN.Alignment := taCenter;
+            with RemoteSites do if RemoteDataExists and (RemoteSites.Count > 0) then
+              begin
+                lblCIRN.Enabled     := True;
+                lblCIRNData.Enabled := True;
+                pnlCIRN.TabStop     := True;
+                if ColorToRGB(clWindowText) = ColorToRGB(clBlack) then
+                  begin
+                    lblCIRN.Font.Color  := clBlue;
+                    lblCIRNData.Font.Color  := clBlue;
+                    lstCIRNLocations.Font.Color  := clBlue;
+                    lblCIRN.Caption := 'Remote';
+                    lblCIRNData.Caption := 'Data*';
+                    lblCIRNAvail.Caption := 'Available';
+                    pnlCIRN.Caption := 'Remote Data Available';
+                  end
+                else
+                  begin
+                    lblCIRN.Font.Color  := clWindowText;
+                    lblCIRNData.Font.Color  := clWindowText;
+                    lstCIRNLocations.Font.Color  := clWindowText;
+                    lblCIRNAvail.Font.Color := clWindowText;
+                  end;
+              end;
+            pnlCIRNClick(self);
+            Exit;
+          end
+        else
+          lstCIRNLocations.Checked[iIndex] := false;
+      end
+    else
+      begin
+        ChangeVistaWebParam('0');
+        lblCIRN.Caption := 'Remote';
+        lblCIRNData.Caption := 'Data';
+        pnlCIRN.Caption := 'Remote Data';
+        lblCIRN.Width := 43;
+        lblCIRNData.Width := 43;
+        lblCIRNData.Alignment := taCenter;
+        lblCIRN.Alignment := taCenter;
+        pnlCIRNClick(self);
+        Exit;
+      end;
   if not CheckHL7TCPLink then
     begin
       InfoBox('Local HL7 TCP Link is down.' + CRLF + 'Unable to retrieve remote data.', TC_DGSR_ERR, MB_OK);
-      lstCIRNLocations.Checked[lstCIRNLocations.ItemIndex] := false;
+      lstCIRNLocations.Checked[iIndex] := false;
       Exit;
     end;
-  if lstCIRNLocations.Items.Count > 0 then
-    if piece(lstCIRNLocations.Items[0],'^',1) = '0' then
-      iAll := 1;
-  iIndex := lstCIRNLocations.ItemIndex;
+  if lstCIRNLocations.Items.Count > 1 then
+    if piece(lstCIRNLocations.Items[1],'^',1) = '0' then
+      iAll := 2;
   with frmReports do
     if piece(uRemoteType,'^',2) = 'V' then
@@ -2612,7 +2927,7 @@
         with RemoteSites.SiteList do
         for j := 0 to Count - 1 do
-          if lstCIRNLocations.Checked[j+1] = true then
+          if lstCIRNLocations.Checked[j+2] = true then
             begin
-              lstCIRNLocations.Checked[j+1] := false;
+              lstCIRNLocations.Checked[j+2] := false;
               TRemoteSite(RemoteSites.SiteList[j]).Selected := false;
               TRemoteSite(RemoteSites.SiteList[j]).ReportClear;
@@ -2630,11 +2945,11 @@
               Screen.Cursor := crDefault;
               aMsg := aMsg + ' at site: ' + TRemoteSite(Items[j]).SiteName;
-              s := lstCIRNLocations.Items[j+1];
-              lstCIRNLocations.Items[j+1] := pieces(s, '^', 1, 3);
+              s := lstCIRNLocations.Items[j+2];
+              lstCIRNLocations.Items[j+2] := pieces(s, '^', 1, 3);
               case AccessStatus of
               DGSR_FAIL: begin
                            if piece(aMsg,':',1) = 'RPC name not found at site' then //Allow for backward compatibility
                              begin
-                               lstCIRNLocations.Checked[j+1] := true;
+                               lstCIRNLocations.Checked[j+2] := true;
                                TRemoteSite(RemoteSites.SiteList[j]).ReportClear;
                                TRemoteSite(RemoteSites.SiteList[j]).LabClear;
@@ -2644,6 +2959,6 @@
                              begin
                                InfoBox(aMsg, TC_DGSR_ERR, MB_OK);
-                               lstCIRNLocations.Checked[j+1] := false;
-                               lstCIRNLocations.Items[j+1] := pieces(s, '^', 1, 3) + '^' + TC_DGSR_ERR;
+                               lstCIRNLocations.Checked[j+2] := false;
+                               lstCIRNLocations.Items[j+2] := pieces(s, '^', 1, 3) + '^' + TC_DGSR_ERR;
                                TRemoteSite(Items[j]).Selected := false;
                                Continue;
@@ -2651,5 +2966,5 @@
                          end;
               DGSR_NONE: begin
-                           lstCIRNLocations.Checked[j+1] := true;
+                           lstCIRNLocations.Checked[j+2] := true;
                            TRemoteSite(RemoteSites.SiteList[j]).ReportClear;
                            TRemoteSite(RemoteSites.SiteList[j]).LabClear;
@@ -2658,5 +2973,5 @@
               DGSR_SHOW: begin
                            InfoBox(AMsg, TC_DGSR_SHOW, MB_OK);
-                           lstCIRNLocations.Checked[j+1] := true;
+                           lstCIRNLocations.Checked[j+2] := true;
                            TRemoteSite(RemoteSites.SiteList[j]).ReportClear;
                            TRemoteSite(RemoteSites.SiteList[j]).LabClear;
@@ -2666,5 +2981,5 @@
                            MB_DEFBUTTON2) = IDYES then
                            begin
-                             lstCIRNLocations.Checked[j+1] := true;
+                             lstCIRNLocations.Checked[j+2] := true;
                              TRemoteSite(RemoteSites.SiteList[j]).ReportClear;
                              TRemoteSite(RemoteSites.SiteList[j]).LabClear;
@@ -2673,6 +2988,6 @@
                            else
                              begin
-                               lstCIRNLocations.Checked[j+1] := false;
-                               lstCIRNLocations.Items[j+1] := pieces(s, '^', 1, 3) + '^' + TC_DGSR_SHOW;
+                               lstCIRNLocations.Checked[j+2] := false;
+                               lstCIRNLocations.Items[j+2] := pieces(s, '^', 1, 3) + '^' + TC_DGSR_SHOW;
                                TRemoteSite(Items[j]).Selected := false;
                                Continue;
@@ -2680,6 +2995,6 @@
               else       begin
                            InfoBox(AMsg, TC_DGSR_DENY, MB_OK);
-                           lstCIRNLocations.Checked[j+1] := false;
-                           lstCIRNLocations.Items[j+1] := pieces(s, '^', 1, 3) + '^' + TC_DGSR_DENY;
+                           lstCIRNLocations.Checked[j+2] := false;
+                           lstCIRNLocations.Items[j+2] := pieces(s, '^', 1, 3) + '^' + TC_DGSR_DENY;
                            TRemoteSite(Items[j]).Selected := false;
                            Continue;
@@ -2690,5 +3005,5 @@
   else
     begin
-      if iIndex > -1 then
+      if iIndex > 0 then
         begin
           iCur := iIndex - iAll;
@@ -2779,6 +3094,8 @@
             TRemoteSite(Items[j]));
         end;
-  frmLabs.TabControl1.OnChange(nil);
-  frmReports.TabControl1.OnChange(nil);
+  //frmLabs.TabControl1.OnChange(nil);
+  //frmReports.TabControl1.OnChange(nil);
+  if frmReports.tvReports.SelectionCount > 0 then frmReports.tvReportsClick(self);
+  if frmLabs.lstReports.ItemIndex > -1 then frmLabs.ExtlstReportsClick(self, true);
   StatusText('');
 end;
@@ -2817,7 +3134,7 @@
 procedure TfrmFrame.lstCIRNLocationsChange(Sender: TObject);
 begin
-  if lstCIRNLocations.ItemIndex > -1 then
+  if lstCIRNLocations.ItemIndex > 0 then
     if (lstCIRNLocations.Selected[lstCIRNLocations.ItemIndex] = true) and (uUpdateStat = false) then
-      if not (piece(lstCIRNLocations.Items[0],'^',1) = '0') then
+      if not (piece(lstCIRNLocations.Items[1],'^',1) = '0') then
         lstCIRNLocations.OnClick(nil);
 end;
@@ -2852,5 +3169,6 @@
   if not Notifications.Active then Exit;
   case Notifications.Followup of
-    NF_MEDICATIONS_EXPIRING         : AlertType := 'Expiring Medications';
+    NF_MEDICATIONS_EXPIRING_INPT    : AlertType := 'Expiring Medications';
+    NF_MEDICATIONS_EXPIRING_OUTPT   : AlertType := 'Expiring Medications';
     NF_ORDER_REQUIRES_ELEC_SIGNATURE: AlertType := 'Unsigned Orders';
     NF_FLAGGED_ORDERS               : AlertType := 'Flagged Orders (for clarification)';
@@ -2935,5 +3253,9 @@
      FOSTFhintWindow.ReleaseHandle;
      FOSTFHintWndActive := False ;
-
+  end;
+  if FHintWinActive then   // graphing - hints on values
+  begin
+    FHintWin.ReleaseHandle;
+    FHintWinActive := false;
   end;
 end;
@@ -3080,4 +3402,6 @@
   Patient.Clear;
   Patient.DFN := tmpDFN;
+  uCore.TempEncounterLoc := 0;  //hds7591  Clinic/Ward movement.
+  uCore.TempEncounterLocName := ''; //hds7591  Clinic/Ward movement.
 
   if (FPrevInPatient and Patient.Inpatient) then                //transfering inside hospital
@@ -3092,4 +3416,6 @@
   begin
     Encounter.Inpatient := True;
+    uCore.TempEncounterLoc := Encounter.Location;  //hds7591  Clinic/Ward movement.
+    uCore.TempEncounterLocName := Encounter.LocationName; //hds7591  Clinic/Ward movement.
     Encounter.Location := Patient.Location;
     Encounter.DateTime := Patient.AdmitTime;
@@ -3101,6 +3427,5 @@
 end;
 
-procedure TfrmFrame.FormKeyDown(Sender: TObject; var Key: Word;
-  Shift: TShiftState);
+procedure TfrmFrame.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
 var
   NewTabIndex: integer;
@@ -3108,8 +3433,6 @@
   //CQ2844: Toggle Remote Data button using Alt+R
    case Key of
-     82,114:  begin
-              if (ssAlt in Shift) then
+     82,114:  if (ssAlt in Shift) then
                  frmFrame.pnlCIRNClick(Sender);
-              end;
      end;
 
@@ -3173,16 +3496,18 @@
 procedure TfrmFrame.pnlPatientClick(Sender: TObject);
 begin
-  mnuViewDemoClick(Self);
+  ViewInfo(mnuViewDemo);
 end;
 
 procedure TfrmFrame.pnlVisitClick(Sender: TObject);
 begin
-  if (not User.IsReportsOnly) then // Reports Only tab.
-    mnuFileEncounterClick(Self);
+ //if (not User.IsReportsOnly) then // Reports Only tab.
+ //  mnuFileEncounterClick(Self);
+  ViewInfo(mnuViewVisits);
 end;
 
 procedure TfrmFrame.pnlPrimaryCareClick(Sender: TObject);
 begin
-  ReportBox(DetailPrimaryCare(Patient.DFN), 'Primary Care', True);
+  //ReportBox(DetailPrimaryCare(Patient.DFN), 'Primary Care', True);
+  ViewInfo(mnuViewPrimaryCare);
 end;
 
@@ -3190,10 +3515,11 @@
 begin
   if(pnlReminders.tag = HAVE_REMINDERS) then
-    mnuViewRemindersClick(Self);
+      ViewInfo(mnuViewReminders);
+
 end;
 
 procedure TfrmFrame.pnlPostingsClick(Sender: TObject);
 begin
-  mnuViewPostingsClick(Self);
+  ViewInfo(mnuViewPostings);
 end;
 
@@ -3216,5 +3542,5 @@
 end;
 
-function TfrmFrame.AllowCCOWContextChange(NewDFN: string): boolean;
+function TfrmFrame.AllowCCOWContextChange(var CCOWResponse: UserResponse; NewDFN: string): boolean;
 var
   PtData : IContextItemCollection;
@@ -3248,4 +3574,8 @@
           IsProdAcct := User.IsProductionAccount;
 
+          {$IFDEF CCOWBROKER}
+          //IsProdAcct := RPCBrokerV.Login.IsProduction;  //not yet
+          {$ENDIF}
+
           PtDataItem2 := CoContextItem.Create();
           PtDataItem2.Set_Name('Patient.co.PatientName');                // Patient.Name
@@ -3293,4 +3623,5 @@
       end;
 
+    CCOWResponse := response;
     if (response = UrCommit) then
     begin
@@ -3355,4 +3686,7 @@
   Reason, HyperLinkReason: string;
   PtChanged: boolean;
+{$IFDEF CCOWBROKER}
+  UserChanged: boolean;
+{$ENDIF}
 begin
   // If the app would lose data, or have other problems changing context at
@@ -3370,4 +3704,7 @@
   try
     CheckForDifferentPatient(aContextItemCollection, PtChanged);
+{$IFDEF CCOWBROKER}
+    CheckForDifferentUser(aContextItemCollection, UserChanged);
+{$ENDIF}
   except
     on E: Exception do HandleCCOWError(E.Message);
@@ -3379,5 +3716,9 @@
   end;
 
+{$IFDEF CCOWBROKER}
+  if PtChanged or UserChanged then
+{$ELSE}
   if PtChanged then
+{$ENDIF}
     begin
       FCCOWContextChanging := True;
@@ -3404,5 +3745,16 @@
   FCCOWError := False;
   try
-  CheckForDifferentPatient(ctxContextor.CurrentContext, PtChanged);
+  {$IFDEF CCOWBROKER}
+    with RPCBrokerV do if (WasUserDefined and IsUserCleared and (ctxContextor.CurrentContext.Present(CCOW_USER_NAME) = nil)) then    // RV 05/11/04
+    begin
+      Reason := 'COMMIT';
+      if AllowContextChangeAll(Reason) then
+      begin
+        Close;
+        Exit;
+      end;
+    end;
+  {$ENDIF}
+    CheckForDifferentPatient(ctxContextor.CurrentContext, PtChanged);
   except
     on E: Exception do HandleCCOWError(E.Message);
@@ -3457,4 +3809,7 @@
   end;
   IsProdAcct := User.IsProductionAccount;
+  {$IFDEF CCOWBROKER}
+  //IsProdAcct := RPCBrokerV.Login.IsProduction;  //not yet
+  {$ENDIF}
   // Get an item collection of the current context
   FCCOWError := False;
@@ -3495,5 +3850,5 @@
   //PtDFN := FindBestCCOWDFN(PtName);
   PtDFN := FindBestCCOWDFN;
-  if PtDFN <> '' then
+  if StrToInt64Def(PtDFN, 0) > 0 then
     begin
       // Select new patient based on context value
@@ -3517,5 +3872,6 @@
       end;
       if User.IsProvider then Encounter.Provider := User.DUZ;
-      SetupPatient;
+      if not FFirstLoad then SetupPatient;
+      frmCover.UpdateVAAButton; //VAA
       DetermineNextTab;
       tabPage.TabIndex := PageIDToTab(NextTab);
@@ -3571,5 +3927,10 @@
 
 procedure TfrmFrame.mnuFileResumeContextSetClick(Sender: TObject);
-begin
+var
+  CCOWResponse: UserResponse;
+  Reason: string;
+begin
+  Reason := '';
+  if not AllowContextChangeAll(Reason) then exit;
   FCCOWIconName := 'BMP_CCOW_CHANGING';
   pnlCCOW.Hint := TX_CCOW_CHANGING;
@@ -3582,5 +3943,5 @@
   end;
   if FCCOWError then exit;
-  if (AllowCCOWContextChange(Patient.DFN)) then
+  if (AllowCCOWContextChange(CCOWResponse, Patient.DFN)) then
     begin
       mnuFileResumeContext.Enabled := False;
@@ -3598,4 +3959,9 @@
       pnlCCOW.Hint := TX_CCOW_BROKEN;
       imgCCOW.Picture.BitMap.LoadFromResourceName(hInstance, FCCOWIconName);
+      try
+        if ctxContextor.State in [csParticipating] then ctxContextor.Suspend;
+      except
+        on E: Exception do HandleCCOWError(E.Message);
+      end;
    end;
   SetupPatient;
@@ -3607,5 +3973,5 @@
 var
   data : IContextItemCollection;
-  anItem : IContextItem;
+  anItem: IContextItem;
   PtDFN, PtName: string;
 begin
@@ -3623,4 +3989,19 @@
   PtChanged := not ((PtDFN = Patient.DFN) and (PtName = Piece(Patient.Name, ',', 1) + U + Piece(Patient.Name, ',', 2) + '^^^^'));
 end;
+
+{$IFDEF CCOWBROKER}
+procedure TfrmFrame.CheckForDifferentUser(aContextItemCollection: IDispatch; var UserChanged: boolean);
+var
+  data : IContextItemCollection;
+begin
+  if uCore.User = nil then
+  begin
+    UserChanged := False;
+    Exit;
+  end;
+  data := IContextItemCollection(aContextItemCollection) ;
+  UserChanged := RPCBrokerV.IsUserContextPending(data);
+end;
+{$ENDIF}
 
 procedure TfrmFrame.CheckHyperlinkResponse(aContextItemCollection: IDispatch; var HyperlinkReason: string);
@@ -3651,4 +4032,5 @@
 procedure TfrmFrame.HideEverything;
 begin
+  FNoPatientSelected := TRUE;
   pnlNoPatientSelected.Visible := True;
   pnlNoPatientSelected.BringToFront;
@@ -3671,4 +4053,5 @@
 procedure TfrmFrame.ShowEverything;
 begin
+  FNoPatientSelected := FALSE;
   pnlNoPatientSelected.Visible := False;
   pnlNoPatientSelected.SendToBack;
@@ -3711,5 +4094,6 @@
 procedure TfrmFrame.pnlFlagClick(Sender: TObject);
 begin
-  ShowFlags;
+  //ShowFlags;
+  ViewInfo(mnuViewFlags);
 end;
 
@@ -3812,20 +4196,224 @@
 
 procedure TfrmFrame.ScreenActiveFormChange(Sender: TObject);
+begin
+  if(assigned(FOldActiveFormChange)) then
+    FOldActiveFormChange(Sender);
+  //Focus the Form that Stays on Top after the Application Regains focus.
+  if FJustEnteredApp then
+    FocusApplicationTopForm;
+  FJustEnteredApp := false;
+end;
+
+procedure TfrmFrame.FocusApplicationTopForm;
 var
   I : integer;
 begin
-  //Locate the Form that Stays on Top after the Application Regains focus.
-  if FJustEnteredApp then
-  begin
-    for I := (Screen.FormCount-1) downto 0 do //Set the last one opened last
-    begin
-      with Screen.Forms[I] do
-        if (FormStyle = fsStayOnTop) and (Enabled) and (Visible) then
-          SetFocus;
+  for I := (Screen.FormCount-1) downto 0 do //Set the last one opened last
+  begin
+    with Screen.Forms[I] do
+      if (FormStyle = fsStayOnTop) and (Enabled) and (Visible) then
+        SetFocus;
+  end;
+end;
+
+procedure TfrmFrame.AppEventsShortCut(var Msg: TWMKey;
+  var Handled: Boolean);
+begin
+  if ((Boolean(Hi(GetKeyState(VK_MENU{ALT})))) and (Msg.CharCode = VK_F1)) then
+  begin
+    FocusApplicationTopForm;
+    Handled := True;
+  end;
+end;
+
+procedure TfrmFrame.mnuToolsGraphingClick(Sender: TObject);
+begin
+  Screen.Cursor := crHourGlass;
+  if GraphFloat = nil then              // new graph
+  begin
+    GraphFloat := TfrmGraphs.Create(self);
+    try
+      with GraphFloat do
+      begin
+        if btnClose.Tag = 1 then
+          Exit;
+        Initialize;
+        Caption := 'CPRS Graphing - Patient: ' + MixedCase(Patient.Name);
+        BorderIcons := [biSystemMenu, biMaximize, biMinimize];
+        BorderStyle := bsSizeable;
+        BorderWidth := 1;
+        // context sensitive       type (tabPage.TabIndex)  & [item]
+        ResizeAnchoredFormToFont(GraphFloat);
+        Show;
+      end;
+    finally
+      if GraphFloat.btnClose.Tag = 1 then
+      begin
+        GraphFloatActive := false;
+        GraphFloat.Free;
+        GraphFloat := nil;
+      end
+      else
+        GraphFloatActive := true;
     end;
-    FJustEnteredApp := false;
-  end;
-end;
-
+  end
+  else if GraphFloat.btnClose.Tag = 1 then
+    Exit
+  else if GraphFloatActive and (GraphFloat.lstTypes.Hint = Patient.DFN) then
+    GraphFloat.BringToFront             // graph is active, same patient
+  else if GraphFloat.lstTypes.Hint = Patient.DFN then
+  begin                                 // graph is not active, same patient
+    // context sensitive
+    GraphFloat.Show;
+    GraphFloatActive := true;
+  end
+  else
+  //with GraphFloat do                    // new patient
+  begin
+    GraphFloat.InitialRetain;
+    GraphFloatActive := false;
+    GraphFloat.Free;
+    GraphFloat := nil;
+    mnuToolsGraphingClick(self);          // delete and recurse
+    {//FormCreate(self);   //****************
+    Initialize;
+    DisplayData('top');
+    DisplayData('bottom');
+    lstCheck.Items.Clear;
+    Caption := 'CPRS Graphing - Patient: ' + MixedCase(Patient.Name);
+    // context sensitive
+    Show;
+    GraphFloatActive := true;}
+  end;
+  Screen.Cursor := crDefault;
+end;
+
+procedure TfrmFrame.pnlCIRNMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+begin
+  pnlCIRN.BevelOuter := bvLowered;
+end;
+
+procedure TfrmFrame.pnlCIRNMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+begin
+  pnlCIRN.BevelOuter := bvRaised;
+end;
+
+procedure TfrmFrame.laMHVClick(Sender: TObject);
+begin
+  //if laMHV.Caption = 'MHV' then
+  //  ShellExecute(Handle, 'open', PChar('http://www.myhealth.va.gov/'), '', '', SW_NORMAL);
+  ViewInfo(mnuViewMyHealtheVet);
+end;
+
+procedure TfrmFrame.laVAA2Click(Sender: TObject);
+{var
+  InsuranceSubscriberName: string;
+  ReportString: TStringList; //CQ7782 }
+begin
+  {if fCover.VAAFlag[0] <> '0' then //'0' means subscriber not found
+     begin
+     InsuranceSubscriberName := fCover.VAAFlag[12];
+     //CQ7782
+     //ReportString := TStringList.Create;
+     ReportString := VAAFlag;
+     ReportString[0] := '';
+     ReportBox(ReportString, InsuranceSubscriberName, True);
+     //end CQ7782
+     end;}
+  ViewInfo(mnuInsurance);
+end;
+
+procedure TfrmFrame.ViewInfo(Sender: TObject);
+var
+  SelectNew: Boolean;
+  InsuranceSubscriberName: string;
+  ReportString: TStringList;
+  aAddress: string;
+begin
+  case (Sender as TMenuItem).Tag of
+    1:begin { displays patient inquiry report (which optionally allows new patient to be selected) }
+        StatusText(TX_PTINQ);
+        PatientInquiry(SelectNew);
+        if Assigned(FLastPage) then
+          FLastPage.FocusFirstControl;
+        StatusText('');
+        if SelectNew then mnuFileOpenClick(mnuViewDemo);
+      end;
+    2:begin
+        if (not User.IsReportsOnly) then // Reports Only tab.
+          mnuFileEncounterClick(Self);
+      end;
+    3:begin
+        ReportBox(DetailPrimaryCare(Patient.DFN), 'Primary Care', True);
+      end;
+    4:begin
+        if laMHV.Caption = 'MHV' then
+          ShellExecute(laMHV.Handle, 'open', PChar('http://www.myhealth.va.gov/'), '', '', SW_NORMAL);
+      end;
+    5:begin
+        if fCover.VAAFlag[0] <> '0' then //'0' means subscriber not found
+        begin
+          InsuranceSubscriberName := fCover.VAAFlag[12];
+          ReportString := VAAFlag;
+          ReportString[0] := '';
+          ReportBox(ReportString, InsuranceSubscriberName, True);
+        end;
+      end;
+    6:begin
+        ShowFlags;
+      end;
+    7:begin
+        if UseVistaWeb then
+          begin
+            pnlCIRN.BevelOuter := bvRaised;
+            pnlCIRN.Hint := 'Click to open VistaWeb';
+            lblCIRN.Width := 43;
+            lblCIRNData.Width := 43;
+            lblCIRNData.Alignment := taCenter;
+            lblCIRN.Alignment := taCenter;
+            lstCIRNLocations.Visible := false;
+            lstCIRNLocations.SendToBack;
+            aAddress := GetVistaWebAddress(Patient.DFN);
+            ShellExecute(pnlCirn.Handle, 'open', PChar(aAddress), PChar(''), '', SW_NORMAL);
+            Exit;
+          end;
+        if not RemoteSites.RemoteDataExists then Exit;
+        if (not lstCIRNLocations.Visible) then
+          begin
+            pnlCIRN.BevelOuter := bvLowered;
+            lstCIRNLocations.Visible := True;
+            lstCIRNLocations.BringToFront;
+            lstCIRNLocations.SetFocus;
+            pnlCIRN.Hint := 'Click to close list.';
+          end
+        else
+          begin
+            pnlCIRN.BevelOuter := bvRaised;
+            lstCIRNLocations.Visible := False;
+            lstCIRNLocations.SendToBack;
+            pnlCIRN.Hint := 'Click to display other facilities having data for this patient.';
+          end;
+      end;
+    8:begin
+        ViewReminderTree;
+      end;
+    9:begin { displays the window that shows crisis notes, warnings, allergies, & advance directives }
+        ShowCWAD;
+      end;
+  end;
+end;
+
+procedure TfrmFrame.mnuViewInformationClick(Sender: TObject);
+begin
+  mnuViewDemo.Enabled := frmFrame.pnlPatient.Enabled;
+  mnuViewVisits.Enabled := frmFrame.pnlVisit.Enabled;
+  mnuViewPrimaryCare.Enabled := frmFrame.pnlPrimaryCare.Enabled;
+  mnuViewMyHealtheVet.Enabled := not (Copy(frmFrame.laMHV.Hint, 1, 2) = 'No');
+  mnuInsurance.Enabled := not (Copy(frmFrame.laVAA2.Hint, 1, 2) = 'No');
+  mnuViewFlags.Enabled := frmFrame.lblFlag.Enabled;
+  mnuViewRemoteData.Enabled := frmFrame.lblCirn.Enabled;
+  mnuViewReminders.Enabled := frmFrame.pnlReminders.Enabled;
+  mnuViewPostings.Enabled := frmFrame.pnlPostings.Enabled;
+end;
 
 initialization
@@ -3833,4 +4421,6 @@
 finalization
 
+
 end.
 
+
Index: cprs/branches/foia-cprs/CPRS-Chart/fGraphProfiles.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fGraphProfiles.dfm	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/fGraphProfiles.dfm	(revision 460)
@@ -0,0 +1,429 @@
+object frmGraphProfiles: TfrmGraphProfiles
+  Left = 721
+  Top = 528
+  BorderIcons = [biSystemMenu, biHelp]
+  BorderStyle = bsDialog
+  Caption = 'Select Items and Define Views'
+  ClientHeight = 379
+  ClientWidth = 477
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  OldCreateOrder = False
+  Position = poMainFormCenter
+  OnClose = FormClose
+  OnCreate = FormCreate
+  OnShow = FormShow
+  PixelsPerInch = 96
+  TextHeight = 13
+  object lblSource: TLabel
+    Left = 8
+    Top = 29
+    Width = 37
+    Height = 13
+    Hint = 'These are the different types of data for graphing.'
+    Caption = 'Source:'
+    ParentShowHint = False
+    ShowHint = False
+  end
+  object lblSelection: TLabel
+    Left = 142
+    Top = 29
+    Width = 28
+    Height = 13
+    Hint = 'Make selections move them to the right.'
+    Caption = 'Items:'
+    ParentShowHint = False
+    ShowHint = False
+  end
+  object lblDisplay: TLabel
+    Left = 312
+    Top = 29
+    Width = 89
+    Height = 13
+    Hint = 
+      'These items can be saved as a View and/or displayed on the graph' +
+      '.'
+    Caption = 'Items for Graphing:'
+    ParentShowHint = False
+    ShowHint = False
+  end
+  object bvlBase: TBevel
+    Left = 8
+    Top = 339
+    Width = 457
+    Height = 2
+  end
+  object lblEditInfo: TLabel
+    Left = 132
+    Top = 278
+    Width = 202
+    Height = 13
+    Caption = 'Items for Graphing can be saved as Views.'
+  end
+  object lblSelectionInfo: TLabel
+    Left = 42
+    Top = 8
+    Width = 89
+    Height = 13
+    Caption = 'Select Items using:'
+    ParentShowHint = False
+    ShowHint = False
+  end
+  object lblSelectandDefine: TLabel
+    Left = 8
+    Top = 350
+    Width = 359
+    Height = 13
+    Caption = 
+      'Use Select/Define button or Right-click on graphs to select item' +
+      's for display.'
+    WordWrap = True
+  end
+  object lblEditInfo1: TLabel
+    Left = 132
+    Top = 294
+    Width = 187
+    Height = 13
+    Caption = 'Edit Views by saving to the same name.'
+  end
+  object btnClear: TButton
+    Left = 8
+    Top = 312
+    Width = 85
+    Height = 21
+    Caption = 'Clear Selections'
+    Enabled = False
+    ParentShowHint = False
+    ShowHint = False
+    TabOrder = 8
+    OnClick = btnClearClick
+  end
+  object btnSave: TButton
+    Left = 286
+    Top = 312
+    Width = 85
+    Height = 21
+    Caption = 'Save Personal...'
+    Enabled = False
+    ParentShowHint = False
+    ShowHint = False
+    TabOrder = 12
+    OnClick = btnSaveClick
+  end
+  object btnDelete: TButton
+    Left = 100
+    Top = 312
+    Width = 85
+    Height = 21
+    Caption = 'Delete...'
+    Enabled = False
+    ParentShowHint = False
+    ShowHint = False
+    TabOrder = 9
+    OnClick = btnDeleteClick
+  end
+  object btnRemoveOne: TButton
+    Left = 280
+    Top = 173
+    Width = 21
+    Height = 21
+    Caption = '<'
+    Enabled = False
+    ParentShowHint = False
+    ShowHint = False
+    TabOrder = 6
+    OnClick = btnRemoveOneClick
+  end
+  object btnRemoveAll: TButton
+    Left = 280
+    Top = 205
+    Width = 21
+    Height = 21
+    Caption = '<<'
+    Enabled = False
+    ParentShowHint = False
+    ShowHint = False
+    TabOrder = 7
+    OnClick = btnRemoveAllClick
+  end
+  object lstSource: TORListBox
+    Left = 8
+    Top = 44
+    Width = 120
+    Height = 225
+    ItemHeight = 13
+    ParentShowHint = False
+    ShowHint = False
+    TabOrder = 0
+    OnDblClick = lstSourceDblClick
+    ItemTipColor = clWindow
+    LongList = False
+    Pieces = '2'
+    OnChange = lstSourceChange
+  end
+  object lstItemsDisplayed: TORListBox
+    Left = 312
+    Top = 44
+    Width = 150
+    Height = 225
+    ItemHeight = 13
+    ParentShowHint = False
+    ShowHint = False
+    Sorted = True
+    TabOrder = 3
+    OnDblClick = lstItemsDisplayedDblClick
+    ItemTipColor = clWindow
+    LongList = False
+    Pieces = '3'
+    OnChange = lstItemsDisplayedChange
+  end
+  object pnlSource: TPanel
+    Left = 147
+    Top = 1
+    Width = 190
+    Height = 25
+    BevelOuter = bvNone
+    TabOrder = 11
+    object radSourcePat: TRadioButton
+      Left = 87
+      Top = 6
+      Width = 82
+      Height = 17
+      Hint = 
+        'Use this for selecting patient items. Note: this form is used pr' +
+        'imarily for defining views, #13 not selecting data.'
+      Caption = 'Patient Items'
+      TabOrder = 1
+      OnClick = radSourceAllClick
+    end
+    object radSourceAll: TRadioButton
+      Left = 0
+      Top = 6
+      Width = 60
+      Height = 17
+      Hint = 'Use this for defining views. It shows every possible item.'
+      Caption = 'All Items'
+      Checked = True
+      TabOrder = 0
+      TabStop = True
+      OnClick = radSourceAllClick
+    end
+  end
+  object lstItemsTopSelection: TORListBox
+    Left = 142
+    Top = 44
+    Width = 120
+    Height = 225
+    ItemHeight = 13
+    ParentShowHint = False
+    ShowHint = False
+    Sorted = True
+    TabOrder = 2
+    Visible = False
+    OnDblClick = cboAllItemsClick
+    ItemTipColor = clWindow
+    LongList = False
+    Pieces = '3'
+    OnChange = cboAllItemsChange
+  end
+  object pnlTempData: TPanel
+    Left = 16
+    Top = 230
+    Width = 425
+    Height = 49
+    TabOrder = 14
+    Visible = False
+    object lblSave: TLabel
+      Left = 184
+      Top = 16
+      Width = 3
+      Height = 13
+      Visible = False
+    end
+    object lblClose: TLabel
+      Left = 192
+      Top = 0
+      Width = 3
+      Height = 13
+      Visible = False
+    end
+    object lstActualItems: TORListBox
+      Left = 8
+      Top = 5
+      Width = 97
+      Height = 41
+      ItemHeight = 13
+      ParentShowHint = False
+      ShowHint = True
+      TabOrder = 0
+      ItemTipColor = clWindow
+      LongList = False
+    end
+    object lstDrugClass: TListBox
+      Left = 112
+      Top = 5
+      Width = 97
+      Height = 41
+      ItemHeight = 13
+      TabOrder = 1
+    end
+    object lstScratch: TListBox
+      Left = 216
+      Top = 5
+      Width = 97
+      Height = 41
+      ItemHeight = 13
+      TabOrder = 2
+    end
+    object lstTests: TListBox
+      Left = 320
+      Top = 5
+      Width = 97
+      Height = 41
+      ItemHeight = 13
+      TabOrder = 3
+    end
+  end
+  object pnlApply: TPanel
+    Left = 0
+    Top = 344
+    Width = 377
+    Height = 36
+    BevelOuter = bvNone
+    ParentShowHint = False
+    ShowHint = False
+    TabOrder = 15
+    object lblApply: TLabel
+      Left = 8
+      Top = 2
+      Width = 138
+      Height = 13
+      Caption = 'Display Items for Graphing to:'
+    end
+    object radTop: TRadioButton
+      Left = 8
+      Top = 17
+      Width = 57
+      Height = 17
+      Caption = 'Top'
+      Checked = True
+      TabOrder = 0
+      TabStop = True
+    end
+    object radBottom: TRadioButton
+      Left = 74
+      Top = 17
+      Width = 57
+      Height = 17
+      Caption = 'Bottom'
+      TabOrder = 1
+    end
+    object radBoth: TRadioButton
+      Left = 141
+      Top = 17
+      Width = 57
+      Height = 17
+      Caption = 'Both'
+      TabOrder = 2
+    end
+    object radNeither: TRadioButton
+      Left = 208
+      Top = 17
+      Width = 81
+      Height = 17
+      Caption = 'No Change'
+      TabOrder = 3
+    end
+  end
+  object btnAdd: TButton
+    Left = 280
+    Top = 125
+    Width = 21
+    Height = 21
+    Caption = '>'
+    Enabled = False
+    ParentShowHint = False
+    ShowHint = False
+    TabOrder = 5
+    OnClick = cboAllItemsClick
+  end
+  object btnAddAll: TButton
+    Left = 280
+    Top = 93
+    Width = 21
+    Height = 21
+    Caption = '>>'
+    Enabled = False
+    ParentShowHint = False
+    ShowHint = False
+    TabOrder = 4
+    OnClick = cboAllItemsClick
+  end
+  object btnRename: TButton
+    Left = 193
+    Top = 312
+    Width = 85
+    Height = 21
+    Caption = 'Rename...'
+    Enabled = False
+    ParentShowHint = False
+    ShowHint = False
+    TabOrder = 10
+    OnClick = btnRenameClick
+  end
+  object btnSavePublic: TButton
+    Left = 379
+    Top = 312
+    Width = 85
+    Height = 21
+    Caption = 'Save Public...'
+    Enabled = False
+    ParentShowHint = False
+    ShowHint = False
+    TabOrder = 13
+    OnClick = btnSaveClick
+  end
+  object cboAllItems: TORComboBox
+    Left = 142
+    Top = 44
+    Width = 123
+    Height = 225
+    Style = orcsSimple
+    AutoSelect = True
+    Color = clWindow
+    DropDownCount = 8
+    ItemHeight = 13
+    ItemTipColor = clWindow
+    ItemTipEnable = True
+    ListItemsOnly = True
+    LongList = True
+    LookupPiece = 0
+    MaxLength = 0
+    ParentShowHint = False
+    Pieces = '3'
+    ShowHint = False
+    Sorted = False
+    SynonymChars = '<>'
+    TabOrder = 1
+    OnChange = cboAllItemsChange
+    OnDblClick = cboAllItemsClick
+    OnNeedData = cboAllItemsNeedData
+    CharsNeedMatch = 1
+  end
+  object btnClose: TButton
+    Left = 371
+    Top = 353
+    Width = 97
+    Height = 21
+    Cancel = True
+    Caption = 'Close'
+    ParentShowHint = False
+    ShowHint = False
+    TabOrder = 16
+    OnClick = btnCloseClick
+  end
+end
Index: cprs/branches/foia-cprs/CPRS-Chart/fGraphProfiles.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fGraphProfiles.pas	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/fGraphProfiles.pas	(revision 460)
@@ -0,0 +1,1236 @@
+unit fGraphProfiles;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+  ComCtrls, StdCtrls, ExtCtrls, CheckLst, ORCtrls, ORFn, uGraphs, uCore;
+
+type
+  TfrmGraphProfiles = class(TForm)
+    btnAdd: TButton;
+    btnAddAll: TButton;
+    btnClear: TButton;
+    btnClose: TButton;
+    btnDelete: TButton;
+    btnRemoveAll: TButton;
+    btnRemoveOne: TButton;
+    btnRename: TButton;
+    btnSave: TButton;
+    btnSavePublic: TButton;
+    bvlBase: TBevel;
+    cboAllItems: TORComboBox;
+    lblApply: TLabel;
+    lblDisplay: TLabel;
+    lblEditInfo: TLabel;
+    lblEditInfo1: TLabel;
+    lblSelectandDefine: TLabel;
+    lblSelection: TLabel;
+    lblSelectionInfo: TLabel;
+    lblSource: TLabel;
+    lstActualItems: TORListBox;
+    lstDrugClass: TListBox;
+    lstItemsDisplayed: TORListBox;
+    lstItemsTopSelection: TORListBox;
+    lstScratch: TListBox;
+    lstSource: TORListBox;
+    lstTests: TListBox;
+    pnlApply: TPanel;
+    pnlSource: TPanel;
+    pnlTempData: TPanel;
+    radSourceAll: TRadioButton;
+    radSourcePat: TRadioButton;
+    radTop: TRadioButton;
+    radBottom: TRadioButton;
+    radBoth: TRadioButton;
+    radNeither: TRadioButton;
+    lblSave: TLabel;
+    lblClose: TLabel;
+    procedure FormCreate(Sender: TObject);
+    procedure FormShow(Sender: TObject);
+    procedure FormClose(Sender: TObject; var Action: TCloseAction);
+
+    procedure btnClearClick(Sender: TObject);
+    procedure btnDeleteClick(Sender: TObject);
+    procedure btnCloseClick(Sender: TObject);
+    procedure btnRemoveClick(Sender: TObject);
+    procedure btnRemoveAllClick(Sender: TObject);
+    procedure btnRemoveOneClick(Sender: TObject);
+    procedure btnRenameClick(Sender: TObject);
+    procedure btnSaveClick(Sender: TObject);
+
+    procedure radSourceAllClick(Sender: TObject);
+
+    procedure cboAllItemsClick(Sender: TObject);
+    procedure cboAllItemsChange(Sender: TObject);
+    procedure cboAllItemsNeedData(Sender: TObject; const StartFrom: String;
+      Direction, InsertAt: Integer);
+    procedure lstItemsDisplayedChange(Sender: TObject);
+    procedure lstItemsDisplayedDblClick(Sender: TObject);
+    procedure lstSourceChange(Sender: TObject);
+    procedure lstSourceDblClick(Sender: TObject);
+
+    procedure AddToList(aItem: string; aListBox: TORListBox);
+    procedure ArrangeList(aCheckFile, aCheckItem, aItem: string;
+      aListBox: TORListBox; var addtolist: boolean);
+    procedure AssignHints;
+    procedure AssignProfile(aList: TStrings; aProfile: string);
+    procedure CheckPublic;
+    procedure FillSource;
+
+    function ProfileExists(aName: string; aType: integer): boolean;
+  private
+    { Private declarations }
+    FHintPauseTime: integer;
+    FPublicEditor: boolean;
+    procedure CheckToClear;
+    procedure QualifierDelete(line: string);
+    procedure wmNCLButtonDown(var Msg: TWMNCLButtonDown); message WM_NCLBUTTONDOWN;
+  public
+    { Public declarations }
+  end;
+
+var
+  frmGraphProfiles: TfrmGraphProfiles;
+
+procedure DialogOptionsGraphProfiles(topvalue, leftvalue, fontsize: integer;
+  var actiontype: boolean);
+procedure DialogGraphProfiles(fontsize: integer;  var actionOK: boolean;
+  var checkaction: boolean; aGraphSetting: TGraphSetting;
+  var aProfname, aProfilestring, aSection: string;
+  const PatientDFN: string; var aCounter: integer;
+  aSelections: string);
+
+implementation
+
+{$R *.DFM}
+
+uses
+  rGraphs;
+
+procedure DialogOptionsGraphProfiles(topvalue, leftvalue, fontsize: integer;
+  var actiontype: boolean);
+// create the form and make it modal, return an action
+var
+  FGraphSetting: TGraphSetting;
+  aList, AllTypes: TStrings;
+  dfntype, listline, settings, settings1, t1, t2: string;
+  actionOK, checkaction: boolean;
+  counter, i: integer;
+  aSelections, profile, profilestring, section: string;
+begin
+  aList := TStringList.Create;
+  FastAssign(rpcGetGraphSettings, aList);
+  if aList.Count < 1 then
+  begin
+    showmessage('CPRS is not configured for graphing.');
+    aList.Free;
+    exit;
+  end;
+  t1 := aList[0]; t2 := aList[1];   // t1 are personal, t2 public settings
+  if length(t1) > 0 then settings := t1
+  else settings := t2;
+  SetPiece(settings, '|', 8, Piece(t2, '|', 8));
+  settings1 := Piece(settings, '|', 1);
+  Alltypes := TStringList.Create;
+  FastAssign(rpcGetTypes('0', true), AllTypes);
+  for i := 0 to AllTypes.Count - 1 do
+  begin
+    listline := AllTypes[i];
+    dfntype := UpperCase(Piece(listline, '^', 1));
+    SetPiece(listline, '^', 1, dfntype);
+    AllTypes[i] := listline;
+  end;
+  FGraphSetting := GraphSettingsInit(settings);
+  checkaction := false;
+  actionOK := false;
+  profile := '*';
+  counter := BIG_NUMBER;
+  aSelections :='';
+  DialogGraphProfiles(fontsize, actionOK, checkaction, FGraphSetting,
+    profile, profilestring, section, Patient.DFN, counter, aSelections);
+  FGraphSetting.Free;
+  aList.Free;
+end;
+
+procedure DialogGraphProfiles(fontsize: integer;  var actionOK: boolean;
+  var checkaction: boolean; aGraphSetting: TGraphSetting;
+  var aProfname, aProfilestring, aSection: string;
+  const PatientDFN: string; var aCounter: integer;
+  aSelections: string);
+var
+  i: integer;
+  counter, profile, profileitem, profiletype: string;
+  frmGraphProfiles: TfrmGraphProfiles;
+begin
+  frmGraphProfiles := TfrmGraphProfiles.Create(Application);
+  try
+    with frmGraphProfiles do
+    begin
+      lblSave.Hint := aProfname;
+      lblClose.Hint := PatientDFN;
+      if aCounter = BIG_NUMBER then
+      begin
+        pnlApply.Visible := false;
+        frmGraphProfiles.Caption := 'Define Views';
+      end
+      else
+      begin
+        pnlApply.Visible := true;
+        frmGraphProfiles.Caption := 'Select Items and Define Views';
+      end;
+      if length(aSelections) > 0 then
+        lstSource.Items.Insert(0, '-3^<current selections>^' + aSelections);
+      ResizeAnchoredFormToFont(frmGraphProfiles);
+      ShowModal;
+      actionOK := (btnClose.Tag = 1);
+      aProfname := '';
+      if actionOK then
+      begin
+        aProfname := lblSave.Hint;
+        if radTop.Checked then aSection := 'top'
+        else if radBottom.Checked then aSection := 'bottom'
+        else if radBoth.Checked then aSection := 'both'
+        else aSection := 'neither';
+        profile := '';
+        with lstItemsDisplayed do
+        for i := 0 to Items.Count - 1 do
+        begin
+          profiletype := Piece(Items[i], '^', 1);
+          profileitem := Piece(Items[i], '^', 2);
+          profile := profile + profiletype + '~' + profileitem + '~|';
+        end;
+        aCounter := aCounter + 1;
+        counter := inttostr(aCounter);
+        aProfileString := '^<view' + counter + '>^' + profile;
+        with aGraphSetting do
+        begin
+          lstActualItems.Items.Clear;
+          with lstItemsDisplayed do
+          for i := 0 to Items.Count - 1 do
+          begin
+            lstActualItems.Items.Add(Piece(Items[i], '<', 1));  //get rid of <any>
+          end;
+          ItemsForDisplay := lstActualItems.Items;
+        end;
+     end;
+    end;
+  finally
+    frmGraphProfiles.Release;
+  end;
+end;
+
+procedure TfrmGraphProfiles.FormCreate(Sender: TObject);
+begin
+  FillSource;
+  FPublicEditor := rpcPublicEdit;
+end;
+
+procedure TfrmGraphProfiles.FormShow(Sender: TObject);
+begin
+  cboAllItems.Visible := radSourceAll.Checked;
+  FHintPauseTime := Application.HintHidePause;
+  Application.HintHidePause := 9000; // uses a longer hint pause time
+end;
+
+procedure TfrmGraphProfiles.btnClearClick(Sender: TObject);
+begin
+  lstItemsDisplayed.Items.Clear;
+  lstItemsTopSelection.Items.Clear;
+  cboAllItems.Items.Clear;
+  cboAllItems.Text :='';
+  lstItemsDisplayedChange(self);
+  cboAllItemsChange(self);
+  lstSource.ItemIndex := -1; 
+end;
+
+procedure TfrmGraphProfiles.btnDeleteClick(Sender: TObject);
+var
+  publicview: boolean;
+  info, profilename, profname, proftype: string;
+begin
+  if lstSource.ItemIndex < 0 then
+  begin
+    showmessage('You must select a valid View for deletion.');
+    exit;
+  end;
+  publicview := false;
+  profilename := '';
+  info := lstSource.Items[lstSource.ItemIndex];
+  proftype := Piece(info, '^', 1);
+  profname := Piece(info, '^', 2);
+  if proftype = '-1' then
+    profilename := profname
+  else if (proftype = '-2') and FPublicEditor then
+  begin
+    profilename := profname;
+    publicview := true;
+  end
+  else
+  begin
+    showmessage('You must select a valid View for deletion.');
+    exit;
+  end;
+  if publicview then
+  begin
+    if MessageDlg('This is Public and may be used by others.'
+      + #13 + 'Delete ' + profilename + '?', mtConfirmation,
+      [mbYes, mbNo], 0) = mrYes then
+    begin
+      rpcDeleteGraphProfile(UpperCase(profilename), '1');
+      btnClose.Tag := 1;
+      MessageDlg('The public view, ' + profilename + ' has been deleted.',
+      mtInformation, [mbOk], 0);
+    end
+    else exit;
+  end
+  else
+  begin
+    if MessageDlg('Delete ' + profilename + '?', mtConfirmation,
+      [mbYes, mbNo], 0) = mrYes then
+    begin
+      rpcDeleteGraphProfile(UpperCase(profilename), '0');
+      btnClose.Tag := 1;
+      MessageDlg('Your personal view, ' + profilename + ' has been deleted.',
+      mtInformation, [mbOk], 0);
+    end
+    else exit;
+  end;
+  btnClearClick(self);
+  lstItemsDisplayed.Items.Clear;
+  lstItemsTopSelection.Items.Clear;
+  cboAllItems.Items.Clear;
+  cboAllItems.Text :='';
+  FormCreate(self);
+  lstItemsDisplayedChange(self);
+  btnDelete.Enabled := false;
+  btnRename.Enabled := false;
+end;
+
+procedure TfrmGraphProfiles.btnRenameClick(Sender: TObject);
+var
+  profentered, publicview: boolean;
+  i, match: integer;
+  aName, aType, info, infotitle: string;
+  newprofilename, profilename, profname, proftype: string;
+begin
+  if lstSource.ItemIndex < 0 then
+  begin
+    showmessage('You must select a valid View to rename.');
+    exit;
+  end;
+  publicview := false;
+  profilename := '';
+  info := lstSource.Items[lstSource.ItemIndex];
+  proftype := Piece(info, '^', 1);
+  profname := Piece(info, '^', 2);
+  if proftype = '-1' then
+    profilename := profname
+  else if (proftype = '-2') and FPublicEditor then
+  begin
+    profilename := profname;
+    publicview := true;
+  end
+  else
+  begin
+    showmessage('You must select a valid View to rename.');
+  end;
+  btnRemoveAllClick(self);
+  lstSourceDblClick(self);
+  if publicview then
+  begin
+    infotitle := 'Rename this Public View';
+    info := 'This is Public and may be used by others.'
+      + #13 + 'Enter a new name for ' + profilename + '.'
+  end
+  else
+  begin
+    infotitle := 'Rename your Personal View';
+    info := 'Enter a new name for ' + profilename + '.'
+  end;
+  profentered := InputQuery(infotitle, info, newprofilename);
+  if not profentered then exit;
+  if newprofilename = '' then exit;
+  info := '';
+  if not ProfileExists(newprofilename, -2) and publicview then
+    info := 'The Public View, ' + profilename + ', will be changed to '
+      + newprofilename + #13 + 'Is this OK?'
+  else if not ProfileExists(newprofilename, -1) then
+    info := 'Your Personal View, ' + profilename + ', will be changed to '
+      + newprofilename + #13 + 'Is this OK?';
+  if length(info) > 0 then
+  begin
+    if MessageDlg(info, mtConfirmation, [mbYes, mbNo], 0) <> mrYes then exit;
+    if publicview then
+    begin
+      FastAssign(rpcGetGraphProfiles(UpperCase(profilename), '1', 1), lstScratch.Items);
+      rpcDeleteGraphProfile(UpperCase(profilename), '1');
+      rpcSetGraphProfile(newprofilename, '1', lstScratch.Items);
+      btnClose.Tag := 1;
+      proftype := '-2';
+    end
+    else
+    begin
+      FastAssign(rpcGetGraphProfiles(UpperCase(profilename), '0', 1), lstScratch.Items);
+      rpcDeleteGraphProfile(UpperCase(profilename), '0');
+      rpcSetGraphProfile(newprofilename, '0', lstScratch.Items);
+      btnClose.Tag := 1;
+      proftype := '-1';
+    end;
+  end;
+  if length(newprofilename) > 0 then
+    lblSave.Hint := newprofilename;
+  btnClearClick(self);
+  lstScratch.Items.Clear;
+  lstSource.Items.Clear;
+  FormCreate(btnSave);
+  match := -1;
+  profilename := UpperCase(newprofilename);
+  for i := lstSource.Items.Count - 1 downto 0 do
+  begin
+    info := lstSource.Items[i];
+    aType := Piece(info, '^', 1);
+    aName := Piece(info, '^', 2);
+    if (UpperCase(aName) = newprofilename) and (aType = proftype) then
+    begin
+      match := i;
+      break;
+    end;
+  end;
+  if match = -1 then exit;
+  lstSource.ItemIndex := match;
+  lstSourceChange(self);
+end;
+
+procedure TfrmGraphProfiles.btnCloseClick(Sender: TObject);
+begin
+  if lstItemsDisplayed.Items.Count > 0 then
+    btnClose.Tag := 1;
+  Close;
+end;
+
+procedure TfrmGraphProfiles.btnRemoveClick(Sender: TObject);
+begin
+  if lstItemsDisplayed.ItemIndex < 0 then exit;
+  lstItemsDisplayed.Items.Delete(lstItemsDisplayed.ItemIndex);
+  CheckToClear;
+end;
+
+procedure TfrmGraphProfiles.btnRemoveAllClick(Sender: TObject);
+begin
+  lstItemsDisplayed.Clear;
+  lstItemsDisplayedChange(self);
+  CheckToClear;
+end;
+
+procedure TfrmGraphProfiles.btnRemoveOneClick(Sender: TObject);
+begin
+  lstItemsDisplayedDblClick(self);
+  CheckToClear;
+end;
+
+procedure TfrmGraphProfiles.CheckToClear;
+begin
+  if cboAllItems.Visible and (cboAllItems.Items.Count = 0) then
+   lstSource.ItemIndex := -1
+  else if lstItemsTopSelection.Visible and (lstItemsTopSelection.Items.Count = 0) then
+   lstSource.ItemIndex := -1;
+  if lstSource.ItemIndex = -1 then
+  begin
+    btnAdd.Enabled := false;
+    btnAddAll.Enabled := false;
+  end;
+end;
+
+procedure TfrmGraphProfiles.btnSaveClick(Sender: TObject);
+var
+  profentered, puplicedit: boolean;
+  i, j, match: integer;
+  aName, aType, info, infotitle, profile, profileitem, profilename, profiletype, profname, proftype: string;
+  aList: TStrings;
+begin
+  puplicedit := Sender = btnSavePublic;
+  if lstItemsDisplayed.Items.Count < 1 then exit;
+  profilename := '';
+  if lstSource.ItemIndex > -1 then
+  begin
+    info := lstSource.Items[lstSource.ItemIndex];
+    proftype := Piece(info, '^', 1);
+    profname := Piece(info, '^', 2);
+    profilename := profname;
+  end;
+  if puplicedit then
+  begin
+    infotitle := 'Save this Public View';
+    info := 'Save this Public View by entering a name for it.'
+      + #13 + 'If you are editing a View, enter the View''s name to overwrite it.';
+  end
+  else
+  begin
+    infotitle := 'Save your Personal View';
+    info := 'Save your Personal View by entering a name for it.'
+      + #13 + 'If you are editing a View, enter the View''s name to overwrite it.';
+  end;
+  profentered := InputQuery(infotitle, info, profilename);
+  if not profentered then exit;
+  if profilename = '' then exit;
+  if (length(profilename) < 3) or (length(profilename) > 30) then
+  begin
+    showmessage('Not accepted - names of views must be 3-30 characters.');
+    exit;
+  end;
+  info := '';
+  if ProfileExists(profilename, -2) and FPublicEditor and puplicedit then
+    info := 'The Public View, ' + profilename + ', will be overwritten.'
+      + #13 + 'Is this OK?'
+  else if ProfileExists(profilename, -1) and (not puplicedit) then
+    info := 'Your Personal View, ' + profilename + ', will be overwritten.'
+      + #13 + 'Is this OK?';
+  if length(info) > 0 then
+    if MessageDlg(info, mtConfirmation, [mbYes, mbNo], 0) <> mrYes then exit;
+  aList := TStringList.Create;
+  profile := '';
+  aList.Clear;
+  j := 1;
+  with lstItemsDisplayed do
+  for i := 0 to Items.Count - 1 do
+  begin
+    profiletype := Piece(Items[i], '^', 1);
+    profileitem := Piece(Items[i], '^', 2);
+    profile := profile + profiletype + '~' + profileitem + '~|';
+    j := j +1;
+    if (j mod 10) = 0 then
+      if length(profile) > 0 then
+      begin
+        aList.Add(UpperCase(profile));
+        profile := '';
+      end;
+  end;
+  if length(profile) > 0 then
+  begin
+    aList.Add(UpperCase(profile));
+    profile := '';
+  end;
+  if puplicedit then
+  begin
+    proftype := '-2';
+    rpcSetGraphProfile(profilename, '1', aList);
+    btnClose.Tag := 1;
+  end
+  else
+  begin
+    proftype := '-1';
+    rpcSetGraphProfile(profilename, '0', aList);
+    btnClose.Tag := 1;
+  end;
+  if length(profilename) > 0 then
+    lblSave.Hint := profilename;
+  btnClearClick(self);
+  lstScratch.Items.Clear;
+  lstSource.Items.Clear;
+  FormCreate(btnSave);
+  match := -1;
+  profilename := UpperCase(profilename);
+  for i := lstSource.Items.Count - 1 downto 0 do
+  begin
+    info := lstSource.Items[i];
+    aType := Piece(info, '^', 1);
+    aName := Piece(info, '^', 2);
+    if (UpperCase(aName) = profilename) and (aType = proftype) then
+    begin
+      match := i;
+      break;
+    end;
+  end;
+  aList.Free;
+  if match = -1 then exit;
+  lstSource.ItemIndex := match;
+  lstSourceChange(self);
+end;
+
+procedure TfrmGraphProfiles.CheckPublic;
+var
+  typedata: string;
+begin
+  if lstSource.ItemIndex = -1 then
+  begin
+    btnDelete.Enabled := false;
+    btnRename.Enabled := false;
+    exit;
+  end;
+  typedata :=  lstSource.Items[lstSource.ItemIndex];
+  btnDelete.Enabled := (Piece(typedata, '^', 1) = '-1')
+                    or ((Piece(typedata, '^', 1) = '-2') and FPublicEditor);
+  btnRename.Enabled := btnDelete.Enabled;
+end;
+
+procedure TfrmGraphProfiles.radSourceAllClick(Sender: TObject);
+var
+  dfn: string;
+begin
+  if Sender = radSourceAll then
+  begin
+    lstItemsTopSelection.Visible := false;
+    cboAllItems.Visible := true;
+  end
+  else
+  begin
+    if radSourcePat.Tag = 0 then
+    begin
+      dfn := lblClose.Hint;
+      FastAssign(rpcGetAllItems(dfn), lstTests.Items);  //*** using a DFN, get all items
+      FastAssign(rpcGetItems('50.605', dfn), lstDrugClass.Items);
+      radSourcePat.Tag := 1;
+    end;
+    cboAllItems.Visible := false;
+    lstItemsTopSelection.Visible := true;
+  end;
+  lstSourceChange(self);
+end;
+
+procedure TfrmGraphProfiles.cboAllItemsClick(Sender: TObject);
+var
+  profileselected: boolean;
+  i: integer;
+  first, profileitem, selection, subtype: string;
+begin
+  if Sender is TButton then
+  begin
+    if lstItemsTopSelection.Visible then
+    begin
+      if Sender = btnAddAll then
+        lstItemsTopSelection.ItemIndex := 0;
+      Sender := lstItemsTopSelection;
+    end
+    else
+    begin
+      if Sender = btnAddAll then
+        cboAllItems.ItemIndex := 0;
+      Sender := cboAllItems;
+    end;
+  end;
+  if Sender is TORListBox then
+  with (Sender as TORListBox) do
+  begin
+    if ItemIndex < 0 then exit;
+    selection := Items[ItemIndex];
+    if length(Piece(selection, '_', 2)) > 0 then
+      selection := Piece(selection, '_', 1) + ' ' + Piece(selection, '_', 2);
+    first := Piece(selection, '^', 1);
+    if first = '' then exit;     // line
+    profileselected := strtointdef(Piece(selection, '^', 2), 0) < 0;
+    if profileselected then
+    begin
+      for i := 2 to Items.Count - 1 do
+      begin
+        profileitem := Items[i];
+        if length(Piece(profileitem, '_', 2)) > 0 then
+          profileitem := Piece(profileitem, '_', 1) + ' ' + Piece(profileitem, '_', 2);   //*****???? ^
+        AddToList(profileitem, lstItemsDisplayed);
+      end;
+    end
+    else
+      AddToList(selection, lstItemsDisplayed);
+    if ItemIndex = 0 then Clear;        //profile or type <any>
+    ItemIndex := -1;
+  end
+  else if Sender is TORComboBox then
+  with (Sender as TORComboBox) do
+  begin
+    if ItemIndex < 0 then exit;
+    selection := Items[ItemIndex];
+    subtype := Piece(Items[0], '^', 3);
+    subtype := Piece(subtype, ':', 2);
+    subtype := copy(subtype, 2, length(subtype));
+    subtype := Piece(subtype, ' ', 1);
+    if UpperCase(copy(selection, 1, 5)) = '63AP;' then
+        selection := copy(selection, 1, 4) + '^A;' + copy(selection, 6, 1) + ';'
+        + Piece(selection, '^', 2) + '^' + subtype + ': ' + Piece(selection, '^', 3)
+    else if UpperCase(copy(selection, 1, 5)) = '63MI;' then
+        selection := copy(selection, 1, 4) + '^M;' + copy(selection, 6, 1) + ';'
+        + Piece(selection, '^', 2) + '^' + subtype + ': ' + Piece(selection, '^', 3);
+    if length(Piece(selection, '_', 2)) > 0 then
+      selection := Piece(selection, '_', 1) + ' ' + Piece(selection, '_', 2);
+    first := Piece(selection, '^', 1);
+    if first = '' then exit;     // line
+    profileselected := strtointdef(Piece(selection, '^', 2), 0) < 0;
+    if profileselected then
+    begin
+      for i := 2 to Items.Count - 1 do
+      begin
+        profileitem := Items[i];
+        if length(Piece(profileitem, '_', 2)) > 0 then
+          profileitem := Piece(profileitem, '_', 1) + ' ' + Piece(profileitem, '_', 2);   //*****???? ^
+        AddToList(profileitem, lstItemsDisplayed);
+      end;
+    end
+    else
+      AddToList(selection, lstItemsDisplayed);
+    if ItemIndex = 0 then Clear;        //profile or type <any>
+    ItemIndex := -1;
+  end
+  else exit;
+  lstItemsDisplayedChange(self);
+  CheckToClear;
+end;
+
+procedure TfrmGraphProfiles.cboAllItemsChange(Sender: TObject);
+begin
+ if (Sender is TORListBox) then
+   btnClear.Enabled := btnSave.Enabled or ((Sender as TORListBox).Items.Count > 0)
+ else if (Sender is TORComboBox) then
+   btnClear.Enabled := btnSave.Enabled or ((Sender as TORComboBox).Items.Count > 0);
+ if lstItemsTopSelection.Visible then
+ begin
+   btnAddAll.Enabled := lstItemsTopSelection.Items.Count > 0;
+   btnAdd.Enabled := lstItemsTopSelection.ItemIndex > -1;
+ end
+ else
+ begin
+   btnAddAll.Enabled := cboAllItems.Items.Count > 0;
+   btnAdd.Enabled := cboAllItems.ItemIndex > -1;
+ end;
+end;
+
+procedure TfrmGraphProfiles.cboAllItemsNeedData(Sender: TObject;
+  const StartFrom: String; Direction, InsertAt: Integer);
+var
+  filetype: string;
+begin
+  if lstSource.ItemIndex = -1 then exit;
+  filetype := Piece(lstSource.Items[lstSource.ItemIndex], '^', 1);
+  cboAllItems.ForDataUse(rpcLookupItems(filetype, StartFrom, Direction));
+end;
+
+procedure TfrmGraphProfiles.lstItemsDisplayedChange(Sender: TObject);
+begin
+ btnSave.Enabled := lstItemsDisplayed.Items.Count > 0;
+ btnSavePublic.Enabled := btnSave.Enabled and FPublicEditor;
+ btnRemoveAll.Enabled := btnSave.Enabled;
+ btnAdd.Enabled := (cboAllItems.Visible and (cboAllItems.ItemIndex > -1))
+   or (lstItemsTopSelection.Visible and (lstItemsTopSelection.ItemIndex > -1));
+ btnRemoveOne.Enabled :=  btnSave.Enabled and (lstItemsDisplayed.ItemIndex > -1);
+ btnClear.Enabled := btnSave.Enabled or (lstItemsTopSelection.Items.Count > 0);
+ if btnSave.Enabled and pnlApply.Visible then btnClose.Caption := 'Close and Display'
+ else btnClose.Caption := 'Close';
+end;
+
+procedure TfrmGraphProfiles.lstItemsDisplayedDblClick(Sender: TObject);
+var
+  line: string;
+begin
+  if lstItemsDisplayed.ItemIndex < 0 then exit;
+  line := lstItemsDisplayed.Items[lstItemsDisplayed.ItemIndex];
+  lstItemsDisplayed.Items.Delete(lstItemsDisplayed.ItemIndex);
+  QualifierDelete(line);
+  lstItemsDisplayedChange(self);
+end;
+
+procedure TfrmGraphProfiles.QualifierDelete(line: string);
+var
+  i: integer;
+  filenum: string;
+begin
+  if Piece(line, '^', 1) <> '0' then exit;
+  filenum := Piece(line, '^', 2);
+  if strtointdef(filenum, 0) < 0 then exit;
+  if (filenum = '52') or (filenum = '55') or (filenum = '55NVAE')
+  or (filenum = '55NVA') or (filenum = '53.79') then
+  with lstItemsDisplayed do
+  for i := 0 to Items.Count - 1 do
+  if (Piece(Items[i], '^', 2) = '50.605') and (Piece(Items[i], '^', 1) = '0') then
+  begin
+    Items.Delete(i);
+    break;
+  end;
+end;
+
+procedure TfrmGraphProfiles.lstSourceChange(Sender: TObject);
+var
+  i: integer;
+  filetype, itemdata, typedata: string;
+begin
+  cboAllItems.Items.Clear;
+  cboAllItems.Text := '';
+  CheckPublic;
+  if lstSource.ItemIndex = -1 then exit;
+  typedata :=  lstSource.Items[lstSource.ItemIndex];
+  if typedata = LLS_LINE then
+  begin
+    cboAllItems.Items.Clear;
+    cboAllItems.Text := '';
+    exit;
+  end;
+  filetype := Piece(typedata, '^', 1);
+  if filetype = '-1' then
+    AssignProfile(cboAllItems.Items, typedata)
+  else
+  if filetype = '-2' then
+    AssignProfile(cboAllItems.Items, typedata)
+  else
+  if filetype = '-3' then   // current selections
+  begin
+    AssignProfile(cboAllItems.Items, typedata);
+  end
+  else
+  with cboAllItems.Items do
+  begin
+    Clear;
+    cboAllItems.InitLongList('');
+    typedata := '0^' + Piece(typedata, '^', 1) + '^ ' + Piece(typedata, '^', 2) + ' <any>';
+    Insert(0, typedata);
+    Insert(1, '^' + LLS_LINE);
+    if Piece(typedata, '^', 2) = '63AP' then
+    begin
+      for i := 0 to lstSource.Items.Count - 1 do
+      if copy(lstSource.Items[i], 1, 5) = '63AP;' then
+      begin
+        typedata := lstSource.Items[i];
+        typedata := '0^' + Piece(typedata, '^', 1) + '^ ' + Piece(typedata, '^', 2) + ' <any>';
+        Add(typedata);
+      end;
+    end
+    else if Piece(typedata, '^', 2) ='63MI' then
+    begin
+      for i := 0 to lstSource.Items.Count - 1 do
+      if copy(lstSource.Items[i], 1, 5) = '63MI;' then
+      begin
+        typedata := lstSource.Items[i];
+        typedata := '0^' + Piece(typedata, '^', 1) + '^ ' + Piece(typedata, '^', 2) + ' <any>';
+        Add(typedata);
+      end;
+    end;
+  end;
+  cboAllItemsChange(cboAllItems);
+  CheckPublic;
+  if lstSource.ItemIndex = -1 then exit;
+  typedata :=  lstSource.Items[lstSource.ItemIndex];
+  if typedata = LLS_LINE then
+  begin
+    lstItemsTopSelection.Clear;
+    exit;
+  end;
+  filetype := Piece(typedata, '^', 1);
+  if filetype = '-1' then
+    AssignProfile(lstItemsTopSelection.Items, typedata)
+  else
+  if filetype = '-2' then
+    AssignProfile(lstItemsTopSelection.Items, typedata)
+  else
+  if filetype = '-3' then
+  begin
+    AssignProfile(lstItemsTopSelection.Items, typedata);
+  end
+  else
+  with lstItemsTopSelection.Items do
+  begin
+    Clear;
+    lstItemsTopSelection.Sorted := true;
+    typedata := '0^' + Piece(typedata, '^', 1) + '^ ' + Piece(typedata, '^', 2) + ' <any>';
+    Insert(0, typedata);
+    Insert(1, '^' + LLS_LINE);
+    if filetype = '63AP' then
+    begin
+      lstItemsTopSelection.Sorted := false;
+      for i := 0 to lstSource.Items.Count - 1 do
+      if copy(lstSource.Items[i], 1, 5) = '63AP;' then
+      begin
+        typedata := lstSource.Items[i];
+        typedata := '0^' + Piece(typedata, '^', 1) + '^ ' + Piece(typedata, '^', 2) + ' <any>';
+        Add(typedata);
+      end;
+    end
+    else if filetype ='63MI' then
+    begin
+      lstItemsTopSelection.Sorted := false;
+      for i := 0 to lstSource.Items.Count - 1 do
+      if copy(lstSource.Items[i], 1, 5) = '63MI;' then
+      begin
+        typedata := lstSource.Items[i];
+        typedata := '0^' + Piece(typedata, '^', 1) + '^ ' + Piece(typedata, '^', 2) + ' <any>';
+        Add(typedata);
+      end;
+    end
+    else if filetype = '50.605' then
+    for i := 0 to lstDrugClass.Items.Count - 1 do
+    begin
+      itemdata := lstDrugClass.Items[i];
+      if filetype = Piece(itemdata, '^', 1) then
+        Add(itemdata);
+    end
+    else if copy(filetype, 1, 5) = '63AP;' then
+    begin
+      filetype := copy(filetype, 1, 4) + '^A;' + copy(filetype, 6, 1) + ';';
+      for i := 0 to lstTests.Items.Count - 1 do
+      begin
+        itemdata := lstTests.Items[i];
+        if filetype = UpperCase(copy(itemdata, 1, 9)) then
+          Add(itemdata);
+      end;
+    end
+    else if copy(filetype, 1, 5) = '63MI;' then
+    begin
+      filetype := copy(filetype, 1, 4) + '^M;' + copy(filetype, 6, 1) + ';';
+      for i := 0 to lstTests.Items.Count - 1 do
+      begin
+        itemdata := lstTests.Items[i];
+        if filetype = UpperCase(copy(itemdata, 1, 9)) then
+          Add(itemdata);
+      end;
+    end
+    else if filetype <> '405' then
+    for i := 0 to lstTests.Items.Count - 1 do
+    begin
+      itemdata := lstTests.Items[i];
+      if filetype = UpperCase(Piece(itemdata, '^', 1)) then
+        Add(itemdata);
+    end;
+    cboAllItemsChange(lstItemsTopSelection);
+  end;
+end;
+
+procedure TfrmGraphProfiles.lstSourceDblClick(Sender: TObject);
+begin
+  if cboAllItems.Visible then
+  begin
+    if cboAllItems.Items.Count < 1 then exit;
+    cboAllItems.ItemIndex := 0;
+    cboAllItemsClick(cboAllItems);
+  end
+  else
+  begin
+    if lstItemsTopSelection.Items.Count < 1 then exit;
+    lstItemsTopSelection.Selected[0] := true;
+    cboAllItemsClick(lstItemsTopSelection);
+  end;
+end;
+
+procedure TfrmGraphProfiles.AddToList(aItem: string; aListBox: TORListBox);
+var
+  addtolist: boolean;
+  checkfile, checkitem: string;
+begin
+  aItem := UpperCase(Pieces(aItem, '^', 1, 2)) + '^' + Piece(aItem, '^', 3);
+  checkfile := Piece(aItem, '^', 1);
+  checkitem := Piece(aItem, '^', 2);
+  if checkfile = '0' then
+  begin
+    checkfile := checkitem;       // if drug class any - 52,0;55,0
+    checkitem := '0';           // if drug class item - go thru meds
+  end;
+  ArrangeList(checkfile, checkitem, aItem, aListBox, addtolist);
+  if addtolist then aListBox.Items.Add(aItem);
+  if (checkfile = '50.605') and (checkitem = '0') then
+  begin
+    checkfile := '52';
+    aItem := '0^52^ Medication,Outpatitent <any>';
+    ArrangeList(checkfile, checkitem, aItem, aListBox, addtolist);
+    if addtolist then aListBox.Items.Add(aItem);
+    checkfile := '55';
+    aItem := '0^55^ Medication,Inpatitent <any>';
+    ArrangeList(checkfile, checkitem, aItem, aListBox, addtolist);
+    if addtolist then aListBox.Items.Add(aItem);
+    checkfile := '53.79';
+    aItem := '0^53.79^ Medication,BCMA <any>';
+    ArrangeList(checkfile, checkitem, aItem, aListBox, addtolist);
+    if addtolist then aListBox.Items.Add(aItem);
+    {checkfile := '55NVAE';               // nonvameds as events is not used
+    aItem := '0^55NVAE^ Medication,Non-VA-Event <any>';
+    ArrangeList(checkfile, checkitem, aItem, aListBox, addtolist);
+    if addtolist then aListBox.Items.Add(aItem);}
+    checkfile := '55NVA';
+    aItem := '0^55NVA^ Medication,Non-VA <any>';
+    ArrangeList(checkfile, checkitem, aItem, aListBox, addtolist);
+    if addtolist then aListBox.Items.Add(aItem);
+  end;
+end;
+
+procedure TfrmGraphProfiles.ArrangeList(aCheckFile, aCheckItem, aItem: string;
+  aListBox: TORListBox; var addtolist: boolean);
+var
+  i: integer;
+  listfile, listitem: string;
+begin
+  addtolist := true;
+  with aListBox do
+  for i := Items.Count - 1 downto 0 do
+  begin
+    listfile := Piece(Items[i], '^', 1);
+    listitem := Piece(Items[i], '^', 2);
+    if listfile = '0' then
+    begin
+      listfile := listitem;
+      listitem := '0';
+    end;
+    if (aCheckItem = listitem) and (aCheckFile = listfile) then
+    begin
+      addtolist := false;
+      break;
+    end
+    else
+    if (listitem = '0') and (aCheckFile = listfile) then
+    begin
+      addtolist := false;
+      break;
+    end
+    else
+    if listitem = '0' then
+    begin
+      if aCheckFile = Piece(listfile, ';', 1) then
+        if Piece(aCheckItem, ';', 2) = Piece(listfile, ';', 2) then
+        begin
+          addtolist := false;
+          break;
+        end;
+    end
+    else
+    if (aCheckItem = '0') and (aCheckFile = listfile) then
+      Items.Delete(i);
+  end;
+end;
+
+procedure TfrmGraphProfiles.AssignProfile(aList: TStrings; aProfile: string);
+var
+  ext, stop: boolean;
+  i, j, k: integer;
+  dfn, itemname, itemnums, itempart, itempart1, itempart2, itemtest, typedata, teststring: string;
+begin
+  ext := radSourceAll.Checked;
+  if ext then
+  begin
+    if Piece(aProfile, '^', 1) = '-2' then
+      FastAssign(rpcGetGraphProfiles(UpperCase(Piece(aProfile, '^', 2)), '1', 1), aList)
+    else
+
+    if Piece(aProfile, '^', 1) = '-3' then   // current selection on list
+    begin
+      if radSourcePat.Tag = 0 then
+      begin
+        dfn := lblClose.Hint;
+        FastAssign(rpcGetAllItems(dfn), lstTests.Items);  //*** using a DFN, get all items
+        FastAssign(rpcGetItems('50.605', dfn), lstDrugClass.Items);
+        radSourcePat.Tag := 1;
+      end;
+      typedata := '0^-1^ ' + Piece(aProfile, '^', 2);
+      aProfile := Piece(aProfile, '^', 3);
+      aList.Clear;
+      aList.Add(typedata);
+      aList.Add('^' + LLS_LINE);
+      for i := 1 to BIG_NUMBER do
+      begin
+        itempart := Piece(aProfile, '|', i);
+        if itempart = '' then exit;
+        itempart1 := Piece(itempart, '~', 1);
+        itempart2 := Piece(itempart, '~', 2);
+        itemnums := itempart1 + '^' + itempart2;
+        itemname := '';
+        for k := 0 to lstTests.Items.Count - 1 do
+        begin
+          itemtest := UpperCase(Pieces(lstTests.Items[k], '^', 1, 2));
+          if itemtest = itemnums then
+          begin
+            itemname := Piece(lstTests.Items[k], '^', 3);
+            itemnums := itemnums + '^' + itemname;
+            aList.Add(itemnums);
+            break;
+          end;
+        end;
+      end;
+    end
+
+    else
+      FastAssign(rpcGetGraphProfiles(UpperCase(Piece(aProfile, '^', 2)), '0', 1), aList);
+    for i := 0 to aList.Count -1 do
+    begin
+      teststring := aList[i];
+      if Piece(teststring, '^', 1) = '0' then
+        aList[i] := '0^' + Piece(teststring, '^', 2) + '^_' + Piece(teststring, '^', 3);
+    end;
+    typedata := '0^' + Piece(aProfile, '^', 1) + '^ ' + Piece(aProfile, '^', 2);
+    aList.Insert(0, typedata);
+    aList.Insert(1, '^' + LLS_LINE);
+    exit;
+  end;
+  if Piece(aProfile, '^', 1) = '-2' then
+  begin
+    FastAssign(rpcGetGraphProfiles(UpperCase(Piece(aProfile, '^', 2)), '1', 0), lstScratch.Items);
+    typedata := '0^-1^ ' + Piece(aProfile, '^', 2);
+  end
+  else
+  if Piece(aProfile, '^', 1) = '-3' then   // current selection on list
+  begin
+    lstScratch.Items.Clear;
+    lstScratch.Items.Add(Piece(aProfile, '^', 3));
+    typedata := '0^-1^ ' + Piece(aProfile, '^', 2);
+    aProfile := '-1^' + Piece(aProfile, '^', 2) + '^';
+  end
+  else
+  begin
+    FastAssign(rpcGetGraphProfiles(UpperCase(Piece(aProfile, '^', 2)), '0', 0), lstScratch.Items);
+    typedata := '0^' + Piece(aProfile, '^', 1) + '^ ' + Piece(aProfile, '^', 2);
+  end;
+  for i := 0 to lstScratch.Items.Count - 1 do
+    aProfile := aProfile + lstScratch.Items[i];
+  aProfile := Piece(aProfile, '^', 3);
+  aList.Clear;
+  aList.Add(typedata);
+  aList.Add('^' + LLS_LINE);
+  for i := 1 to BIG_NUMBER do
+  begin
+    itempart := Piece(aProfile, '|', i);
+    if itempart = '' then exit;
+    itempart1 := Piece(itempart, '~', 1);
+    itempart2 := Piece(itempart, '~', 2);
+    itemnums := itempart1 + '^' + itempart2;
+    itemname := '';
+    if itempart1 = '0' then
+    begin
+      for j := 0 to lstSource.Items.Count - 1 do
+        if itempart2 = Piece(lstSource.Items[j], '^', 1) then
+        begin
+          itemname := Piece(lstSource.Items[j], '^', 2);
+          break;
+        end;
+      typedata := '0^' + itempart2 + '^_' + itemname + ' <any>';
+      aList.Add(typedata);
+    end
+    else
+    if (itempart1 <> '0') then    //DRUG CLASS NOT INCLUDED
+    begin
+      stop := false;
+      for k := 0 to lstTests.Items.Count - 1 do
+      begin
+        itemtest := UpperCase(Pieces(lstTests.Items[k], '^', 1, 2));
+        if itemtest = itemnums then
+        begin
+          itemname := Piece(lstTests.Items[k], '^', 3);
+          itemnums := itemnums + '^' + itemname;
+          aList.Add(itemnums);
+          stop := true;
+          break;
+        end;
+      end;
+      if not stop then
+      for k := 0 to lstDrugClass.Items.Count - 1 do
+      begin
+        itemtest := UpperCase(Pieces(lstDrugClass.Items[k], '^', 1, 2));
+        if itemtest = itemnums then
+        begin
+          itemname := Piece(lstDrugClass.Items[k], '^', 3);
+          itemnums := itemnums + '^' + itemname;
+          aList.Add(itemnums);
+          break;
+        end;
+      end;
+    end;
+  end;
+end;
+
+procedure TfrmGraphProfiles.FillSource;
+var
+  i: integer;
+  dfntype, listline: string;
+begin
+  with lstSource do
+  begin
+    Sorted := true;
+    OnClick := OnChange;     // turn off onchange event when loading
+    OnChange := nil;
+    FastAssign(rpcGetTypes('0', true), Items);
+    for i := 0 to Items.Count - 1 do
+    begin
+      listline := Items[i];
+      dfntype := UpperCase(Piece(listline, '^', 1));
+      SetPiece(listline, '^', 1, dfntype);
+      Items[i] := listline;
+    end;
+    //Items.Add('50.605^Drug Class');
+    OnChange := OnClick;
+    OnClick := nil;
+    Sorted := false;
+    FastAssign(rpcGetGraphProfiles('1', '0', 0), lstScratch.Items);
+    if lstScratch.Items.Count > 0 then
+    begin
+      Items.Add(LLS_LINE);
+      for i := 0 to lstScratch.Items.Count - 1 do
+        Items.Add('-1^' + lstScratch.Items[i] + '^');
+    end;
+    FastAssign(rpcGetGraphProfiles('1', '1', 0), lstScratch.Items);
+    if lstScratch.Items.Count > 0 then
+    begin
+      Items.Add(LLS_LINE);
+      for i := 0 to lstScratch.Items.Count - 1 do
+        Items.Add('-2^' + lstScratch.Items[i] + '^');
+    end;
+  end;
+end;
+
+function TfrmGraphProfiles.ProfileExists(aName: string; aType: integer): boolean;
+var
+  i, sourcetype: integer;
+  info, profilename: string;
+begin
+  Result := false;
+  aName := UpperCase(aName);
+  for i := lstSource.Items.Count - 1 downto 0 do
+  begin
+    info := lstSource.Items[i];
+    profilename := Piece(info, '^', 2);
+    sourcetype := strtointdef(Piece(info, '^', 1), 0);
+    if (UpperCase(profilename) = aName) and (aType = sourcetype) then
+    begin
+      Result := true;
+      break;
+    end;
+  end;
+end;
+
+procedure TfrmGraphProfiles.AssignHints;
+var
+  i: integer;
+begin                       // text defined in uGraphs
+  for i := 0 to ControlCount - 1 do with Controls[i] do
+    Controls[i].ShowHint := true;
+  RadSourcePat.Hint := HINT_PAT_SOURCE;
+  RadSourceAll.Hint := HINT_ALL_SOURCE;
+  lblSelectionInfo.Hint := HINT_SELECTION_INFO;
+  lblSource.Hint := HINT_SOURCE;
+  lstSource.Hint := HINT_SOURCE;
+  lblSelection.Hint := HINT_SELECTION;
+  lstItemsTopSelection.Hint := HINT_SELECTION;
+  cboAllItems.Hint := HINT_SELECTION;
+  lblDisplay.Hint := HINT_DISPLAY;
+  lstItemsDisplayed.Hint := HINT_DISPLAY;
+  btnAddAll.Hint := HINT_BTN_ADDALL;
+  btnAdd.Hint := HINT_BTN_ADD1;
+  btnRemoveOne.Hint := HINT_BTN_REMOVE1;
+  btnRemoveAll.Hint := HINT_BTN_REMOVEALL;
+  btnClear.Hint := HINT_BTN_CLEAR;
+  btnDelete.Hint := HINT_BTN_DELETE;
+  btnRename.Hint := HINT_BTN_RENAME;
+  btnSave.Hint := HINT_BTN_SAVE;
+  btnSavePublic.Hint := HINT_BTN_SAVE_PUB;
+  pnlApply.Hint := HINT_APPLY;
+  btnClose.Hint := HINT_BTN_CLOSE;
+end;
+
+procedure TfrmGraphProfiles.wmNCLButtonDown(var Msg: TWMNCLButtonDown);
+begin            // clicking the ? button will have controls show hints
+  if Msg.HitTest = HTHELP then
+  begin
+    Msg.Result := 0; // ignore biHelp border icon
+    AssignHints;
+    ShowMessage('Help is now available.' + #13 +
+                'By pausing over a list or control, hints will appear.');
+  end
+  else
+    inherited;
+end;
+
+procedure TfrmGraphProfiles.FormClose(Sender: TObject;
+  var Action: TCloseAction);
+begin
+  Application.HintHidePause := FHintPauseTime;
+end;
+
+end.
Index: cprs/branches/foia-cprs/CPRS-Chart/fGraphSettings.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fGraphSettings.dfm	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/fGraphSettings.dfm	(revision 460)
@@ -0,0 +1,414 @@
+object frmGraphSettings: TfrmGraphSettings
+  Left = 109
+  Top = 60
+  BorderIcons = [biSystemMenu, biHelp]
+  BorderStyle = bsDialog
+  Caption = 'Graph Settings'
+  ClientHeight = 304
+  ClientWidth = 438
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  OldCreateOrder = False
+  Position = poMainFormCenter
+  OnClose = FormClose
+  OnCreate = FormCreate
+  OnShow = FormShow
+  DesignSize = (
+    438
+    304)
+  PixelsPerInch = 96
+  TextHeight = 13
+  object lblMinGraphHeight: TLabel
+    Left = 311
+    Top = 60
+    Width = 110
+    Height = 13
+    Caption = 'Minimum Graph Height:'
+    ParentShowHint = False
+    ShowHint = False
+  end
+  object lblMaxGraphs: TLabel
+    Left = 311
+    Top = 4
+    Width = 108
+    Height = 13
+    Caption = 'Max Graphs in Display:'
+    ParentShowHint = False
+    ShowHint = False
+  end
+  object lblOptions: TLabel
+    Left = 179
+    Top = 4
+    Width = 39
+    Height = 13
+    Caption = 'Options:'
+    ParentShowHint = False
+    ShowHint = False
+  end
+  object bvlBase: TBevel
+    Left = 13
+    Top = 271
+    Width = 412
+    Height = 2
+  end
+  object lblSources: TLabel
+    Left = 16
+    Top = 4
+    Width = 91
+    Height = 13
+    Caption = 'Sources Displayed:'
+    ParentShowHint = False
+    ShowHint = False
+  end
+  object lblConversions: TLabel
+    Left = 311
+    Top = 162
+    Width = 46
+    Height = 13
+    Caption = 'Functions'
+    ParentShowHint = False
+    ShowHint = False
+  end
+  object lblMaxSelect: TLabel
+    Left = 311
+    Top = 115
+    Width = 96
+    Height = 13
+    Caption = 'Max Items to Select:'
+    ParentShowHint = False
+    ShowHint = False
+    WordWrap = True
+  end
+  object lblShow: TLabel
+    Left = 196
+    Top = 217
+    Width = 72
+    Height = 13
+    Alignment = taRightJustify
+    Caption = 'Show Defaults:'
+    ParentShowHint = False
+    ShowHint = False
+  end
+  object lblSave: TLabel
+    Left = 189
+    Top = 249
+    Width = 79
+    Height = 13
+    Alignment = taRightJustify
+    Caption = 'Save as Default:'
+    ParentShowHint = False
+    ShowHint = False
+  end
+  object bvlDefaults: TBevel
+    Left = 176
+    Top = 205
+    Width = 248
+    Height = 2
+  end
+  object lblOptionsInfo: TLabel
+    Left = 13
+    Top = 281
+    Width = 275
+    Height = 13
+    Caption = 'Settings saved as your defaults are applied to new graphs.'
+    ParentShowHint = False
+    ShowHint = False
+    WordWrap = True
+  end
+  object lblMaxGraphsRef: TLabel
+    Left = 374
+    Top = 20
+    Width = 57
+    Height = 17
+    AutoSize = False
+    ParentShowHint = False
+    ShowHint = False
+  end
+  object lblMinGraphHeightRef: TLabel
+    Left = 374
+    Top = 80
+    Width = 57
+    Height = 17
+    AutoSize = False
+    ParentShowHint = False
+    ShowHint = False
+  end
+  object lblMaxSelectRef: TLabel
+    Left = 374
+    Top = 133
+    Width = 57
+    Height = 17
+    AutoSize = False
+    ParentShowHint = False
+    ShowHint = False
+  end
+  object bvlMid: TBevel
+    Left = 176
+    Top = 239
+    Width = 248
+    Height = 2
+  end
+  object lstATypes: TListBox
+    Left = 253
+    Top = 3
+    Width = 45
+    Height = 16
+    Anchors = [akLeft, akTop, akRight]
+    ItemHeight = 13
+    TabOrder = 17
+    Visible = False
+  end
+  object lstSourcesCopy: TListBox
+    Left = 123
+    Top = 4
+    Width = 45
+    Height = 16
+    ItemHeight = 13
+    Sorted = True
+    TabOrder = 16
+    Visible = False
+  end
+  object chklstOptions: TCheckListBox
+    Left = 179
+    Top = 20
+    Width = 120
+    Height = 179
+    OnClickCheck = chklstOptionsClickCheck
+    ItemHeight = 13
+    ParentShowHint = False
+    ShowHint = False
+    Sorted = True
+    TabOrder = 1
+  end
+  object txtMinGraphHeight: TEdit
+    Left = 311
+    Top = 78
+    Width = 41
+    Height = 21
+    ParentShowHint = False
+    ShowHint = False
+    TabOrder = 4
+    Text = '90'
+    OnChange = txtMinGraphHeightChange
+    OnExit = txtMinGraphHeightExit
+    OnKeyPress = txtMinGraphHeightKeyPress
+  end
+  object txtMaxGraphs: TEdit
+    Left = 311
+    Top = 20
+    Width = 41
+    Height = 21
+    ParentShowHint = False
+    ShowHint = False
+    TabOrder = 2
+    Text = '5'
+    OnChange = txtMaxGraphsChange
+    OnExit = txtMaxGraphsExit
+    OnKeyPress = txtMaxGraphsKeyPress
+  end
+  object spnMinGraphHeight: TUpDown
+    Left = 352
+    Top = 78
+    Width = 15
+    Height = 21
+    Associate = txtMinGraphHeight
+    Min = 10
+    Max = 1000
+    ParentShowHint = False
+    Position = 90
+    ShowHint = False
+    TabOrder = 5
+    Wrap = False
+    OnClick = spnMinGraphHeightClick
+  end
+  object spnMaxGraphs: TUpDown
+    Left = 352
+    Top = 20
+    Width = 15
+    Height = 21
+    Associate = txtMaxGraphs
+    Min = 1
+    Max = 20
+    ParentShowHint = False
+    Position = 5
+    ShowHint = False
+    TabOrder = 3
+    Wrap = False
+    OnClick = spnMaxGraphsClick
+  end
+  object btnClose: TButton
+    Left = 350
+    Top = 279
+    Width = 75
+    Height = 21
+    Cancel = True
+    Caption = 'Close'
+    ParentShowHint = False
+    ShowHint = False
+    TabOrder = 15
+    OnClick = btnCloseClick
+  end
+  object lstSources: TCheckListBox
+    Left = 16
+    Top = 20
+    Width = 153
+    Height = 216
+    ItemHeight = 13
+    ParentShowHint = False
+    ShowHint = False
+    Sorted = True
+    TabOrder = 0
+  end
+  object btnAll: TButton
+    Left = 18
+    Top = 245
+    Width = 65
+    Height = 21
+    Caption = 'All'
+    ParentShowHint = False
+    ShowHint = False
+    TabOrder = 9
+    OnClick = btnAllClick
+  end
+  object brnClear: TButton
+    Left = 103
+    Top = 245
+    Width = 65
+    Height = 21
+    Cancel = True
+    Caption = 'Clear'
+    ParentShowHint = False
+    ShowHint = False
+    TabOrder = 10
+    OnClick = btnAllClick
+  end
+  object btnPersonal: TButton
+    Left = 277
+    Top = 213
+    Width = 65
+    Height = 21
+    Cancel = True
+    Caption = 'Personal'
+    TabOrder = 11
+    OnClick = btnPublicClick
+  end
+  object cboConversions: TORComboBox
+    Left = 311
+    Top = 178
+    Width = 116
+    Height = 21
+    Style = orcsDropDown
+    AutoSelect = True
+    Color = clWindow
+    DropDownCount = 8
+    Items.Strings = (
+      '<none>'
+      'Standard Deviations'
+      'Inverse Values')
+    ItemHeight = 13
+    ItemTipColor = clWindow
+    ItemTipEnable = True
+    ListItemsOnly = False
+    LongList = False
+    LookupPiece = 0
+    MaxLength = 0
+    ParentShowHint = False
+    ShowHint = False
+    Sorted = False
+    SynonymChars = '<>'
+    TabOrder = 8
+    CharsNeedMatch = 1
+  end
+  object txtMaxSelect: TEdit
+    Left = 311
+    Top = 131
+    Width = 41
+    Height = 21
+    ParentShowHint = False
+    ShowHint = False
+    TabOrder = 6
+    Text = '100'
+    OnChange = txtMaxSelectChange
+    OnExit = txtMaxSelectExit
+    OnKeyPress = txtMaxSelectKeyPress
+  end
+  object spnMaxSelect: TUpDown
+    Left = 352
+    Top = 131
+    Width = 15
+    Height = 21
+    Associate = txtMaxSelect
+    Min = 1
+    Max = 1000
+    ParentShowHint = False
+    Position = 100
+    ShowHint = False
+    TabOrder = 7
+    Wrap = False
+    OnClick = spnMaxSelectClick
+  end
+  object btnPublic: TButton
+    Left = 360
+    Top = 213
+    Width = 65
+    Height = 21
+    Cancel = True
+    Caption = 'Public'
+    ParentShowHint = False
+    ShowHint = False
+    TabOrder = 12
+    OnClick = btnPublicClick
+  end
+  object btnPersonalSave: TButton
+    Left = 277
+    Top = 245
+    Width = 65
+    Height = 21
+    Cancel = True
+    Caption = 'Personal'
+    ParentShowHint = False
+    ShowHint = False
+    TabOrder = 13
+    OnClick = SaveClick
+  end
+  object btnPublicSave: TButton
+    Left = 360
+    Top = 245
+    Width = 65
+    Height = 21
+    Cancel = True
+    Caption = 'Public'
+    ParentShowHint = False
+    ShowHint = False
+    TabOrder = 14
+    OnClick = SaveClick
+  end
+  object lstOptions: TListBox
+    Left = 368
+    Top = 160
+    Width = 57
+    Height = 17
+    ItemHeight = 13
+    Items.Strings = (
+      '3D^A'
+      'Clear Background^B'
+      'Dates^C'
+      'Fixed Date Range^M'
+      'Gradient^D'
+      'Hints^E'
+      'Legend^F'
+      'Lines^G'
+      'Sort by Type^H'
+      'Stay on Top^I'
+      'Values^J'
+      'Zoom, Horizontal^K'
+      'Zoom, Vertical^L')
+    Sorted = True
+    TabOrder = 18
+    Visible = False
+  end
+end
Index: cprs/branches/foia-cprs/CPRS-Chart/fGraphSettings.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fGraphSettings.pas	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/fGraphSettings.pas	(revision 460)
@@ -0,0 +1,805 @@
+unit fGraphSettings;
+                                          
+interface
+
+uses
+  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+  ComCtrls, StdCtrls, ExtCtrls, CheckLst, Math, ORCtrls, ORFn, uGraphs;
+
+type
+  TfrmGraphSettings = class(TForm)
+    brnClear: TButton;
+    btnAll: TButton;
+    btnClose: TButton;
+    btnPersonal: TButton;
+    btnPersonalSave: TButton;
+    btnPublic: TButton;
+    btnPublicSave: TButton;
+    bvlBase: TBevel;
+    bvlDefaults: TBevel;
+    cboConversions: TORComboBox;
+    chklstOptions: TCheckListBox;
+    lblConversions: TLabel;
+    lblMaxGraphs: TLabel;
+    lblMaxGraphsRef: TLabel;
+    lblMaxSelect: TLabel;
+    lblMaxSelectRef: TLabel;
+    lblMinGraphHeight: TLabel;
+    lblMinGraphHeightRef: TLabel;
+    lblOptions: TLabel;
+    lblOptionsInfo: TLabel;
+    lblSave: TLabel;
+    lblShow: TLabel;
+    lblSources: TLabel;
+    lstATypes: TListBox;
+    lstSources: TCheckListBox;
+    lstSourcesCopy: TListBox;
+    spnMaxGraphs: TUpDown;
+    spnMaxSelect: TUpDown;
+    spnMinGraphHeight: TUpDown;
+    txtMaxGraphs: TEdit;
+    txtMaxSelect: TEdit;
+    txtMinGraphHeight: TEdit;
+    bvlMid: TBevel;
+    lstOptions: TListBox;
+    procedure FormCreate(Sender: TObject);
+    procedure FormShow(Sender: TObject);
+    procedure btnAllClick(Sender: TObject);
+    procedure btnCloseClick(Sender: TObject);
+    procedure btnPublicClick(Sender: TObject);
+    procedure CheckSetting(setting: string; turnon: boolean);
+    procedure chklstOptionsClickCheck(Sender: TObject);
+    procedure SaveClick(Sender: TObject);
+    procedure spnMaxGraphsClick(Sender: TObject; Button: TUDBtnType);
+    procedure txtMaxGraphsChange(Sender: TObject);
+    procedure txtMaxGraphsExit(Sender: TObject);
+    procedure txtMaxGraphsKeyPress(Sender: TObject; var Key: Char);
+    procedure spnMinGraphHeightClick(Sender: TObject; Button: TUDBtnType);
+    procedure spnMaxSelectClick(Sender: TObject; Button: TUDBtnType);
+    procedure txtMinGraphHeightChange(Sender: TObject);
+    procedure txtMaxSelectChange(Sender: TObject);
+    procedure txtMinGraphHeightExit(Sender: TObject);
+    procedure txtMaxSelectExit(Sender: TObject);
+    procedure txtMinGraphHeightKeyPress(Sender: TObject; var Key: Char);
+    procedure txtMaxSelectKeyPress(Sender: TObject; var Key: Char);
+    procedure AssignHints;
+    function DisplaySettings: string;
+    procedure FormClose(Sender: TObject; var Action: TCloseAction);
+
+  private
+    { Private declarations }
+    FHintPauseTime: integer;
+  public
+    { Public declarations }
+    procedure wmNCLButtonDown(var Msg: TWMNCLButtonDown); message WM_NCLBUTTONDOWN;
+  end;
+
+var
+  frmGraphSettings: TfrmGraphSettings;
+  procedure DialogOptionsGraphSettings(topvalue, leftvalue, fontsize: integer;
+    var actiontype: boolean);
+  procedure DialogGraphSettings(fontsize: integer;  var okbutton: boolean;
+    aGraphSetting: TGraphSetting; DisplaySource: TStrings; var conv: integer; var aSettings: string);
+  function FileNameX(filenum: string): string;
+
+implementation
+
+{$R *.DFM}
+
+uses
+  rGraphs;
+
+procedure DialogOptionsGraphSettings(topvalue, leftvalue, fontsize: integer;
+  var actiontype: boolean);
+var
+  FGraphSetting: TGraphSetting;
+  aList, FSources, AllTypes: TStrings;
+  i, conv: integer;
+  aSettings, dfntype, listline, settings, settings1, t1, t2: string;
+begin
+  aList := TStringList.Create;
+  FastAssign(rpcGetGraphSettings, aList);
+  if aList.Count < 1 then
+  begin
+    showmessage('CPRS is not configured for graphing.');
+    aList.Free;
+    exit;
+  end;
+  t1 := aList[0]; t2 := aList[1];   // t1 are personal, t2 public settings
+  if length(t1) > 0 then settings := t1
+  else settings := t2;
+  SetPiece(settings, '|', 8, Piece(t2, '|', 8));
+  settings1 := Piece(settings, '|', 1);
+  Alltypes := TStringList.Create;
+  FastAssign(rpcGetTypes('0', false), AllTypes);
+  for i := 0 to AllTypes.Count - 1 do
+  begin
+    listline := AllTypes[i];
+    dfntype := UpperCase(Piece(listline, '^', 1));
+    SetPiece(listline, '^', 1, dfntype);
+    AllTypes[i] := listline;
+  end;
+  FGraphSetting := GraphSettingsInit(settings);
+  FSources := TStringList.Create;
+  for i := 0 to BIG_NUMBER do
+  begin
+    dfntype := Piece(settings1, ';', i);
+    if length(dfntype) = 0 then break;
+    listline := dfntype + '^' + FileNameX(dfntype) + '^1';
+    FSources.Add(listline);
+  end;
+  conv := BIG_NUMBER;  // indicates being called from Options
+  DialogGraphSettings(fontsize, actiontype, FGraphSetting, FSources, conv, aSettings);
+  FGraphSetting.Free;
+  aList.Free;
+  FSources.Free;
+end;
+
+procedure DialogGraphSettings(fontsize: integer;  var okbutton: boolean;
+  aGraphSetting: TGraphSetting; DisplaySource: TStrings; var conv: integer; var aSettings: string);
+var
+  needtoadd, turnon: boolean;
+  i, j: integer;
+  dfntype, dsdisplay, dsitem, dsnum, filename, filenum, listitem, listline, t1, t2, value: string;
+  aList: TStrings;
+  frmGraphSettings: TfrmGraphSettings;
+begin
+  okbutton := false;
+  aSettings := '';
+  aList := TStringList.Create;
+  frmGraphSettings := TfrmGraphSettings.Create(Application);
+  try
+    with frmGraphSettings do
+    begin
+      FastAssign(rpcGetGraphSettings, aList);
+      t1 := aList[0]; t2 := aList[1];   // t1 are personal, t2 public settings
+      if length(t1) = 0 then t1 := t2;
+      SetPiece(t1, '|', 8, Piece(t2,'|', 8));
+      btnPersonal.Hint := t1;
+      btnPublic.Hint := t2;
+      aList.Clear;
+      FastAssign(rpcGetTypes('0', false), aList);
+      for i := 0 to aList.Count -1 do
+      begin
+        listline := aList[i];
+        dfntype := UpperCase(Piece(listline, '^', 1));
+        SetPiece(listline, '^', 1, dfntype);
+        aList[i] := listline;
+      end;
+      with lstSources.Items do
+      begin
+        Clear;
+        lstSourcesCopy.Items.Clear;
+        for i := 0 to aList.Count - 1 do
+        begin
+          listitem := aList[i];
+          filenum := Piece(listitem, '^', 1);
+          filename := Piece(listitem, '^', 2);
+          Add(filename);
+          lstSourcesCopy.Items.Add(filename + '^' + filenum);
+        end;
+        with lstSourcesCopy do
+        for i := 0 to Items.Count - 1 do
+        begin
+          listitem := Items[i];
+          filenum := Piece(listitem, '^', 2);
+          for j := 0 to DisplaySource.Count - 1 do
+          begin
+            dsitem := DisplaySource[j];
+            dsnum := Piece(dsitem, '^', 1);
+            dsdisplay := Piece(dsitem, '^', 3);
+            if filenum = dsnum then
+            begin
+              if dsdisplay = '1' then
+                lstSources.Checked[i] := true;
+              break;                         
+            end;
+          end;
+        end;
+      end;
+      with aGraphSetting do
+      begin
+        OptionSettings := '';
+        if Values then OptionSettings := OptionSettings + SETTING_VALUES;
+        if VerticalZoom then OptionSettings := OptionSettings + SETTING_VZOOM;
+        if HorizontalZoom then OptionSettings := OptionSettings + SETTING_HZOOM;
+        if View3D then OptionSettings := OptionSettings + SETTING_3D;
+        if Legend then OptionSettings := OptionSettings + SETTING_LEGEND;
+        if Lines then OptionSettings := OptionSettings + SETTING_LINES;
+        if Dates then OptionSettings := OptionSettings + SETTING_DATES;
+        if SortByType then OptionSettings := OptionSettings + SETTING_SORT;
+        if ClearBackground then OptionSettings := OptionSettings + SETTING_CLEAR;
+        if Gradient then OptionSettings := OptionSettings + SETTING_GRADIENT;
+        if Hints then OptionSettings := OptionSettings + SETTING_HINTS;
+        if StayOnTop then OptionSettings := OptionSettings + SETTING_TOP;
+        if FixedDateRange then OptionSettings := OptionSettings + SETTING_FIXED;
+        spnMaxGraphs.Position := MaxGraphs;
+        spnMinGraphHeight.Position := MinGraphHeight;
+        MaxSelect := Min(MaxSelectMax, MaxSelect);
+        if MaxSelect < MaxSelectMin then
+          MaxSelect := MaxSelectMin;
+        spnMaxSelect.Position := MaxSelect;
+        spnMaxSelect.Min := MaxSelectMin;
+        spnMaxSelect.Max := MaxSelectMax;
+        if SortByType then SortColumn := 1 else SortColumn := 0;
+        lstOptions.Tag := SortColumn;
+        if (SortColumn > 0) then
+          if Pos(SETTING_SORT, OptionSettings) = 0 then
+            OptionSettings := OptionSettings + SETTING_SORT;
+        for i := 0 to lstOptions.Items.Count - 1 do
+        begin
+          value := Piece(lstOptions.Items[i], '^', 2);
+          chklstOptions.Checked[i] := Pos(value, OptionSettings) > 0;
+        end;
+      end;
+      with spnMaxGraphs do
+        lblMaxGraphsRef.Caption := inttostr(Min) + ' to ' + inttostr(Max);
+      with spnMinGraphHeight do
+        lblMinGraphHeightRef.Caption := inttostr(Min) + ' to ' + inttostr(Max);
+      with spnMaxSelect do
+        lblMaxSelectRef.Caption := inttostr(Min) + ' to ' + inttostr(Max);
+      if conv = BIG_NUMBER then
+      begin
+        lblOptionsInfo.Visible := true;
+        frmGraphSettings.Caption := 'Graph Settings - Defaults Only';
+        lblConversions.Enabled := false;
+        cboConversions.Enabled := false;
+        cboConversions.ItemIndex := 0;
+        cboConversions.Text := '';
+      end
+      else
+      with cboConversions do
+      begin
+        lblOptionsInfo.Visible := false;
+        frmGraphSettings.Caption := 'Graph Settings';
+        if btnPublicSave.Enabled = true then
+        begin
+          lblConversions.Enabled := true;
+          Enabled := true;
+          ItemIndex := conv;
+          Text := Items[ItemIndex];
+        end
+        else
+        begin
+          lblConversions.Enabled := false;
+          cboConversions.Enabled := false;
+          cboConversions.ItemIndex := 0;
+          cboConversions.Text := '';
+        end;
+      end;
+      ResizeAnchoredFormToFont(frmGraphSettings);
+      ShowModal;
+      okbutton := (btnClose.Tag = 1);
+      if okbutton then
+      begin
+        aSettings := btnClose.Hint;
+        conv := cboConversions.ItemIndex;
+        with lstSources do
+        begin
+          for i := 0 to Items.Count - 1 do
+          begin
+            needtoadd := false;
+            if Checked[i] then
+              needtoadd := true;
+            filename := Piece(lstSourcesCopy.Items[i], '^', 1);
+            filenum := Piece(lstSourcesCopy.Items[i], '^', 2);
+            for j := 0 to DisplaySource.Count - 1 do
+            begin
+              dsitem := DisplaySource[j];
+              dsnum := Piece(dsitem, '^', 1);
+              if filenum = dsnum then
+              begin
+                needtoadd := false;
+                if Checked[i] then
+                  DisplaySource[j] := filenum + '^' + filename + '^1'
+                else
+                  DisplaySource[j] := filenum + '^' + filename + '^0';
+                break;
+              end;
+            end;
+            if needtoadd then
+              DisplaySource.Add('*^' + filenum + '^' + filename + '^1');
+          end;
+        end;
+        with aGraphSetting do
+        begin
+          MaxGraphs := spnMaxGraphs.Position;
+          MinGraphHeight := spnMinGraphHeight.Position;
+          MaxSelect := spnMaxSelect.Position;
+          MaxSelectMin := 1;
+          OptionSettings := '';
+          with chklstOptions do
+          for i := 0 to Items.Count - 1 do
+          begin
+            value := Piece(lstOptions.Items[i], '^', 2);
+            turnon := Checked[i];
+            if turnon then OptionSettings := OptionSettings + value;
+            if value = SETTING_VALUES then Values := turnon
+            else if value = SETTING_VZOOM then VerticalZoom := turnon
+            else if value = SETTING_HZOOM then HorizontalZoom := turnon
+            else if value = SETTING_3D then View3D := turnon
+            else if value = SETTING_LEGEND then Legend := turnon
+            else if value = SETTING_LINES then Lines := turnon
+            else if value = SETTING_DATES then Dates := turnon
+            else if value = SETTING_SORT then SortByType := turnon
+            else if value = SETTING_CLEAR then ClearBackground := turnon
+            else if value = SETTING_GRADIENT then Gradient := turnon
+            else if value = SETTING_HINTS then Hints := turnon
+            else if value = SETTING_FIXED then FixedDateRange := turnon
+            else if value = SETTING_TOP then StayOnTop := turnon;
+          end;
+          if SortByType then SortColumn := 1 else SortColumn := 0;
+        end;
+      end;
+    end;
+  finally
+    frmGraphSettings.Release;
+    aList.Free;
+  end;
+end;
+
+function FileNameX(filenum: string): string;
+var
+  i: integer;
+  typestring: string;
+  AllTypes: TStrings;
+begin
+  Result := '';
+  Alltypes := TStringList.Create;
+  for i := 0 to AllTypes.Count - 1 do
+  begin
+    typestring := AllTypes[i];
+    if Piece(typestring, '^', 1) = filenum then
+    begin
+      Result := Piece(AllTypes[i], '^', 2);
+      break;
+    end;
+  end;
+  if Result = '' then
+  begin
+    for i := 0 to AllTypes.Count - 1 do
+    begin
+      typestring := AllTypes[i];
+      if lowercase(Piece(typestring, '^', 1)) = filenum then
+      begin
+        Result := Piece(AllTypes[i], '^', 2);
+        break;
+      end;
+    end;
+  end;
+end;
+
+procedure TfrmGraphSettings.FormCreate(Sender: TObject);
+var
+  i: integer;
+begin
+  btnPublicSave.Enabled := rpcPublicEdit;
+  lblConversions.Enabled := btnPublicSave.Enabled;
+  cboConversions.Enabled := btnPublicSave.Enabled;
+  for i := 0 to lstOptions.Items.Count - 1 do
+   chklstOptions.Items.Add(Piece(lstOptions.Items[i], '^', 1));
+end;
+
+procedure TfrmGraphSettings.btnAllClick(Sender: TObject);
+var
+  i: integer;
+begin
+  for i := 0 to lstSources.Count - 1 do
+    lstSources.Checked[i] := (Sender = btnAll);
+end;
+
+procedure TfrmGraphSettings.btnCloseClick(Sender: TObject);
+begin
+  btnClose.Tag := 1; // forces check for changes
+  btnClose.Hint := DisplaySettings;
+  Close;
+end;
+
+function TfrmGraphSettings.DisplaySettings: string;
+var
+  i: integer;
+  delim, settings, value: string;
+begin
+  settings := '';
+  delim := '';
+  for i := 0 to lstSourcesCopy.Items.Count - 1 do
+  if lstSources.Checked[i] then
+  begin
+    settings := settings + delim + Piece(lstSourcesCopy.Items[i], '^', 2);
+    delim := ';';
+  end;
+  settings := settings + '|';
+  delim := '';
+  for i := 0 to chklstOptions.Items.Count - 1 do
+  begin
+    value := '';
+    if chklstOptions.Checked[i] then value := Piece(lstOptions.Items[i], '^', 2);
+    settings := settings + value;
+  end;
+  settings := settings + '|' + inttostr(lstOptions.Tag);  // sortorder
+  settings := settings + '|';
+  settings := settings + txtMaxGraphs.Text + '|';
+  settings := settings + txtMinGraphHeight.Text + '|';
+  settings := settings + '|';     // not used
+  settings := settings + txtMaxSelect.Text + '|';
+  settings := settings + Piece(btnPublic.Hint, '|', 8) + '|';
+  Result := settings;
+end;
+
+procedure TfrmGraphSettings.btnPublicClick(Sender: TObject);
+var
+  i, j, k: integer;
+  dfntype, filename, settings, settings1, settings2, value: string;
+begin
+  if Sender = btnPublic then
+    settings := btnPublic.Hint
+  else
+    settings := btnPersonal.Hint;
+  settings1 := Piece(settings, '|', 1);
+  settings2 := Piece(settings, '|', 2);  //piece 3 not used
+  spnMaxGraphs.Position := strtointdef(Piece(settings, '|', 4), 5);
+  spnMinGraphHeight.Position := strtointdef(Piece(settings, '|', 5), 90);  //piece 6 not used
+  spnMaxSelect.Position := strtointdef(Piece(settings, '|', 7), 100);
+  spnMaxSelect.Max := strtointdef(Piece(settings, '|', 8), 1000);
+  spnMaxGraphs.Tag := spnMaxGraphs.Position;
+  spnMinGraphHeight.Tag := spnMinGraphHeight.Position;
+  spnMaxSelect.Tag := spnMaxSelect.Position;
+  for i := 0 to lstOptions.Items.Count - 1 do
+  begin
+    value := Piece(lstOptions.Items[i], '^', 2);
+    chklstOptions.Checked[i] := Pos(value, settings2) > 0;
+  end;
+  for i := 0 to lstSources.Items.Count -1 do
+    lstSources.Checked[i] := false;
+  for i := 0 to BIG_NUMBER do
+  begin
+    dfntype := Piece(settings1, ';', i);
+    if length(dfntype) = 0 then break;
+    for j := 0 to lstSourcesCopy.Items.Count - 1 do
+    if dfntype = Piece(lstSourcesCopy.Items[j], '^', 2) then
+    begin
+      filename := Piece(lstSourcesCopy.Items[j], '^', 1);
+      for k := 0 to lstSources.Items.Count - 1 do
+        if filename = lstSources.Items[k] then
+        begin
+          lstSources.Checked[k] := true;
+          break;
+        end;
+      break;
+    end;
+  end;
+end;
+
+procedure TfrmGraphSettings.chklstOptionsClickCheck(Sender: TObject);
+var
+  value: string;
+begin
+  with chklstOptions do
+  begin
+    value := Piece(lstOptions.Items[ItemIndex], '^', 2);
+    if State[ItemIndex] = cbChecked then
+      if value = SETTING_CLEAR then
+        CheckSetting(SETTING_GRADIENT, false)
+      else if value = SETTING_GRADIENT then
+        CheckSetting(SETTING_CLEAR, false)
+      else if value = SETTING_VZOOM then
+        CheckSetting(SETTING_HZOOM, true);
+    if State[ItemIndex] = cbUnchecked then
+      if value = SETTING_HZOOM then
+        CheckSetting(SETTING_VZOOM, false);
+  end;
+end;
+
+procedure TfrmGraphSettings.CheckSetting(setting: string; turnon: boolean);
+var
+  i: integer;
+  value: string;
+begin
+  for i := 0 to lstOptions.Items.Count -1 do
+  begin
+    value := Piece(lstOptions.Items[i], '^', 2);
+    if value = setting then
+    begin
+      chklstOptions.Checked[i] := turnon;
+      break;
+    end;
+  end;
+end;
+
+procedure TfrmGraphSettings.SaveClick(Sender: TObject);
+var
+  info, settings: string;
+begin
+  if (Sender = btnPublicSave) then
+    info := 'This will change the PUBLIC default to these settings.'
+  else if (Sender = btnPersonalSave) then
+    info := 'This will change your personal default to these settings.';
+  info := info + #13 + 'Is this what you want to do?';
+  if MessageDlg(info, mtConfirmation, [mbYes, mbNo], 0) <> mrYes then
+  begin
+    showmessage('No changes were made.');
+    exit;
+  end;
+  settings := DisplaySettings;
+  if (Sender = btnPersonalSave) then
+  begin
+    rpcSetGraphSettings(settings, '0');
+    btnPersonal.Hint := settings;
+  end;
+  if (Sender = btnPublicSave) then
+  begin
+    rpcSetGraphSettings(settings, '1');
+    btnPublic.Hint := settings;
+  end;
+end;
+
+procedure TfrmGraphSettings.spnMaxGraphsClick(Sender: TObject;
+  Button: TUDBtnType);
+begin
+  txtMaxGraphs.SetFocus;
+  txtMaxGraphs.Tag := strtointdef(txtMaxGraphs.Text, spnMaxGraphs.Min);
+end;
+
+procedure TfrmGraphSettings.txtMaxGraphsChange(Sender: TObject);
+var
+  maxvalue, minvalue: integer;
+begin
+  maxvalue := spnMaxGraphs.Max;
+  minvalue := spnMaxGraphs.Min;
+  if strtointdef(txtMaxGraphs.Text, maxvalue) > maxvalue then
+  begin
+    beep;
+    InfoBox('Number must be < ' + inttostr(maxvalue), 'Warning', MB_OK or MB_ICONWARNING);
+    if strtointdef(txtMaxGraphs.Text, 0) > maxvalue then
+      txtMaxGraphs.Text := inttostr(maxvalue);
+  end;
+  if strtointdef(txtMaxGraphs.Text, minvalue) < minvalue then
+  begin
+    beep;
+    InfoBox('Number must be > ' + inttostr(minvalue), 'Warning', MB_OK or MB_ICONWARNING);
+    if strtointdef(txtMaxGraphs.Text, 0) < minvalue then
+      txtMaxGraphs.Text := inttostr(minvalue);
+  end;
+  spnMaxGraphsClick(self, btNext);
+end;
+
+procedure TfrmGraphSettings.txtMaxGraphsExit(Sender: TObject);
+begin
+  with txtMaxGraphs do
+  if Text = '' then
+  begin
+    Text := inttostr(spnMaxGraphs.Min);
+    spnMaxGraphsClick(self, btNext);
+  end
+  else if (copy(Text, 1, 1) = '0') and (length(Text) > 1) then
+  begin
+    Text := inttostr(strtointdef(Text, 0));
+    if Text = '0' then
+      Text := inttostr(spnMaxGraphs.Min);
+    spnMaxGraphsClick(self, btNext);
+  end;
+end;
+
+procedure TfrmGraphSettings.txtMaxGraphsKeyPress(Sender: TObject;
+  var Key: Char);
+begin
+  if Key = #13 then
+  begin
+    Perform(WM_NextDlgCtl, 0, 0);
+    exit;
+  end;
+  if not (Key in ['0'..'9', #8]) then
+  begin
+    Key := #0;
+    beep;
+  end;
+end;
+
+procedure TfrmGraphSettings.spnMinGraphHeightClick(Sender: TObject;
+  Button: TUDBtnType);
+begin
+  txtMinGraphHeight.SetFocus;
+  txtMinGraphHeight.Tag := strtointdef(txtMinGraphHeight.Text, spnMinGraphHeight.Min);
+end;
+
+procedure TfrmGraphSettings.spnMaxSelectClick(Sender: TObject;
+  Button: TUDBtnType);
+begin
+  txtMaxSelect.SetFocus;
+  txtMaxSelect.Tag := strtointdef(txtMaxSelect.Text, spnMaxSelect.Min);
+end;
+
+procedure TfrmGraphSettings.txtMinGraphHeightChange(Sender: TObject);
+var
+  maxvalue, minvalue: integer;
+begin
+  maxvalue := spnMinGraphHeight.Max;
+  minvalue := spnMinGraphHeight.Min;
+  if strtointdef(txtMinGraphHeight.Text, maxvalue) > maxvalue then
+  begin
+    beep;
+    InfoBox('Number must be < ' + inttostr(maxvalue), 'Warning', MB_OK or MB_ICONWARNING);
+    if strtointdef(txtMinGraphHeight.Text, 0) > maxvalue then
+      txtMinGraphHeight.Text := inttostr(maxvalue);
+  end;
+  if strtointdef(txtMinGraphHeight.Text, minvalue) < minvalue then
+    if txtMinGraphHeight.Hint = KEYPRESS_OFF then
+    begin
+      beep;
+      InfoBox('Number must be > ' + inttostr(minvalue), 'Warning', MB_OK or MB_ICONWARNING);
+      if strtointdef(txtMinGraphHeight.Text, 0) < minvalue then
+        txtMinGraphHeight.Text := inttostr(minvalue);
+    end;
+  spnMinGraphHeightClick(self, btNext);
+  txtMinGraphHeight.Hint := KEYPRESS_OFF;
+end;
+
+procedure TfrmGraphSettings.txtMaxSelectChange(Sender: TObject);
+var
+  maxvalue, minvalue: integer;
+begin
+  maxvalue := spnMaxSelect.Max;
+  minvalue := spnMaxSelect.Min;
+  if strtointdef(txtMaxSelect.Text, maxvalue) > maxvalue then
+  begin
+    beep;
+    InfoBox('Number must be < ' + inttostr(maxvalue), 'Warning', MB_OK or MB_ICONWARNING);
+    if strtointdef(txtMaxSelect.Text, 0) > maxvalue then
+      txtMaxSelect.Text := inttostr(maxvalue);
+  end;
+  if strtointdef(txtMaxSelect.Text, minvalue) < minvalue then
+    if txtMaxSelect.Hint = KEYPRESS_OFF then
+    begin
+      beep;
+      InfoBox('Number must be > ' + inttostr(minvalue), 'Warning', MB_OK or MB_ICONWARNING);
+      if strtointdef(txtMaxSelect.Text, 0) < minvalue then
+        txtMaxSelect.Text := inttostr(minvalue);
+    end;
+  spnMaxSelectClick(self, btNext);
+  txtMaxSelect.Hint := KEYPRESS_OFF;
+end;
+
+procedure TfrmGraphSettings.txtMinGraphHeightExit(Sender: TObject);
+begin
+  with txtMinGraphHeight do
+  if Text = '' then
+  begin
+    Text := inttostr(spnMinGraphHeight.Min);
+    spnMinGraphHeightClick(self, btNext);
+  end
+  else if (copy(Text, 1, 1) = '0') and (length(Text) > 1) then
+  begin
+    Text := inttostr(strtointdef(Text, 0));
+    if Text = '0' then
+      Text := inttostr(spnMinGraphHeight.Min);
+    spnMinGraphHeightClick(self, btNext);
+  end
+  else if strtointdef(txtMinGraphHeight.Text, spnMinGraphHeight.Min) < spnMinGraphHeight.Min then
+  begin
+    Text := inttostr(spnMinGraphHeight.Min);
+    spnMinGraphHeightClick(self, btNext);
+  end;
+end;
+
+procedure TfrmGraphSettings.txtMaxSelectExit(Sender: TObject);
+begin
+  with txtMaxSelect do
+  if Text = '' then
+  begin
+    Text := inttostr(spnMaxSelect.Min);
+    spnMaxSelectClick(self, btNext);
+  end
+  else if (copy(Text, 1, 1) = '0') and (length(Text) > 1) then
+  begin
+    Text := inttostr(strtointdef(Text, 0));
+    if Text = '0' then
+      Text := inttostr(spnMaxSelect.Min);
+    spnMaxSelectClick(self, btNext);
+  end
+  else if strtointdef(txtMaxSelect.Text, spnMaxSelect.Min) < spnMaxSelect.Min then
+  begin
+    Text := inttostr(spnMaxSelect.Min);
+    spnMaxSelectClick(self, btNext);
+  end;
+end;
+
+procedure TfrmGraphSettings.txtMinGraphHeightKeyPress(Sender: TObject;
+  var Key: Char);
+begin
+  txtMinGraphHeight.Hint := KEYPRESS_OFF;
+  if Key = #13 then
+  begin
+    Perform(WM_NextDlgCtl, 0, 0);
+    exit;
+  end;
+  if not (Key in ['0'..'9', #8]) then
+  begin
+    Key := #0;
+    beep;
+    exit;
+  end;
+  txtMinGraphHeight.Hint := KEYPRESS_ON;
+end;
+
+procedure TfrmGraphSettings.txtMaxSelectKeyPress(Sender: TObject;
+  var Key: Char);
+begin
+  txtMaxSelect.Hint := KEYPRESS_OFF;
+  if Key = #13 then
+  begin
+    Perform(WM_NextDlgCtl, 0, 0);
+    exit;
+  end;
+  if not (Key in ['0'..'9', #8]) then
+  begin
+    Key := #0;
+    beep;
+    exit;
+  end;
+  txtMaxSelect.Hint := KEYPRESS_ON;
+end;
+
+procedure TfrmGraphSettings.FormShow(Sender: TObject);
+begin
+  if Caption = 'Graph Settings - Defaults Only' then
+    btnPersonal.SetFocus;
+  FHintPauseTime := Application.HintHidePause;
+  Application.HintHidePause := 9000; // uses a longer hint pause time
+end;
+
+procedure TfrmGraphSettings.AssignHints;
+var
+  i: integer;
+begin                       // text defined in uGraphs
+  for i := 0 to ControlCount - 1 do with Controls[i] do
+    Controls[i].ShowHint := true;
+  lblSources.Hint := SHINT_SOURCES;
+  lstSources.Hint := SHINT_SOURCES;
+  lblOptions.Hint := SHINT_OPTIONS;
+  chklstOptions.Hint := SHINT_OPTIONS;
+  btnAll.Hint := SHINT_BTN_ALL;
+  brnClear.Hint := SHINT_BTN_CLEAR;
+  lblShow.Hint := SHINT_BTN_SHOW;
+  lblSave.Hint := SHINT_BTN_SAVE;
+  btnPersonal.Hint := SHINT_BTN_PER;
+  btnPersonalSave.Hint := SHINT_BTN_PERSAVE;
+  btnPublic.Hint := SHINT_BTN_PUB;
+  btnPublicSave.Hint := SHINT_BTN_PUBSAVE;
+  lblOptionsInfo.Hint := SHINT_BTN_CLOSE;
+  btnClose.Hint := SHINT_BTN_CLOSE;
+  lblMaxGraphs.Hint := SHINT_MAX;
+  txtMaxGraphs.Hint := SHINT_MAX;
+  spnMaxGraphs.Hint := SHINT_MAX;
+  lblMaxGraphsRef.Hint := SHINT_MAX ;
+  lblMinGraphHeight.Hint := SHINT_MIN;
+  txtMinGraphHeight.Hint := SHINT_MIN;
+  spnMinGraphHeight.Hint := SHINT_MIN;
+  lblMinGraphHeightRef.Hint := SHINT_MIN;
+  lblMaxSelect.Hint := SHINT_MAX_ITEMS;
+  txtMaxSelect.Hint := SHINT_MAX_ITEMS;
+  spnMaxSelect.Hint := SHINT_MAX_ITEMS;
+  lblMaxSelectRef.Hint := SHINT_MAX_ITEMS;
+  lblConversions.Hint := SHINT_FUNCTIONS;
+  cboConversions.Hint := SHINT_FUNCTIONS;
+end;
+
+procedure TfrmGraphSettings.wmNCLButtonDown(var Msg: TWMNCLButtonDown);
+begin            // clicking the ? button will have controls show hints
+  if Msg.HitTest = HTHELP then
+  begin
+    Msg.Result := 0; // ignore biHelp border icon
+    AssignHints;
+    ShowMessage('Help is now available.' + #13 +
+                'By pausing over a list or control, hints will appear.');
+  end
+  else
+    inherited;
+end;
+
+procedure TfrmGraphSettings.FormClose(Sender: TObject;
+  var Action: TCloseAction);
+begin
+  Application.HintHidePause := FHintPauseTime;
+end;
+
+end.
Index: cprs/branches/foia-cprs/CPRS-Chart/fGraphs.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fGraphs.dfm	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/fGraphs.dfm	(revision 460)
@@ -0,0 +1,1243 @@
+object frmGraphs: TfrmGraphs
+  Left = 524
+  Top = 105
+  BorderIcons = []
+  BorderStyle = bsNone
+  Caption = 'CPRS Graphing - CPRSpatient,One'
+  ClientHeight = 412
+  ClientWidth = 592
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  OldCreateOrder = False
+  PopupMenu = mnuPopGraphStuff
+  OnClose = FormClose
+  OnCreate = FormCreate
+  OnDestroy = FormDestroy
+  OnShow = FormShow
+  PixelsPerInch = 96
+  TextHeight = 13
+  object pnlHeader: TPanel
+    Left = 0
+    Top = 0
+    Width = 592
+    Height = 21
+    Align = alTop
+    BevelOuter = bvNone
+    TabOrder = 0
+    object pnlTemp: TPanel
+      Left = 416
+      Top = 0
+      Width = 73
+      Height = 17
+      TabOrder = 1
+      Visible = False
+    end
+    object pnlInfo: TORAutoPanel
+      Left = 0
+      Top = 0
+      Width = 592
+      Height = 21
+      Align = alClient
+      BevelOuter = bvNone
+      Caption = 'Select multiple items using Ctrl-click or Shift-click.'
+      Color = clCream
+      Font.Charset = DEFAULT_CHARSET
+      Font.Color = clWindowText
+      Font.Height = -11
+      Font.Name = 'MS Sans Serif'
+      Font.Style = []
+      ParentFont = False
+      TabOrder = 2
+    end
+    object chartBase: TChart
+      Left = 145
+      Top = 0
+      Width = 105
+      Height = 17
+      AllowPanning = pmNone
+      AllowZoom = False
+      BackWall.Brush.Color = clWhite
+      BackWall.Brush.Style = bsClear
+      Gradient.EndColor = clPurple
+      Gradient.Visible = True
+      Title.Text.Strings = (
+        'fsdfs dfs fsd')
+      Title.Visible = False
+      OnClickLegend = chartBaseClickLegend
+      OnClickSeries = chartBaseClickSeries
+      OnUndoZoom = ChartOnUndoZoom
+      OnZoom = ChartOnZoom
+      BottomAxis.Automatic = False
+      BottomAxis.AutomaticMaximum = False
+      BottomAxis.AutomaticMinimum = False
+      BottomAxis.Increment = 0.000694444444444444
+      BottomAxis.Maximum = 25
+      BottomAxis.Visible = False
+      Legend.Alignment = laTop
+      Legend.LegendStyle = lsSeries
+      Legend.ResizeChart = False
+      TopAxis.LabelsOnAxis = False
+      View3D = False
+      Color = clRed
+      TabOrder = 0
+      Visible = False
+      OnDblClick = mnuPopGraphDetailsClick
+      OnMouseDown = chartBaseMouseDown
+    end
+  end
+  object pnlFooter: TPanel
+    Left = 0
+    Top = 383
+    Width = 592
+    Height = 29
+    Align = alBottom
+    BevelOuter = bvNone
+    TabOrder = 2
+    object lblDateRange: TLabel
+      Left = 3
+      Top = 8
+      Width = 61
+      Height = 13
+      Caption = 'Date Range:'
+    end
+    object btnClose: TButton
+      Left = 510
+      Top = 4
+      Width = 70
+      Height = 21
+      Caption = 'Close'
+      TabOrder = 4
+      OnClick = btnCloseClick
+    end
+    object btnChangeSettings: TButton
+      Left = 380
+      Top = 4
+      Width = 85
+      Height = 21
+      Caption = 'Settings...'
+      TabOrder = 3
+      OnClick = btnChangeSettingsClick
+    end
+    object cboDateRange: TORComboBox
+      Left = 68
+      Top = 4
+      Width = 121
+      Height = 21
+      Style = orcsDropDown
+      AutoSelect = True
+      Color = clWindow
+      DropDownCount = 9
+      Items.Strings = (
+        'S^Date Range...'
+        '1^Today'
+        '2^One Week'
+        '3^Two Weeks'
+        '4^One Month'
+        '5^Six Months'
+        '6^One Year'
+        '7^Two Years'
+        '8^All Results')
+      ItemHeight = 13
+      ItemTipColor = clWindow
+      ItemTipEnable = True
+      ListItemsOnly = False
+      LongList = False
+      LookupPiece = 0
+      MaxLength = 0
+      Pieces = '2'
+      Sorted = False
+      SynonymChars = '<>'
+      TabOrder = 0
+      TabStop = True
+      OnChange = cboDateRangeChange
+      OnDropDown = cboDateRangeDropDown
+      CharsNeedMatch = 1
+    end
+    object chkDualViews: TCheckBox
+      Left = 197
+      Top = 7
+      Width = 85
+      Height = 17
+      Caption = 'Split Views'
+      TabOrder = 1
+      OnClick = chkDualViewsClick
+    end
+    object btnGraphSelections: TButton
+      Left = 284
+      Top = 4
+      Width = 85
+      Height = 21
+      Caption = 'Select/Define...'
+      TabOrder = 2
+      OnClick = btnGraphSelectionsClick
+    end
+  end
+  object pnlMain: TPanel
+    Left = 0
+    Top = 21
+    Width = 592
+    Height = 362
+    Align = alClient
+    BevelOuter = bvNone
+    TabOrder = 1
+    object splGraphs: TSplitter
+      Left = 0
+      Top = 261
+      Width = 592
+      Height = 3
+      Cursor = crVSplit
+      Align = alBottom
+      Beveled = True
+      Color = clBtnShadow
+      ParentColor = False
+      OnMoved = splGraphsMoved
+    end
+    object pnlTop: TPanel
+      Tag = 1
+      Left = 0
+      Top = 0
+      Width = 592
+      Height = 261
+      Align = alClient
+      BevelOuter = bvNone
+      TabOrder = 0
+      object splItemsTop: TSplitter
+        Left = 148
+        Top = 0
+        Width = 2
+        Height = 261
+        Cursor = crHSplit
+        AutoSnap = False
+        Beveled = True
+        MinSize = 15
+        OnMoved = splItemsTopMoved
+      end
+      object pnlItemsTop: TPanel
+        Left = 0
+        Top = 0
+        Width = 148
+        Height = 261
+        Align = alLeft
+        BevelOuter = bvNone
+        TabOrder = 0
+        object pnlItemsTopInfo: TPanel
+          Left = 0
+          Top = 0
+          Width = 148
+          Height = 25
+          Align = alTop
+          BevelOuter = bvNone
+          TabOrder = 0
+          DesignSize = (
+            148
+            25)
+          object bvlBottomLeft: TBevel
+            Left = 0
+            Top = 0
+            Width = 2
+            Height = 25
+            Align = alLeft
+          end
+          object bvlBottomRight: TBevel
+            Left = 146
+            Top = 0
+            Width = 2
+            Height = 25
+            Align = alRight
+            Visible = False
+          end
+          object lblViewsTop: TOROffsetLabel
+            Left = 2
+            Top = 0
+            Width = 28
+            Height = 25
+            Align = alLeft
+            Caption = 'View:'
+            HorzOffset = 2
+            Transparent = False
+            VertOffset = 8
+            WordWrap = False
+          end
+          object chkItemsTop: TCheckBox
+            Left = 40
+            Top = 5
+            Width = 105
+            Height = 20
+            Alignment = taLeftJustify
+            Anchors = [akTop, akRight]
+            Caption = 'Individual Graphs'
+            TabOrder = 0
+            OnClick = chkItemsTopClick
+          end
+        end
+        object lvwItemsTop: TListView
+          Left = 0
+          Top = 46
+          Width = 148
+          Height = 215
+          Align = alClient
+          BevelInner = bvNone
+          BevelOuter = bvNone
+          Columns = <
+            item
+              Caption = 'Item'
+              Width = 100
+            end
+            item
+              Caption = 'Type'
+              Width = 60
+            end
+            item
+              Caption = 'View'
+              Width = 40
+            end
+            item
+              Caption = 'Classification'
+            end>
+          HideSelection = False
+          MultiSelect = True
+          ReadOnly = True
+          RowSelect = True
+          ParentShowHint = False
+          ShowHint = False
+          TabOrder = 2
+          ViewStyle = vsReport
+          OnChange = lvwItemsTopChange
+          OnClick = lvwItemsTopClick
+          OnColumnClick = lvwItemsTopColumnClick
+          OnCompare = lvwItemsTopCompare
+          OnEnter = lvwItemsTopEnter
+          OnKeyDown = lvwItemsTopKeyDown
+        end
+        object pnlViewsTopSpacer: TPanel
+          Left = 0
+          Top = 25
+          Width = 148
+          Height = 21
+          Align = alTop
+          BevelOuter = bvNone
+          TabOrder = 1
+          object cboViewsTop: TORComboBox
+            Left = 0
+            Top = 0
+            Width = 140
+            Height = 21
+            Style = orcsDropDown
+            Align = alClient
+            AutoSelect = True
+            Color = clWindow
+            DropDownCount = 12
+            ItemHeight = 13
+            ItemTipColor = clWindow
+            ItemTipEnable = True
+            ListItemsOnly = False
+            LongList = False
+            LookupPiece = 0
+            MaxLength = 0
+            Pieces = '2'
+            Sorted = False
+            SynonymChars = '<>'
+            TabOrder = 0
+            TabStop = True
+            OnChange = cboViewsTopChange
+            OnDropDown = cboViewsTopDropDown
+            OnDropDownClose = cboViewsTopDropDownClose
+            CharsNeedMatch = 1
+          end
+          object pnlViewsTopSpacerRight: TPanel
+            Left = 140
+            Top = 0
+            Width = 8
+            Height = 21
+            Align = alRight
+            BevelOuter = bvNone
+            TabOrder = 1
+          end
+        end
+      end
+      object pnlTopRightPad: TPanel
+        Tag = 50
+        Left = 577
+        Top = 0
+        Width = 15
+        Height = 261
+        Align = alRight
+        BevelOuter = bvNone
+        TabOrder = 1
+      end
+      object pnlScrollTopBase: TPanel
+        Left = 150
+        Top = 0
+        Width = 427
+        Height = 261
+        Align = alClient
+        BevelOuter = bvNone
+        TabOrder = 2
+        OnResize = pnlScrollTopBaseResize
+        object pnlBlankTop: TPanel
+          Left = 0
+          Top = 233
+          Width = 427
+          Height = 20
+          Align = alClient
+          BevelOuter = bvNone
+          TabOrder = 3
+          Visible = False
+        end
+        object scrlTop: TScrollBox
+          Tag = 5
+          Left = 0
+          Top = 233
+          Width = 427
+          Height = 20
+          Align = alClient
+          BevelInner = bvNone
+          BevelOuter = bvNone
+          BorderStyle = bsNone
+          Color = clBtnFace
+          ParentColor = False
+          TabOrder = 0
+        end
+        object pnlDatelineTop: TPanel
+          Left = 0
+          Top = 231
+          Width = 427
+          Height = 30
+          Align = alBottom
+          BevelOuter = bvNone
+          TabOrder = 1
+          object chartDatelineTop: TChart
+            Left = 20
+            Top = 0
+            Width = 407
+            Height = 30
+            AllowPanning = pmNone
+            BackWall.Brush.Color = clWhite
+            BackWall.Brush.Style = bsClear
+            BackWall.Pen.Visible = False
+            Gradient.EndColor = clWhite
+            Gradient.StartColor = 8421631
+            Title.Text.Strings = (
+              '')
+            Title.Visible = False
+            OnClickLegend = chartBaseClickLegend
+            OnClickSeries = chartBaseClickSeries
+            OnUndoZoom = ChartOnUndoZoom
+            OnZoom = ChartOnZoom
+            BottomAxis.Automatic = False
+            BottomAxis.AutomaticMaximum = False
+            BottomAxis.AutomaticMinimum = False
+            BottomAxis.DateTimeFormat = 'M/d/yyyy'
+            BottomAxis.Increment = 0.000694444444444444
+            BottomAxis.Maximum = 25
+            Frame.Visible = False
+            LeftAxis.Automatic = False
+            LeftAxis.AutomaticMaximum = False
+            LeftAxis.AutomaticMinimum = False
+            LeftAxis.Axis.Visible = False
+            LeftAxis.Grid.Visible = False
+            LeftAxis.Labels = False
+            LeftAxis.LabelsOnAxis = False
+            LeftAxis.Maximum = 9
+            LeftAxis.MinorGrid.Visible = True
+            LeftAxis.RoundFirstLabel = False
+            LeftAxis.Title.Caption = ' '
+            LeftAxis.Visible = False
+            Legend.Alignment = laBottom
+            Legend.Color = clCream
+            Legend.LegendStyle = lsSeries
+            Legend.ShadowSize = 1
+            Legend.Visible = False
+            RightAxis.Automatic = False
+            RightAxis.AutomaticMaximum = False
+            RightAxis.AutomaticMinimum = False
+            RightAxis.Axis.Visible = False
+            RightAxis.Labels = False
+            RightAxis.LabelsOnAxis = False
+            RightAxis.RoundFirstLabel = False
+            RightAxis.Visible = False
+            TopAxis.LabelsOnAxis = False
+            View3D = False
+            View3DWalls = False
+            Align = alClient
+            BevelOuter = bvNone
+            TabOrder = 0
+            OnDblClick = mnuPopGraphDetailsClick
+            OnMouseDown = chartBaseMouseDown
+            object serDatelineTop: TGanttSeries
+              ColorEachPoint = True
+              Marks.ArrowLength = 0
+              Marks.Visible = False
+              SeriesColor = clRed
+              ShowInLegend = False
+              OnGetMarkText = serDatelineTopGetMarkText
+              Pointer.InflateMargins = False
+              Pointer.Style = psRectangle
+              Pointer.Visible = True
+              XValues.DateTime = True
+              XValues.Name = 'Start'
+              XValues.Multiplier = 1
+              XValues.Order = loAscending
+              YValues.DateTime = False
+              YValues.Name = 'Y'
+              YValues.Multiplier = 1
+              YValues.Order = loNone
+              StartValues.DateTime = True
+              StartValues.Name = 'Start'
+              StartValues.Multiplier = 1
+              StartValues.Order = loAscending
+              EndValues.DateTime = True
+              EndValues.Name = 'End'
+              EndValues.Multiplier = 1
+              EndValues.Order = loNone
+              NextTask.DateTime = False
+              NextTask.Name = 'NextTask'
+              NextTask.Multiplier = 1
+              NextTask.Order = loNone
+            end
+          end
+          object pnlDatelineTopSpacer: TORAutoPanel
+            Left = 0
+            Top = 0
+            Width = 20
+            Height = 30
+            Align = alLeft
+            BevelOuter = bvNone
+            TabOrder = 1
+          end
+        end
+        object pnlData: TPanel
+          Left = 0
+          Top = 0
+          Width = 427
+          Height = 233
+          Align = alTop
+          Caption = 'pnlData'
+          TabOrder = 2
+          Visible = False
+          DesignSize = (
+            427
+            233)
+          object lstZoomHistory: TListBox
+            Left = 336
+            Top = 4
+            Width = 82
+            Height = 33
+            Anchors = [akLeft, akTop, akRight]
+            ItemHeight = 13
+            TabOrder = 22
+          end
+          object lstTypes: TListBox
+            Left = 8
+            Top = 119
+            Width = 413
+            Height = 33
+            Anchors = [akLeft, akTop, akRight]
+            ItemHeight = 13
+            TabOrder = 0
+          end
+          object lstItemsTemp: TListBox
+            Left = 8
+            Top = 4
+            Width = 73
+            Height = 33
+            ItemHeight = 13
+            TabOrder = 1
+          end
+          object lstAllTypes: TListBox
+            Left = 254
+            Top = 4
+            Width = 82
+            Height = 33
+            Anchors = [akLeft, akTop, akRight]
+            ItemHeight = 13
+            TabOrder = 2
+          end
+          object lstItems: TListBox
+            Left = 8
+            Top = 158
+            Width = 413
+            Height = 33
+            Anchors = [akLeft, akTop, akRight]
+            ItemHeight = 13
+            TabOrder = 3
+          end
+          object lstData: TListBox
+            Left = 8
+            Top = 81
+            Width = 413
+            Height = 33
+            Anchors = [akLeft, akTop, akRight]
+            ItemHeight = 13
+            TabOrder = 4
+          end
+          object lstSpec2: TListBox
+            Left = 188
+            Top = 43
+            Width = 42
+            Height = 33
+            ItemHeight = 13
+            TabOrder = 5
+          end
+          object lstSpec1: TListBox
+            Left = 143
+            Top = 43
+            Width = 42
+            Height = 33
+            ItemHeight = 13
+            TabOrder = 6
+          end
+          object lstSpec3: TListBox
+            Left = 233
+            Top = 43
+            Width = 42
+            Height = 33
+            ItemHeight = 13
+            TabOrder = 7
+          end
+          object lstSpec4: TListBox
+            Left = 278
+            Top = 43
+            Width = 42
+            Height = 33
+            ItemHeight = 13
+            TabOrder = 8
+          end
+          object lstMultiSpec: TListBox
+            Left = 320
+            Top = 43
+            Width = 45
+            Height = 33
+            ItemHeight = 13
+            TabOrder = 10
+          end
+          object lstTestSpec: TListBox
+            Left = 368
+            Top = 43
+            Width = 42
+            Height = 33
+            ItemHeight = 13
+            TabOrder = 11
+          end
+          object lstSelCopyBottom: TListBox
+            Left = 283
+            Top = 195
+            Width = 41
+            Height = 33
+            ItemHeight = 13
+            TabOrder = 15
+          end
+          object lstTempCheck: TListBox
+            Left = 53
+            Top = 195
+            Width = 41
+            Height = 33
+            ItemHeight = 13
+            MultiSelect = True
+            TabOrder = 18
+          end
+          object lstViews: TListBox
+            Left = 191
+            Top = 195
+            Width = 41
+            Height = 33
+            ItemHeight = 13
+            MultiSelect = True
+            TabOrder = 19
+          end
+          object lstScratchTemp: TListBox
+            Left = 53
+            Top = 43
+            Width = 42
+            Height = 33
+            ItemHeight = 13
+            TabOrder = 20
+          end
+          object lstScratchLab: TListBox
+            Left = 98
+            Top = 43
+            Width = 42
+            Height = 33
+            ItemHeight = 13
+            TabOrder = 21
+          end
+          object lstCheck: TListBox
+            Left = 172
+            Top = 5
+            Width = 73
+            Height = 33
+            ItemHeight = 13
+            MultiSelect = True
+            TabOrder = 13
+          end
+          object lstSelCopyTop: TListBox
+            Left = 237
+            Top = 195
+            Width = 41
+            Height = 33
+            ItemHeight = 13
+            TabOrder = 16
+          end
+          object lstScratchSwap: TListBox
+            Left = 8
+            Top = 43
+            Width = 41
+            Height = 33
+            ItemHeight = 13
+            TabOrder = 9
+          end
+          object lstNonNumeric: TListBox
+            Left = 90
+            Top = 4
+            Width = 79
+            Height = 33
+            ItemHeight = 13
+            TabOrder = 12
+          end
+          object lstDrugClass: TListBox
+            Left = 8
+            Top = 195
+            Width = 41
+            Height = 33
+            ItemHeight = 13
+            TabOrder = 14
+          end
+          object lstSelPrevTop: TListBox
+            Left = 329
+            Top = 195
+            Width = 41
+            Height = 33
+            ItemHeight = 13
+            TabOrder = 23
+          end
+          object lstSelPrevBottom: TListBox
+            Left = 375
+            Top = 195
+            Width = 41
+            Height = 33
+            ItemHeight = 13
+            TabOrder = 24
+          end
+          object lstTemp: TListBox
+            Left = 99
+            Top = 195
+            Width = 41
+            Height = 33
+            ItemHeight = 13
+            MultiSelect = True
+            TabOrder = 17
+          end
+          object lstComp: TListBox
+            Left = 145
+            Top = 195
+            Width = 41
+            Height = 33
+            ItemHeight = 13
+            MultiSelect = True
+            TabOrder = 25
+          end
+        end
+      end
+    end
+    object pnlBottom: TPanel
+      Tag = 1
+      Left = 0
+      Top = 264
+      Width = 592
+      Height = 98
+      Align = alBottom
+      BevelOuter = bvNone
+      TabOrder = 1
+      object splItemsBottom: TSplitter
+        Left = 148
+        Top = 0
+        Width = 2
+        Height = 98
+        Cursor = crHSplit
+        AutoSnap = False
+        Beveled = True
+        MinSize = 15
+        OnMoved = splItemsBottomMoved
+      end
+      object pnlItemsBottom: TPanel
+        Left = 0
+        Top = 0
+        Width = 148
+        Height = 98
+        Align = alLeft
+        BevelOuter = bvNone
+        TabOrder = 0
+        object pnlItemsBottomInfo: TPanel
+          Left = 0
+          Top = 0
+          Width = 148
+          Height = 25
+          Align = alTop
+          BevelOuter = bvNone
+          TabOrder = 0
+          DesignSize = (
+            148
+            25)
+          object bvlTopLeft: TBevel
+            Left = 0
+            Top = 0
+            Width = 2
+            Height = 25
+            Align = alLeft
+          end
+          object bvlTopRight: TBevel
+            Left = 146
+            Top = 0
+            Width = 2
+            Height = 25
+            Align = alRight
+            Visible = False
+          end
+          object lblViewsBottom: TOROffsetLabel
+            Left = 2
+            Top = 0
+            Width = 28
+            Height = 25
+            Align = alLeft
+            Caption = 'View:'
+            HorzOffset = 2
+            Transparent = False
+            VertOffset = 8
+            WordWrap = False
+          end
+          object chkItemsBottom: TCheckBox
+            Left = 40
+            Top = 5
+            Width = 105
+            Height = 20
+            Alignment = taLeftJustify
+            Anchors = [akTop, akRight]
+            Caption = 'Individual Graphs'
+            TabOrder = 0
+            OnClick = chkItemsBottomClick
+            OnEnter = chkItemsBottomEnter
+          end
+        end
+        object lvwItemsBottom: TListView
+          Left = 0
+          Top = 46
+          Width = 148
+          Height = 52
+          Align = alClient
+          BevelInner = bvNone
+          BevelOuter = bvNone
+          Columns = <
+            item
+              Caption = 'Item'
+              Width = 100
+            end
+            item
+              Caption = 'Type'
+              Width = 60
+            end
+            item
+              Caption = 'View'
+              Width = 40
+            end
+            item
+              Caption = 'Classification'
+            end>
+          HideSelection = False
+          MultiSelect = True
+          ReadOnly = True
+          RowSelect = True
+          ParentShowHint = False
+          ShowHint = False
+          TabOrder = 2
+          ViewStyle = vsReport
+          OnChange = lvwItemsBottomChange
+          OnClick = lvwItemsBottomClick
+          OnColumnClick = lvwItemsBottomColumnClick
+          OnCompare = lvwItemsBottomCompare
+          OnEnter = lvwItemsBottomEnter
+          OnKeyDown = lvwItemsTopKeyDown
+        end
+        object pnlViewsBottomSpacer: TPanel
+          Left = 0
+          Top = 25
+          Width = 148
+          Height = 21
+          Align = alTop
+          BevelOuter = bvNone
+          TabOrder = 1
+          object cboViewsBottom: TORComboBox
+            Left = 0
+            Top = 0
+            Width = 140
+            Height = 21
+            Style = orcsDropDown
+            Align = alClient
+            AutoSelect = True
+            Color = clWindow
+            DropDownCount = 12
+            ItemHeight = 13
+            ItemTipColor = clWindow
+            ItemTipEnable = True
+            ListItemsOnly = False
+            LongList = False
+            LookupPiece = 0
+            MaxLength = 0
+            Pieces = '2'
+            Sorted = False
+            SynonymChars = '<>'
+            TabOrder = 0
+            TabStop = True
+            OnChange = cboViewsBottomChange
+            OnDropDown = cboViewsBottomDropDown
+            OnDropDownClose = cboViewsBottomDropDownClose
+            OnEnter = cboViewsBottomEnter
+            CharsNeedMatch = 1
+          end
+          object pnlViewsBottomSpacerRight: TPanel
+            Left = 140
+            Top = 0
+            Width = 8
+            Height = 21
+            Align = alRight
+            BevelOuter = bvNone
+            TabOrder = 1
+          end
+        end
+      end
+      object pnlBottomRightPad: TPanel
+        Tag = 50
+        Left = 577
+        Top = 0
+        Width = 15
+        Height = 98
+        Align = alRight
+        BevelOuter = bvNone
+        TabOrder = 1
+      end
+      object pnlScrollBottomBase: TPanel
+        Left = 150
+        Top = 0
+        Width = 427
+        Height = 98
+        Align = alClient
+        BevelOuter = bvNone
+        TabOrder = 2
+        object pnlBlankBottom: TPanel
+          Left = 0
+          Top = 0
+          Width = 427
+          Height = 68
+          Align = alClient
+          BevelOuter = bvNone
+          TabOrder = 2
+          Visible = False
+        end
+        object pnlDatelineBottom: TPanel
+          Left = 0
+          Top = 68
+          Width = 427
+          Height = 30
+          Align = alBottom
+          BevelOuter = bvNone
+          TabOrder = 1
+          object chartDatelineBottom: TChart
+            Left = 20
+            Top = 0
+            Width = 407
+            Height = 30
+            AllowPanning = pmNone
+            BackWall.Brush.Color = clWhite
+            BackWall.Brush.Style = bsClear
+            BackWall.Pen.Visible = False
+            Gradient.EndColor = clGradientActiveCaption
+            Title.Text.Strings = (
+              '')
+            Title.Visible = False
+            OnClickLegend = chartBaseClickLegend
+            OnClickSeries = chartBaseClickSeries
+            OnUndoZoom = ChartOnUndoZoom
+            OnZoom = ChartOnZoom
+            BottomAxis.Automatic = False
+            BottomAxis.AutomaticMaximum = False
+            BottomAxis.AutomaticMinimum = False
+            BottomAxis.DateTimeFormat = 'M/d/yyyy'
+            BottomAxis.Increment = 0.000694444444444444
+            BottomAxis.Maximum = 25
+            Frame.Visible = False
+            LeftAxis.Automatic = False
+            LeftAxis.AutomaticMaximum = False
+            LeftAxis.AutomaticMinimum = False
+            LeftAxis.Axis.Visible = False
+            LeftAxis.ExactDateTime = False
+            LeftAxis.Labels = False
+            LeftAxis.LabelsOnAxis = False
+            LeftAxis.Maximum = 9
+            LeftAxis.MinorGrid.Visible = True
+            LeftAxis.RoundFirstLabel = False
+            LeftAxis.Title.Caption = ' '
+            Legend.Alignment = laBottom
+            Legend.Color = clCream
+            Legend.LegendStyle = lsSeries
+            Legend.ShadowSize = 1
+            Legend.Visible = False
+            RightAxis.Automatic = False
+            RightAxis.AutomaticMaximum = False
+            RightAxis.AutomaticMinimum = False
+            RightAxis.Axis.Visible = False
+            RightAxis.Labels = False
+            RightAxis.LabelsOnAxis = False
+            RightAxis.RoundFirstLabel = False
+            RightAxis.Visible = False
+            TopAxis.LabelsOnAxis = False
+            View3D = False
+            View3DWalls = False
+            Align = alClient
+            BevelOuter = bvNone
+            TabOrder = 0
+            OnDblClick = mnuPopGraphDetailsClick
+            OnMouseDown = chartBaseMouseDown
+            object serDatelineBottom: TGanttSeries
+              ColorEachPoint = True
+              Marks.ArrowLength = 0
+              Marks.Visible = False
+              SeriesColor = clRed
+              ShowInLegend = False
+              OnGetMarkText = serDatelineTopGetMarkText
+              Pointer.InflateMargins = True
+              Pointer.Style = psRectangle
+              Pointer.Visible = True
+              XValues.DateTime = True
+              XValues.Name = 'Start'
+              XValues.Multiplier = 1
+              XValues.Order = loAscending
+              YValues.DateTime = False
+              YValues.Name = 'Y'
+              YValues.Multiplier = 1
+              YValues.Order = loNone
+              StartValues.DateTime = True
+              StartValues.Name = 'Start'
+              StartValues.Multiplier = 1
+              StartValues.Order = loAscending
+              EndValues.DateTime = True
+              EndValues.Name = 'End'
+              EndValues.Multiplier = 1
+              EndValues.Order = loNone
+              NextTask.DateTime = False
+              NextTask.Name = 'NextTask'
+              NextTask.Multiplier = 1
+              NextTask.Order = loNone
+            end
+          end
+          object pnlDatelineBottomSpacer: TORAutoPanel
+            Left = 0
+            Top = 0
+            Width = 20
+            Height = 30
+            Align = alLeft
+            BevelOuter = bvNone
+            TabOrder = 1
+          end
+        end
+        object scrlBottom: TScrollBox
+          Tag = 5
+          Left = 0
+          Top = 0
+          Width = 427
+          Height = 68
+          Align = alClient
+          BevelInner = bvNone
+          BorderStyle = bsNone
+          Color = clBtnFace
+          ParentColor = False
+          TabOrder = 0
+        end
+      end
+    end
+  end
+  object mnuPopGraphStuff: TPopupMenu
+    OnPopup = mnuPopGraphStuffPopup
+    Left = 4
+    object mnuPopGraphDetails: TMenuItem
+      Caption = 'Details...'
+      Enabled = False
+      OnClick = mnuPopGraphDetailsClick
+    end
+    object mnuPopGraphDefineViews: TMenuItem
+      Caption = 'Select/Define...'
+      OnClick = btnGraphSelectionsClick
+    end
+    object mnuPopGraphChangeViews: TMenuItem
+      Caption = 'Settings...'
+      OnClick = btnChangeSettingsClick
+    end
+    object N4: TMenuItem
+      Caption = '-'
+    end
+    object mnuPopGraphReset: TMenuItem
+      Caption = 'Reset Display'
+      ShortCut = 45
+      OnClick = mnuPopGraphResetClick
+    end
+    object mnuPopGraphZoomBack: TMenuItem
+      Caption = 'Zoom Back'
+      Enabled = False
+      ShortCut = 46
+      OnClick = mnuPopGraphZoomBackClick
+    end
+    object mnuPopGraphSplit: TMenuItem
+      Caption = 'Split Numerics/Events'
+      OnClick = mnuPopGraphSplitClick
+    end
+    object mnuPopGraphSwap: TMenuItem
+      Caption = 'Swap'
+      OnClick = mnuPopGraphSwapClick
+    end
+    object mnuPopGraphIsolate: TMenuItem
+      Caption = 'Move'
+      Enabled = False
+      OnClick = mnuPopGraphIsolateClick
+    end
+    object mnuPopGraphRemove: TMenuItem
+      Caption = 'Remove'
+      Enabled = False
+      OnClick = mnuPopGraphRemoveClick
+    end
+    object N1: TMenuItem
+      Caption = '-'
+    end
+    object mnuPopGraphStayOnTop: TMenuItem
+      Caption = 'Stay on Top'
+      OnClick = mnuPopGraphStayOnTopClick
+    end
+    object mnuPopGraphDualViews: TMenuItem
+      Caption = 'Dual Views'
+      Visible = False
+      OnClick = mnuPopGraphDualViewsClick
+    end
+    object mnuPopGraphSeparate1: TMenuItem
+      Caption = 'Individual Graphs'
+      Visible = False
+      OnClick = mnuPopGraphSeparate1Click
+    end
+    object mnuPopGraph3D: TMenuItem
+      Caption = '3D'
+      OnClick = mnuPopGraph3DClick
+    end
+    object mnuPopGraphLegend: TMenuItem
+      Caption = 'Legend'
+      Visible = False
+      OnClick = mnuPopGraphLegendClick
+    end
+    object mnuPopGraphValues: TMenuItem
+      Caption = 'Values'
+      OnClick = mnuPopGraphValuesClick
+    end
+    object mnuPopGraphFixed: TMenuItem
+      Caption = 'Fixed Date Range'
+      Visible = False
+      OnClick = mnuPopGraphFixedClick
+    end
+    object mnuPopGraphVertical: TMenuItem
+      Caption = 'Vertical Zoom'
+      OnClick = mnuPopGraphVerticalClick
+    end
+    object mnuPopGraphHorizontal: TMenuItem
+      Caption = 'Horizontal Zoom'
+      Visible = False
+      OnClick = mnuPopGraphHorizontalClick
+    end
+    object mnuPopGraphLines: TMenuItem
+      Caption = 'Lines'
+      Visible = False
+      OnClick = mnuPopGraphLinesClick
+    end
+    object mnuPopGraphDates: TMenuItem
+      Caption = 'Dates'
+      Visible = False
+      OnClick = mnuPopGraphDatesClick
+    end
+    object mnuPopGraphSort: TMenuItem
+      Caption = 'Sort by Type'
+      Visible = False
+      OnClick = mnuPopGraphSortClick
+    end
+    object mnuPopGraphClear: TMenuItem
+      Caption = 'Clear Background'
+      Visible = False
+      OnClick = mnuPopGraphClearClick
+    end
+    object mnuPopGraphGradient: TMenuItem
+      Caption = 'Gradient'
+      Visible = False
+      OnClick = mnuPopGraphGradientClick
+    end
+    object mnuPopGraphHints: TMenuItem
+      Caption = 'Hints'
+      Visible = False
+    end
+    object N2: TMenuItem
+      Caption = '-'
+    end
+    object mnuPopGraphCopy: TMenuItem
+      Caption = 'Copy'
+      ShortCut = 16451
+      OnClick = mnuPopGraphCopyClick
+    end
+    object mnuPopGraphPrint: TMenuItem
+      Caption = 'Print...'
+      OnClick = mnuPopGraphPrintClick
+    end
+    object N3: TMenuItem
+      Caption = '-'
+      Visible = False
+    end
+    object mnumedsasgantt: TMenuItem
+      Caption = 'meds as gantt'
+      Checked = True
+      RadioItem = True
+      Visible = False
+      OnClick = mnumedsasganttClick
+    end
+    object mnumedsasganttvertheight: TMenuItem
+      Caption = 'meds as gantt + vert + height change'
+      RadioItem = True
+      Visible = False
+      OnClick = mnumedsasganttClick
+    end
+    object mnuPopGraphToday: TMenuItem
+      Caption = 'Reset Today...'
+      Visible = False
+      OnClick = mnuPopGraphTodayClick
+    end
+    object testcount1: TMenuItem
+      Caption = 'test count'
+      Visible = False
+      OnClick = testcount1Click
+    end
+  end
+  object calDateRange: TORDateRangeDlg
+    DateOnly = False
+    Instruction = 'Enter a date range -'
+    LabelStart = 'Begin Date'
+    LabelStop = 'End Date'
+    RequireTime = False
+    Format = 'mmm d,yy@hh:nn'
+    Left = 32
+  end
+  object dlgDate: TORDateTimeDlg
+    FMDateTime = 3040806
+    DateOnly = True
+    RequireTime = False
+    Left = 57
+  end
+  object timHintPause: TTimer
+    Enabled = False
+    Interval = 100
+    OnTimer = timHintPauseTimer
+    Left = 83
+  end
+end
Index: cprs/branches/foia-cprs/CPRS-Chart/fGraphs.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fGraphs.pas	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/fGraphs.pas	(revision 460)
@@ -0,0 +1,6324 @@
+unit fGraphs;
+
+interface
+
+uses                                                
+  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+  ExtCtrls, StdCtrls, ORCtrls, Menus, TeeProcs, TeEngine, Series, Chart, Math,
+  ComCtrls, GanttCh, ClipBrd, StrUtils, ORFn, ORDtTmRng, DateUtils, Printers,
+  OleServer, Variants, Word97, Word2000, ArrowCha, ORDtTm, uGraphs;
+
+type
+  TfrmGraphs = class(TForm)
+    btnChangeSettings: TButton;
+    btnClose: TButton;
+    btnGraphSelections: TButton;
+    bvlBottomLeft: TBevel;
+    bvlBottomRight: TBevel;
+    bvlTopLeft: TBevel;
+    bvlTopRight: TBevel;
+    calDateRange: TORDateRangeDlg;
+    cboDateRange: TORComboBox;
+    chartBase: TChart;
+    chartDatelineBottom: TChart;
+    chartDatelineTop: TChart;
+    chkDualViews: TCheckBox;
+    chkItemsBottom: TCheckBox;
+    chkItemsTop: TCheckBox;
+    dlgDate: TORDateTimeDlg;
+    lblDateRange: TLabel;
+    lblViewsBottom: TOROffsetLabel;
+    lblViewsTop: TOROffsetLabel;
+    lstAllTypes: TListBox;
+    lstCheck: TListBox;
+    lstData: TListBox;
+    lstDrugClass: TListBox;
+    lstItems: TListBox;
+    lstItemsTemp: TListBox;
+    lstMultiSpec: TListBox;
+    lstNonNumeric: TListBox;
+    lstScratchLab: TListBox;
+    lstScratchSwap: TListBox;
+    lstScratchTemp: TListBox;
+    lstSelCopyBottom: TListBox;
+    lstSelCopyTop: TListBox;
+    lstSpec1: TListBox;
+    lstSpec2: TListBox;
+    lstSpec3: TListBox;
+    lstSpec4: TListBox;
+    lstTemp: TListBox;
+    lstTempCheck: TListBox;
+    lstTestSpec: TListBox;
+    lstTypes: TListBox;
+    lstViews: TListBox;
+    lstZoomHistory: TListBox;
+    lvwItemsBottom: TListView;
+    lvwItemsTop: TListView;
+    mnumedsasgantt: TMenuItem;
+    mnumedsasganttvertheight: TMenuItem;
+    mnuPopGraph3D: TMenuItem;
+    mnuPopGraphClear: TMenuItem;
+    mnuPopGraphCopy: TMenuItem;
+    mnuPopGraphDates: TMenuItem;
+    mnuPopGraphDefineViews: TMenuItem;
+    mnuPopGraphDetails: TMenuItem;
+    mnuPopGraphDualViews: TMenuItem;
+    mnuPopGraphGradient: TMenuItem;
+    mnuPopGraphFixed: TMenuItem;
+    mnuPopGraphHints: TMenuItem;
+    mnuPopGraphHorizontal: TMenuItem;
+    mnuPopGraphIsolate: TMenuItem;
+    mnuPopGraphLegend: TMenuItem;
+    mnuPopGraphLines: TMenuItem;
+    mnuPopGraphPrint: TMenuItem;
+    mnuPopGraphRemove: TMenuItem;
+    mnuPopGraphReset: TMenuItem;
+    mnuPopGraphSeparate1: TMenuItem;
+    mnuPopGraphSort: TMenuItem;
+    mnuPopGraphSplit: TMenuItem;
+    mnuPopGraphStayOnTop: TMenuItem;
+    mnuPopGraphStuff: TPopupMenu;
+    mnuPopGraphSwap: TMenuItem;
+    mnuPopGraphToday: TMenuItem;
+    mnuPopGraphValues: TMenuItem;
+    mnuPopGraphVertical: TMenuItem;
+    mnuPopGraphZoomBack: TMenuItem;
+    N1: TMenuItem;
+    N2: TMenuItem;
+    N3: TMenuItem;
+    N4: TMenuItem;
+    pnlBlankBottom: TPanel;
+    pnlBlankTop: TPanel;
+    pnlBottom: TPanel;
+    pnlBottomRightPad: TPanel;
+    pnlData: TPanel;
+    pnlDatelineBottom: TPanel;
+    pnlDatelineBottomSpacer: TORAutoPanel;
+    pnlDatelineTop: TPanel;
+    pnlDatelineTopSpacer: TORAutoPanel;
+    pnlFooter: TPanel;
+    pnlHeader: TPanel;
+    pnlInfo: TORAutoPanel;
+    pnlItemsBottom: TPanel;
+    pnlItemsBottomInfo: TPanel;
+    pnlItemsTop: TPanel;
+    pnlItemsTopInfo: TPanel;
+    pnlMain: TPanel;
+    pnlScrollBottomBase: TPanel;
+    pnlScrollTopBase: TPanel;
+    pnlTemp: TPanel;
+    pnlTop: TPanel;
+    pnlTopRightPad: TPanel;
+    scrlBottom: TScrollBox;
+    scrlTop: TScrollBox;
+    serDatelineBottom: TGanttSeries;
+    serDatelineTop: TGanttSeries;
+    splGraphs: TSplitter;
+    splItemsBottom: TSplitter;
+    splItemsTop: TSplitter;
+    timHintPause: TTimer;
+    lstSelPrevTop: TListBox;
+    lstSelPrevBottom: TListBox;
+    lstComp: TListBox;
+    pnlViewsTopSpacer: TPanel;
+    cboViewsTop: TORComboBox;
+    pnlViewsTopSpacerRight: TPanel;
+    pnlViewsBottomSpacer: TPanel;
+    cboViewsBottom: TORComboBox;
+    pnlViewsBottomSpacerRight: TPanel;
+    testcount1: TMenuItem;
+    procedure FormCreate(Sender: TObject);
+    procedure FormShow(Sender: TObject);
+    procedure FormClose(Sender: TObject; var Action: TCloseAction);
+
+    procedure btnCloseClick(Sender: TObject);
+    procedure btnChangeSettingsClick(Sender: TObject);
+    procedure btnGraphSelectionsClick(Sender: TObject);
+
+    procedure chkDualViewsClick(Sender: TObject);
+    procedure chkItemsTopClick(Sender: TObject);
+    procedure chkItemsBottomClick(Sender: TObject);
+
+    procedure mnuMedsasganttClick(Sender: TObject);
+    procedure mnuPopGraph3DClick(Sender: TObject);
+    procedure mnuPopGraphClearClick(Sender: TObject);
+    procedure mnuPopGraphCopyClick(Sender: TObject);
+    procedure mnuPopGraphDatesClick(Sender: TObject);
+    procedure mnuPopGraphDetailsClick(Sender: TObject);
+    procedure mnuPopGraphDualViewsClick(Sender: TObject);
+    procedure mnuPopGraphFixedClick(Sender: TObject);
+    procedure mnuPopGraphGradientClick(Sender: TObject);
+    procedure mnuPopGraphHintsClick(Sender: TObject);
+    procedure mnuPopGraphIsolateClick(Sender: TObject);
+    procedure mnuPopGraphLegendClick(Sender: TObject);
+    procedure mnuPopGraphLinesClick(Sender: TObject);
+    procedure mnuPopGraphPrintClick(Sender: TObject);
+    procedure mnuPopGraphRemoveClick(Sender: TObject);
+    procedure mnuPopGraphResetClick(Sender: TObject);
+    procedure mnuPopGraphSeparate1Click(Sender: TObject);
+    procedure mnuPopGraphStayOnTopClick(Sender: TObject);
+    procedure mnuPopGraphSortClick(Sender: TObject);
+    procedure mnuPopGraphSplitClick(Sender: TObject);
+    procedure mnuPopGraphStuffPopup(Sender: TObject);
+    procedure mnuPopGraphSwapClick(Sender: TObject);
+    procedure mnuPopGraphTodayClick(Sender: TObject);
+    procedure mnuPopGraphValuesClick(Sender: TObject);
+    procedure mnuPopGraphHorizontalClick(Sender: TObject);
+    procedure mnuPopGraphVerticalClick(Sender: TObject);
+    procedure mnuPopGraphZoomBackClick(Sender: TObject);
+
+    procedure splGraphsMoved(Sender: TObject);
+    procedure splItemsBottomMoved(Sender: TObject);
+    procedure splItemsTopMoved(Sender: TObject);
+
+    procedure GetSize;
+    procedure SetSize;
+
+    procedure lvwItemsBottomClick(Sender: TObject);
+    procedure lvwItemsBottomColumnClick(Sender: TObject; Column: TListColumn);
+    procedure lvwItemsBottomCompare(Sender: TObject; Item1,
+      Item2: TListItem; Data: Integer; var Compare: Integer);
+    procedure lvwItemsTopClick(Sender: TObject);
+    procedure lvwItemsTopColumnClick(Sender: TObject; Column: TListColumn);
+    procedure lvwItemsTopCompare(Sender: TObject; Item1, Item2: TListItem;
+      Data: Integer; var Compare: Integer);
+
+    procedure cboDateRangeChange(Sender: TObject);
+    procedure cboViewsBottomChange(Sender: TObject);
+    procedure cboViewsTopChange(Sender: TObject);
+
+    procedure pnlScrollTopBaseResize(Sender: TObject);
+
+    procedure chartBaseClickLegend(Sender: TCustomChart;
+      Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+    procedure chartBaseClickSeries(Sender: TCustomChart; Series: TChartSeries;
+      ValueIndex: Integer; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+    procedure chartBaseMouseDown(Sender: TObject; Button: TMouseButton;
+      Shift: TShiftState; X, Y: Integer);
+    procedure chartBaseMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
+    procedure serDatelineTopGetMarkText(Sender: TChartSeries;
+      ValueIndex: Integer; var MarkText: String);
+
+    procedure ChartOnUndoZoom(Sender: TObject);
+    procedure ChartOnZoom(Sender: TObject);
+    procedure DisplayData(aSection: string);
+    procedure HideDates(aChart: TChart);
+    procedure SourcesDefault;
+    procedure StayOnTop;
+
+    procedure timHintPauseTimer(Sender: TObject);
+    procedure ZoomUpdate;
+    procedure ZoomUpdateInfo(SmallTime, BigTime: TDateTime);
+    procedure ZoomTo(SmallTime, BigTime: TDateTime);
+    procedure lvwItemsTopChange(Sender: TObject; Item: TListItem;
+      Change: TItemChange);
+    procedure lvwItemsTopKeyDown(Sender: TObject; var Key: Word;
+      Shift: TShiftState);
+    procedure lvwItemsBottomChange(Sender: TObject; Item: TListItem;
+      Change: TItemChange);
+    procedure testcount1Click(Sender: TObject);
+    procedure cboDateRangeDropDown(Sender: TObject);
+    procedure cboViewsTopDropDown(Sender: TObject);
+    procedure cboViewsTopDropDownClose(Sender: TObject);
+    procedure cboViewsBottomDropDown(Sender: TObject);
+    procedure cboViewsBottomDropDownClose(Sender: TObject);
+    procedure FormDestroy(Sender: TObject);
+    procedure lvwItemsTopEnter(Sender: TObject);
+    procedure lvwItemsBottomEnter(Sender: TObject);
+    procedure chkItemsBottomEnter(Sender: TObject);
+    procedure cboViewsBottomEnter(Sender: TObject);
+
+  private
+    { Private declarations }
+    FBSortAscending: boolean;
+    FBSortCol: integer;
+    FDate1: Double;
+    FDate2: Double;
+    FSortAscending: boolean;
+    FSortCol: integer;
+
+    FActiveGraph: TChart;
+    FArrowKeys: boolean;
+    FBHighTime, FBLowTime: Double;
+    FCreate: boolean;
+    FFirstClick: boolean;
+    FFirstSwitch: boolean;
+    FGraphClick: TCustomChart;
+    FGraphSeries: TChartSeries;
+    FGraphValueIndex: integer;
+    FGraphSetting: TGraphSetting;
+    FGraphType: char;
+    FItemsSortedTop: boolean;
+    FItemsSortedBottom: boolean;
+    FMouseDown: boolean;
+    FMTimestamp: string;
+    FMToday: TFMDateTime;
+    FMyProfiles, FProfiles: TStringList;
+    FNonNumerics: boolean; // used with pnlItemsTop.Tag & pnlItemsBottom.Tag
+    FOnLegend:  integer;
+    FOnSeries: integer;
+    FOnValue: integer;
+    FPrevEvent: string;
+    FRetainZoom: boolean;
+    FSources: TStrings;
+    FSourcesDefault: TStrings;
+    FTHighTime, FTLowTime: Double;
+    FWarning: boolean;
+    FX, FY: integer;
+    FYMinValue: Double;
+    FYMaxValue: Double;
+
+    procedure AdjustTimeframe;
+    procedure AllTypeDate(aType, aTypeName, firstline, secondline: string; aDate, aDate2: double);
+    procedure AllDetails(aDate1, aDate2: TFMDateTime; aTempList: TStrings);
+    procedure AssignProfile(aProfile, aSection: string);
+    procedure AutoSelect(aListView: TListView);
+    procedure BaseResize(aScrollBox: TScrollBox);
+    procedure BottomAxis(aScrollBox: TScrollBox);
+    procedure ChangeStyle;
+    procedure ChartStyle(aChart: TChart);
+    procedure CheckProfile(var aProfile: string; var Updated: boolean);
+    procedure CheckToAddData(aListView: TListView; aSection, TypeToCheck: string);
+    procedure CreatePatientHeader(var HeaderList: TStringList; PageTitle, Warning, DateRange: string);
+    procedure DateRangeItems(oldestdate, newestdate: double; filenum: string);
+    procedure UpdateView(filename, filenum, itemnum, aString: string; aListView: TListView);
+    procedure DisplayType(itemtype, displayed: string);
+    procedure FillViews;
+    procedure FilterListView(oldestdate, newestdate: double);
+    procedure FixedDates(var adatetime, adatetime1: TDateTime);
+    procedure GetData(aString: string);
+    procedure HideGraphs(action: boolean);
+    procedure HighLow(fmtime, fmtime1: string; aChart: TChart; var adatetime, adatetime1: TDateTime);
+    procedure InactivateHint;
+    procedure ItemCheck(aListView: TListView; aItemName: string;
+      var aNum: integer; var aTypeItem: string);
+    procedure ItemsClick(Sender: TObject; aListView, aOtherListView: TListView;
+      aCheckBox: TCheckBox; aComboBox: TORComboBox; aList: TListBox; aSection: string);
+    procedure ItemDateRange(Sender: TCustomChart);
+    procedure LabData(aItemType, aItemName, aSection: string);
+    procedure LoadDateRange;
+    procedure LoadDisplayCheck(typeofitem: string; var updated: boolean);
+    procedure LoadType(itemtype, displayed: string);
+    procedure NextPointerStyle(aSeries: TChartSeries; aSerCnt: integer);
+    procedure OneDayTypeDetails(aTypeItem: string);
+    procedure RefUnits(aItem, aSpec: string; var low, high, units: string);
+    procedure ResetSpec(aListBox: TListBox; aItemNum, aNewItemNum, aNewItemName, aNewString: string);
+    procedure TempCheck(typeitem: string; var levelseq: double);
+    procedure SelCopy(aListView: TListView; aListBox: TListBox);
+    procedure SelReset(aListbox: TListBox; aListView: TListView);
+    procedure SelectItem(aListView: TListView; typeitem: string);
+    procedure SetProfile(aProfile, aName: string; aListView: TListView);
+    procedure SizeDates(aChart: TChart; aSmallTime, aBigTime: TDateTime);
+    procedure SizeTogether(onlylines, nolines, anylines: Boolean; aScroll: TScrollBox;
+      aChart: TChart; aPanel, aPanelBase: TPanel; portion: Double);
+    procedure ViewsChange(aListView: TListView; aComboBox: TORComboBox; aSection: string);
+
+    procedure MakeDateline(section, aTitle, aFileType: string; aChart: TChart; graphtype: integer;
+      var bcnt, pcnt, gcnt, vcnt, acnt: integer);
+    procedure MakeSeparate(aScrollBox: TScrollBox; aListView: TListView; aPadPanel: TPanel; section: string);
+    procedure MakeTogether(aScrollBox: TScrollBox; aListView: TListView; aPadPanel: TPanel; section: string);
+
+    procedure MakeAGanttSeries(aChart: TChart; aTitle, aFileType: string; var aSerCnt: integer);
+    procedure MakeArrowSeries(aChart: TChart; aTitle, aFileType: string; var aSerCnt: integer);
+    procedure MakeBarSeries(aChart: TChart; aTitle, aFileType: string; var aSerCnt: integer);
+    procedure MakeGanttSeries(aChart: TChart; aTitle, aFileType: string; var aSerCnt: integer);
+    procedure MakeLineSeries(aChart: TChart; aTitle, aFileType: string; var aSerCnt, aNonCnt: integer; multiline: boolean);
+    procedure MakeManyGanttSeries(aChart: TChart; aTitle, aFileType: string; var aSerCnt: integer);  // good one
+    procedure MakePointSeries(aChart: TChart; aTitle, aFileType: string; var aSerCnt: integer);
+    procedure MakeVisitGanttSeries(aChart: TChart; aTitle, aFileType: string; var aSerCnt: integer);
+    procedure MakeWeightedArrowSeries(aChart: TChart; aTitle, aFileType: string; var aSerCnt: integer);
+    procedure MakeWeightedGanttSeries(aChart: TChart; aTitle, aFileType: string; var aSerCnt: integer);
+
+    function BPValue(aDateTime: TDateTime): string;
+    function DateRangeMultiItems(aOldDate, aNewDate: double; aMultiItem: string): boolean;
+    function DCName(aDCien: string): string;
+    function ExpandTax(profile: string): string;
+    function FileNameX(filenum: string): string;
+    function FMCorrectedDate(fmtime: string): string;
+    function GraphTypeNum(aType: string): integer;
+    function HSAbbrev(aType: string): boolean;
+    function InvVal(value: double): double;
+    function ItemName(filenum, itemnum: string): string;
+    function NextColor(aCnt: integer): TColor;
+    function PortionSize(lcnt, pcnt, gcnt, vcnt, bcnt, acnt: integer): double;
+    function SelectRef(aRef: string): string;
+    function StdDev(value, high, low: double): double;
+    function TypeIsDisplayed(itemtype: string): boolean;
+    function TypeIsLoaded(itemtype: string): boolean;
+    function Vfactor(aTitle: string): double;
+    function ValueText(Sender: TCustomChart; Series: TChartSeries; ValueIndex: Integer): string;
+
+  public
+    { Public declarations }
+    procedure InitialData;
+    procedure Initialize;
+    procedure InitialRetain;
+    procedure LoadListView(aList: TStrings);
+    procedure SourceContext;
+    procedure ViewSelections;
+    procedure SetFontSize(FontSize: integer);
+    function FMToDateTime(FMDateTime: string): TDateTime;
+  end;
+
+var
+  frmGraphs: TfrmGraphs;
+  FHintWin: THintWindow;
+  FHintWinActive: boolean;
+  FHintStop: boolean;
+
+implementation
+
+uses fGraphSettings, fGraphProfiles, rGraphs,
+  ComObj, ActiveX, ShellAPI, fFrame, uCore, rCore, fRptBox, fReports,
+  uFormMonitor;
+
+{$R *.DFM}
+
+type
+  TGraphItem = class
+  public
+    Values: string;
+end;
+
+procedure TfrmGraphs.FormCreate(Sender: TObject);
+var
+  i: integer;
+  dfntype, listline, settings, settings1, t1, t2: string;
+  aList: TStrings;
+begin
+  FMToday := DateTimeToFMDateTime(Date);
+  FHintWinActive := false;
+  FHintStop := false;
+  FNonNumerics := false;
+  FMouseDown := false;
+  FItemsSortedTop := false;
+  FItemsSortedBottom := false;
+  FRetainZoom := false;
+  FFirstClick := true;
+  FArrowKeys := false;
+  FCreate := true;
+  FGraphType := Char(32);
+  aList := TStringList.Create;
+  FastAssign(rpcGetGraphSettings, aList);
+  btnClose.Tag := 0;
+  if aList.Count < 1 then
+  begin
+    Screen.Cursor := crDefault;
+    showmessage('CPRS is not configured for graphing.');
+    btnClose.Tag := 1;
+    FreeAndNil(aList);
+    Close;
+    Exit;
+  end;
+  t1 := aList[0]; t2 := aList[1];   // hint are current, t1 are personal, t2 public settings
+  if length(frmFrame.mnuToolsGraphing.Hint) > 0 then settings := frmFrame.mnuToolsGraphing.Hint
+  else if length(t1) > 0 then settings := t1
+  else settings := t2;
+  SetPiece(settings, '|', 8, Piece(t2, '|', 8)); //??????????
+  frmFrame.mnuToolsGraphing.Hint := settings;
+  settings1 := Piece(settings, '|', 1);
+  FSources := TStringList.Create;
+  FSourcesDefault := TStringList.Create;
+  FMyProfiles := TStringList.Create;
+  FProfiles := TStringList.Create;
+  FYMinValue := 0;
+  FYMaxValue := 0;
+  FTHighTime := 0;
+  FTLowTime := BIG_NUMBER;
+  FBHighTime := 0;
+  FBLowTime := BIG_NUMBER;
+  pnlInfo.Caption := TXT_INFO;
+  FOnLegend := BIG_NUMBER;
+  FOnSeries := BIG_NUMBER;
+  FOnValue := BIG_NUMBER;
+  FHintWin := THintWindow.Create(self);
+  FHintWin.Color := clInfoBk;
+  FHintWin.Canvas.Font.Color := clInfoBk;
+  FX := 0; FY :=0;
+  FastAssign(rpcGetTypes('0', false), lstAllTypes.Items);
+  for i := 0 to lstAllTypes.Items.Count - 1 do
+  begin
+    listline := lstAllTypes.Items[i];
+    dfntype := UpperCase(Piece(listline, '^', 1));
+    SetPiece(listline, '^', 1, dfntype);
+    lstAllTypes.Items[i] := listline;
+  end;
+  FGraphSetting := GraphSettingsInit(settings);
+  for i := 0 to BIG_NUMBER do
+  begin
+    dfntype := Piece(settings1, ';', i);
+    if length(dfntype) = 0 then break;
+    listline := dfntype + '^' + FileNameX(dfntype) + '^1';
+    FSources.Add(listline);
+    FSourcesDefault.Add(listline);
+  end;
+  serDatelineTop.Active := false;
+  serDatelineBottom.Active := false;
+  chartDatelineTop.Gradient.EndColor := clGradientActiveCaption;
+  chartDatelineTop.Gradient.StartColor := clWindow;
+  chartDatelineBottom.Gradient.EndColor := clGradientActiveCaption;
+  chartDatelineBottom.Gradient.StartColor := clWindow;
+  LoadDateRange;
+  chkItemsTop.Checked := true;
+  chkItemsBottom.Checked := true;
+  FastAssign(rpcGetTestSpec, lstTestSpec.Items);
+  FillViews;
+  FreeAndNil(aList);
+end;
+
+procedure TfrmGraphs.SourcesDefault;
+var
+  i: integer;
+  dfntype, listline, settings, settings1, t1, t2: string;
+  aList: TStrings;
+begin
+  aList := TStringList.Create;
+  FastAssign(rpcGetGraphSettings, aList);
+  t1 := aList[0]; t2 := aList[1];   // t1 are personal, t2 public settings
+  if length(frmFrame.mnuToolsGraphing.Hint) > 0 then settings := frmFrame.mnuToolsGraphing.Hint
+  else if length(t1) > 0 then settings := t1
+  else settings := t2;
+  SetPiece(settings, '|', 8, Piece(t2, '|', 8));
+  settings1 := Piece(settings, '|', 1);
+  FGraphSetting := GraphSettingsInit(settings);
+  for i := 0 to BIG_NUMBER do
+  begin
+    dfntype := Piece(settings1, ';', i);
+    if length(dfntype) = 0 then break;
+    listline := dfntype + '^' + FileNameX(dfntype) + '^1';
+    FSourcesDefault.Add(listline);
+  end;
+  FreeAndNil(aList);
+end;
+
+procedure TfrmGraphs.Initialize;
+var
+  i: integer;
+  rptview1, rptview2, rptviews: string;
+begin
+  InitialData;
+  SourceContext;
+  LoadListView(lstItems.Items);
+  if pnlMain.Tag > 0 then
+  begin
+    rptviews := MixedCase(rpcReportParams(pnlMain.Tag));
+    if length(rptviews) > 1 then
+    begin
+      rptview1 := Piece(rptviews, '^', 1);
+      rptview2 := Piece(rptviews, '^', 2);
+      if length(rptview1) > 0 then
+      begin
+        for i := 0 to cboViewsTop.Items.Count - 1 do
+        if Piece(cboViewsTop.Items[i], '^', 2) = rptview1 then
+        begin
+          cboViewsTop.ItemIndex := i;
+          break;
+        end;
+      end;
+      if length(rptview2) > 0 then
+      begin
+        chkDualViews.Checked := true;
+        chkDualViewsClick(self);
+        for i := 0 to cboViewsBottom.Items.Count - 1 do
+        if Piece(cboViewsBottom.Items[i], '^', 2) = rptview2 then
+        begin
+          cboViewsBottom.ItemIndex := i;
+          break;
+        end;
+      end;
+    end;
+  end;
+  if cboViewsTop.ItemIndex > -1 then
+    cboViewsTopChange(self)
+  else
+    lvwItemsTopClick(self);
+  if cboViewsBottom.ItemIndex > -1 then
+    cboViewsbottomChange(self)
+  else
+    lvwItemsBottomClick(self);
+  if pnlMain.Tag > 0 then
+  begin
+    pnlMain.Tag := 0;
+    cboDateRangeChange(self);
+  if cboViewsTop.ItemIndex > -1 then
+    cboViewsTopChange(self)
+  else
+    lvwItemsTopClick(self);
+  if cboViewsBottom.ItemIndex > -1 then
+    cboViewsbottomChange(self)
+  else
+    lvwItemsBottomClick(self);
+  end;
+end;
+
+procedure TfrmGraphs.InitialRetain;
+//var
+  //i: integer;
+begin
+  {//
+  allview=false
+  fullview=false
+  noview=true
+  go thru items
+        if selected
+                if view
+                        noview=false
+                else
+                        allview=false
+
+        else
+                if view
+                        allview=false
+                        fullview=false
+                        noview=false
+                else
+                        //
+  if noview
+        //
+  if allview
+        //
+  if fullview
+        //
+  else //partial view
+        //
+  //}
+end;
+
+procedure TfrmGraphs.FillViews;
+var
+  i: integer;
+begin
+  with cboViewsTop do
+  begin
+    Items.Clear;
+    Sorted := false;
+    lstTemp.Sorted := true;
+    FastAssign(rpcGetGraphProfiles('1', '0', 0), lstTemp.Items);
+    if lstTemp.Items.Count > 0 then
+    begin
+      for i := 0 to lstTemp.Items.Count - 1 do
+        Items.Add('-1^' + lstTemp.Items[i] + '^');
+    end;
+    FastAssign(rpcGetGraphProfiles('1', '1', 0), lstTemp.Items);
+    if lstTemp.Items.Count > 0 then
+    begin
+      Items.Add(LLS_LINE);
+      for i := 0 to lstTemp.Items.Count - 1 do
+        Items.Add('-2^' + lstTemp.Items[i] + '^');
+    end;
+    Items.Insert(0, '^<clear all selections>^0');
+    Items.Insert(1, '^<select items>^0');
+  end;
+  FastAssign(cboViewsTop.Items, cboViewsBottom.Items);
+end;
+
+procedure TfrmGraphs.SourceContext;
+begin
+  if frmFrame.GraphContext = '' then exit;
+  frmFrame.GraphContext := '';
+end;
+
+procedure TfrmGraphs.FormShow(Sender: TObject);
+begin
+  Font := MainFont;
+  ChangeStyle;
+  StayOnTop;
+  mnuPopGraphResetClick(self);
+  if pnlFooter.Tag = 1 then  // do not show footer controls on reports tab
+  begin
+    pnlFooter.Visible := false;
+    if FCreate then
+    begin
+      FGraphType := GRAPH_REPORT;
+      FCreate := false;
+      GetSize;
+    end;
+  end
+  else
+  begin
+    chkDualViews.Checked := false;
+    chkDualViewsClick(self);
+    if FCreate then
+    begin
+      FGraphType := GRAPH_FLOAT;
+      FCreate := false;
+      GetSize;
+    end;
+  end;
+  if cboDateRange.ItemIndex < 0 then
+    cboDateRange.ItemIndex := cboDateRange.Items.Count - 1;
+  cboDateRangeChange(self);
+  lvwItemsTopClick(self);
+  if lvwItemsTop.Items.Count = 0 then
+  begin
+    cboViewsTop.ItemIndex := 0;
+    cboViewsTop.Text := '';
+  end;
+  //else
+  //  lvwItemsTop.SetFocus;
+  //chkItemsTop.SetFocus;
+  cboViewsTop.SetFocus;
+  //Perform(WM_NextDlgCtl, 0, 0);
+end;
+
+procedure TfrmGraphs.FormClose(Sender: TObject; var Action: TCloseAction);
+begin
+  SetSize;
+  timHintPause.Enabled := false;
+  InactivateHint;
+  frmFrame.GraphFloatActive := false;
+end;
+
+procedure TfrmGraphs.GetSize;
+var
+  i, v1, v2, v3, v4: integer;
+  name, settings, value: string;
+  aList: TStrings;
+begin
+  aList := TStringList.Create;
+  FastAssign(rpcGetGraphSizing, aList);
+  for i := 0 to aList.Count - 1 do
+  begin
+    settings := aList[i];
+    name := Piece(settings, '^', 1);
+    value := Piece(settings, '^', 2);
+    if length(value) > 1 then
+    begin
+      v1 := strtointdef(Piece(value, ',', 1), 0);
+      v2 := strtointdef(Piece(value, ',', 2), 0);
+      v3 := strtointdef(Piece(value, ',', 3), 0);
+      v4 := strtointdef(Piece(value, ',', 4), 0);
+      if FGraphType = GRAPH_FLOAT then
+      begin
+        if name = 'FBOUNDS' then
+        begin
+          if value = '0,0,0,0' then
+            WindowState := wsMaximized
+          else
+          begin
+            if v1 > 0 then Left := v1;
+            if v2 > 0 then Top := v2;
+            if v3 > 0 then Width := v3;
+            if v4 > 0 then Height := v4;
+          end;
+        end
+        else if name = 'FWIDTH' then
+        begin
+          if v1 > 0 then
+          begin
+            pnlItemsTop.Width := v1;
+            splItemsTopMoved(self);
+          end;
+        end
+        else if name = 'FBOTTOM' then
+        begin
+          if v1 > 0 then
+          begin
+            chkDualViews.Checked := true;
+            chkDualViewsClick(self);
+            pnlBottom.Height := v1;
+          end;
+        end
+        else if name = 'FCOLUMN' then
+        begin
+          if v1 > 0 then lvwItemsTop.Column[0].Width := v1;
+          if v2 > 0 then lvwItemsTop.Column[1].Width := v2;
+          if v3 > 0 then lvwItemsTop.Column[2].Width := v3;
+          if v4 > 0 then lvwItemsTop.Column[3].Width := v4;
+        end
+        else if name = 'FBCOLUMN' then
+        begin
+          if v1 > 0 then lvwItemsBottom.Column[0].Width := v1;
+          if v2 > 0 then lvwItemsBottom.Column[1].Width := v2;
+          if v3 > 0 then lvwItemsBottom.Column[2].Width := v3;
+          if v4 > 0 then lvwItemsBottom.Column[3].Width := v4;
+        end;
+      end
+      else
+      begin
+        if name = 'RWIDTH' then
+        begin
+          if v1 > 0 then
+          begin
+            pnlItemsTop.Width := v1;
+            splItemsTopMoved(self);
+          end;
+        end
+        else if name = 'RBOTTOM' then
+        begin
+          if v1 > 0 then
+          begin
+            pnlBottom.Height := v1;
+            splGraphsMoved(splGraphs);
+          end;
+        end
+        else if name = 'RCOLUMN' then
+        begin
+          if v1 > 0 then lvwItemsTop.Column[0].Width := v1;
+          if v2 > 0 then lvwItemsTop.Column[1].Width := v2;
+          if v3 > 0 then lvwItemsTop.Column[2].Width := v3;
+          if v4 > 0 then lvwItemsTop.Column[3].Width := v4;
+        end
+        else if name = 'RBCOLUMN' then
+        begin
+          if v1 > 0 then lvwItemsBottom.Column[0].Width := v1;
+          if v2 > 0 then lvwItemsBottom.Column[1].Width := v2;
+          if v3 > 0 then lvwItemsBottom.Column[2].Width := v3;
+          if v4 > 0 then lvwItemsBottom.Column[3].Width := v4;
+        end;
+      end;
+    end;
+  end;
+  FreeAndNil(aList);
+end;
+
+procedure TfrmGraphs.SetSize;
+var
+  name, v1, v2, v3, v4: string;
+  aList: TStrings;
+begin
+  aList := TStringList.Create;
+  if FGraphType = GRAPH_FLOAT then
+  begin
+    name := 'FBOUNDS';
+    v1 := inttostr(Left);
+    v2 := inttostr(Top);
+    v3 := inttostr(Width);
+    v4 := inttostr(Height);
+    if WindowState = wsMaximized then
+      aList.Add(name + '^0,0,0,0')
+    else
+      aList.Add(name + '^' + v1 +',' + v2 +',' + v3 +',' + v4);
+    name := 'FWIDTH';
+    v1 := inttostr(splItemsTop.Left);
+    aList.Add(name + '^' + v1);
+    name := 'FBOTTOM';
+    if chkDualViews.Checked then
+      v1 := inttostr(pnlBottom.Height)
+    else
+      v1 := '0';
+    aList.Add(name + '^' + v1);
+    name := 'FCOLUMN';
+    v1 := inttostr(lvwItemsTop.Column[0].Width);
+    v2 := inttostr(lvwItemsTop.Column[1].Width);
+    v3 := inttostr(lvwItemsTop.Column[2].Width);
+    v4 := inttostr(lvwItemsTop.Column[3].Width);
+    aList.Add(name + '^' + v1 +',' + v2 +',' + v3 +',' + v4);
+    name := 'FBCOLUMN';
+    v1 := inttostr(lvwItemsBottom.Column[0].Width);
+    v2 := inttostr(lvwItemsBottom.Column[1].Width);
+    v3 := inttostr(lvwItemsBottom.Column[2].Width);
+    v4 := inttostr(lvwItemsBottom.Column[3].Width);
+    aList.Add(name + '^' + v1 +',' + v2 +',' + v3 +',' + v4);
+  end
+  else
+  begin
+    name := 'RWIDTH';
+    v1 := inttostr(splItemsTop.Left);
+    aList.Add(name + '^' + v1);
+    name := 'RBOTTOM';
+    if chkDualViews.Checked then
+      v1 := inttostr(pnlBottom.Height)
+    else
+      v1 := '0';
+    aList.Add(name + '^' + v1);
+    name := 'RCOLUMN';
+    v1 := inttostr(lvwItemsTop.Column[0].Width);
+    v2 := inttostr(lvwItemsTop.Column[1].Width);
+    v3 := inttostr(lvwItemsTop.Column[2].Width);
+    v4 := inttostr(lvwItemsTop.Column[3].Width);
+    aList.Add(name + '^' + v1 +',' + v2 +',' + v3 +',' + v4);
+    name := 'RBCOLUMN';
+    v1 := inttostr(lvwItemsBottom.Column[0].Width);
+    v2 := inttostr(lvwItemsBottom.Column[1].Width);
+    v3 := inttostr(lvwItemsBottom.Column[2].Width);
+    v4 := inttostr(lvwItemsBottom.Column[3].Width);
+    aList.Add(name + '^' + v1 +',' + v2 +',' + v3 +',' + v4);
+  end;
+  rpcSetGraphSizing(aList);
+  FreeAndNil(aList);
+end;
+
+procedure TfrmGraphs.btnCloseClick(Sender: TObject);
+begin
+  Close;
+end;
+
+procedure TfrmGraphs.btnChangeSettingsClick(Sender: TObject);
+var
+  needtoupdate, okbutton: boolean;
+  conv, i, preconv: integer;
+  PreMaxGraphs: integer;
+  PreMaxSelect: integer;
+  PreMinGraphHeight: integer;
+  PreSortColumn: integer;
+  PreFixedDateRange: boolean;
+  aSettings, filetype, sourcetype: string;
+  PreSources: TStrings;
+begin
+  okbutton := false;
+  conv := btnChangeSettings.Tag;
+  preconv := conv;
+  with FGraphSetting do
+  begin
+    PreMaxGraphs := MaxGraphs;
+    PreMaxSelect := MaxSelect;
+    PreMinGraphHeight := MinGraphHeight;
+    PreSortColumn := SortColumn;
+    PreFixedDateRange := FixedDateRange;
+    MaxSelectMin := Max(Max(lvwItemsTop.SelCount, lvwItemsBottom.SelCount), 1);
+  end;
+  PreSources := TStringList.Create;
+  PreSources.Assign(FSources);
+  DialogGraphSettings(Font.Size, okbutton, FGraphSetting, FSources, conv, aSettings);
+  if not okbutton then exit;
+  if length(aSettings) > 0 then frmFrame.mnuToolsGraphing.Hint := aSettings;
+  btnChangeSettings.Tag := conv;
+  pnlInfo.Font.Size := lblViewsTop.Font.Size;
+  SetFontSize(lblViewsTop.Font.Size);
+  pnlInfo.Visible := conv > 0;
+  if conv > 0 then
+  begin
+    pnlInfo.Caption := TXT_WARNING;
+    pnlInfo.Color := COLOR_WARNING;
+  end;
+  pnlHeader.Visible := pnlInfo.Visible;
+  StayOnTop;
+  needtoupdate := (conv <> preconv);
+  for i := 0 to FSources.Count - 1 do
+  begin
+    sourcetype := FSources[i];
+    if Copy(sourcetype, 1, 1) = '*' then
+    begin
+      FSources[i] := Pieces(sourcetype, '^', 2, 4);
+      filetype := Piece(FSources[i], '^', 1);
+      lstItems.Items.AddStrings(rpcGetItems(filetype, Patient.DFN));
+      needtoupdate := true;
+    end;
+    if not needtoupdate then
+      if Piece(PreSources[i], '^', 3) = '0' then
+        needtoupdate := TypeIsDisplayed(Piece(sourcetype, '^', 1))
+      else
+        needtoupdate := not TypeIsDisplayed(Piece(sourcetype, '^', 1));
+  end;
+  if not needtoupdate then
+  with FGraphSetting do
+    if MaxGraphs <> PreMaxGraphs then
+      needtoupdate := true
+    else if MaxSelect <> PreMaxSelect then
+      needtoupdate := true
+    else if MinGraphHeight <> PreMinGraphHeight then
+      needtoupdate := true
+    else if SortColumn <> PreSortColumn then
+      needtoupdate := true
+    else if FixedDateRange <> PreFixedDateRange then
+      needtoupdate := true;
+  if needtoupdate then
+  begin
+    cboDateRangeChange(self);
+  end;
+  ChangeStyle;
+  if lvwItemsTop.SelCount = 0 then
+  begin
+    cboViewsTop.ItemIndex := -1;
+    cboViewsTop.Text := '';
+  end;
+  if lvwItemsBottom.SelCount = 0 then
+  begin
+    cboViewsBottom.ItemIndex := -1;
+    cboViewsBottom.Text := '';
+  end;
+end;
+
+procedure TfrmGraphs.chkDualViewsClick(Sender: TObject);
+begin
+  if chkDualViews.Checked then
+  begin
+    pnlBottom.Height := pnlMain.Height div 2;
+    lvwItemsTopClick(self);
+  end
+  else
+  begin
+    lvwItemsBottom.ClearSelection;
+    lvwItemsBottomClick(self);
+    pnlBottom.Height := 1;
+  end;
+  mnuPopGraphDualViews.Checked := chkDualViews.Checked;
+  with pnlMain.Parent do
+    if BorderWidth <> 1 then            // only do on Graph in Reports tab
+      frmReports.chkDualViews.Checked := chkDualViews.Checked;
+end;
+
+procedure TfrmGraphs.LoadListView(aList: TStrings);
+var
+  i: integer;
+  filename, filenum, itemnum: string;
+begin
+  lvwItemsTop.Items.Clear;
+  lvwItemsBottom.Items.Clear;
+  lvwItemsTop.SortType := stNone; // if Sorting during load then potential error
+  lvwItemsBottom.SortType := stNone; // if Sorting during load then potential error
+  with lvwItemsTop do
+  for i := 0 to aList.Count - 1 do
+  begin
+    filenum := Piece(aList[i], '^', 1);
+    filename := FileNameX(filenum);    // change rpc **********
+    itemnum := Piece(aList[i], '^', 2);
+    UpdateView(filename, filenum, itemnum, aList[i], lvwItemsTop);
+  end;
+  lvwItemsBottom.Items.Assign(lvwItemsTop.Items);
+  lvwItemsTop.SortType := stBoth;
+  lvwItemsBottom.SortType := stBoth;
+  if not FItemsSortedTop then
+  begin
+    lvwItemsTopColumnClick(lvwItemsTop, lvwItemsTop.Column[0]);
+    FItemsSortedTop := true;
+  end;
+  if not FItemsSortedBottom then
+  begin
+    lvwItemsBottomColumnClick(lvwItemsBottom, lvwItemsBottom.Column[0]);
+    FItemsSortedBottom := true;
+  end;
+  with FGraphSetting do
+  if SortColumn > 0 then
+  begin
+    lvwItemsTopColumnClick(lvwItemsTop, lvwItemsTop.Column[SortColumn]);
+    lvwItemsBottomColumnClick(lvwItemsBottom, lvwItemsBottom.Column[SortColumn]);
+    FItemsSortedTop := false;
+    FItemsSortedBottom := false;
+  end;
+end;
+
+procedure TfrmGraphs.FilterListView(oldestdate, newestdate: double);
+var
+  colnum, i: integer;
+  lastdate: double;
+  aProfile, filename, filenum, itemnum: string;
+begin
+  lvwItemsTop.Scroll(-BIG_NUMBER, -BIG_NUMBER);      //faster to set scroll at top
+  lvwItemsBottom.Scroll(-BIG_NUMBER, -BIG_NUMBER);
+  lvwItemsTop.Items.Clear;
+  lvwItemsBottom.Items.Clear;
+  lvwItemsTop.SortType := stNone; // if Sorting during load then potential error
+  lvwItemsBottom.SortType := stNone; // if Sorting during load then potential error
+  if (cboDateRange.ItemIndex > 0) and (cboDateRange.ItemIndex < 9) then
+  begin
+    with lvwItemsTop do
+    if TypeIsDisplayed('405') then
+      DateRangeItems(oldestdate, newestdate, '405');  // does not matter for all results ******************
+    if TypeIsDisplayed('52') then
+      DateRangeItems(oldestdate, newestdate, '52');  // does not matter for all results ******************
+    if TypeIsDisplayed('55') then
+      DateRangeItems(oldestdate, newestdate, '55');
+    if TypeIsDisplayed('55NVA') then
+      DateRangeItems(oldestdate, newestdate, '55NVA');
+    if TypeIsDisplayed('9999911') then
+      DateRangeItems(oldestdate, newestdate, '9999911');
+    for i := 0 to lstItems.Items.Count - 1 do
+    begin
+      filenum := UpperCase(Piece(lstItems.Items[i], '^', 1));
+      if filenum <> '405' then
+      if filenum <> '52' then
+        if filenum <> '55' then
+        if filenum <> '55NVA' then
+        if filenum <> '9999911' then
+          if TypeIsDisplayed(filenum) then
+          begin
+            lastdate := strtofloatdef(Piece(lstItems.Items[i], '^', 6), -BIG_NUMBER);
+            if (lastdate > oldestdate) and (lastdate < newestdate) then
+            begin
+              filename := FileNameX(filenum);
+              itemnum := Piece(lstItems.Items[i], '^', 2);
+              UpdateView(filename, filenum, itemnum, lstItems.Items[i], lvwItemsTop);
+            end;
+          end;
+    end;
+  end
+  else if (cboDateRange.ItemIndex = 0) or (cboDateRange.ItemIndex > 8) then
+  begin     // manual date range selection
+    for i := 0 to lstAllTypes.Items.Count - 1 do
+    begin
+      filenum := Piece(lstAllTypes.Items[i], '^', 1);
+      if TypeIsDisplayed(filenum) then
+      begin
+        DateRangeItems(oldestdate, newestdate, filenum);
+      end;
+    end;
+  end;
+  lvwItemsBottom.Items.Assign(lvwItemsTop.Items);
+  lvwItemsTop.SortType := stBoth;
+  lvwItemsBottom.SortType := stBoth;
+  colnum := 0;
+  if not FItemsSortedTop then
+  begin
+    lvwItemsTopColumnClick(lvwItemsTop, lvwItemsTop.Column[0]);
+    FItemsSortedTop := true;
+  end;
+  if not FItemsSortedBottom then
+  begin
+    lvwItemsBottomColumnClick(lvwItemsBottom, lvwItemsBottom.Column[0]);
+    FItemsSortedBottom := true;
+  end;
+  with FGraphSetting do
+  if SortColumn > 0 then
+  begin
+    colnum := SortColumn;
+    lvwItemsTopColumnClick(lvwItemsTop, lvwItemsTop.Column[SortColumn]);
+    lvwItemsBottomColumnClick(lvwItemsBottom, lvwItemsBottom.Column[SortColumn]);
+    FItemsSortedTop := false;
+    FItemsSortedBottom := false;
+  end;
+  if cboViewsTop.ItemIndex > 1 then                         // sort by view
+  begin
+    aProfile := cboViewsTop.Items[cboViewsTop.ItemIndex];
+    AssignProfile(aProfile, 'top');
+    if not FItemsSortedTop then lvwItemsTopColumnClick(lvwItemsTop, lvwItemsTop.Column[colnum]);
+    lvwItemsTopColumnClick(lvwItemsTop, lvwItemsTop.Column[2]);
+    lvwItemsTopColumnClick(lvwItemsTop, lvwItemsTop.Column[2]);
+    FItemsSortedTop := false;
+  end;
+  if cboViewsBottom.ItemIndex > 1 then                      // sort by view
+  begin
+    aProfile := cboViewsBottom.Items[cboViewsBottom.ItemIndex];
+    AssignProfile(aProfile, 'bottom');
+    if not FItemsSortedBottom then lvwItemsBottomColumnClick(lvwItemsBottom, lvwItemsBottom.Column[colnum]);
+    lvwItemsBottomColumnClick(lvwItemsBottom, lvwItemsBottom.Column[2]);
+    lvwItemsBottomColumnClick(lvwItemsBottom, lvwItemsBottom.Column[2]);
+    FItemsSortedBottom := false;
+  end;
+end;
+
+procedure TfrmGraphs.DateRangeItems(oldestdate, newestdate: double; filenum: string);
+var
+  i, j: integer;
+  filename, itemnum, itemstuff, mitemnum: string;
+begin
+  FastAssign(rpcDateItem(oldestdate, newestdate, filenum, Patient.DFN), lstScratchTemp.Items);
+  filename := FileNameX(filenum);
+  with lvwItemsTop do
+  for i := 0 to lstScratchTemp.Items.Count - 1 do
+  begin
+    itemstuff := lstScratchTemp.Items[i];
+    itemnum := UpperCase(Piece(itemstuff, '^',2));
+    for j := 0 to lstItems.Items.Count - 1 do
+    if (filenum = UpperCase(Piece(lstItems.Items[j], '^', 1))) and (itemnum = UpperCase(Piece(lstItems.Items[j], '^', 2))) then
+      UpdateView(filename, filenum, itemnum, lstItems.Items[j], lvwItemsTop);
+    if filenum = '63' then
+    for j := 0 to lstMultiSpec.Items.Count - 1 do
+    begin
+      mitemnum := Piece(lstMultiSpec.Items[j], '^', 2);
+      if itemnum = Piece(mitemnum, '.', 1) then
+        if DateRangeMultiItems(oldestdate, newestdate, mitemnum) then     //******** check specific date range
+          UpdateView(filename, filenum, mitemnum, lstMultiSpec.Items[j], lvwItemsTop);
+    end;
+  end;
+end;
+
+procedure TfrmGraphs.UpdateView(filename, filenum, itemnum, aString: string; aListView: TListView);
+var
+  drugclass, itemname, itemqualifier: string;
+  aGraphItem: TGraphItem;
+  aListItem: TListItem;
+begin
+  itemname := Piece(aString, '^', 4);
+  itemqualifier := Pieces(aString, '^', 5, 9);
+  itemqualifier := filenum + '^' + itemnum + '^' + itemqualifier;
+  drugclass := Piece(aString, '^', 8);
+  aListItem := aListView.Items.Add;
+  with aListItem do
+  begin
+    Caption := itemname;
+    SubItems.Add(filename);
+    SubItems.Add('');
+    SubItems.Add(drugclass);
+    aGraphItem := TGraphItem.Create;
+    aGraphItem.Values := itemqualifier;
+    SubItems.AddObject('info object', aGraphItem);
+  end;
+end;
+
+function TfrmGraphs.DateRangeMultiItems(aOldDate, aNewDate: double; aMultiItem: string): boolean;
+var
+  i: integer;
+  checkdate: double;
+  fileitem: string;
+begin
+  Result := false;
+  fileitem := '63^' + aMultiItem;
+  for i := 0 to lstData.Items.Count - 1 do
+    if Pieces(lstData.Items[i], '^', 1, 2) = fileitem then
+    begin
+      checkdate := strtofloatdef(Piece(lstData.Items[i], '^', 3), BIG_NUMBER);
+      if checkdate <> BIG_NUMBER then
+        if checkdate >= aOldDate then
+          if checkdate <= aNewDate then
+          begin
+            Result := true;
+            break;
+          end;
+    end;
+end;
+
+function TfrmGraphs.FileNameX(filenum: string): string;
+var
+  i: integer;
+  typestring: string;
+begin
+  Result := '';
+  with lstAllTypes do
+  for i := 0 to Items.Count - 1 do
+  begin
+    typestring := Items[i];
+    if Piece(typestring, '^', 1) = filenum then
+    begin
+      Result := Piece(Items[i], '^', 2);
+      break;
+    end;
+  end;
+  if Result = '' then
+  begin
+    with lstAllTypes do
+    for i := 0 to Items.Count - 1 do
+    begin
+      typestring := Items[i];
+      if lowercase(Piece(typestring, '^', 1)) = filenum then
+      begin
+        Result := Piece(Items[i], '^', 2);
+        break;
+      end;
+    end;
+  end;
+end;
+
+function TfrmGraphs.ItemName(filenum, itemnum: string): string;
+var
+  i: integer;
+  typestring: string;
+begin
+  Result := '';
+  filenum := UpperCase(filenum);
+  itemnum := UpperCase(itemnum);
+  with lstItems do
+  for i := 0 to Items.Count - 1 do
+  begin
+    typestring := UpperCase(Items[i]);
+    if (Piece(typestring, '^', 1) = filenum) and
+      (Piece(typestring, '^', 2) = itemnum) then
+    begin
+      Result := Piece(typestring, '^', 4);
+      break;
+    end;
+  end;
+end;
+
+procedure TfrmGraphs.InitialData;
+var
+  i, total: integer;
+  dfntype, listline: string;
+begin
+  total := pnlData.ControlCount - 1;
+  with pnlData do
+  for i:= 0 to total do
+    if Controls[i] is TListBox then
+      if Controls[i] <> lstAllTypes then
+        if Controls[i] <> lstTestSpec then
+          (Controls[i] as TListBox).Items.Clear;
+  SourcesDefault;
+  FSources.Assign(FSourcesDefault);
+  btnChangeSettings.Tag :=0;
+  btnClose.Tag := 0;
+  cboViewsTop.Tag :=0;
+  chartDatelineTop.Tag :=0;
+  lvwItemsBottom.Tag :=0;
+  lvwItemsTop.Tag :=0;
+  pnlFooter.Parent.Tag :=0;
+  pnlItemsBottom.Tag :=0;
+  pnlItemsTop.Tag :=0;
+  pnlTop.Tag :=0;
+  scrlTop.Tag :=0;
+  splGraphs.Tag :=0;
+  cboViewsTop.ItemIndex := -1;
+  cboViewsBottom.ItemIndex := -1;
+  FastAssign(rpcGetTypes(Patient.DFN, false), lstTypes.Items);
+  for i := 0 to lstTypes.Items.Count - 1 do
+  begin
+    dfntype := UpperCase(Piece(lstTypes.Items[i], '^', 1));
+    if TypeIsLoaded(dfntype) then
+      lstItems.Items.AddStrings(rpcGetItems(dfntype, Patient.DFN));
+    listline := lstTypes.Items[i];
+    dfntype := UpperCase(Piece(listline, '^', 1));
+    SetPiece(listline, '^', 1, dfntype);
+    lstTypes.Items[i] := listline;
+  end;
+  lstTypes.Hint := Patient.DFN;  // use to check for patient change
+  FMTimestamp := floattostr(FMNow);
+  FPrevEvent := '';
+  FWarning := false;
+  FFirstSwitch := true;
+end;
+
+function TfrmGraphs.TypeIsLoaded(itemtype: string): boolean;
+var
+  i: integer;
+  filetype: string;
+begin
+  Result := false;
+  for i := 0 to FSources.Count - 1 do
+  begin
+    filetype := Piece(FSources[i], '^', 1);
+    if itemtype = filetype then
+    begin
+      Result := true;
+      break;
+    end;
+  end;
+end;
+
+function TfrmGraphs.TypeIsDisplayed(itemtype: string): boolean;
+var
+  i: integer;
+  displayed, filetype: string;
+begin
+  Result := false;
+  for i := 0 to FSources.Count - 1 do
+  begin
+    filetype := Piece(FSources[i], '^', 1);
+    displayed := Piece(FSources[i], '^', 3);
+    if (itemtype = filetype) then
+    begin
+      if displayed = '1' then Result := true;
+      break;
+    end;
+  end;
+end;
+
+procedure TfrmGraphs.LoadDateRange;
+var
+  defaults, defaultrange: string;
+begin
+  FastAssign(rpcGetGraphDateRange('OR_GRAPHS'), cboDateRange.Items);
+  with cboDateRange do
+  begin
+    defaults := Items[Items.Count - 1];
+    defaultrange := Piece(defaults, '^', 1);
+    //get report views - param 1 and param 2
+    lvwItemsTop.Hint := Piece(defaults,'^', 8);     // top view
+    lvwItemsBottom.Hint := Piece(defaults,'^', 9);  // bottom view
+    //check if default range already exists
+    if strtointdef(defaultrange, BIG_NUMBER) = BIG_NUMBER then
+      ItemIndex := Items.Count - 1;
+  end;
+end;
+
+procedure TfrmGraphs.LoadType(itemtype, displayed: string);
+var
+  needtoadd: boolean;
+  i: integer;
+  filename, filetype: string;
+begin
+  if displayed <> '1' then displayed := '';
+  needtoadd := true;
+  for i := 0 to FSources.Count - 1 do
+  begin
+    filetype := Piece(FSources[i], '^', 1);
+    if itemtype = filetype then
+    begin
+      needtoadd := false;
+      break;
+    end;
+  end;
+  if needtoadd then
+  begin
+    filename := FileNameX(itemtype);
+    FSources.Add(itemtype + '^' + filename + '^' + displayed);
+    lstItems.Items.AddStrings(rpcGetItems(itemtype, Patient.DFN));
+  end;
+end;
+
+procedure TfrmGraphs.DisplayType(itemtype, displayed: string);
+var
+  i: integer;
+  filename, filetype: string;
+begin
+  if displayed <> '1' then displayed := '';
+  for i := 0 to FSources.Count - 1 do
+  begin
+    filetype := Piece(FSources[i], '^', 1);
+    if itemtype = filetype then
+    begin
+      filename := FileNameX(itemtype);
+      FSources[i] := itemtype + '^' + filename + '^' + displayed;
+      break;
+    end;
+  end;
+end;
+
+procedure TfrmGraphs.DisplayData(aSection: string);
+var
+  aChart: TChart;
+  aCheckBox: TCheckBox;
+  aListView, aOtherListView: TListView;
+  aDateline, aRightPad: TPanel;
+  aScrollBox: TScrollBox;
+begin
+  FHintStop := true;
+  SetFontSize(lblViewsTop.Font.Size);
+  if aSection = 'top' then
+  begin
+    aListView := lvwItemsTop;
+    aOtherListView := lvwItemsBottom;
+    aDateline := pnlDatelineTop;
+    aRightPad := pnlTopRightPad;
+    aScrollBox := scrlTop;
+    aChart := chartDatelineTop;
+    aCheckBox := chkItemsTop;
+  end
+  else
+  begin
+    aListView := lvwItemsBottom;
+    aOtherListView := lvwItemsTop;
+    aDateline := pnlDatelineBottom;
+    aRightPad := pnlBottomRightPad;
+    aScrollBox := scrlBottom;
+    aChart := chartDatelineBottom;
+    aCheckBox := chkItemsBottom;
+  end;
+  if aListView.SelCount < 1 then
+  begin
+    if not FFirstClick then
+    begin
+      FFirstClick := true;
+      while aScrollBox.ControlCount > 0 do
+        aScrollBox.Controls[0].Free;
+      exit;
+    end;
+    FFirstClick := false;
+    aDateline.Visible := false;
+    while aScrollBox.ControlCount > 0 do
+      aScrollBox.Controls[0].Free;
+    if aOtherListView.SelCount > 0 then
+      if aOtherListView = lvwItemsTop then
+        ItemsClick(self, lvwItemsTop, lvwItemsBottom, chkItemsTop, cboViewsTop, lstSelCopyTop, 'top')
+      else
+        ItemsClick(self, lvwItemsBottom, lvwItemsTop, chkItemsBottom, cboViewsBottom, lstSelCopyBottom, 'bottom');
+    exit;
+  end;
+  aScrollBox.VertScrollBar.Visible := false;
+  aScrollBox.HorzScrollBar.Visible := false;
+  aChart.RemoveAllSeries;    // this would leave bottom dateline visible on date change
+  //chartDatelineTop.RemoveAllSeries;    // do both
+  //chartDatelineBottom.RemoveAllSeries; // do both
+  lstNonNumeric.Items.Clear;
+  if aCheckBox.Checked then
+    MakeSeparate(aScrollBox, aListView, aRightPad, aSection)
+  else
+  begin
+    MakeTogether(aScrollBox, aListView, aRightPad, aSection);
+  end;
+  ChangeStyle;
+  pnlInfo.Font.Size := lblViewsTop.Font.Size;
+  if ((lvwItemsTop.SelCount > MAX_ITEM_DISCLAIMER) and (not chkItemsTop.Checked))
+    or ((lvwItemsBottom.SelCount > MAX_ITEM_DISCLAIMER) and (not chkItemsBottom.Checked)) then
+  begin
+    pnlInfo.Caption := TXT_DISCLAIMER;
+    pnlInfo.Color := COLOR_WARNING;
+    pnlInfo.Visible := true;
+  end
+  else
+    pnlInfo.Visible := false;
+  if btnChangeSettings.Tag > 0 then
+  begin
+    pnlInfo.Caption := TXT_WARNING;
+    pnlInfo.Color := COLOR_WARNING;
+    pnlInfo.Visible := true;
+  end;
+  //if copy(pnlInfo.Caption, 1, 7) = 'Warning' then
+  if FWarning then
+    pnlInfo.Visible := true;
+  pnlHeader.Visible := pnlInfo.Visible;
+  aScrollBox.VertScrollBar.Visible := true;
+  aScrollBox.HorzScrollBar.Visible := false;
+end;
+
+procedure TfrmGraphs.chkItemsTopClick(Sender: TObject);
+begin
+  Screen.Cursor := crHourGlass;
+  DisplayData('top');
+  if FFirstSwitch then   // this code makes events appear better (on first click was not displaying bar)
+  begin
+    chartBaseMouseDown(chartDatelineTop, mbLeft, [], 1, 1);
+    DisplayData('top');
+    FFirstSwitch := false;
+  end;
+  Screen.Cursor := crDefault;
+end;
+
+procedure TfrmGraphs.chkItemsBottomClick(Sender: TObject);
+begin
+  Screen.Cursor := crHourGlass;
+  DisplayData('bottom');
+  if FFirstSwitch then   // this code makes events appear better (on first click was not displaying bar)
+  begin
+    chartBaseMouseDown(chartDatelineBottom, mbLeft, [], 1, 1);
+    DisplayData('bottom');
+    FFirstSwitch := false;
+  end;
+  Screen.Cursor := crDefault;
+end;
+
+procedure TfrmGraphs.BottomAxis(aScrollBox: TScrollBox);
+var
+  i: integer;
+  ChildControl: TControl;
+begin
+  for i := 0 to aScrollBox.ControlCount - 1 do
+  begin
+    ChildControl := aScrollBox.Controls[i];
+    with (ChildControl as TChart).BottomAxis do
+    begin
+      Automatic := false;
+      Minimum := 0;
+      Maximum := chartDatelineTop.BottomAxis.Maximum;
+      Minimum := chartDatelineTop.BottomAxis.Minimum;
+    end;
+  end;
+end;
+
+procedure TfrmGraphs.AdjustTimeframe;
+begin
+  with FGraphSetting do
+  begin
+    if HighTime = 0 then exit;  // no data to chart clear form ???
+    chartDatelineTop.BottomAxis.Minimum := 0;  // avoid possible error
+    chartDatelineTop.BottomAxis.Maximum := HighTime;
+    if LowTime < HighTime then
+      chartDatelineTop.BottomAxis.Minimum := LowTime;
+    chartDatelineBottom.BottomAxis.Minimum := 0;  // avoid possible error
+    chartDatelineBottom.BottomAxis.Maximum := HighTime;
+    if HighTime > FMDateTimeToDateTime(FMStopDate) then
+      chartDatelineTop.BottomAxis.Maximum := FMDateTimeToDateTime(FMStopDate);
+    if LowTime < FMDateTimeToDateTime(FMStartDate) then
+      chartDatelineTop.BottomAxis.Minimum := FMDateTimeToDateTime(FMStartDate);  // *****
+  end;
+  BottomAxis(scrlTop);
+  BottomAxis(scrlBottom);
+end;
+
+procedure TfrmGraphs.ChartOnZoom(Sender: TObject);
+var
+  i: integer;
+  padding: double;
+  datehx: string;
+  BigTime, SmallTime: TDateTime;
+  ChildControl: TControl;
+begin
+  if not (Sender is TChart) then exit;
+  if not FGraphSetting.VerticalZoom then
+  begin
+    padding := 0; //(FYMaxValue - FYMinValue) * ((100 - ZOOM_PERCENT) * 0.01);
+    (Sender as TChart).LeftAxis.Maximum := BIG_NUMBER;    // avoid min>max error
+    (Sender as TChart).LeftAxis.Minimum := -BIG_NUMBER;
+    (Sender as TChart).LeftAxis.Maximum := FYMaxValue + padding;    //padding 0?
+    (Sender as TChart).LeftAxis.Minimum := FYMinValue - padding;    //padding 0?
+  end;
+  SmallTime := (Sender as TChart).BottomAxis.Minimum;
+  BigTime := (Sender as TChart).BottomAxis.Maximum;
+  if BigTime < SmallTime then BigTime := SmallTime;   // avoid min>max error
+  for i := 0 to scrlTop.ControlCount - 1 do
+  begin
+    ChildControl := scrlTop.Controls[i];
+    SizeDates((ChildControl as TChart), SmallTime, BigTime);
+  end;
+  SizeDates(chartDatelineTop, SmallTime, BigTime);
+  for i := 0 to scrlBottom.ControlCount - 1 do
+  begin
+    ChildControl := scrlBottom.Controls[i];
+    SizeDates((ChildControl as TChart), SmallTime, BigTime);
+  end;
+  SizeDates(chartDatelineBottom, SmallTime, BigTime);
+  if FMouseDown and (Sender as TChart).Zoomed then
+  begin
+    datehx := FloatToStr(SmallTime) + '^' + FloatToStr(BigTime);
+    lstZoomHistory.Items.Add(datehx);
+    mnuPopGraphZoomBack.Enabled := true;
+    FMouseDown := false;
+    ZoomUpdateinfo(SmallTime, BigTime);
+  end;
+end;
+
+procedure TfrmGraphs.ChartOnUndoZoom(Sender: TObject);
+var
+  i: integer;
+  padding: double;
+  BigTime, SmallTime: TDateTime;
+  ChildControl: TControl;
+begin
+  if not (Sender is TChart) then exit;
+  FRetainZoom := false;
+  mnuPopGraphZoomBack.Enabled := false;
+  lstZoomHistory.Items.Clear;
+  if not FGraphSetting.VerticalZoom then
+  begin
+    padding := 0; //(FYMaxValue - FYMinValue) * ((100 - ZOOM_PERCENT) * 0.01);
+    (Sender as TChart).LeftAxis.Maximum := BIG_NUMBER;    // avoid min>max error
+    (Sender as TChart).LeftAxis.Minimum := -BIG_NUMBER;
+    (Sender as TChart).LeftAxis.Maximum := FYMaxValue + padding;    //padding 0?
+    (Sender as TChart).LeftAxis.Minimum := FYMinValue - padding;    //padding 0?
+  end;
+  SmallTime := (Sender as TChart).BottomAxis.Minimum;
+  BigTime := (Sender as TChart).BottomAxis.Maximum;
+  if BigTime < SmallTime then BigTime := SmallTime;   // avoid min>max error
+  for i := 0 to scrlTop.ControlCount - 1 do
+  begin
+    ChildControl := scrlTop.Controls[i];
+    SizeDates((ChildControl as TChart), SmallTime, BigTime);
+  end;
+  SizeDates(chartDatelineTop, SmallTime, BigTime);
+  for i := 0 to scrlBottom.ControlCount - 1 do
+  begin
+    ChildControl := scrlBottom.Controls[i];
+    SizeDates((ChildControl as TChart), SmallTime, BigTime);
+  end;
+  SizeDates(chartDatelineBottom, SmallTime, BigTime);
+  if FMouseDown then
+  begin
+    FMouseDown := false;
+    pnlInfo.Caption := '';
+    pnlInfo.Color := COLOR_INFO;
+    pnlInfo.Visible := false;
+    pnlHeader.Visible := false;
+  end;
+end;
+
+procedure TfrmGraphs.SizeDates(aChart: TChart; aSmallTime, aBigTime: TDateTime);
+var
+  datediff, yeardiff: integer;
+begin
+  with aChart.BottomAxis do
+  begin
+    Automatic := false;
+    Maximum := BIG_NUMBER;    // avoid min>max error
+    Minimum := -BIG_NUMBER;
+    Minimum := aSmallTime;
+    Maximum := aBigTime;
+    Increment := DateTimeStep[dtOneMinute];
+    datediff := DaysBetween(aBigTime, aSmallTime);
+    yeardiff := datediff div 365;
+    DateTimeFormat := '';
+    Labels := true;
+    if yeardiff > 0 then
+    begin
+      if (pnlScrollTopBase.Width div yeardiff) < DWIDTH_MDY then
+        DateTimeFormat := DFORMAT_MYY;
+      if (pnlScrollTopBase.Width div yeardiff) < DWIDTH_MYY then
+        DateTimeFormat := DFORMAT_YY;
+      if (pnlScrollTopBase.Width div yeardiff) < DWIDTH_YY then
+        Labels := false;
+    end;
+  end;
+  if datediff < 1 then
+  begin
+    if not aChart.Foot.Visible then
+    begin
+      aChart.Foot.Text.Clear;
+      aChart.Foot.Text.Insert(0, FormatDateTime('mmm d, yyyy', aSmallTime));
+      aChart.Foot.Font.Color := clBtnText;
+      aChart.Foot.Visible := true;
+    end;
+  end
+  else
+    aChart.Foot.Visible := false;
+end;
+
+procedure TfrmGraphs.MakeSeparate(aScrollBox: TScrollBox; aListView:
+  TListView; aPadPanel: TPanel; section: string);
+var
+  acnt, bcnt, displayheight, displaynum, gcnt, graphtype, i, j, lcnt, ncnt, pcnt, vcnt: integer;
+  aTitle, checkdata, filetype, high, low, specimen, specnum, typeitem, units: string;
+  newchart: TChart;
+  aGraphItem: TGraphItem;
+begin
+  FNonNumerics := false;
+  if section = 'top' then pnlItemsTop.Tag := 0 else pnlItemsBottom.Tag := 0;
+  while aScrollBox.ControlCount > 0 do
+    aScrollBox.Controls[0].Free;
+  aPadPanel.Visible := false;
+  if FGraphSetting.Hints then         //**************
+  begin
+    chartDatelineTop.OnMouseMove := chartBaseMouseMove;
+    chartDatelineBottom.OnMouseMove := chartBaseMouseMove;
+  end
+  else
+  begin
+    chartDatelineTop.OnMouseMove := nil;
+    chartDatelineBottom.OnMouseMove := nil;
+  end;
+  pcnt := 0; gcnt := 0; vcnt := 0; lcnt := 0; ncnt := 0; bcnt := 0; acnt := 0;
+  for j := 0 to aListView.Items.Count - 1 do
+  if aListView.Items[j].Selected then
+  begin
+    aGraphItem := TGraphItem(aListView.Items.Item[j].SubItems.Objects[3]);
+    filetype := UpperCase(Piece(aGraphItem.Values, '^', 1));
+    typeitem := UpperCase(Piece(aGraphItem.Values, '^', 2));
+    graphtype := GraphTypeNum(filetype); //*****strtointdef(Piece(aListBox.Items[j], '^', 2), 1);
+    if (filetype = '63') and (lstData.Items.Count > 0) then
+    begin
+      checkdata := '';
+      for i := 0 to lstData.Items.Count - 1 do
+      begin
+        checkdata := lstData.Items[i];
+        if (Piece(checkdata, '^', 1) = '63') and (Piece(checkdata, '^', 2) = typeitem) then
+          break;
+      end;
+      specnum := Piece(checkdata, '^', 7);
+      specimen := Piece(checkdata, '^', 8);
+      RefUnits(typeitem, specnum, low, high, units);
+      units := LowerCase(units);
+      if units = '' then units := '  ';
+    end
+    else
+    begin
+      specimen := ''; low := ''; high := ''; units := '';
+    end;
+    aTitle := filetype + '^' + typeitem + '^' + aListView.Items[j].Caption + '^' +
+              specimen + '^' + low + '^' + high + '^' + units;
+    newchart := TChart.Create(self);
+    with newchart do
+    begin
+      Parent := aScrollBox;
+      View3D := false;
+      height := 170;
+      Align := alBottom;
+      Align := alTop;
+      AllowPanning := pmNone;
+      Legend.LegendStyle := lsSeries;
+      Legend.ShadowSize := 1;
+      Legend.Color := clCream;
+      Legend.VertMargin := 0;
+      Legend.Alignment := laTop;
+      Legend.Visible := true;
+      Gradient.EndColor := clGradientActiveCaption;
+      //SetPiece(aTitle, '^', 3, 'zzzz: ' + Piece(aTitle, '^', 3)); // test prefix
+      if (graphtype = 1) and (btnChangeSettings.Tag = 1) then
+        LeftAxis.Title.Caption := 'StdDev'
+      else if (graphtype = 1) and (btnChangeSettings.Tag = 2) then
+      begin
+        LeftAxis.Title.Caption := '1/' + units;
+        SetPiece(aTitle, '^', 3, 'Inverse ' + Piece(aTitle, '^', 3));
+      end
+      else
+        LeftAxis.Title.Caption := units;
+      if graphtype <> 1 then
+      begin
+        LeftAxis.Visible := false;
+        MarginLeft := round((50 / (pnlScrollTopBase.Width + 1)) * 100);       // ************* marginleft is a %
+      end;
+      BottomAxis.ExactDateTime := true;
+      BottomAxis.Increment := DateTimeStep[dtOneMinute];
+      HideDates(newchart);
+      BevelOuter := bvNone;
+      OnZoom := ChartOnZoom;
+      OnUndoZoom := ChartOnUndoZoom;
+      OnClickSeries := chartBaseClickSeries;
+      OnClickLegend := chartBaseClickLegend;
+      OnDblClick := mnuPopGraphDetailsClick;
+      OnMouseDown := chartBaseMouseDown;
+      if FGraphSetting.Hints then             //*****
+        OnMouseMove := chartBaseMouseMove
+      else
+        OnMouseMove := nil;
+    end;
+    splGraphs.Tag := 1;    // show ref ranges
+    if graphtype = 4 then graphtype := 2;         // change points to be bars
+    case graphtype of
+      1:  MakeLineSeries(newchart, aTitle, filetype, lcnt, ncnt, false);
+      2:  MakeBarSeries(newchart, aTitle, filetype, bcnt);
+      3:  MakeVisitGanttSeries(newchart, aTitle, filetype, vcnt);
+      4:  MakePointSeries(newchart, aTitle, filetype, pcnt);
+      5:  MakeArrowSeries(newchart, aTitle, filetype, acnt);
+      6:  MakeGanttSeries(newchart, aTitle, filetype, gcnt);
+      7:  MakeAGanttSeries(newchart, aTitle, filetype, gcnt);
+      8:  MakeManyGanttSeries(newchart, aTitle, filetype, gcnt);
+      9:  MakeWeightedArrowSeries(newchart, aTitle, filetype, acnt);
+     10:  MakeWeightedGanttSeries(newchart, aTitle, filetype, gcnt);
+    end;
+  end;
+  if section = 'top' then
+  begin
+    pnlDatelineTop.Align := alBottom;
+    pnlDatelineTop.Height := 30;
+    scrlTop.Align := alClient;
+    pnlDatelineTop.Visible := false;
+  end
+  else
+  begin
+    pnlDatelineBottom.Align := alBottom;
+    pnlDatelineBottom.Height := 30;
+    scrlBottom.Align := alClient;
+    pnlDatelineBottom.Visible := false;
+  end;
+  with aScrollBox do
+  begin
+    if ControlCount < FGraphSetting.MaxGraphs then        //**** formating should be made for top & bottom
+      displaynum := ControlCount
+    else
+      displaynum := FGraphSetting.MaxGraphs;
+    if displaynum = 0 then
+      displaynum := 3;
+    if (Height div displaynum) < FGraphSetting.MinGraphHeight then
+      displayheight := FGraphSetting.MinGraphHeight
+    else
+      displayheight := (Height div displaynum);
+    for i := 0 to aScrollBox.ControlCount - 1 do
+      Controls[i].height := displayheight;
+  end;
+  if (FGraphSetting.HighTime = FGraphSetting.LowTime)
+  or (lcnt = 1) or (pcnt = 1) or (bcnt = 1) or (vcnt = 1) then
+  begin
+    FGraphSetting.HighTime := FGraphSetting.HighTime + 1;
+    FGraphSetting.LowTime := FGraphSetting.LowTime - 1;
+  end;
+  AdjustTimeframe;
+  if chartDatelineTop.Visible then chartDatelineTop.ZoomPercent(ZOOM_PERCENT);
+  if chartDatelineBottom.Visible then chartDatelineBottom.ZoomPercent(ZOOM_PERCENT);
+  if FNonNumerics then
+    if section = 'top' then pnlItemsTop.Tag := 1
+    else pnlItemsBottom.Tag := 1;
+end;
+
+procedure TfrmGraphs.MakeTogether(aScrollBox: TScrollBox; aListView:
+  TListView; aPadPanel: TPanel; section: string);
+var
+  anylines, nolines, onlylines, singlelabtest: boolean;
+  acnt, bcnt, cnt, gcnt, graphtype, i, j, lcnt, ncnt, pcnt, vcnt: integer;
+  portion: double;
+  aTitle, checkdata, filetype, high, low, specimen, specnum, typeitem, units: string;
+  newchart: TChart;
+  aGraphItem: TGraphItem;
+begin
+  pcnt := 0; gcnt := 0; lcnt := 0; ncnt := 0; bcnt := 0; acnt := 0;
+  onlylines := true;
+  anylines := false;
+  nolines := true;
+  FNonNumerics := false;
+  if section = 'top' then pnlItemsTop.Tag := 0 else pnlItemsBottom.Tag := 0;
+  if FGraphSetting.Hints then       //******
+  begin
+    chartDatelineTop.OnMouseMove := chartBaseMouseMove;
+    chartDatelineBottom.OnMouseMove := chartBaseMouseMove;
+  end
+  else
+  begin
+    chartDatelineTop.OnMouseMove := nil;
+    chartDatelineBottom.OnMouseMove := nil;
+  end;
+  for j := 0 to aListView.Items.Count - 1 do
+  if aListView.Items[j].Selected then
+  begin
+    aGraphItem := TGraphItem(aListView.Items.Item[j].SubItems.Objects[3]);
+    filetype := UpperCase(Piece(aGraphItem.Values, '^', 1));
+    typeitem := UpperCase(Piece(aGraphItem.Values, '^', 2));
+    if aListView.SelCount = 1 then                 // one lab test - make separate
+    begin
+      if filetype = '63' then
+      begin
+        MakeSeparate(aScrollBox, aListView, aPadPanel, section);
+        exit;
+      end;
+    end;
+    graphtype := GraphTypeNum(filetype);
+    case graphtype of
+    1: lcnt := lcnt + 1;
+    2: bcnt := bcnt + 1;
+    3: vcnt := vcnt + 1;
+    4: pcnt := pcnt + 1;
+    5: acnt := acnt + 1;
+    6: gcnt := gcnt + 1;
+    7: gcnt := gcnt + 1;
+    8: gcnt := gcnt + 1;
+    9: acnt := acnt + 1;
+    end;
+    if graphtype = 1 then
+    begin
+      anylines := true;
+      nolines := false;
+    end
+    else
+      onlylines := false;
+  end;
+  if section = 'top' then
+    chkItemsTop.Checked := false
+  else
+    chkItemsBottom.Checked := false;
+  lstTempCheck.Items.Clear;
+  while aScrollBox.ControlCount > 0 do
+    aScrollBox.Controls[0].Free;
+  newchart := TChart.Create(self);  // whynot use base?
+  with newchart do          // if a single line graph do lab stuff (ref range, units) ****************************************
+  begin
+    Parent := aScrollBox;
+    View3D := false;
+    Chart3DPercent := 10;
+    AllowPanning := pmNone;
+    Align := alClient;
+    Gradient.EndColor := clGradientActiveCaption;
+    Legend.LegendStyle := lsSeries;
+    Legend.ShadowSize := 1;
+    Legend.Color := clCream;
+    Legend.VertMargin := 0;
+    Legend.Alignment := laTop;
+    Legend.Visible := true;
+    LeftAxis.Title.Caption := ' ';
+    BottomAxis.ExactDateTime := true;
+    BottomAxis.Increment := DateTimeStep[dtOneMinute];
+    HideDates(newchart);
+    BevelOuter := bvNone;
+    OnZoom := ChartOnZoom;
+    OnUndoZoom := ChartOnUndoZoom;
+    OnClickSeries := chartBaseClickSeries;
+    OnClickLegend := chartBaseClickLegend;
+    OnDblClick := mnuPopGraphDetailsClick;
+    OnMouseDown := chartBaseMouseDown;
+    if FGraphSetting.Hints then               //******
+      OnMouseMove := chartBaseMouseMove
+    else
+      OnMouseMove := nil;
+    Visible := false;
+  end;
+  aPadPanel.Visible := true;
+  portion := PortionSize(lcnt, pcnt, gcnt, vcnt, bcnt, acnt);
+  if section = 'top' then
+    SizeTogether(onlylines, nolines, anylines, scrlTop, newchart,
+      pnlDatelineTop, pnlScrollTopBase, portion)
+  else
+    SizeTogether(onlylines, nolines, anylines, scrlBottom, newchart,
+      pnlDatelineBottom, pnlScrollBottomBase, portion);
+  if btnChangeSettings.Tag = 1 then  splGraphs.Tag := 1 // show ref ranges
+  else splGraphs.Tag := 0;
+
+  if nolines then
+  begin
+    pcnt := 0; gcnt := 0; vcnt := 0; bcnt := 0; acnt := 0;
+    for j := 0 to aListView.Items.Count - 1 do
+    if aListView.Items[j].Selected then
+    begin
+      aGraphItem := TGraphItem(aListView.Items.Item[j].SubItems.Objects[3]);
+      filetype := Piece(aGraphItem.Values, '^', 1);
+      typeitem := Piece(aGraphItem.Values, '^', 2);
+      aTitle := filetype + '^' + typeitem + '^' + aListView.Items[j].Caption + '^';
+      graphtype := GraphTypeNum(filetype);
+      if section = 'top' then
+        MakeDateline(section, aTitle, filetype, chartDatelineTop, graphtype, bcnt, pcnt, gcnt, vcnt, acnt)
+      else
+        MakeDateline(section, aTitle, filetype, chartDatelineBottom, graphtype, bcnt, pcnt, gcnt, vcnt, acnt);
+    end;
+    if section = 'top' then
+    begin
+      scrlTop.Align := alTop;
+      scrlTop.Height := 1; //pnlScrollTopBase.Height div 4;
+      pnlDatelineTop.Align := alClient;
+      pnlDatelineTop.Visible := true;
+    end
+    else
+    begin
+      scrlBottom.Align := alTop;
+      scrlBottom.Height := 1; //pnlScrollBottomBase.Height div 4;
+      pnlDatelineBottom.Align := alClient;
+      pnlDatelineBottom.Visible := true;
+    end;
+  end
+  else if onlylines then
+  begin
+    lcnt := 0;
+    for j := 0 to aListView.Items.Count - 1 do
+    if aListView.Items[j].Selected then
+    begin
+      aGraphItem := TGraphItem(aListView.Items.Item[j].SubItems.Objects[3]);
+      filetype := Piece(aGraphItem.Values, '^', 1);
+      typeitem := Piece(aGraphItem.Values, '^', 2);
+      if (filetype = '63') and (lstData.Items.Count > 0) then    //***********
+      begin
+        checkdata := '';
+        for i := 0 to lstData.Items.Count - 1 do
+        begin
+          checkdata := lstData.Items[i];
+          if (Piece(checkdata, '^', 1) = '63') and (Piece(checkdata, '^', 2) = typeitem) then
+            break;
+        end;
+        specnum := Piece(checkdata, '^', 7);
+        specimen := Piece(checkdata, '^', 8);
+        RefUnits(typeitem, specnum, low, high, units);
+        units := LowerCase(units);
+        if units = '' then units := '  ';
+      end
+      else
+      begin
+        specimen := ''; low := ''; high := ''; units := '';
+      end;
+      aTitle := filetype + '^' + typeitem + '^' + aListView.Items[j].Caption + '^' +
+                specimen + '^' + low + '^' + high + '^' + units;
+      MakeLineSeries(newchart, aTitle, filetype, lcnt, ncnt, true)
+    end;
+    if section = 'top' then
+    begin
+      pnlDatelineTop.Align := alBottom;
+      pnlDatelineTop.Height := 5;
+      scrlTop.Align := alClient;
+      pnlDatelineTop.Visible := false;
+    end
+    else
+    begin
+      pnlDatelineBottom.Align := alBottom;
+      pnlDatelineBottom.Height := 5;
+      scrlBottom.Align := alClient;
+      pnlDatelineBottom.Visible := false;
+    end;
+    with newchart do
+    begin
+      if btnChangeSettings.Tag = 1 then
+        LeftAxis.Title.Caption := 'StdDev';
+      Visible := true;
+    end;
+  end
+  else if anylines then
+  begin
+    pcnt := 0; gcnt := 0; vcnt := 0; lcnt := 0; ncnt := 0; bcnt := 0; acnt := 0;
+    cnt := 0;
+    for j := 0 to aListView.Items.Count - 1 do
+    if aListView.Items[j].Selected then
+    begin
+      aGraphItem := TGraphItem(aListView.Items.Item[j].SubItems.Objects[3]);
+      filetype := Piece(aGraphItem.Values, '^', 1);
+      if filetype = '120.5' then
+      begin
+        cnt := BIG_NUMBER;
+        break;
+      end;
+      if filetype = '63' then
+        cnt := cnt + 1;
+      if cnt > 1 then
+        break;
+    end;
+    singlelabtest := cnt = 1;
+    for j := 0 to aListView.Items.Count - 1 do
+    if aListView.Items[j].Selected then
+    begin
+      aGraphItem := TGraphItem(aListView.Items.Item[j].SubItems.Objects[3]);
+      filetype := Piece(aGraphItem.Values, '^', 1);
+      typeitem := Piece(aGraphItem.Values, '^', 2);
+      if (filetype = '63') and (lstData.Items.Count > 0) then    //***********
+      begin
+        checkdata := '';
+        for i := 0 to lstData.Items.Count - 1 do
+        begin
+          checkdata := lstData.Items[i];
+          if (Piece(checkdata, '^', 1) = '63') and (Piece(checkdata, '^', 2) = typeitem) then
+            break;
+        end;
+        specnum := Piece(checkdata, '^', 7);
+        specimen := Piece(checkdata, '^', 8);
+        RefUnits(typeitem, specnum, low, high, units);
+        units := LowerCase(units);
+        if units = '' then units := '  ';
+      end
+      else
+      begin
+        specimen := ''; low := ''; high := ''; units := '';
+      end;
+      aTitle := filetype + '^' + typeitem + '^' + aListView.Items[j].Caption + '^' +
+                specimen + '^' + low + '^' + high + '^' + units;
+      graphtype := GraphTypeNum(filetype);
+      if graphtype = 1 then
+      begin
+        if btnChangeSettings.Tag = 1 then
+          newchart.LeftAxis.Title.Caption := 'StdDev'
+        else
+          newchart.LeftAxis.Title.Caption := units;
+        if singlelabtest then
+          splGraphs.Tag := 1
+        else
+          splGraphs.Tag := 0;
+        MakeLineSeries(newchart, aTitle, filetype, lcnt, ncnt, true);
+      end
+      else if section = 'top' then
+        MakeDateline(section, aTitle, filetype, chartDatelineTop, graphtype, bcnt, pcnt, gcnt, vcnt, acnt)
+      else
+        MakeDateline(section, aTitle, filetype, chartDatelineBottom, graphtype, bcnt, pcnt, gcnt, vcnt, acnt);
+    end;
+    if section = 'top' then
+    begin
+      scrlTop.Align := alTop;
+      pnlDatelineTop.Align := alBottom;
+      pnlDatelineTop.Height := pnlScrollTopBase.Height div 2;
+      scrlTop.Align := alClient;
+      pnlDatelineTop.Visible := true;
+    end
+    else
+    begin
+      scrlBottom.Align := alTop;
+      pnlDatelineBottom.Align := alBottom;
+      pnlDatelineBottom.Height := pnlScrollBottomBase.Height div 2;
+      scrlBottom.Align := alClient;
+      pnlDatelineBottom.Visible := true;
+    end;
+    with newchart do
+    begin
+      if btnChangeSettings.Tag = 1 then
+        LeftAxis.Title.Caption := 'StdDev';
+      Visible := true;
+    end;
+  end;
+  if (FGraphSetting.HighTime = FGraphSetting.LowTime)
+  or (lcnt = 1) or (pcnt = 1) or (bcnt = 1) or (acnt = 1) or (vcnt = 1) then
+  begin
+    FGraphSetting.HighTime := FGraphSetting.HighTime + 1;
+    FGraphSetting.LowTime := FGraphSetting.LowTime - 1;
+    chartDatelineTop.LeftAxis.Minimum := chartDatelineTop.LeftAxis.Minimum - 0.5;
+    chartDatelineTop.LeftAxis.Maximum := chartDatelineTop.LeftAxis.Maximum + 0.5;
+    chartDatelineBottom.LeftAxis.Minimum := chartDatelineBottom.LeftAxis.Minimum - 0.5;
+    chartDatelineBottom.LeftAxis.Maximum := chartDatelineBottom.LeftAxis.Maximum + 0.5;
+  end;
+  AdjustTimeframe;
+  if chartDatelineTop.Visible then chartDatelineTop.ZoomPercent(ZOOM_PERCENT);
+  if chartDatelineBottom.Visible then chartDatelineBottom.ZoomPercent(ZOOM_PERCENT);
+  if FNonNumerics then
+    if section = 'top' then pnlItemsTop.Tag := 1
+    else pnlItemsBottom.Tag := 1;
+end;
+
+function TfrmGraphs.PortionSize(lcnt, pcnt, gcnt, vcnt, bcnt, acnt: integer): double;
+var
+  etotal, evalue, dvalue, value: double;
+begin
+  dvalue := (gcnt + vcnt + acnt);
+  evalue := (pcnt + bcnt) / 2;
+  etotal := dvalue + evalue;
+  if etotal > 0 then
+  begin
+    value := lcnt / etotal;
+    if value > 4 then Result := 0.2
+    else if etotal < 5 then Result := 0.2
+    else if value < 0.25 then Result := 0.8
+    else if value < 0.4 then Result := 0.6
+    else Result := 0.5;
+  end
+  else
+    Result := 0;
+end;
+
+procedure TfrmGraphs.MakeDateline(section, aTitle, aFileType: string; aChart: TChart; graphtype: integer;
+  var bcnt, pcnt, gcnt, vcnt, acnt: integer);
+begin
+  aChart.LeftAxis.Automatic := true;
+  aChart.LeftAxis.Visible := true;
+  //if graphtype = 4 then graphtype := 2;    // makes all points into bars
+  case graphtype of
+    2:  MakeBarSeries(aChart, aTitle, aFileType, bcnt);
+    3:  MakeVisitGanttSeries(aChart, aTitle, aFileType, vcnt);
+    4:  MakePointSeries(aChart, aTitle, aFileType, pcnt);
+    5:  MakeArrowSeries(aChart, aTitle, aFileType, acnt);
+    6:  MakeGanttSeries(aChart, aTitle, aFileType, gcnt);
+    7:  MakeAGanttSeries(aChart, aTitle, aFileType, gcnt);
+    8:  MakeManyGanttSeries(aChart, aTitle, aFileType, gcnt);
+    9:  MakeWeightedArrowSeries(aChart, aTitle, aFileType, acnt);
+   10:  MakeWeightedGanttSeries(aChart, aTitle, aFileType, gcnt);
+  end;
+end;
+
+procedure TfrmGraphs.SizeTogether(onlylines, nolines, anylines: Boolean; aScroll: TScrollBox;
+  aChart: TChart; aPanel, aPanelBase: TPanel; portion: Double);
+begin
+  if onlylines then                     //top &bottom
+  begin
+    aScroll.Align := alTop;
+    aScroll.Height := 1;
+    aChart.Visible := false;
+    aPanel.Align := alClient;
+    aPanel.Visible := true;
+  end
+  else if nolines then
+  begin
+    aPanel.Align := alBottom;
+    aPanel.Height := 5;
+    aScroll.Align := alClient;
+    aPanel.Visible := false;
+    if btnChangeSettings.Tag = 1 then
+      aChart.LeftAxis.Title.Caption := 'StdDev';
+  end
+  else if anylines then
+  begin
+    aScroll.Align := alTop;
+    aPanel.Align := alBottom;
+    aPanel.Height := round(aPanelBase.Height * portion);
+    if aPanel.Height < 60 then
+      if aPanelBase.Height > 100 then aPanel.Height := 60;           //***
+    aScroll.Align := alClient;
+    aPanel.Visible := true;
+    if btnChangeSettings.Tag = 1 then
+      aChart.LeftAxis.Title.Caption := 'StdDev';
+  end;
+end;
+
+function TfrmGraphs.Vfactor(aTitle: string): double;  // returns first numbers in string
+var
+  firstnum: boolean;
+  i: integer;
+  vfactor: string;
+begin
+  vfactor := '';
+  firstnum := false;
+  for i := 0 to length(aTitle) - 1 do
+    if IsDelimiter('1234567890.', aTitle, i) then
+    begin
+      vfactor := vfactor + aTitle[i];
+      firstnum := true;
+    end
+    else
+      if firstnum = true then break;
+  Result := strtofloatdef(vfactor, 1);
+end;
+
+function TfrmGraphs.NextColor(aCnt: integer): TColor;
+begin
+  case (aCnt mod NUM_COLORS) of
+    1: Result := clRed;
+    2: Result := clBlue;
+    3: Result := clYellow;
+    4: Result := clGreen;
+    5: Result := clFuchsia;
+    6: Result := clMoneyGreen;
+    7: Result := clOlive;
+    8: Result := clLime;
+    9: Result := clMedGray;
+   10: Result := clNavy;
+   11: Result := clAqua;
+   12: Result := clGray;
+   13: Result := clSkyBlue;
+   14: Result := clTeal;
+   15: Result := clBlack;
+    0: Result := clPurple;
+   16: Result := clMaroon;
+   17: Result := clCream;
+   18: Result := clSilver;
+   else
+       Result := clWhite;
+   end;
+end;
+
+
+procedure TfrmGraphs.mnuPopGraphSwapClick(Sender: TObject);
+var
+  tempcheck: boolean;
+  bottomview, i, j, topview: integer;
+  typeitem: string;
+  aGraphItem: TGraphItem;
+begin
+  FFirstClick := true;
+  if (lvwItemsTop.SelCount = 0) and (lvwItemsBottom.SelCount = 0) then exit;
+  topview := cboViewsTop.ItemIndex;
+  bottomview := cboViewsBottom.ItemIndex;
+  HideGraphs(true);
+  with chkDualViews do
+    if not Checked then
+    begin
+      Checked := true;
+      Click;
+    end;
+  tempcheck := chkItemsTop.Checked;
+  chkItemsTop.Checked := chkItemsBottom.Checked;
+  chkItemsBottom.Checked := tempcheck;
+  pnlBottom.Height := pnlMain.Height - pnlBottom.Height;
+  lstScratchSwap.Items.Clear;
+  if topview < 1 then
+    with lvwItemsTop do
+    for i := 0 to Items.Count - 1 do
+      if Items[i].Selected then
+      begin
+        aGraphItem := TGraphItem(Items.Item[i].SubItems.Objects[3]);
+        lstScratchSwap.Items.Add(aGraphItem.Values);
+      end;
+  if bottomview > 0 then
+  begin
+    cboViewsTop.ItemIndex := bottomview;
+    cboViewsTopChange(self);
+  end
+  else
+  begin
+    cboViewsTop.ItemIndex := -1;
+    cboViewsTop.Text := '';
+    lvwItemsTop.ClearSelection;
+    with lvwItemsBottom do
+    for i := 0 to Items.Count - 1 do
+    if Items[i].Selected then
+    begin
+      aGraphItem := TGraphItem(Items.Item[i].SubItems.Objects[3]);
+      typeitem := Pieces(aGraphItem.Values, '^', 1, 2);
+      for j := 0 to lvwItemsTop.Items.Count - 1 do
+      begin
+        aGraphItem := TGraphItem(lvwItemsTop.Items[j].SubItems.Objects[3]);
+        if typeitem = Pieces(aGraphItem.Values, '^', 1, 2) then
+        begin
+          lvwItemsTop.Items[j].Selected := true;
+          break;
+        end;
+      end;
+    end;
+    lvwItemsTopClick(self);
+  end;
+  if topview > 0 then
+  begin
+    cboViewsBottom.ItemIndex := topview;
+    cboViewsBottomChange(self);
+  end
+  else
+  begin
+    cboViewsBottom.ItemIndex := -1;
+    cboViewsBottom.Text := '';
+    lvwItemsBottom.ClearSelection;
+    with lstScratchSwap do
+    for i := 0 to Items.Count - 1 do
+      for j := 0 to lvwItemsBottom.Items.Count - 1 do
+      begin
+        aGraphItem := TGraphItem(lvwItemsBottom.Items.Item[j].SubItems.Objects[3]);
+        if aGraphItem.Values = Items[i] then
+        begin
+          lvwItemsBottom.Items[j].Selected := true;
+          break;
+        end;
+      end;
+    lvwItemsBottomClick(self);
+  end;
+  lstScratchSwap.Items.Clear;
+  HideGraphs(false);
+end;
+
+procedure TfrmGraphs.mnuPopGraphSplitClick(Sender: TObject);
+var
+  i: integer;
+  typeitem, typenum: string;
+  aGraphItem: TGraphItem;
+begin
+  FFirstClick := true;
+  if (lvwItemsTop.SelCount = 0) and (lvwItemsBottom.SelCount = 0) then exit;
+  HideGraphs(true);
+  with chkDualViews do
+    if not Checked then
+    begin
+      Checked := true;
+      Click;
+    end;
+  with cboViewsTop do
+    if ItemIndex > -1 then
+    begin
+      ItemIndex := -1;
+      Text := '';
+    end;
+  with cboViewsBottom do
+    if ItemIndex > -1 then
+    begin
+      ItemIndex := -1;
+      Text := '';
+    end;
+  chkItemsTop.Checked := true;
+  chkItemsBottom.Checked := false;
+  pnlBottom.Height := pnlMain.Height - pnlBottom.Height;
+  lstScratchSwap.Items.Clear;
+  with lvwItemsTop do
+    for i := 0 to Items.Count - 1 do
+    if Items[i].Selected then
+    begin
+      aGraphItem := TGraphItem(Items.Item[i].SubItems.Objects[3]);
+      typeitem := Pieces(aGraphItem.Values, '^', 1, 2);
+      lstScratchSwap.Items.Add(typeitem);
+    end;
+  with lvwItemsBottom do
+    for i := 0 to Items.Count - 1 do
+    if Items[i].Selected then
+    begin
+      aGraphItem := TGraphItem(Items.Item[i].SubItems.Objects[3]);
+      typeitem := Pieces(aGraphItem.Values, '^', 1, 2);
+      lstScratchSwap.Items.Add(typeitem);
+    end;
+  lvwItemsTop.ClearSelection;
+  lvwItemsBottom.ClearSelection;
+  with lstScratchSwap do
+    for i := 0 to Items.Count - 1 do
+    begin
+      typeitem := Items[i];
+      typenum := Piece(typeitem, '^', 1);
+      if (typenum = '63') or (typenum = '120.5') then
+        SelectItem(lvwItemsTop, typeitem)
+      else
+        SelectItem(lvwItemsBottom, typeitem);
+    end;
+  lvwItemsTopClick(self);
+  lvwItemsBottomClick(self);
+  lstScratchSwap.Items.Clear;
+  HideGraphs(false);
+end;
+
+procedure TfrmGraphs.SelectItem(aListView: TListView; typeitem: string);
+var
+  i: integer;
+  aGraphItem: TGraphItem;
+begin
+  with aListView do
+    for i := 0 to Items.Count - 1 do
+    begin
+      aGraphItem := TGraphItem(Items.Item[i].SubItems.Objects[3]);
+      if typeitem = Pieces(aGraphItem.Values, '^', 1, 2) then
+        Items[i].Selected := true;
+    end;
+end;
+
+procedure TfrmGraphs.mnuPopGraphLinesClick(Sender: TObject);
+begin
+  with FGraphSetting do Lines := not Lines;
+  ChangeStyle;
+end;
+
+procedure TfrmGraphs.mnuPopGraph3DClick(Sender: TObject);
+begin
+  with FGraphSetting do View3D := not View3D;
+  ChangeStyle;
+end;
+
+procedure TfrmGraphs.mnuPopGraphValuesClick(Sender: TObject);
+begin
+  with FGraphSetting do Values := not Values;
+  ChangeStyle;
+end;
+
+procedure TfrmGraphs.mnuPopGraphSortClick(Sender: TObject);
+begin
+  with FGraphSetting do
+  begin
+    if SortColumn = 1 then SortColumn := 0
+    else SortColumn := 1;
+    mnuPopGraphSort.Checked := SortColumn = 1;
+    if not FItemsSortedTop then
+    begin
+      lvwItemsTopColumnClick(lvwItemsTop, lvwItemsTop.Column[0]);
+      FItemsSortedTop := true;
+    end;
+    if not FItemsSortedBottom then
+    begin
+      lvwItemsBottomColumnClick(lvwItemsBottom, lvwItemsBottom.Column[0]);
+      FItemsSortedBottom := true;
+    end;
+    if SortColumn > 0 then
+    begin
+      lvwItemsTopColumnClick(lvwItemsTop, lvwItemsTop.Column[SortColumn]);
+      lvwItemsBottomColumnClick(lvwItemsBottom, lvwItemsBottom.Column[SortColumn]);
+      FItemsSortedTop := false;
+      FItemsSortedBottom := false;
+    end;
+  end;
+end;
+
+procedure TfrmGraphs.mnuPopGraphClearClick(Sender: TObject);
+begin
+  with FGraphSetting do
+  begin
+    ClearBackground := not ClearBackground;
+    if ClearBackground then Gradient := false;
+  end;
+  ChangeStyle;
+  // redisplay if nonnumericonly graph exists
+  if pnlItemsTop.Tag = 1 then lvwItemsTopClick(self);
+  if pnlItemsBottom.Tag = 1 then lvwItemsBottomClick(self);
+end;
+
+procedure TfrmGraphs.mnuPopGraphHorizontalClick(Sender: TObject);
+begin
+  with FGraphSetting do
+  begin
+    HorizontalZoom := not HorizontalZoom;
+    mnuPopGraphHorizontal.Checked := HorizontalZoom;
+    if not HorizontalZoom then mnuPopGraphResetClick(self);
+  end;
+end;
+
+procedure TfrmGraphs.mnuPopGraphVerticalClick(Sender: TObject);
+begin
+  with FGraphSetting do
+  begin
+    VerticalZoom := not VerticalZoom;
+    mnuPopGraphVertical.Checked := VerticalZoom;
+    if not VerticalZoom then mnuPopGraphResetClick(self);
+  end;
+end;
+
+procedure TfrmGraphs.mnuPopGraphDatesClick(Sender: TObject);
+begin
+  with FGraphSetting do Dates := not Dates;
+  ChangeStyle;
+end;
+
+procedure TfrmGraphs.mnuPopGraphDualViewsClick(Sender: TObject);
+begin
+  chkDualViews.Checked := not chkDualViews.Checked;
+  chkDualViewsClick(self);
+end;
+
+procedure TfrmGraphs.mnuPopGraphSeparate1Click(Sender: TObject);
+begin
+  with mnuPopGraphSeparate1 do
+    Checked := not Checked;
+  with chkItemsTop do
+  begin
+    Checked := mnuPopGraphSeparate1.Checked;
+    Click;
+  end;
+  with chkItemsBottom do
+  begin
+    Checked := mnuPopGraphSeparate1.Checked;
+    Click;
+  end;
+end;
+
+procedure TfrmGraphs.mnuPopGraphGradientClick(Sender: TObject);
+begin
+  with FGraphSetting do
+  begin
+    Gradient := not Gradient;
+    if Gradient then ClearBackground := false;
+  end;
+  ChangeStyle;
+end;
+
+procedure TfrmGraphs.mnuPopGraphHintsClick(Sender: TObject);
+begin
+  with FGraphSetting do
+    Hints := not Hints;
+  ChangeStyle;
+end;
+
+procedure TfrmGraphs.mnuPopGraphLegendClick(Sender: TObject);
+begin
+  with FGraphSetting do Legend := not Legend;
+  ChangeStyle;
+end;
+
+procedure TfrmGraphs.ChartStyle(aChart: TChart);
+var
+  j: integer;
+begin
+  with aChart do
+  begin
+    View3D := FGraphSetting.View3D;
+    Chart3DPercent := 10;
+    AllowZoom := FGraphSetting.HorizontalZoom;
+    Gradient.Visible := FGraphSetting.Gradient;
+    Legend.Visible := FGraphSetting.Legend;
+    HideDates(aChart);
+    pnlHeader.Visible := pnlInfo.Visible;
+    if FGraphSetting.ClearBackground then
+    begin
+      Color := clWindow;
+      Legend.Color := clWindow;
+      pnlBlankTop.Color := clWindow;
+      pnlBlankBottom.Color := clWindow;
+    end
+    else
+    begin
+      Color := clBtnFace;
+      Legend.Color := clCream;
+      pnlBlankTop.Color := clBtnFace;
+      pnlBlankBottom.Color := clBtnFace;
+    end;
+    for j := 0 to SeriesCount - 1 do
+    begin
+      if Series[j] is TLineSeries then
+        with (Series[j] as TLineSeries) do
+        begin
+          Marks.Visible := FGraphSetting.Values;
+          LinePen.Visible := FGraphSetting.Lines;
+        end;
+      if Series[j] is TPointSeries then
+        with (Series[j] as TPointSeries) do
+        begin
+          Marks.Visible := FGraphSetting.Values;
+          LinePen.Visible := FGraphSetting.Lines;
+        end;
+      if Series[j] is TBarSeries then
+        with (Series[j] as TBarSeries) do
+        begin
+          Marks.Visible := FGraphSetting.Values;
+        end;
+      if Series[j] is TArrowSeries then
+        with (Series[j] as TArrowSeries) do
+        begin
+          Marks.Visible := FGraphSetting.Values;
+        end;
+      if Series[j] is TGanttSeries then
+        with (Series[j] as TGanttSeries) do
+        begin
+          Marks.Visible := FGraphSetting.Values;
+          LinePen.Visible := FGraphSetting.Lines;
+        end;
+    end;
+  end;
+end;
+
+procedure TfrmGraphs.ChangeStyle;
+var
+  i: integer;
+  ChildControl: TControl;
+  OriginalColor, ClearColor: TColor;
+begin
+  OriginalColor := pnlItemsTopInfo.Color;
+  ClearColor := clWindow;
+  for i := 0 to scrlTop.ControlCount - 1 do
+  begin
+    ChildControl := scrlTop.Controls[i];
+    ChartStyle(ChildControl as TChart);
+  end;
+  for i := 0 to scrlBottom.ControlCount - 1 do
+  begin
+    ChildControl := scrlBottom.Controls[i];
+    ChartStyle(ChildControl as TChart);
+  end;
+  if pnlDateLineTop.Visible then   // not visible when separate graphs
+    ChartStyle(chartDateLineTop);
+  if pnlDateLineBottom.Visible then
+    ChartStyle(chartDateLineBottom);
+  if FGraphSetting.ClearBackground then
+  begin
+    chartDatelineTop.Color := ClearColor;
+    chartDatelineTop.Legend.Color := ClearColor;
+    pnlDatelineTopSpacer.Color := ClearColor;
+    scrlTop.Color := ClearColor;
+    pnlTopRightPad.Color := ClearColor;
+    pnlScrollTopBase.Color := ClearColor;
+    pnlBlankTop.Color := ClearColor;
+    chartDatelineBottom.Color := ClearColor;
+    chartDatelineBottom.Legend.Color := ClearColor;
+    pnlDatelineBottomSpacer.Color := ClearColor;
+    scrlBottom.Color := ClearColor;
+    pnlBottomRightPad.Color := ClearColor;
+    pnlScrollBottomBase.Color := ClearColor;
+    pnlBlankBottom.Color := ClearColor;
+  end
+  else
+  begin
+    chartDatelineTop.Color := OriginalColor;
+    chartDatelineTop.Legend.Color := clCream;
+    pnlDatelineTopSpacer.Color := OriginalColor;
+    scrlTop.Color := OriginalColor;
+    pnlTopRightPad.Color := OriginalColor;
+    pnlScrollTopBase.Color := OriginalColor;
+    pnlBlankTop.Color := OriginalColor;
+    chartDatelineBottom.Color := OriginalColor;
+    chartDatelineBottom.Legend.Color := clCream;
+    pnlDatelineBottomSpacer.Color := OriginalColor;
+    scrlBottom.Color := OriginalColor;
+    pnlBottomRightPad.Color := OriginalColor;
+    pnlScrollBottomBase.Color := OriginalColor;
+    pnlBlankBottom.Color := OriginalColor;
+  end;
+  mnuPopGraphLines.Checked := FGraphSetting.Lines;
+  mnuPopGraph3D.Checked := FGraphSetting.View3D;
+  mnuPopGraphValues.Checked := FGraphSetting.Values;
+  mnuPopGraphDates.Checked := FGraphSetting.Dates;
+  mnuPopGraphFixed.Checked := FGraphSetting.FixedDateRange;
+  mnuPopGraphGradient.Checked := FGraphSetting.Gradient;
+  mnuPopGraphHints.Checked := FGraphSetting.Hints;
+  mnuPopGraphStayOnTop.Checked := FGraphSetting.StayOnTop;
+  mnuPopGraphLegend.Checked := FGraphSetting.Legend;
+  mnuPopGraphSort.Checked := FGraphSetting.SortColumn = 1;
+  mnuPopGraphClear.Checked := FGraphSetting.ClearBackground;
+  mnuPopGraphVertical.Checked := FGraphSetting.VerticalZoom;
+  mnuPopGraphHorizontal.Checked := FGraphSetting.HorizontalZoom;
+end;
+
+procedure TfrmGraphs.chartBaseClickSeries(Sender: TCustomChart; Series: TChartSeries;
+  ValueIndex: Integer; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+var
+  dttm, seriestitle, textvalue, textvalue1, textvalue2, typename, typenum: string;
+begin
+  timHintPause.Enabled := false;
+  InactivateHint;
+  FGraphClick := Sender;
+  FGraphSeries := Series;
+  FGraphValueIndex := ValueIndex;
+  chartDateLineTop.Tag := 1;       // indicates a series click
+  if (Series is TGanttSeries) then
+  begin
+    FDate1 := (Series as TGanttSeries).StartValues[ValueIndex];
+    FDate2 := (Series as TGanttSeries).EndValues[ValueIndex];
+  end
+  else
+  begin
+    FDate1 := Series.XValue[ValueIndex];
+    FDate2 := FDate1;
+  end;
+  seriestitle := Series.Title;
+  if Button <> mbRight then
+  begin
+    textvalue := ValueText(Sender, Series, ValueIndex);
+    dttm := Piece(textvalue, '^', 3);
+    if copy(textvalue, length(textvalue) - 5, length(textvalue)) = ' 00:00' then
+      dttm := Pieces(dttm, ' ', 1, 3);
+    textvalue1 := Piece(textvalue, '^', 2) + '  ' + dttm;
+    textvalue2 := Piece(textvalue, '^', 4) + '  ' + Piece(textvalue, '^', 5);
+    typenum := trim(Piece(textvalue, '^', 1));
+    typename := Piece(textvalue, '^', 2);
+    AllTypeDate(typenum, typename, textvalue1, textvalue2, FDate1, FDate2);
+  end
+  else
+  begin
+    mnuPopGraphIsolate.Enabled := true;
+    if pnlTop.Tag = 1 then
+      mnuPopGraphIsolate.Caption := 'Move - ' + seriestitle + ' - from Top to Bottom'
+    else
+      mnuPopGraphIsolate.Caption := 'Move - ' + seriestitle + ' - from Bottom to Top';
+    scrlTop.Hint := 'Details - for ' + seriestitle + ' for ' +
+      FormatDateTime('mmm d, yyyy  h:nn am/pm', FDate1);
+    scrlTop.Tag := ValueIndex + 1;
+    mnuPopGraphIsolate.Hint := seriestitle;
+    mnuPopGraphRemove.Enabled := true;
+    mnuPopGraphRemove.Caption := 'Remove - ' + seriestitle;
+    mnuPopGraphDetails.Caption := 'Details - ' + seriestitle;
+  end;
+  FMouseDown := false;
+end;
+
+procedure TfrmGraphs.AllTypeDate(aType, aTypeName, firstline, secondline: string; aDate, aDate2: double);
+var
+  i: integer;
+  dttm, datax, datex1, datex2, fmdate1, fmdate2, newdata, newline, oldline, spacer, titlemsg: string;
+  dt1, dt2, dtdata, dtdata1, dtdata2: double;
+  tmpOtherList, templist: TStringList;
+begin
+  Screen.Cursor := crHourGlass;
+  tmpOtherList := TStringList.Create;
+  templist := TStringList.Create;
+  datex1 := floattostr(DateTimeToFMDateTime(aDate));
+  datex1 := Piece(datex1, '.', 1);
+  if aDate <> aDate2 then
+    datex2 := Piece(floattostr(DateTimeToFMDateTime(aDate2)), '.', 1) + '.23595959'
+  else
+    datex2 := datex1 + '.23595959';
+  dt1 := strtofloatdef(datex1, BIG_NUMBER);
+  dt2 := strtofloatdef(datex2, BIG_NUMBER);
+  CheckToAddData(lvwItemsTop, 'top', aType);    // if type is not loaded - load data
+  for i := 0 to lstData.Items.Count - 1 do
+  begin
+    datax := lstData.Items[i];
+    if Piece(datax, '^', 1) = aType then
+    begin
+      if (length(Piece(datax, '^', 4))> 0) then    // date/times of episodes
+      begin
+        dtdata1 := strtofloatdef(Piece(datax, '^', 3), -1);
+        fmdate1 := FormatFMDateTime('mm/dd/yy hh:nn', dtdata1);
+        if copy(fmdate1, length(fmdate1) - 5, length(fmdate1)) = ' 00:00' then
+          fmdate1 := copy(fmdate1, 1, length(fmdate1) - 5) + '     ';
+        dtdata2 := strtofloatdef(Piece(datax, '^', 4), -1);
+        fmdate2 := FormatFMDateTime('mm/dd/yy hh:nn', dtdata2);
+        if copy(fmdate2, length(fmdate2) - 5, length(fmdate2)) = ' 00:00' then
+          fmdate2 := copy(fmdate2, 1, length(fmdate2) - 5) + '     ';
+        if (dtdata2 > dt1) and (dtdata1 < dt2) then
+        begin
+          newdata := Piece(datax, '^', 3) + '^' +
+                     Piece(datax, '^', 2) + '^' +
+                     fmdate1 + ' - ' +
+                     fmdate2 + '^' +
+                     ItemName(aType, Piece(datax, '^', 2)) + '^' +
+                     Piece(datax, '^', 5);
+          tmpOtherList.Add(MixedCase(newdata));
+        end;
+      end
+      else
+      begin
+        dtdata := strtofloatdef(Piece(datax, '^', 3), -1);
+        if (dtdata >= dt1) and (dtdata < dt2) then
+        begin
+          if length(Piece(Piece(datax, '^', 3), '.', 2)) > 0 then
+            dttm := FormatFMDateTime('mm/dd/yy hh:nn', dtdata)
+          else
+            dttm := FormatFMDateTime('mm/dd/yy', dtdata);
+          newdata := Piece(datax, '^', 3) + '^' +
+          Piece(datax, '^', 2) + '^' +
+          Piece(datax, '^', 5) + '^' +
+          dttm + '^' +
+          ItemName(aType, Piece(datax, '^', 2));
+          tmpOtherList.Add(MixedCase(newdata));
+        end;
+      end;
+    end;
+  end;
+  with tmpOtherList do
+  begin
+    Sort;
+    for i := Count - 1 downto 0 do
+    begin
+      newline := '';
+      oldline := tmpOtherList[i];
+      newline := Piece(oldline, '^', 4) + '   ' +
+        Piece(oldline, '^', 5);
+        spacer := Copy(BIG_SPACES, 1, 40 - length(newline));
+      newline := newline + spacer + ' ' +
+        Piece(oldline, '^', 3);
+      templist.Add(newline);
+    end;
+    Clear;
+    Assign(templist);
+    if aDate <> aDate2 then
+      titlemsg := aTypeName + ' occurences for ' + FormatDateTime('mmm d, yyyy', aDate) +
+        ' - ' + FormatDateTime('mmm d, yyyy', aDate2)
+    else
+      titlemsg := aTypeName + ' occurences for ' + FormatDateTime('mmm d, yyyy', aDate);
+    Insert(0, firstline);
+    Insert(1, secondline);
+    Insert(2, '');
+    Insert(3, 'All ' + titlemsg + ':');
+    Insert(4, '');
+    Insert(0, TXT_REPORT_DISCLAIMER);
+    Insert(1, '');
+    ReportBox(tmpOtherList, titlemsg, true);
+  end;
+  tmpOtherList.Free;
+  templist.Free;
+  Screen.Cursor := crDefault;
+end;
+
+
+procedure TfrmGraphs.ItemDateRange(Sender: TCustomChart);
+var
+  bpnotdone, ok: boolean;
+  i, j: integer;
+  prevtype, results, seriestitle, seriestype, spacer, textvalue, typenum: string;
+  tmpOtherList: TStringList;
+begin
+  Screen.Cursor := crHourGlass;
+  prevtype := '';
+  tmpOtherList := TStringList.Create;
+  with tmpOtherList do
+  begin
+    Add('Date Range: ' + cboDateRange.Text);
+    Add('Selected Items from ' +
+      FormatDateTime('mm/dd/yy', FGraphSetting.LowTime) + ' to ' +
+      FormatDateTime('mm/dd/yy', FGraphSetting.HighTime));
+    Add('');
+  end;
+  bpnotdone := true;
+  for i := 0 to Sender.SeriesCount - 1 do
+  begin
+    if Sender.Series[i].Count > 0 then
+    begin
+      textvalue := ValueText(Sender, Sender.Series[i], 0);
+      seriestype := Piece(textvalue, '^', 2);
+      if (seriestype <> '') and (seriestype <> prevtype) then
+      begin
+        tmpOtherList.Add('     ' + seriestype);    // type
+        prevtype := seriestype;
+      end;
+    end;
+    ok := true;
+    seriestitle := Sender.Series[i].Title;
+    if seriestitle = 'Blood Pressure' then
+      if bpnotdone = false then ok := false;
+    if ok then
+    begin
+      for j := 0 to Sender.Series[i].Count - 1 do
+      begin
+        textvalue := ValueText(Sender, Sender.Series[i], j);
+        seriestitle := Piece(textvalue, '^', 4);
+        typenum := Piece(textvalue, '^', 1);
+        if (typenum = '120.5') and (seriestitle = 'Blood Pressure') then bpnotdone := false;
+        if length(typenum) > 0 then
+        begin
+          spacer := Copy(BIG_SPACES, 1, 30 - length(seriestitle));
+          results := seriestitle + ':  ' + //spacer +
+          Piece(textvalue, '^', 5); //LowerCase(Piece(textvalue, '^', 5));
+          spacer := Copy(BIG_SPACES, 1, 40 - length(results));
+          results := results + ' ' + spacer + Piece(textvalue, '^', 6);
+          if copy(results, length(results) - 5, length(results)) = ' 00:00' then
+            results := copy(results, 1, length(results) - 5);
+          tmpOtherList.Add(results);                 // item occurrence
+        end;
+      end;
+    end;
+  end;                               // same items are not being sorted by date
+  if tmpOtherList.Count > 0 then
+  begin
+    tmpOtherList.Insert(0, TXT_REPORT_DISCLAIMER);
+    tmpOtherList.Insert(1, '');
+    ReportBox(tmpOtherList, 'Selected Items from Graph', true);
+  end;
+  tmpOtherList.Free;
+  FMouseDown := false;
+  Screen.Cursor := crDefault;
+end;
+
+procedure TfrmGraphs.mnuPopGraphIsolateClick(Sender: TObject);
+var
+  i, j, selnum: integer;
+  aSection, aOtherSection, typeitem: string;
+  aGraphItem: TGraphItem;
+  aListView, aOtherListView: TListView;
+begin
+  FFirstClick := true;
+  cboViewsTop.ItemIndex := -1;
+  cboViewsTop.Text := '';
+  cboViewsBottom.ItemIndex := -1;
+  cboViewsBottom.Text := '';
+  if pnlTop.Tag = 1 then
+  begin
+    aListView := lvwItemsTop;
+    aOtherListView := lvwItemsBottom;
+    aSection := 'top';
+    aOtherSection := 'bottom';
+  end
+  else
+  begin
+    aListView := lvwItemsBottom;
+    aOtherListView := lvwItemsTop;
+    aSection := 'bottom';
+    aOtherSection := 'top';
+  end;
+  if aListView.SelCount = 0 then exit;
+  if StripHotKey(mnuPopGraphIsolate.Caption) = ('Move all selections to ' + aOtherSection) then
+  begin
+    with aListView do
+    for i := 0 to Items.Count - 1 do
+    if Items[i].Selected then
+    begin
+      aGraphItem := TGraphItem(Items.Item[i].SubItems.Objects[3]);
+      typeitem := Pieces(aGraphItem.Values, '^', 1, 2);
+      for j := 0 to aOtherListView.Items.Count - 1 do
+      begin
+        aGraphItem := TGraphItem(aOtherListView.Items.Item[j].SubItems.Objects[3]);
+        if Pieces(aGraphItem.Values, '^', 1, 2) = typeitem then
+          aOtherListView.Items[j].Selected := true;
+      end;
+      Items[i].Selected := false;
+    end;
+    with chkDualViews do
+    if not Checked then
+    begin
+      Checked := true;
+      Click;
+    end;
+    ChangeStyle;
+    DisplayData(aSection);
+    DisplayData(aOtherSection);
+  end
+  else
+  begin
+    ItemCheck(lvwItemsTop, mnuPopGraphIsolate.Hint, selnum, typeitem);
+    if selnum = -1 then exit;
+    for i := 0 to aOtherListView.Items.Count - 1 do
+    begin
+      aGraphItem := TGraphItem(aOtherListView.Items.Item[i].SubItems.Objects[3]);
+      if Pieces(aGraphItem.Values, '^', 1, 2) = typeitem then
+        aOtherListView.Items[i].Selected := true;
+    end;
+    aListView.Items[selnum].Selected := false;
+    with chkDualViews do
+    if not Checked then
+    begin
+      Checked := true;
+      Click;
+    end;
+    ChangeStyle;
+    DisplayData(aSection);
+    DisplayData(aOtherSection);
+  end;
+  mnuPopGraphIsolate.Enabled := false;
+end;
+
+procedure TFrmGraphs.ItemCheck(aListView: TListView; aItemName: string;
+  var aNum: integer; var aTypeItem: string);
+var
+  i: integer;
+  aGraphItem: TGraphItem;
+begin
+  aNum := -1;
+  aTypeItem := '';
+  with aListView do
+  for i := 0 to Items.Count - 1 do
+  if Items[i].Caption = aItemName then
+  begin
+    aGraphItem := TGraphItem(Items.Item[i].SubItems.Objects[3]);     //get file^ien match
+    aNum := i;
+    aTypeItem := Pieces(aGraphItem.Values, '^', 1, 2);
+    break;
+  end;
+  if aNum = -1 then
+  begin
+    aItemName := ReverseString(aItemName);
+    aItemName := Pieces(aItemName, '(', 2, DelimCount(aItemName, '(') + 1);
+    aItemName := Copy(aItemName, 2, length(aItemName) - 1);
+    aItemName := ReverseString(aItemName);
+    with aListView do
+    for i := 0 to Items.Count - 1 do
+    if Items[i].Caption = aItemName then            // match without (specimen)
+    begin
+      aGraphItem := TGraphItem(Items.Item[i].SubItems.Objects[3]);     //get file^ien match
+      aNum := i;
+      aTypeItem := Pieces(aGraphItem.Values, '^', 1, 2);
+      break;
+    end;
+  end;
+end;
+
+procedure TfrmGraphs.chartBaseMouseDown(Sender: TObject; Button: TMouseButton;
+  Shift: TShiftState; X, Y: Integer);
+begin
+  FHintStop := true;
+  timHintPause.Enabled := false;
+  InactivateHint;
+  chartDatelineTop.Tag := 0; // not legend or series click
+  scrlTop.Hint := '';
+  scrlTop.Tag := 0;
+  FYMinValue := (Sender as TChart).MinYValue((Sender as TChart).LeftAxis);
+  FYMaxValue := (Sender as TChart).MaxYValue((Sender as TChart).LeftAxis);
+  pnlTop.Tag := 1;
+  if (Sender as TControl).Parent = pnlBottom then pnlTop.Tag := 0;
+  if ((Sender as TControl).Parent as TControl) = pnlBottom then pnlTop.Tag := 0;
+  if (((Sender as TControl).Parent as TControl).Parent as TControl).Parent = pnlBottom then pnlTop.Tag := 0;
+  if pnlTop.Tag = 1 then
+  begin
+    mnuPopGraphIsolate.Caption := 'Move all selections to bottom';
+    mnuPopGraphRemove.Caption := 'Remove all selections from top';
+  end
+  else
+  begin
+    mnuPopGraphIsolate.Caption := 'Move all selections to top';
+    mnuPopGraphRemove.Caption := 'Remove all selections from bottom';
+  end;
+  If Button = mbLeft then
+    FMouseDown := true;
+end;
+
+procedure TfrmGraphs.mnuPopGraphStuffPopup(Sender: TObject);
+begin
+  if scrlTop.Tag = 0 then scrlTop.Hint := '';
+  if (lvwItemsTop.SelCount = 0) and (lvwItemsBottom.SelCount = 0) then scrlTop.Hint := '';
+  if scrlTop.Hint = '' then
+  begin
+    if Pieces(mnuPopGraphIsolate.Caption, ' ', 1, 3) = 'Move all selections' then
+      mnuPopGraphIsolate.Enabled := true
+    else
+    begin
+      mnuPopGraphIsolate.Caption := 'Move';
+      mnuPopGraphIsolate.Enabled := false;
+    end;
+    if Pieces(mnuPopGraphRemove.Caption, ' ', 1, 3) = 'Remove all selections' then
+      mnuPopGraphRemove.Enabled := true
+    else
+    begin
+      mnuPopGraphRemove.Caption := 'Remove';
+      mnuPopGraphRemove.Enabled := false;
+    end;
+    mnuPopGraphDetails.Caption := 'Details...';
+    mnuPopGraphDetails.Enabled := (lvwItemsTop.SelCount > 0) or (lvwItemsBottom.SelCount > 0);
+  end
+  else
+  begin
+    mnuPopGraphIsolate.Enabled := true;
+    mnuPopGraphRemove.Enabled := true;
+    mnuPopGraphDetails.Enabled := true;
+  end;
+  mnuPopGraphSwap.Enabled := (lvwItemsTop.SelCount > 0) or (lvwItemsBottom.SelCount > 0);
+  mnuPopGraphReset.Enabled := mnuPopGraphSwap.Enabled;
+  mnuPopGraphCopy.Enabled := mnuPopGraphSwap.Enabled;
+  mnuPopGraphPrint.Enabled := mnuPopGraphSwap.Enabled;
+  
+  with pnlMain.Parent do
+  if BorderWidth <> 1 then            // only do on float Graph
+    mnuPopGraphStayOnTop.Enabled :=false
+  else
+    mnuPopGraphStayOnTop.Enabled :=true;
+end;
+
+procedure TfrmGraphs.mnuPopGraphDetailsClick(Sender: TObject);
+var
+  aGraphItem: TGraphItem;
+  tmpList: TStringList;
+  date1, date2: TFMDateTime;
+  teststring, typeitem, textvalue, textvalue1, textvalue2, typenum, typename: string;
+  i, selnum: integer;
+begin
+  if chartDatelineTop.Tag = 1 then               // series
+  begin
+    ItemCheck(lvwItemsTop, mnuPopGraphIsolate.Hint, selnum, typeitem);
+    if selnum < 0 then exit;
+    if not HSAbbrev(Piece(typeitem, '^', 1)) then
+    begin
+      if (FGraphSeries is TGanttSeries) then
+      begin
+        FDate1 := (FGraphSeries as TGanttSeries).StartValues[FGraphValueIndex];
+        FDate2 := (FGraphSeries as TGanttSeries).EndValues[FGraphValueIndex];
+      end
+      else
+      begin
+        FDate1 := FGraphSeries.XValue[FGraphValueIndex];
+        FDate2 := FDate1;
+      end;
+      textvalue := ValueText(FGraphClick, FGraphSeries, FGraphValueIndex);
+      textvalue1 := Piece(textvalue, '^', 2) + '  ' + Piece(textvalue, '^', 3);
+      textvalue2 := Piece(textvalue, '^', 4) + '  ' + Piece(textvalue, '^', 5);
+      typenum := trim(Piece(textvalue, '^', 1));
+      typename := Piece(textvalue, '^', 2);
+      AllTypeDate(typenum, typename, textvalue1, textvalue2, FDate1, FDate2);
+      exit;
+    end
+    else
+      OneDayTypeDetails(typeitem);
+  end
+  else            // legend
+  begin
+    date1 := DateTimeToFMDateTime(FGraphSetting.HighTime);
+    date2 := DateTimeToFMDateTime(FGraphSetting.LowTime);
+    tmpList := TStringList.Create;
+    if pnlTop.Tag = 1 then
+    for i := 0  to lvwItemsTop.Items.Count - 1 do
+    begin
+      if lvwItemsTop.Items[i].Selected then
+      begin
+        aGraphItem := TGraphItem(lvwItemsTop.Items.Item[i].SubItems.Objects[3]);      //get file^ien match
+        teststring := aGraphItem.Values;
+        tmpList.Add(teststring);
+      end;
+    end
+    else
+    for i := 0  to lvwItemsBottom.Items.Count - 1 do
+    begin
+      if lvwItemsBottom.Items[i].Selected then
+      begin
+        aGraphItem := TGraphItem(lvwItemsBottom.Items.Item[i].SubItems.Objects[3]);    //get file^ien match
+        teststring := aGraphItem.Values;
+        tmpList.Add(teststring);
+      end;
+    end;
+    if tmpList.Count > 0 then
+      AllDetails(date1, date2, tmplist);
+    tmpList.Free;
+  end;
+  FMouseDown := false;
+end;
+
+procedure TfrmGraphs.AllDetails(aDate1, aDate2: TFMDateTime; aTempList: TStrings);
+var
+  TypeList: TStringList;
+  i: integer;
+  detailsok: boolean;
+  testnum, teststring, testtype: string;
+begin
+  detailsok := true;
+  TypeList := TStringList.Create;
+  for i := 0 to aTempList.Count -1 do
+  begin
+    teststring := aTempList[i];
+    testtype := Piece(teststring, '^', 1);
+    if not HSAbbrev(testtype) then
+      detailsok := false;
+    if testtype = '63' then
+    begin
+      testnum := Piece(teststring, '^', 2);
+      testnum := Piece(testnum, '.', 1);
+      TypeList.Add('63^' + testnum);
+    end
+    else
+      TypeList.Add(teststring);
+  end;
+  if detailsok then
+    ReportBox(rpcDetailSelected(Patient.DFN, aDate1, aDate2, TypeList, true), 'Graph results on ' + Patient.Name, True)
+  else
+    ItemDateRange(FGraphClick);
+  TypeList.Free;
+end;
+
+procedure TfrmGraphs.OneDayTypeDetails(aTypeItem: string);
+var
+  strdate1, strdate2, titleitem, titletype: string;
+  date1, date2: TFMDateTime;
+  tmpList: TStringList;
+begin
+  tmpList := TStringList.Create;
+  strdate1 := FormatDateTime('mm/dd/yyyy', FDate1);
+  strdate2 := FormatDateTime('mm/dd/yyyy', FDate2);
+  FDate1 := StrToDateTime(strdate1);
+  FDate2 := StrToDateTime(strdate2);
+  date1 := DateTimeToFMDateTime(FDate1 + 1);
+  date2 := DateTimeToFMDateTime(FDate2);
+  titletype := FileNameX(Piece(aTypeItem, '^', 1));
+  titleitem := ItemName(Piece(aTypeItem, '^', 1), Piece(aTypeItem, '^', 2));
+  rpcDetailDay(tmpList, Patient.DFN, date1, date2, aTypeItem, true);
+  ReportBox(tmpList, titletype + ': ' + titleitem + ' on ' + Patient.Name + ' for ' + FormatFMDateTime('mmm d, yyyy', date1), True);
+  tmpList.Free;
+end;
+
+procedure TfrmGraphs.mnuPopGraphCopyClick(Sender: TObject);
+var
+  i: integer;
+  StrForFooter, StrForHeader, aTitle, aWarning, aDateRange: String;
+  aHeader: TStringList;
+  wrdApp, wrdDoc: Variant;
+  ChildControl: TControl;
+begin
+  try
+    wrdApp := CreateOleObject('Word.Application');
+  except
+    raise Exception.Create('Cannot start MS Word!');
+  end;
+  Screen.Cursor := crHourGlass;
+  aTitle := 'CPRS Graphing';
+  aWarning := pnlInfo.Caption;
+  aDateRange :=  'Date Range: ' + cboDateRange.Text + '  Selected Items from ' +
+      FormatDateTime('mm/dd/yy', FGraphSetting.LowTime) + ' to ' +
+      FormatDateTime('mm/dd/yy', FGraphSetting.HighTime);
+  aHeader := TStringList.Create;
+  CreatePatientHeader(aHeader, aTitle, aWarning, aDateRange);
+  StrForHeader := '';
+  for i := 0 to aHeader.Count -1 do
+    StrForHeader := StrForHeader + aHeader[i] + Chr(13);
+  StrForFooter := aTitle + ' - *** WORK COPY ONLY ***' + Chr(13);
+  wrdApp.Visible := False;
+  wrdApp.Documents.Add;
+  wrdDoc := wrdApp.Documents.Item(1);
+  wrdDoc := wrdDoc.Sections.Item(1);
+  wrdDoc := wrdDoc.Headers.Item(1).Range;
+  wrdDoc.Font.Name := 'Courier New';
+  wrdDoc.Font.Size := 9;
+  wrdDoc.Text := StrForHeader;
+  wrdDoc := wrdApp.Documents.Item(1);
+  wrdDoc := wrdDoc.Sections.Item(1);
+  wrdDoc := wrdDoc.Footers.Item(1);
+  wrdDoc.Range.Font.Name := 'Courier New';
+  wrdDoc.Range.Font.Size := 9;
+  wrdDoc.Range.Text := StrForFooter;
+  wrdDoc.PageNumbers.Add;
+  wrdDoc := wrdApp.Documents.Item(1);
+  wrdDoc.Range.Font.Name := 'Courier New';
+  wrdDoc.Range.Font.Size := 9;
+  wrdDoc.Range.Text := StrForHeader;
+  wrdDoc.Range.InsertParagraphAfter;
+  for i := 0 to scrlTop.ControlCount - 1 do           // goes from top to bottom
+  begin
+    ChildControl := scrlTop.Controls[i];
+    if (ChildControl as TChart).Visible then
+    begin
+      (ChildControl as TChart).CopyToClipboardBitmap;
+      wrdDoc.Range.InsertParagraphAfter;
+      wrdDoc.Paragraphs.Last.Range.Paste;
+    end;
+  end;
+  if (chartDatelineTop.SeriesCount > 0) and (not chkItemsTop.Checked) then
+  begin
+    chartDatelineTop.CopyToClipboardBitmap;
+    wrdDoc.Range.InsertParagraphAfter;
+    wrdDoc.Paragraphs.Last.Range.Paste;
+  end;
+  wrdDoc.Range.InsertParagraphAfter;
+  wrdDoc.Paragraphs.Last.Range.Text := '   ';
+  for i := 0 to scrlBottom.ControlCount - 1 do
+  begin
+    ChildControl := scrlBottom.Controls[i];
+    if (ChildControl as TChart).Visible then
+    begin
+      (ChildControl as TChart).CopyToClipboardBitmap;
+      wrdDoc.Range.InsertParagraphAfter;
+      wrdDoc.Paragraphs.Last.Range.Paste;
+    end;
+  end;
+  if (chartDatelineBottom.SeriesCount > 0) and (chkDualViews.Checked)
+    and (not chkItemsBottom.Checked) then
+  begin
+    chartDatelineBottom.CopyToClipboardBitmap;
+    wrdDoc.Range.InsertParagraphAfter;
+    wrdDoc.Paragraphs.Last.Range.Paste;
+  end;
+  wrdDoc.Range.WholeStory;
+  wrdDoc.Range.Copy;
+  wrdDoc.Close(false);
+  wrdApp.DisplayAlerts := false;
+  wrdApp.Quit;
+  wrdApp := Unassigned; // releases variant
+  aHeader.Free;
+  Screen.Cursor := crDefault;
+end;
+
+procedure TfrmGraphs.CreatePatientHeader(var HeaderList: TStringList; PageTitle, Warning, DateRange: string);
+// this procedure modified from rReports
+var
+  tmpStr, tmpItem: string;
+begin
+  if Warning = TXT_INFO then Warning := '  ';
+  with HeaderList do
+    begin
+      Add(' ');
+      Add(StringOfChar(' ', (74 - Length(PageTitle)) div 2) + PageTitle);
+      Add(' ');
+      tmpStr := Patient.Name + '   ' + Patient.SSN;
+      tmpItem := tmpStr + StringOfChar(' ', 39 - Length(tmpStr)) + Encounter.LocationName;
+      tmpStr := FormatFMDateTime('mmm dd, yyyy', Patient.DOB) + ' (' + IntToStr(Patient.Age) + ')';
+      tmpItem := tmpItem + StringOfChar(' ', 74 - (Length(tmpItem) + Length(tmpStr))) + tmpStr;
+      Add(tmpItem);
+      Add(StringOfChar('=', 74));
+      Add('*** WORK COPY ONLY ***' + StringOfChar(' ', 24) + 'Printed: '
+        + FormatFMDateTime('mmm dd, yyyy  hh:nn', FMNow));
+      Add(TXT_COPY_DISCLAIMER);
+      Add(StringOfChar(' ', (74 - Length(DateRange)) div 2) + DateRange);
+      Add(StringOfChar(' ', (74 - Length(Warning)) div 2) + Warning);
+      Add(' ');
+    end;
+end;
+
+procedure TfrmGraphs.GetData(aString: string);
+var
+  i: integer;
+  filenum, itemdata, itemid: string;
+  aDate, aDate1: double;
+begin
+  lstTemp.Items.Clear;
+  itemid := UpperCase(Pieces(aString, '^', 1, 2));
+  with lstData do
+  for i := Items.Count - 1 downto 0 do
+    if itemid = UpperCase(Pieces(Items[i], '^', 1, 2)) then
+    begin
+      itemdata := Items[i];
+      filenum := Piece(itemdata, '^', 1);
+      if (filenum = '52') or (filenum = '55') or (filenum = '55NVA')
+      or (filenum = '9999911') or (filenum = '405') or (filenum = '9000010') then
+      begin
+        aDate := strtofloat(FMCorrectedDate(Piece(itemdata, '^', 3)));
+        aDate1 := strtofloat(FMCorrectedDate(Piece(itemdata, '^', 4)));
+        if (aDate < FGraphSetting.FMStopDate) and (aDate > FGraphSetting.FMStartDate) then
+          lstTemp.Items.Add(Items[i])
+        else if (aDate < FGraphSetting.FMStopDate) and (aDate1 > FGraphSetting.FMStartDate) then
+          lstTemp.Items.Add(Items[i])
+        else if (aDate < FGraphSetting.FMStartDate) and (aDate1 > FGraphSetting.FMStopDate) then
+          lstTemp.Items.Add(Items[i]);
+      end
+      else if Piece(itemdata, '^', 3) <> '' then
+      begin
+        aDate := strtofloat(FMCorrectedDate(Piece(itemdata, '^', 3)));
+        if (aDate < FGraphSetting.FMStopDate) and (aDate > FGraphSetting.FMStartDate) then
+          if Copy(itemdata, 1, 4) = '63MI' then
+            lstTemp.Items.Add(Pieces(Items[i], '^', 1, 4))
+          else if Copy(itemdata, 1, 4) = '63AP' then
+            lstTemp.Items.Add(Pieces(Items[i], '^', 1, 4))
+          //else lstTemp.Items.Add(Pieces(Items[i], '^', 1, 5));         // add in non micro, ap
+          else lstTemp.Items.Add(Items[i]);         // add in non micro, ap
+      end;
+    end;
+end;
+
+function TfrmGraphs.FMToDateTime(FMDateTime: string): TDateTime;
+var
+  x, Year: string;
+begin
+  { Note: TDateTime cannot store month only or year only dates }
+  x := FMDateTime + '0000000';
+  if Length(x) > 12 then x := Copy(x, 1, 12);
+  if StrToInt(Copy(x, 9, 4)) > 2359 then x := Copy(x, 1, 7) + '.2359';
+  Year := IntToStr(17 + StrToInt(Copy(x, 1, 1))) + Copy(x, 2, 2);
+  x := Copy(x, 4, 2) + '/' + Copy(x, 6, 2) + '/' + Year + ' ' + Copy(x, 9, 2) + ':' + Copy(x, 11, 2);
+  Result := StrToDateTime(x);
+end;
+
+function TfrmGraphs.GraphTypeNum(aType: string): integer;
+var
+  i: integer;
+begin
+  Result := 4;
+  if (aType = '52') or (aType = '55') or (aType = '55NVA') or (aType = '9999911') then
+    if mnuMedsasgantt.Checked then Result := 8
+    else if mnuMedsasganttvertheight.Checked then Result := 3
+    else Result := 8
+  else
+  for i := 0 to lstAllTypes.Items.Count - 1 do
+    if aType = Piece(lstAllTypes.Items[i], '^', 1) then
+    begin
+      Result := strtointdef(Piece(lstAllTypes.Items[i], '^', 3), 4);
+      break;
+    end;
+end;
+
+function TfrmGraphs.HSAbbrev(aType: string): boolean;
+var
+  i: integer;
+begin
+  Result := false;
+  for i := 0 to lstTypes.Items.Count - 1 do
+  if Piece(lstTypes.Items[i], '^', 1) = aType then
+  begin
+    Result := length(Piece(lstTypes.Items[i], '^', 8)) > 0;
+    break;
+  end;
+end;
+
+procedure TfrmGraphs.TempCheck(typeitem: string; var levelseq: double);
+var
+  done, previous: boolean;
+  j: integer;
+begin
+  previous := false;
+  done := false;
+  j := 0;
+  with lstTempCheck do
+  while not done do
+  begin
+    if Items.Count = j then done := true
+    else if Items[j] = typeitem then
+    begin
+      previous := true;
+      levelseq := j + 1;
+      done := true;
+    end
+    else j := j + 1;
+  end;
+  if not previous then
+  begin
+    lstTempCheck.Items.Add(UpperCase(typeitem));
+    levelseq := lstTempCheck.Items.Count;
+  end;
+end;
+
+function TfrmGraphs.DCName(aDCien: string): string;
+var
+  i: integer;
+begin
+  if lstDrugClass.Items.Count < 1 then
+    FastAssign(rpcClass('50.605'), lstDrugClass.Items);
+  Result := '';
+  for i := 0 to lstDrugClass.Items.Count - 1 do
+    if Piece(lstDrugClass.Items[i], '^', 2) = aDCien then
+    begin
+      Result := 'Drug - ' + Piece(lstDrugClass.Items[i], '^', 3);
+      break;
+    end;
+end;
+
+procedure TfrmGraphs.splItemsBottomMoved(Sender: TObject);
+begin
+ chkItemsBottom.Left := pnlItemsBottom.Width - chkItemsBottom.Width - 2;
+ pnlItemsTop.Width := pnlItemsBottom.Width;
+ chkItemsTop.Left := pnlItemsTop.Width - chkItemsTop.Width - 2;
+end;
+
+procedure TfrmGraphs.splItemsTopMoved(Sender: TObject);
+begin
+ chkItemsTop.Left := pnlItemsTop.Width - chkItemsTop.Width - 2;
+ pnlItemsBottom.Width := pnlItemsTop.Width;
+ chkItemsBottom.Left := pnlItemsBottom.Width - chkItemsBottom.Width - 2;
+end;
+
+procedure TfrmGraphs.cboDateRangeChange(Sender: TObject);
+var
+  datetag: integer;
+  endofday: double;
+  dateranges, manualstart, manualstop: string;
+begin
+  endofday := FMDateTimeOffsetBy(FMToday, 1);
+  SelCopy(lvwItemsTop, lstSelCopyTop);
+  SelCopy(lvwItemsBottom, lstSelCopyBottom);
+  dateranges := '';
+  if (cboDateRange.ItemID = 'S') then
+  begin
+    with calDateRange do
+    begin
+      if Execute then
+        if Length(TextOfStart) > 0 then
+          if Length(TextOfStop) > 0 then
+          begin
+            dateranges :=
+              '^' + UpperCase(TextOfStart) + ' to ' + UpperCase(TextOfStop) +
+              '^^^' + RelativeStart + ';' + RelativeStop +
+              '^' + floattostr(FMDateStart) + '^' + floattostr(FMDateStop);
+            cboDateRange.Items.Append(dateranges);
+            cboDateRange.ItemIndex := cboDateRange.Items.Count - 1;
+          end
+          else
+            cboDateRange.ItemIndex := -1
+        else
+          cboDateRange.ItemIndex := -1
+      else
+        cboDateRange.ItemIndex := -1;
+    end;
+  end;
+  HideGraphs(true);
+  datetag := cboDateRange.ItemIEN;
+  with FGraphSetting do
+  case datetag of
+  0:  begin
+        if cboDateRange.ItemIndex > 8 then    // selected date range
+        begin
+          if dateranges = '' then dateranges := cboDateRange.Items[cboDateRange.ItemIndex];
+          manualstart := Piece(dateranges, '^' , 6);
+          manualstop := Piece(dateranges, '^' , 7);
+          if (manualstop <> '') and (length(Piece(manualstop, '.', 2)) = 0) then
+            manualstop := manualstop + '.2359';
+          FMStartDate := MakeFMDateTime(manualstart);
+          FMStopDate := MakeFMDateTime(manualstop);
+          if (manualstart <> '') and (length(Piece(manualstart, '.', 2)) = 0) then
+          begin
+            FMStartDate := FMDateTimeOffsetBy(FMStartDate, -1);
+            manualstart := floattostr(FMStartDate) + '.2359';
+            FMStartDate := MakeFMDateTime(manualstart);
+          end;
+        end;
+      end;
+  1:  begin
+        FMStartDate := FMToday;
+        FMStopDate := endofday;
+      end;
+  2:  begin
+        FMStartDate := FMDateTimeOffsetBy(FMToday, -7);
+        FMStopDate := endofday;
+      end;
+  3:  begin
+        FMStartDate := FMDateTimeOffsetBy(FMToday, -14);
+        FMStopDate := endofday;
+      end;
+  4:  begin
+        FMStartDate := FMDateTimeOffsetBy(FMToday, -30);
+        FMStopDate := endofday;
+      end;
+  5:  begin
+        FMStartDate := FMDateTimeOffsetBy(FMToday, -183);
+        FMStopDate := endofday;
+      end;
+  6:  begin
+        FMStartDate := FMDateTimeOffsetBy(FMToday, -365);
+        FMStopDate := endofday;
+      end;
+  7:  begin
+        FMStartDate := FMDateTimeOffsetBy(FMToday, -730);
+        FMStopDate := endofday;
+      end;
+  8:  begin
+        FMStartDate := FM_START_DATE;   // earliest recorded values
+        FMStopDate := endofday;
+      end;
+  else
+      begin
+        if dateranges = '' then dateranges := cboDateRange.Items[cboDateRange.ItemIndex];
+        manualstart := Piece(dateranges, '^' , 6);
+        manualstop := Piece(dateranges, '^' , 7);
+        if (manualstop <> '') and (length(Piece(manualstop, '.', 2)) = 0) then manualstop := manualstop + '.2359';
+        FMStartDate := MakeFMDateTime(manualstart);
+        FMStopDate := MakeFMDateTime(manualstop);
+        if (manualstart <> '') and (length(Piece(manualstart, '.', 2)) = 0) then
+        begin
+          FMStartDate := FMDateTimeOffsetBy(FMStartDate, -1);
+          manualstart := floattostr(FMStartDate) + '.2359';
+          FMStartDate := MakeFMDateTime(manualstart);
+        end;
+      end;
+  end;
+  FilterListView(FGraphSetting.FMStartDate, FGraphSetting.FMStopDate);
+  SelReset(lstSelCopyTop, lvwItemsTop);
+  SelReset(lstSelCopyBottom, lvwItemsBottom);
+  DisplayData('top');
+  DisplayData('bottom');
+  if cboViewsTop.ItemIndex > 1 then cboViewsTopChange(self);
+  if cboViewsBottom.ItemIndex > 1 then cboViewsBottomChange(self);
+  HideGraphs(false);
+end;
+
+function TfrmGraphs.StdDev(value, high, low: double): double;
+begin
+  if high - low <> 0 then
+  begin
+    Result := (value - (low + ((high - low) / 2)))/((high - low) / 4);
+    Result := RoundTo(Result, -2);
+  end
+  else
+    Result := 0;
+end;
+
+function TfrmGraphs.InvVal(value: double): double;
+begin
+  if value = 0 then value := 0.0001;
+  Result := 1 / value;
+  Result := RoundTo(Result, -2);
+end;
+
+procedure TfrmGraphs.lvwItemsTopCompare(Sender: TObject; Item1,
+  Item2: TListItem; Data: Integer; var Compare: Integer);
+begin
+  if not(Sender is TListView) then exit;
+  if FsortAscending then
+  begin
+    if FSortCol = 0 then
+      Compare := CompareStr(Item1.Caption, Item2.Caption)
+    else
+      Compare := CompareStr(Item1.SubItems[FsortCol - 1],
+        Item2.SubItems[FsortCol - 1]);
+  end
+  else
+  begin
+    if FSortCol = 0 then
+      Compare := CompareStr(Item2.Caption, Item1.Caption)
+    else
+      Compare := CompareStr(Item2.SubItems[FsortCol - 1],
+        Item1.SubItems[FsortCol - 1]);
+  end;
+end;
+
+procedure TfrmGraphs.lvwItemsTopColumnClick(Sender: TObject;
+  Column: TListColumn);
+begin
+  if FSortCol = Column.Index then
+    FSortAscending := not FSortAscending
+  else
+    FSortAscending := true;
+  FSortCol := Column.Index;
+  (Sender as TListView).AlphaSort;
+end;
+
+procedure TfrmGraphs.lvwItemsBottomCompare(Sender: TObject; Item1,
+  Item2: TListItem; Data: Integer; var Compare: Integer);
+begin
+  if not(Sender is TListView) then exit;
+  if FBSortAscending then
+  begin
+    if FBSortCol = 0 then
+      Compare := CompareStr(Item1.Caption, Item2.Caption)
+    else
+      Compare := CompareStr(Item1.SubItems[FBSortCol - 1],
+        Item2.SubItems[FBSortCol - 1]);
+  end
+  else
+  begin
+    if FBSortCol = 0 then
+      Compare := CompareStr(Item2.Caption, Item1.Caption)
+    else
+      Compare := CompareStr(Item2.SubItems[FBSortCol - 1],
+        Item1.SubItems[FBSortCol - 1]);
+  end;
+end;
+
+procedure TfrmGraphs.lvwItemsBottomColumnClick(Sender: TObject;
+  Column: TListColumn);
+begin
+  if FBSortCol = Column.Index then
+    FBSortAscending := not FBSortAscending
+  else
+    FBSortAscending := true;
+  FBSortCol := Column.Index;
+  (Sender as TListView).AlphaSort;
+end;
+
+procedure TfrmGraphs.btnGraphSelectionsClick(Sender: TObject);
+var
+  actionOK, checkaction: boolean;
+  counter, i, listnum: integer;
+  profile, profilestring, section, selections, specnum, typeitem: string;
+  aGraphItem: TGraphItem;
+begin
+  selections := '';
+  for i := 0 to lvwItemsTop.Items.Count - 1 do
+  if lvwItemsTop.Items[i].Selected then
+  begin
+    aGraphItem := TGraphItem(lvwItemsTop.Items.Item[i].SubItems.Objects[3]);
+    typeitem := UpperCase(aGraphItem.Values);
+    if Piece(typeitem, '^', 1) = '63' then
+    begin
+      specnum := Piece(Piece(typeitem, '^', 2), '.', 2);
+      if length(specnum) > 0 then  // mulispecimen
+        if specnum = '1' then typeitem := Piece(typeitem, '.', 1)
+        else typeitem := '';
+    end;
+    if length(typeitem) > 0 then
+      selections := selections + Piece(typeitem, '^', 1) + '~' + Piece(typeitem, '^', 2) +'~|';
+  end;
+  checkaction := chkDualViews.Checked;
+  actionOK := false;
+  profile := '*';
+  counter := cboViewsTop.Tag;
+  // load lstItems with all patient items and pass to Define View    ????
+  DialogGraphProfiles(Font.Size, actionOK, checkaction, FGraphSetting,
+    profile, profilestring, section, Patient.DFN, counter, selections);
+  if (not actionOK) then exit;
+  FillViews;
+  if (section = 'niether') then exit;
+  cboViewsTop.Tag := counter;
+
+  lstViews.Items.Add(profilestring);
+  listnum := lstViews.Items.Count + 1;
+  for i := 0 to lstViews.Items.Count - 1 do
+  begin
+    profilestring := lstViews.Items[i];
+    cboViewsTop.Items.Insert(i + 2, profilestring);
+    cboViewsBottom.Items.Insert(i + 2, profilestring);
+  end;
+  if (section = 'bottom') or (section = 'both') then
+    lvwItemsBottom.Tag := listnum;
+  if (section = 'top') or (section = 'both') then
+    lvwItemsTop.Tag  := listnum;
+  ViewSelections;
+end;
+
+procedure TfrmGraphs.ViewSelections;
+var
+  i: integer;
+begin    // uses lvwItems... Tag as index for view selection
+  with lvwItemsBottom do
+  begin
+    if (Tag = 0) and (length(lvwItemsBottom.Hint) > 0) then
+    begin
+      for i := 0 to cboViewsBottom.Items.Count - 1 do
+      begin
+        showmessage(cboViewsBottom.Items[i]);
+        if lvwItemsBottom.Hint = Piece(cboViewsBottom.Items[i], '^', 2) then
+        begin
+          Tag := i;
+          break;
+        end;
+      end;
+    end;
+    if Tag > 0 then
+    begin
+      if not chkDualViews.Checked then
+      begin
+        chkDualViews.Checked := true;
+        chkDualViewsClick(self);
+      end;
+      ClearSelection;
+      cboViewsBottom.ItemIndex := Tag;
+      Tag := 0;
+      Hint := '';
+      cboViewsBottomChange(self);
+    end;
+  end;
+  with lvwItemsTop do
+  begin
+    if (Tag = 0) and (length(lvwItemsTop.Hint) > 0) then
+    begin
+      for i := 0 to cboViewsTop.Items.Count - 1 do
+      begin
+        if lvwItemsTop.Hint = Piece(cboViewsTop.Items[i], '^', 2) then
+        begin
+          Tag := i;
+          break;
+        end;
+      end;
+    end;
+    if Tag > 0 then
+    begin
+      ClearSelection;
+      cboViewsTop.ItemIndex := Tag;
+      Tag := 0;
+      Hint := '';
+      cboViewsTopChange(self);
+    end;
+  end;
+end;
+
+procedure TfrmGraphs.ItemsClick(Sender: TObject; aListView, aOtherListView: TListView;
+  aCheckBox: TCheckBox; aComboBox: TORComboBox; aList: TListBox; aSection: string);
+begin
+  FRetainZoom := (lstZoomHistory.Count > 0);
+  FWarning := false;
+  Screen.Cursor := crHourGlass;
+  HideGraphs(true);
+  if Sender = aListView then
+  begin
+    aComboBox.ItemIndex := -1;
+    aComboBox.Text := '';
+  end;
+  if (Sender is TListView) then           // clear out selcopy list
+    aList.Items.Clear;
+  if aOtherListView.SelCount < 1 then
+  begin
+    FGraphSetting.HighTime := 0;
+    FGraphSetting.LowTime := BIG_NUMBER;
+  end
+  else if (FBHighTime <> 0) and (aSection = 'top') then
+  begin
+    if FBHighTime < FTHighTime then FGraphSetting.HighTime := FBHighTime;
+    if FBLowTime > FTLowTime then FGraphSetting.LowTime := FBLowTime;
+  end
+  else if (FTHighTime <> 0) and (aSection = 'bottom') then
+  begin
+    if FTHighTime < FBHighTime then FGraphSetting.HighTime := FTHighTime;
+    if FTLowTime > FBLowTime then FGraphSetting.LowTime := FTLowTime;
+  end;
+  if aSection = 'top' then
+  begin
+    FTHighTime := 0;
+    FTLowTime := BIG_NUMBER;
+  end
+  else if aSection = 'bottom' then
+  begin
+    FBHighTime := 0;
+    FBLowTime := BIG_NUMBER;
+  end;
+  CheckToAddData(aListView, aSection, 'SELECT');
+  DisplayData(aSection);
+  if (aListView.SelCount = 1) and (aOtherListView.SelCount = 0) then
+  begin
+    lstZoomHistory.Items.Clear;
+    FRetainZoom := false;
+    mnuPopGraphZoomBack.Enabled := false;
+  end
+  else if FRetainZoom and (lstZoomHistory.Count > 0) then
+    ZoomUpdate;
+  HideGraphs(false);
+  if FWarning then
+    FWarning := false;
+  Screen.Cursor := crDefault;
+end;
+
+procedure TfrmGraphs.CheckToAddData(aListView: TListView; aSection, TypeToCheck: string);
+var
+  done, ok, previous, singletype: boolean;
+  i, j: integer;
+  itemname, typeitem: string;
+  aGraphItem: TGraphItem;
+begin
+  TypeToCheck := UpperCase(TypeToCheck);
+  if (TypeToCheck = 'SELECT') and (lvwItemsTop.SelCount = 0)
+    and (lvwItemsBottom.SelCount = 0) then exit;
+  singletype := length(Piece(TypeToCheck, '^', 2)) = 0;
+  for i := 0 to aListView.Items.Count - 1 do
+  begin
+    ok := false;
+    if (TypeToCheck = 'ALL') then ok := true;
+    if (TypeToCheck = 'SELECT') and aListView.Items[i].Selected then ok := true;
+    aGraphItem := TGraphItem(aListView.Items.Item[i].SubItems.Objects[3]);
+    typeitem := UpperCase(Pieces(aGraphItem.Values, '^', 1, 2));
+    if not ok then
+      if TypeToCheck = typeitem then ok := true
+      else if (TypeToCheck = Piece(typeitem, '^', 1)) and
+        singletype then ok := true;
+    if ok then
+    begin
+      previous := false;
+      done := false;
+      j := 0;
+      with lstCheck do
+      while not done do
+      begin
+        if Items.Count = j then done := true
+        else if lstCheck.Items[j] = typeitem then
+        begin
+          previous := true;
+          done := true;
+        end
+        else j := j + 1;
+      end;
+      if not previous then
+      begin
+        lstCheck.Items.Add(typeitem);
+        itemname := aListView.Items[i].Caption;
+        if Piece(typeitem, '^', 1) = '63' then
+          LabData(typeitem, itemname, aSection)
+        else
+          lstData.Items.AddStrings(rpcGetItemData(typeitem, FMTimeStamp, Patient.DFN));
+      end;
+    end;
+  end;
+end;
+
+procedure TfrmGraphs.lvwItemsTopClick(Sender: TObject);
+var
+  i: integer;
+begin
+  FFirstClick := true;
+  with FGraphSetting do
+  if lvwItemsTop.SelCount > MaxSelect then
+  begin
+    pnlItemsTopInfo.Tag := 1;
+    lvwItemsTop.ClearSelection;
+    showmessage('Too many items to graph');
+    for i := 0 to lstSelPrevTop.Items.Count - 1 do
+      lvwItemsTop.Items[strtoint(lstSelPrevTop.Items[i])].Selected := true;
+    pnlItemsTopInfo.Tag := 0;
+  end
+  else
+  begin
+    lstSelPrevTop.Clear;
+    for i := 0 to lvwItemsTop.Items.Count - 1 do
+      if lvwItemsTop.Items[i].Selected then lstSelPrevTop.Items.Add(inttostr(i));
+    ItemsClick(Sender, lvwItemsTop, lvwItemsBottom, chkItemsTop, cboViewsTop, lstSelCopyTop, 'top');
+  end;
+end;
+
+procedure TfrmGraphs.lvwItemsBottomClick(Sender: TObject);
+var
+  i: integer;
+begin
+  FFirstClick := true;
+  with FGraphSetting do
+  if lvwItemsBottom.SelCount > MaxSelect then
+  begin
+    pnlItemsBottomInfo.Tag := 1;
+    lvwItemsBottom.ClearSelection;
+    showmessage('Too many items to graph');
+    for i := 0 to lstSelPrevBottom.Items.Count - 1 do
+      lvwItemsBottom.Items[strtoint(lstSelPrevBottom.Items[i])].Selected := true;
+    pnlItemsBottomInfo.Tag := 0;
+  end
+  else
+  begin
+    lstSelPrevBottom.Clear;
+    for i := 0 to lvwItemsBottom.Items.Count - 1 do
+      if lvwItemsBottom.Items[i].Selected then lstSelPrevBottom.Items.Add(inttostr(i));
+    ItemsClick(Sender, lvwItemsBottom, lvwItemsTop, chkItemsBottom, cboViewsBottom, lstSelCopyBottom, 'bottom');
+  end;
+end;
+
+procedure TfrmGraphs.SelCopy(aListView: TListView; aListBox: TListBox);
+var
+  i: integer;
+  aGraphItem: TGraphItem;
+begin
+  if aListView.Items.Count > 0 then
+  begin
+    for i := 0 to aListView.Items.Count - 1 do
+    if aListView.Items[i].Selected then
+    begin
+      aGraphItem := TGraphItem(aListView.Items.Item[i].SubItems.Objects[3]);    //get file^ien match
+      aListBox.Items.Add(aGraphItem.Values);
+    end;
+  end;
+end;
+
+procedure TfrmGraphs.SelReset(aListbox: TListBox; aListView: TListView);
+var
+  i, j: integer;
+  typeitem, itemtype: string;
+  aGraphItem: TGraphItem;
+begin
+  for i := 0 to aListView.Items.Count - 1 do
+  begin
+    aGraphItem := TGraphItem(aListView.Items.Item[i].SubItems.Objects[3]);    //get file^ien match
+    typeitem := UpperCase(Pieces(aGraphItem.Values, '^', 1, 3));
+    for j := 0 to aListBox.Items.Count - 1 do
+    begin
+      itemtype := UpperCase(Pieces(aListBox.Items[j], '^', 1, 3));
+      if itemtype = typeitem then
+      begin
+        aListView.Items[i].Selected := true;
+        break;
+      end;
+    end
+  end;
+end;
+
+procedure TfrmGraphs.ViewsChange(aListView: TListView; aComboBox: TORComboBox; aSection: string);
+var
+  Updated: boolean;
+  aProfile: string;
+begin
+  timHintPause.Enabled := false;
+  InactivateHint;
+  if aComboBox.ItemIndex = -1 then exit;  // or clear graph  ***************************
+  if aComboBox.ItemIndex = 0 then  // <clear all selections>
+  begin
+    aComboBox.Text := '';
+    aListView.ClearSelection;
+    if aSection = 'top' then
+    begin
+      FTHighTime := 0;
+      FTLowTime := BIG_NUMBER;
+    end
+    else
+    begin
+      FBHighTime := 0;
+      FBLowTime := BIG_NUMBER;
+    end;
+    DisplayData(aSection);
+    exit;
+  end;
+  if aComboBox.ItemIndex = 1 then  // <make selections>
+  begin
+    btnGraphSelectionsClick(self);
+    if aComboBox.ItemIndex = -1 then
+      aComboBox.Text := '';
+    exit;
+  end;                            // view selected
+  aListView.ClearSelection;
+  Updated := false;
+  aProfile := aComboBox.Items[aComboBox.ItemIndex];
+  if (length(Piece(aProfile, '^', 3)) = 0) or (length(Piece(aProfile, '^', 1)) = 0) then        //or <custom>
+    CheckProfile(aProfile, Updated);
+  aComboBox.Text := Piece(aProfile, '^', 2);
+  if Updated then
+    cboDateRangeChange(self);
+  if aSection = 'top' then
+  begin
+    AssignProfile(aProfile, 'top');
+    if not FItemsSortedTop then
+      lvwItemsTopColumnClick(lvwItemsTop, lvwItemsTop.Column[0]);
+    if FGraphSetting.SortColumn > 0 then
+      lvwItemsTopColumnClick(lvwItemsTop, lvwItemsTop.Column[FGraphSetting.SortColumn]);
+    lvwItemsTopColumnClick(lvwItemsTop, lvwItemsTop.Column[2]);
+    lvwItemsTopColumnClick(lvwItemsTop, lvwItemsTop.Column[2]);
+    FItemsSortedTop := false;
+  end
+  else
+  begin
+    AssignProfile(aProfile, 'bottom');
+    if not FItemsSortedBottom then
+      lvwItemsBottomColumnClick(lvwItemsBottom, lvwItemsBottom.Column[0]);
+    if FGraphSetting.SortColumn > 0 then
+      lvwItemsBottomColumnClick(lvwItemsBottom, lvwItemsBottom.Column[FGraphSetting.SortColumn]);
+    lvwItemsBottomColumnClick(lvwItemsBottom, lvwItemsBottom.Column[2]);
+    lvwItemsBottomColumnClick(lvwItemsBottom, lvwItemsBottom.Column[2]);
+    FItemsSortedBottom := false;
+  end;
+  aListView.ClearSelection;
+  AutoSelect(aListView);
+  DisplayData(aSection);
+end;
+
+procedure TfrmGraphs.cboViewsTopChange(Sender: TObject);
+begin
+  ViewsChange(lvwItemsTop, cboViewsTop, 'top');
+end;
+
+procedure TfrmGraphs.cboViewsBottomChange(Sender: TObject);
+begin
+  ViewsChange(lvwItemsBottom, cboViewsBottom, 'bottom');
+end;
+
+procedure TfrmGraphs.AssignProfile(aProfile, aSection: string);
+var
+  profilename: string;
+begin
+  profilename := Piece(aProfile, '^', 2);
+  aProfile := UpperCase(Piece(aProfile, '^', 3));
+  if length(aProfile) = 0 then exit;
+  if aSection = 'top' then
+    SetProfile(aProfile, profilename, lvwItemsTop)
+  else
+    SetProfile(aProfile, profilename, lvwItemsBottom);
+end;
+
+procedure TfrmGraphs.SetProfile(aProfile, aName: string; aListView: TListView);
+var
+  i, j: integer;
+  dcnm, itemdrugclass, itempart, itempart1, itempart2, itemnums: string;
+  itemstring, itemstring1, itemstringnums, profname: string;
+  aGraphItem: TGraphItem;
+begin
+  if aProfile = '0' then
+  for i := 0 to aListView.Items.Count - 1 do
+    aListView.Items[i].SubItems[1] := ''
+  else
+  for i := 0 to aListView.Items.Count - 1 do
+  begin
+    profname := '';
+    aGraphItem := TGraphItem(aListView.Items.Item[i].SubItems.Objects[3]);   //get file^ien match
+    itemstring := aGraphItem.Values;
+    itemstring1 := UpperCase(Piece(itemstring, '^', 1));
+    itemdrugclass := Piece(itemstring, '^', 6);
+    itemstringnums := UpperCase(Pieces(itemstring, '^', 1, 2));
+    for j := 1 to BIG_NUMBER do
+    begin
+      itempart := Piece(aProfile, '|', j);
+      if itempart = '' then break;
+      itempart1 := Piece(itempart, '~', 1);
+      itempart2 := Piece(itempart, '~', 2);
+      itemnums := itempart1 + '^' + itempart2;
+      if (itempart1 = '50.605') and (length(itemdrugclass) > 0) then
+      begin
+        dcnm := DCName(itempart2);
+        if dcnm = itemdrugclass then
+        begin
+          profname := aName;
+          break;
+        end;
+      end
+      else if itempart1 = '63' then
+      begin
+        if itemnums = Piece(itemstringnums, '.', 1) then
+        begin
+          profname := aName;
+          break;
+        end;
+      end
+      else
+      begin
+        if itemnums = itemstringnums then
+        begin
+          profname := aName;
+          break;
+        end;
+      end;
+      if (itempart1 = '0') and (itempart2 = itemstring1) then
+      begin
+        profname := aName;
+        break;
+      end
+      else if (itempart1 = '0') and (length(Piece(itempart2, ';', 2)) > 0) then    // subtypes
+      if copy(itempart2, 1, length(itemstring1)) = Piece(itempart2, ';', 1) then
+      if Piece(itempart2, ';', 2) = UpperCase(Piece(Piece(itemstring, '^', 2), ';', 2)) then
+      begin
+        profname := aName;
+        break;
+      end;
+    end;
+    aListView.Items[i].SubItems[1] := profname;
+  end;
+end;
+
+function TfrmGraphs.ExpandTax(profile: string): string;
+var
+  i: integer;
+  itempart, itempart1, itempart2, newprofile: string;
+  taxonomies: TStrings;
+  expandedcodes: TStrings;
+  taxonomycodes: TStrings;
+begin    //  '811.2~123~|0~63~|' or '55~12~|0~811.2~|0~63~|'
+  Result := profile;
+  if Pos('811.2~', profile) = 0 then exit;
+  taxonomies := TStringList.Create;
+  expandedcodes := TStringList.Create;
+  taxonomycodes := TStringList.Create;
+  newprofile := '';
+  for i := 1 to BIG_NUMBER do
+  begin
+    itempart := Piece(profile, '|', i);
+    if length(itempart) = 0 then break;
+    if Pos('811.2~', itempart) = 0 then
+      newprofile := newprofile + '|'
+    else
+      taxonomies.Add(itempart);
+  end;
+  for i := 0 to taxonomies.Count -1 do
+  begin
+    itempart := taxonomies[i];
+    if (Piece(itempart, '~', 1) = '0') and (Piece(itempart, '~', 2) = '811.2') then
+    begin
+      // this is Reminder Taxonomy <any> and would bring back a ton of codes
+      //FastAssign(rpcTaxonomy(true, nil), expandedcodes);
+      break;
+    end
+    else if Piece(itempart, '~', 1) = '811.2' then
+      taxonomycodes.Add(Piece(itempart, '~', 2));
+  end;
+  if taxonomycodes.Count > 0 then
+    FastAssign(rpcTaxonomy(false, taxonomycodes), expandedcodes);
+  for i := 1 to expandedcodes.Count -1 do
+  begin
+    itempart := expandedcodes[i];
+    itempart1 := Piece(itempart, ';', 1);
+    itempart2 := Piece(itempart, ';', 2);
+    newprofile := newprofile + itempart1 + '~' + itempart2 + '~|'
+  end;
+  Result := newprofile;
+end;
+
+procedure TfrmGraphs.CheckProfile(var aProfile: string; var Updated: boolean);
+var
+  i, j: integer;
+  itempart, itempart1, itempart2, profile, profilename, profiletype, xprofile: string;
+begin
+  profiletype := Piece(aProfile, '^', 1);
+  profilename := Piece(aProfile, '^', 2);
+  if profiletype = '-2' then
+    FastAssign(rpcGetGraphProfiles(UpperCase(profilename), '1', 0), lstTemp.Items)
+  else if profiletype = '-1' then
+    FastAssign(rpcGetGraphProfiles(UpperCase(profilename), '0', 0), lstTemp.Items);
+  if profiletype <> '' then
+  begin
+    for i := 0 to lstTemp.Items.Count - 1 do
+      aProfile := aProfile + lstTemp.Items[i];
+    lstTemp.Items.Clear;
+  end;
+  Updated := false;
+  profile := UpperCase(Piece(aProfile, '^', 3));
+  xprofile := ExpandTax(profile);
+  if xprofile <> profile then
+  begin                                         // taxonomies
+    profile := xprofile;
+    LoadDisplayCheck('45DX', Updated);
+    LoadDisplayCheck('45OP', Updated);
+    LoadDisplayCheck('9000010.07', Updated);
+    LoadDisplayCheck('9000010.18', Updated);
+    LoadDisplayCheck('9000011', Updated);
+    //LoadDisplayCheck('9999911', Updated);   // problems as durations not being used
+  end;
+  aProfile := Pieces(aProfile, '^', 1, 2) + '^' + profile;
+  for j := 1 to BIG_NUMBER do
+  begin
+    itempart := Piece(profile, '|', j);
+    if itempart = '' then break;
+    itempart1 := Piece(itempart, '~', 1);
+    itempart2 := Piece(itempart, '~', 2);
+    if itempart1 = '0' then                      // <any> type
+      LoadDisplayCheck(itempart2, Updated)
+    else if itempart1 = '50.605' then            // drug class
+    begin
+      LoadDisplayCheck('52', Updated);
+      LoadDisplayCheck('55', Updated);
+      //LoadDisplayCheck('55NVAE', Updated);     // nonvameds as events are not being used
+      LoadDisplayCheck('55NVA', Updated);
+      LoadDisplayCheck('53.79', Updated);
+    end
+    else if itempart1 <> '0' then                // all others
+      LoadDisplayCheck(itempart1, Updated);
+  end;
+end;
+
+procedure TfrmGraphs.LoadDisplayCheck(typeofitem: string; var Updated: boolean);
+begin
+  if not TypeIsLoaded(typeofitem) then
+  begin
+    LoadType(typeofitem, '1');
+    Updated := true;
+  end;
+  if not TypeIsDisplayed(typeofitem) then
+  begin
+    DisplayType(typeofitem, '1');
+    Updated := true;
+  end;
+end;
+
+procedure TfrmGraphs.AutoSelect(aListView: TListView);
+var
+  counter, i: integer;
+begin
+  counter := 0;
+  for i := 0 to aListView.Items.Count - 1 do
+  begin
+    if length(aListView.Items[i].SubItems[1]) > 0 then
+      counter := counter + 1;
+  end;
+  if counter <= FGraphSetting.MaxSelect then
+    for i := 0 to aListView.Items.Count - 1 do
+    begin
+      if length(aListView.Items[i].SubItems[1]) > 0 then
+        aListView.Items[i].Selected := true;
+    end
+  else
+  begin
+    if aListView = lvwItemsTop then
+      lvwItemsTop.ClearSelection
+    else if aListView = lvwItemsBottom then
+      lvwItemsBottom.ClearSelection;
+  end;
+  if aListView = lvwItemsTop then
+    lvwItemsTopClick(self)
+  else if aListView = lvwItemsBottom then
+    lvwItemsBottomClick(self);
+end;
+
+procedure TfrmGraphs.LabData(aItemType, aItemName, aSection: string);
+var
+  singlespec: boolean;
+  i, oldlisting: integer;
+  checkitem, checkstring, datastring, filename, itemnum, newitemname, newitemnum, newstring: string;
+  spec1, spec2, spec3, spec4: string;
+  aGraphItem: TGraphItem;
+  aListItem: TListItem;
+begin
+  singlespec := true;
+  spec1 := ''; spec2 := ''; spec3 := ''; spec4 := '';
+  lstSpec1.Items.Clear; lstSpec2.Items.Clear; lstSpec3.Items.Clear; lstSpec4.Items.Clear;
+  FastAssign(rpcGetItemData(aItemType, FMTimeStamp, Patient.DFN), lstScratchLab.Items);
+  for i := 0 to lstScratchLab.Items.Count - 1 do
+  begin
+    datastring := lstScratchLab.Items[i];
+    checkstring := Pieces(datastring, '^', 1, 2) + '^' + Pieces(datastring, '^', 7, 8);
+    if length(spec1) = 0  then
+    begin
+      spec1 := checkstring;
+      lstSpec1.Items.Add(datastring)
+    end
+    else if spec1 = checkstring then
+      lstSpec1.Items.Add(datastring)
+    else if length(spec2) = 0 then
+    begin
+      singlespec := false;
+      spec2 := checkstring;
+      lstSpec2.Items.Add(datastring)
+    end
+    else if spec2 = checkstring then
+      lstSpec2.Items.Add(datastring)
+    else if length(spec3) = 0 then
+    begin
+      spec3 := checkstring;
+      lstSpec3.Items.Add(datastring)
+    end
+    else if spec3 = checkstring then
+      lstSpec3.Items.Add(datastring)
+    else
+    begin
+      spec4 := checkstring;
+      lstSpec4.Items.Add(datastring)
+    end;
+  end;
+  if singlespec then
+    lstData.Items.AddStrings(lstScratchLab.Items)
+  else
+  begin
+    lstMultiSpec.Items.Clear;
+    itemnum := Piece(aItemType, '^', 2);
+    if length(spec1) > 0 then
+    begin
+      newitemnum := itemnum + '.1';
+      newitemname := aItemName + ' (' + LowerCase(Piece(spec1, '^', 4)) + ')';
+      for i := 0 to lstItems.Items.Count - 1 do
+      if aItemType = Pieces(lstItems.Items[i], '^', 1, 2) then
+      begin
+        newstring := lstItems.Items[i];
+        lstItems.Items.Delete(i);
+        break;
+      end;
+      for i := 0 to lstData.Items.Count - 1 do
+      if aItemType = Pieces(lstData.Items[i], '^', 1, 2) then
+        lstData.Items.Delete(i);
+      ResetSpec(lstSpec1, itemnum, newitemnum, newitemname, newstring);
+    end;
+    if length(spec2) > 0 then
+    begin
+      newitemnum := itemnum + '.2';
+      newitemname := aItemName + ' (' + LowerCase(Piece(spec2, '^', 4)) + ')';
+      ResetSpec(lstSpec2, itemnum, newitemnum, newitemname, newstring);
+    end;
+    if length(spec3) > 0 then
+    begin
+      newitemnum := itemnum + '.3';
+      newitemname := aItemName + ' (' + LowerCase(Piece(spec3, '^', 4)) + ')';
+      ResetSpec(lstSpec3, itemnum, newitemnum, newitemname, newstring);
+    end;
+    if length(spec4) > 0 then
+    begin
+      newitemnum := itemnum + '.4';
+      newitemname := aItemName + ' (other)';     // not specific after 3 specimens (from same time)
+      ResetSpec(lstSpec4, itemnum, newitemnum, newitemname, newstring);
+    end;
+    oldlisting := 0;
+    lvwItemsTop.SortType := stNone;    // avoids out of bounds error
+    for i := 0 to lvwItemsTop.Items.Count - 1 do
+    begin
+      aGraphItem := TGraphItem(lvwItemsTop.Items.Item[i].SubItems.Objects[3]);   //get file^ien match
+      checkitem := Pieces(aGraphItem.Values, '^', 1, 2);
+      if aItemType = checkitem then
+      begin
+        oldlisting := i;
+        lvwItemsTop.Items.Delete(i);
+        break;
+      end;
+    end;
+    filename := FileNameX('63');
+    for i := 0 to lstMultiSpec.Items.Count - 1 do
+    begin
+      lstCheck.Items.Add(UpperCase(Pieces(lstMultiSpec.Items[i], '^', 1, 2)));
+      if (FGraphSetting.FMStartDate = FM_START_DATE)
+        or DateRangeMultiItems(FGraphSetting.FMStartDate, FGraphSetting.FMStopDate, Piece(lstMultiSpec.Items[i], '^', 2)) then
+      begin
+      with lvwItemsTop do
+        aListItem := Items.Insert(oldlisting);
+        aListItem.Caption := Piece(lstMultiSpec.Items[i], '^', 4);
+        aListItem.SubItems.Add(filename);
+        aListItem.SubItems.Add('');
+        aListItem.SubItems.Add('');
+        aGraphItem := TGraphItem.Create;
+        aGraphItem.Values := lstMultiSpec.Items[i];
+        aListItem.SubItems.AddObject('info object', aGraphItem);
+        if aSection = 'top' then lvwItemsTop.Items[oldlisting].Selected := true;
+      end;
+    end;
+    lvwItemsTop.SortType := stBoth;
+    oldlisting := 0;
+    lvwItemsBottom.SortType := stNone;    // avoids out of bounds error
+    for i := 0 to lvwItemsBottom.Items.Count - 1 do
+    begin
+      aGraphItem := TGraphItem(lvwItemsBottom.Items.Item[i].SubItems.Objects[3]);   //get file^ien match
+      checkitem := Pieces(aGraphItem.Values, '^', 1, 2);
+      if aItemType = checkitem then
+      begin
+        oldlisting := i;
+        lvwItemsBottom.Items.Delete(i);
+        break;
+      end;
+    end;
+    for i := 0 to lstMultiSpec.Items.Count - 1 do
+    begin
+      aListItem := lvwItemsBottom.Items.Insert(oldlisting);
+      aListItem.Caption := Piece(lstMultiSpec.Items[i], '^', 4);
+      aListItem.SubItems.Add(filename);
+      aListItem.SubItems.Add('');
+      aListItem.SubItems.Add('');
+      aGraphItem := TGraphItem.Create;
+      aGraphItem.Values := lstMultiSpec.Items[i];
+      aListItem.SubItems.AddObject('info object', aGraphItem);
+      if aSection = 'bottom' then lvwItemsBottom.Items[oldlisting].Selected := true;
+    end;
+    lvwItemsBottom.SortType := stBoth;
+  end;
+end;
+
+procedure TfrmGraphs.RefUnits(aItem, aSpec: string; var low, high, units: string);
+var
+  i: integer;
+  item2: double;
+  itemspec, specstring: string;
+begin
+  item2 := strtofloatdef(aItem, -BIG_NUMBER);
+  if item2 <> -BIG_NUMBER then
+  begin
+    item2 := round(item2);
+    aItem := floattostr(item2);
+  end;
+  itemspec := aItem + '^' + aSpec;
+  for i := 0 to lstTestSpec.Items.Count - 1 do
+  if itemspec = Pieces(lstTestSpec.Items[i], '^', 1, 2) then
+  begin
+    specstring := lstTestSpec.Items[i];
+    low :=   Piece(specstring, '^', 3);
+    high :=  Piece(specstring, '^', 4);
+    units := Piece(specstring, '^', 8);
+    if (Copy(low, 1, 3) = '$S(') then low  := SelectRef(low);
+    if (Copy(high, 1, 3) = '$S(') then high := SelectRef(high);
+    break;
+  end;
+end;
+
+function TfrmGraphs.SelectRef(aRef: string): string;
+// check ref range for AGE and SEX variables in $S statement
+
+  procedure CheckRef(selection: string; var value: string; var ok: boolean);
+  var
+    age: integer;
+    part1, part2, part3: string;
+  begin
+    value := '';
+    ok := false;
+    if pos('$S', selection) > 0 then exit;
+    if pos(':', selection) = 0 then exit;
+    part1 := Piece(selection, ':', 1);
+    part2 := Piece(selection, ':', 2);
+    part3 := Piece(selection, ':', 3);
+    if length(part1) = 0 then exit;
+    if length(part2) = 0 then exit;
+    if length(part3) <> 0 then exit;
+    ok := true;
+    value := part2;
+    if part1 = '1' then exit;
+    if copy(part1, 1, 4) = 'SEX=' then
+    begin
+      if (part1 = 'SEX="M"') and (Patient.Sex = 'M') then exit;
+      if (part1 = 'SEX="F"') and (Patient.Sex = 'F') then exit; //?? check for '= '> '<    ??
+      value := '';
+    end
+    else if copy(part1, 1, 3) = 'AGE' then
+    begin
+      part3 := copy(part1, 5, length(part1));
+      age := strtointdef(part3, BIG_NUMBER);
+      if age <> BIG_NUMBER then
+      begin
+        part3 := copy(part1, 1, 4);
+        if (part3 = 'AGE>') and (Patient.Age > age) then exit;
+        if (part3 = 'AGE<') and (Patient.Age < age) then exit;
+        if (part3 = 'AGE=') and (Patient.Age = age) then exit;
+      end;
+      value := '';
+    end
+    else
+      value:= '';
+  end;
+
+var
+  ok: boolean;
+  i: integer;
+  selection, selections: string;
+begin
+  Result := '';
+  if copy(aRef, length(aRef), 1) = ')' then
+  begin
+    selections := copy(aRef, 4, length(aRef) - 4);
+    for i := 1 to BIG_NUMBER do
+    begin
+      selection := Piece(selections, ',', i);
+      if selection = '' then break;
+      ok := true;
+      CheckRef(selection, Result, ok);
+      if not ok then break;
+      if length(Result) > 0 then break;
+    end;
+  end;
+end;
+
+procedure TfrmGraphs.ResetSpec(aListBox: TListBox; aItemNum, aNewItemNum, aNewItemName, aNewString: string);
+var                                             //also add itemx
+  i: integer;
+  checkdate, newdate: double;
+  newestdate, newstring: string;
+begin
+  lstTemp.Items.Clear;
+  newdate := 0;
+  for i := 0 to aListBox.Items.Count - 1 do
+  begin
+    newstring := aListBox.Items[i];
+    newestdate := FMCorrectedDate(Piece(newstring, '^', 3));
+    checkdate := strtofloatdef(newestdate, -BIG_NUMBER);
+    if checkdate > newdate then newdate := checkdate;
+    SetPiece(newstring, '^', 2, aNewItemNum);
+    lstTemp.Items.Add(newstring);
+  end;
+  lstData.Items.AddStrings(lstTemp.Items);
+  newestdate := floattostr(newdate);
+  SetPiece(aNewString, '^', 2, aNewItemNum);
+  SetPiece(aNewString, '^', 4, aNewItemName);
+  SetPiece(aNewString, '^', 6, newestdate);
+  lstItems.Items.Add(aNewString);
+  lstMultiSpec.Items.Add(aNewString);
+end;
+
+procedure TfrmGraphs.chartBaseClickLegend(Sender: TCustomChart;
+  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+var
+  seriestitle: string;
+begin
+  FGraphClick := Sender;
+  chartDatelineTop.Tag := -1;   // indicates a legend click
+  if Button <> mbRight then
+    ItemDateRange(Sender)
+  else
+  begin
+    mnuPopGraphIsolate.Enabled := true;
+    if pnlTop.Tag = 1 then
+    begin
+      if chkItemsTop.Checked then
+      begin
+        seriestitle := Sender.SeriesTitleLegend(0);
+        scrlTop.Hint := 'Details - for ' + seriestitle;
+        scrlTop.Tag := 1;
+        mnuPopGraphIsolate.Caption := 'Move - ' + seriestitle + ' - from Top to Bottom';
+        mnuPopGraphIsolate.Hint := seriestitle;
+        mnuPopGraphRemove.Enabled := true;
+        mnuPopGraphRemove.Caption := 'Remove - ' + seriestitle;
+        mnuPopGraphDetails.Caption := 'Details - ' + seriestitle;
+      end
+      else
+      begin
+        mnuPopGraphIsolate.Caption := 'Move all selections to bottom';
+        mnuPopGraphRemove.Caption := 'Remove all selections from top';
+      end;
+    end
+    else
+    begin
+      if chkItemsBottom.Checked then
+      begin
+        seriestitle := Sender.SeriesTitleLegend(0);
+        scrlTop.Hint := 'Details - for ' + seriestitle;
+        scrlTop.Tag := 1;
+        mnuPopGraphIsolate.Caption := 'Move - ' + seriestitle + ' - from Bottom to Top';
+        mnuPopGraphIsolate.Hint := seriestitle;
+        mnuPopGraphRemove.Enabled := true;
+        mnuPopGraphRemove.Caption := 'Remove - ' + seriestitle;
+        mnuPopGraphDetails.Caption := 'Details - ' + seriestitle;
+      end
+      else
+      begin
+        mnuPopGraphIsolate.Caption := 'Move all selections to top';
+        mnuPopGraphRemove.Caption := 'Remove all selections from bottom';
+      end;
+    end;
+  end;
+end;
+
+function TfrmGraphs.BPValue(aDateTime: TDateTime): string;
+var
+  i: integer;
+  fmdatetime: double;
+  datastring, datecheck, fmstring: string;
+begin
+  Result := '';
+  fmdatetime := datetimetofmdatetime(aDateTime);
+  fmstring := floattostr(fmdatetime);
+  for i := 0 to lstData.Items.Count - 1 do
+  begin
+    datastring := lstData.Items[i];
+    if Pieces(datastring, '^', 1, 2) = '120.5^1' then   //********** get item # for bp instead of 1
+    begin
+      datecheck := Piece(datastring, '^', 3);
+      if length(Piece(datecheck, '.', 2)) > 0 then
+        datecheck := Piece(datecheck, '.', 1) + '.' + copy(Piece(datecheck, '.', 2), 1, 4);
+      if fmstring = datecheck then
+      begin
+        Result := Piece(datastring, '^', 5);
+        break;
+      end;
+    end;
+  end;
+end;
+
+procedure TfrmGraphs.mnuMedsasganttClick(Sender: TObject);
+begin
+  (Sender as TMenuItem).Checked := true;
+  lvwItemsTopClick(self);
+  lvwItemsBottomClick(self);
+end;
+
+procedure TfrmGraphs.mnuPopGraphResetClick(Sender: TObject);
+begin
+  FFirstClick := true;
+  lstZoomHistory.Items.Clear;
+  FRetainZoom := false;
+  mnuPopGraphZoomBack.Enabled := false;
+  lvwItemsTopClick(self);
+end;
+
+procedure TfrmGraphs.serDatelineTopGetMarkText(Sender: TChartSeries;
+  ValueIndex: Integer; var MarkText: String);
+var
+  cnt, i: integer;
+  checktag, nonstring: string;
+begin    // ********* listing one series' values is ok but no multiple ???
+  MarkText := Sender.Title;
+  if Copy(MarkText, 1, 4) = 'Ref ' then
+    MarkText := '';
+  if Sender.Title = '(non-numeric)' then
+  begin
+    if Sender.Tag > 0 then
+    begin
+      checktag := inttostr(Sender.Tag);
+      cnt := -1;
+      for i := 0 to lstNonNumeric.Items.Count - 1 do
+      begin
+        nonstring := lstNonNumeric.Items[i];
+        if  checktag = Piece(nonstring, '^', 3) then
+        begin
+          cnt := cnt + 1;
+          if  cnt = ValueIndex then
+          begin
+            MarkText := Piece(nonstring, '^', 2);
+            break;
+          end;
+        end;
+      end;
+      if MarkText = '(non-numeric)' then
+        beep;
+    end;
+  end;
+end;
+
+procedure TfrmGraphs.mnuPopGraphRemoveClick(Sender: TObject);
+var
+  i, selnum: integer;
+  aSection, typeitem: string;
+  aComboBox: TORComboBox;
+  aListView: TListView;
+begin
+  FFirstClick := true;
+  if pnlTop.Tag = 1 then
+  begin
+    aComboBox := cboViewsTop;
+    aListView := lvwItemsTop;
+    aSection := 'top';
+  end
+  else
+  begin
+    aComboBox := cboViewsBottom;
+    aListView := lvwItemsBottom;
+    aSection := 'bottom';
+  end;
+  aComboBox.ItemIndex := -1;
+  aComboBox.Text := '';
+  if aListView.SelCount = 0 then exit;
+  if StripHotKey(mnuPopGraphRemove.Caption) = ('Remove all selections from ' + aSection) then
+  begin
+    with aListView do
+    for i := 0 to Items.Count - 1 do
+      if Items[i].Selected then
+      begin
+        Items[i].Selected := false;
+      end;
+    DisplayData('top');
+    DisplayData('bottom');
+  end
+  else
+  begin
+    ItemCheck(aListView, mnuPopGraphIsolate.Hint, selnum, typeitem);
+    if selnum = -1 then exit;
+    aListView.Items[selnum].Selected := false;
+    DisplayData('top');
+    DisplayData('bottom');
+  end;
+  mnuPopGraphRemove.Enabled := false;
+  mnuPopGraphResetClick(self);
+end;
+
+procedure TfrmGraphs.mnuPopGraphTodayClick(Sender: TObject);
+begin
+  with dlgDate do
+  begin
+    FMDateTime := FMToday;
+    if Execute then FMToday := FMDateTime;
+  end;
+end;
+
+procedure TfrmGraphs.BaseResize(aScrollBox: TScrollBox);
+var
+  displayheight, displaynum, i: integer;
+begin
+  ChartOnZoom(chartDatelineTop);
+  with aScrollBox do
+  begin
+    if ControlCount < FGraphSetting.MaxGraphs then
+      displaynum := ControlCount
+    else
+      displaynum := FGraphSetting.MaxGraphs;
+    displayheight := FGraphSetting.MinGraphHeight;
+    if displaynum > 0 then
+      if (Height div displaynum) < FGraphSetting.MinGraphHeight then
+        displayheight := FGraphSetting.MinGraphHeight
+      else
+        displayheight := (Height div displaynum);
+    for i := 0 to aScrollBox.ControlCount - 1 do
+      Controls[i].height := displayheight;
+  end;
+end;
+
+procedure TfrmGraphs.pnlScrollTopBaseResize(Sender: TObject);
+begin
+  ChartOnZoom(chartDatelineTop);
+  BaseResize(scrlTop);
+  BaseResize(scrlBottom);
+end;
+
+procedure TfrmGraphs.NextPointerStyle(aSeries: TChartSeries; aSerCnt: integer);
+var
+  colors1, colors2, colors3, colors4, colors5, colors6: integer;
+begin
+  colors1 := NUM_COLORS + 1;
+  colors2 := NUM_COLORS * 2 + 1;
+  colors3 := NUM_COLORS * 3 + 1;
+  colors4 := NUM_COLORS * 4 + 1;
+  colors5 := NUM_COLORS * 5 + 1;
+  colors6 := NUM_COLORS * 6 + 1;
+  if aSeries is TLineSeries then
+  begin
+    with (aSeries as TLineSeries) do
+    if aSerCnt < colors1 then
+      Pointer.Style := psCircle
+    else if aSerCnt < colors2 then
+      Pointer.Style := psTriangle
+    else if aSerCnt < colors3 then
+      Pointer.Style := psRectangle
+    else if aSerCnt < colors4 then
+      Pointer.Style := psStar
+    else if aSerCnt < colors5 then
+      Pointer.Style := psDownTriangle
+    else if aSerCnt < colors6 then
+      Pointer.Style := psCross
+    else
+      Pointer.Style := psDiagCross;
+  end
+  else if aSeries is TBarSeries then
+  begin
+    with (aSeries as TBarSeries) do
+    if aSerCnt < colors1 then
+      BarStyle := bsPyramid
+    else if aSerCnt < colors2 then
+      BarStyle := bsInvPyramid
+    else if aSerCnt < colors3 then
+      BarStyle := bsArrow
+    else if aSerCnt < colors4 then
+      BarStyle := bsEllipse
+    else
+      BarStyle := bsRectangle;
+  end
+  else if aSeries is TPointSeries then
+  begin
+    with (aSeries as TPointSeries) do
+    if aSerCnt < colors1 then
+      Pointer.Style := psRectangle
+    else if aSerCnt < colors2 then
+      Pointer.Style := psTriangle
+    else if aSerCnt < colors3 then
+      Pointer.Style := psCircle
+    else if aSerCnt < colors4 then
+      Pointer.Style := psStar
+    else if aSerCnt < colors5 then
+      Pointer.Style := psDownTriangle
+    else if aSerCnt < colors6 then
+      Pointer.Style := psCross
+    else
+      Pointer.Style := psDiagCross;
+  end;
+end;
+
+function TfrmGraphs.FMCorrectedDate(fmtime: string): string;
+begin
+  if Copy(fmtime, 4, 4) = '0000' then Result := Copy(fmtime, 1, 3) + '0101'
+  else if Copy(fmtime, 6, 2) = '00' then Result := Copy(fmtime, 1, 5) + '01'
+  else Result := fmtime;
+end;
+
+procedure TfrmGraphs.FixedDates(var adatetime, adatetime1: TDateTime);
+begin
+  if FGraphSetting.FMStartDate <> FM_START_DATE then
+  begin  // do not use when All Results
+    adatetime := FMDateTimeToDateTime(FGraphSetting.FMStopDate);
+    adatetime1 := FMDateTimeToDateTime(FGraphSetting.FMStartDate);
+    FGraphSetting.HighTime := adatetime;
+    FGraphSetting.LowTime := adatetime1;
+    FTHighTime := adatetime;
+    FTLowTime := adatetime1;
+    FBHighTime := adatetime;
+    FBLowTime := adatetime1;
+  end;
+end;
+
+procedure TfrmGraphs.HighLow(fmtime, fmtime1: string; aChart: TChart; var adatetime, adatetime1: TDateTime);
+begin
+  adatetime1 := 0;
+  adatetime := FMToDateTime(fmtime);
+  if adatetime > FGraphSetting.HighTime then FGraphSetting.HighTime := adatetime;
+  if adatetime < FGraphSetting.LowTime then FGraphSetting.LowTime := adatetime;
+  if aChart = chartDatelineTop then
+  begin
+    if adatetime > FTHighTime then FTHighTime := adatetime;
+    if adatetime < FTLowTime then FTLowTime := adatetime;
+  end
+  else
+  begin
+    if adatetime > FBHighTime then FBHighTime := adatetime;
+    if adatetime < FBLowTime then FBLowTime := adatetime;
+  end;
+  if fmtime1 <> '' then
+  begin
+    adatetime1 := FMToDateTime(fmtime1);
+    if adatetime1 > FGraphSetting.HighTime then FGraphSetting.HighTime := adatetime1;
+    if adatetime1 < FGraphSetting.LowTime then FGraphSetting.LowTime := adatetime1;
+    if aChart = chartDatelineTop then
+    begin
+      if adatetime1 > FTHighTime then FTHighTime := adatetime1;
+      if adatetime1 < FTLowTime then FTLowTime := adatetime1;
+    end
+    else
+    begin
+      if adatetime1 > FBHighTime then FBHighTime := adatetime1;
+      if adatetime1 < FBLowTime then FBLowTime := adatetime1;
+    end;
+  end;
+end;
+
+procedure TfrmGraphs.HideGraphs(action: boolean);
+begin
+  pnlTop.Color := chartDatelineTop.Color;
+  pnlBottom.Color := chartDatelineTop.Color;
+  if action then
+  begin
+    pnlScrollTopBase.Visible := false;
+    pnlScrollBottomBase.Visible := false;
+  end
+  else
+  begin
+    pnlScrollTopBase.Visible := true;
+    pnlScrollBottomBase.Visible := true;
+    chartDatelineTop.Refresh;
+  end;
+end;
+
+//****************************************************************************
+
+procedure TfrmGraphs.MakeLineSeries(aChart: TChart; aTitle, aFileType: string; var aSerCnt, aNonCnt: integer; multiline: boolean);
+
+  procedure BorderValue(var bordervalue: double; value: double);
+  begin
+    if FGraphSetting.FixedDateRange then
+      if bordervalue = -BIG_NUMBER then
+        bordervalue := value;
+  end;
+
+var
+  estimate, firstcnt, i, noncnt: integer;
+  value, fixeddatevalue, hi, highestvalue, highvalue, lo, nonvalue: double;
+  checkdata, fmtime, itemvalue, valueD, valueM, valueS: string;
+  high, low, specimen: string;
+  adatetime, adatetime1: TDateTime;
+  afixeddate, afixeddate1: TDateTime;
+  ser1, ser2, ser3, serLow, serHigh: TLineSeries;
+  serBlank, serPoint: TPointSeries;
+begin
+  fixeddatevalue := -BIG_NUMBER;
+  highestvalue := aChart.MaxYValue(aChart.LeftAxis);
+  if highestvalue < 1 then highestvalue := 1;
+  firstcnt := lstNonNumeric.Items.Count;
+  noncnt := firstcnt;
+  aChart.LeftAxis.LabelsFont.Color := aChart.BottomAxis.LabelsFont.Color;
+  aSerCnt := aSerCnt + 1;
+  ser1 := TLineSeries.Create(aChart);
+  ser2 := TLineSeries.Create(aChart);
+  ser3 := TLineSeries.Create(aChart);
+  serPoint := TPointSeries.Create(aChart);
+  serBlank := TPointSeries.Create(aChart);
+  serLow := TLineSeries.Create(aChart);
+  serHigh := TLineSeries.Create(aChart);
+  specimen := LowerCase(Piece(aTitle, '^', 4));
+  low := Piece(aTitle, '^', 5);                   // collect non numeric - graph as events
+  high := Piece(aTitle, '^', 6);
+  lo := strtofloatdef(low, -BIG_NUMBER);
+  hi := strtofloatdef(high, -BIG_NUMBER);
+  serLow.Active := false;
+  serHigh.Active := false;
+  serPoint.Active := false;
+  serBlank.Active := false;
+  with ser1 do
+  begin
+    LinePen.Visible := FGraphSetting.Lines;
+    ParentChart := aChart;
+    Title := Piece(aTitle, '^', 3);
+    if (length(specimen) > 0) and (not ansicontainsstr(Title, specimen)) then
+      Title := Title + ' (' + specimen + ')';
+    XValues.DateTime := True;
+    NextPointerStyle(ser1, aSerCnt);
+    Identifier := aFileType;
+    Pointer.Visible := true;
+    Pointer.InflateMargins := true;
+    GetData(aTitle);
+    ColorEachPoint := false;
+    SeriesColor := NextColor(aSerCnt);
+    Marks.BackColor := clInfoBk;
+    if ser1.Title = 'Blood Pressure' then
+    begin
+      ser1.Title := 'Blood Pressure';
+      with ser2 do
+      begin
+        ParentChart := aChart;
+        Title := 'Blood Pressure';
+        XValues.DateTime := true;
+        Pointer.Style := ser1.Pointer.Style;
+        ShowInLegend := false;    //****
+        Identifier := aFileType;
+        Pointer.Visible := true;
+        Pointer.InflateMargins := true;
+        ColorEachPoint := false;
+        SeriesColor := ser1.SeriesColor;
+        Marks.BackColor := clInfoBk;
+        Active := true;
+      end;
+      with ser3 do
+      begin
+        ParentChart := aChart;
+        Title := 'Blood Pressure';
+        XValues.DateTime := true;
+        Pointer.Style := ser1.Pointer.Style;
+        ShowInLegend := false;   //****
+        Identifier := aFileType;
+        Pointer.Visible := true;
+        Pointer.InflateMargins := true;
+        ColorEachPoint := false;
+        SeriesColor := ser1.SeriesColor;
+        Marks.BackColor := clInfoBk;
+        Active := false;
+      end;
+    end
+    else
+    begin
+      ser2.Active := false;
+      ser3.Active := false;
+    end;
+    highvalue := 0;
+    with lstTemp do
+    for i:= 0 to Items.Count - 1 do
+    begin
+      checkdata := lstTemp.Items[i];
+      fmtime := FMCorrectedDate(Piece(Items[i], '^', 3));
+      if IsFMDateTime(fmtime) then
+      begin
+        HighLow(fmtime, '', aChart, adatetime, adatetime1);
+        itemvalue := Piece(Items[i], '^', 5);
+        itemvalue := trim(itemvalue);
+        itemvalue := StringReplace(itemvalue, ',', '', [rfReplaceAll]);
+        if ser1.Title = 'Blood Pressure' then
+        begin
+          valueS := Piece(itemvalue, '/', 1);
+          valueD := Piece(itemvalue, '/', 2);
+          valueM := Piece(itemvalue, '/', 3);
+          value := strtofloatdef(valueS, -BIG_NUMBER);
+          if value <> -BIG_NUMBER then
+            ser1.AddXY(adatetime, value, '', clTeeColor);
+          value := strtofloatdef(valueD, -BIG_NUMBER);
+          if value <> -BIG_NUMBER then
+            ser2.AddXY(adatetime, value, '', clTeeColor);
+          value := strtofloatdef(valueM, -BIG_NUMBER);
+          if value <> -BIG_NUMBER then
+          begin
+            ser3.AddXY(adatetime, value, '', clTeeColor);
+            ser3.Active := true;
+          end;
+          BorderValue(fixeddatevalue, 100);
+        end
+        else
+        begin
+          value := strtofloatdef(itemvalue, -BIG_NUMBER);
+          if value <> -BIG_NUMBER then
+          begin
+            if (btnChangeSettings.Tag = 1) and (hi <> -BIG_NUMBER) and (lo <> -BIG_NUMBER) then
+            begin
+              value := StdDev(value, hi, lo);
+              ser1.AddXY(adatetime, value, '', clTeeColor);
+              high := '2'; low := '-2';
+              BorderValue(fixeddatevalue, 0);
+              //splGraphs.Tag := 1;   // show ref range
+            end
+            else if btnChangeSettings.Tag = 2 then
+            begin
+              value := InvVal(value);
+              ser1.AddXY(adatetime, value, '', clTeeColor);
+              high := '2'; low := '0';
+              BorderValue(fixeddatevalue, 0);
+              splGraphs.Tag := 0;  // do not show ref range
+            end
+            else
+            begin
+              ser1.AddXY(adatetime, value, '', clTeeColor);
+              if value > highvalue then
+                highvalue := value;
+              BorderValue(fixeddatevalue, value);
+            end;
+          end
+          else
+          begin
+            noncnt := noncnt + 1;
+            lstNonNumeric.Items.Add(floattostr(adatetime) + '^' +
+              itemvalue + '^' + inttostr(aNonCnt + 1));
+          end;
+        end;
+      end;
+    end;
+    if (length(low) > 0) and (splGraphs.Tag = 1) then
+    begin
+      with serLow do
+      begin
+        Active := true;
+        ParentChart := aChart;
+        XValues.DateTime := True;
+        Pointer.Visible := false;
+        Pointer.InflateMargins := true;
+        OnGetMarkText := serDatelineTop.OnGetMarkText;
+        ColorEachPoint := false;
+        Title := 'Ref Low ' + low;
+        Pointer.Style := psCircle;
+        SeriesColor := ser1.SeriesColor; //clBtnShadow ; //clTeeColor;
+        Marks.Visible := false;
+        LinePen.Visible := true;
+        LinePen.Width := 2;
+        LinePen.Style := psDash;  //does not show when width <> 1
+      end;
+      value := strtofloatdef(low, -BIG_NUMBER);
+      if value <> -BIG_NUMBER then
+      begin
+        serLow.AddXY(IncDay(FGraphSetting.LowTime, -1), value, '', clTeeColor);
+        serLow.AddXY(IncDay(FGraphSetting.HighTime, 1), value, '', clTeeColor);
+        BorderValue(fixeddatevalue, value);
+      end;
+    end;
+    if (length(high) > 0) and (splGraphs.Tag = 1) then
+    begin
+      with serHigh do
+      begin
+        Active := true;
+        ParentChart := aChart;
+        XValues.DateTime := True;
+        Pointer.Visible := false;
+        Pointer.InflateMargins := true;
+        OnGetMarkText := serDatelineTop.OnGetMarkText;
+        ColorEachPoint := false;
+        Title := 'Ref High ' + high;
+        Pointer.Style := psCircle;
+        SeriesColor := ser1.SeriesColor; // clBtnShadow; //clTeeColor;
+        Marks.Visible := false;
+        LinePen.Visible := true;
+        LinePen.Width := 2;
+        LinePen.Style := psDash;  //does not show when width <> 1
+      end;
+      value := strtofloatdef(high, -BIG_NUMBER);
+      if value <> -BIG_NUMBER then
+      begin
+        serHigh.AddXY(IncDay(FGraphSetting.LowTime, -1), value, '', clTeeColor);
+        serHigh.AddXY(IncDay(FGraphSetting.HighTime, 1), value, '', clTeeColor);
+        BorderValue(fixeddatevalue, value);
+      end;
+    end;
+    splGraphs.Tag := 0;
+    if noncnt > firstcnt then
+    begin
+      if aChart.Height < 10 then estimate := pnlMain.Height div 2
+      else estimate := aChart.Height;
+      aNonCnt := aNonCnt + 1;  // use nonnumeric count to offset position
+      nonvalue := (aNonCnt * (10 / (estimate + 1)) * highestvalue);
+      with serBlank do
+      begin
+        Active := true;
+        ParentChart := aChart;
+        XValues.DateTime := True;
+        Pointer.Visible := true;
+        Pointer.InflateMargins := true;
+        OnGetMarkText := serDatelineTop.OnGetMarkText;
+        ColorEachPoint := false;
+        Title := '';
+        Pointer.Style := psSmallDot;
+        SeriesColor := aChart.Color;
+        Marks.Visible := false;
+        ShowInLegend := false;
+      end;
+      with serPoint do
+      begin
+        Active := true;
+        ParentChart := aChart;
+        XValues.DateTime := True;
+        Pointer.Visible := true;
+        Pointer.InflateMargins := true;
+        OnGetMarkText := serDatelineTop.OnGetMarkText;
+        ColorEachPoint := false;
+        Title := '(non-numeric)';
+        Hint := aTitle;
+        Tag := aNonCnt;
+        Pointer.Style := ser1.Pointer.Style;
+        SeriesColor := ser1.SeriesColor;
+        Marks.BackColor := clInfoBk;
+        ShowInLegend := false;
+      end;
+      for i := 0 to lstNonNumeric.Items.Count - 1 do
+      begin
+        if Piece(lstNonNumeric.Items[i], '^',3) = inttostr(aNonCnt) then
+        if highvalue = 0 then
+        begin
+          adatetime := strtofloatdef(Piece(lstNonNumeric.Items[i], '^', 1), -BIG_NUMBER);
+          if adatetime <> -BIG_NUMBER then
+          begin
+            serBlank.Pointer.Pen.Visible := false;
+            serBlank.AddXY(adatetime, 1, '', pnlScrollTopBase.Color);
+            break;
+          end;
+        end;
+      end;
+      for i := 0 to lstNonNumeric.Items.Count - 1 do
+      if Piece(lstNonNumeric.Items[i], '^',3) = inttostr(aNonCnt) then
+      begin
+        adatetime := strtofloatdef(Piece(lstNonNumeric.Items[i], '^', 1), -BIG_NUMBER);
+        if adatetime <> -BIG_NUMBER then
+        begin
+          serPoint.Pointer.Pen.Visible := true;
+          serPoint.AddXY(adatetime, nonvalue, '', ser1.SeriesColor);
+          BorderValue(fixeddatevalue, nonvalue);
+        end;
+      end;
+      if highvalue = 0 then
+      begin
+        aChart.LeftAxis.LabelsFont.Color := pnlScrollTopBase.Color;
+        FNonNumerics := true;
+      end;
+    end;
+    if ser1.Title = 'Pain' then
+    begin
+      if not serBlank.Active then
+      with serBlank do
+      begin
+        Active := true;
+        ParentChart := aChart;
+        XValues.DateTime := True;
+        Pointer.Visible := true;
+        Pointer.InflateMargins := true;
+        OnGetMarkText := serDatelineTop.OnGetMarkText;
+        ColorEachPoint := false;
+        Title := '';
+        Pointer.Style := psSmallDot;
+        SeriesColor := aChart.Color;
+        Marks.Visible := false;
+        ShowInLegend := false;
+      end;
+      serBlank.Pointer.Pen.Visible := false;
+      serBlank.AddXY(IncDay(FGraphSetting.LowTime, -1), 0, '', pnlScrollTopBase.Color);
+      serBlank.AddXY(IncDay(FGraphSetting.LowTime, -1), 10, '', pnlScrollTopBase.Color);
+    end;
+    if multiline then
+    begin
+      // do nothing for now
+    end;
+    if fixeddatevalue <> -BIG_NUMBER then
+    begin
+      if not serBlank.Active then
+      with serBlank do
+      begin
+        Active := true;
+        ParentChart := aChart;
+        XValues.DateTime := True;
+        Pointer.Visible := true;
+        Pointer.InflateMargins := true;
+        OnGetMarkText := serDatelineTop.OnGetMarkText;
+        ColorEachPoint := false;
+        Title := '';
+        Pointer.Style := psSmallDot;
+        SeriesColor := aChart.Color;
+        Marks.Visible := false;
+        ShowInLegend := false;
+      end;
+      FixedDates(afixeddate, afixeddate1);
+      serBlank.Pointer.Pen.Visible := false;
+      serBlank.AddXY(afixeddate, fixeddatevalue, '', aChart.Color);
+      serBlank.AddXY(afixeddate1, fixeddatevalue, '', aChart.Color);
+    end;
+    GetHorizAxis.ExactDateTime := True;
+    GetHorizAxis.Increment := DateTimeStep[dtOneMinute];
+  end;
+end;
+
+procedure TfrmGraphs.MakePointSeries(aChart: TChart; aTitle, aFileType: string; var aSerCnt: integer);
+var
+  i: integer;
+  value: double;
+  fmtime: string;
+  adatetime, adatetime1: TDateTime;
+  ser1: TPointSeries;
+begin
+  aSerCnt := aSerCnt + 1;
+  ser1 := TPointSeries.Create(aChart);
+  with ser1 do
+  begin
+    ParentChart := aChart;
+    Title := Piece(aTitle, '^', 3);
+    OnGetMarkText := serDatelineTop.OnGetMarkText;
+    XValues.DateTime := True;
+    NextPointerStyle(ser1, aSerCnt);
+    Pointer.VertSize := 10;
+    Pointer.HorizSize := 2;
+    Identifier := aFileType;
+    Pointer.Visible := true;
+    GetData(aTitle);
+    ColorEachPoint := false;
+    SeriesColor := NextColor(aSerCnt);
+    Marks.BackColor := clInfoBk;
+    with lstTemp do
+    for i := 0 to lstTemp.Items.Count - 1 do
+    begin
+      fmtime := FMCorrectedDate(Piece(Items[i], '^', 3));
+      if IsFMDateTime(fmtime) then
+      begin
+        HighLow(fmtime, '', aChart, adatetime, adatetime1);
+        value := strtofloatdef(Piece(Items[i], '^', 5), -BIG_NUMBER);
+        if value = -BIG_NUMBER then
+        begin
+          value := aSerCnt;
+          TempCheck(Pieces(Items[i], '^', 1, 2), value);
+        end;
+        ser1.AddXY(adatetime, value, '', clTeeColor);
+      end;
+    end;
+    GetHorizAxis.ExactDateTime := True;
+    GetHorizAxis.Increment := DateTimeStep[dtOneMinute];
+  end;
+end;
+
+procedure TfrmGraphs.MakeBarSeries(aChart: TChart; aTitle, aFileType: string; var aSerCnt: integer);
+var
+  i: integer;
+  value: double;
+  fmtime: string;
+  adatetime, adatetime1: TDateTime;
+  afixeddate, afixeddate1: TDateTime;
+  ser1: TBarSeries;
+  serBlank: TPointSeries;
+begin
+  aSerCnt := aSerCnt + 1;
+  ser1 := TBarSeries.Create(aChart);
+  serBlank := TPointSeries.Create(aChart);
+  with serBlank do
+  begin
+    Active := true;
+    ParentChart := aChart;
+    XValues.DateTime := True;
+    Pointer.Visible := true;
+    Pointer.InflateMargins := false;
+    ColorEachPoint := false;
+    Title := '';
+    Pointer.Style := psSmallDot;
+    OnGetMarkText := serDatelineTop.OnGetMarkText;
+    SeriesColor := aChart.Color;
+    Marks.BackColor := clInfoBk;
+    ShowInLegend := false;
+  end;
+  with ser1 do
+  begin
+    ParentChart := aChart;
+    Title := Piece(aTitle, '^', 3);
+    XValues.DateTime := True;
+    YOrigin := 0;
+    Identifier := aFileType;
+    Marks.Visible := false;
+    OnGetMarkText := serDatelineTop.OnGetMarkText;
+    CustomBarWidth := 7;
+    Marks.Style := smsLabel;
+    GetData(aTitle);
+    ColorEachPoint := false;
+    SeriesColor := NextColor(aSerCnt);
+    Marks.BackColor := clInfoBk;
+    NextPointerStyle(ser1, aSerCnt);
+    with lstTemp do
+    for i:= 0 to Items.Count - 1 do
+    begin
+      fmtime := FMCorrectedDate(Piece(Items[i], '^', 3));
+      if IsFMDateTime(fmtime) then
+      begin
+        HighLow(fmtime, '', aChart, adatetime, adatetime1);
+        value := 25 - (aSerCnt mod NUM_COLORS);
+        if FPrevEvent = copy(fmtime, 1, 10) then
+          if copy((FPrevEvent + '00'), 1, 12) = copy(fmtime, 1, 12) then  // same time occurrence
+          begin
+            pnlInfo.Caption := TXT_WARNING_SAME_TIME;
+            pnlInfo.Color := COLOR_WARNING;
+            pnlInfo.Visible := true;
+            pnlHeader.Visible := true;
+            FWarning := true;
+          end;
+        if value <> -BIG_NUMBER then
+          ser1.AddXY(adatetime, value, '', clTeeColor);
+        FPrevEvent := copy(fmtime, 1, 10);
+        if i = 0 then
+        begin
+          serBlank.Pointer.Pen.Visible := false;
+          serBlank.AddXY(adatetime, 100, '', aChart.Color);
+          if FGraphSetting.FixedDateRange then
+          begin
+            FixedDates(afixeddate, afixeddate1);
+            serBlank.AddXY(afixeddate, 100, '', aChart.Color);
+            serBlank.AddXY(afixeddate1, 100, '', aChart.Color);
+          end;
+        end;
+      end;
+    end;
+    GetHorizAxis.ExactDateTime := True;
+    GetHorizAxis.Increment := DateTimeStep[dtOneMinute];
+  end;
+end;
+
+procedure TfrmGraphs.MakeManyGanttSeries(aChart: TChart; aTitle, aFileType: string; var aSerCnt: integer);
+var
+  i, value: integer;
+  fmtime, fmtime1: string;
+  adatetime, adatetime1: TDateTime;
+  afixeddate, afixeddate1: TDateTime;
+  gantt: TGanttSeries;
+  serBlank: TPointSeries;
+begin
+  aSerCnt := aSerCnt + 1;
+  gantt := TGanttSeries.Create(aChart);
+  serBlank := TPointSeries.Create(aChart);
+  with serBlank do
+  begin
+    Active := true;
+    ParentChart := aChart;
+    XValues.DateTime := True;
+    Pointer.Visible := true;
+    Pointer.InflateMargins := false;
+    ColorEachPoint := false;
+    Title := '';
+    Pointer.Style := psSmallDot;
+    OnGetMarkText := serDatelineTop.OnGetMarkText;
+    SeriesColor := aChart.Color;
+    Marks.BackColor := clInfoBk;
+    ShowInLegend := false;
+  end;
+  with gantt do
+  begin
+    ParentChart := aChart;
+    Title := Piece(aTitle, '^', 3);
+    Marks.Style := smsLabel;
+    OnGetMarkText := serDatelineTop.OnGetMarkText;
+    if Piece(aTitle, '^', 1) = '55' then       // make inpatient meds smaller to identify
+      Pointer.VertSize := RX_HEIGHT_IN
+    else if Piece(aTitle, '^', 1) = '55NVA' then       // make nonva meds smaller to identify
+      Pointer.VertSize := RX_HEIGHT_NVA
+    else if Piece(aTitle, '^', 1) = '9999911' then       // make problems smaller to identify
+      Pointer.VertSize := PROB_HEIGHT
+    else
+      Pointer.VertSize := RX_HEIGHT_OUT;
+    GetData(aTitle);
+    ColorEachPoint := false;
+    SeriesColor := NextColor(aSerCnt);
+    Identifier := aFileType;
+    Marks.BackColor := clInfoBk;
+    value := round(((aSerCnt mod NUM_COLORS) / NUM_COLORS) * 80) + 20 + aSerCnt;
+    if aFileType <> '9999911' then
+      if aChart <> chartDatelineTop then
+        if aChart <> chartDatelineBottom then
+      value := value - 26;
+    with lstTemp do
+    for i := 0 to lstTemp.Items.Count - 1 do
+    begin
+      fmtime := FMCorrectedDate(Piece(Items[i], '^', 3));
+      fmtime1 := FMCorrectedDate(Piece(Items[i], '^', 4));
+      if IsFMDateTime(fmtime) and IsFMDateTime(fmtime1) then
+      begin
+        HighLow(fmtime, fmtime1, aChart, adatetime, adatetime1);
+        AddGantt(adatetime, adatetime1, value, '');
+        if i = 0 then
+        begin
+          serBlank.Pointer.Pen.Visible := false;
+          serBlank.AddXY(adatetime, 100, '', aChart.Color);
+          if aFileType = '9999911' then
+            serBlank.AddXY(adatetime, 0, '', aChart.Color);
+          if FGraphSetting.FixedDateRange then
+          begin
+            FixedDates(afixeddate, afixeddate1);
+            serBlank.AddXY(afixeddate, 100, '', aChart.Color);
+            serBlank.AddXY(afixeddate1, 100, '', aChart.Color);
+          end;
+        end;
+      end;
+    end;
+    GetHorizAxis.ExactDateTime := True;
+    GetHorizAxis.Increment := DateTimeStep[dtOneMinute];
+  end;
+end;
+
+procedure TfrmGraphs.MakeVisitGanttSeries(aChart: TChart; aTitle, aFileType: string; var aSerCnt: integer);
+var
+  i: integer;
+  value: double;
+  fmtime, fmtime1: string;
+  adatetime, adatetime1: TDateTime;
+  afixeddate, afixeddate1: TDateTime;
+  gantt: TGanttSeries;
+  serBlank: TPointSeries;
+begin
+  aSerCnt := aSerCnt + 1;
+  gantt := TGanttSeries.Create(aChart);
+  serBlank := TPointSeries.Create(aChart);
+  with serBlank do
+  begin
+    Active := true;
+    ParentChart := aChart;
+    XValues.DateTime := True;
+    Pointer.Visible := true;
+    Pointer.InflateMargins := false;
+    ColorEachPoint := false;
+    Title := '';
+    Pointer.Style := psSmallDot;
+    OnGetMarkText := serDatelineTop.OnGetMarkText;
+    SeriesColor := aChart.Color;
+    Marks.Visible := false;
+    ShowInLegend := false;
+  end;
+  with gantt do
+  begin
+    ParentChart := aChart;
+    Title := Piece(aTitle, '^', 3);
+    Marks.Style := smsLabel;
+    OnGetMarkText := serDatelineTop.OnGetMarkText;
+    if Piece(aTitle, '^', 1) = '405' then  // make admit smaller to identify
+      Pointer.VertSize := NUM_COLORS + 3
+    else if Piece(aTitle, '^', 1) = '9999911' then  // make problems smaller to identify
+      Pointer.VertSize := PROB_HEIGHT
+    else
+      Pointer.VertSize := NUM_COLORS + (aSerCnt mod NUM_COLORS) + 10;
+    GetData(aTitle);
+    ColorEachPoint := false;
+    SeriesColor := NextColor(aSerCnt);
+    Identifier := aFileType;
+    Marks.BackColor := clInfoBk;
+    value := aSerCnt div NUM_COLORS;
+    with lstTemp do
+    for i:= 0 to Items.Count - 1 do
+    begin
+      fmtime := FMCorrectedDate(Piece(Items[i], '^', 3));
+      fmtime1 := FMCorrectedDate(Piece(Items[i], '^', 4));
+      if IsFMDateTime(fmtime) and IsFMDateTime(fmtime1) then
+      begin
+        HighLow(fmtime, fmtime1, aChart, adatetime, adatetime1);
+        AddGantt(adatetime, adatetime1, value, '');
+        if i = 0 then
+        begin
+          serBlank.Pointer.Pen.Visible := false;
+          serBlank.AddXY(adatetime, 100, '', aChart.Color);
+          if FGraphSetting.FixedDateRange then
+          begin
+            FixedDates(afixeddate, afixeddate1);
+            serBlank.AddXY(afixeddate, 100, '', aChart.Color);
+            serBlank.AddXY(afixeddate1, 100, '', aChart.Color);
+          end;
+        end;
+      end;
+    end;
+    GetHorizAxis.ExactDateTime := True;
+    GetHorizAxis.Increment := DateTimeStep[dtOneMinute];
+  end;
+end;
+
+procedure TfrmGraphs.MakeWeightedGanttSeries(aChart: TChart; aTitle, aFileType: string; var aSerCnt: integer);
+var
+  i: integer;
+  value: double;
+  fmtime, fmtime1: string;
+  gantt: TGanttSeries;
+  adatetime, adatetime1: TDateTime;
+begin
+  aSerCnt := aSerCnt + 1;
+  gantt := TGanttSeries.Create(aChart);
+  with gantt do
+  begin
+    ParentChart := aChart;
+    Title := Piece(aTitle, '^', 3);
+    Marks.Style := smsLabel;
+    OnGetMarkText := serDatelineTop.OnGetMarkText;
+    value := NUM_COLORS;
+    GetData(aTitle);
+    ColorEachPoint := false;
+    SeriesColor := NextColor(aSerCnt);
+    Identifier := aFileType;
+    Marks.BackColor := clInfoBk;
+    with lstTemp do
+    for i:= 0 to Items.Count - 1 do
+    begin
+      fmtime := FMCorrectedDate(Piece(Items[i], '^', 3));
+      fmtime1 := FMCorrectedDate(Piece(Items[i], '^', 4));
+      if IsFMDateTime(fmtime) and IsFMDateTime(fmtime1) then
+      begin
+        HighLow(fmtime, fmtime1, aChart, adatetime, adatetime1);
+        value := Vfactor(Piece(aTitle, '^', 3));
+        AddGantt(adatetime, adatetime1, 1, '');
+        value := value + (value / 2);
+      end;
+    end;
+    Pointer.VertSize := round(value);
+    GetHorizAxis.ExactDateTime := True;
+    GetHorizAxis.Increment := DateTimeStep[dtOneMinute];
+  end;
+end;
+
+procedure TfrmGraphs.MakeArrowSeries(aChart: TChart; aTitle, aFileType: string; var aSerCnt: integer);
+var
+  i: integer;
+  value: double;
+  fmtime, fmtime1: string;
+  arrows: TArrowSeries;
+  adatetime, adatetime1: TDateTime;
+begin
+  aSerCnt := aSerCnt + 1;
+  arrows := TArrowSeries.Create(aChart);
+  with arrows do
+  begin
+    ParentChart := aChart;
+    Title := Piece(aTitle, '^', 3);
+    Clear;
+    ArrowWidth := 12;
+    ArrowHeight := 9;
+    StartXValues.DateTime := true;
+    EndXValues.DateTime := true;
+    Marks.Style := smsLabel;
+    OnGetMarkText := serDatelineTop.OnGetMarkText;
+    Pointer.Visible := false;
+    Pointer.VertSize := 17; //pnlTop.Height;        //******* for meds
+    Pointer.HorizSize := 24;
+    Pointer.InflateMargins := true;
+    GetData(aTitle);
+    ColorEachPoint := false;
+    SeriesColor := NextColor(aSerCnt);
+    Identifier := aFileType;
+    Marks.BackColor := clInfoBk;
+    with lstTemp do
+    for i:= 0 to Items.Count - 1 do
+    begin
+      fmtime := FMCorrectedDate(Piece(Items[i], '^', 3));
+      fmtime1 := FMCorrectedDate(Piece(Items[i], '^', 4));
+      if IsFMDateTime(fmtime) and IsFMDateTime(fmtime1) then
+      begin
+        HighLow(fmtime, fmtime1, aChart, adatetime, adatetime1);
+        value := strtofloatdef(Piece(Items[i], '^', 5), -BIG_NUMBER);
+        if value = -BIG_NUMBER then
+          TempCheck(Pieces(Items[i], '^', 1, 2), value);
+        AddArrow(adatetime, value, adatetime1, value, '', SeriesColor);
+      end;
+    end;
+    GetHorizAxis.ExactDateTime := True;
+    GetHorizAxis.Increment := DateTimeStep[dtOneMinute];
+  end;
+end;
+
+procedure TfrmGraphs.MakeWeightedArrowSeries(aChart: TChart; aTitle, aFileType: string; var aSerCnt: integer);
+var
+  i: integer;
+  value: double;
+  fmtime, fmtime1: string;
+  adatetime, adatetime1: TDateTime;
+  arrows: TArrowSeries;
+begin
+  aSerCnt := aSerCnt + 1;
+  arrows := TArrowSeries.Create(aChart);
+  with arrows do
+  begin
+    ParentChart := aChart;
+    Title := Piece(aTitle, '^', 3);
+    Clear;
+    ArrowWidth := 12;
+    ArrowHeight := 9;
+    StartXValues.DateTime := true;
+    EndXValues.DateTime := true;
+    Marks.Style := smsLabel;
+    OnGetMarkText := serDatelineTop.OnGetMarkText;
+    Pointer.Visible := false;
+    Pointer.VertSize := 17; //pnlTop.Height;        //******* for meds
+    Pointer.HorizSize := 24;
+    Pointer.InflateMargins := true;
+    GetData(aTitle);
+    ColorEachPoint := false;
+    SeriesColor := NextColor(aSerCnt);
+    Identifier := aFileType;
+    Marks.BackColor := clInfoBk;
+    with lstTemp do
+    for i:= 0 to Items.Count - 1 do
+    begin
+      fmtime := FMCorrectedDate(Piece(Items[i], '^', 3));
+      fmtime1 := FMCorrectedDate(Piece(Items[i], '^', 4));
+      if IsFMDateTime(fmtime) and IsFMDateTime(fmtime1) then
+      begin
+        HighLow(fmtime, fmtime1, aChart, adatetime, adatetime1);
+        value := strtofloatdef(Piece(Items[i], '^', 5), -BIG_NUMBER);
+        if value = -BIG_NUMBER then
+          TempCheck(Pieces(Items[i], '^', 1, 2), value);
+        AddArrow(adatetime, value, adatetime1, value, '', SeriesColor);
+      end;
+    end;
+    value := Vfactor(Piece(aTitle, '^', 3));
+    if value < 1 then value := 1;
+    Pointer.HorizSize := round(value);
+    GetHorizAxis.ExactDateTime := True;
+    GetHorizAxis.Increment := DateTimeStep[dtOneMinute];
+  end;
+end;
+
+procedure TfrmGraphs.MakeGanttSeries(aChart: TChart; aTitle, aFileType: string; var aSerCnt: integer);
+var
+  i: integer;
+  value: double;
+  fmtime, fmtime1: string;
+  adatetime, adatetime1: TDateTime;
+  gantt: TGanttSeries;
+begin
+  aSerCnt := aSerCnt + 1;
+  gantt := TGanttSeries.Create(aChart);
+  with gantt do
+  begin
+    ParentChart := aChart;
+    Title := Piece(aTitle, '^', 3);
+    Marks.Style := smsLabel;
+    OnGetMarkText := serDatelineTop.OnGetMarkText;
+    Pointer.VertSize := pnlTop.Height;        //******* like vertical bars
+    GetData(aTitle);
+    ColorEachPoint := false;
+    SeriesColor := NextColor(aSerCnt);
+    Identifier := aFileType;
+    Marks.BackColor := clInfoBk;
+    with lstTemp do
+    for i:= 0 to Items.Count - 1 do
+    begin
+      fmtime := FMCorrectedDate(Piece(Items[i], '^', 3));
+      fmtime1 := FMCorrectedDate(Piece(Items[i], '^', 4));
+      if IsFMDateTime(fmtime) and IsFMDateTime(fmtime1) then
+      begin
+        HighLow(fmtime, fmtime1, aChart, adatetime, adatetime1);
+        value := strtofloatdef(Piece(Items[i], '^', 5), -BIG_NUMBER);
+        if value = -BIG_NUMBER then
+          TempCheck(Pieces(Items[i], '^', 1, 2), value);
+        AddGantt(adatetime, adatetime1, 1, '');
+      end;
+    end;
+    GetHorizAxis.ExactDateTime := True;
+    GetHorizAxis.Increment := DateTimeStep[dtOneMinute];
+  end;
+end;
+
+procedure TfrmGraphs.MakeAGanttSeries(aChart: TChart; aTitle, aFileType: string; var aSerCnt: integer);
+var
+  i: integer;
+  value: double;
+  fmtime, fmtime1: string;
+  gantt: TGanttSeries;
+  adatetime, adatetime1: TDateTime;
+begin
+  aSerCnt := aSerCnt + 1;
+  if aChart = chartDatelineTop then
+    gantt := serDatelineTop
+  else
+    gantt := serDatelineBottom;
+  with gantt do
+  begin
+    ParentChart := aChart;
+    Active := true;
+    Title := Piece(aTitle, '^', 3);
+    Marks.Style := smsLabel;
+    OnGetMarkText := serDatelineTop.OnGetMarkText;
+    //Pointer.VertSize := pnlTop.Height;        //******* for meds
+    GetData(aTitle);
+    Identifier := aFileType;
+    ColorEachPoint := True;
+    with lstTemp do
+    for i:= 0 to Items.Count - 1 do
+    begin
+      fmtime := FMCorrectedDate(Piece(Items[i], '^', 3));
+      fmtime1 := FMCorrectedDate(Piece(Items[i], '^', 4));
+      if IsFMDateTime(fmtime) and IsFMDateTime(fmtime1) then
+      begin
+        HighLow(fmtime, fmtime1, aChart, adatetime, adatetime1);
+        value := strtofloatdef(Piece(Items[i], '^', 5), -BIG_NUMBER);
+        if value = -BIG_NUMBER then
+          TempCheck(Pieces(Items[i], '^', 1, 2), value);
+        AddGantt(adatetime, adatetime1, aSerCnt, '');
+      end;
+    end;
+    GetHorizAxis.ExactDateTime := True;
+    GetHorizAxis.Increment := DateTimeStep[dtOneMinute];
+  end;
+end;
+
+procedure TfrmGraphs.splGraphsMoved(Sender: TObject);
+begin
+  if Sender = splGraphs then
+    chkDualViews.Checked := pnlBottom.Height > 3;
+end;
+
+function TfrmGraphs.ValueText(Sender: TCustomChart; Series: TChartSeries; ValueIndex: Integer): string;
+var      // type#^typename^formatdate^itemname^result^date
+  i, offset, SeriesNum, selnum: integer;
+  dateend, datestart: double;
+  astring, datecheck, filetype, fmdatecheck, item, otherdate, partitem: string;
+  resultdate, results, seriestitle, typeitem, typename, typenum: string;
+begin
+  SeriesNum := -1;
+  for i := 0 to Sender.SeriesCount -1 do
+  if Sender.Series[i] = Series then
+  begin
+    SeriesNum := i;
+    filetype := Sender.Series[i].Identifier;
+    break;
+  end;
+  seriestitle := Sender.Series[SeriesNum].Title;
+  if (seriestitle = '') and (SeriesNum < (Series.Count - 1)) then
+    if Sender.Series[SeriesNum + 1].Title = '(non-numeric)' then
+    begin
+      SeriesNum := SeriesNum + 1;
+      seriestitle := '(non-numeric)';
+    end;
+  Result := '';
+  if seriestitle <> '(non-numeric)' then
+  begin
+    ItemCheck(lvwItemsTop, seriestitle, selnum, typeitem);
+    typeitem := UpperCase(typeitem);
+  end
+  else
+  begin
+    selnum := 1;
+    typeitem := '63';
+    offset := 2; // 2 series before
+    if (copy(Sender.Series[SeriesNum - offset].Title, 1, 4) = 'Ref ') then
+      if SeriesNum - 4 > -1 then
+        offset := 4 // if ref ranges
+      else if SeriesNum - 3 > -1 then
+        offset := 3; // if ref ranges
+    seriestitle := Sender.Series[SeriesNum - offset].Title + ' ' + seriestitle;
+  end;
+  if selnum < 0 then
+  begin
+    Result := '^^^' + seriestitle;
+    exit;
+  end;
+  typenum := Piece(typeitem, '^', 1);
+  if (typenum <> filetype) and (filetype <> '') then
+  begin
+    typenum := filetype;
+    typeitem := typenum + '^' + Piece(typeitem, '^', 2);
+  end;
+  if typenum = '55' then
+  begin
+    if Series is TGanttSeries then
+      if (Series as TGanttSeries).Pointer.VertSize <> RX_HEIGHT_IN then
+      if (Series as TGanttSeries).Pointer.VertSize <> RX_HEIGHT_NVA then
+        typenum := '52'
+      else typenum := '55NVA';
+  end
+  else if typenum = '55NVA' then
+  begin
+    if Series is TGanttSeries then
+      if (Series as TGanttSeries).Pointer.VertSize <> RX_HEIGHT_NVA then
+      if (Series as TGanttSeries).Pointer.VertSize <> RX_HEIGHT_OUT then
+        typenum := '55'
+      else typenum := '52';
+  end
+  else if typenum = '52' then
+  begin
+    if Series is TGanttSeries then
+      if (Series as TGanttSeries).Pointer.VertSize <> RX_HEIGHT_OUT then
+      if (Series as TGanttSeries).Pointer.VertSize <> RX_HEIGHT_NVA then
+        typenum := '55'
+      else typenum := '55NVA';
+  end;
+  typename := FileNameX(typenum);
+  if ValueIndex < 0 then
+  begin
+    Result := typenum + '^' + typename + '^^' + seriestitle;
+    exit;
+  end;
+  if Copy(typename, length(typename) - 2, 3) = 'ies' then
+    typename := Copy(typename, 1, length(typename) - 3) + 'y'
+  else if Copy(typename, length(typename), 1) = 's' then
+    typename := Copy(typename, 1, length(typename) - 1);
+  if (Series is TGanttSeries) then
+  begin
+    datestart := (Series as TGanttSeries).StartValues[ValueIndex];
+    dateend := (Series as TGanttSeries).EndValues[ValueIndex];
+  end
+  else
+  begin
+    datestart := Series.XValue[ValueIndex];
+    dateend := datestart;
+  end;
+  if datestart <> dateend then
+  begin
+    resultdate := FormatDateTime('mmm d, yyyy  h:nn am/pm', datestart) +
+      ' - ' + FormatDateTime('mmm d, yyyy  h:nn am/pm', dateend);
+    otherdate := FormatDateTime('mm/dd/yy hh:nn', datestart) +
+      ' - ' + FormatDateTime('mm/dd/yy hh:nn', dateend);
+  end
+  else
+  begin
+    resultdate := FormatDateTime('mmm d, yyyy  h:nn am/pm', datestart);
+    otherdate := FormatDateTime('mm/dd/yy hh:nn', datestart);
+  end;
+  results := '';
+  if typenum = '63' then
+  begin
+    if Series is TLineSeries then
+      if (Series as TLineSeries).LinePen.Style = psDash then
+        exit;          // serHigh or serLow
+    if Series is TPointSeries then
+      if (Series as TPointSeries).Pointer.Style = psSmallDot then
+        exit;         // serBlank
+    if copy(seriestitle, length(seriestitle) - 12, length(seriestitle)) = '(non-numeric)' then
+    begin
+      seriestitle := copy(seriestitle, 1, length(seriestitle) - 13);
+      serDatelineTopGetMarkText(Sender.Series[SeriesNum], ValueIndex, results);
+    end
+    else
+      results := floattostr(Series.YValue[ValueIndex]);
+  end
+  else if typenum <> '120.5' then
+  begin
+    item := Piece(typeitem, '^', 2);
+    partitem := copy(item, 1, 4);
+    //if (partitem = 'M;A;') then     //or (partitem = 'M;T;') then   tb antibiotic on 1st piece
+    begin
+      fmdatecheck := floattostr(DateTimeToFMDateTime(Series.XValue[ValueIndex]));
+      for i := 0 to lstData.Items.Count - 1 do
+      begin
+        astring := lstData.Items[i];
+        if item = Piece(astring, '^', 2) then
+        begin
+          datecheck := Piece(astring, '^', 3);
+          if length(Piece(datecheck, '.', 2)) > 0 then
+            datecheck := Piece(datecheck, '.', 1) + '.' + copy(Piece(datecheck, '.', 2), 1, 4);
+          if datecheck = fmdatecheck then
+          begin
+            results := MixedCase(Piece(astring, '^', 5));
+            break;
+          end;
+        end;
+      end;
+    end;
+  end
+  else if typenum = '120.5' then
+  begin
+    if seriestitle = 'Blood Pressure' then
+      results := BPValue(Series.XValue[ValueIndex])
+    else
+      results := floattostr(Series.YValue[ValueIndex]);
+  end;
+  Result := typenum + '  ^' + typename + '^' + resultdate + '^' +
+    seriestitle + '^' + results + '^' + otherdate;
+end;
+
+procedure TfrmGraphs.chartBaseMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
+var
+  ClickedLegend, ClickedValue, j: Integer;
+  itemname: string;
+  NewPt: TPoint;
+begin
+  //if not FGraphSetting.Hints then exit;       //*****
+  FX := x;
+  FY := y;
+  FActiveGraph := (Sender as TChart);
+  NewPt := Mouse.CursorPos;
+  ClickedValue := -1;
+  ClickedLegend := -1;
+  if FHintWinActive then exit;
+  with FActiveGraph do
+  begin
+    for j := 0 to SeriesCount - 1 do
+    with (Series[j] as TChartSeries) do
+    begin
+      itemname := Series[j].Title;
+      if (Copy(itemname, 1, 7) <> 'Ref Low') and (Copy(itemname, 1, 8) <> 'Ref High') then
+      begin
+        ClickedValue := Clicked(FX, FY);
+        if ClickedValue > -1 then break;
+        ClickedLegend := Legend.Clicked(FX, FY);
+        if ClickedLegend > -1 then break;
+      end;
+    end;
+    if ClickedValue > -1 then
+    begin
+      FHintStop := false;
+      Screen.Cursor := crHandPoint;
+      timHintPause.Enabled := true;
+    end
+    else if ClickedLegend > -1 then
+    begin
+      timHintPause.Enabled := false;
+      InactivateHint;
+      Screen.Cursor := crHandPoint;
+    end
+    else
+    begin
+      timHintPause.Enabled := false;
+      InactivateHint;
+      Screen.Cursor := crDefault;
+    end;
+  end;
+end;
+
+procedure TfrmGraphs.timHintPauseTimer(Sender: TObject);
+var
+  ClickedValue, j: Integer;
+  dttm, itemname, textvalue: string;
+  Rct: TRect;
+begin
+  with FActiveGraph do
+  begin
+    ClickedValue := -1;
+    for j := 0 to SeriesCount - 1 do
+    with (Series[j] as TChartSeries) do
+    begin
+      if FHintStop then break;
+      ClickedValue := Clicked(FX, FY);
+      if ClickedValue > -1 then break;
+    end;
+    if FHintStop then          // stop when clicked
+    begin
+      timHintPause.Enabled := false;
+      InactivateHint;
+      FHintStop := false;
+      exit;
+    end;
+    if (ClickedValue > -1) and ((FOnValue <> ClickedValue) or (FOnSeries <> j)) then
+    begin     // on a value but not the same value or series
+      if FHintWinActive then
+        InactivateHint;
+      itemname := Series[j].Title;
+      if Copy(itemname, 1, 7)= 'Ref Low' then exit;
+      if Copy(itemname, 1, 8)= 'Ref High' then exit;
+      FOnSeries := j;
+      FOnValue := ClickedValue;
+      textvalue := ValueText(FActiveGraph, Series[j], ClickedValue);
+      dttm := Piece(textvalue, '^', 3);
+      //if copy(textvalue, length(textvalue) - 5, length(textvalue)) = ' 00:00' then
+      //  dttm := Pieces(dttm, ' ', 1, 3);
+      textvalue := Piece(textvalue, '^', 2) + '  ' + dttm +
+        #13 + Piece(textvalue, '^', 4) + '  ' + Piece(textvalue, '^', 5);
+      Rct := FHintWin.CalcHintRect(Screen.Width, textvalue, nil);
+      OffsetRect(Rct, FX, FY + 20);
+      Rct.Right := Rct.Right + 3;
+      Rct.TopLeft := ClientToScreen(Rct.TopLeft);
+      Rct.BottomRight := ClientToScreen(Rct.BottomRight);
+      FHintWin.ActivateHint(Rct, textvalue);
+      FHintWinActive := true;
+    end
+    else if (ClickedValue = -1) and ((FOnValue <> BIG_NUMBER) and (FOnSeries <> BIG_NUMBER)) then
+    begin  // not on a value anymore (used to be on a value and series)
+      FOnSeries := BIG_NUMBER;
+      FOnValue := BIG_NUMBER;
+      timHintPause.Enabled := false;
+      InactivateHint;
+    end;
+  end;
+end;
+
+procedure TfrmGraphs.InactivateHint;
+begin
+    FHintWin.ReleaseHandle;
+    FHintWinActive := false;
+end;
+
+procedure TfrmGraphs.mnuPopGraphStayOnTopClick(Sender: TObject);
+begin
+  mnuPopGraphStayOnTop.Checked := not mnuPopGraphStayOnTop.Checked;
+  if mnuPopGraphStayOnTop.Checked then
+  begin
+    MarkFormAsStayOnTop(Self, true);
+    FGraphSetting.StayOnTop := true;
+  end
+  else
+  begin
+    MarkFormAsStayOnTop(Self, false);
+    FGraphSetting.StayOnTop := false;
+  end;
+end;
+
+procedure TfrmGraphs.StayOnTop;
+begin
+  with pnlMain.Parent do
+  if BorderWidth <> 1 then
+  begin
+     mnuPopGraphStayOnTop.Enabled :=false;
+     mnuPopGraphStayOnTop.Checked := false;
+  end
+  else
+  begin     // only use on float Graph
+    mnuPopGraphStayOnTop.Enabled :=true;
+    mnuPopGraphStayOnTop.Checked := not FGraphSetting.StayOnTop;
+    mnuPopGraphStayOnTopClick(self);
+  end;
+end;
+
+procedure TfrmGraphs.HideDates(aChart: TChart);
+var
+  hidedates: boolean;
+begin
+  with aChart do          // dateline charts always have dates
+  begin
+    if (aChart = chartDatelineTop) then
+      hidedates := false
+    else if (aChart = chartDatelineBottom) then
+      hidedates := false
+    else
+      hidedates := not FGraphSetting.Dates;
+    if hidedates then
+    begin
+      MarginBottom := 0;
+      BottomAxis.LabelsFont.Color := chartDatelineTop.Color;
+      BottomAxis.LabelsSize := 1;
+      LeftAxis.LabelsFont.Color := chartDatelineTop.LeftAxis.LabelsFont.Color;
+    end
+    else
+    begin
+      MarginBottom := chartDatelineTop.MarginBottom;
+      BottomAxis.LabelsFont.Color := chartDatelineTop.BottomAxis.LabelsFont.Color;
+      BottomAxis.LabelsSize := chartDatelineTop.BottomAxis.LabelsSize;
+      LeftAxis.LabelsFont.Color := chartDatelineTop.LeftAxis.LabelsFont.Color;
+    end;
+  end;
+end;
+
+procedure TfrmGraphs.mnuPopGraphZoomBackClick(Sender: TObject);
+begin
+  FFirstClick := true;
+  with lstZoomHistory do
+  begin
+    Items.Delete(Count - 1);
+    if Count = 0 then mnuPopGraphResetClick(self)
+    else ZoomUpdate;
+  end;
+end;
+
+procedure TfrmGraphs.ZoomUpdate;
+var
+  lastzoom: string;
+  BigTime, SmallTime: TDateTime;
+begin
+  lastzoom := lstZoomHistory.Items[lstZoomHistory.Count - 1];
+  SmallTime := StrToFloat(Piece(lastzoom, '^', 1));
+  BigTime := StrToFloat(Piece(lastzoom, '^', 2));
+  ZoomTo(SmallTime, BigTime);
+  ZoomUpdateInfo(SmallTime, BigTime);
+end;
+
+procedure TfrmGraphs.ZoomUpdateInfo(SmallTime, BigTime: TDateTime);
+begin
+  pnlInfo.Caption := TXT_ZOOMED;
+  pnlInfo.Color := COLOR_ZOOM;
+  pnlInfo.Caption := pnlInfo.Caption + FormatDateTime('mmm d, yyyy  h:nn am/pm', SmallTime);
+  pnlInfo.Caption := pnlInfo.Caption + ' to ' + FormatDateTime('mmm d, yyyy  h:nn am/pm', BigTime) + '.';
+  pnlInfo.Visible := true;
+  pnlHeader.Visible := true;
+end;
+
+procedure TfrmGraphs.ZoomTo(SmallTime, BigTime: TDateTime);
+var
+  i: integer;
+  ChildControl: TControl;
+begin
+  for i := 0 to scrlTop.ControlCount - 1 do
+  begin
+    ChildControl := scrlTop.Controls[i];
+    SizeDates((ChildControl as TChart), SmallTime, BigTime);
+  end;
+  SizeDates(chartDatelineTop, SmallTime, BigTime);
+  for i := 0 to scrlBottom.ControlCount - 1 do
+  begin
+    ChildControl := scrlBottom.Controls[i];
+    SizeDates((ChildControl as TChart), SmallTime, BigTime);
+  end;
+  SizeDates(chartDatelineBottom, SmallTime, BigTime);
+end;
+
+procedure TfrmGraphs.mnuPopGraphPrintClick(Sender: TObject);
+var
+  topflag: boolean;
+  i, count: integer;
+  StrForFooter, StrForHeader, aTitle, aWarning, aDateRange: String;
+  aHeader: TStringList;
+  wrdApp, wrdDoc, wrdPrintDlg: Variant;
+  ChildControl: TControl;
+begin
+  topflag := mnuPopGraphStayOnTop.Checked and mnuPopGraphStayOnTop.Enabled;
+  try
+    wrdApp := CreateOleObject('Word.Application');
+  except
+    raise Exception.Create('Cannot start MS Word!');
+  end;
+  Screen.Cursor := crDefault;
+  aTitle := 'CPRS Graphing';
+  aWarning := pnlInfo.Caption;
+  aDateRange :=  'Date Range: ' + cboDateRange.Text + '  Selected Items from ' +
+      FormatDateTime('mm/dd/yy', FGraphSetting.LowTime) + ' to ' +
+      FormatDateTime('mm/dd/yy', FGraphSetting.HighTime);
+  aHeader := TStringList.Create;
+  CreatePatientHeader(aHeader, aTitle, aWarning, aDateRange);
+  StrForHeader := '';
+  for i := 0 to aHeader.Count -1 do
+    StrForHeader := StrForHeader + aHeader[i] + Chr(13);
+  StrForFooter := aTitle + ' - *** WORK COPY ONLY ***' + Chr(13);
+  wrdApp.Visible := False;
+  wrdApp.Documents.Add;
+  wrdDoc := wrdApp.Documents.Item(1);
+  wrdDoc := wrdDoc.Sections.Item(1);
+  wrdDoc := wrdDoc.Headers.Item(1).Range;
+  wrdDoc.Font.Name := 'Courier New';
+  wrdDoc.Font.Size := 9;
+  wrdDoc.Text := StrForHeader;
+  wrdDoc := wrdApp.Documents.Item(1);
+  wrdDoc := wrdDoc.Sections.Item(1);
+  wrdDoc := wrdDoc.Footers.Item(1);
+  wrdDoc.Range.Font.Name := 'Courier New';
+  wrdDoc.Range.Font.Size := 9;
+  wrdDoc.Range.Text := StrForFooter;
+  wrdDoc.PageNumbers.Add;
+  wrdDoc := wrdApp.Documents.Item(1);
+  wrdDoc.Range.InsertParagraphAfter;
+  for i := 0 to scrlTop.ControlCount - 1 do           // goes from top to bottom
+  begin
+    ChildControl := scrlTop.Controls[i];
+    if (ChildControl as TChart).Visible then
+    begin
+      (ChildControl as TChart).CopyToClipboardBitmap;
+      wrdDoc.Range.InsertParagraphAfter;
+      wrdDoc.Paragraphs.Last.Range.Paste;
+    end;
+  end;
+  if (chartDatelineTop.SeriesCount > 0) and (not chkItemsTop.Checked) then
+  begin
+    chartDatelineTop.CopyToClipboardBitmap;
+    wrdDoc.Range.InsertParagraphAfter;
+    wrdDoc.Paragraphs.Last.Range.Paste;
+  end;
+  wrdDoc.Range.InsertParagraphAfter;
+  wrdDoc.Paragraphs.Last.Range.Text := '   ';
+  for i := 0 to scrlBottom.ControlCount - 1 do
+  begin
+    ChildControl := scrlBottom.Controls[i];
+    if (ChildControl as TChart).Visible then
+    begin
+      (ChildControl as TChart).CopyToClipboardBitmap;
+      wrdDoc.Range.InsertParagraphAfter;
+      wrdDoc.Paragraphs.Last.Range.Paste;
+    end;
+  end;
+  if (chartDatelineBottom.SeriesCount > 0) and (chkDualViews.Checked)
+    and (not chkItemsBottom.Checked) then
+  begin
+    chartDatelineBottom.CopyToClipboardBitmap;
+    wrdDoc.Range.InsertParagraphAfter;
+    wrdDoc.Paragraphs.Last.Range.Paste;
+  end;
+  wrdPrintDlg := wrdApp.Dialogs.item(wdDialogFilePrint);
+  Screen.Cursor := crDefault;
+  Application.ProcessMessages;
+  if topflag then
+    mnuPopGraphStayOnTopClick(self);
+  wrdPrintDlg.Show;
+  wrdApp.Visible := false;
+  Screen.Cursor := crHourGlass;
+  Application.ProcessMessages;
+  Sleep(5000);
+  count := 0;
+  while (wrdApp.Application.BackgroundPrintingStatus > 0) do
+  begin
+    Sleep(1000);
+    Application.ProcessMessages;
+    count := count + 1;
+    if count > 3 then break;
+  end;
+  wrdApp.DisplayAlerts := false;
+  wrdDoc.Close(false);
+  wrdApp.Quit;
+  wrdApp := Unassigned; // releases variant
+  aHeader.Free;
+  Application.ProcessMessages;
+  if topflag then
+    mnuPopGraphStayOnTopClick(self);
+  Screen.Cursor := crDefault;
+end;
+
+procedure TfrmGraphs.lvwItemsTopChange(Sender: TObject; Item: TListItem;
+  Change: TItemChange);
+begin
+  if FArrowKeys and (lvwItemsTop.SelCount > 0) then
+  begin
+    if pnlItemsTopInfo.Tag <> 1 then
+      lvwItemsTopClick(self);
+    FArrowKeys := false;
+  end;
+end;
+
+procedure TfrmGraphs.lvwItemsBottomChange(Sender: TObject; Item: TListItem;
+  Change: TItemChange);
+begin
+  if FArrowKeys and (lvwItemsBottom.SelCount > 0) then
+  begin
+    if pnlItemsBottomInfo.Tag <> 1 then
+      lvwItemsBottomClick(self);
+    FArrowKeys := false;
+  end;
+end;
+
+procedure TfrmGraphs.lvwItemsTopKeyDown(Sender: TObject; var Key: Word;
+  Shift: TShiftState);
+begin
+  if Key in [VK_PRIOR, VK_NEXT, VK_UP, VK_DOWN] then
+    FArrowKeys := true;
+end;
+
+procedure TfrmGraphs.testcount1Click(Sender: TObject);
+
+ function boxcount(aListBox: TListBox): string;
+ var
+   i, ccnt: integer;
+ begin
+   Result := '';
+   ccnt := 0;
+   for i := 0 to aListBox.Items.Count - 1 do
+     ccnt := ccnt + length(aListBox.Items[i]);
+   Result := inttostr(aListBox.Items.Count) + ';' + inttostr(ccnt);
+ end;
+
+var
+  i, lines, total: integer;
+  aString: string;
+begin
+  lines := 0;
+  total := 0;
+  with pnlData do
+  for i:= 0 to pnlData.ControlCount - 1 do
+    if Controls[i] is TListBox then
+    begin
+      aString := boxcount(Controls[i] as TListBox);
+      lines := lines + strtointdef(Piece(aString, ';', 1), 0);
+      total := total + strtointdef(Piece(aString, ';', 2), 0);
+    end;
+  aString := boxcount(lstTypes) + '^' + boxcount(lstItems) + '^' + boxcount(lstData)
+             + '  lines: ' + inttostr(lines) + '   total: ' + inttostr(total);
+  showmessage(aString);
+end;
+
+procedure TfrmGraphs.cboDateRangeDropDown(Sender: TObject);
+begin
+  if (Top + Height) > (Screen.Height - 100) then
+    cboDateRange.DropDownCount := 3
+  else
+    cboDateRange.DropDownCount := 9;
+end;
+
+procedure TfrmGraphs.mnuPopGraphFixedClick(Sender: TObject);
+begin
+  with FGraphSetting do FixedDateRange := not FixedDateRange;
+  ChangeStyle;
+end;
+
+//***************** these are used to fix dropdown when large fonts
+
+procedure TfrmGraphs.cboViewsTopDropDown(Sender: TObject);
+begin
+  cboViewsTop.Align := alNone;
+end;
+
+procedure TfrmGraphs.cboViewsTopDropDownClose(Sender: TObject);
+begin
+  cboViewsTop.Align := alClient;
+end;
+
+procedure TfrmGraphs.cboViewsBottomDropDown(Sender: TObject);
+begin
+  cboViewsBottom.Align := alNone;
+end;
+
+procedure TfrmGraphs.cboViewsBottomDropDownClose(Sender: TObject);
+begin
+  cboViewsBottom.Align := alClient;
+end;
+
+//*********************
+
+procedure TfrmGraphs.FormDestroy(Sender: TObject);
+begin
+  SetSize;
+end;
+
+procedure TfrmGraphs.SetFontSize(FontSize: integer);
+begin   // for now, ignore changing chart font size
+  with chartDatelineTop do
+  begin
+    LeftAxis.LabelsFont.Size := 8;
+    BottomAxis.LabelsFont.Size := 8;
+    Foot.Font.Size := 8;
+    Legend.Font.Size := 8;
+    Title.Font.Size := 8;
+  end;
+  with chartDatelineBottom do
+  begin
+    LeftAxis.LabelsFont.Size := 8;
+    BottomAxis.LabelsFont.Size := 8;
+    Foot.Font.Size := 8;
+    Legend.Font.Size := 8;
+    Title.Font.Size := 8;
+  end;
+end;
+
+procedure TfrmGraphs.lvwItemsTopEnter(Sender: TObject);
+begin
+  if lvwItemsTop.SelCount = 0 then
+    if lvwItemsTop.Items.Count > 0 then
+      lvwItemsTop.Items[0].Focused := true;
+end;
+
+procedure TfrmGraphs.chkItemsBottomEnter(Sender: TObject);
+begin
+  if not chkDualViews.Checked then
+    if pnlFooter.Visible then
+      cboDateRange.SetFocus
+    else
+      SelectNext(ActiveControl as TWinControl, True, True);
+end;
+
+procedure TfrmGraphs.cboViewsBottomEnter(Sender: TObject);
+begin
+  if not chkDualViews.Checked then
+    SelectNext(ActiveControl as TWinControl, True, True);
+end;
+
+procedure TfrmGraphs.lvwItemsBottomEnter(Sender: TObject);
+begin
+  if lvwItemsBottom.SelCount = 0 then
+    if lvwItemsBottom.Items.Count > 0 then
+      lvwItemsBottom.Items[0].Focused := true;
+  if not chkDualViews.Checked then
+    SelectNext(ActiveControl as TWinControl, True, True);
+end;
+
+initialization
+  CoInitialize (nil);
+end.
Index: cprs/branches/foia-cprs/CPRS-Chart/fLabCollTimes.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fLabCollTimes.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fLabCollTimes.dfm	(revision 460)
@@ -84,5 +84,5 @@
     CalColors.MonthBackColor = clWindow
     CalColors.TrailingTextColor = clGrayText
-    Date = 36507.5573663426
+    Date = 36507.6194967361
     ShowTodayCircle = False
     TabOrder = 4
Index: cprs/branches/foia-cprs/CPRS-Chart/fLabTests.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fLabTests.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fLabTests.dfm	(revision 460)
@@ -13,5 +13,7 @@
   OldCreateOrder = True
   Position = poScreenCenter
+  OnClose = FormClose
   OnCreate = FormCreate
+  OnShow = FormShow
   PixelsPerInch = 96
   TextHeight = 13
@@ -86,4 +88,5 @@
       ListItemsOnly = False
       LongList = True
+      LookupPiece = 0
       MaxLength = 0
       ParentShowHint = False
@@ -98,4 +101,5 @@
       OnExit = cboTestsExit
       OnNeedData = cboTestsNeedData
+      CharsNeedMatch = 1
     end
     object cmdRemove: TButton
Index: cprs/branches/foia-cprs/CPRS-Chart/fLabTests.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fLabTests.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fLabTests.pas	(revision 460)
@@ -30,4 +30,6 @@
     procedure cboTestsExit(Sender: TObject);
     procedure cmdAddClick(Sender: TObject);
+    procedure FormShow(Sender: TObject);
+    procedure FormClose(Sender: TObject; var Action: TCloseAction);
   private
     { Private declarations }
@@ -40,5 +42,5 @@
 implementation
 
-uses fLabs, ORFn, rLabs;
+uses fLabs, ORFn, rLabs, rMisc;
 
 {$R *.DFM}
@@ -156,3 +158,14 @@
 end;
 
+procedure TfrmLabTests.FormShow(Sender: TObject);
+begin
+  SetFormPosition(Self);
+end;
+
+procedure TfrmLabTests.FormClose(Sender: TObject;
+  var Action: TCloseAction);
+begin
+  SaveUserBounds(Self);
+end;
+
 end.
Index: cprs/branches/foia-cprs/CPRS-Chart/fLabs.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fLabs.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fLabs.dfm	(revision 460)
@@ -1,5 +1,5 @@
 inherited frmLabs: TfrmLabs
-  Left = 193
-  Top = 141
+  Left = 628
+  Top = 237
   Height = 387
   HelpContext = 8000
@@ -10,11 +10,11 @@
   TextHeight = 13
   inherited shpPageBottom: TShape
-    Top = 354
+    Top = 355
   end
   inherited sptHorz: TSplitter
-    Height = 354
+    Height = 355
   end
   inherited pnlLeft: TPanel
-    Height = 354
+    Height = 355
     object lblReports: TOROffsetLabel
       Left = 0
@@ -31,5 +31,5 @@
     object lblDates: TOROffsetLabel
       Left = 0
-      Top = 231
+      Top = 232
       Width = 97
       Height = 15
@@ -43,5 +43,5 @@
     object lblHeaders: TOROffsetLabel
       Left = 0
-      Top = 131
+      Top = 132
       Width = 97
       Height = 15
@@ -57,5 +57,5 @@
       Top = 19
       Width = 97
-      Height = 112
+      Height = 113
       Align = alClient
       ItemHeight = 13
@@ -71,5 +71,5 @@
     object lstHeaders: TORListBox
       Left = 0
-      Top = 146
+      Top = 147
       Width = 97
       Height = 52
@@ -88,5 +88,5 @@
     object lstDates: TORListBox
       Left = 0
-      Top = 246
+      Top = 247
       Width = 97
       Height = 108
@@ -115,5 +115,5 @@
     object pnlOtherTests: TORAutoPanel
       Left = 0
-      Top = 198
+      Top = 199
       Width = 97
       Height = 33
@@ -139,5 +139,5 @@
   end
   inherited pnlRight: TPanel
-    Height = 354
+    Height = 355
     OnResize = pnlRightResize
     object lblHeading: TOROffsetLabel
@@ -448,5 +448,5 @@
     object pnlFooter: TORAutoPanel
       Left = 0
-      Top = 334
+      Top = 335
       Width = 539
       Height = 20
@@ -536,4 +536,30 @@
       TabOrder = 3
       Visible = False
+      object lblGraph: TLabel
+        Left = 0
+        Top = 72
+        Width = 370
+        Height = 13
+        Alignment = taCenter
+        Caption = 
+          'Results may be available, but cannot be graphed. Please try an a' +
+          'lternate view.'
+      end
+      object lstTestGraph: TORListBox
+        Left = 0
+        Top = 0
+        Width = 97
+        Height = 85
+        Align = alLeft
+        ItemHeight = 13
+        ParentShowHint = False
+        ShowHint = True
+        TabOrder = 0
+        OnClick = lstTestGraphClick
+        Caption = 'Tests Graphed'
+        ItemTipColor = clWindow
+        LongList = False
+        Pieces = '2'
+      end
       object chtChart: TChart
         Left = 97
@@ -616,20 +642,4 @@
         end
       end
-      object lstTestGraph: TORListBox
-        Left = 0
-        Top = 0
-        Width = 97
-        Height = 85
-        Align = alLeft
-        ItemHeight = 13
-        ParentShowHint = False
-        ShowHint = True
-        TabOrder = 0
-        OnClick = lstTestGraphClick
-        Caption = 'Tests Graphed'
-        ItemTipColor = clWindow
-        LongList = False
-        Pieces = '2'
-      end
     end
     object memLab: TRichEdit
@@ -637,5 +647,5 @@
       Top = 321
       Width = 539
-      Height = 13
+      Height = 14
       Align = alClient
       Color = clCream
@@ -683,4 +693,5 @@
       HotTrack = True
       Style = tsButtons
+      TabHeight = 16
       TabOrder = 1
       Visible = False
@@ -691,5 +702,5 @@
       Top = 321
       Width = 539
-      Height = 13
+      Height = 14
       TabStop = False
       Align = alClient
@@ -697,5 +708,5 @@
       OnDocumentComplete = WebBrowser1DocumentComplete
       ControlData = {
-        4C000000B5370000580100000000000000000000000000000000000000000000
+        4C000000B5370000720100000000000000000000000000000000000000000000
         000000004C000000000000000000000001000000E0D057007335CF11AE690800
         2B2E126208000000000000004C0000000114020000000000C000000000000046
Index: cprs/branches/foia-cprs/CPRS-Chart/fLabs.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fLabs.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fLabs.pas	(revision 460)
@@ -7,5 +7,5 @@
   fHSplit, StdCtrls, ExtCtrls, ORCtrls, ComCtrls, Grids, Buttons, fLabTest,
   fLabTests, fLabTestGroups, ORFn, TeeProcs, TeEngine, Chart, Series, Menus,
-  uConst, ORDtTmRng, OleCtrls, SHDocVw, Variants;
+  uConst, ORDtTmRng, OleCtrls, SHDocVw, Variants, StrUtils;
 
 type
@@ -83,4 +83,5 @@
     TabControl1: TTabControl;
     WebBrowser1: TWebBrowser;
+    lblGraph: TLabel;
     procedure FormCreate(Sender: TObject);
     procedure DisplayHeading;
@@ -133,4 +134,5 @@
     procedure Memo1KeyUp(Sender: TObject; var Key: Word;
       Shift: TShiftState);
+    procedure UpdateRemoteStatus(aSiteID, aStatus: string);
   private
     { Private declarations }
@@ -159,4 +161,5 @@
     function FMToDateTime(FMDateTime: string): TDateTime;
     procedure RequestPrint; override;
+    procedure ExtlstReportsClick(Sender: TObject; Ext: boolean);
 
 end;
@@ -169,9 +172,10 @@
   uLabLocalReportData: TStringList;  //Storage for Local report data
   uLabRemoteReportData: TStringList; //Storage for Remote lab query
+  uUpdateStat: boolean;             //flag turned on when remote status is being updated
 
 implementation
 
 uses uCore, rLabs, rCore, rCover, rOrders, fLabPrint, fFrame, fRptBox, Printers,
-     clipbrd, rReports, activex, mshtml, uAccessibleStringGrid;
+     clipbrd, rReports, rGraphs, activex, mshtml, uAccessibleStringGrid;
 
 const
@@ -189,4 +193,5 @@
 var
   uFrozen: Boolean;
+  uGraphingActivated: Boolean;
   uRemoteCount: Integer;
   uHTMLDoc: string;
@@ -240,4 +245,6 @@
 
 procedure TfrmLabs.FormCreate(Sender: TObject);
+var
+  aList: TStrings;
 begin
   inherited;
@@ -246,4 +253,8 @@
   memLab.Color := ReadOnlyColor;
   uFrozen := False;
+  aList := TStringList.Create;
+  FastAssign(rpcGetGraphSettings, aList);
+  uGraphingActivated := aList.Count > 0;
+  aList.Free;
   uRemoteCount := 0;
   tmpGrid := TStringList.Create;
@@ -258,4 +269,25 @@
   SerTest.GetHorizAxis.Increment := DateTimeStep[dtOneMinute];
   TAccessibleStringGrid.WrapControl(grdLab);
+end;
+
+procedure TfrmLabs.UpdateRemoteStatus(aSiteID, aStatus: string);
+var
+  j: integer;
+  s: string;
+  c: boolean;
+begin
+  if uUpdateStat = true then exit;                 //uUpdateStat also looked at in fFrame
+  uUpdateStat := true;
+  for j := 0 to frmFrame.lstCIRNLocations.Items.Count - 1 do
+    begin
+      s := frmFrame.lstCIRNLocations.Items[j];
+      c := frmFrame.lstCIRNLocations.checked[j];
+      if piece(s, '^', 1) = aSiteID then
+        begin
+          frmFrame.lstCIRNLocations.Items[j] := pieces(s, '^', 1, 3) + '^' + aStatus;
+          frmFrame.lstCIRNLocations.checked[j] := c;
+        end;
+    end;
+  uUpdateStat := false;
 end;
 
@@ -296,4 +328,5 @@
   TabControl1.Tabs.Clear;
   TabControl1.Visible := false;
+  tmpGrid.Clear;
   with grdLab do
   begin
@@ -374,4 +407,9 @@
 
 procedure TfrmLabs.lstReportsClick(Sender: TObject);
+begin
+  ExtlstReportsClick(Sender, false);
+end;
+
+procedure TfrmLabs.ExtlstReportsClick(Sender: TObject; Ext: boolean);
 var
   i,iCat: integer;
@@ -436,5 +474,5 @@
          lblSpecimen.Caption := '';
        end;
-       SelectTests(Font.Size);
+       if not Ext then SelectTests(Font.Size);
        if lstTests.Items.Count > 0 then
        begin
@@ -445,8 +483,8 @@
          RedrawActivate(memLab.Handle);
          lstDatesClick(self);
-         cmdOtherTests.SetFocus;
+         if not Ext then cmdOtherTests.SetFocus;
          cmdOtherTests.Default := true;
        end
-       else uPrevReportIndex := lstReports.ItemIndex;
+       else lstReports.ItemIndex := uPrevReportIndex;
      end;
   5: begin               // Worksheet
@@ -456,5 +494,5 @@
          lblSpecimen.Caption := '';
        end;
-       SelectTestGroups(Font.Size);
+       if not Ext then SelectTestGroups(Font.Size);
        if lstTests.Items.Count > 0 then
        begin
@@ -472,27 +510,45 @@
          //chkZoomClick(self);
          lstDatesClick(self);
-         cmdOtherTests.SetFocus;
+         if not Ext then cmdOtherTests.SetFocus;
          cmdOtherTests.Default := true;
        end
-       else uPrevReportIndex := lstReports.ItemIndex;
+       else lstReports.ItemIndex := uPrevReportIndex;
      end;
   6: begin               // Graph
-       if uPrevReportIndex <> lstReports.ItemIndex then
+        // do if graphing is activiated
+       if uGraphingActivated then
        begin
-         lblSingleTest.Caption := '';
-         lblSpecimen.Caption := '';
-       end;
-       SelectTest(Font.Size);
-       if (length(lblSingleTest.Caption) > 2) and (length(lblSpecimen.Caption) > 2) then
+         memLab.Clear;
+         chkBrowser;
+         FormResize(self);
+         memLab.Align := alClient;
+         CommonComponentVisible(false,false,false,false,false,false,false,false,false);
+         RedrawActivate(memLab.Handle);
+         StatusText('');
+         memLab.Lines.Insert(0, ' ');
+         memLab.Lines.Insert(1, 'Graphing activated');
+         memLab.SelStart := 0;
+         frmFrame.mnuToolsGraphingClick(self);  // make it just lab tests ??
+         //lstReports.ItemIndex := uPrevReportIndex;
+       end
+       else  // otherwise, do lab graph
        begin
-         CommonComponentVisible(false,false,true,true,true,true,false,false,true);
-         pnlChart.Visible := true;
-         chtChart.Visible := true;
-         pnlButtons.Visible := false;
-         pnlWorksheet.Visible := false;
-         pnlGraph.Visible := true;
-         memLab.Height := pnlRight.Height div 5;
-         memLab.Clear;
-         if uReportType = 'H' then
+         if uPrevReportIndex <> lstReports.ItemIndex then
+         begin
+           lblSingleTest.Caption := '';
+           lblSpecimen.Caption := '';
+         end;
+         if not Ext then SelectTest(Font.Size);
+         if (length(lblSingleTest.Caption) > 2) and (length(lblSpecimen.Caption) > 2) then
+         begin
+           CommonComponentVisible(false,false,true,true,true,true,false,false,true);
+           pnlChart.Visible := true;
+           chtChart.Visible := true;
+           pnlButtons.Visible := false;
+           pnlWorksheet.Visible := false;
+           pnlGraph.Visible := true;
+           memLab.Height := pnlRight.Height div 5;
+           memLab.Clear;
+           if uReportType = 'H' then
            begin
              WebBrowser1.Visible := true;
@@ -502,27 +558,29 @@
              memLab.Visible := false;
            end
+           else
+           begin
+             WebBrowser1.Visible := false;
+             WebBrowser1.SendToBack;
+             memLab.Visible := true;
+             memLab.BringToFront;
+           end;
+           lstTestGraph.Items.Clear;
+           lstTestGraph.Width := 0;
+           FormResize(self);
+           RedrawActivate(memLab.Handle);
+           lblFooter.Caption := '';
+           chkGraphZoom.Checked := false;
+           chkGraphZoomClick(self);
+           chkGraph3DClick(self);
+           chkGraphValuesClick(self);
+           lstDatesClick(self);
+           if not Ext then cmdOtherTests.SetFocus;
+           cmdOtherTests.Default := true;
+         end
          else
-          begin
-            WebBrowser1.Visible := false;
-            WebBrowser1.SendToBack;
-            memLab.Visible := true;
-            memLab.BringToFront;
-          end;
-         lstTestGraph.Items.Clear;
-         lstTestGraph.Width := 0;
-         FormResize(self);
-         RedrawActivate(memLab.Handle);
-         lblFooter.Caption := '';
-         chkGraphZoom.Checked := false;
-         chkGraphZoomClick(self);
-         chkGraph3DClick(self);
-         chkGraphValuesClick(self);
-         lstDatesClick(self);
-         cmdOtherTests.SetFocus;
-         cmdOtherTests.Default := true;
-       end
-       else uPrevReportIndex := lstReports.ItemIndex;
-     end;
-  else
+           lstReports.ItemIndex := uPrevReportIndex;
+       end;
+     end
+    else // case
     begin
       //added to deal with other reports from file 101.24
@@ -734,41 +792,50 @@
      end;
   6: begin            // Graph
-       chtChart.BottomAxis.Automatic := true;
-       chkGraphZoom.Checked := false;
-       chkGraphZoomClick(self);
-       memLab.Clear;
-       uLabLocalReportData.Clear;
-       uLabRemoteReportData.Clear;
-       tmpList := TStringList.Create;
-       try
-         StatusText('Retrieving data for graph...');
-         tmpList.Assign(GetChart(Patient.DFN, date1, date2,
-           Piece(lblSpecimen.Caption, '^', 1),
-           Piece(lblSingleTest.Caption, '^', 1)));
-         if tmpList.Count > 1 then
-         begin
-           chtChart.Visible := true;
-           GraphChart(lblSingleTest.Caption, tmpList);
-           chtChart.ZoomPercent(ZOOM_PERCENT);
-           for i := strtoint(Piece(tmpList[0], '^', 1)) + 1 to tmpList.Count - 1
-             do memLab.Lines.Add(tmpList[i]);
-           if memLab.Lines.Count < 2 then
-             memLab.Lines.Add('<No comments on specimens.>');
-           memLab.SelStart := 0;
-         end
-         else
-         begin
-           if Piece(lblSpecimen.Caption, '^', 1) = '0' then
-             pnlChart.Caption := '<No results can be graphed for ' +
-               Piece(lblSingleTest.Caption, '^', 2) + ' in this date range.>'
+       if not uGraphingActivated then
+       begin
+         chtChart.BottomAxis.Automatic := true;
+         chkGraphZoom.Checked := false;
+         chkGraphZoomClick(self);
+         memLab.Clear;
+         uLabLocalReportData.Clear;
+         uLabRemoteReportData.Clear;
+         tmpList := TStringList.Create;
+         try
+           StatusText('Retrieving data for graph...');
+           tmpList.Assign(GetChart(Patient.DFN, date1, date2,
+             Piece(lblSpecimen.Caption, '^', 1),
+             Piece(lblSingleTest.Caption, '^', 1)));
+           if tmpList.Count > 1 then
+           begin
+             chtChart.Visible := true;
+             GraphChart(lblSingleTest.Caption, tmpList);
+             chtChart.ZoomPercent(ZOOM_PERCENT);
+             for i := strtoint(Piece(tmpList[0], '^', 1)) + 1 to tmpList.Count - 1
+               do memLab.Lines.Add(tmpList[i]);
+             if memLab.Lines.Count < 2 then
+               memLab.Lines.Add('<No comments on specimens.>');
+             memLab.SelStart := 0;
+             lblGraph.Visible := false;
+           end
            else
-             pnlChart.Caption := '<No results can be graphed for ' +
-               Piece(lblSingleTest.Caption, '^', 2)
-               + ' (' + Piece(lblSpecimen.Caption, '^', 2) +
-                 ') in this date range.>';
-           chtChart.Visible := false;
+           begin
+             lblGraph.Left := chtChart.Left + ((chtChart.Width - lblGraph.Width) div 2);
+             lblGraph.Top := 2;
+             lblGraph.Visible := true;
+             if Piece(lblSpecimen.Caption, '^', 1) = '0' then
+               pnlChart.Caption := '<No results can be graphed for ' +
+                 Piece(lblSingleTest.Caption, '^', 2) + ' in this date range.> '
+                 + 'Results may be available, but cannot be graphed. Please try an alternate view.'
+             else
+               pnlChart.Caption := '<No results can be graphed for ' +
+                 Piece(lblSingleTest.Caption, '^', 2)
+                 + ' (' + Piece(lblSpecimen.Caption, '^', 2) +
+                   ') in this date range.> '
+                 + 'Results may be available, but cannot be graphed. Please try an alternate view.';
+             chtChart.Visible := false;
+           end;
+         finally
+           tmpList.Free;
          end;
-       finally
-         tmpList.Free;
        end;
      end;
@@ -1285,10 +1352,15 @@
   if valuecount = 0 then
   begin
+    lblGraph.Left := chtChart.Left + ((chtChart.Width - lblGraph.Width) div 2);
+    lblGraph.Top := 2;
+    lblGraph.Visible := true;
     if length(Piece(specimen, '^', 2)) > 0 then
-      pnlChart.Caption := '<No results can be graphed for ' + serTest.Title + ' in this date range.>'
+      pnlChart.Caption := '<No results can be graphed for ' + serTest.Title + ' in this date range.> '
     else
       pnlChart.Caption := '<No results can be graphed for ' + Piece(test, '^', 2) + ' in this date range.>';
     chtChart.Visible := false;
-  end;
+  end
+  else
+    lblGraph.Visible := false;
   if not chkZoom.Checked then
   begin
@@ -1350,4 +1422,5 @@
        memLab.Align := alBottom;
        grdLab.Align := alClient;
+       if tmpGrid.Count > 0 then HGrid(tmpGrid);
        if (grdLab.VisibleRowCount + 1) < grdLab.RowCount then
          grdLab.ColWidths[4] := grdLab.ColWidths[4] - 18;
@@ -1387,11 +1460,14 @@
      end;
   6: begin               // Graph
-       memLab.Height := pnlLeft.Height div 4;
-       memLab.Align := alBottom;
-       pnlChart.Top := pnlHeader.Height;
-       pnlChart.Align := alClient;
-       memLab.Height := pnlLeft.Height div 4;
-       memLab.Align := alBottom;
-       memLab.Repaint;
+       if not uGraphingActivated then
+       begin
+         memLab.Height := pnlLeft.Height div 4;
+         memLab.Align := alBottom;
+         pnlChart.Top := pnlHeader.Height;
+         pnlChart.Align := alClient;
+         memLab.Height := pnlLeft.Height div 4;
+         memLab.Align := alBottom;
+         memLab.Repaint;
+       end;
      end;
   7: begin               // Anatomic Path
@@ -1985,4 +2061,5 @@
                     Timer1.Enabled := False;
                     TRemoteSite(Items[i]).LabQueryStatus := '-1^Timed out';
+                    UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID, 'Timed out');
                     StatusText('');
                     TabControl1.OnChange(nil);
@@ -2034,4 +2111,11 @@
         begin
           TRemoteSite(Items[i]).LabClear;
+          if (LeftStr(TRemoteSite(Items[i]).SiteID, 5) = '200HD') then
+          begin
+            TRemoteSite(Items[i]).LabQueryStatus := '1^Not Included';
+            UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID, 'NOT INCLUDED');
+            TabControl1.OnChange(nil);
+            continue;
+          end;
           TRemoteSite(Items[i]).CurrentLabQuery := 'Lab' + Patient.DFN + ';' + Patient.ICN +
             '^' + IntToStr(AItem) + '^' + IntToStr(AReportID) + '^^' + ARpc + '^' + AHSType +
@@ -2055,4 +2139,5 @@
                 TRemoteSite(Items[i]).LabRemoteHandle := '';
                 TRemoteSite(Items[i]).LabQueryStatus := '1^Done';
+                UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID, 'Done');
                 TabControl1.OnChange(nil);
               end
@@ -2084,9 +2169,13 @@
               end;
               if Dest[0] = '' then
-                TRemoteSite(Items[i]).LabQueryStatus := '-1^Communication error'
+                begin
+                  TRemoteSite(Items[i]).LabQueryStatus := '-1^Communication error';
+                  UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID, 'Communication error');
+                end
               else
                 begin
                   TRemoteSite(Items[i]).LabRemoteHandle := Dest[0];
                   TRemoteSite(Items[i]).LabQueryStatus := '0^initialization...';
+                  UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID, 'Initialization');
                   Timer1.Enabled := True;
                   StatusText('Retrieving reports from '
Index: cprs/branches/foia-cprs/CPRS-Chart/fMHTest.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fMHTest.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fMHTest.dfm	(revision 460)
@@ -12,5 +12,4 @@
   Font.Name = 'MS Sans Serif'
   Font.Style = []
-  FormStyle = fsStayOnTop
   KeyPreview = True
   OldCreateOrder = False
Index: cprs/branches/foia-cprs/CPRS-Chart/fMHTest.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fMHTest.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fMHTest.pas	(revision 460)
@@ -38,4 +38,6 @@
     procedure GotoQ(x: integer);
   public
+  MHTestComp: string;
+  MHA3: boolean;
   end;
 
@@ -134,4 +136,7 @@
       end;
     end;
+      if frmMHTest.MHTestComp = '' then frmMHTest.MHTestComp := '0';
+      Result := Result + U + frmMHTest.MHTestComp;
+      if Result = U then Result := '';
   finally
     frmMHTest.Free;
@@ -246,8 +251,10 @@
   try
     TstData.Assign(LoadMentalHealthTest(TestName));
+    if TstData.Strings[0] = '1' then MHA3 := True
+    else MHA3 := False;
     Screen.Cursor := crHourGlass;
     try
       TstData.Add('99999;X;0');
-      idx := 0;
+      idx := 1;
       FMaxLines := 0;
       FInfoText := '';
@@ -302,5 +309,7 @@
           if(Spec = 'I') then
           begin
-            AddTxt2Str(FInfoText);
+           if MHA3 = True then AddTxt2Str(QObj.FText)
+           else
+           AddTxt2Str(FInfoText);;
           end
           else
@@ -392,5 +401,9 @@
     FBuildingControls := TRUE;
     try
-      if(not assigned(FInfoLabel)) then
+    Wide := sbMain.Width - (Gap * 2) - ScrollBarWidth - 4;
+    Y := gap - sbMain.VertScrollBar.Position;
+    if MHA3 = False then
+     begin
+     if(not assigned(FInfoLabel)) then
       begin
         FInfoLabel := TMemo.Create(Self);
@@ -405,6 +418,6 @@
       end;
       BoundsRect := FInfoLabel.BoundsRect;
-      Wide := sbMain.Width - (Gap * 2) - ScrollBarWidth - 4;
-      Y := Gap - sbMain.VertScrollBar.Position;
+      //Wide := sbMain.Width - (Gap * 2) - ScrollBarWidth - 4;
+      //Y := gap - sbMain.VertScrollBar.Position;
       BoundsRect.Top := Y;
       BoundsRect.Right := BoundsRect.Left + Wide;
@@ -416,4 +429,10 @@
       for i := 0 to FObjs.Count-1 do
         TMHQuestion(FObjs[i]).BuildControls(Y, Wide);
+     end
+     else
+       begin
+         inc(Y, 1);
+         for i := 0 to FObjs.Count-1 do TMHQuestion(FObjs[i]).BuildControls(Y, Wide);
+       end;
     finally
       FBuildingControls := FALSE;
@@ -780,12 +799,16 @@
 var
   i, XCnt, First: integer;
-  msg: string;
+  msg, ans, TestStatus: string;
 
 begin
   msg := '';
+  ans := '';
   XCnt := 0;
   First := -1;
+  TestStatus := '2';
+  MHTestComp := '2';
   for i := 0 to FObjs.Count-1 do
   begin
+    ans := ans + TMHQuestion(Fobjs[i]).FAnswer;
     if(TMHQuestion(FObjs[i]).FAnswer = Skipped) then
     begin
@@ -797,4 +820,26 @@
     end;
   end;
+  if(XCnt = FObjs.Count) then ModalResult := mrOK;
+  TestStatus := VerifyMentalHealthTestComplete(Self.Caption, ans);
+  if Piece(TestStatus,U,1) <> '2' then
+    begin
+      if Piece(TestStatus,U,1)='1' then
+        begin
+          ModalResult := mrOK;
+          MHTestComp := '1';
+          EXIT;
+        end;
+      if Piece(TestStatus,U,1)='0' then
+        begin
+          MHTestComp := '0';
+          msg := Piece(TestStatus,u,2);
+          msg := 'The following questions have not been answered:' + CRLF + CRLF + '    ' + msg;
+          if(InfoBox(msg + CRLF + CRLF + 'Answer skipped questions?', 'Skipped Questions',
+           MB_YESNO or MB_ICONQUESTION) = IDYES) then GotoQ(First)
+          else
+            ModalResult := mrOK;
+            EXIT;
+        end;
+    end;
   if(XCnt = 0) then
     ModalResult := mrOK
Index: cprs/branches/foia-cprs/CPRS-Chart/fMeds.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fMeds.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fMeds.dfm	(revision 460)
@@ -1,12 +1,15 @@
 inherited frmMeds: TfrmMeds
-  Left = 255
-  Top = 53
-  Width = 734
-  Height = 681
+  Left = 93
+  Top = 250
+  Width = 709
+  Height = 686
   HelpContext = 3000
+  VertScrollBar.Visible = False
   Caption = 'Medications Page'
   HelpFile = 'qnoback'
   Menu = mnuMeds
+  Visible = True
   OnDestroy = FormDestroy
+  OnMouseUp = FormMouseUp
   OnResize = FormResize
   OnShow = FormShow
@@ -21,6 +24,6 @@
   object splitTop: TSplitter
     Left = 0
-    Top = 213
-    Width = 726
+    Top = 421
+    Width = 701
     Height = 4
     Cursor = crVSplit
@@ -36,9 +39,8 @@
   object pnlBottom: TORAutoPanel
     Left = 0
-    Top = 217
-    Width = 726
-    Height = 418
+    Top = 425
+    Width = 701
+    Height = 207
     Align = alBottom
-    Caption = 'pnlBottom'
     Constraints.MinHeight = 40
     Ctl3D = False
@@ -47,6 +49,6 @@
     object splitBottom: TSplitter
       Left = 1
-      Top = 204
-      Width = 724
+      Top = 102
+      Width = 699
       Height = 4
       Cursor = crVSplit
@@ -56,5 +58,5 @@
       Constraints.MaxHeight = 4
       Constraints.MinHeight = 4
-      MinSize = 60
+      MinSize = 100
       ParentColor = False
       OnMoved = splitBottomMoved
@@ -62,10 +64,9 @@
     object pnlMedIn: TPanel
       Left = 1
-      Top = 208
-      Width = 724
-      Height = 209
+      Top = 106
+      Width = 699
+      Height = 100
       Align = alBottom
-      Caption = 'pnlMedIn'
-      Constraints.MinHeight = 40
+      Constraints.MinHeight = 100
       TabOrder = 0
       object lstMedsIn: TCaptionListBox
@@ -73,9 +74,10 @@
         Left = 1
         Top = 17
-        Width = 722
-        Height = 191
+        Width = 697
+        Height = 82
         Style = lbOwnerDrawVariable
         Align = alClient
         Color = clCream
+        Constraints.MinHeight = 65
         Ctl3D = False
         ItemHeight = 13
@@ -94,9 +96,8 @@
         Left = 1
         Top = 1
-        Width = 722
+        Width = 697
         Height = 16
         BiDiMode = bdLeftToRight
         DragReorder = False
-        Constraints.MaxHeight = 16
         Constraints.MinHeight = 16
         Sections = <
@@ -111,5 +112,5 @@
             MinWidth = 20
             Text = 'Inpatient Medications'
-            Width = 440
+            Width = 100
           end
           item
@@ -127,9 +128,13 @@
           item
             ImageIndex = -1
+            MinWidth = 16
             Text = 'Location'
-            Width = 60
+            Width = 20
           end>
+        OnSectionClick = hdrMedsInSectionClick
         OnSectionResize = hdrMedsInSectionResize
         ParentBiDiMode = False
+        OnMouseDown = hdrMedsInMouseDown
+        OnMouseUp = hdrMedsInMouseUp
         OnResize = hdrMedsInResize
       end
@@ -138,6 +143,6 @@
       Left = 1
       Top = 1
-      Width = 724
-      Height = 203
+      Width = 699
+      Height = 101
       Align = alClient
       Caption = 'pnlNonVA'
@@ -148,6 +153,6 @@
         Left = 1
         Top = 17
-        Width = 722
-        Height = 185
+        Width = 697
+        Height = 83
         Style = lbOwnerDrawVariable
         Align = alClient
@@ -170,9 +175,8 @@
         Left = 1
         Top = 1
-        Width = 722
+        Width = 697
         Height = 16
         BiDiMode = bdLeftToRight
         DragReorder = False
-        Constraints.MaxHeight = 16
         Constraints.MinHeight = 16
         Sections = <
@@ -187,5 +191,5 @@
             MinWidth = 20
             Text = 'Non-VA Medications'
-            Width = 516
+            Width = 100
           end
           item
@@ -201,6 +205,9 @@
             Width = 62
           end>
-        OnSectionResize = hdrMedsInSectionResize
+        OnSectionClick = hdrMedsNonVASectionClick
+        OnSectionResize = hdrMedsNonVASectionResize
         ParentBiDiMode = False
+        OnMouseDown = hdrMedsNonVAMouseDown
+        OnMouseUp = hdrMedsNonVAMouseUp
         OnResize = hdrMedsNonVAResize
       end
@@ -210,8 +217,7 @@
     Left = 0
     Top = 0
-    Width = 726
-    Height = 213
+    Width = 701
+    Height = 421
     Align = alClient
-    Caption = 'pnlTop'
     Ctl3D = True
     ParentCtl3D = False
@@ -221,9 +227,10 @@
       Left = 1
       Top = 17
-      Width = 724
-      Height = 195
+      Width = 699
+      Height = 403
       Style = lbOwnerDrawVariable
       Align = alClient
       Color = clCream
+      Constraints.MinHeight = 40
       Ctl3D = False
       ItemHeight = 13
@@ -242,8 +249,8 @@
       Left = 1
       Top = 1
-      Width = 724
+      Width = 699
       Height = 16
+      BiDiMode = bdLeftToRight
       DragReorder = False
-      Constraints.MaxHeight = 100
       Constraints.MinHeight = 16
       Sections = <
@@ -258,5 +265,5 @@
           MinWidth = 20
           Text = 'Outpatient Medications'
-          Width = 400
+          Width = 100
         end
         item
@@ -284,5 +291,9 @@
           Width = 78
         end>
+      OnSectionClick = hdrMedsOutSectionClick
       OnSectionResize = hdrMedsOutSectionResize
+      ParentBiDiMode = False
+      OnMouseDown = hdrMedsOutMouseDown
+      OnMouseUp = hdrMedsOutMouseUp
       OnResize = hdrMedsOutResize
     end
@@ -358,4 +369,54 @@
         end
       end
+      object mnuViewInformation: TMenuItem
+        Caption = 'Information'
+        OnClick = mnuViewInformationClick
+        object mnuViewDemo: TMenuItem
+          Tag = 1
+          Caption = 'De&mographics...'
+          OnClick = ViewInfo
+        end
+        object mnuViewVisits: TMenuItem
+          Tag = 2
+          Caption = 'Visits/Pr&ovider...'
+          OnClick = ViewInfo
+        end
+        object mnuViewPrimaryCare: TMenuItem
+          Tag = 3
+          Caption = 'Primary &Care...'
+          OnClick = ViewInfo
+        end
+        object mnuViewMyHealtheVet: TMenuItem
+          Tag = 4
+          Caption = 'MyHealthe&Vet...'
+          OnClick = ViewInfo
+        end
+        object mnuInsurance: TMenuItem
+          Tag = 5
+          Caption = '&Insurance...'
+          OnClick = ViewInfo
+        end
+        object mnuViewFlags: TMenuItem
+          Tag = 6
+          Caption = '&Flags...'
+          OnClick = ViewInfo
+        end
+        object mnuViewRemoteData: TMenuItem
+          Tag = 7
+          Caption = 'Remote &Data...'
+          OnClick = ViewInfo
+        end
+        object mnuViewReminders: TMenuItem
+          Tag = 8
+          Caption = '&Reminders...'
+          Enabled = False
+          OnClick = ViewInfo
+        end
+        object mnuViewPostings: TMenuItem
+          Tag = 9
+          Caption = '&Postings...'
+          OnClick = ViewInfo
+        end
+      end
       object Z2: TMenuItem
         Caption = '-'
@@ -473,4 +534,9 @@
       OnClick = mnuActNewClick
     end
+    object mnuOptimizeFields: TMenuItem
+      Caption = 'Adjust Field Size'
+      Visible = False
+      OnClick = mnuOptimizeFieldsClick
+    end
   end
 end
Index: cprs/branches/foia-cprs/CPRS-Chart/fMeds.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fMeds.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fMeds.pas	(revision 460)
@@ -72,4 +72,15 @@
     lstMedsOut: TCaptionListBox;
     hdrMedsOut: THeaderControl;
+    mnuViewInformation: TMenuItem;
+    mnuViewDemo: TMenuItem;
+    mnuViewVisits: TMenuItem;
+    mnuViewPrimaryCare: TMenuItem;
+    mnuViewMyHealtheVet: TMenuItem;
+    mnuInsurance: TMenuItem;
+    mnuViewFlags: TMenuItem;
+    mnuViewReminders: TMenuItem;
+    mnuViewRemoteData: TMenuItem;
+    mnuViewPostings: TMenuItem;
+    mnuOptimizeFields: TMenuItem;
     procedure mnuChartTabClick(Sender: TObject);
     procedure FormCreate(Sender: TObject);
@@ -96,5 +107,4 @@
     procedure mnuActRefillClick(Sender: TObject);
     procedure mnuActClick(Sender: TObject);
-    procedure pnlMedOut1Resize(Sender: TObject);
     procedure mnuViewHistoryClick(Sender: TObject);
     procedure popMedPopup(Sender: TObject);
@@ -114,4 +124,26 @@
     procedure splitBottomMoved(Sender: TObject);
     procedure splitTopMoved(Sender: TObject);
+    procedure hdrMedsOutMouseDown(Sender: TObject; Button: TMouseButton;
+      Shift: TShiftState; X, Y: Integer);
+    procedure hdrMedsNonVAMouseDown(Sender: TObject; Button: TMouseButton;
+      Shift: TShiftState; X, Y: Integer);
+    procedure hdrMedsInMouseDown(Sender: TObject; Button: TMouseButton;
+      Shift: TShiftState; X, Y: Integer);
+    procedure hdrMedsOutMouseUp(Sender: TObject; Button: TMouseButton;
+      Shift: TShiftState; X, Y: Integer);
+    procedure hdrMedsNonVAMouseUp(Sender: TObject; Button: TMouseButton;
+      Shift: TShiftState; X, Y: Integer);
+    procedure hdrMedsInMouseUp(Sender: TObject; Button: TMouseButton;
+      Shift: TShiftState; X, Y: Integer);
+    //procedure ActivateDeactiveRenew(AListBox: TListBox);
+    procedure ViewInfo(Sender: TObject);
+    procedure mnuViewInformationClick(Sender: TObject);
+    procedure mnuOptimizeFieldsClick(Sender: TObject);
+    procedure hdrMedsOutSectionClick(HeaderControl: THeaderControl;
+      Section: THeaderSection);
+    procedure hdrMedsNonVASectionClick(HeaderControl: THeaderControl;
+      Section: THeaderSection);
+    procedure hdrMedsInSectionClick(HeaderControl: THeaderControl;
+      Section: THeaderSection);
   private
     FIterating: Boolean;
@@ -138,6 +170,7 @@
     function GetMedList(Control: TWinControl): TList;
     function GetPharmacyOrders(Control: TWinControl): TStringList;
+    function PatientStatusChanged: boolean;
+    procedure ClearChildODList;
   public
-    function PctOfTotalHeight(thisPanel: TPanel) : integer;
     procedure RefreshMedLists;
     procedure ClearPtData; override;
@@ -148,5 +181,13 @@
     property ParentComplexOrderID: string read FParentComplexOrderID  write FParentComplexOrderID;
     procedure InitfMedsSize;
-  end;
+    procedure SetSectionWidths(Sender: TObject);
+    function GetTotalSectionsWidth(Sender: TObject) : integer;
+    function CheckMedStatus(ActiveList: TListBox): boolean;
+  end;
+
+type
+  arOrigOutPtSecWidths = array[0..6] of integer; //CQ7586
+  arOrigInPtSecWidths = array[0..4] of integer; //CQ7586
+  arOrigNonVASecWidths = array[0..3] of integer; //CQ7586
 
 var
@@ -154,4 +195,9 @@
 //  LargePanelPortion: Integer;
 //  SmallPanelPortion: integer;
+
+  OrigOutPtSecWidths: arOrigOutPtSecWidths; //CQ7586
+  OrigInPtSecWidths : arOrigInPtSecWidths; //CQ7586
+  OrigNonVASecWidths: arOrigNonVASecWidths; //CQ7586
+
   MedOutSize:  double;
   s: string;
@@ -161,7 +207,4 @@
 
   totalHeight: integer;
-  MedOutPctOfTotalHeight: integer;
-  NonVAPctOfTotalHeight: integer;
-  MedInpctOfTotalHeight : integer;
 
   resizedTotalHeight: integer;
@@ -171,14 +214,20 @@
 
   splitterTop: TSplitter;
-  splitterBottom: TSplitter;  
+  splitterBottom: TSplitter;
+
+  oldFont: integer; //CQ9182
+
 
 implementation
 
-uses uCore, fFrame, fRptBox, uOrders, fODBase, fOrdersDC, fOrdersHold,
-     fOrdersRenew, fOMNavA, fOrdersRefill, fMedCopy, fOrders, fODChild, rODBase;
+uses uCore, rCore, fFrame, fRptBox, uOrders, fODBase, fOrdersDC, fOrdersHold,
+     fOrdersRenew, fOMNavA, fOrdersRefill, fMedCopy, fOrders, fODChild, rODBase, 
+     StrUtils, fActivateDeactivate;
 
 {$R *.DFM}
 
 const
+  SMALL_PANEL = 20;
+  LARGE_PANEL = 60;
   COL_MEDNAME = 1;
   DG_OUT = 0;
@@ -215,4 +264,5 @@
 begin
   inherited ClearPtData;
+  ClearChildODList;
   lstMedsIn.Clear;
   lstMedsOut.Clear;
@@ -225,4 +275,5 @@
   uPharmacyOrdersOut.Clear;
   uMedListNonVA.Clear;
+  totalHeight := 0;
 
 end;
@@ -231,4 +282,6 @@
 const
  RATIO_SMALL = 0.13; //0.1866;
+
+
 begin
   inherited DisplayPage;
@@ -251,36 +304,46 @@
 
   if Patient.Inpatient then
-     begin
+  begin
      splitBottom.Align := alNone;
-     hdrMedsIn.Align := alNone;
-
-     lstMedsIn.Parent := pnlTop;
-     lstMedsIn.Align := alClient;
+     hdrMedsIn.Align  := alNone;
+     lstMedsIn.Align   := alNone;
+
+     lstMedsIn.Parent  := pnlTop;
+     lstMedsIn.Align   := alClient;
      lstMedsOut.Parent := pnlMedIn;
 
-     hdrMedsIn.Parent := pnlTop;
-     hdrMedsIn.Align := alTop;
+     hdrMedsIn.Parent  := pnlTop;
+     hdrMedsIn.Align   := alTop;
 
      hdrMedsOut.Parent := pnlMedIn;
-     splitBottom.Align     := alBottom;
-     end
+     splitBottom.Align := alBottom;
+
+     lstMedsIn.Height  := lstMedsIn.Height - 1; // added to cause repaint if user makes area small
+     lstMedsIn.Height  := lstMedsIn.Height + 1; // added to cause repaint if user makes area small.
+     lstMedsOut.Height := lstMedsOut.Height + 1;  // added to cause repaint if user makes area small
+     lstMedsOut.Height := lstMedsOut.Height - 1; // added to cause repaint if user makes area small
+
+  end
   else
      begin
-     splitBottom.Align := alNone;
-     hdrMedsIn.Align := alNone;
-
-     lstMedsIn.Parent := pnlMedIn;
-     lstMedsOut.Parent := pnlTop;
-     lstMedsOut.Align := alClient;
-
-     hdrMedsIn.Parent := pnlMedIn;
-     hdrMedsIn.Align := alTop;
-
-     hdrMedsOut.Parent := pnlTop;
-     splitBottom.Align     := alBottom;
+        splitBottom.Align := alNone;
+        hdrMedsIn.Align   := alNone;
+
+        lstMedsIn.Parent  := pnlMedIn;
+        lstMedsOut.Parent := pnlTop;
+        lstMedsOut.Align  := alClient;
+
+        hdrMedsIn.Parent  := pnlMedIn;
+        hdrMedsIn.Align   := alTop;
+
+        hdrMedsOut.Parent := pnlTop;
+        splitBottom.Align := alBottom;
+
+        lstMedsIn.Height  := lstMedsIn.Height - 1; // added to cause repaint if user makes area small
+        lstMedsIn.Height  := lstMedsIn.Height + 1; // added to cause repaint if user makes area small.
+        lstMedsOut.Height := lstMedsOut.Height + 1;  // added to cause repaint if user makes area small
+        lstMedsOut.Height := lstMedsOut.Height - 1; // added to cause repaint if user makes area small
      end;
-
-
-  RefreshMedLists;
+   RefreshMedLists;
 
 end;
@@ -332,6 +395,9 @@
   if AnOrder <> nil then
   begin
+    //AGP Change 26.24 CQ 7150 fixes the problem with non-va meds initially showing up in the inpatient section
     if uDGrp[DG_OUT] = AnOrder.DGroup then AMedList := uMedListOut;
-    for i := 1 to 6 do if uDGrp[i] = AnOrder.DGroup then AMedList := uMedListIn;
+    If uDGrp[DG_NVA] = AnOrder.DGroup then AMedList := uMedListNonVA;
+    if (AMedList <> uMedListOut) and (AMedList <> uMedListNonVA) then
+      for i := 1 to 6 do if uDGrp[i] = AnOrder.DGroup then AMedList := uMedListIn;
   end;
   case OrderAction of
@@ -409,5 +475,6 @@
       end
       else uPendingChanges.Add(Piece(AnOrder.ActionOn, ';', 1) + '=' +
-                               Piece(AnOrder.ActionOn, '=', 2) + U + AnOrder.ID + '^^' + AnOrder.OrderLocName);
+              Piece(AnOrder.ActionOn, '=', 2) + U + AnOrder.ID + '^^' + AnOrder.OrderLocName);
+
     end; {if AMedList}
   ORDER_CPLXRN:
@@ -450,4 +517,5 @@
 begin
   inherited SetFontSize(FontSize);
+  mnuOptimizeFieldsClick(self);
   if Patient.DFN <> '' then
     RefreshMedLists;
@@ -459,5 +527,4 @@
 var
  medsSplitFnd : boolean;
-  panelBottom, panelMedIn : integer;
   retList : TStringList;
   i: integer;
@@ -486,5 +553,6 @@
   ChildODList := TStringList.Create;
 
-  
+
+
   //DETECT 1st TIME USER.
   //If first time user (medSplitFound=false), then manually set panel heights.
@@ -501,5 +569,5 @@
         if strPos(PChar(x),PChar(MEDS_SPLIT_FORM)) <> nil then
            begin
-           medsSplitFnd := TRUE;
+           medsSplitFnd := False;//TRUE;
            Break;
            end;
@@ -510,11 +578,24 @@
           pnlBottom.Height := frmMeds.Height div 2;
           pnlMedIn.Height := pnlBottom.Height div 2;
-          panelBottom := pnlBottom.Height;
-          panelMedIn  := pnlMedIn.Height;
         end;
      end;
 
-
-
+  //CQ9622
+  if hdrMedsIn.Sections[1].Width < 100 then
+     begin
+     hdrMedsIn.Sections[1].Width := 100;
+     hdrMedsIn.Refresh;
+     end;
+  if hdrMedsNonVA.Sections[1].Width < 100 then
+     begin
+     hdrMedsNonVA.Sections[1].Width := 100;
+     lstMedsNonVA.Refresh;
+     end;
+  if hdrMedsOut.Sections[1].Width < 100 then
+     begin
+     hdrMedsOut.Sections[1].Width := 100;
+     hdrMedsOut.Refresh;
+     end;
+  //end CQ9622
 end;
 
@@ -522,4 +603,5 @@
 begin
   inherited;
+  ClearChildODList;
   ClearMedList(uMedListIn);
   ClearMedList(uMedListOut);
@@ -706,9 +788,10 @@
   result := '';
   Detail := '';
+  if AMed.Status = 'Suspended' then AMed.Status := 'Active/Susp'; //HDS00007547	PSI-03-033 Interim Solution.
   case Column of
     0: result := GetActionText(AMed);
     1: result := GetInstructText(AMed, Detail);
     2: result := FormatFMDateTime('mm/dd/yy', AMed.StopDate);
-    3: result := AMed.Status;
+    3: result :=  AMed.Status;
     4:
      begin
@@ -748,5 +831,6 @@
     TAG_INPT:  result := hdrMedsIn;
 
-    else       result := nil;
+    else       
+    result := nil;
   end;
 end;
@@ -758,5 +842,6 @@
     TAG_NONVA: result := uMedListNonVA;
     TAG_INPT:  result := uMedListIn;
-    else       result := nil;
+    else
+    result := nil;
   end;
 end;
@@ -768,5 +853,5 @@
     TAG_NONVA: result := uNonVAOrdersOut;
     TAG_INPT:  result := uPharmacyOrdersIn;
-  else       
+  else
      result := nil;
   end;
@@ -813,6 +898,5 @@
 end;
 
-procedure TfrmMeds.lstMedsDrawItem(Control: TWinControl; Index: Integer; Rect: TRect;
-  State: TOwnerDrawState);
+procedure TfrmMeds.lstMedsDrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);
 var
   ReturnHt: Integer;
@@ -838,5 +922,13 @@
       begin
         Canvas.Font.Style := [fsBold];
-        if ColorToRGB(clWindowText) = ColorToRGB(clBlack) then
+        //AGP Change 26.29 CQ #8188 Fix for highlighted new meds displaying blue font with a blue background.
+        if odSelected in State  then
+            begin
+              Canvas.Brush.Color := clHighlight;
+              Canvas.Font.Color := clHighlightText;
+              //Canvas.FillRect(ARect);
+              Canvas.Font.Color := clWhite;
+           end;
+        if (ColorToRGB(clWindowText) = ColorToRGB(clBlack)) and (Canvas.Font.Color <> clWhite) then
           Canvas.Font.Color := clBlue;
         if (Length(Piece(AnAction,'^',4)) > 0) then
@@ -851,5 +943,9 @@
           ARect := ItemRect(Index);
           ARect.Left  := RectLeft + 2;
-          ARect.Right := ARect.Left + AHeader.Sections[i].Width - 6;
+          ARect.Right := (ARect.Left + AHeader.Sections[i].Width - 6);
+
+          //if ((ARect.Right - ARect.Left) < 100) then
+              //ARect.Right := ARect.Right + (100 - (ARect.Left + AHeader.Sections[i].Width - 6));
+
           ReturnHt  := DrawText(Canvas.Handle, PChar(x), Length(x), ARect, DT_LEFT or DT_NOPREFIX
                         or DT_WORDBREAK);
@@ -884,4 +980,6 @@
 begin
   inherited;
+  
+  if PatientStatusChanged then exit;
   with lstMedsOut do for i := 0 to Items.Count -1 do
     Selected[i] := false;
@@ -895,4 +993,6 @@
 begin
   inherited;
+ 
+  if PatientStatusChanged then exit;
   with lstMedsIn do for i := 0 to Items.Count -1 do
     Selected[i] := false;
@@ -901,6 +1001,5 @@
 end;
 
-procedure TfrmMeds.hdrMedsOutSectionResize(HeaderControl: THeaderControl;
-  Section: THeaderSection);
+procedure TfrmMeds.hdrMedsOutSectionResize(HeaderControl: THeaderControl; Section: THeaderSection);
 begin
   inherited;
@@ -916,6 +1015,5 @@
 end;
 
-procedure TfrmMeds.hdrMedsInSectionResize(HeaderControl: THeaderControl;
-  Section: THeaderSection);
+procedure TfrmMeds.hdrMedsInSectionResize(HeaderControl: THeaderControl; Section: THeaderSection);
 begin
   inherited;
@@ -926,4 +1024,5 @@
     IntegralHeight := not IntegralHeight;  // listbox window to be recreated
   end;
+
   RedrawActivate(Self.Handle);
   lstMedsIn.Invalidate;
@@ -936,5 +1035,5 @@
 begin
   inherited;
-  //frmFrame.UpdatePtInfoOnRefresh;
+  if PatientStatusChanged then exit;
   if lstMedsOut.SelCount > 0 then
   begin
@@ -972,4 +1071,5 @@
     begin
       ValidateSelected(ActiveList, OA_DC, TX_NO_DC, TC_NO_DC);
+      //ActivateDeactiveRenew(ActiveList); AGP 26.53 TURN OFF UNTIL FINAL DECISION CAN BE MADE
       MakeSelectedList(ActiveList, SelectedList);
       if ExecuteDCOrders(SelectedList,DelEvt) then
@@ -999,4 +1099,5 @@
   if ActiveList = nil then Exit;
   SelectedList := TList.Create;
+  if CheckMedStatus(ActiveList) = True then Exit;
   try
     FIterating := True;
@@ -1034,4 +1135,5 @@
   try
     FIterating := True;
+    if CheckMedStatus(ActiveList) = True then Exit;
     if AuthorizedUser and EncounterPresent and LockedForOrdering then
     begin
@@ -1084,4 +1186,7 @@
   ChangeIFNList := TStringList.Create;
   try
+    FIterating := true;
+    if CheckMedStatus(ActiveList) = True then Exit;
+    ValidateSelected(ActiveList, OA_CHANGE, TX_NO_CHANGE, TC_NO_CHANGE);
     MakeSelectedList(Activelist, SelectedList);
     with SelectedList do for i := 0 to Count - 1 do ChangeIFNList.Add(TOrder(Items[i]).ID);
@@ -1136,4 +1241,5 @@
   DoesDestEvtOccur := False;
   ActiveList := ListSelected(TX_NOSEL);
+  if CheckMedStatus(ActiveList) = True then Exit;
   if ActiveList = nil then Exit;
   NewOrderCreated := False;
@@ -1296,4 +1402,5 @@
   if ActiveList = nil then Exit;
   SelectedList := TList.Create;
+  if CheckMedStatus(ActiveList) = True then Exit;
   try
     FIterating := True;
@@ -1344,5 +1451,5 @@
        begin
          Selected[i] := False;
-         MessageDlg('You can not renew inpatient medication order on a clinic location for selected inpatient.', mtWarning, [mbOK], 0);
+         MessageDlg('You cannot renew inpatient medication orders from a clinic location for selected patient.', mtWarning, [mbOK], 0);
        end;
     CurID := uPendingChanges.Values[Piece(Piece(SomePharmacyOrders[i], U, 2), ';', 1)];
@@ -1412,5 +1519,4 @@
         end;
       end;
-      idx := -1;
       idx := ChildODList.IndexOf(AnOrder.ID);
       if idx > - 1 then
@@ -1426,38 +1532,12 @@
 
 procedure TfrmMeds.SynchListToOrders(AListBox: TListBox; AList: TList);
-{ shows selected med orders as selected }
-//var
-//  i, j: Integer;
-//  AMedListRec: TMedListRec;
-//  AnOrder: TOrder;
-begin
-//  with AListBox do for i := 0 to Items.Count - 1 do
-//  begin
-//    AMedListRec := TMedListRec(AListBox.Items.Objects[i]);
-//    with AList do for j := 0 to Count - 1 do
-//    begin
-//      AnOrder := TOrder(AList.Items[j]);
-//      if Piece(AMedListRec.OrderID, ';', 1) = Piece(AnOrder.ID, ';', 1) then
-//      begin
-//        //AMedListRec.Instruct := AMedListRec.Instruct + ' * EDITED *';
-//        //AMedListRec.Action := MED_NEW;  //*KCM*
-//        //AListBox.Selected[i] := True;   // resets valid selections to indicate changes  //*KCM*
-//      end;
-//    end;
-//  end;
+begin
   AListBox.Invalidate;
 end;
 
-procedure TfrmMeds.pnlMedOut1Resize(Sender: TObject);
-begin
-  inherited;
-  //if pnlMedOut.Height < 20 then pnlMedOut.Height := 20;
-end;
-
-
 procedure TfrmMeds.popMedPopup(Sender: TObject);
 begin
   inherited;
-  //frmFrame.UpdatePtInfoOnRefresh;
+  if PatientStatusChanged then exit;
 end;
 
@@ -1465,5 +1545,5 @@
 begin
   inherited;
-  //frmFrame.UpdatePtInfoOnRefresh;
+  if PatientStatusChanged then exit;  
 end;
 
@@ -1473,4 +1553,5 @@
 begin
   inherited;
+  if PatientStatusChanged then exit;  
   with lstMedsIn do for i := 0 to Items.Count -1 do
      Selected[i] := false;
@@ -1491,6 +1572,5 @@
 end;
 
-procedure TfrmMeds.hdrMedsNonVASectionResize(HeaderControl: THeaderControl;
-  Section: THeaderSection);
+procedure TfrmMeds.hdrMedsNonVASectionResize(HeaderControl: THeaderControl; Section: THeaderSection);
 begin
   inherited;
@@ -1506,21 +1586,38 @@
 end;
 
-function TfrmMeds.PctOfTotalHeight(thisPanel: TPanel) : integer;
-var
-  pctOfTotal: real;
-begin
-  pctOfTotal := ((thisPanel.Height / totalHeight) * 100);
-  Result := Round(pctOfTotal);
+function FontChanged : boolean;
+//CQ9182:  SEE ALSO procedure TfrmFrame.mnuFontSizeClick()
+begin
+  Result := false;
+  if Assigned(frmMeds) then
+  begin
+     if fMeds.oldFont = 0 then Result := False
+     else
+        if (fMeds.oldFont <> MainFontSize)  then
+           Result := true;
+  end;
 end;
 
 procedure TfrmMeds.FormResize(Sender: TObject);
+var
+ maxPanelHeight: integer;
+
 begin
   inherited;
   if Assigned(frmMeds) then
+  begin
+    //CQ9522 v26.51 Make sure all three panels are visible regardless of font size
+    if Assigned(self.Parent) then
      begin
-     //Adjust splitter positions to always be in view, regardless of window size
-     if (pnlBottom.Height > frmMeds.Height-50) then pnlBottom.Height := frmMeds.Height-50;
-     if (pnlMedIn.Height > pnlBottom.Height-50) then pnlMedIn.Height := pnlBottom.Height-50;
-     end;
+      if self.Height > parent.ClientHeight then
+         self.Height := parent.ClientHeight;
+      maxPanelHeight := round((parent.ClientHeight-20)/3);
+      if pnlTop.Height + pnlBottom.Height > parent.ClientHeight then
+        begin
+          pnlBottom.Height := maxPanelHeight*2;
+          pnlTop.Height := maxPanelHeight;
+        end;
+     end;    //assigned(self.parent)
+  end;
 end;
 
@@ -1537,9 +1634,8 @@
   inherited;
   with hdrMedsOut do
-     begin
-     if Height < 16 then Height := 16;
-     if Height > 16 then Height := 16;
+  begin
+     Height := TextHeightByFont(Font.Handle, Sections[0].Text);
      Invalidate;
-     end;
+  end;
 end;
 
@@ -1548,9 +1644,8 @@
   inherited;
   with hdrMedsNonVA do
-     begin
-     if Height < 16 then Height := 16;
-     if Height > 16 then Height := 16;
+  begin
+     Height := TextHeightByFont(Font.Handle, Sections[0].Text);
      Invalidate;
-     end;
+  end;
 end;
 
@@ -1559,9 +1654,8 @@
   inherited;
   with hdrMedsIn do
-     begin
-     if Height < 16 then Height := 16;
-     if Height > 16 then Height := 16;
+  begin
+     Height := TextHeightByFont(Font.Handle, Sections[0].Text);
      Invalidate;
-     end;
+  end;
 end;
 
@@ -1581,5 +1675,5 @@
 begin
   inherited;
-  if splitBottom.Height > 5 then splitBottom.Height := 5;
+  splitBottom.Height := 5;
 end;
 
@@ -1587,5 +1681,5 @@
 begin
   inherited;
-  if splitTop.Height > 5 then splitTop.Height := 5;
+   splitTop.Height := 5;
 end;
 
@@ -1612,5 +1706,5 @@
         x := retList.strings[i];
         if strPos(PChar(x),PChar(MEDS_SPLIT_FORM)) <> nil then
-           begin
+        begin
            medsSplitFnd := TRUE;
            Break;
@@ -1631,4 +1725,331 @@
 end;
 
+function TfrmMeds.PatientStatusChanged: boolean;
+const
+
+  msgTxt1 = 'Patient status was changed from ';
+  msgTxt2 = 'CPRS needs to refresh patient information to display patient latest record.';
+   //GE CQ9537  - Change message text
+  msgTxt3 = 'Patient has been admitted.';
+  msgTxt4 = CRLF +'You will be prompted to sign your orders.  Any new orders subsequently' +
+            CRLF + 'entered and signed will be directed to the inpatient staff.';
+
+var
+  PtSelect: TPtSelect;
+  IsInpatientNow: boolean;
+  ptSts: string;
+begin
+  result := False;
+  SelectPatient(Patient.DFN, PtSelect);
+  IsInpatientNow := Length(PtSelect.Location) > 0;
+   //GE CQ9537  - Change message text
+  if Patient.Inpatient <> IsInpatientNow then
+  begin
+    if (not Patient.Inpatient) then MessageDlg(msgTxt3 + msgTxt4, mtWarning, [mbOK], 0);
+    if Patient.Inpatient then ptSts := 'Inpatient to Outpatient.';
+    MessageDlg(msgTxt1 + ptSts + #13#10#13 + msgTxt2, mtWarning, [mbOK], 0);
+    frmFrame.mnuFileRefreshClick(Application);
+    Result := True;
+  end;
+end;
+
+function TfrmMeds.GetTotalSectionsWidth(Sender: TObject) : integer;
+//CQ7586
+//Return stored values of column widths
+var
+  i: integer;
+begin
+  Result := 0;
+
+  if (Sender as THeaderControl).Name = 'hdrMedsOut' then
+     for i := 0 to hdrMedsOut.Sections.Count - 1 do
+        Result := Result + hdrMedsOut.Sections[i].Width;
+
+  if (Sender as THeaderControl).Name = 'hdrMedsIn' then
+     for i := 0 to hdrMedsIn.Sections.Count - 1 do
+        Result := Result + hdrMedsIn.Sections[i].Width;
+
+  if (Sender as THeaderControl).Name = 'hdrMedsNonVA' then
+     for i := 0 to hdrMedsNonVA.Sections.Count - 1 do
+        Result := Result + hdrMedsNonVA.Sections[i].Width;
+end;
+
+procedure TfrmMeds.SetSectionWidths(Sender: TObject);
+//CQ7586
+//Copy values of column widths into array variables.
+var
+  i: integer;
+begin
+  if (Sender as THeaderControl).Name = 'hdrMedsOut' then
+     for i := 0 to hdrMedsOut.Sections.Count - 1 do
+        OrigOutPtSecWidths[i] := hdrMedsOut.Sections[i].Width;
+
+  if (Sender as THeaderControl).Name = 'hdrMedsIn' then
+     for i := 0 to hdrMedsIn.Sections.Count - 1 do
+        OrigInPtSecWidths[i] := hdrMedsIn.Sections[i].Width;
+
+  if (Sender as THeaderControl).Name = 'hdrMedsNonVA' then
+     for i := 0 to hdrMedsNonVA.Sections.Count - 1 do
+        OrigNonVASecWidths[i] := hdrMedsNonVA.Sections[i].Width;
+end;
+
+procedure TfrmMeds.hdrMedsOutMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+begin
+  inherited;
+  Self.SetSectionWidths(Sender); //CQ7586
+end;
+
+procedure TfrmMeds.hdrMedsNonVAMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+begin
+  inherited;
+  Self.SetSectionWidths(Sender); //CQ7586
+end;
+
+procedure TfrmMeds.hdrMedsInMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+begin
+  inherited;
+  Self.SetSectionWidths(Sender); //CQ7586
+end;
+
+procedure TfrmMeds.hdrMedsOutMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+//CQ7586
+var
+  i: integer;
+  totalSectionsWidth, originalwidth: integer;
+begin
+  inherited;
+  totalSectionsWidth := Self.GetTotalSectionsWidth(Sender);
+  if totalSectionsWidth > lstMedsOut.Width - 5 then  //could used any of the three list boxes here, since all are same width
+  begin
+    originalwidth := 0;
+    for i := 0 to hdrMedsOut.Sections.Count - 1 do
+      originalwidth := originalwidth + OrigOutPtSecWidths[i];
+    if originalwidth < totalSectionsWidth then
+    begin
+      for i := 0 to hdrMedsOut.Sections.Count - 1 do
+        hdrMedsOut.Sections[i].Width := OrigOutPtSecWidths[i];
+      lstMedsOut.Invalidate;
+    end;
+  end;
+  //CQ9622
+  if hdrMedsOut.Sections[1].Width < 100 then
+  begin
+    hdrMedsOut.Sections[1].Width := 100;
+    lstMedsOut.Refresh;
+  end;
+  //end CQ9622
+  pnlBottom.Height := pnlBottom.Height - 1;  // forces autopanel resize
+  pnlBottom.Height := pnlBottom.Height + 1;  // forces autopanel resize
+end;
+
+procedure TfrmMeds.hdrMedsNonVAMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+//CQ7586
+var
+  i: integer;
+  totalSectionsWidth, originalwidth: integer;
+begin
+  inherited;
+  totalSectionsWidth := Self.GetTotalSectionsWidth(Sender);
+  if totalSectionsWidth > lstMedsNonVA.Width - 5 then  //could used any of the three list boxes here, since all are same width
+  begin
+    originalwidth := 0;
+    for i := 0 to hdrMedsNonVA.Sections.Count - 1 do
+      originalwidth := originalwidth + OrigNonVASecWidths[i];
+    if originalwidth < totalSectionsWidth then
+    begin
+      for i := 0 to hdrMedsNonVA.Sections.Count - 1 do
+        hdrMedsNonVA.Sections[i].Width := OrigNonVASecWidths[i];
+      lstMedsNonVA.Invalidate;
+    end;
+  end;
+  //CQ9622
+  if hdrMedsNonVA.Sections[1].Width < 100 then
+  begin
+    hdrMedsNonVA.Sections[1].Width := 100;
+    lstMedsNonVA.Refresh;
+  end;
+  //end CQ9622
+  pnlNonVA.Height := pnlNonVA.Height - 1;  // forces autopanel resize
+  pnlNonVA.Height := pnlNonVA.Height + 1;  // forces autopanel resize
+end;
+
+procedure TfrmMeds.hdrMedsInMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+//CQ7586
+var
+  i: integer;
+  totalSectionsWidth, originalwidth: integer;
+begin
+  inherited;
+  totalSectionsWidth := Self.GetTotalSectionsWidth(Sender);
+  if totalSectionsWidth > lstMedsIn.Width - 5 then  //could used any of the three list boxes here, since all are same width
+  begin
+    originalwidth := 0;
+    for i := 0 to hdrMedsIn.Sections.Count - 1 do
+      originalwidth := originalwidth + OrigInPtSecWidths[i];
+    if originalwidth < totalSectionsWidth then
+    begin
+      for i := 0 to hdrMedsIn.Sections.Count - 1 do
+        hdrMedsIn.Sections[i].Width := OrigInPtSecWidths[i];
+      lstMedsIn.Invalidate;
+    end;
+  end;
+  //CQ9622
+  if hdrMedsIn.Sections[1].Width < 100 then
+  begin
+    hdrMedsIn.Sections[1].Width := 100;
+    lstMedsIn.Refresh;
+  end;
+  //end CQ9622
+  pnlBottom.Height := pnlBottom.Height - 1;  // forces autopanel resize
+  pnlBottom.Height := pnlBottom.Height + 1;  // forces autopanel resize
+end;
+
+procedure TfrmMeds.ClearChildODList;
+var
+  i: integer;
+begin
+  for i := 0 to ChildODList.count-1 do
+    if(assigned(ChildODList.Objects[i])) then
+      ChildODList.Objects[i].Free;
+  ChildODList.Clear;
+end;
+
+function TfrmMeds.CheckMedStatus(ActiveList: TListBox): boolean;
+var
+i: integer;
+tmpList: TStringList;
+Str: string;
+AMed: TMedListRec;
+AMedList: TList;
+
+begin
+ result := False;
+ tmpList:= TStringList.Create;
+ if TMedListRec = nil then exit;
+ AMedList := GetMedList(ActiveList);
+ for i := 0 to ActiveList.Count - 1 do if ActiveList.Selected[i] then
+    begin
+       AMed := TMedListRec(AMedList[i]);
+       str := Amed.PharmID + U + AMed.Status;
+       tmpList.Add(Str);
+      end;
+ if tmpList <> nil then
+   begin
+     Result := GetMedStatus(tmpList);
+     tmpList.Free;
+   end;
+ if Result = True then
+     begin
+       MessageDlg('The Medication status has change.' + #13#10#13 + 'CPRS needs to refresh patient information to display the correct medication status', mtWarning, [mbOK], 0);
+       frmFrame.mnuFileRefreshClick(Application);
+     end;
+end;
+
+(*procedure TfrmMeds.ActivateDeactiveRenew(AListBox: TListBox);
+var
+  i: Integer;
+  CurID: string;
+  SomePharmacyOrders: TStringList;
+  tmpArr: TStringList;
+begin
+    tmpArr := TStringList.Create;
+    SomePharmacyOrders := GetPharmacyOrders(AListBox);
+    with AListBox do for i := 0 to Items.Count - 1 do if Selected[i] then
+      begin
+        CurID := uPendingChanges.Values[Piece(Piece(SomePharmacyOrders[i], U, 2), ';', 1)];
+        if Length(CurID) > 0 then CurID := Piece(CurID, U, 2)
+        else CurID := Piece(SomePharmacyOrders[i], U, 2);
+        tmpArr.Add(curID);
+      end;
+    if tmpArr <> nil then frmActivateDeactive.fActivateDeactive(tmpArr, AListBox);
+end; *)
+
+procedure TfrmMeds.ViewInfo(Sender: TObject);
+begin
+  inherited;
+  frmFrame.ViewInfo(Sender);
+end;
+
+procedure TfrmMeds.mnuViewInformationClick(Sender: TObject);
+begin
+  inherited;
+  mnuViewDemo.Enabled := frmFrame.pnlPatient.Enabled;
+  mnuViewVisits.Enabled := frmFrame.pnlVisit.Enabled;
+  mnuViewPrimaryCare.Enabled := frmFrame.pnlPrimaryCare.Enabled;
+  mnuViewMyHealtheVet.Enabled := not (Copy(frmFrame.laMHV.Hint, 1, 2) = 'No');
+  mnuInsurance.Enabled := not (Copy(frmFrame.laVAA2.Hint, 1, 2) = 'No');
+  mnuViewFlags.Enabled := frmFrame.lblFlag.Enabled;
+  mnuViewRemoteData.Enabled := frmFrame.lblCirn.Enabled;
+  mnuViewReminders.Enabled := frmFrame.pnlReminders.Enabled;
+  mnuViewPostings.Enabled := frmFrame.pnlPostings.Enabled;
+end;
+
+procedure TfrmMeds.mnuOptimizeFieldsClick(Sender: TObject);
+var
+  totalSectionsWidth, unit1, unit2, unit8: integer;
+begin
+  totalSectionsWidth := pnlTop.Width - 5;
+  if totalSectionsWidth < 16 then exit;
+  unit1 := (totalSectionsWidth div 16) - 1;
+  unit2 := unit1 * 2;
+  unit8 := unit1 * 8;
+
+  with hdrMedsNonVA do
+  begin
+    Sections[0].Width := unit1;
+    Sections[1].Width := unit8;
+    Sections[2].Width := unit2;
+    Sections[3].Width := unit2;
+  end;
+  hdrMedsNonVASectionResize(hdrMedsNonVA, hdrMedsNonVA.Sections[0]);
+  hdrMedsNonVA.Repaint;
+
+  with hdrMedsIn do
+  begin
+    Sections[0].Width := unit1;
+    Sections[1].Width := unit8;
+    Sections[2].Width := unit2;
+    Sections[3].Width := unit2;
+    Sections[4].Width := unit2;
+  end;
+  hdrMedsInSectionResize(hdrMedsIn, hdrMedsIn.Sections[0]);
+  hdrMedsIn.Repaint;
+  with hdrMedsOut do
+  begin
+    Sections[0].Width := unit1;
+    Sections[1].Width := unit8;
+    Sections[2].Width := unit2;
+    Sections[3].Width := unit2;
+    Sections[4].Width := unit2;
+    Sections[5].Width := unit1;
+  end;
+  hdrMedsOutSectionResize(hdrMedsOut, hdrMedsOut.Sections[0]);
+  hdrMedsOut.Repaint;
+end;
+
+procedure TfrmMeds.hdrMedsOutSectionClick(HeaderControl: THeaderControl;
+  Section: THeaderSection);
+begin
+  inherited;
+  //if Section = hdrMedsOut.Sections[1] then
+    mnuOptimizeFieldsClick(self);
+end;
+
+procedure TfrmMeds.hdrMedsNonVASectionClick(HeaderControl: THeaderControl;
+  Section: THeaderSection);
+begin
+  inherited;
+  //if Section = hdrMedsNonVA.Sections[1] then
+    mnuOptimizeFieldsClick(self);
+end;
+
+procedure TfrmMeds.hdrMedsInSectionClick(HeaderControl: THeaderControl;
+  Section: THeaderSection);
+begin
+  inherited;
+  //if Section = hdrMedsIn.Sections[1] then
+    mnuOptimizeFieldsClick(self);
+end;
+
 end.
 
Index: cprs/branches/foia-cprs/CPRS-Chart/fNoteProps.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fNoteProps.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fNoteProps.dfm	(revision 460)
@@ -1,9 +1,9 @@
 object frmNoteProperties: TfrmNoteProperties
-  Left = 176
-  Top = 204
+  Left = 384
+  Top = 56
   AutoScroll = False
   BorderIcons = []
   Caption = 'Progress Note Properties'
-  ClientHeight = 371
+  ClientHeight = 676
   ClientWidth = 543
   Color = clBtnFace
@@ -16,4 +16,5 @@
   OldCreateOrder = False
   Position = poScreenCenter
+  OnDestroy = FormDestroy
   OnResize = FormResize
   OnShow = FormShow
@@ -106,4 +107,5 @@
     OnMouseClick = cboNewTitleMouseClick
     OnNeedData = cboNewTitleNeedData
+    CharsNeedMatch = 1
   end
   object calNote: TORDateBox
@@ -145,4 +147,5 @@
     OnMouseClick = cboAuthorMouseClick
     OnNeedData = NewPersonNeedData
+    CharsNeedMatch = 1
   end
   object cboCosigner: TORComboBox
@@ -171,4 +174,5 @@
     OnExit = cboCosignerExit
     OnNeedData = cboCosignerNeedData
+    CharsNeedMatch = 1
   end
   object cmdOK: TButton
@@ -179,5 +183,5 @@
     Caption = 'OK'
     Default = True
-    TabOrder = 8
+    TabOrder = 9
     OnClick = cmdOKClick
   end
@@ -189,5 +193,5 @@
     Cancel = True
     Caption = 'Cancel'
-    TabOrder = 9
+    TabOrder = 10
     OnClick = cmdCancelClick
   end
@@ -218,4 +222,5 @@
     SynonymChars = '<>'
     TabOrder = 4
+    CharsNeedMatch = 1
   end
   object calProcDateTime: TORDateBox
@@ -233,7 +238,8 @@
     Tag = 2
     Left = 0
-    Top = 218
+    Top = 217
     Width = 543
     Height = 153
+    Align = alBottom
     BevelOuter = bvNone
     TabOrder = 6
@@ -316,12 +322,13 @@
     Tag = 1
     Left = 0
-    Top = 218
+    Top = 370
     Width = 543
     Height = 153
+    Align = alBottom
     BevelOuter = bvNone
     TabOrder = 7
     object lblConsult1: TLabel
       Tag = 1
-      Left = 26
+      Left = 3
       Top = 8
       Width = 309
@@ -339,5 +346,5 @@
     object lblConsult2: TLabel
       Tag = 1
-      Left = 26
+      Left = 3
       Top = 22
       Width = 247
@@ -408,8 +415,9 @@
       Pieces = '2,3,4,5,6'
       TabPositions = '21,43,69,83'
+      OnChange = lstRequestsChange
     end
     object btnShowList: TButton
-      Left = 386
-      Top = 12
+      Left = 335
+      Top = 13
       Width = 100
       Height = 21
@@ -418,4 +426,82 @@
       OnClick = btnShowListClick
     end
+    object btnDetails: TButton
+      Left = 450
+      Top = 13
+      Width = 75
+      Height = 21
+      Caption = 'Show Details'
+      TabOrder = 2
+      OnClick = btnDetailsClick
+    end
+  end
+  object pnlPRF: TORAutoPanel
+    Tag = 3
+    Left = 0
+    Top = 523
+    Width = 543
+    Height = 153
+    Align = alBottom
+    BevelOuter = bvNone
+    TabOrder = 8
+    object lblPRF: TLabel
+      Tag = 1
+      Left = 2
+      Top = 16
+      Width = 304
+      Height = 13
+      Caption = 'Which Patient Record Flag Action should this Note be linked to?'
+      Font.Charset = DEFAULT_CHARSET
+      Font.Color = clWindowText
+      Font.Height = -11
+      Font.Name = 'MS Sans Serif'
+      Font.Style = []
+      ParentFont = False
+    end
+    object Bevel1: TBevel
+      Tag = 1
+      Left = 1
+      Top = 2
+      Width = 531
+      Height = 2
+    end
+    object lvPRF: TCaptionListView
+      Left = 0
+      Top = 32
+      Width = 543
+      Height = 121
+      Align = alBottom
+      Columns = <
+        item
+          Caption = 'Used For Screen Readers'
+          Width = 1
+        end
+        item
+          AutoSize = True
+          Caption = 'Flag'
+        end
+        item
+          AutoSize = True
+          Caption = 'Date'
+        end
+        item
+          AutoSize = True
+          Caption = 'Action'
+        end
+        item
+          AutoSize = True
+          Caption = 'Note'
+        end>
+      Constraints.MinHeight = 50
+      HideSelection = False
+      Items.Data = {
+        5E0000000100000000000000FFFFFFFFFFFFFFFF03000000000000000857414E
+        44455245521C4F63746F6265722032302C20323030334031303A31353A32333A
+        3233115245414C4C59204C4F4E4720535455464603596573FFFFFFFFFFFF}
+      ReadOnly = True
+      RowSelect = True
+      TabOrder = 0
+      ViewStyle = vsReport
+    end
   end
 end
Index: cprs/branches/foia-cprs/CPRS-Chart/fNoteProps.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fNoteProps.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fNoteProps.pas	(revision 460)
@@ -1,3 +1,3 @@
-unit fNoteProps;                           
+unit fNoteProps;
 
 interface
@@ -5,7 +5,27 @@
 uses
   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
-  StdCtrls, ORDtTm, ORCtrls, ExtCtrls, rTIU, uConst, uTIU, ORFn, ORNet;
+  StdCtrls, ORDtTm, ORCtrls, ExtCtrls, rTIU, uConst, uTIU, ORFn, ORNet,
+  ComCtrls, Buttons;
 
 type
+  {This object holds a List of Actions as Returned VIA the RPCBroker}
+  TPRFActions = class(TObject)
+  private
+    FPRFActionList : TStringList;
+  public
+    //procedure to show the Action in a ListView, requires a listview parameter
+    procedure ShowActionsOnList(DisplayList : TCaptionListView);
+    //procedure to load the actions, this will call the RPC
+    procedure Load(TitleIEN : Int64; DFN : String);
+    //returns true if the Action at the Index passed is associated with a note
+    function SelActionHasNote(lstIndex : integer) : boolean;
+    //return the Action IEN at the Index passed
+    function GetActionIEN(lstIndex : integer) : String;
+    //return the PRF IEN at the Index passed
+    function GetPRF_IEN(lstIndex : integer) : integer;
+    constructor Create();
+    destructor Destroy(); override;
+  end;
+
   TfrmNoteProperties = class(TForm)
     lblNewTitle: TLabel;
@@ -42,4 +62,9 @@
     lblProcDateTime: TOROffsetLabel;
     btnShowList: TButton;
+    pnlPRF: TORAutoPanel;
+    lblPRF: TLabel;
+    Bevel1: TBevel;
+    lvPRF: TCaptionListView;
+    btnDetails: TButton;
     procedure FormShow(Sender: TObject);
     procedure cboNewTitleNeedData(Sender: TObject; const StartFrom: String;
@@ -63,4 +88,7 @@
     procedure FormResize(Sender: TObject);
     procedure calNoteEnter(Sender: TObject);
+    procedure FormDestroy(Sender: TObject);
+    procedure btnDetailsClick(Sender: TObject);
+    procedure lstRequestsChange(Sender: TObject);
   private
     FCosignIEN: Int64;      // store cosigner that was passed in
@@ -81,13 +109,19 @@
     FProcDateTime: TFMDateTime;
     FCPStatusFlag: integer;
+    FPRFActions : TPRFActions;
+    FStarting: boolean;
     procedure SetCosignerRequired(DoSetup: boolean);
     procedure FormatRequestList;
     procedure ShowRequestList(ShouldShow: Boolean);
     procedure ShowSurgCaseList(ShouldShow: Boolean);
+    procedure ShowPRFList(ShouldShow: Boolean);
     procedure ShowClinProcFields(YesNo: boolean);
+    procedure SetGenericFormSize;
     procedure UMDelayEvent(var Message: TMessage); message UM_DELAYEVENT;
   public
     { Public declarations }
+
   end;
+
 
 function ExecuteNoteProperties(var ANote: TEditNoteRec; CallingTab: integer; IDNoteTitlesOnly,
@@ -101,9 +135,11 @@
  TC_INACTIVE_USER     = 'Inactive User Alert';
 
+ PIXEL_SPACE = 6;
+
 implementation
 
 {$R *.DFM}
 
-uses uCore, rCore, rConsults, uConsults, rSurgery, uAccessibleListBox;
+uses uCore, rCore, rConsults, uConsults, rSurgery, uAccessibleListBox, fRptBox;
 
 { Initial values in ANote
@@ -133,4 +169,6 @@
   TX_REQ_REQUEST       = CRLF + 'This title requires the selection of an associated consult request.';
   TX_REQ_SURGCASE      = CRLF + 'This title requires the selection of an associated surgery case.';
+  TX_REQ_PRF_ACTION    = CRLF + 'Notes of this title require the selection of a patient record flag action.';
+  TX_REQ_PRF_NOTE      = CRLF + 'This action has already been assigned to another note.';
   TX_NO_FUTURE         = CRLF + 'A reference date/time in the future is not allowed.';
   TX_COS_SELF          = CRLF + 'You cannot make yourself a cosigner.';
@@ -153,4 +191,14 @@
   ACTIVE_STATUS = 'ACTIVE,PENDING,SCHEDULED';
 
+  PRF_LABEL = 'Which Patient Record Flag Action should this Note be linked to?';
+
+  FLAG_NAME = 1;
+  PRF_IEN = 2;
+  ACTION_NAME = 3;
+  ACTION_IEN = 4;
+  ACTION_DATE_I = 5;
+  ACTION_DATE = 6;
+  NOTE_IEN = 7;
+
 
 var
@@ -176,5 +224,6 @@
       FIsClinProcNote := (AClassName = DCL_CLINPROC);
       FCPStatusFlag := CPStatusFlag;
-      uShowUnresolvedOnly := False;
+      //uShowUnresolvedOnly := False;                      //v26.5 (RV)
+      uShowUnresolvedOnly := True;                         //v26.5 (RV)
       if ANote.DocType <> TYP_ADDENDUM then
         begin
@@ -210,7 +259,8 @@
            CT_NOTES:      begin
                             Caption := 'Progress Note Properties';
-                            if ANote.IsNewNote and UnresolvedConsultsExist then
-                              uShowUnresolvedOnly := InfoBox(TX_UNRESOLVED_CONSULTS, 'Unresolved Consults Exist',
-                                MB_YESNO or MB_ICONQUESTION) = IDYES;
+                            if ANote.IsNewNote then
+                            begin
+                              GetUnresolvedConsultsInfo; // v26.5 (RV) removed nag screen
+                            end;
                             cboNewTitle.InitLongList('');
                             cboAuthor.InitLongList(ANote.AuthorName);
@@ -235,7 +285,9 @@
         end;
       ShowClinProcFields(FIsClinProcNote);
+      FStarting := True;
       if ANote.Title > 0 then cboNewTitle.SelectByIEN(ANote.Title);
       if (ANote.Title > 0) and (cboNewTitle.ItemIndex < 0)
         then cboNewTitle.SetExactByIEN(ANote.Title, ANote.TitleName);
+      FStarting := False;
       calNote.FMDateTime := ANote.DateTime;
       // setup cosigner fields
@@ -248,29 +300,22 @@
       SetCosignerRequired(True);
       // setup package fields
+      SetGenericFormSize;
       case FCallingTab of
         CT_CONSULTS:  begin
                         ShowRequestList(False);
                         ShowSurgCaseList(False);
+                        ShowPRFList(False);
                       end;
         CT_SURGERY :  begin
                         ShowRequestList(False);
                         ShowSurgCaseList(False);
+                        ShowPRFList(False);
                       end;
         CT_NOTES   :  begin
-                        if IsConsultTitle(ANote.Title) then
-                          begin
-                            ShowRequestList(True);
-                            ShowSurgCaseList(False);
-                          end
-                        else if IsSurgeryTitle(ANote.Title) then
-                          begin
-                            ShowSurgCaseList(True);
-                            ShowRequestList(False);
-                          end
-                        else
-                          begin
-                            ShowRequestList(False);
-                            ShowSurgCaseList(False);
-                          end;
+                        with uUnresolvedConsults do                          // v26.5 (RV)
+                          ShowRequestList(IsConsultTitle(ANote.Title) or
+                            (UnresolvedConsultsExist and ShowNagScreen));    // v26.5 (RV)
+                        ShowSurgCaseList(IsSurgeryTitle(ANote.Title));
+                        ShowPRFList(IsPRFTitle(ANote.Title));
                       end;
       end;
@@ -283,8 +328,10 @@
       end;
       cboNewTitle.Caption := lblNewTitle.Caption;
+      FStarting := True;
       cboNewTitleExit(frmNoteProperties);        // force display of request/case list
+      FStarting := False;
       if uShowUnresolvedOnly then                // override previous display if SHOW ME clicked on entrance
       begin
-        cboNewTitle.ItemIndex := -1;
+        //cboNewTitle.ItemIndex := -1;      CQ#7587, v26.25 - RV
         uShowUnresolvedOnly := not uShowUnresolvedOnly;
         FormatRequestList;
@@ -351,4 +398,9 @@
                               PkgPtr := PKG_SURGERY;
                               PkgRef := IntToStr(PkgIEN) + ';' + PkgPtr;
+                            end
+                          else if pnlPRF.Visible then //PRF
+                            begin
+                              PRF_IEN := FPRFActions.GetPRF_IEN(lvPRF.ItemIndex);
+                              ActionIEN := FPRFActions.GetActionIEN(lvPRF.ItemIndex);
                             end;
                         end;
@@ -392,6 +444,6 @@
   begin
     if cboNewTitle.ItemIEN = 0
-      then lblCosigner.Visible := AskCosignerForTitle(FDocType,            cboAuthor.ItemIEN)
-      else lblCosigner.Visible := AskCosignerForTitle(cboNewTitle.ItemIEN, cboAuthor.ItemIEN);
+      then lblCosigner.Visible := AskCosignerForTitle(FDocType,            cboAuthor.ItemIEN, calNote.FMDateTime)
+      else lblCosigner.Visible := AskCosignerForTitle(cboNewTitle.ItemIEN, cboAuthor.ItemIEN, calNote.FMDateTime);
   end;
   cboCosigner.Visible := lblCosigner.Visible;
@@ -427,12 +479,11 @@
   SavedIEN: integer;
 begin
+  ShouldShow := ShouldShow and (FCallingTab = CT_NOTES);
   if FDocType = TYP_ADDENDUM then ShouldShow := False;
+  pnlConsults.Visible := ShouldShow;
   if ShouldShow then
   begin
     SavedIEN := lstRequests.ItemIEN;
-    for i := 0 to Pred(ControlCount) do
-      if Controls[i].Tag = 1 then Controls[i].Visible := True;
-    pnlConsults.Align := alBottom;
-    ClientHeight := cboCosigner.Top + cboCosigner.Height + 6 + pnlConsults.Height;
+    ClientHeight := cboCosigner.Top + cboCosigner.Height + PIXEL_SPACE + pnlConsults.Height;
     lstRequests.Items.Clear;
     if uConsultsList.Count = 0 then ListConsultRequests(uConsultsList);
@@ -451,31 +502,18 @@
     lblConsult1.Visible := (cboNewTitle.ItemIndex > -1);
     lstRequests.SelectByIEN(SavedIEN);
-  end else
-  begin
-    for i := 0 to Pred(ControlCount) do
-      if Controls[i].Tag = 1 then Controls[i].Visible := False;
-    ClientHeight := cboCosigner.Top + cboCosigner.Height + 6;
-  end;
+    btnDetails.Enabled := (lstRequests.ItemIndex > -1);
+  end
 end;
 
 procedure TfrmNoteProperties.ShowSurgCaseList(ShouldShow: Boolean);
 { called initially & whenever title changes }
-var
-  i: Integer;
-begin
+begin
+  pnlSurgery.Visible := ShouldShow;
   if FDocType = TYP_ADDENDUM then ShouldShow := False;
   if ShouldShow then
   begin
-    for i := 0 to Pred(ControlCount) do
-      if Controls[i].Tag = 2 then Controls[i].Visible := True;
-    pnlSurgery.Align := alBottom;
-    ClientHeight := cboCosigner.Top + cboCosigner.Height + 6 + pnlSurgery.Height;
+    ClientHeight := cboCosigner.Top + cboCosigner.Height + PIXEL_SPACE + pnlSurgery.Height;
     if lstSurgery.Items.Count = 0 then ListSurgeryCases(lstSurgery.Items);
-  end else
-  begin
-    for i := 0 to Pred(ControlCount) do
-      if Controls[i].Tag = 2 then Controls[i].Visible := False;
-    ClientHeight := cboCosigner.Top + cboCosigner.Height + 6;
-  end;
+  end
 end;
 
@@ -503,4 +541,15 @@
 
 procedure TfrmNoteProperties.cboNewTitleMouseClick(Sender: TObject);
+const
+  TX_NEED_CONSULT_TITLE = 'You currently have unresolved consults awaiting completion.' + CRLF +
+                          'The selected title cannot be used to complete consults.' + CRLF +
+                          'You must select a Consults title to complete a consult.' + CRLF + CRLF +
+                          'Answer "YES" to continue with this title and not complete a consult.' + CRLF +
+                          'Answer "NO" to select a different title.' + CRLF + CRLF +
+                          'Do you want to use this title and continue?';                          
+  TC_NOT_CONSULT_TITLE = 'Not a consult title';
+var
+  WantsToCompleteConsult: boolean;
+  ConsultTitle: boolean;
 begin
   with cboNewTitle do
@@ -515,19 +564,21 @@
       CT_CONSULTS:  ;  // no action
       CT_SURGERY :  ;  // no action
-      CT_NOTES   :  if IsConsultTitle(cboNewTitle.ItemIEN) then
-                      begin
-                        ShowSurgCaseList(False);
-                        ShowRequestList(True);
-                      end
-                    else if IsSurgeryTitle(cboNewTitle.ItemIEN) then
-                      begin
-                        ShowRequestList(False);
-                        ShowSurgCaseList(True);
-                      end
-                    else
-                      begin
-                        ShowRequestList(False);
-                        ShowSurgCaseList(False);
-                      end;
+      CT_NOTES   :  begin            // v26.5 (RV) main changes here
+                      WantsToCompleteConsult := False;
+                      ConsultTitle := IsConsultTitle(cboNewTitle.ItemIEN);
+                      if (pnlConsults.Visible) and
+                         (lstRequests.Items.Count > 0) and
+                         (not FStarting) and
+                         (*(lstRequests.ItemID <> '') and*)
+                         (not ConsultTitle) then
+                          WantsToCompleteConsult := (InfoBox(TX_NEED_CONSULT_TITLE,
+                                                            TC_NOT_CONSULT_TITLE,
+                                                            MB_ICONWARNING or MB_YESNO or MB_DEFBUTTON2) = IDNO);
+                      if WantsToCompleteConsult and (not ConsultTitle) then cboNewTitle.ItemIndex := -1;
+                      SetGenericFormSize;
+                      ShowRequestList(WantsToCompleteConsult or ConsultTitle);
+                      ShowSurgCaseList(IsSurgeryTitle(cboNewTitle.ItemIEN));
+                      ShowPRFList(IsPRFTitle(cboNewTitle.ItemIEN));
+                    end;
     end;
   SetCosignerRequired(True);
@@ -573,5 +624,11 @@
 //var x: string;
 begin
-  with cboCosigner do if Text = '' then ItemIndex := -1;
+  with cboCosigner do if ((Text = '') or (ItemIEN = 0)) then
+  begin
+    ItemIndex := -1;
+    FCosignIEN := 0;
+    FCosignName := '';
+    exit;
+  end;
   FCosignIEN := cboCosigner.ItemIEN;
   FCosignName := Piece(cboCosigner.Items[cboCosigner.ItemIndex], U, 2);
@@ -602,16 +659,27 @@
                        ShowRequestList(False);
                        ShowSurgCaseList(False);
+                       ShowPRFList(False);
                     end;
   end;*)
   SetCosignerRequired(False);
   ErrMsg := '';
-   if cboNewTitle.ItemIEN = 0 then
-    ErrMsg := ErrMsg + TX_REQ_TITLE
-    //code added 12/2002  check note parm - one per visit  GRE
-  else if OneNotePerVisit(CboNewTitle.ItemIEN, Patient.DFN, Encounter.VisitStr)then
-      ErrMsg := ErrMsg + TX_ONE_NOTE_PER_VISIT1
-                       + Piece(cboNewTitle.Items[cboNewTitle.ItemIndex],U,2)
-                       + TX_ONE_NOTE_PER_VISIT2
-    else
+  if cboNewTitle.ItemIEN = 0 then
+    ErrMsg := ErrMsg + TX_REQ_TITLE ;
+  if ErrMsg = '' then
+    begin
+      if FDocType = TYP_ADDENDUM then
+        begin
+          if OneNotePerVisit(TYP_ADDENDUM, Patient.DFN, Encounter.VisitStr)then
+            ErrMsg := ErrMsg + TX_ONE_NOTE_PER_VISIT1
+                     + 'Addendum to ' + Piece(cboNewTitle.Items[cboNewTitle.ItemIndex],U,2)
+                     + TX_ONE_NOTE_PER_VISIT2;
+        end
+        //code added 12/2002  check note parm - one per visit  GRE
+      else if OneNotePerVisit(CboNewTitle.ItemIEN, Patient.DFN, Encounter.VisitStr)then
+            ErrMsg := ErrMsg + TX_ONE_NOTE_PER_VISIT1
+                     + Piece(cboNewTitle.Items[cboNewTitle.ItemIndex],U,2)
+                     + TX_ONE_NOTE_PER_VISIT2;
+    end;
+  if ErrMsg = '' then
     begin
       if FIDNoteTitlesOnly then
@@ -626,4 +694,11 @@
           else if ((pnlSurgery.Visible) and (lstSurgery.ItemIndex < 0)) then
             ErrMsg := ErrMsg + TX_REQ_SURGCASE
+          else if (pnlPRF.Visible) then
+          begin
+            if (lvPRF.ItemIndex < 0) then
+              ErrMsg := ErrMsg + TX_REQ_PRF_ACTION
+            else if FPRFActions.SelActionHasNote(lvPRF.ItemIndex) then
+              ErrMsg := ErrMsg + TX_REQ_PRF_NOTE;
+          end;
         end;
     end;
@@ -635,5 +710,5 @@
        if (cboCosigner.ItemIEN = 0)     then ErrMsg := ErrMsg + TX_REQ_COSIGNER;
       //if (cboCosigner.ItemIEN = User.DUZ) then ErrMsg := TX_COS_SELF;  // (CanCosign will do this check)
-      if (cboCosigner.ItemIEN > 0) and not CanCosign(cboNewTitle.ItemIEN, FDocType, cboCosigner.ItemIEN)
+      if (cboCosigner.ItemIEN > 0) and not CanCosign(cboNewTitle.ItemIEN, FDocType, cboCosigner.ItemIEN, calNote.FMDateTime)
         then ErrMsg := cboCosigner.Text + TX_COS_AUTH;
         //code added 02/2003  check if User is Inactive   GRE
@@ -719,5 +794,7 @@
     else
       Caption := SHOW_UNRESOLVED;
-  ShowRequestList(True);
+  with uUnresolvedConsults do if (UnresolvedConsultsExist and ShowNagScreen) then pnlConsults.Visible := TRUE;  //v26.27 (RV)
+  ShowRequestList(pnlConsults.Visible);      //v26.5 (RV)
+  //ShowRequestList(True);                   //v26.5 (RV)
 end;
 
@@ -739,3 +816,112 @@
 end;
 
+procedure TfrmNoteProperties.ShowPRFList(ShouldShow: Boolean);
+begin
+  pnlPRF.Visible := ShouldShow and not (FDocType = TYP_ADDENDUM);
+  if pnlPRF.Visible then
+  begin
+    ClientHeight := cboCosigner.Top + cboCosigner.Height + PIXEL_SPACE + pnlPRF.Height;
+    if FPRFActions = nil then
+      FPRFActions := TPRFActions.Create;
+    FPRFActions.Load(cboNewTitle.ItemIEN,Patient.DFN);
+    if RPCBrokerV.Results.Count <> 0 then
+      lblPRF.Caption := PRF_LABEL
+    else
+      lblPRF.Caption := 'No Linkable Actions for this Patient and/or Title.';
+    FPRFActions.ShowActionsOnList(lvPRF);
+    //Fix for CQ: 6926
+    lvPRF.Columns.BeginUpdate;
+    lvPRF.Columns.EndUpdate;
+    //End Fix for CQ: 6926
+  end
+end;
+
+procedure TfrmNoteProperties.SetGenericFormSize;
+begin
+  ClientHeight := cboCosigner.Top + cboCosigner.Height + PIXEL_SPACE;
+end;
+
+{ TPRFActions }
+
+constructor TPRFActions.Create;
+begin
+  inherited;
+  FPRFActionList := TStringList.Create;
+end;
+
+destructor TPRFActions.Destroy;
+begin
+  FPRFActionList.Free;
+  inherited;
+end;
+
+function TPRFActions.GetActionIEN(lstIndex: integer): String;
+begin
+  Result := Piece(FPRFActionList[lstIndex],U,ACTION_IEN);
+end;
+
+function TPRFActions.GetPRF_IEN(lstIndex: integer): integer;
+begin
+  Result := StrToInt(Piece(FPRFActionList[lstIndex],U,PRF_IEN));
+end;
+
+procedure TPRFActions.Load(TitleIEN : Int64; DFN : String);
+begin
+  CallV('TIU GET PRF ACTIONS', [TitleIEN,DFN]);
+  FPRFActionList.Assign(RPCBrokerV.Results);
+end;
+
+function TPRFActions.SelActionHasNote(lstIndex: integer): boolean;
+begin
+  Result := false;
+  if Piece(FPRFActionList[lstIndex],U,NOTE_IEN) <> '' then
+    Result := true;
+end;
+
+procedure TPRFActions.ShowActionsOnList(DisplayList: TCaptionListView);
+var
+  i : integer;
+  ListItem: TListItem;
+begin
+  DisplayList.Clear;
+  for i := 0 to FPRFActionList.Count-1 do
+  begin
+    //Caption="Text for Screen Reader" SubItem1=Flag SubItem2=Date SubItem3=Action SubItem4=Note
+    ListItem := DisplayList.Items.Add;
+    ListItem.Caption := PRF_LABEL; //Screen readers don't read the first column title on a listview.
+    ListItem.SubItems.Add(Piece(FPRFActionList[i],U,FLAG_NAME));
+    ListItem.SubItems.Add(Piece(FPRFActionList[i],U,ACTION_DATE));
+    ListItem.SubItems.Add(Piece(FPRFActionList[i],U,ACTION_NAME));
+    if SelActionHasNote(i) then
+      ListItem.SubItems.Add('Yes')
+    else
+      ListItem.SubItems.Add('No');
+  end;
+end;
+
+procedure TfrmNoteProperties.FormDestroy(Sender: TObject);
+begin
+  FPRFActions.Free;
+end;
+
+procedure TfrmNoteProperties.btnDetailsClick(Sender: TObject);
+var
+  ConsultDetail: TStringList;
+begin
+  if lstRequests.ItemIEN <= 0 then exit;
+  ConsultDetail := TStringList.Create;
+  try
+    LoadConsultDetail(ConsultDetail, lstRequests.ItemIEN) ;
+    ReportBox(ConsultDetail, 'Consult Details: #' + lstRequests.ItemID + ' - ' +
+               Piece(lstRequests.Items[lstRequests.ItemIndex], U, 3), TRUE);
+  finally
+    ConsultDetail.Free;
+  end;
+end;
+
+procedure TfrmNoteProperties.lstRequestsChange(Sender: TObject);
+begin
+  btnDetails.Enabled := (lstRequests.ItemIEN > 0);
+end;
+
 end.
Index: cprs/branches/foia-cprs/CPRS-Chart/fNotePrt.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fNotePrt.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fNotePrt.dfm	(revision 460)
@@ -1,5 +1,5 @@
 inherited frmNotePrint: TfrmNotePrint
-  Left = 505
-  Top = 209
+  Left = 516
+  Top = 189
   AutoScroll = False
   Caption = 'frmNotePrint'
Index: cprs/branches/foia-cprs/CPRS-Chart/fNotePrt.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fNotePrt.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fNotePrt.pas	(revision 460)
@@ -202,7 +202,10 @@
   if Piece(cboDevice.ItemID, ';', 1) = 'WIN' then
     begin
-    FReportText.Lines.Assign(GetFormattedNote(FNote, ChartCopy));
-    PrintWindowsReport(FReportText, PAGE_BREAK, Self.Caption, ErrMsg);
-    if Length(ErrMsg) > 0 then InfoBox(ErrMsg, TX_ERR_CAP, MB_OK);
+    if dlgWinPrinter.Execute then
+       begin
+       FReportText.Lines.Assign(GetFormattedNote(FNote, ChartCopy));
+       PrintWindowsReport(FReportText, PAGE_BREAK, Self.Caption, ErrMsg);
+       if Length(ErrMsg) > 0 then InfoBox(ErrMsg, TX_ERR_CAP, MB_OK);
+       end
     end
   else
Index: cprs/branches/foia-cprs/CPRS-Chart/fNoteST.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fNoteST.dfm	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/fNoteST.dfm	(revision 460)
@@ -0,0 +1,73 @@
+object frmNotesSearchText: TfrmNotesSearchText
+  Left = 473
+  Top = 272
+  Width = 339
+  Height = 150
+  BorderIcons = []
+  Caption = 'List Signed Notes by Author'
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  OldCreateOrder = True
+  Position = poScreenCenter
+  OnDestroy = FormDestroy
+  OnResize = FormResize
+  OnShow = FormShow
+  DesignSize = (
+    331
+    123)
+  PixelsPerInch = 96
+  TextHeight = 13
+  object lblSearchInfo: TLabel
+    Left = 8
+    Top = 56
+    Width = 221
+    Height = 52
+    Anchors = [akLeft, akTop, akBottom]
+    Caption = 
+      'Your current view of notes will be searched for the specified st' +
+      'ring.  If you want to search a larger range of notes, you need t' +
+      'o pull up that view prior to searching.'
+    WordWrap = True
+  end
+  object lblAuthor: TLabel
+    Left = 8
+    Top = 8
+    Width = 65
+    Height = 13
+    Caption = 'Search string:'
+  end
+  object edtSearchText: TEdit
+    Left = 8
+    Top = 24
+    Width = 224
+    Height = 21
+    Anchors = [akLeft, akTop, akRight]
+    TabOrder = 0
+  end
+  object cmdOK: TButton
+    Left = 251
+    Top = 24
+    Width = 72
+    Height = 19
+    Anchors = [akLeft, akTop, akRight]
+    Caption = 'OK'
+    Default = True
+    TabOrder = 1
+    OnClick = cmdOKClick
+  end
+  object cmdCancel: TButton
+    Left = 251
+    Top = 49
+    Width = 72
+    Height = 21
+    Anchors = [akLeft, akTop, akRight]
+    Cancel = True
+    Caption = 'Cancel'
+    TabOrder = 2
+    OnClick = cmdCancelClick
+  end
+end
Index: cprs/branches/foia-cprs/CPRS-Chart/fNoteST.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fNoteST.pas	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/fNoteST.pas	(revision 460)
@@ -0,0 +1,117 @@
+unit fNoteST;
+{
+Text Search CQ: HDS00002856
+This Unit Contains the Dialog Used to Capture the Text that will be
+searched for in the current notes view.
+}
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+  ExtCtrls, ORCtrls, StdCtrls, ORFn, uTIU, fAutoSz;
+
+type
+  TfrmNotesSearchText = class(TfrmAutoSz)
+    lblSearchInfo: TLabel;
+    edtSearchText: TEdit;
+    lblAuthor: TLabel;
+    cmdOK: TButton;
+    cmdCancel: TButton;
+    procedure cmdCancelClick(Sender: TObject);
+    procedure cmdOKClick(Sender: TObject);
+    procedure FormShow(Sender: TObject);
+    procedure FormDestroy(Sender: TObject);
+    procedure FormResize(Sender: TObject);
+  private
+    FChanged: Boolean;
+    FSearchString: string;
+  end;
+
+  TSearchContext = record
+    Changed: Boolean;
+    SearchString: string;
+  end;
+
+procedure SelectSearchText(FontSize: Integer; var SearchText: String; var SearchContext: TSearchContext);
+
+implementation
+
+{$R *.DFM}
+
+uses rTIU, rCore, uCore, rMisc;
+
+const
+  TX_SEARCH_TEXT = 'Select a search string or press Cancel.';
+  TX_SEARCH_CAP = 'Missing search string';
+
+procedure SelectSearchText(FontSize: Integer; var SearchText: String; var SearchContext: TSearchContext);
+{ displays author select form for progress notes and returns a record of the selection }
+var
+  frmNotesSearchText: TfrmNotesSearchText;
+  W, H: integer;
+//  CurrentAuthor: Int64;
+begin
+  frmNotesSearchText := TfrmNotesSearchText.Create(Application);
+  try
+    with frmNotesSearchText do
+    begin
+      edtSearchText.Text:=SearchText;
+      Font.Size := FontSize;
+      W := ClientWidth;
+      H := ClientHeight;
+      ResizeToFont(FontSize, W, H);
+//      ClientWidth  := W; pnlBase.Width  := W;
+//      ClientHeight := H; pnlBase.Height := W;
+      FChanged := False;
+      Show;
+      edtSearchText.SetFocus;
+      Hide;
+      ShowModal;
+      If edtSearchText.Text<>'' then
+      with SearchContext do
+      begin
+        Changed := FChanged;
+        SearchString := FSearchString;
+      end; {with SearchContext}
+    end; {with frmNotesSearchText}
+  finally
+    frmNotesSearchText.Release;
+  end;
+end;
+
+procedure TfrmNotesSearchText.cmdCancelClick(Sender: TObject);
+begin
+  FChanged:=False;
+  Close;
+end;
+
+procedure TfrmNotesSearchText.cmdOKClick(Sender: TObject);
+begin
+  if edtSearchText.Text = '' then
+  begin
+    InfoBox(TX_SEARCH_TEXT, TX_SEARCH_CAP, MB_OK or MB_ICONWARNING);
+    Exit;
+  end;
+  FChanged := True;
+  FSearchString := edtSearchText.Text;
+  Close;
+end;
+
+procedure TfrmNotesSearchText.FormShow(Sender: TObject);
+begin
+  SetFormPosition(Self);
+end;
+
+procedure TfrmNotesSearchText.FormDestroy(Sender: TObject);
+begin
+  SaveUserBounds(Self);
+end;
+
+procedure TfrmNotesSearchText.FormResize(Sender: TObject);
+begin
+  inherited;
+  lblSearchInfo.Width := edtSearchText.Width;
+end;
+
+end.
Index: cprs/branches/foia-cprs/CPRS-Chart/fNoteSTStop.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fNoteSTStop.dfm	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/fNoteSTStop.dfm	(revision 460)
@@ -0,0 +1,39 @@
+object frmSearchStop: TfrmSearchStop
+  Left = 477
+  Top = 351
+  BorderIcons = []
+  BorderStyle = bsDialog
+  Caption = 'Scanning Notes....'
+  ClientHeight = 95
+  ClientWidth = 163
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  FormStyle = fsStayOnTop
+  OldCreateOrder = False
+  Position = poMainFormCenter
+  OnShow = FormShow
+  PixelsPerInch = 96
+  TextHeight = 13
+  object btnSearchStop: TButton
+    Left = 45
+    Top = 64
+    Width = 73
+    Height = 25
+    Caption = 'Stop Scan'
+    TabOrder = 1
+    OnClick = btnSearchStopClick
+  end
+  object lblSearchStatus: TStaticText
+    Left = 8
+    Top = 32
+    Width = 78
+    Height = 17
+    Caption = 'lblSearchStatus'
+    TabOrder = 0
+    TabStop = True
+  end
+end
Index: cprs/branches/foia-cprs/CPRS-Chart/fNoteSTStop.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fNoteSTStop.pas	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/fNoteSTStop.pas	(revision 460)
@@ -0,0 +1,39 @@
+unit fNoteSTStop;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs, StdCtrls, fAutoSz;
+
+type
+  TfrmSearchStop = class(TfrmAutoSz)
+    btnSearchStop: TButton;
+    lblSearchStatus: TStaticText;
+    procedure btnSearchStopClick(Sender: TObject);
+    procedure FormShow(Sender: TObject);
+  private
+    { Private declarations }
+  public
+    { Public declarations }
+  end;
+
+var
+  frmSearchStop: TfrmSearchStop;
+
+implementation
+
+{$R *.dfm}
+uses fNotes, ORFn;
+
+procedure TfrmSearchStop.btnSearchStopClick(Sender: TObject);
+begin
+  SearchTextStopFlag := True;
+end;
+
+procedure TfrmSearchStop.FormShow(Sender: TObject);
+begin
+  ResizeFormToFont(frmSearchStop);
+end;
+
+end.
Index: cprs/branches/foia-cprs/CPRS-Chart/fNotes.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fNotes.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fNotes.dfm	(revision 460)
@@ -1,13 +1,15 @@
 inherited frmNotes: TfrmNotes
-  Left = 375
-  Top = 144
-  Width = 614
+  Left = 307
+  Top = 177
+  Width = 687
   Height = 409
   HelpContext = 5000
   Caption = 'Progress Notes Page'
   HelpFile = 'overvw'
+  KeyPreview = True
   Menu = mnuNotes
   OnDestroy = FormDestroy
   OnHide = FormHide
+  OnMouseMove = FormMouseMove
   OnShow = FormShow
   PixelsPerInch = 96
@@ -15,5 +17,5 @@
   inherited shpPageBottom: TShape
     Top = 358
-    Width = 606
+    Width = 679
   end
   inherited sptHorz: TSplitter
@@ -57,4 +59,5 @@
       OnClick = cmdNewNoteClick
       OnExit = cmdNewNoteExit
+      OnMouseMove = FormMouseMove
       Align = alBottom
     end
@@ -69,4 +72,5 @@
       OnClick = cmdPCEClick
       OnExit = cmdPCEExit
+      OnMouseMove = FormMouseMove
       Align = alBottom
     end
@@ -128,4 +132,5 @@
         OnExit = tvNotesExit
         OnExpanded = tvNotesExpanded
+        OnMouseMove = FormMouseMove
         OnStartDrag = tvNotesStartDrag
         Caption = 'Last 100 Notes'
@@ -137,10 +142,10 @@
   inherited pnlRight: TPanel
     Left = 68
-    Width = 538
+    Width = 611
     Height = 358
     object sptVert: TSplitter
       Left = 0
       Top = 309
-      Width = 538
+      Width = 611
       Height = 4
       Cursor = crVSplit
@@ -150,5 +155,5 @@
       Left = 0
       Top = 313
-      Width = 538
+      Width = 611
       Height = 45
       Align = alBottom
@@ -165,5 +170,5 @@
       Left = 0
       Top = 0
-      Width = 538
+      Width = 611
       Height = 309
       Align = alClient
@@ -175,5 +180,5 @@
         Left = 0
         Top = 67
-        Width = 538
+        Width = 611
         Height = 242
         Align = alClient
@@ -197,5 +202,5 @@
         Left = 0
         Top = 0
-        Width = 538
+        Width = 611
         Height = 67
         Align = alTop
@@ -204,5 +209,5 @@
         OnResize = pnlFieldsResize
         DesignSize = (
-          538
+          611
           67)
         object bvlNewTitle: TBevel
@@ -226,5 +231,5 @@
         end
         object lblAuthor: TStaticText
-          Left = 320
+          Left = 393
           Top = 6
           Width = 152
@@ -249,5 +254,5 @@
         end
         object lblCosigner: TStaticText
-          Left = 225
+          Left = 298
           Top = 21
           Width = 243
@@ -292,5 +297,5 @@
         end
         object cmdChange: TButton
-          Left = 474
+          Left = 547
           Top = 6
           Width = 58
@@ -305,5 +310,5 @@
           Left = 48
           Top = 40
-          Width = 484
+          Width = 557
           Height = 21
           Hint = 'Subject is limited to a maximum of 80 characters.'
@@ -321,13 +326,14 @@
       Left = 0
       Top = 0
-      Width = 538
+      Width = 611
       Height = 309
       Align = alClient
       BevelOuter = bvNone
       TabOrder = 0
+      OnExit = pnlReadExit
       object lblTitle: TOROffsetLabel
         Left = 0
         Top = 0
-        Width = 538
+        Width = 611
         Height = 19
         Align = alTop
@@ -341,5 +347,5 @@
         Left = 0
         Top = 113
-        Width = 538
+        Width = 611
         Height = 3
         Cursor = crVSplit
@@ -349,5 +355,5 @@
         Left = 0
         Top = 116
-        Width = 538
+        Width = 611
         Height = 193
         Align = alClient
@@ -371,10 +377,10 @@
         TabOrder = 1
         WordWrap = False
-        OnExit = memNoteExit
+        OnMouseMove = FormMouseMove
       end
       object lvNotes: TCaptionListView
         Left = 0
         Top = 19
-        Width = 538
+        Width = 611
         Height = 94
         Align = alTop
@@ -417,5 +423,5 @@
         OnColumnClick = lvNotesColumnClick
         OnCompare = lvNotesCompare
-        OnExit = lvNotesExit
+        OnMouseMove = FormMouseMove
         OnResize = lvNotesResize
         OnSelectItem = lvNotesSelectItem
@@ -493,4 +499,54 @@
         end
       end
+      object mnuViewInformation: TMenuItem
+        Caption = 'Information'
+        OnClick = mnuViewInformationClick
+        object mnuViewDemo: TMenuItem
+          Tag = 1
+          Caption = 'De&mographics...'
+          OnClick = ViewInfo
+        end
+        object mnuViewVisits: TMenuItem
+          Tag = 2
+          Caption = 'Visits/Pr&ovider...'
+          OnClick = ViewInfo
+        end
+        object mnuViewPrimaryCare: TMenuItem
+          Tag = 3
+          Caption = 'Primary &Care...'
+          OnClick = ViewInfo
+        end
+        object mnuViewMyHealtheVet: TMenuItem
+          Tag = 4
+          Caption = 'MyHealthe&Vet...'
+          OnClick = ViewInfo
+        end
+        object mnuInsurance: TMenuItem
+          Tag = 5
+          Caption = '&Insurance...'
+          OnClick = ViewInfo
+        end
+        object mnuViewFlags: TMenuItem
+          Tag = 6
+          Caption = '&Flags...'
+          OnClick = ViewInfo
+        end
+        object mnuViewRemoteData: TMenuItem
+          Tag = 7
+          Caption = 'Remote &Data...'
+          OnClick = ViewInfo
+        end
+        object mnuViewReminders: TMenuItem
+          Tag = 8
+          Caption = '&Reminders...'
+          Enabled = False
+          OnClick = ViewInfo
+        end
+        object mnuViewPostings: TMenuItem
+          Tag = 9
+          Caption = '&Postings...'
+          OnClick = ViewInfo
+        end
+      end
       object Z3: TMenuItem
         Caption = '-'
@@ -524,4 +580,9 @@
         Tag = 6
         Caption = 'Custo&m View'
+        OnClick = mnuViewClick
+      end
+      object mnuSearchForText: TMenuItem
+        Tag = 7
+        Caption = 'Search for Te&xt (Within Current View)'
         OnClick = mnuViewClick
       end
@@ -806,4 +867,9 @@
       Tag = 6
       Caption = 'Cus&tom View'
+      OnClick = mnuViewClick
+    end
+    object popSearchForText: TMenuItem
+      Tag = 7
+      Caption = 'Search for Te&xt (Within Current View)'
       OnClick = mnuViewClick
     end
Index: cprs/branches/foia-cprs/CPRS-Chart/fNotes.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fNotes.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fNotes.pas	(revision 460)
@@ -1,13 +1,4 @@
 unit fNotes;
 {$O-}
-{
-NOTES:
-    TAB ORDER:
-      Becuase of the Dynamic ways of this form, the tab order must be
-      coded into the onExit events of the controls. If a new control is
-      added that needs access with tab & shift tab you must add the
-      code. Right clicking on the form and selecting tab order will not
-      be sufficient. See TfrmNotes.memPCEShowExit procedure for example.
-}
 
 interface
@@ -16,5 +7,6 @@
   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
   fHSplit, StdCtrls, ExtCtrls, Menus, ComCtrls, ORCtrls, ORFn, uConst, ORDtTm,
-  uPCE, ORClasses, fDrawers, ImgList, rTIU, uTIU, uDocTree, fRptBox, fPrintList;
+  uPCE, ORClasses, fDrawers, ImgList, rTIU, uTIU, uDocTree, fRptBox, fPrintList,
+  fNoteST, ORNet, fNoteSTStop;
 
 type
@@ -116,4 +108,5 @@
     N3: TMenuItem;
     mnuEditDialgFields: TMenuItem;
+    tvNotes: TORTreeView;
     lvNotes: TCaptionListView;
     sptList: TSplitter;
@@ -143,5 +136,16 @@
     popNoteMemoInsTemplate: TMenuItem;
     popNoteMemoEncounter: TMenuItem;
-    tvNotes: TORTreeView;
+    mnuSearchForText: TMenuItem;
+    popSearchForText: TMenuItem;
+    mnuViewInformation: TMenuItem;
+    mnuViewDemo: TMenuItem;
+    mnuViewVisits: TMenuItem;
+    mnuViewPrimaryCare: TMenuItem;
+    mnuViewMyHealtheVet: TMenuItem;
+    mnuInsurance: TMenuItem;
+    mnuViewFlags: TMenuItem;
+    mnuViewReminders: TMenuItem;
+    mnuViewRemoteData: TMenuItem;
+    mnuViewPostings: TMenuItem;
     procedure mnuChartTabClick(Sender: TObject);
     procedure lstNotesClick(Sender: TObject);
@@ -214,6 +218,5 @@
     procedure dlgReplaceTextFind(Sender: TObject);
     procedure mnuActAttachtoIDParentClick(Sender: TObject);
-    procedure memNewNoteKeyDown(Sender: TObject; var Key: Word;
-      Shift: TShiftState);
+    procedure memNewNoteKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
     procedure sptHorzCanResize(Sender: TObject; var NewSize: Integer; var Accept: Boolean);
     procedure popNoteMemoInsTemplateClick(Sender: TObject);
@@ -222,7 +225,10 @@
     procedure tvNotesDeletion(Sender: TObject; Node: TTreeNode);
     procedure tvNotesExit(Sender: TObject);
+    procedure pnlReadExit(Sender: TObject);
     procedure cmdNewNoteExit(Sender: TObject);
     procedure FormHide(Sender: TObject);
     procedure FormShow(Sender: TObject);
+    procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X,
+      Y: Integer);
     procedure memNewNoteKeyPress(Sender: TObject; var Key: Char);
     procedure memNewNoteKeyUp(Sender: TObject; var Key: Word;
@@ -231,6 +237,6 @@
     procedure cmdChangeExit(Sender: TObject);
     procedure cmdPCEExit(Sender: TObject);
-    procedure memNoteExit(Sender: TObject);
-    procedure lvNotesExit(Sender: TObject);
+    procedure ViewInfo(Sender: TObject);
+    procedure mnuViewInformationClick(Sender: TObject);
   private
     FNavigatingTab : Boolean; //Currently Using tab to navigate
@@ -255,4 +261,5 @@
     FOldDrawerPnlEncounterButtonExit: TNotifyEvent;
     FOldDrawerEdtSearchExit: TNotifyEvent;
+    FMousing: TDateTime;
     FStarting: boolean;
     procedure frmFramePnlPatientExit(Sender: TObject);
@@ -261,5 +268,5 @@
     procedure frmDrawerEdtSearchExit(Sender: TObject);
     procedure ClearEditControls;
-    procedure DoAutoSave;
+    procedure DoAutoSave(Suppress: integer = 1);
     function GetTitleText(AnIndex: Integer): string;
     procedure InsertAddendum;
@@ -310,4 +317,5 @@
 var
   frmNotes: TfrmNotes;
+  SearchTextStopFlag: Boolean;   // Text Search CQ: HDS00002856
 
 implementation
@@ -389,5 +397,11 @@
                       ' but will remain indefinitely discoverable to HIMS.' +CRLF +CRLF;
   TX_AUTH_SIGNED    = 'Author has not signed, are you SURE you want to sign.' +CRLF;
-
+{
+type
+  //CQ8300
+  ClipboardData = record
+     Text: array[0..255] of char;
+  end;
+}
 var
   uPCEShow, uPCEEdit:  TPCEData;
@@ -399,4 +413,5 @@
   uChanging: Boolean;
   uIDNotesActive: Boolean;
+
 
 { TPage common methods --------------------------------------------------------------------- }
@@ -631,8 +646,10 @@
     {LastCosigner & LastCosignerName aren't cleared because they're used as default for next note.}
     Lines        := nil;
+    PRF_IEN := 0;
+    ActionIEN := '';
   end;
   // clear the editing controls (also clear the new labels?)
   txtSubject.Text := '';
-  memNewNote.Clear;
+  if memNewNote <> nil then memNewNote.Clear; //CQ7012 Added test for nil
   timAutoSave.Enabled := False;
   // clear the PCE object for editing
@@ -754,4 +771,5 @@
     if IsConsultTitle(Title) and (PkgIEN = 0) then Result := True;
     if IsSurgeryTitle(Title) and (PkgIEN = 0) then Result := True;
+    if IsPRFTitle(Title) and (PRF_IEN = 0) and (not DocType = TYP_ADDENDUM) then Result := True;
     if (DocType = TYP_ADDENDUM) then
     begin
@@ -760,5 +778,5 @@
     begin
       if Title > 0 then CurTitle := Title else CurTitle := DocType;
-      if AskCosignerForTitle(CurTitle, Author) and (Cosigner <= 0) then Result := True;
+      if AskCosignerForTitle(CurTitle, Author, DateTime) and (Cosigner <= 0) then Result := True;
     end;
   end;
@@ -897,4 +915,6 @@
   x, WhyNot, DocInfo: string;
 begin
+  if frmFrame.Timedout then Exit;
+
   FNewIDChild := IsIDChild;
   EnableAutosave := FALSE;
@@ -932,5 +952,6 @@
     end;
     // check to see if interaction necessary to get required fields
-    if LacksRequiredForCreate or VerifyNoteTitle or UnresolvedConsultsExist
+    GetUnresolvedConsultsInfo;
+    if LacksRequiredForCreate or VerifyNoteTitle or uUnresolvedConsults.UnresolvedConsultsExist
       then HaveRequired := ExecuteNoteProperties(FEditNote, CT_NOTES, IsIDChild, FNewIDChild, '', 0)
       else HaveRequired := True;
@@ -953,9 +974,13 @@
         //7348^Note Title^3000913^NERD, YOURA  (N0165)^1329;Rich Vertigan;VERTIGAN,RICH^8E REHAB MED^complete^Adm: 11/05/98;2981105.095547^        ;^^0^^^2
         with FEditNote do
-          begin
-            x := IntToStr(CreatedNote.IEN) + U + TitleName + U + FloatToStr(FEditNote.DateTime) + U +
-                 Patient.Name + U + IntToStr(Author) + ';' + AuthorName + U + LocationName + U + 'new' + U +
-                 U + U + U + U + U + U + U;
-          end;
+        begin
+          x := IntToStr(CreatedNote.IEN) + U + TitleName + U + FloatToStr(FEditNote.DateTime) + U +
+               Patient.Name + U + IntToStr(Author) + ';' + AuthorName + U + LocationName + U + 'new' + U +
+               U + U + U + U + U + U + U;
+          //Link Note to PRF Action
+          if PRF_IEN <> 0 then
+            if sCallV('TIU LINK TO FLAG', [CreatedNote.IEN,PRF_IEN,ActionIEN,Patient.DFN]) = '0' then
+              ShowMessage('TIU LINK TO FLAG: FAILED');
+        end;
 
         lstNotes.Items.Insert(0, x);
@@ -995,5 +1020,5 @@
         FChanged := False;
         cmdChangeClick(Self); // will set captions, sign state for Changes
-        lstNotesClick(Self);  // will makepnlWrite visible
+        lstNotesClick(Self);  // will make pnlWrite visible
         if timAutoSave.Interval <> 0 then EnableAutosave := TRUE;
         if txtSubject.Visible then txtSubject.SetFocus else memNewNote.SetFocus;
@@ -1065,5 +1090,7 @@
     else HaveRequired := True;
   // lock the consult request if there is a consult
-  with FEditNote do if (PkgIEN > 0) and (PkgPtr = PKG_CONSULTS) then HaveRequired := LockConsultRequest(PkgIEN);
+  if HaveRequired then
+    with FEditNote do
+      if (PkgIEN > 0) and (PkgPtr = PKG_CONSULTS) then HaveRequired := LockConsultRequest(PkgIEN);
   if HaveRequired then
   begin
@@ -1285,6 +1312,11 @@
   inherited;
   LimitEditWidth(memNewNote, MAX_PROGRESSNOTE_WIDTH - 1);
-  memNewNote.Constraints.MinWidth := TextWidthByFont(memNewNote.Font.Handle, StringOfChar('X', MAX_PROGRESSNOTE_WIDTH)) + (LEFT_MARGIN * 2) + ScrollBarWidth;
-  pnlLeft.Width := self.ClientWidth - pnlWrite.Width - sptHorz.Width;
+
+  //CQ7012 Added test for nil
+  if memNewNote <> nil then
+     memNewNote.Constraints.MinWidth := TextWidthByFont(memNewNote.Font.Handle, StringOfChar('X', MAX_PROGRESSNOTE_WIDTH)) + (LEFT_MARGIN * 2) + ScrollBarWidth;
+  //CQ7012 Added test for nil
+   if (Self <> nil) and (pnlLeft <> nil) and (pnlWrite <> nil) and (sptHorz <> nil) then
+     pnlLeft.Width := self.ClientWidth - pnlWrite.Width - sptHorz.Width;
 end;
 
@@ -1395,5 +1427,6 @@
     // no other note being edited, so just proceed as before.
     UpdateEncounterInfo;
-  cmdPCE.Enabled := TRUE;
+  if cmdPCE <> nil then
+    cmdPCE.Enabled := TRUE
 end;
 
@@ -1466,4 +1499,5 @@
   OKPressed, IsIDChild: Boolean;
   x: string;
+  DisAssoText : String;
 begin
   inherited;
@@ -1471,4 +1505,14 @@
   LastTitle   := FEditNote.Title;
   FEditNote.IsNewNote := False;
+  DisAssoText := '';
+  if (FEditNote.PkgPtr = PKG_CONSULTS) then
+    DisAssoText := 'Consults';
+  if (FEditNote.PkgPtr = PKG_PRF) then
+    DisAssoText := 'Patient Record Flags';
+  if (DisAssoText <> '') and (Sender <> Self) then
+    if InfoBox('If this title is changed, Any '+DisAssoText+' will be disassociated'+
+               ' with this note',
+               'Disassociate '+DisAssoText+'?',MB_OKCANCEL) = IDCANCEL	 then
+      exit;
   if FEditNote.PkgPtr = PKG_CONSULTS then LastConsult := FEditNote.PkgIEN else LastConsult := 0;;
   if Sender <> Self then OKPressed := ExecuteNoteProperties(FEditNote, CT_NOTES, IsIDChild, FNewIDChild, '', 0)
@@ -1500,5 +1544,7 @@
   lstNotes.Items[EditingIndex] := x;
   Changes.ReplaceText(CH_DOC, lstNotes.ItemID, GetTitleText(EditingIndex));
-  with FEditNote do if (PkgPtr = PKG_CONSULTS) and (LastConsult <> PkgIEN) then
+  with FEditNote do
+  begin
+  if (PkgPtr = PKG_CONSULTS) and (LastConsult <> PkgIEN) then
   begin
     // try to lock the new consult, reset to previous if unable
@@ -1514,4 +1560,10 @@
     end;
   end;
+  //Link Note to PRF Action
+  if PRF_IEN <> 0 then
+    if sCallV('TIU LINK TO FLAG', [lstNotes.ItemIEN,PRF_IEN,ActionIEN,Patient.DFN]) = '0' then
+      ShowMessage('TIU LINK TO FLAG: FAILED');
+  end;
+
   if LastTitle <> FEditNote.Title then mnuActLoadBoilerClick(Self);
 end;
@@ -1532,5 +1584,5 @@
 end;
 
-procedure TfrmNotes.DoAutoSave;
+procedure TfrmNotes.DoAutoSave(Suppress: integer = 1);
 var
   ErrMsg: string;
@@ -1542,5 +1594,5 @@
     timAutoSave.Enabled := False;
     try
-      SetText(ErrMsg, memNewNote.Lines, lstNotes.GetIEN(EditingIndex),1);
+      SetText(ErrMsg, memNewNote.Lines, lstNotes.GetIEN(EditingIndex), Suppress);
     finally
       timAutoSave.Enabled := True;
@@ -1566,4 +1618,5 @@
 var
   AuthCtxt: TAuthorContext;
+  SearchCtxt: TSearchContext; // Text Search CQ: HDS00002856
   DateRange: TNoteDateRange;
   Saved: Boolean;
@@ -1602,4 +1655,20 @@
                    LoadNotes;
                  end;
+  // Text Search CQ: HDS00002856 --------------------
+  NC_SEARCHTEXT: begin;
+                   SearchTextStopFlag := False;
+                   SelectSearchText(Font.Size, FCurrentContext.SearchString, SearchCtxt );
+                   with SearchCtxt do if Changed then
+                   begin
+                     //FCurrentContext.Status := IntToStr(ViewContext);
+                     frmSearchStop.Show;
+                     lblNotes.Caption := 'Search: '+ SearchString;
+                     frmSearchStop.lblSearchStatus.Caption := lblNotes.Caption;
+                     FCurrentContext.SearchString := SearchString;
+                     LoadNotes;
+                   end;
+                   // Only do LoadNotes if something changed 
+                 end;
+  // Text Search CQ: HDS00002856 --------------------
   NC_UNCOSIGNED: begin
                    FillChar(FCurrentContext, SizeOf(FCurrentContext), 0);
@@ -1667,4 +1736,12 @@
   end; {case}
   lblNotes.Caption := SetNoteTreeLabel(FCurrentContext);
+  // Text Search CQ: HDS00002856 --------------------
+  If FCurrentContext.SearchString <> '' then
+    lblNotes.Caption := lblNotes.Caption+', containing "'+FCurrentContext.SearchString+'"';
+  If SearchTextStopFlag=True then begin;
+    lblNotes.Caption := 'Search for "'+FCurrentContext.SearchString+'" was stopped!';
+  end;
+  frmSearchStop.Hide;
+  // Text Search CQ: HDS00002856 --------------------
   lblNotes.hint := lblNotes.Caption;
   tvNotes.Caption := lblNotes.Caption;
@@ -2128,11 +2205,14 @@
 procedure TfrmNotes.SaveSignItem(const ItemID, ESCode: string);
 { saves and optionally signs a progress note or addendum }
+const
+  SIG_COSIGN = 'COSIGNATURE';
+  SIG_SIGN   = 'SIGNATURE';
 var
   AnIndex, IEN, i: Integer;
   Saved, ContinueSign: Boolean;  {*RAB* 8/26/99}
-  SignSts: TActionRec;
+  ActionSts, SignSts: TActionRec;
   APCEObject: TPCEData;
   OK: boolean;
-
+  ActionType, SignTitle: string;
 begin
   AnIndex := -1;
@@ -2159,5 +2239,20 @@
   if Length(ESCode) > 0 then
   begin
-    if not NoteHasText(IEN) then
+    if CosignDocument(IEN) then
+    begin
+      SignTitle := TX_COSIGN;
+      ActionType := SIG_COSIGN;
+    end else
+    begin
+      SignTitle := TX_SIGN;
+      ActionType := SIG_SIGN;
+    end;
+    ActOnDocument(ActionSts, IEN, ActionType);
+    if not ActionSts.Success then
+      begin
+        InfoBox(ActionSts.Reason, TX_IN_AUTH, MB_OK);
+        ContinueSign := False;
+      end
+    else if not NoteHasText(IEN) then
       begin
         InfoBox(TX_EMPTY_NOTE1, TC_EMPTY_NOTE, MB_OK or MB_ICONERROR);
@@ -2276,4 +2371,7 @@
 
 procedure TfrmNotes.popNoteMemoFindClick(Sender: TObject);
+//var
+  //hData: THandle;  //CQ8300
+  //pData: ^ClipboardData; //CQ8300
 begin
   inherited;
@@ -2284,4 +2382,14 @@
       FindText := '';
       Options := [frDown, frHideUpDown];
+{
+      //CQ8300
+      OpenClipboard(dlgFindText.Handle);
+      hData := GetClipboardData(CF_TEXT);
+      pData := GlobalLock(hData);
+      FindText := pData^.Text;
+      GlobalUnlock(hData);
+      CloseClipboard;
+      //end CQ8300
+}
       Execute;
     end;
@@ -2322,9 +2430,11 @@
 begin
   inherited;
-  DoAutoSave;
+  DoAutoSave(0);
   timAutoSave.Enabled := False;
   try
     SpellCheckForControl(memNewNote);
   finally
+    FChanged := True;
+    DoAutoSave(0);
     timAutoSave.Enabled := True;
   end;
@@ -2334,9 +2444,11 @@
 begin
   inherited;
-  DoAutoSave;
+  DoAutoSave(0);
   timAutoSave.Enabled := False;
   try
     GrammarCheckForControl(memNewNote);
   finally
+    FChanged := True;
+    DoAutoSave(0);
     timAutoSave.Enabled := True;
   end;
@@ -2399,4 +2511,5 @@
   SigAction: integer;
   SavedDocID: string;
+  ARefDate: TFMDateTime;
 begin
   inherited;
@@ -2432,5 +2545,6 @@
   if not LockConsultRequestAndNote(lstNotes.ItemIEN) then Exit;
   Exclusions := GetCurrentSigners(lstNotes.ItemIEN);
-  SelectAdditionalSigners(Font.Size, lstNotes.ItemIEN, SigAction, Exclusions, SignerList, CT_NOTES);
+  ARefDate := StrToFloat(Piece(lstNotes.Items[lstNotes.ItemIndex], U, 3));
+  SelectAdditionalSigners(Font.Size, lstNotes.ItemIEN, SigAction, Exclusions, SignerList, CT_NOTES, ARefDate);
   with SignerList do
     begin
@@ -2713,7 +2827,14 @@
 //===================  Added for sort/search enhancements ======================
 procedure TfrmNotes.LoadNotes;
+const
+  INVALID_ID = -1;
+  INFO_ID = 1;
 var
   tmpList: TStringList;
   ANode: TORTreeNode;
+  x,xx,noteId: integer;   // Text Search CQ: HDS00002856
+  Dest: TStrings;  // Text Search CQ: HDS00002856
+  KeepFlag: Boolean;  // Text Search CQ: HDS00002856
+  NoteCount, NoteMatches: integer;  // Text Search CQ: HDS00002856
 begin
   tmpList := TStringList.Create;
@@ -2759,4 +2880,50 @@
         ListNotesForTree(tmpList, StrToIntDef(Status, 0), FMBeginDate, FMEndDate, Author, MaxDocs, TreeAscending);
         CreateListItemsforDocumentTree(FDocList, tmpList, StrToIntDef(Status, 0), GroupBy, TreeAscending, CT_NOTES);
+
+        // Text Search CQ: HDS00002856 ---------------------------------------
+        if FCurrentContext.SearchString<>''  then   // Text Search CQ: HDS00002856
+          begin
+            NoteMatches := 0;
+            Dest:=TStringList.Create;
+            NoteCount:=FDocList.Count-1;
+            if FDocList.Count>0 then
+              for x := FDocList.Count-1 downto 1 do begin;  // Don't do 0, because it's informational
+                KeepFlag:=False;
+                lblNotes.Caption:='Scanning '+IntToStr(NoteCount-x+1)+' of '+IntToStr(NoteCount)+', '+IntToStr(NoteMatches);
+                If NoteMatches=1 then lblNotes.Caption:=lblNotes.Caption+' match' else
+                                      lblNotes.Caption:=lblNotes.Caption+' matches';
+                frmSearchStop.lblSearchStatus.Caption := lblNotes.Caption;
+                frmSearchStop.lblSearchStatus.Repaint;
+                lblNotes.Repaint;
+                // Free up some ticks so they can click the "Stop" button
+                application.processmessages;
+                application.processmessages;
+                application.processmessages;
+                If SearchTextStopFlag = False then begin
+                  noteId := StrToIntDef(Piece(FDocList.Strings[x],'^',1),-1);
+                  if (noteId = INVALID_ID) or (noteId = INFO_ID) then
+                    Continue;
+                  CallV('TIU GET RECORD TEXT', [Piece(FDocList.Strings[x],'^',1)]);
+                  Dest.Assign(RPCBrokerV.Results);
+                  If Dest.Count > 0 then
+                     for xx := 0 to Dest.Count-1 do
+                     begin
+                      //Dest.Strings[xx] := StringReplace(Dest.Strings[xx],'#13',' ',[rfReplaceAll, rfIgnoreCase]);
+                      if Pos(Uppercase(FCurrentContext.SearchString),Uppercase(Dest.Strings[xx]))>0 then
+                        keepflag:=true;
+                     end;
+                  If KeepFlag=False then begin;
+                    if FDocList.Count >= x then
+                      FDocList.Delete(x);
+                    if (tmpList.Count >= x) and (x > 0) then
+                      tmpList.Delete(x-1);
+                  end else
+                    Inc(NoteMatches);
+                end;
+              end;
+            Dest.Free;
+          end;
+        // Text Search CQ: HDS00002856 ---------------------------------------
+
         UpdateTreeView(FDocList, tvNotes);
       end;
@@ -3096,4 +3263,5 @@
 var
   WhyNot: string;
+  //Saved: boolean;
 begin
   if EditingIndex <> -1 then
@@ -3213,4 +3381,6 @@
 procedure TfrmNotes.ShowPCEButtons(Editing: boolean);
 begin
+  if frmFrame.Timedout then Exit;
+
   FEditingNotePCEObj := Editing;
   if Editing or AnytimeEncounters then
@@ -3424,5 +3594,5 @@
     SetPiece(x, U, 5, NewAuth + ';' + AuthNameCheck);
     lstNotes.Items[EditingIndex] := x;
-    if AskCosignerForTitle(Title, Author) then
+    if AskCosignerForTitle(Title, Author, DateTime) then
     begin
       InfoBox(UpperCase(AuthNameCheck) + TX_COSIGNER_REQD, TC_COSIGNER_REQD, MB_OK);
@@ -3495,5 +3665,5 @@
 procedure TfrmNotes.tvNotesExit(Sender: TObject);
 begin
-  if Boolean(Hi(GetKeyState(VK_TAB))) and (not Boolean(Hi(GetKeyState(VK_SHIFT))))then
+  if IncSecond(FMousing,1) < Now then
   begin
     if (Screen.ActiveControl = frmDrawers.pnlTemplatesButton) or
@@ -3503,4 +3673,22 @@
       FindNextControl( cmdPCE, True, True, False).SetFocus;
   end;
+  FMousing := 0;
+end;
+
+procedure TfrmNotes.pnlReadExit(Sender: TObject);
+begin
+  inherited;
+  if IncSecond(FMousing,1) < Now then
+  begin
+    if (Screen.ActiveControl = frmFrame.pnlPatient) then
+      FindNextControl( tvNotes, True, True, False).SetFocus
+    else
+    if (Screen.ActiveControl = frmDrawers.pnlTemplatesButton) or
+        (Screen.ActiveControl = frmDrawers.pnlEncounterButton) or
+        (Screen.ActiveControl = cmdNewNote) or
+        (Screen.ActiveControl = cmdPCE) then
+      FindNextControl( frmDrawers.pnlTemplatesButton, False, True, False).SetFocus;
+  end;
+  FMousing := 0;
 end;
 
@@ -3508,11 +3696,14 @@
 begin
   inherited;
-  if Boolean(Hi(GetKeyState(VK_TAB))) and
-     (not frmDrawers.pnlEncounterButton.CanFocus) and
-     (not Boolean(Hi(GetKeyState(VK_SHIFT)))) then
-    if (memPCEShow.CanFocus) then
-      memPCEShow.SetFocus
+  if IncSecond(FMousing,1) < Now then
+  begin
+    if (Screen.ActiveControl = lvNotes) or
+        (Screen.ActiveControl = memNote) then
+      frmFrame.pnlPatient.SetFocus
     else
-      frmFrame.pnlPatient.SetFocus;
+    if (Screen.ActiveControl = tvNotes) then
+      FindNextControl( frmFrame.pnlPatient, False, True, False).SetFocus;
+  end;
+  FMousing := 0;
 end;
 
@@ -3520,5 +3711,5 @@
 begin
   FOldFramePnlPatientExit(Sender);
-  if Boolean(Hi(GetKeyState(VK_TAB))) then
+  if IncSecond(FMousing,1) < Now then
   begin
     if (Screen.ActiveControl = lvNotes) or
@@ -3526,4 +3717,5 @@
       FindNextControl( lvNotes, False, True, False).SetFocus;
   end;
+  FMousing := 0;
 end;
 
@@ -3559,9 +3751,9 @@
 begin
   FOldDrawerPnlTemplatesButtonExit(Sender);
-  if Boolean(Hi(GetKeyState(VK_TAB))) and Boolean(Hi(GetKeyState(VK_SHIFT))) then
-    if memNewNote.CanFocus then
-      memNewNote.SetFocus
-    else if memNote.CanFocus then
-      memNote.SetFocus;
+  if Boolean(Hi(GetKeyState(VK_TAB))) and  (memNewNote.CanFocus) and
+     Boolean(Hi(GetKeyState(VK_SHIFT))) then
+    memNewNote.SetFocus
+  else
+    cmdNewNoteExit(Sender);
 end;
 
@@ -3570,4 +3762,11 @@
   FOldDrawerPnlEncounterButtonExit(Sender);
   cmdNewNoteExit(Sender);
+end;
+
+procedure TfrmNotes.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
+  Y: Integer);
+begin
+  inherited;
+  FMousing := Now;
 end;
 
@@ -3606,8 +3805,5 @@
   if Boolean(Hi(GetKeyState(VK_TAB))) then
     if Boolean(Hi(GetKeyState(VK_SHIFT))) then
-      if cmdPCE.CanFocus then
-        cmdPCE.SetFocus
-      else
-        cmdNewNote.SetFocus
+      cmdPCE.SetFocus
     else
       frmFrame.pnlPatient.SetFocus;
@@ -3629,30 +3825,26 @@
   if Boolean(Hi(GetKeyState(VK_TAB))) and
      Not Boolean(Hi(GetKeyState(VK_SHIFT))) then
-    memPCEShow.SetFocus;
-end;
-
-procedure TfrmNotes.memNoteExit(Sender: TObject);
-begin
-  inherited;
-  //Fix the Tab Order  Make Drawers Buttons Accessible
-  if Boolean(Hi(GetKeyState(VK_TAB))) then
-    if Boolean(Hi(GetKeyState(VK_SHIFT))) then
-    begin
-      if lvNotes.CanFocus then
-        lvNotes.SetFocus
-      else if tvNotes.CanFocus then
-        tvNotes.SetFocus;
-    end
-    else if frmDrawers.pnlTemplatesButton.CanFocus then
-      frmDrawers.pnlTemplatesButton.SetFocus
-
-end;
-
-procedure TfrmNotes.lvNotesExit(Sender: TObject);
-begin
-  inherited;
-  if Boolean(Hi(GetKeyState(VK_TAB))) and Boolean(Hi(GetKeyState(VK_SHIFT))) then
-    if tvNotes.CanFocus then
-      tvNotes.SetFocus
+        if memPCEShow.Visible then //CQ7120
+           memPCEShow.SetFocus; //CQ7120
+end;
+
+procedure TfrmNotes.ViewInfo(Sender: TObject);
+begin
+  inherited;
+  frmFrame.ViewInfo(Sender);
+end;
+
+procedure TfrmNotes.mnuViewInformationClick(Sender: TObject);
+begin
+  inherited;
+  mnuViewDemo.Enabled := frmFrame.pnlPatient.Enabled;
+  mnuViewVisits.Enabled := frmFrame.pnlVisit.Enabled;
+  mnuViewPrimaryCare.Enabled := frmFrame.pnlPrimaryCare.Enabled;
+  mnuViewMyHealtheVet.Enabled := not (Copy(frmFrame.laMHV.Hint, 1, 2) = 'No');
+  mnuInsurance.Enabled := not (Copy(frmFrame.laVAA2.Hint, 1, 2) = 'No');
+  mnuViewFlags.Enabled := frmFrame.lblFlag.Enabled;
+  mnuViewRemoteData.Enabled := frmFrame.lblCirn.Enabled;
+  mnuViewReminders.Enabled := frmFrame.pnlReminders.Enabled;
+  mnuViewPostings.Enabled := frmFrame.pnlPostings.Enabled;
 end;
 
@@ -3662,6 +3854,6 @@
 
 finalization
-  uPCEEdit.Free;
-  uPCEShow.Free;
+  if (uPCEEdit <> nil) then uPCEEdit.Free; //CQ7012 Added test for nil
+  if (uPCEShow <> nil) then uPCEShow.Free; //CQ7012 Added test for nil
 
 end.
Index: cprs/branches/foia-cprs/CPRS-Chart/fNotesBP.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fNotesBP.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fNotesBP.dfm	(revision 460)
@@ -12,17 +12,19 @@
   TextHeight = 13
   object Label1: TStaticText
-    Left = 6
-    Top = 6
-    Width = 229
-    Height = 13
+    Left = 0
+    Top = 0
+    Width = 310
+    Height = 17
+    Align = alTop
     AutoSize = False
     Caption = 'The selected title has associated boilerplate text.'
-    TabOrder = 3
+    TabOrder = 1
   end
   object radOptions: TRadioGroup
-    Left = 6
-    Top = 25
-    Width = 295
-    Height = 90
+    Left = 0
+    Top = 17
+    Width = 310
+    Height = 103
+    Align = alClient
     Caption = ' Choose from: '
     ItemIndex = 0
@@ -33,22 +35,30 @@
     TabOrder = 0
   end
-  object cmdPreview: TButton
-    Left = 6
-    Top = 127
-    Width = 79
-    Height = 21
-    Caption = 'Preview Text'
-    TabOrder = 1
-    OnClick = cmdPreviewClick
-  end
-  object cmdClose: TButton
-    Left = 230
-    Top = 127
-    Width = 72
-    Height = 21
-    Caption = 'OK'
-    Default = True
+  object btnPanel: TPanel
+    Left = 0
+    Top = 120
+    Width = 310
+    Height = 28
+    Align = alBottom
     TabOrder = 2
-    OnClick = cmdCloseClick
+    object cmdPreview: TButton
+      Left = 6
+      Top = 4
+      Width = 79
+      Height = 21
+      Caption = 'Preview Text'
+      TabOrder = 0
+      OnClick = cmdPreviewClick
+    end
+    object cmdClose: TButton
+      Left = 230
+      Top = 4
+      Width = 72
+      Height = 21
+      Caption = 'OK'
+      Default = True
+      TabOrder = 1
+      OnClick = cmdCloseClick
+    end
   end
 end
Index: cprs/branches/foia-cprs/CPRS-Chart/fNotesBP.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fNotesBP.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fNotesBP.pas	(revision 460)
@@ -11,4 +11,5 @@
     Label1: TStaticText;
     radOptions: TRadioGroup;
+    btnPanel: TPanel;
     cmdPreview: TButton;
     cmdClose: TButton;
Index: cprs/branches/foia-cprs/CPRS-Chart/fPage.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fPage.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fPage.pas	(revision 460)
@@ -46,5 +46,5 @@
 implementation
 
-uses ORFn, fFrame;
+uses ORFn, fFrame, uInit;
 
 {$R *.DFM}
@@ -152,5 +152,5 @@
   NextControl: TWinControl;
 begin
-  if Assigned(frmFrame) and frmFrame.Enabled and frmFrame.Visible then begin
+  if Assigned(frmFrame) and frmFrame.Enabled and frmFrame.Visible and not uInit.Timedout then begin
     NextControl := FindNextControl(nil, True, True, False);
     if NextControl <> nil then
Index: cprs/branches/foia-cprs/CPRS-Chart/fPatientFlagMulti.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fPatientFlagMulti.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fPatientFlagMulti.dfm	(revision 460)
@@ -1,7 +1,9 @@
 object frmFlags: TfrmFlags
-  Left = 457
-  Top = 74
+  Left = 210
+  Top = 169
   Width = 505
-  Height = 398
+  Height = 498
+  VertScrollBar.Range = 116
+  AutoScroll = False
   Caption = 'Patient Record Flags'
   Color = clBtnFace
@@ -15,4 +17,5 @@
   OnClose = FormClose
   OnCreate = FormCreate
+  OnDestroy = FormDestroy
   OnKeyDown = FormKeyDown
   OnShow = FormShow
@@ -27,27 +30,14 @@
     Align = alNone
   end
-  object Panel1: TPanel
+  object Splitter2: TSplitter
     Left = 0
-    Top = 340
+    Top = 308
     Width = 497
-    Height = 31
+    Height = 4
+    Cursor = crVSplit
     Align = alBottom
-    TabOrder = 1
-    DesignSize = (
-      497
-      31)
-    object btnClose: TButton
-      Left = 410
-      Top = 5
-      Width = 77
-      Height = 21
-      Anchors = [akRight, akBottom]
-      Cancel = True
-      Caption = 'Close'
-      TabOrder = 0
-      OnClick = btnCloseClick
-    end
+    MinSize = 45
   end
-  object Panel2: TPanel
+  object pnlTop: TORAutoPanel
     Left = 0
     Top = 0
@@ -57,5 +47,5 @@
     Constraints.MinHeight = 40
     Constraints.MinWidth = 300
-    TabOrder = 2
+    TabOrder = 0
     object lblFlags: TLabel
       Left = 1
@@ -73,11 +63,5 @@
       Height = 65
       Align = alClient
-      Font.Charset = DEFAULT_CHARSET
-      Font.Color = clWindowText
-      Font.Height = -11
-      Font.Name = 'Courier New'
-      Font.Style = []
-      ItemHeight = 14
-      ParentFont = False
+      ItemHeight = 13
       ParentShowHint = False
       ShowHint = True
@@ -90,15 +74,16 @@
     end
   end
-  object memFlags: TCaptionMemo
+  object memFlags: TRichEdit
     Left = 0
     Top = 80
     Width = 497
-    Height = 260
+    Height = 228
     Align = alClient
-    Font.Charset = DEFAULT_CHARSET
+    Font.Charset = ANSI_CHARSET
     Font.Color = clWindowText
     Font.Height = -11
     Font.Name = 'Courier New'
     Font.Style = []
+    HideScrollBars = False
     Lines.Strings = (
       '')
@@ -106,7 +91,82 @@
     ReadOnly = True
     ScrollBars = ssBoth
-    TabOrder = 0
+    TabOrder = 1
     WantReturns = False
     WordWrap = False
   end
+  object pnlNotes: TPanel
+    Left = 0
+    Top = 312
+    Width = 497
+    Height = 152
+    Align = alBottom
+    TabOrder = 2
+    object lblNoteTitle: TLabel
+      Left = 1
+      Top = 1
+      Width = 495
+      Height = 13
+      Align = alTop
+      Caption = 'lblNoteTitle'
+    end
+    object lvPRF: TCaptionListView
+      Left = 1
+      Top = 14
+      Width = 495
+      Height = 106
+      Align = alClient
+      Columns = <
+        item
+          Caption = 'Used For Screen Readers'
+          Width = 1
+        end
+        item
+          AutoSize = True
+          Caption = 'Date'
+        end
+        item
+          AutoSize = True
+          Caption = 'Action'
+        end
+        item
+          AutoSize = True
+          Caption = 'Author'
+        end>
+      Constraints.MinHeight = 50
+      HideSelection = False
+      Items.Data = {
+        6C0000000100000000000000FFFFFFFFFFFFFFFF03000000000000000857414E
+        44455245521C4F63746F6265722032302C20323030334031303A31353A32333A
+        3233115245414C4C59204C4F4E47205354554646115069636B6572696E672C20
+        4D6F726F6E69FFFFFFFFFFFF}
+      ReadOnly = True
+      RowSelect = True
+      TabOrder = 0
+      ViewStyle = vsReport
+      OnClick = lvPRFClick
+      OnKeyDown = lvPRFKeyDown
+    end
+    object pnlBottom: TORAutoPanel
+      Left = 1
+      Top = 120
+      Width = 495
+      Height = 31
+      Align = alBottom
+      TabOrder = 1
+      DesignSize = (
+        495
+        31)
+      object btnClose: TButton
+        Left = 410
+        Top = 5
+        Width = 77
+        Height = 21
+        Anchors = [akRight, akBottom]
+        Cancel = True
+        Caption = 'Close'
+        ModalResult = 2
+        TabOrder = 0
+      end
+    end
+  end
 end
Index: cprs/branches/foia-cprs/CPRS-Chart/fPatientFlagMulti.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fPatientFlagMulti.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fPatientFlagMulti.pas	(revision 460)
@@ -8,14 +8,31 @@
 
 type
-  TfrmFlags = class(TfrmAutoSz)
+  {This object holds a List of Notes Linked to a PRF as Returned VIA the RPCBroker}
+  TPRFNotes = class(TObject)
+  private
+    FPRFNoteList : TStringList;
+  public
+    //procedure to show the Notes in a ListView, requires a listview parameter
+    procedure ShowActionsOnList(DisplayList : TCaptionListView);
+    //procedure to load the notes, this will call the RPC
+    procedure Load(TitleIEN : Int64; DFN : String);
+    function getNoteIEN(index: integer): String;
+    constructor create;
+    destructor Destroy(); override;
+  end;
+
+  TfrmFlags = class(TForm)
     Splitter1: TSplitter;
-    Panel1: TPanel;
-    btnClose: TButton;
-    Panel2: TPanel;
+    pnlTop: TORAutoPanel;
     lblFlags: TLabel;
     lstFlags: TORListBox;
-    memFlags: TCaptionMemo;
+    memFlags: TRichEdit;
+    pnlNotes: TPanel;
+    lvPRF: TCaptionListView;
+    lblNoteTitle: TLabel;
+    Splitter2: TSplitter;
+    pnlBottom: TORAutoPanel;
+    btnClose: TButton;
     procedure lstFlagsClick(Sender: TObject);
-    procedure btnCloseClick(Sender: TObject);
     procedure FormKeyDown(Sender: TObject; var Key: Word;
       Shift: TShiftState);
@@ -23,9 +40,27 @@
     procedure FormCreate(Sender: TObject);
     procedure FormClose(Sender: TObject; var Action: TCloseAction);
+    procedure FormDestroy(Sender: TObject);
+    procedure lvPRFClick(Sender: TObject);
+    procedure lvPRFKeyDown(Sender: TObject; var Key: Word;
+      Shift: TShiftState);
   private
     FFlagID: integer;
+    FPRFNotes : TPRFNotes;
+    FNoteTitle: String;
+    procedure GetNotes();
   public
     { Public declarations }
   end;
+const
+  HIDDEN_COL = 'Press enter or space bar to view this note:';
+  //TIU GET LINKED PRF NOTES, return position constants
+  NOTE_IEN_POS = 1;
+  ACTION_POS = 2;
+  NOTE_DATE_POS = 3;
+  AUTHOR_POS = 4;
+  //TIU GET PRF TITLE, return position constants
+  NOTE_TITLE_IEN = 1;
+  NOTE_TITLE = 2;
+
 
 procedure ShowFlags(FlagId: integer = 0);
@@ -33,5 +68,5 @@
 implementation
 
-uses uCore,uOrPtf,ORFn;
+uses uCore,uOrPtf,ORFn, ORNet, uConst, fRptBox, rCover;
 {$R *.dfm}
 
@@ -45,9 +80,9 @@
     if HasFlag then
     begin
-      SetFormPosition(frmFlags);
+      //SetFormPosition(frmFlags);
       frmFlags.FFlagID := FlagId;
       frmFlags.lstFlags.Items.Assign(FlagList);
       frmFlags.memFlags.SelStart := 0;
-      //ResizeFormToFont(TForm(frmFlags));
+      ResizeFormToFont(TForm(frmFlags));
       frmFlags.ShowModal;
     end
@@ -68,10 +103,6 @@
       memFlags.Lines.Assign(FlagArray);
     memFlags.SelStart := 0;
-  end;
-end;
-
-procedure TfrmFlags.btnCloseClick(Sender: TObject);
-begin
-  Close;
+    GetNotes;
+  end;
 end;
 
@@ -89,4 +120,5 @@
 begin
   inherited;
+  SetFormPosition(Self);
   idx := 0;
   if FFlagID > 0 then idx := lstFlags.SelectByIEN(FFlagId);
@@ -94,4 +126,5 @@
   lstFlagsClick(Self);
   ActiveControl := memFlags;
+  GetNotes;
 end;
 
@@ -105,8 +138,91 @@
 begin
   inherited;
-  //SaveUserBounds(Self);
-end;
-
-
+  SaveUserBounds(Self);
+end;
+
+procedure TfrmFlags.GetNotes;
+var
+  NoteTitleIEN, FlagID : Int64;
+begin
+    if FPRFNotes = nil then
+      FPRFNotes := TPRFNotes.Create;
+    FlagID := lstFlags.ItemID;
+    CallV('TIU GET PRF TITLE', [Patient.DFN,FlagID]);
+    FNoteTitle := Piece(RPCBrokerV.Results[0],U,NOTE_TITLE);
+    lblNoteTitle.Caption := 'Signed, Linked Notes of Title: '+ FNoteTitle;
+    NoteTitleIEN := StrToInt(Piece(RPCBrokerV.Results[0],U,NOTE_TITLE_IEN));
+    FPRFNotes.Load(NoteTitleIEN,Patient.DFN);
+    FPRFNotes.ShowActionsOnList(lvPRF);
+    with lvPRF do begin
+
+      Columns.BeginUpdate;
+      Columns.EndUpdate;
+    end;
+end;
+
+{ TPRFNotes }
+
+constructor TPRFNotes.create;
+begin
+  inherited;
+  FPRFNoteList := TStringList.create;
+end;
+
+destructor TPRFNotes.Destroy;
+begin
+  FPRFNoteList.Free;
+  inherited;
+end;
+
+function TPRFNotes.getNoteIEN(index: integer): String;
+begin
+ Result := Piece(FPRFNoteList[index],U,NOTE_IEN_POS);
+end;
+
+procedure TPRFNotes.Load(TitleIEN: Int64; DFN: String);
+const
+  REVERSE_CHRONO = 1;
+begin
+  CallV('TIU GET LINKED PRF NOTES', [DFN,TitleIEN,REVERSE_CHRONO]);
+  FPRFNoteList.Assign(RPCBrokerV.Results);
+end;
+
+procedure TPRFNotes.ShowActionsOnList(DisplayList: TCaptionListView);
+var
+  i : integer;
+  ListItem: TListItem;
+begin
+  DisplayList.Clear;
+  for i := 0 to FPRFNoteList.Count-1 do
+  begin
+    //Caption="Text for Screen Reader" SubItem1=Flag SubItem2=Date SubItem3=Action SubItem4=Note
+    ListItem := DisplayList.Items.Add;
+    ListItem.Caption := HIDDEN_COL; //Screen readers don't read the first column title on a listview.
+    ListItem.SubItems.Add(Piece(FPRFNoteList[i],U,NOTE_DATE_POS));
+    ListItem.SubItems.Add(Piece(FPRFNoteList[i],U,ACTION_POS));
+    ListItem.SubItems.Add(Piece(FPRFNoteList[i],U,AUTHOR_POS));
+  end;
+end;
+
+procedure TfrmFlags.FormDestroy(Sender: TObject);
+begin
+  FPRFNotes.Free;
+end;
+
+procedure TfrmFlags.lvPRFClick(Sender: TObject);
+begin
+  if lvPRF.ItemIndex > -1 then
+  begin
+    NotifyOtherApps(NAE_REPORT, 'TIU^' + FPRFNotes.getNoteIEN(lvPRF.ItemIndex));
+    ReportBox(DetailPosting(FPRFNotes.getNoteIEN(lvPRF.ItemIndex)), FNoteTitle, True);
+  end;
+end;
+
+procedure TfrmFlags.lvPRFKeyDown(Sender: TObject; var Key: Word;
+  Shift: TShiftState);
+begin
+  if (Key = VK_SPACE) or (Key = VK_RETURN) then
+    lvPRFClick(Sender);
+end;
 
 end.
Index: cprs/branches/foia-cprs/CPRS-Chart/fProbEdt.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fProbEdt.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fProbEdt.pas	(revision 460)
@@ -140,13 +140,4 @@
 begin
   Result := not fChanged;
-(*  if not fChanged then
-    begin
-      result := true;
-      exit;
-    end;
-  if InfoBox('Discard changes?', 'Confirmation', MB_OKCANCEL or MB_ICONQUESTION) <> IDOK then
-    result := false
-  else
-    result := true;*)
 end;
 
@@ -160,16 +151,16 @@
   else
     begin
-    if (not FSilent) and
-       (InfoBox('Discard changes?', 'Confirmation', MB_YESNO or MB_ICONQUESTION) <> IDYES) then
-      begin
-        FCanQuit := False;
-        exit;
-      end
-    else
-      begin
-        frmProblems.lblProbList.caption := frmProblems.pnlRight.Caption ;
-        FCanQuit := True;
-        close;
-      end;
+      if (not FSilent) and
+         (InfoBox('Discard changes?', 'Add/Edit a Problem', MB_YESNO or MB_ICONQUESTION) <> IDYES) then
+        begin
+          FCanQuit := False;
+          exit;
+        end
+      else
+        begin
+          frmProblems.lblProbList.caption := frmProblems.pnlRight.Caption ;
+          FCanQuit := True;
+          close;
+        end;
     end;
 end;
@@ -388,4 +379,18 @@
 
     if Pos(Reason,'E,C') > 0 then ShowComments  ;
+    if ProbRec.CmtIsXHTML then
+      begin
+        bbAdd.Enabled := FALSE;
+        bbEdit.Enabled := FALSE;
+        bbRemove.Enabled := FALSE;
+        pnlComments.Hint := ProbRec.CmtNoEditReason;
+      end
+    else
+      begin
+        bbAdd.Enabled := TRUE;
+        bbEdit.Enabled := TRUE;
+        bbRemove.Enabled := TRUE;
+        pnlComments.Hint := '';
+      end ;
    // ===================  changed code - REV 7/30/98  =========================
    // PlUser.usVerifyTranscribed is a SITE requirement, not a user ability
Index: cprs/branches/foia-cprs/CPRS-Chart/fProbs.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fProbs.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fProbs.dfm	(revision 460)
@@ -1,5 +1,5 @@
 inherited frmProblems: TfrmProblems
-  Left = 206
-  Top = 198
+  Left = 627
+  Top = 64
   Width = 639
   Height = 409
@@ -23,4 +23,5 @@
     Width = 2
     Height = 358
+    OnMoved = sptHorzMoved
   end
   inherited pnlLeft: TPanel
@@ -317,4 +318,5 @@
         item
           ImageIndex = -1
+          MinWidth = 20
           Text = 'Description'
           Width = 65
@@ -322,4 +324,5 @@
         item
           ImageIndex = -1
+          MinWidth = 16
           Text = 'Onset Date'
           Width = 65
@@ -327,4 +330,5 @@
         item
           ImageIndex = -1
+          MinWidth = 16
           Text = 'Last Updated'
           Width = 80
@@ -385,5 +389,8 @@
           Width = 0
         end>
+      OnSectionClick = HeaderControlSectionClick
       OnSectionResize = HeaderControlSectionResize
+      OnMouseDown = HeaderControlMouseDown
+      OnMouseUp = HeaderControlMouseUp
     end
   end
@@ -443,4 +450,9 @@
       Caption = 'View Details'
       OnClick = lstProbActsClick
+    end
+    object mnuOptimizeFields: TMenuItem
+      Caption = 'Adjust Column Size'
+      Visible = False
+      OnClick = mnuOptimizeFieldsClick
     end
   end
@@ -514,4 +526,54 @@
         end
       end
+      object mnuViewInformation: TMenuItem
+        Caption = 'Information'
+        OnClick = mnuViewInformationClick
+        object mnuViewDemo: TMenuItem
+          Tag = 1
+          Caption = 'De&mographics...'
+          OnClick = ViewInfo
+        end
+        object mnuViewVisits: TMenuItem
+          Tag = 2
+          Caption = 'Visits/Pr&ovider...'
+          OnClick = ViewInfo
+        end
+        object mnuViewPrimaryCare: TMenuItem
+          Tag = 3
+          Caption = 'Primary &Care...'
+          OnClick = ViewInfo
+        end
+        object mnuViewMyHealtheVet: TMenuItem
+          Tag = 4
+          Caption = 'MyHealthe&Vet...'
+          OnClick = ViewInfo
+        end
+        object mnuInsurance: TMenuItem
+          Tag = 5
+          Caption = '&Insurance...'
+          OnClick = ViewInfo
+        end
+        object mnuViewFlags: TMenuItem
+          Tag = 6
+          Caption = '&Flags...'
+          OnClick = ViewInfo
+        end
+        object mnuViewRemoteData: TMenuItem
+          Tag = 7
+          Caption = 'Remote &Data...'
+          OnClick = ViewInfo
+        end
+        object mnuViewReminders: TMenuItem
+          Tag = 8
+          Caption = '&Reminders...'
+          Enabled = False
+          OnClick = ViewInfo
+        end
+        object mnuViewPostings: TMenuItem
+          Tag = 9
+          Caption = '&Postings...'
+          OnClick = ViewInfo
+        end
+      end
       object Z1: TMenuItem
         Caption = '-'
Index: cprs/branches/foia-cprs/CPRS-Chart/fProbs.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fProbs.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fProbs.pas	(revision 460)
@@ -79,4 +79,15 @@
     mnuChartSurgery: TMenuItem;
     HeaderControl: THeaderControl;
+    mnuViewInformation: TMenuItem;
+    mnuViewDemo: TMenuItem;
+    mnuViewVisits: TMenuItem;
+    mnuViewPrimaryCare: TMenuItem;
+    mnuViewMyHealtheVet: TMenuItem;
+    mnuInsurance: TMenuItem;
+    mnuViewFlags: TMenuItem;
+    mnuViewReminders: TMenuItem;
+    mnuViewRemoteData: TMenuItem;
+    mnuViewPostings: TMenuItem;
+    mnuOptimizeFields: TMenuItem;
     procedure mnuChartTabClick(Sender: TObject);
     procedure lstProbPickClick(Sender: TObject);
@@ -110,4 +121,16 @@
     procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X,
       Y: Integer);
+    procedure ViewInfo(Sender: TObject);
+    procedure mnuViewInformationClick(Sender: TObject);
+    procedure mnuOptimizeFieldsClick(Sender: TObject);
+    procedure HeaderControlSectionClick(HeaderControl: THeaderControl;
+      Section: THeaderSection);
+    procedure HeaderControlMouseUp(Sender: TObject; Button: TMouseButton;
+      Shift: TShiftState; X, Y: Integer);
+    procedure HeaderControlMouseDown(Sender: TObject; Button: TMouseButton;
+      Shift: TShiftState; X, Y: Integer);
+    function getTotalSectionsWidth : integer;
+    procedure setSectionWidths;
+    procedure sptHorzMoved(Sender: TObject);
   private
     FContextString: string;
@@ -179,4 +202,7 @@
   GridColWidths: Array[0..15] of integer =(0, 5, -1, 9, 9, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0);
 
+  type
+  arOrigSecWidths = array[0..15] of integer;
+
 var
   frmProblems: TfrmProblems;
@@ -185,4 +211,5 @@
   gFontWidth: Integer;
   gFixedWidth: Integer;
+  origWidths: arOrigSecWidths;
 
 implementation
@@ -544,4 +571,9 @@
                   exit;
                 end ;
+              if ProbRec.CmtIsXHTML then
+                begin
+                  InfoBox(ProbRec.CmtNoEditReason, 'Unable to add new comment', MB_ICONWARNING or MB_OK);
+                  exit;
+                end ;
               cmt := NewComment ;
               if (StrToInt(Piece(cmt, U, 1)) > 0) and (Piece(cmt, U, 3) <> '') then
@@ -882,4 +914,5 @@
   HeaderControl.Sections[AdjustCol].AutoSize := True;
   HeaderControl.Sections[AdjustCol].Width := HeaderControl.Width - cxUsed;
+  //mnuOptimizeFieldsClick(self);       //******** test making compression, proportional, or no spacing on resize
 end;
 
@@ -1586,4 +1619,5 @@
   end ;
   lstProbActsClick(Self) ;
+  mnuOptimizeFieldsClick(self);
 end;
 
@@ -1728,4 +1762,5 @@
   if Assigned(dlgProbs) then
     dlgProbs.SetFontSize( MainFontSize);
+  mnuOptimizeFieldsClick(self);
 end;
 
@@ -1810,4 +1845,11 @@
   inherited;
   wgProbData.Invalidate;
+  {FEvtColWidth := HeaderControl.Sections[0].Width;     //code from fOrders
+  RedrawSuspend(Self.Handle);
+  //RedrawOrderList;
+  RedrawActivate(Self.Handle);
+  wgProbData.Invalidate;
+  pnlRight.Refresh;
+  pnlLeft.Refresh; }
 end;
 
@@ -1929,4 +1971,106 @@
 end;
 
+procedure TfrmProblems.ViewInfo(Sender: TObject);
+begin
+  inherited;
+  frmFrame.ViewInfo(Sender);
+end;
+
+procedure TfrmProblems.mnuViewInformationClick(Sender: TObject);
+begin
+  inherited;
+  mnuViewDemo.Enabled := frmFrame.pnlPatient.Enabled;
+  mnuViewVisits.Enabled := frmFrame.pnlVisit.Enabled;
+  mnuViewPrimaryCare.Enabled := frmFrame.pnlPrimaryCare.Enabled;
+  mnuViewMyHealtheVet.Enabled := not (Copy(frmFrame.laMHV.Hint, 1, 2) = 'No');
+  mnuInsurance.Enabled := not (Copy(frmFrame.laVAA2.Hint, 1, 2) = 'No');
+  mnuViewFlags.Enabled := frmFrame.lblFlag.Enabled;
+  mnuViewRemoteData.Enabled := frmFrame.lblCirn.Enabled;
+  mnuViewReminders.Enabled := frmFrame.pnlReminders.Enabled;
+  mnuViewPostings.Enabled := frmFrame.pnlPostings.Enabled;
+end;
+
+procedure TfrmProblems.mnuOptimizeFieldsClick(Sender: TObject);
+var
+  totalSectionsWidth, unitvalue: integer;
+begin
+  totalSectionsWidth := pnlRight.Width - 3;
+  if totalSectionsWidth < 16 then exit;
+  unitvalue := round(totalSectionsWidth / 16);
+  with HeaderControl do
+  begin
+    if Sections[1].Width > 0 then Sections[1].Width := unitvalue;
+    Sections[2].Width := pnlRight.Width - (unitvalue * 11) - 5;
+    Sections[3].Width := unitvalue * 2;
+    Sections[4].Width := unitvalue * 2;
+    if Sections[6].Width > 0 then Sections[6].Width := unitvalue;
+    if Sections[7].Width > 0 then Sections[7].Width := unitvalue * 2;
+    if Sections[8].Width > 0 then Sections[8].Width := unitvalue * 2;
+    if Sections[15].Width > 0 then Sections[15].Width := unitvalue;
+  end;
+  HeaderControlSectionResize(HeaderControl, HeaderControl.Sections[0]);
+  HeaderControl.Repaint;
+end;
+
+procedure TfrmProblems.HeaderControlSectionClick(
+  HeaderControl: THeaderControl; Section: THeaderSection);
+begin
+  inherited;
+  //if Section = HeaderControl.Sections[1] then
+    mnuOptimizeFieldsClick(self);
+end;
+
+procedure TfrmProblems.HeaderControlMouseUp(Sender: TObject;
+  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+var
+  i: integer;
+  totalSectionsWidth, originalwidth: integer;
+begin
+  inherited;
+  totalSectionsWidth := getTotalSectionsWidth;
+  if totalSectionsWidth > wgProbData.Width - 5 then
+  begin
+    originalwidth := 0;
+    for i := 0 to HeaderControl.Sections.Count - 1 do
+      originalwidth := originalwidth + origWidths[i];
+    if originalwidth < totalSectionsWidth then
+    begin
+      for i := 0 to HeaderControl.Sections.Count - 1 do
+        HeaderControl.Sections[i].Width := origWidths[i];
+      wgProbData.Invalidate;
+    end;
+  end;
+end;
+
+function TfrmProblems.getTotalSectionsWidth : integer;
+var
+  i: integer;
+begin
+  Result := 0;
+  for i := 0 to HeaderControl.Sections.Count - 1 do
+     Result := Result + HeaderControl.Sections[i].Width;
+end;
+
+procedure TfrmProblems.HeaderControlMouseDown(Sender: TObject;
+  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
+begin
+  inherited;
+  setSectionWidths;
+end;
+
+procedure TfrmProblems.setSectionWidths;
+var
+  i: integer;
+begin
+  for i := 0 to 15 do
+     origWidths[i] := HeaderControl.Sections[i].Width;
+end;
+
+procedure TfrmProblems.sptHorzMoved(Sender: TObject);
+begin
+  inherited;
+  mnuOptimizeFieldsClick(self);
+end;
+
 end.
 
Index: cprs/branches/foia-cprs/CPRS-Chart/fPtSel.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fPtSel.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fPtSel.dfm	(revision 460)
@@ -1,7 +1,7 @@
 object frmPtSel: TfrmPtSel
-  Left = 161
-  Top = 100
-  Width = 812
-  Height = 612
+  Left = 81
+  Top = 89
+  Width = 793
+  Height = 589
   BorderIcons = []
   Caption = 'Patient Selection'
@@ -23,5 +23,5 @@
     Left = 0
     Top = 290
-    Width = 804
+    Width = 785
     Height = 4
     Cursor = crVSplit
@@ -31,5 +31,5 @@
     Left = 0
     Top = 294
-    Width = 804
+    Width = 785
     Height = 17
     Align = alTop
@@ -66,5 +66,5 @@
     Left = 0
     Top = 0
-    Width = 804
+    Width = 785
     Height = 290
     Align = alTop
@@ -135,7 +135,7 @@
     end
     object cmdSaveList: TButton
-      Left = 462
-      Top = 216
-      Width = 149
+      Left = 499
+      Top = 217
+      Width = 175
       Height = 18
       Caption = 'Save Patient List Settings'
@@ -146,6 +146,6 @@
   object pnlNotifications: TORAutoPanel
     Left = 0
-    Top = 550
-    Width = 804
+    Top = 527
+    Width = 785
     Height = 35
     Align = alBottom
@@ -205,6 +205,6 @@
     Left = 0
     Top = 311
-    Width = 804
-    Height = 239
+    Width = 785
+    Height = 216
     Align = alClient
     Columns = <
Index: cprs/branches/foia-cprs/CPRS-Chart/fPtSel.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fPtSel.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fPtSel.pas	(revision 460)
@@ -3,4 +3,6 @@
 
 {$OPTIMIZATION OFF}                              // REMOVE AFTER UNIT IS DEBUGGED
+
+{$define VAA}
 
 interface
@@ -77,4 +79,6 @@
     FsortAscending: boolean;
     FLastPt: string;
+    FsortDirection: string;
+    FUserCancelled: boolean;
     procedure AdjustFormSize(ShowNotif: Boolean; FontSize: Integer);
     procedure ClearIDInfo;
@@ -85,9 +89,10 @@
     procedure RPLDisplay;
     procedure AlertList;
+    procedure ReformatAlertDateTime;
   public
     procedure Loaded; override;
   end;
 
-procedure SelectPatient(ShowNotif: Boolean; FontSize: Integer);
+procedure SelectPatient(ShowNotif: Boolean; FontSize: Integer; var UserCancelled: boolean);
 
 var
@@ -114,5 +119,5 @@
   AliasString = ' -- ALIAS';
 
-procedure SelectPatient(ShowNotif: Boolean; FontSize: Integer);
+procedure SelectPatient(ShowNotif: Boolean; FontSize: Integer; var UserCancelled: boolean);
 { displays patient selection dialog (with optional notifications), updates Patient object }
 var
@@ -137,9 +142,12 @@
         end;
       Notifications.Clear;
+      FsortCol := -1;
       AlertList;
       ClearIDInfo;
       if (IsRPL = '1') then                          // Deal with restricted patient list users.
         RPLDisplay;                                  // Removes unnecessary components from view.
+      FUserCancelled := FALSE;
       ShowModal;
+      UserCancelled := FUserCancelled;
     end;
   finally
@@ -539,8 +547,9 @@
   if User.IsProvider then Encounter.Provider := User.DUZ;
 
-  GetBAStatus(Encounter.Provider,Encounter.Location);
+  GetBAStatus(Encounter.Provider,Patient.DFN);
   //HDS00005025
-   if BILLING_AWARE then
-     if Assigned(UBAGLOBALS.BAOrderList) then UBAGLOBALS.BAOrderList.Clear;
+  if BILLING_AWARE then
+    if Assigned(UBAGLOBALS.BAOrderList) then UBAGLOBALS.BAOrderList.Clear;
+  FUserCancelled := FALSE;
   Close;
 end;
@@ -549,4 +558,5 @@
 begin
   // Leave Patient object unchanged
+  FUserCancelled := TRUE;
   Close;
 end;
@@ -633,9 +643,12 @@
         lstvAlerts.Clear;
         AlertList;
+        //display alerts sorted according to parameter settings:
+        FsortCol := -1;     //CA - display alerts in correct sort
+        FormShow(Sender);
       end;
     if Items.Count = 0 then ShowButts(False);
     if SelCount <= 0 then ShowButts(False);
   end;
-  GetBAStatus(User.DUZ,Encounter.Location);
+  GetBAStatus(User.DUZ,Patient.DFN);
 end;
 
@@ -723,5 +736,5 @@
   lstvAlerts.Clear;
   AlertList;
-  FsortCol := 0;     //CA - display alerts in correct sort
+  FsortCol := -1;     //CA - display alerts in correct sort
   FormShow(Sender);  //CA - display alerts in correct sort
   if lstvAlerts.Items.Count = 0 then ShowButts(False);
@@ -805,5 +818,5 @@
 function ConvertDate(var thisList: TStringList; listIndex: integer) : string;
 {
- CQ1075: Convert date portion from yyyy/mm/dd to mm/dd/yyyy
+ Convert date portion from yyyy/mm/dd to mm/dd/yyyy
 }
 var
@@ -887,6 +900,5 @@
      for I := 0 to List.Count - 1 do
        begin
-       //CQ1075: Convert date portion from yyyy/mm/dd to mm/dd/yyyy
-       List[i] := ConvertDate(List, i);
+    //   List[i] := ConvertDate(List, i);  //cla commented out 8/9/04 CQ #4749
 
          if Piece(List[I], U, 1) <> 'Forwarded by: ' then
@@ -929,25 +941,30 @@
 
   if ((FsortCol = Column.Index) and (not SortViaKeyboard)) then
-        FsortAscending := not FsortAscending
+     FsortAscending := not FsortAscending;
+
+  if FsortAscending then
+     FsortDirection := 'F'
   else
-     if Column.Index = 4 then
-        FsortAscending := false
-     else
-        FsortAscending := true;
+     FsortDirection := 'R';
 
   FsortCol := Column.Index;
-  lstvAlerts.AlphaSort;
+
+  if FsortCol = 4 then
+    ReformatAlertDateTime //  hds7397- ge 2/6/6 sort and display date/time column correctly - as requested
+  else
+     lstvAlerts.AlphaSort;
   SortViaKeyboard := false;
+
 
   //Set the Notifications sort method to last-used sort-type
   //ie., user clicked on which column header last use of CPRS?
   case Column.Index of
-     0: rCore.SetSortMethod('I');
-     1: rCore.SetSortMethod('P');
-     2: rCore.SetSortMethod('L');
-     3: rCore.SetSortMethod('U');
-     4: rCore.SetSortMethod('D');
-     5: rCore.SetSortMethod('M');
-     6: rCore.SetSortMethod('F');
+     0: rCore.SetSortMethod('I', FsortDirection);
+     1: rCore.SetSortMethod('P', FsortDirection);
+     2: rCore.SetSortMethod('L', FsortDirection);
+     3: rCore.SetSortMethod('U', FsortDirection);
+     4: rCore.SetSortMethod('D', FsortDirection);
+     5: rCore.SetSortMethod('M', FsortDirection);
+     6: rCore.SetSortMethod('F', FsortDirection);
   end;
 end;
@@ -1022,5 +1039,5 @@
 //    pnlPrf.Visible := True;
   end
-//  else pnlPrf.Visible := False;
+  //else pnlPrf.Visible := False;
 end;
 
@@ -1043,5 +1060,5 @@
   if lstvAlerts.SelCount <= 0 then ShowButts(False)
   else ShowButts(True);
-  GetBAStatus(User.DUZ,Encounter.Location);
+  GetBAStatus(User.DUZ,Patient.DFN);
 end;
 
@@ -1100,7 +1117,14 @@
 }
 var
+  sortResult: string;
   sortMethod: string;
 begin
-  sortMethod := rCore.GetSortMethod;
+  sortResult := rCore.GetSortMethod;
+  sortMethod := Piece(sortResult, U, 1);
+  FsortDirection := Piece(sortResult, U, 2);
+  if FsortDirection = 'F' then
+     FsortAscending := true
+  else
+     FsortAscending := false;
 
   case sortMethod[1] of
@@ -1115,4 +1139,37 @@
 end;
 
+//hds7397- ge 2/6/6 sort and display date/time column correctly - as requested
+procedure  TfrmPtSel.ReformatAlertDateTime;
+var
+  I,J: Integer;
+  inDateStr, holdDayTime,srtDate: String;
+begin
+  // convert date to yyyy/mm/dd prior to sort.
+ for J := 0 to lstvAlerts.items.count -1 do
+  begin
+    inDateStr := '';
+    srtDate := '';
+    holdDayTime := '';
+    inDateStr := lstvAlerts.Items[j].SubItems[3];
+    srtDate := ( (Piece( Piece(inDateStr,'/',3), '@',1)) + '/' + Piece(inDateStr,'/',1) + '/' + Piece(inDateStr,'/',2) +'@'+ Piece(inDateStr, '@',2) );
+    lstvAlerts.Items[j].SubItems[3] := srtDate;
+  end;
+   //sort the listview records by date
+  lstvAlerts.AlphaSort;
+ // loop thru lstvAlerts change date to yyyy/mm/dd
+ // sort list
+ // change alert date/time back to mm/dd/yyyy@time for display
+  for I := 0 to lstvAlerts.items.Count -1 do
+   begin
+     inDateStr := '';
+     srtDate := '';
+     holdDayTime := '';
+     inDateStr :=   lstvAlerts.Items[i].SubItems[3];
+     holdDayTime := Piece(inDateStr,'/',3);  // dd@time
+     lstvAlerts.Items[i].SubItems[3] := (Piece(inDateStr, '/', 2) + '/' + Piece(holdDayTime, '@',1) +'/'
+                                            + Piece(inDateStr,'/',1) + '@' + Piece(holdDayTime,'@',2) );
+  end;
+end;
+
 Initialization
   SortViaKeyboard := false;
Index: cprs/branches/foia-cprs/CPRS-Chart/fPtSelMsg.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fPtSelMsg.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fPtSelMsg.dfm	(revision 460)
@@ -3,5 +3,5 @@
   Top = 421
   Width = 375
-  Height = 165
+  Height = 174
   Caption = 'Patient Lookup Messages'
   Color = clBtnFace
@@ -19,10 +19,10 @@
   DesignSize = (
     367
-    138)
+    140)
   PixelsPerInch = 96
   TextHeight = 13
   object cmdClose: TButton
     Left = 158
-    Top = 117
+    Top = 114
     Width = 60
     Height = 21
@@ -38,5 +38,5 @@
     Top = 0
     Width = 367
-    Height = 112
+    Height = 107
     Anchors = [akLeft, akTop, akRight, akBottom]
     Color = clCream
Index: cprs/branches/foia-cprs/CPRS-Chart/fPtSelOptns.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fPtSelOptns.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fPtSelOptns.dfm	(revision 460)
@@ -1,5 +1,5 @@
 object frmPtSelOptns: TfrmPtSelOptns
-  Left = 457
-  Top = 213
+  Left = 1354
+  Top = 190
   BorderStyle = bsNone
   Caption = 'frmPtSelOptns'
@@ -145,4 +145,5 @@
       OnMouseClick = cboListMouseClick
       OnNeedData = cboListNeedData
+      CharsNeedMatch = 1
     end
     object cboDateRange: TORComboBox
@@ -169,4 +170,5 @@
       OnExit = cboDateRangeExit
       OnMouseClick = cboDateRangeMouseClick
+      CharsNeedMatch = 1
     end
   end
Index: cprs/branches/foia-cprs/CPRS-Chart/fPtSelOptns.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fPtSelOptns.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fPtSelOptns.pas	(revision 460)
@@ -218,6 +218,35 @@
 end;
 
-procedure TfrmPtSelOptns.cboListNeedData(Sender: TObject;
-  const StartFrom: String; Direction, InsertAt: Integer);
+procedure TfrmPtSelOptns.cboListNeedData(Sender: TObject; const StartFrom: String; Direction, InsertAt: Integer);
+{CQ6363 Notes: This procedure was altered for CQ6363, but then changed back to its original form, as it is now.
+
+The problem is that in LOM1T, there are numerous entries in the HOSPITAL LOCATION file (44) that are lower-case,
+resulting in a "B" xref that looks like this:
+
+^SC("B","module 1x",2897) = 
+^SC("B","pt",3420) = 
+^SC("B","read",3146) = 
+^SC("B","zz GIM/WONG NEW",2902) = 
+^SC("B","zz bhost/arm",3076) = 
+^SC("B","zz bhost/day",2698) = 
+^SC("B","zz bhost/eve/ornelas",2885) = 
+^SC("B","zz bhost/resident",2710) = 
+^SC("B","zz bhost/sws",2946) = 
+^SC("B","zz c&P ortho/patel",3292) = 
+^SC("B","zz mhc md/kelley",320) = 
+^SC("B","zz/mhc/p",1076) = 
+^SC("B","zzMHC MD/THRASHER",1018) = 
+^SC("B","zztest clinic",3090) = 
+^SC("B","zzz-hbpc-phone-jung",1830) = 
+^SC("B","zzz-hbpcphone cocohran",1825) = 
+^SC("B","zzz-home service",1428) = 
+^SC("B","zzz-phone-deloye",1834) = 
+^SC("B","zzz/gmonti impotence",2193) =
+
+ASCII sort mode puts those entries at the end of the "B" xref, but when retrieved by CPRS and upper-cased, it
+messes up the logic of the combo box.  This problem has been around since there was a CPRS GUI, and the best
+possible fix is to require those entries to either be in all uppercase or be removed.  If that's cleaned up,
+the logic below will work correctly.
+}
 begin
   case frmPtSelOptns.SrcType of
Index: cprs/branches/foia-cprs/CPRS-Chart/fReminderDialog.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fReminderDialog.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fReminderDialog.dfm	(revision 460)
@@ -1,5 +1,5 @@
 object frmRemDlg: TfrmRemDlg
-  Left = 256
-  Top = 161
+  Left = 357
+  Top = 260
   Width = 545
   Height = 407
@@ -41,14 +41,4 @@
     Caption = 'Label1'
   end
-  object lblFootnotes: TStaticText
-    Left = 0
-    Top = 365
-    Width = 537
-    Height = 15
-    Align = alBottom
-    AutoSize = False
-    Caption = ' * Indicates a Required Field'
-    TabOrder = 3
-  end
   object sb1: TScrollBox
     Left = 0
@@ -69,132 +59,4 @@
     OnResize = sbResize
   end
-  object pnlBottom: TPanel
-    Left = 0
-    Top = 221
-    Width = 537
-    Height = 144
-    Align = alBottom
-    TabOrder = 2
-    object splText: TSplitter
-      Left = 1
-      Top = 94
-      Width = 535
-      Height = 3
-      Cursor = crVSplit
-      Align = alBottom
-    end
-    object reData: TRichEdit
-      Left = 1
-      Top = 97
-      Width = 535
-      Height = 46
-      Align = alBottom
-      Color = clCream
-      ReadOnly = True
-      ScrollBars = ssVertical
-      TabOrder = 2
-      WantReturns = False
-    end
-    object reText: TRichEdit
-      Left = 1
-      Top = 25
-      Width = 535
-      Height = 69
-      Align = alClient
-      Color = clCream
-      Font.Charset = ANSI_CHARSET
-      Font.Color = clWindowText
-      Font.Height = -11
-      Font.Name = 'Courier New'
-      Font.Style = []
-      ParentFont = False
-      ReadOnly = True
-      ScrollBars = ssBoth
-      TabOrder = 1
-      WantReturns = False
-      WordWrap = False
-    end
-    object pnlButtons: TORAutoPanel
-      Left = 1
-      Top = 1
-      Width = 535
-      Height = 24
-      Align = alTop
-      BevelOuter = bvNone
-      ParentShowHint = False
-      ShowHint = True
-      TabOrder = 0
-      object btnClear: TButton
-        Left = 2
-        Top = 2
-        Width = 66
-        Height = 21
-        Hint = 'Clear Reminder Resolutions for this Reminder'
-        Caption = 'Clear'
-        TabOrder = 0
-        OnClick = btnClearClick
-      end
-      object btnBack: TButton
-        Left = 263
-        Top = 2
-        Width = 66
-        Height = 21
-        Hint = 'Go back to the Previous Reminder Dialog'
-        Caption = '<  Back'
-        TabOrder = 3
-        OnClick = btnBackClick
-      end
-      object btnCancel: TButton
-        Left = 467
-        Top = 2
-        Width = 66
-        Height = 21
-        Hint = 'Cancel All Reminder Dialog Processing'
-        Cancel = True
-        Caption = 'Cancel'
-        TabOrder = 6
-        OnClick = btnCancelClick
-      end
-      object btnNext: TButton
-        Left = 331
-        Top = 2
-        Width = 66
-        Height = 21
-        Hint = 'Go on to the Next Reminder Dialog'
-        Caption = 'Next  >'
-        TabOrder = 4
-        OnClick = btnNextClick
-      end
-      object btnFinish: TButton
-        Left = 399
-        Top = 2
-        Width = 66
-        Height = 21
-        Hint = 'Finish Processing'
-        Caption = 'Finish'
-        TabOrder = 5
-        OnClick = btnFinishClick
-      end
-      object btnClinMaint: TButton
-        Left = 70
-        Top = 2
-        Width = 105
-        Height = 21
-        Hint = 'View the Clinical Maintenance Component'
-        Caption = 'Clinical &Maint'
-        TabOrder = 1
-        OnClick = btnClinMaintClick
-      end
-      object btnVisit: TButton
-        Left = 177
-        Top = 2
-        Width = 84
-        Height = 21
-        Caption = '&Visit Info'
-        TabOrder = 2
-        OnClick = btnVisitClick
-      end
-    end
-  end
   object sb2: TScrollBox
     Left = 0
@@ -214,3 +76,150 @@
     OnResize = sbResize
   end
+  object pnlFrmBottom: TPanel
+    Left = 0
+    Top = 221
+    Width = 537
+    Height = 159
+    Align = alBottom
+    BevelOuter = bvNone
+    TabOrder = 2
+    object pnlBottom: TPanel
+      Left = 0
+      Top = 0
+      Width = 537
+      Height = 144
+      Align = alClient
+      TabOrder = 0
+      object splText: TSplitter
+        Left = 1
+        Top = 94
+        Width = 535
+        Height = 3
+        Cursor = crVSplit
+        Align = alBottom
+      end
+      object reData: TRichEdit
+        Left = 1
+        Top = 97
+        Width = 535
+        Height = 46
+        Align = alBottom
+        Color = clCream
+        ReadOnly = True
+        ScrollBars = ssVertical
+        TabOrder = 2
+        WantReturns = False
+      end
+      object reText: TRichEdit
+        Left = 1
+        Top = 25
+        Width = 535
+        Height = 69
+        Align = alClient
+        Color = clCream
+        Font.Charset = ANSI_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -11
+        Font.Name = 'Courier New'
+        Font.Style = []
+        ParentFont = False
+        ReadOnly = True
+        ScrollBars = ssBoth
+        TabOrder = 1
+        WantReturns = False
+        WordWrap = False
+      end
+      object pnlButtons: TORAutoPanel
+        Left = 1
+        Top = 1
+        Width = 535
+        Height = 24
+        Align = alTop
+        BevelOuter = bvNone
+        ParentShowHint = False
+        ShowHint = True
+        TabOrder = 0
+        object btnClear: TButton
+          Left = 2
+          Top = 2
+          Width = 66
+          Height = 21
+          Hint = 'Clear Reminder Resolutions for this Reminder'
+          Caption = 'Clear'
+          TabOrder = 0
+          OnClick = btnClearClick
+        end
+        object btnBack: TButton
+          Left = 263
+          Top = 2
+          Width = 66
+          Height = 21
+          Hint = 'Go back to the Previous Reminder Dialog'
+          Caption = '<  Back'
+          TabOrder = 3
+          OnClick = btnBackClick
+        end
+        object btnCancel: TButton
+          Left = 467
+          Top = 2
+          Width = 66
+          Height = 21
+          Hint = 'Cancel All Reminder Dialog Processing'
+          Cancel = True
+          Caption = 'Cancel'
+          TabOrder = 6
+          OnClick = btnCancelClick
+        end
+        object btnNext: TButton
+          Left = 331
+          Top = 2
+          Width = 66
+          Height = 21
+          Hint = 'Go on to the Next Reminder Dialog'
+          Caption = 'Next  >'
+          TabOrder = 4
+          OnClick = btnNextClick
+        end
+        object btnFinish: TButton
+          Left = 399
+          Top = 2
+          Width = 66
+          Height = 21
+          Hint = 'Finish Processing'
+          Caption = 'Finish'
+          TabOrder = 5
+          OnClick = btnFinishClick
+        end
+        object btnClinMaint: TButton
+          Left = 70
+          Top = 2
+          Width = 105
+          Height = 21
+          Hint = 'View the Clinical Maintenance Component'
+          Caption = 'Clinical &Maint'
+          TabOrder = 1
+          OnClick = btnClinMaintClick
+        end
+        object btnVisit: TButton
+          Left = 177
+          Top = 2
+          Width = 84
+          Height = 21
+          Caption = '&Visit Info'
+          TabOrder = 2
+          OnClick = btnVisitClick
+        end
+      end
+    end
+    object lblFootnotes: TStaticText
+      Left = 0
+      Top = 144
+      Width = 537
+      Height = 15
+      Align = alBottom
+      AutoSize = False
+      Caption = ' * Indicates a Required Field'
+      TabOrder = 1
+    end
+  end
 end
Index: cprs/branches/foia-cprs/CPRS-Chart/fReminderDialog.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fReminderDialog.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fReminderDialog.pas	(revision 460)
@@ -11,5 +11,10 @@
   TfrmRemDlg = class(TForm)
     sb1: TScrollBox;
+    sb2: TScrollBox;
+    splTxtData: TSplitter;
+    Label1: TLabel;
+    pnlFrmBottom: TPanel;
     pnlBottom: TPanel;
+    splText: TSplitter;
     reData: TRichEdit;
     reText: TRichEdit;
@@ -20,11 +25,7 @@
     btnNext: TButton;
     btnFinish: TButton;
-    sb2: TScrollBox;
-    splTxtData: TSplitter;
-    splText: TSplitter;
     btnClinMaint: TButton;
+    btnVisit: TButton;
     lblFootnotes: TStaticText;
-    btnVisit: TButton;
-    Label1: TLabel;
     procedure FormClose(Sender: TObject; var Action: TCloseAction);
     procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
@@ -368,8 +369,8 @@
   reData.Color := ReadOnlyColor;
   reText.Color := ReadOnlyColor;
- (* FSCCond := EligbleConditions;
-  FSCRelated  := SCC_NA;              AGP Change 25.2
+  FSCCond := EligbleConditions;
+ (* FSCRelated  := SCC_NA;
   FAORelated  := SCC_NA;
-  FIRRelated  := SCC_NA;
+  FIRRelated  := SCC_NA;       AGP Change 25.2
   FECRelated  := SCC_NA;
   FMSTRelated := SCC_NA;
@@ -377,5 +378,5 @@
   FCVRelated  := SCC_NA;
   with FSCCond do
-    FSCPrompt := (SCAllow or AOAllow or IRAllow or ECAllow or MSTAllow or HNCAllow or CVAllow);  *)
+    FSCPrompt := (SCAllow or AOAllow or IRAllow or ECAllow or MSTAllow or HNCAllow or CVAllow); *)
   NotifyWhenRemindersChange(RemindersChanged);
   RemForm.Drawers.NotifyWhenRemTreeChanges(RemindersChanged);
@@ -504,5 +505,5 @@
   begin
     Box := GetBox(TRUE);
-    if Box.ControlCount > 0 then ClearControls; //AGP Change 25.7 this change should
+    if Box.ControlCount > 0 then ClearControls; //AGP Change 26.1 this change should
                                                 //resolve the problem with Duplicate CheckBoxes
                                                 //appearing on some reminder dialogs CQ #2843
@@ -754,6 +755,7 @@
   msg, RemWipe: string;
 
-begin
- //AGP 25.11 Move RemWipe section to cancel button to
+
+begin
+ //AGP 25.11 Added RemWipe section to cancel button to
  //flag the patient specific dialog to be destroy if not in process.
  RemWipe := '';
@@ -761,5 +763,5 @@
     begin
       Result := TRUE;
-      if Piece(FReminder.DlgData,U,3)='1' then RemWipe := Piece(FReminder.DlgData,U,1);
+      if FReminder.RemWipe = 1 then RemWipe := Piece(FReminder.DlgData,U,1);
     end
   else
@@ -769,5 +771,6 @@
     for i := 0 to RemindersInProcess.Count-1 do
     begin
-      if Piece(TReminder(RemindersInProcess.Objects[i]).RemData,U,11)='1' then
+      //if Piece(TReminder(RemindersInProcess.Objects[i]).RemData,U,11)='1' then
+      if TReminderDialog(TReminder(RemindersInProcess.Objects[i])).RemWipe = 1 then
           begin
              if RemWipe ='' then RemWipe := TReminder(RemindersInProcess.Objects[i]).IEN
@@ -1040,5 +1043,5 @@
               begin
                  Rem := FReminder;
-                 if Piece(Rem.DlgData,U,3)='1' then
+                 if Rem.RemWipe = 1 then
                      RemWipe := Piece(Rem.DlgData,U,1);
               end
@@ -1046,5 +1049,5 @@
               begin
                 Rem := TReminder(RemindersInProcess.Objects[i]);
-                if Piece(TReminder(RemindersInProcess.Objects[i]).RemData,U,11)='1' then
+                if TReminderDialog(TReminder(RemindersInProcess.Objects[i])).RemWipe = 1 then
                    begin
                      if RemWipe ='' then RemWipe := TReminder(RemindersInProcess.Objects[i]).IEN
@@ -1158,6 +1161,6 @@
         begin
           PCEObj := RemForm.PCEObj;
-      (* AGP Change 25.2 Remove this section base on the Clinical Workgroup decision
-         if FSCPrompt and (ndSC in PCEObj.NeededPCEData) then
+        (* AGP CHANGE 23.2 Remove this section base on the Clinical Workgroup decision
+          if FSCPrompt and (ndSC in PCEObj.NeededPCEData) then
             btnVisitClick(nil);
           PCEObj.SCRelated  := FSCRelated;
@@ -1167,5 +1170,5 @@
           PCEObj.MSTRelated := FMSTRelated;
           PCEObj.HNCRelated := FHNCRelated;
-          PCEObj.CVRelated  := FCVRelated;  *)
+          PCEObj.CVRelated  := FCVRelated; *)
           if not FProcessingTemplate then
           begin
@@ -1283,6 +1286,6 @@
                                     if(FVitalsDate = 0) then
                                     begin
-                                      FVitalsDate := RemForm.PCEObj.VisitDateTime;
-                                      StoreVitals := ValidVitalsDate(FVitalsDate, TRUE);
+                                      FVitalsDate := TRemData(TmpData.Objects[i]).Parent.VitalDateTime;
+                                      StoreVitals := ValidVitalsDate(FVitalsDate, TRUE, FALSE);  //AGP Change 26.1
                                       if (not StoreVitals) then break;
                                     end;
@@ -1350,5 +1353,8 @@
                   VitalList.Insert(0, VitalDateStr     + FloatToStr(FVitalsDate));
                   VitalList.Insert(1, VitalPatientStr  + Patient.DFN);
-                  VitalList.Insert(2, VitalLocationStr + IntToStr(Encounter.Location));
+                  if IntToStr(Encounter.Location) <> '0' then //AGP change 26.9
+                     VitalList.Insert(2, VitalLocationStr + IntToStr(Encounter.Location))
+                  else
+                     VitalList.Insert(2, VitalLocationStr + IntToStr(RemForm.PCEObj.Location));;
                   Tmp := ValAndStoreVitals(VitalList);
                   if (Tmp <> 'True') then
@@ -1587,5 +1593,5 @@
 begin
   if FVitalsDate = 0 then
-    VitalsDate := RemForm.PCEObj.VisitDateTime
+    VitalsDate := FMNow  //AGP Change 26.1
   else
     VitalsDate := FVitalsDate;
Index: cprs/branches/foia-cprs/CPRS-Chart/fReminderTree.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fReminderTree.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fReminderTree.dfm	(revision 460)
@@ -20,5 +20,4 @@
   OnCreate = FormCreate
   OnDestroy = FormDestroy
-  OnKeyUp = FormKeyUp
   PixelsPerInch = 96
   TextHeight = 13
@@ -172,4 +171,9 @@
         OnClick = mnuCoverSheetClick
       end
+      object mnuExit: TMenuItem
+        Caption = 'E&xit Available Reminders'
+        ShortCut = 27
+        OnClick = mnuExitClick
+      end
     end
   end
Index: cprs/branches/foia-cprs/CPRS-Chart/fReminderTree.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fReminderTree.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fReminderTree.pas	(revision 460)
@@ -23,4 +23,5 @@
     memEvalCat: TMenuItem;
     mnuCoverSheet: TMenuItem;
+    mnuExit: TMenuItem;
     procedure FormClose(Sender: TObject; var Action: TCloseAction);
     procedure FormCreate(Sender: TObject);
@@ -47,9 +48,8 @@
     procedure memEvalCatClick(Sender: TObject);
     procedure mnuCoverSheetClick(Sender: TObject);
-    procedure FormKeyUp(Sender: TObject; var Key: Word;
-      Shift: TShiftState);
     procedure tvRemNodeCaptioning(Sender: TObject; var Caption: String);
     procedure tvRemAddition(Sender: TObject; Node: TTreeNode);
     procedure tvRemDeletion(Sender: TObject; Node: TTreeNode);
+    procedure mnuExitClick(Sender: TObject);
   private
     FLinking: boolean;
@@ -689,14 +689,4 @@
 end;
 
-procedure TfrmReminderTree.FormKeyUp(Sender: TObject; var Key: Word;
-  Shift: TShiftState);
-begin
-  if Key = VK_ESCAPE then
-  begin
-    Key := 0;
-    Close;
-  end;
-end;
-
 procedure TfrmReminderTree.tvRemNodeCaptioning(Sender: TObject;
   var Caption: String);
@@ -724,3 +714,8 @@
 end;
 
+procedure TfrmReminderTree.mnuExitClick(Sender: TObject);
+begin
+  Close;
+end;
+
 end.
Index: cprs/branches/foia-cprs/CPRS-Chart/fRenewOutMed.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fRenewOutMed.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fRenewOutMed.dfm	(revision 460)
@@ -1,102 +1,111 @@
 inherited frmRenewOutMed: TfrmRenewOutMed
-  Left = 338
-  Top = 413
-  Height = 257
-  Caption = 'Change Refills/Comments for Outpatient Medication'
+  Left = 334
+  Top = 436
+  Width = 364
+  Height = 227
+  Caption = 'Change Refills for Outpatient Medication'
   Position = poScreenCenter
   OnCreate = FormCreate
   PixelsPerInch = 96
   TextHeight = 13
-  object lblRefills: TLabel
-    Left = 8
-    Top = 80
-    Width = 28
-    Height = 13
-    Caption = 'Refills'
-  end
-  object lblComments: TLabel
-    Left = 8
-    Top = 123
-    Width = 49
-    Height = 13
-    Caption = 'Comments'
-    Enabled = False
-    Visible = False
-  end
-  object lblPickup: TLabel
-    Left = 74
-    Top = 81
-    Width = 38
-    Height = 13
-    Caption = 'Pick Up'
-  end
-  object cmdOK: TButton
-    Left = 267
-    Top = 201
-    Width = 72
-    Height = 21
-    Caption = 'OK'
-    Default = True
-    TabOrder = 3
-    OnClick = cmdOKClick
-  end
-  object cmdCancel: TButton
-    Left = 347
-    Top = 201
-    Width = 72
-    Height = 21
-    Cancel = True
-    Caption = 'Cancel'
-    TabOrder = 4
-    OnClick = cmdCancelClick
-  end
   object memOrder: TCaptionMemo
-    Left = 8
-    Top = 16
-    Width = 411
-    Height = 48
+    Left = 0
+    Top = 0
+    Width = 356
+    Height = 88
+    Align = alClient
     Color = clBtnFace
     ReadOnly = True
-    TabOrder = 5
+    ScrollBars = ssVertical
+    TabOrder = 0
     Caption = 'Order'
   end
-  object memComments: TCaptionMemo
-    Left = 8
-    Top = 137
-    Width = 411
-    Height = 48
-    Enabled = False
+  object pnlButtons: TPanel
+    Left = 0
+    Top = 152
+    Width = 356
+    Height = 41
+    Align = alBottom
+    BevelOuter = bvNone
     TabOrder = 2
-    Visible = False
-    Caption = 'Comments'
+    DesignSize = (
+      356
+      41)
+    object cmdOK: TButton
+      Left = 173
+      Top = 7
+      Width = 72
+      Height = 27
+      Anchors = [akTop, akRight]
+      Caption = 'OK'
+      Default = True
+      TabOrder = 0
+      OnClick = cmdOKClick
+    end
+    object cmdCancel: TButton
+      Left = 248
+      Top = 7
+      Width = 103
+      Height = 27
+      Anchors = [akTop, akRight]
+      Cancel = True
+      Caption = 'Cancel'
+      TabOrder = 1
+      OnClick = cmdCancelClick
+    end
   end
-  object txtRefills: TCaptionEdit
-    Left = 8
-    Top = 94
-    Width = 49
-    Height = 21
-    TabOrder = 0
-    Caption = 'Refills'
-  end
-  object cboPickup: TORComboBox
-    Left = 74
-    Top = 95
-    Width = 106
-    Height = 21
-    Style = orcsDropDown
-    AutoSelect = True
-    Caption = 'Pick Up'
-    Color = clWindow
-    DropDownCount = 8
-    ItemHeight = 13
-    ItemTipColor = clWindow
-    ItemTipEnable = True
-    ListItemsOnly = True
-    LongList = False
-    MaxLength = 0
-    Pieces = '2'
-    Sorted = False
-    SynonymChars = '<>'
-    TabOrder = 1
+  object pnlMiddle: TPanel
+    Left = 0
+    Top = 88
+    Width = 356
+    Height = 64
+    Align = alBottom
+    BevelOuter = bvNone
+    TabOrder = 3
+    object lblPickup: TLabel
+      Left = 100
+      Top = 7
+      Width = 38
+      Height = 13
+      Caption = 'Pick Up'
+    end
+    object lblRefills: TLabel
+      Left = 8
+      Top = 7
+      Width = 28
+      Height = 13
+      Caption = 'Refills'
+    end
+    object cboPickup: TORComboBox
+      Left = 100
+      Top = 31
+      Width = 125
+      Height = 21
+      Style = orcsDropDown
+      AutoSelect = True
+      Caption = 'Pick Up'
+      Color = clWindow
+      DropDownCount = 8
+      ItemHeight = 13
+      ItemTipColor = clWindow
+      ItemTipEnable = True
+      ListItemsOnly = True
+      LongList = False
+      LookupPiece = 0
+      MaxLength = 0
+      Pieces = '2'
+      Sorted = False
+      SynonymChars = '<>'
+      TabOrder = 0
+      CharsNeedMatch = 1
+    end
+    object txtRefills: TCaptionEdit
+      Left = 8
+      Top = 31
+      Width = 49
+      Height = 21
+      TabOrder = 1
+      Caption = 'Refills'
+    end
   end
 end
Index: cprs/branches/foia-cprs/CPRS-Chart/fRenewOutMed.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fRenewOutMed.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fRenewOutMed.pas	(revision 460)
@@ -5,17 +5,17 @@
 uses
   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
-  fAutoSz, StdCtrls, ComCtrls, ORFn, rOrders, Mask, ORCtrls;
+  fAutoSz, StdCtrls, ComCtrls, ORFn, rOrders, Mask, ORCtrls, ExtCtrls;
 
 type
-  TfrmRenewOutMed = class(TfrmAutoSz)
-    lblRefills: TLabel;
-    lblComments: TLabel;
+  TfrmRenewOutMed = class(TForm)
+    memOrder: TCaptionMemo;
+    pnlButtons: TPanel;
     cmdOK: TButton;
     cmdCancel: TButton;
-    memOrder: TCaptionMemo;
-    memComments: TCaptionMemo;
+    pnlMiddle: TPanel;
+    cboPickup: TORComboBox;
+    lblPickup: TLabel;
     txtRefills: TCaptionEdit;
-    lblPickup: TLabel;
-    cboPickup: TORComboBox;
+    lblRefills: TLabel;
     procedure FormCreate(Sender: TObject);
     procedure cmdOKClick(Sender: TObject);
@@ -45,5 +45,4 @@
   try
     ResizeFormToFont(TForm(frmRenewOutMed));
-    frmRenewOutMed.memComments.SetTextBuf(PChar(Comments));
     frmRenewOutMed.memOrder.SetTextBuf(PChar(AnOrder.Text));
     frmRenewOutMed.txtRefills.Text := IntToStr(Refills);
@@ -54,5 +53,4 @@
       Result := True;
       Refills := StrToIntDef(frmRenewOutMed.txtRefills.Text, Refills);
-      Comments := frmRenewOutMed.memComments.Text;
       Pickup := frmRenewOutMed.cboPickup.ItemID;
     end;
Index: cprs/branches/foia-cprs/CPRS-Chart/fReports.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fReports.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fReports.dfm	(revision 460)
@@ -1,7 +1,7 @@
 inherited frmReports: TfrmReports
-  Left = 215
-  Top = 126
-  Width = 786
-  Height = 377
+  Left = 456
+  Top = 200
+  Width = 725
+  Height = 654
   HelpContext = 9000
   Caption = 'Reports Page'
@@ -12,22 +12,25 @@
   TextHeight = 13
   inherited shpPageBottom: TShape
-    Top = 340
-    Width = 778
+    Top = 617
+    Width = 717
     Height = 10
   end
   inherited sptHorz: TSplitter
     Left = 119
-    Height = 340
+    Height = 617
+    OnMoved = sptHorzMoved
   end
   inherited pnlLeft: TPanel
     Width = 119
-    Height = 340
+    Height = 617
     object Splitter1: TSplitter
       Left = 0
-      Top = 91
+      Top = 259
       Width = 119
-      Height = 10
+      Height = 6
       Cursor = crVSplit
       Align = alBottom
+      Color = clBtnFace
+      ParentColor = False
       OnCanResize = Splitter1CanResize
     end
@@ -36,5 +39,5 @@
       Top = 0
       Width = 119
-      Height = 91
+      Height = 259
       Align = alClient
       BevelOuter = bvNone
@@ -57,5 +60,5 @@
         Top = 19
         Width = 119
-        Height = 72
+        Height = 240
         Align = alClient
         HideSelection = False
@@ -73,15 +76,17 @@
     object pnlLeftBottom: TPanel
       Left = 0
-      Top = 201
+      Top = 365
       Width = 119
-      Height = 139
+      Height = 252
       Align = alBottom
+      Anchors = [akLeft, akTop, akRight, akBottom]
       BevelOuter = bvNone
       TabOrder = 1
+      Visible = False
       object lblQualifier: TOROffsetLabel
         Left = 0
         Top = 0
         Width = 119
-        Height = 20
+        Height = 13
         Align = alTop
         HorzOffset = 3
@@ -92,5 +97,5 @@
       object lblHeaders: TLabel
         Left = 0
-        Top = 20
+        Top = 13
         Width = 119
         Height = 13
@@ -102,7 +107,7 @@
       object lstHeaders: TORListBox
         Left = 0
-        Top = 33
-        Width = 119
-        Height = 106
+        Top = 26
+        Width = 119
+        Height = 226
         Align = alClient
         ItemHeight = 13
@@ -119,7 +124,7 @@
       object lstQualifier: TORListBox
         Left = 0
-        Top = 33
-        Width = 119
-        Height = 106
+        Top = 26
+        Width = 119
+        Height = 226
         Style = lbOwnerDrawFixed
         Align = alClient
@@ -135,8 +140,90 @@
         TabPositions = '10'
       end
+      object pnlViews: TORAutoPanel
+        Left = 0
+        Top = 26
+        Width = 119
+        Height = 226
+        Align = alClient
+        BevelOuter = bvNone
+        TabOrder = 3
+        Visible = False
+        object pnlTopViews: TPanel
+          Left = 0
+          Top = 0
+          Width = 119
+          Height = 80
+          Align = alTop
+          BevelOuter = bvNone
+          TabOrder = 0
+          DesignSize = (
+            119
+            80)
+          object lblDateRange: TLabel
+            Left = 0
+            Top = 63
+            Width = 58
+            Height = 13
+            Anchors = [akLeft, akTop, akRight]
+            Caption = 'Date Range'
+          end
+          object chkDualViews: TCheckBox
+            Left = 0
+            Top = 0
+            Width = 121
+            Height = 17
+            Anchors = [akLeft, akTop, akRight]
+            Caption = 'Split Views'
+            TabOrder = 0
+            OnClick = chkDualViewsClick
+          end
+          object btnGraphSelections: TORAlignButton
+            Left = 0
+            Top = 20
+            Width = 119
+            Height = 21
+            Anchors = [akLeft, akTop, akRight]
+            Caption = 'Select/Define...'
+            TabOrder = 1
+            OnClick = btnGraphSelectionsClick
+          end
+          object btnChangeView: TORAlignButton
+            Left = 0
+            Top = 41
+            Width = 119
+            Height = 21
+            Anchors = [akLeft, akTop, akRight]
+            Caption = 'Settings...'
+            TabOrder = 2
+            OnClick = btnChangeViewClick
+          end
+        end
+        object lstDateRange: TORListBox
+          Left = 0
+          Top = 80
+          Width = 119
+          Height = 146
+          Align = alClient
+          Font.Charset = DEFAULT_CHARSET
+          Font.Color = clWindowText
+          Font.Height = -11
+          Font.Name = 'MS Sans Serif'
+          Font.Style = []
+          ItemHeight = 13
+          ParentFont = False
+          ParentShowHint = False
+          ShowHint = True
+          TabOrder = 1
+          OnClick = lstDateRangeClick
+          ItemTipColor = clWindow
+          LongList = False
+          Pieces = '2'
+          TabPositions = '10'
+        end
+      end
     end
     object pnlProcedures: TPanel
       Left = 0
-      Top = 101
+      Top = 265
       Width = 119
       Height = 100
@@ -144,4 +231,5 @@
       BevelOuter = bvNone
       TabOrder = 2
+      Visible = False
       object lblProcedures: TOROffsetLabel
         Left = 0
@@ -151,5 +239,7 @@
         Align = alTop
         Caption = 'Radiology Procedures'
+        Color = clBtnFace
         HorzOffset = 2
+        ParentColor = False
         Transparent = False
         VertOffset = 2
@@ -178,10 +268,10 @@
   inherited pnlRight: TPanel
     Left = 123
-    Width = 655
-    Height = 340
+    Width = 594
+    Height = 617
     object sptHorzRight: TSplitter
       Left = 0
       Top = 177
-      Width = 655
+      Width = 594
       Height = 4
       Cursor = crVSplit
@@ -193,5 +283,5 @@
       Left = 0
       Top = 0
-      Width = 655
+      Width = 594
       Height = 57
       Align = alTop
@@ -201,5 +291,5 @@
         Left = 0
         Top = 17
-        Width = 655
+        Width = 594
         Height = 25
         Align = alTop
@@ -212,5 +302,5 @@
         Left = 0
         Top = 0
-        Width = 655
+        Width = 594
         Height = 17
         Align = alTop
@@ -222,9 +312,17 @@
       object TabControl1: TTabControl
         Left = 0
-        Top = 40
-        Width = 655
-        Height = 17
-        Align = alBottom
+        Top = 42
+        Width = 594
+        Height = 20
+        Align = alTop
+        Font.Charset = DEFAULT_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -11
+        Font.Name = 'MS Sans Serif'
+        Font.Style = []
         HotTrack = True
+        ParentFont = False
+        Style = tsButtons
+        TabHeight = 16
         TabOrder = 0
         TabStop = False
@@ -236,12 +334,28 @@
       Left = 0
       Top = 181
-      Width = 655
-      Height = 159
+      Width = 594
+      Height = 436
       Align = alClient
       TabOrder = 2
+      object WebBrowser1: TWebBrowser
+        Left = 1
+        Top = 31
+        Width = 592
+        Height = 277
+        TabStop = False
+        Align = alClient
+        TabOrder = 1
+        OnDocumentComplete = WebBrowser1DocumentComplete
+        ControlData = {
+          4C0000002F3D0000A11C00000000000000000000000000000000000000000000
+          000000004C000000000000000000000001000000E0D057007335CF11AE690800
+          2B2E126208000000000000004C0000000114020000000000C000000000000046
+          8000000000000000000000000000000000000000000000000000000000000000
+          00000000000000000100000000000000000000000000000000000000}
+      end
       object Memo1: TMemo
         Left = 1
         Top = 1
-        Width = 653
+        Width = 592
         Height = 30
         TabStop = False
@@ -259,26 +373,10 @@
         OnKeyUp = Memo1KeyUp
       end
-      object WebBrowser1: TWebBrowser
-        Left = 1
-        Top = 31
-        Width = 653
-        Height = 127
-        TabStop = False
-        Align = alClient
-        TabOrder = 1
-        OnDocumentComplete = WebBrowser1DocumentComplete
-        ControlData = {
-          4C0000007D430000200D00000000000000000000000000000000000000000000
-          000000004C000000000000000000000001000000E0D057007335CF11AE690800
-          2B2E126208000000000000004C0000000114020000000000C000000000000046
-          8000000000000000000000000000000000000000000000000000000000000000
-          00000000000000000100000000000000000000000000000000000000}
-      end
       object memText: TRichEdit
         Left = 1
-        Top = 31
-        Width = 653
+        Top = 308
+        Width = 592
         Height = 127
-        Align = alClient
+        Align = alBottom
         Color = clCream
         Font.Charset = ANSI_CHARSET
@@ -293,4 +391,5 @@
         ScrollBars = ssBoth
         TabOrder = 2
+        Visible = False
         WantReturns = False
         WordWrap = False
@@ -300,5 +399,5 @@
       Left = 0
       Top = 57
-      Width = 655
+      Width = 594
       Height = 120
       Align = alTop
@@ -308,5 +407,5 @@
         Left = 1
         Top = 1
-        Width = 653
+        Width = 592
         Height = 118
         Hint = 'To sort, click on column headers|'
Index: cprs/branches/foia-cprs/CPRS-Chart/fReports.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fReports.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fReports.pas	(revision 460)
@@ -6,5 +6,5 @@
   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
   fHSplit, StdCtrls, ExtCtrls, ORCtrls, ComCtrls, Menus, uConst, ORDtTmRng,
-  OleCtrls, SHDocVw, Buttons, ClipBrd, rECS, Variants;
+  OleCtrls, SHDocVw, Buttons, ClipBrd, rECS, Variants, StrUtils;
 
 type
@@ -47,4 +47,11 @@
     tvProcedures: TORTreeView;
     lblProcTypeMsg: TOROffsetLabel;
+    pnlViews: TORAutoPanel;
+    chkDualViews: TCheckBox;
+    btnChangeView: TORAlignButton;
+    btnGraphSelections: TORAlignButton;
+    lblDateRange: TLabel;
+    lstDateRange: TORListBox;
+    pnlTopViews: TPanel;
     procedure lstQualifierClick(Sender: TObject);
     procedure GotoTop1Click(Sender: TObject);
@@ -59,5 +66,5 @@
     procedure TabControl1Change(Sender: TObject);
     procedure FormDestroy(Sender: TObject);
-    procedure GoRemote(Dest: TStringList; AItem: string; AQualifier, ARpc: string; AHSTag: string);
+    procedure GoRemote(Dest: TStringList; AItem: string; AQualifier, ARpc: string; AHSTag: string; AHDR: string);
     procedure lstHeadersClick(Sender: TObject);
     procedure Splitter1CanResize(Sender: TObject; var NewSize: Integer;
@@ -99,9 +106,14 @@
       var AllowCollapse: Boolean);                                                      
     procedure tvProceduresExpanding(Sender: TObject; Node: TTreeNode;                   
-      var AllowExpansion: Boolean);                                                     
+      var AllowExpansion: Boolean);
     procedure tvProceduresClick(Sender: TObject);                                       
     procedure tvProceduresChange(Sender: TObject; Node: TTreeNode);
     procedure tvProceduresKeyDown(Sender: TObject; var Key: Word;                       
-      Shift: TShiftState);                                                              
+      Shift: TShiftState);
+    procedure chkDualViewsClick(Sender: TObject);
+    procedure btnChangeViewClick(Sender: TObject);
+    procedure btnGraphSelectionsClick(Sender: TObject);
+    procedure lstDateRangeClick(Sender: TObject);
+    procedure sptHorzMoved(Sender: TObject);
 
   private
@@ -109,5 +121,6 @@
     procedure ProcessNotifications;
     procedure ShowTabControl;
-    //procedure UpdateRemoteStatus(aSiteID, aStatus: string);
+    procedure Graph(reportien: integer);
+    procedure GraphPanel(active: boolean);
 
   public
@@ -145,5 +158,4 @@
   ulvSelectOn: boolean;             //flag turned on when multiple items in lvReports control have been selected
   uListState: Integer;              //Checked state of list of Adhoc components Checked: Abbreviation, UnChecked: Name
-  uNoRemote: boolean;
   uECSReport: TECSReport;           //Event Capture Report, initiated in fFrame when Click Event Capture under Tools
   UpdatingLvReports: Boolean;       //Currently updating lvReports
@@ -155,5 +167,5 @@
 
 uses ORFn, rCore, rReports, fFrame, uCore, uReports, fReportsPrint,
-     fReportsAdhocComponent1, activex, mshtml, dShared;
+     fReportsAdhocComponent1, activex, mshtml, dShared, fGraphs, rGraphs;  //*****
 
 const
@@ -182,7 +194,10 @@
   uHTMLPatient: ANSIstring;
   uRptID: String;
+  uDirect: String;
   uEmptyImageList: TImageList;
   ColumnToSort: Integer;
   ColumnSortForward: Boolean;
+  GraphForm: TfrmGraphs;
+  GraphFormActive: boolean;
 
 procedure TfrmReports.ClearPtData;
@@ -200,4 +215,133 @@
   TabControl1.Visible := false;
   TabControl1.TabStop := false;
+  if (GraphForm <> nil) and GraphFormActive then
+  with GraphForm do
+  begin
+    GraphForm.SendToBack;
+    Initialize;
+    DisplayData('top');
+    DisplayData('bottom');
+    lstCheck.Items.Clear;
+    GraphFormActive := false;
+  end;
+  begin
+  end;
+end;
+
+procedure TfrmReports.Graph(reportien: integer);
+begin
+  if GraphForm = nil then
+  begin
+    GraphForm := TfrmGraphs.Create(self);
+    try
+      with GraphForm do
+      begin
+        if btnClose.Tag = 1 then
+          Exit;
+        Parent := pnlRight;
+        Align := alClient;
+        pnlFooter.Tag := 1;   //suppresses bottom of graph form
+        pnlBottom.Height := 1;
+        pnlMain.BevelInner := bvLowered;
+        pnlMain.BevelOuter := bvRaised;
+        pnlMain.Tag := reportien;
+        Initialize;
+        ResizeAnchoredFormToFont(GraphForm);
+        Show;
+        DisplayData('top');
+        DisplayData('bottom');
+        lstCheck.Items.Clear;
+        GraphPanel(true);
+        lstTypes.Hint := Patient.DFN;
+        BringToFront;
+      end;
+    finally
+      if GraphForm.btnClose.Tag = 1 then
+      begin
+        GraphFormActive := false;
+        GraphForm.Free;
+        GraphForm := nil;
+      end
+      else
+        GraphFormActive := true;
+    end;
+  end
+  else if GraphForm.btnClose.Tag = 1 then
+    Exit
+  else if GraphFormActive and (GraphForm.lstTypes.Hint = Patient.DFN) then
+  begin   // displaying same patient
+    if Tag <> reportien then
+    with GraphForm do
+    begin  // new report
+      pnlMain.Tag := reportien;
+      Initialize;
+      //DisplayData('top');
+      //DisplayData('bottom');
+      lstCheck.Items.Clear;
+      GraphPanel(true);
+      BringToFront;
+    end;
+    //no action
+  end
+  else if GraphForm.lstTypes.Hint = Patient.DFN then
+  begin   // same patient, bring back graph
+    GraphPanel(true);
+    BringToFront;
+    GraphFormActive := true;
+  end
+  else
+  with GraphForm do
+  begin  // new patient
+    pnlMain.Tag := reportien;
+    Initialize;
+    DisplayData('top');
+    DisplayData('bottom');
+    lstCheck.Items.Clear;
+    lstTypes.Hint := Patient.DFN;
+    GraphPanel(true);
+    BringToFront;
+    GraphFormActive := true;
+  end;
+end;
+
+procedure TfrmReports.GraphPanel(active: boolean);
+var
+  aQualifier, aStartTime, aStopTime: string;
+begin
+  if active then
+  begin
+    pnlLeftBottom.Height := pnlLeft.Height div 2;
+    pnlViews.Height := pnlLeftBottom.Height;
+    if pnlLeft.Height < 200 then
+      pnlTopViews.Height := 3
+    else
+      pnlTopViews.Height := 80;
+    lblQualifier.Visible := false;
+    lstQualifier.Visible := false;
+    pnlViews.Visible := true;
+    if lstDateRange.Tag = 0 then
+    begin
+      lstDateRange.Tag := 1;
+      aQualifier  :=  PReportTreeObject(tvReports.Selected.Data)^.Qualifier;
+      aStartTime  :=  Piece(aQualifier,';',1);
+      aStopTime   :=  Piece(aQualifier,';',2);
+      GraphForm.cboDateRange.Items.Add(
+        '^' + aStartTime + ' to ' + aStopTime +'^^^' + aStartTime + ';' +  aStopTime +
+        '^' + floattostr(strtofmdatetime(aStartTime)) + '^' + floattostr(strtofmdatetime(aStopTime)));
+      lstDateRange.Items := GraphForm.cboDateRange.Items;
+      //lstDateRange.ItemIndex := lstDateRange.Items.Count - 1;
+      lstDateRange.ItemIndex := lstDateRange.Items.Count - 2;      //set to all results till fixed
+      lstDateRangeClick(self);
+    end;
+    pnlLeftBottom.Visible := true;
+    splitter1.Visible := true;
+  end
+  else
+  begin
+    lblQualifier.Visible := true;
+    lstQualifier.Visible := true;
+    pnlViews.Visible := false;
+    pnlLeftBottom.Height := lblHeaders.Height + lblQualifier.Height + 90;
+  end;
 end;
 
@@ -249,4 +393,18 @@
         end;
     end;
+  if (uReportType = 'G') and GraphFormActive then
+    with GraphForm do
+    begin
+      if (lvwItemsTop.SelCount < 1) and (lvwItemsBottom.SelCount < 1) then
+        begin
+          InfoBox('There are no items graphed.', 'No Items to Print', MB_OK);
+          Exit;
+        end
+      else
+        begin
+          mnuPopGraphPrintClick(mnuPopGraphPrint);
+          Exit;
+        end;
+    end;
   if uQualifierType = QT_DATERANGE then
     begin      //      = 2
@@ -272,5 +430,4 @@
   uUpdateStat := false;
   ulvSelectOn := false;
-  uNoRemote := false;
   uListState := GetAdhocLookup();
   memText.SelStart := 0;
@@ -285,5 +442,6 @@
                   //the preferred method would be to use headers and footers
                   //so this is just an interim solution.
-  pnlLeftBottom.Visible := False;       
+  if not GraphFormActive then
+    pnlLeftBottom.Visible := False;
   if InitPage then
     begin
@@ -325,5 +483,5 @@
                         begin
                         lstQualifier.Clear;
-                        tvProcedures.Items.Clear;             
+                        tvProcedures.Items.Clear;
                         lblProcTypeMsg.Visible := FALSE;      
                         lvReports.SmallImages := uEmptyImageList;
@@ -338,5 +496,5 @@
                         end;
     CC_NOTIFICATION:  ProcessNotifications;
-  end;
+  end;  
 end;
 
@@ -373,5 +531,5 @@
   uHTMLDoc := '';
   WebBrowser1.Navigate('about:blank');
-  tvProcedures.Items.Clear;             
+  tvProcedures.Items.Clear;
   lblProcTypeMsg.Visible := FALSE;      
   lvReports.SmallImages := uEmptyImageList;
@@ -406,9 +564,9 @@
         begin
           if addgrandchild = true then
-            currentNode := tvReports.Items.AddChildObject(grandParentNode,Piece(x,'^',3),MakeReportTreeObject(Pieces(x,'^',2,14)))
+            currentNode := tvReports.Items.AddChildObject(grandParentNode,Piece(x,'^',3),MakeReportTreeObject(Pieces(x,'^',2,15)))
           else
             if addchild = true then
               begin
-                currentNode := tvReports.Items.AddChildObject(parentNode,Piece(x,'^',3),MakeReportTreeObject(Pieces(x,'^',2,14)));
+                currentNode := tvReports.Items.AddChildObject(parentNode,Piece(x,'^',3),MakeReportTreeObject(Pieces(x,'^',2,15)));
                 addgrandchild := true;
                 grandParentNode := currentNode;
@@ -416,5 +574,5 @@
             else
               begin
-                currentNode := tvReports.Items.AddObject(currentNode,Piece(x,'^',3),MakeReportTreeObject(Pieces(x,'^',2,14)));
+                currentNode := tvReports.Items.AddObject(currentNode,Piece(x,'^',3),MakeReportTreeObject(Pieces(x,'^',2,15)));
                 parentNode := currentNode;
                 addchild := true;
@@ -425,5 +583,4 @@
           begin
             currentNode := tvReports.Items.AddObject(currentNode,Piece(x,'^',2),MakeReportTreeObject(x));
-            //addchild := true;
             parentNode := currentNode;
           end
@@ -460,5 +617,5 @@
   aTmpAray: TStringList;
   aColCtr, aCurCol, aCurRow, aColID: integer;
-  x,c,aSite: string;
+  x,y,z,c,aSite: string;
   ListItem: TListItem;
 begin
@@ -466,5 +623,4 @@
   aErr := 0;
   ListItem := nil;
-  //RowObjects.Clear;
   case uQualifierType of
     QT_HSCOMPONENT:
@@ -536,5 +692,19 @@
                                 if piece(uColumns.Strings[aCurCol],'^',4) = '1' then
                                   c := c + '...';
-                                ListItem.SubItems.Add(c);
+                                z := piece(c,'^',1);
+                                y := copy(c, (pos('^', c)), 9999);
+                                if pos('^',y) > 0 then
+                                  begin
+                                    while pos('^',y) > 0 do
+                                      begin
+                                        y := copy(y, (pos('^', y)+1), 9999);
+                                        z := z + '^' + y;
+                                      end;
+                                        ListItem.SubItems.Add(z);
+                                  end
+                                else
+                                  begin
+                                    ListItem.SubItems.Add(y);
+                                  end;
                               end;
                             RowObjects.Add(aSite, IntToStr(aCurRow) + ':' + IntToStr(aCurCol), uColumns.Strings[aCurCol], aTmpAray);
@@ -548,5 +718,21 @@
                       if aColID = aCurCol then
                         begin
-                          aTmpAray.Add(piece(x,'^',2));
+                          z := '';
+                          y := piece(x,'^',2);
+                          if length(y) > 0 then z := y;
+                          y := copy(x, (pos('^', x)+1), 9999);
+                          if pos('^',y) > 0 then
+                            begin
+                              while pos('^',y) > 0 do
+                                begin
+                                  y := copy(y, (pos('^', y)+1), 9999);
+                                  z := z + '^' + y;
+                                end;
+                              aTmpAray.Add(z);
+                            end
+                          else
+                            begin
+                              aTmpAray.Add(y);
+                            end;
                           continue;
                         end;
@@ -572,5 +758,12 @@
                     aCurCol := aColID;
                     Inc(aColCtr);
-                    aTmpAray.Add(piece(x,'^',2));
+                    y := '';
+                    for k := 2 to 10 do
+                      if length(piece(x,'^',k)) > 0 then
+                        begin
+                          if length(y) > 0 then y := y + '^' + piece(x,'^',k)
+                          else y := y + piece(x,'^',k);
+                        end;
+                    aTmpAray.Add(y);
                     if aColCtr > 0 then
                       while aColCtr < aCurCol do
@@ -632,5 +825,5 @@
 var
   MoreID: String;  //Restores MaxOcc value
-  aRemote: string;
+  aRemote, aHDR: string;
   i: integer;
 begin
@@ -643,12 +836,10 @@
   MoreID := ';' + Piece(uQualifier,';',3);
   aRemote :=  piece(uRemoteType,'^',1);
+  aHDR := piece(uRemoteType,'^',7);
   SetPiece(uRemoteType,'^',5,lstQualifier.ItemID);
   uHSComponents.Clear;
   uHSAll.Clear;
-  memText.Lines.Clear;
-  tvProcedures.Items.Clear;             
-  lblProcTypeMsg.Visible := FALSE;      
-  lvReports.SmallImages := uEmptyImageList;
-  lvReports.Items.Clear;
+  tvProcedures.Items.Clear;
+  lblProcTypeMsg.Visible := FALSE;
   uHTMLDoc := '';
   if uReportType = 'H' then
@@ -675,5 +866,8 @@
    TRemoteSite(RemoteSites.SiteList.Items[i]).ReportClear;
   uRemoteCount := 0;
-  DisplayHeading(lstQualifier.ItemID + MoreID);
+  if aHDR = '1' then
+    DisplayHeading(lstQualifier.ItemID)
+  else
+    DisplayHeading(lstQualifier.ItemID + MoreID);
   if lstQualifier.ItemID = 'ds' then
     begin
@@ -728,5 +922,4 @@
   StatusText('Retrieving ' + lblTitle.Caption + '...');
   Screen.Cursor := crHourGlass;
-  memText.Lines.Clear;
   uReportInstruction := #13#10 + 'Retrieving data...';
   memText.Lines.Add(uReportInstruction);
@@ -738,16 +931,20 @@
   case uQualifierType of
       QT_HSCOMPONENT:
-        begin      //      = 5
-          if (length(piece(uHState,';',2)) > 0) then //and (chkText.Checked = false) then
+        begin     //      = 5
+          lvReports.SmallImages := uEmptyImageList;
+          lvReports.Items.Clear;
+          memText.Lines.Clear;
+          RowObjects.Clear;
+          if ((aRemote = '1') or (aRemote = '2')) then
+            GoRemote(uRemoteReportData, uRptID, lstQualifier.ItemID + MoreID, uReportRPC, uHState, aHDR);
+          if (length(piece(uHState,';',2)) > 0) then
             begin
-              LoadReportText(uLocalReportData, uRptID, lstQualifier.ItemID + MoreID, uReportRPC, uHState);
-              memText.Lines.Clear;
-              //memText.Lines.Assign(uLocalReportData);
-              RowObjects.Clear;
+              if not(aRemote = '2') then
+                LoadReportText(uLocalReportData, uRptID, lstQualifier.ItemID + MoreID, uReportRPC, uHState);
               LoadListView(uLocalReportData);
             end
           else
             begin
-              if aRemote = '1' then
+              if ((aRemote = '1') or (aRemote = '2')) then
                 ShowTabControl;
               pnlRightMiddle.Visible := false;
@@ -764,35 +961,38 @@
                 end;
             end;
-          if (aRemote = '1') and (uNoRemote = false) then
-            GoRemote(uRemoteReportData, uRptID, lstQualifier.ItemID + MoreID, uReportRPC, uHState);
         end;
       QT_HSWPCOMPONENT:
         begin      //      = 6
+          lvReports.SmallImages := uEmptyImageList;
+          lvReports.Items.Clear;
+          RowObjects.Clear;
+          memText.Lines.Clear;
+          if ((aRemote = '1') or (aRemote = '2'))  then
+            begin
+              Screen.Cursor := crDefault;
+              GoRemote(uRemoteReportData, uRptID, lstQualifier.ItemID + MoreID, uReportRPC, uHState, aHDR);
+            end;
           if (length(piece(uHState,';',2)) > 0) then
             begin
-              LoadReportText(uLocalReportData, uRptID, lstQualifier.ItemID + MoreID, uReportRPC, uHState);
-              memText.Lines.Clear;
-              //memText.Lines.Assign(uLocalReportData);
-              RowObjects.Clear;
+              if not(aRemote = '2') then
+                LoadReportText(uLocalReportData, uRptID, lstQualifier.ItemID + MoreID, uReportRPC, uHState);
               LoadListView(uLocalReportData);
             end
           else
             begin
-              if aRemote = '1' then
+              if ((aRemote = '1') or (aRemote = '2')) then
                 ShowTabControl;
               pnlRightMiddle.Visible := false;
-              LoadReportText(uLocalReportData, uRptID, lstQualifier.ItemID + MoreID, uReportRPC, uHState);
-              if uLocalReportData.Count < 1 then
+              if not (aRemote = '2') then
                 begin
-                  uReportInstruction := '<No Report Available>';
-                  memText.Lines.Add(uReportInstruction);
-                end
-              else
-                QuickCopy(uLocalReportData,memText);
-            end;
-          if (aRemote = '1') and (uNoRemote = false) then
-            begin
-              Screen.Cursor := crDefault;
-              GoRemote(uRemoteReportData, uRptID, lstQualifier.ItemID + MoreID, uReportRPC, uHState);
+                  LoadReportText(uLocalReportData, uRptID, lstQualifier.ItemID + MoreID, uReportRPC, uHState);
+                  if uLocalReportData.Count < 1 then
+                    begin
+                      uReportInstruction := '<No Report Available>';
+                      memText.Lines.Add(uReportInstruction);
+                    end
+                  else
+                    QuickCopy(uLocalReportData,memText);
+                end;
             end;
         end
@@ -800,6 +1000,6 @@
         begin
           Screen.Cursor := crDefault;
-          GoRemote(uRemoteReportData, uRptID, lstQualifier.ItemID + MoreID, uReportRPC, uHState);
-          if Pos('ECS',Piece(uRptID,':',1))>0 then  
+          GoRemote(uRemoteReportData, uRptID, lstQualifier.ItemID + MoreID, uReportRPC, uHState, aHDR);
+          if Pos('ECS',Piece(uRptID,':',1))>0 then
           begin
             if Pos('OR_ECS1',uRptID)>0 then
@@ -951,4 +1151,5 @@
   RowObjects := TRowObject.Create;
   uRemoteCount := 0;
+  GraphFormActive := false;
 end;
 
@@ -969,5 +1170,4 @@
             break;
           end;
-      //if not Found then i := -1;
     end;
 
@@ -975,5 +1175,5 @@
 
   case Notifications.Followup of
-    NF_IMAGING_RESULTS, NF_ABNORMAL_IMAGING_RESULTS, NF_IMAGING_RESULTS_AMENDED: 
+    NF_IMAGING_RESULTS, NF_ABNORMAL_IMAGING_RESULTS, NF_IMAGING_RESULTS_AMENDED:
       begin
         tvReports.Selected := tvReports.Items[i];
@@ -1095,5 +1295,5 @@
   i,j,fail: integer;
   r0,aSite: String;
-
+  aHDR, aID, aRet: String;
 begin
   inherited;
@@ -1111,16 +1311,20 @@
             if piece(r0,'^',1) = '1' then
               begin
+                aHDR := piece(TRemoteSite(Items[i]).CurrentReportQuery, '^', 13);
+                aID := piece(piece(TRemoteSite(Items[i]).CurrentReportQuery, '^', 2),':',1);
+                if aHDR = '1' then
+                  begin
+                    ModifyHDRData(aRet, TRemoteSite(Items[i]).RemoteHandle ,aID);
+                  end;
+                GetRemoteData(TRemoteSite(Items[i]).Data, TRemoteSite(Items[i]).RemoteHandle,Items[i]);
                 RemoteReports.Add(TRemoteSite(Items[i]).CurrentReportQuery,
                   TRemoteSite(Items[i]).RemoteHandle);
-                GetRemoteData(TRemoteSite(Items[i]).Data,
-                  TRemoteSite(Items[i]).RemoteHandle,Items[i]);
                 TRemoteSite(Items[i]).RemoteHandle := '';
                 TabControl1.OnChange(nil);
-                if (length(piece(uHState,';',2)) > 0) then //and (chkText.Checked = false) then
+                if (length(piece(uHState,';',2)) > 0) then
                   begin
                     uRemoteReportData.Clear;
                     QuickCopy(TRemoteSite(Items[i]).Data,uRemoteReportData);
                     fail := 0;
-                    //LoadListView(uRemoteReportData);
                     if uRemoteReportData.Count > 0 then
                       begin
@@ -1143,5 +1347,5 @@
               begin
                 uRemoteCount := uRemoteCount + 1;
-                if uRemoteCount > (90 * Count) then
+                if uRemoteCount > 90 then
                   begin
                     TRemoteSite(Items[i]).RemoteHandle := '';
@@ -1279,10 +1483,10 @@
 end;
 
-procedure TfrmReports.GoRemote(Dest: TStringList; AItem: string; AQualifier, ARpc: string; AHSTag: string);
+procedure TfrmReports.GoRemote(Dest: TStringList; AItem: string; AQualifier, ARpc: string; AHSTag: string; AHDR: string);
 var
   i, j: integer;
   LocalHandle, Query, Report: string;
   HSType, DaysBack, ExamID, MaxOcc: string;
-  Alpha, Omega: double;
+  Alpha, Omega, Trans: double;
 begin
   HSType := '';
@@ -1291,22 +1495,75 @@
   Alpha := 0;
   Omega := 0;
+  if UseVistaWeb then
+    begin
+      if AHDR = '1' then
+        InfoBox('You must use VistaWeb to view this report. To use RDV Classic, change your default setting.',
+                'Use VistaWeb for HDR data', MB_OK);
+      Exit;
+    end;
+  if AHDR = '1' then
+    begin
+      if HDRActive = '0' then
+        begin
+          InfoBox('The HDR is currently inactive.' + CRLF + 'Unable to retrieve HDR data at this time.', 'HDR Error', MB_OK);
+          Exit;
+        end;
+      if (Piece(AItem, ':', 1) = 'OR_VWAL') or (Piece(AItem, ':', 1) = 'OR_VWRX') then
+        AQualifier := 'T-75000;T+75000;99999';
+      if (Piece(AItem, ':', 1) = 'OR_VWVS') and (CharAt(AQualifier, 1) = ';') then
+        AQualifier := 'T-75000;T+75000;99999';
+    end;
+  if CharAt(AQualifier, 1) = 'd' then
+    begin
+      DaysBack := Copy(AQualifier, 2, Length(AQualifier));
+      AQualifier := ('T-' + Piece(DaysBack,';',1) + ';T;' + Pieces(AQualifier,';',2,3));
+      DaysBack := '';
+    end;
   if CharAt(AQualifier, 1) = 'T' then
     begin
+      if Piece(AQualifier,';',1) = 'T-0' then SetPiece(AQualifier,';',1,'T');
+      if (Piece(Aqualifier,';',1) = 'T') and (Piece(Aqualifier,';',2) = 'T')
+        then SetPiece(AQualifier,';',2,'T+1');
       Alpha := StrToFMDateTime(Piece(AQualifier,';',1));
       Omega := StrToFMDateTime(Piece(AQualifier,';',2));
+      if Alpha > Omega then
+        begin
+          Trans := Omega;
+          Omega := Alpha;
+          Alpha := Trans;
+        end;
       MaxOcc := Piece(AQualifier,';',3);
       SetPiece(AHSTag,';',4,MaxOcc);
     end;
-  if CharAt(AQualifier, 1) = 'd' then DaysBack := Copy(AQualifier, 2, Length(AQualifier));
   if CharAt(AQualifier, 1) = 'h' then HSType   := Copy(AQualifier, 2, Length(AQualifier));
   if CharAt(AQualifier, 1) = 'i' then ExamID   := Copy(AQualifier, 2, Length(AQualifier));
   with RemoteSites.SiteList do for i := 0 to Count - 1 do
+    begin
+    if (AHDR='1') and (LeftStr(TRemoteSite(Items[i]).SiteID, 5) = '200HD') then
+      begin
+        TRemoteSite(Items[i]).Selected := true;
+        frmFrame.lstCIRNLocations.Checked[i+2] := true;
+      end;
     if TRemoteSite(Items[i]).Selected then
       begin
         TRemoteSite(Items[i]).ReportClear;
+        if (LeftStr(TRemoteSite(Items[i]).SiteID, 5) = '200HD') and not(AHDR = '1') then
+          begin
+            TRemoteSite(Items[i]).QueryStatus := '1^Not Included';
+            UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID, 'NOT INCLUDED');
+            TabControl1.OnChange(nil);
+            continue;
+          end;
+        if (AHDR = '1') and not(LeftStr(TRemoteSite(Items[i]).SiteID, 5) = '200HD') then
+          begin
+            TRemoteSite(Items[i]).QueryStatus := '1^Not Included';
+            UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID, 'NOT INCLUDED');
+            TabControl1.OnChange(nil);
+            continue;
+          end;
         TRemoteSite(Items[i]).CurrentReportQuery := 'Report' + Patient.DFN + ';'
           + Patient.ICN + '^' + AItem + '^^^' + ARpc + '^' + HSType +
-          '^' + DaysBack + '^' + ExamID + '^' + DateToStr(Alpha) + '^' +
-          DateToStr(Omega) + '^' + TRemoteSite(Items[i]).SiteID + '^' + AHSTag;
+          '^' + DaysBack + '^' + ExamID + '^' + FloatToStr(Alpha) + '^' +
+          FloatToStr(Omega) + '^' + TRemoteSite(Items[i]).SiteID + '^' + AHSTag + '^' + AHDR;
         LocalHandle := '';
         Query := TRemoteSite(Items[i]).CurrentReportQuery;
@@ -1333,21 +1590,47 @@
         else
           begin
-            RemoteQuery(Dest, AItem, HSType, Daysback, ExamID, Alpha, Omega, TRemoteSite(Items[i]).SiteID, ARpc, AHSTag);
-            if Dest[0] = '' then
+            if uDirect = '1' then
               begin
-                TRemoteSite(Items[i]).QueryStatus := '-1^Communication error';
-                UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID,'Communication error');
+                StatusText('Retrieving reports from ' + TRemoteSite(Items[i]).SiteName + '...');
+                TRemoteSite(Items[i]).QueryStatus := '1^Direct Call';
+                UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID, 'Direct Call');
+                DirectQuery(Dest, AItem, HSType, Daysback, ExamID, Alpha, Omega, TRemoteSite(Items[i]).SiteID, ARpc, AHSTag);
+                if Copy(Dest[0],1,2) = '-1' then
+                  begin
+                    TRemoteSite(Items[i]).QueryStatus := '-1^Communication error';
+                    UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID,'Communication error');
+                  end
+                else
+                  begin
+                    QuickCopy(Dest,TRemoteSite(Items[i]).Data);
+                    TRemoteSite(Items[i]).RemoteHandle := '';
+                    TRemoteSite(Items[i]).QueryStatus := '1^Done';
+                    UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID, 'Done');
+                    TabControl1.OnChange(nil);
+                    if (length(piece(uHState,';',2)) > 0) then
+                      LoadListView(TRemoteSite(Items[i]).Data);
+                  end;
+                StatusText('');
               end
             else
               begin
-                TRemoteSite(Items[i]).RemoteHandle := Dest[0];
-                TRemoteSite(Items[i]).QueryStatus := '0^initialization...';
-                UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID, 'initialization');
-                Timer1.Enabled := True;
-                StatusText('Retrieving reports from '
-                  + TRemoteSite(Items[i]).SiteName + '...');
+                RemoteQuery(Dest, AItem, HSType, Daysback, ExamID, Alpha, Omega, TRemoteSite(Items[i]).SiteID, ARpc, AHSTag);
+                if Dest[0] = '' then
+                  begin
+                    TRemoteSite(Items[i]).QueryStatus := '-1^Communication error';
+                    UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID,'Communication error');
+                  end
+                else
+                  begin
+                    TRemoteSite(Items[i]).RemoteHandle := Dest[0];
+                    TRemoteSite(Items[i]).QueryStatus := '0^initialization...';
+                    UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID, 'initialization');
+                    Timer1.Enabled := True;
+                    StatusText('Retrieving reports from ' + TRemoteSite(Items[i]).SiteName + '...');
+                  end;
               end;
           end;
       end;
+    end;
 end;
 
@@ -1377,4 +1660,5 @@
   uEmptyImageList.Free;
   uECSReport.Free;
+  if GraphForm <> nil then GraphForm.Release;
 end;
 
@@ -1471,5 +1755,5 @@
   aHeading, aReportType, aRPC, aQualifier, aStartTime, aStopTime, aMax, aRptCode, aRemote, aCategory, aSortOrder, aDaysBack, x: string;
   aIFN: integer;
-  aID, aHSTag, aRadParam, aColChange: string;
+  aID, aHSTag, aRadParam, aColChange, aDirect, aHDR, aQualifierID: string;
   CurrentParentNode, CurrentNode: TTreeNode;
 begin
@@ -1488,10 +1772,13 @@
   aCategory   :=  PReportTreeObject(tvReports.Selected.Data)^.Category;
   aSortOrder  :=  PReportTreeObject(tvReports.Selected.Data)^.SortOrder;
-  aDaysBack  :=  PReportTreeObject(tvReports.Selected.Data)^.MaxDaysBack;
+  aDaysBack   :=  PReportTreeObject(tvReports.Selected.Data)^.MaxDaysBack;
   aIFN        :=  StrToIntDef(PReportTreeObject(tvReports.Selected.Data)^.IFN,0);
+  aDirect     :=  PReportTreeObject(tvReports.Selected.Data)^.Direct;
+  aHDR        :=  PReportTreeObject(tvReports.Selected.Data)^.HDR;
   aStartTime  :=  Piece(aQualifier,';',1);
   aStopTime   :=  Piece(aQualifier,';',2);
   aMax        :=  Piece(aQualifier,';',3);
   aRptCode    :=  Piece(aQualifier,';',4);
+  aQualifierID:= '';
   if length(uColChange) > 0 then
     begin
@@ -1514,13 +1801,10 @@
   uReportRPC := aRPC;
   uRptID := aID;
+  uDirect := aDirect;
   uReportType := aReportType;
   uQualifier := aQualifier;
   uSortOrder := aSortOrder;
-  uRemoteType := aRemote + '^' + aReportType + '^' + IntToStr(aIFN) + '^' + aHeading + '^' + aRptCode + '^' + aDaysBack;
-  //edtMax.Text := aMax;
-  {if chkText.Checked = true then
-    aHState := aHSTag
-  else
-    aHState := Pieces(aHSTag,';',1,2); }
+  uRemoteType := aRemote + '^' + aReportType + '^' + IntToStr(aIFN) + '^' + aHeading + '^' + aRptCode + '^' + aDaysBack + '^' + aHDR;
+  pnlRightTop.Height := lblTitle.Height;  // see below
   RedrawSuspend(tvReports.Handle);
   RedrawSuspend(memText.Handle);
@@ -1530,9 +1814,8 @@
   TabControl1.TabStop := false;
   sptHorzRight.Visible := false;
-  pnlRightTop.Height := lblTitle.Height;
-  lblProcTypeMsg.Visible := FALSE;         
+  lblProcTypeMsg.Visible := FALSE;
   pnlRightMiddle.Visible := false;
-  pnlProcedures.Visible := FALSE;          
-  if aRemote = '1' then
+  pnlProcedures.Visible := FALSE;
+  if (aRemote = '1') or (aRemote = '2') then
     if not(uReportType = 'V') then
       if TabControl1.Tabs.Count > 1 then
@@ -1543,8 +1826,6 @@
         end;
   StatusText('');
-  //**
   uHTMLDoc := '';
   WebBrowser1.Navigate('about:blank');
-  //**
   memText.Lines.Clear;
   memText.Parent := pnlRightBottom;
@@ -1558,8 +1839,8 @@
   lvReports.Columns.Clear;
   uHSComponents.Clear;
+  DisplayHeading('');
   if uReportType = 'H' then
     begin
       pnlRightMiddle.Visible := false;
-      //lvReports.Visible := false;
       pnlRightBottom.Visible := true;
       WebBrowser1.Visible := true;
@@ -1577,5 +1858,4 @@
             RedrawSuspend(lvReports.Handle);
             Items.BeginUpdate;
-            //Align := alTop;
             ViewStyle := vsReport;
             ColumnHeaders(uColumns, IntToStr(aIFN));
@@ -1598,5 +1878,5 @@
                   else
                     uNewColumn.Width := ColumnHeaderWidth;  //ColumnTextWidth for width of text
-                if (i = 0) and ((aRemote <> '1') or (TabControl1.Tabs.Count < 2)) then
+                if (i = 0) and (((aRemote <> '2') and (aRemote <> '1')) or ((TabControl1.Tabs.Count < 2) and (not (aHDR = '1')))) then
                   uNewColumn.Width := 0;
               end;
@@ -1641,4 +1921,13 @@
     end;
   Screen.Cursor := crHourGlass;
+  if (GraphForm <> nil) and (aReportType <> 'G') then
+  begin
+    GraphForm.SendToBack;
+    GraphPanel(false);
+    GraphFormActive := false;
+  end;
+  if aReportType = 'G' then
+    Graph(aIFN)
+  else
   if aReportType = 'M' then
     begin
@@ -1652,4 +1941,5 @@
         QT_OTHER:
           begin      //      = 0
+            memText.Lines.Clear;
             If copy(aRptCode,1,2) = 'h0' then  //HS Adhoc
               begin
@@ -1666,5 +1956,4 @@
                     TRemoteSite(RemoteSites.SiteList[j]).LabClear;
                   end;
-                memText.Clear;
                 uHTMLDoc := '';
                 if WebBrowser1.Visible = true then WebBrowser1.Navigate('about:blank');
@@ -1692,5 +1981,5 @@
                 splitter1.Visible := false;
                 StatusText('Retrieving ' + tvReports.Selected.Text + '...');
-                GoRemote(uRemoteReportData, aID, aRptCode, aRPC, uHState);
+                GoRemote(uRemoteReportData, aID, aRptCode, aRPC, uHState, aHDR);
                 uReportInstruction := #13#10 + 'Retrieving data...';
                 TabControl1.OnChange(nil);
@@ -1714,7 +2003,7 @@
                 begin
                   lstQualifier.ItemIndex := lstQualifier.Items.Add(aStartTime + ';' + aStopTime + '^' + aStartTime + ' to ' + aStopTime);
-                  uNoRemote := true;
+                  lvReports.SmallImages := uEmptyImageList;
+                  lvReports.Items.Clear;
                   lstQualifierClick(self);
-                  uNoRemote := false;
                 end
               else
@@ -1738,6 +2027,6 @@
                 ViewStyle := vsReport;
                 SmallImages := dmodShared.imgImages;
-                CurrentParentNode := nil;       
-                CurrentNode := nil;             
+                CurrentParentNode := nil;
+                CurrentNode := nil;
                 for i := 0 to uLocalReportData.Count - 1 do
                   begin
@@ -1754,12 +2043,12 @@
                             ListItem.SubItemImages[1] := IMG_NO_IMAGES;
                       end;
-                    LoadProceduresTreeView(uLocalReportData[i], CurrentParentNode, CurrentNode);         
+                    LoadProceduresTreeView(uLocalReportData[i], CurrentParentNode, CurrentNode);
                     if CurrentNode <> nil then
                        PProcTreeObj(CurrentNode.Data)^.Associate := lvReports.Items.IndexOf(ListItem);
                   end;
-                if tvProcedures.Items.Count > 0 then                            
+                if tvProcedures.Items.Count > 0 then
                    tvProcedures.Selected := tvProcedures.Items.GetFirstNode;
-                lblProcTypeMsg.Visible := TRUE;                                 
-                pnlRightTop.Height := lblTitle.Height + lblProcTypeMsg.Height;  
+                lblProcTypeMsg.Visible := TRUE;
+                pnlRightTop.Height := lblTitle.Height + lblProcTypeMsg.Height;
                 pnlLeftBottom.Visible := FALSE;
                 pnlProcedures.Visible := TRUE;
@@ -1824,20 +2113,30 @@
             StatusText('Retrieving ' + tvReports.Selected.Text + '...');
             uReportInstruction := #13#10 + 'Retrieving data...';
+            lvReports.SmallImages := uEmptyImageList;
+            lvReports.Items.Clear;
+            RowObjects.Clear;
+            memText.Lines.Clear;
             if (length(piece(aHSTag,';',2)) > 0) then
               begin
                 if aCategory <> '0' then
                   begin
-
                     ListReportDateRanges(lstQualifier.Items);
-                    if lstQualifier.ItemID = '' then
+                    aQualifierID := lstQualifier.ItemID;
+                    if aQualifierID = '' then
                       begin
-                        lstQualifier.ItemIndex := lstQualifier.Items.Add(aStartTime + ';' + aStopTime + '^' + aStartTime + ' to ' + aStopTime);
-                        uNoRemote := true;
+                        if aHDR = '1' then
+                          lstQualifier.ItemIndex := lstQualifier.Items.Add('T-75000' + ';' + 'T+75000' + '^' + 'T-75000' + ' to ' + 'T+75000')
+                        else
+                          if length(aStartTime) > 0 then lstQualifier.ItemIndex := lstQualifier.Items.Add(aStartTime + ';' + aStopTime + '^' + aStartTime + ' to ' + aStopTime);
                         lstQualifierClick(self);
-                        uNoRemote := false;
                       end
                     else
-                      lstQualifier.Items.Add(aStartTime + ';' + aStopTime + '^' + aStartTime + ' to ' + aStopTime);
-
+                      begin
+                        GoRemote(uRemoteReportData, aID, aQualifier, aRPC, uHState, aHDR);
+                        if aHDR = '1' then
+                          lstQualifier.ItemIndex := lstQualifier.Items.Add('T-75000' + ';' + 'T+75000' + '^' + 'T-75000' + ' to ' + 'T+75000')
+                        else
+                          if length(aStartTime) > 0 then lstQualifier.ItemIndex := lstQualifier.Items.Add(aStartTime + ';' + aStopTime + '^' + aStartTime + ' to ' + aStopTime);
+                      end;
                     lblQualifier.Caption := 'Date Range';
                     pnlLeftBottom.Visible := true;
@@ -1846,18 +2145,20 @@
                 else
                   begin
-                    LoadReportText(uLocalReportData, aID, aQualifier, aRPC, uHState);
-                    memText.Lines.Clear;
-                    //memText.Lines.Assign(uLocalReportData);
-                    RowObjects.Clear;
-                    LoadListView(uLocalReportData);
+                    if not (aRemote = '2' ) then
+                      GoRemote(uRemoteReportData, aID, aQualifier, aRPC, uHState, aHDR);
+                      begin
+                        LoadReportText(uLocalReportData, aID, aQualifier, aRPC, uHState);
+                        LoadListView(uLocalReportData);
+                      end;
                   end;
               end
             else
               begin
-                if aRemote = '1' then
+                if (aRemote = '1') or (aRemote = '2') then
                   if TabControl1.Tabs.Count > 1 then
                     ShowTabControl;
                 sptHorzRight.Visible := false;
                 pnlRightMiddle.Visible := false;
+                GoRemote(uRemoteReportData, aID, aQualifier, aRPC, uHState, aHDR);
                 LoadReportText(uLocalReportData, aID, aQualifier, aRPC, uHState);
                 if uLocalReportData.Count < 1 then
@@ -1871,12 +2172,9 @@
                 if aCategory <> '0' then
                   begin
-
                     ListReportDateRanges(lstQualifier.Items);
                     if lstQualifier.ItemID = '' then
                       begin
                         lstQualifier.ItemIndex := lstQualifier.Items.Add(aStartTime + ';' + aStopTime + '^' + aStartTime + ' to ' + aStopTime);
-                        uNoRemote := true;
                         lstQualifierClick(self);
-                        uNoRemote := false;
                       end
                     else
@@ -1889,6 +2187,4 @@
                 else
                   begin
-                    memText.Lines.Clear;
-                    //memText.Lines.Assign(uLocalReportData);
                     if uLocalReportData.Count < 1 then
                       begin
@@ -1904,5 +2200,4 @@
               end;
             StatusText('');
-            GoRemote(uRemoteReportData, aID, aQualifier, aRPC, uHState);
           end;
         QT_HSWPCOMPONENT:
@@ -1914,20 +2209,30 @@
             uReportInstruction := #13#10 + 'Retrieving data...';
             TabControl1.OnChange(nil);
+            RowObjects.Clear;
+            memText.Lines.Clear;
+            lvReports.SmallImages := uEmptyImageList;
+            lvReports.Items.Clear;
             if (length(piece(aHSTag,';',2)) > 0) then
               begin
                 if aCategory <> '0' then
                   begin
-
                     ListReportDateRanges(lstQualifier.Items);
-                    if lstQualifier.ItemID = '' then
+                    aQualifierID := lstQualifier.ItemID;
+                    if aQualifierID = '' then
                       begin
-                        lstQualifier.ItemIndex := lstQualifier.Items.Add(aStartTime + ';' + aStopTime + '^' + aStartTime + ' to ' + aStopTime);
-                        uNoRemote := true;
+                        if aHDR = '1' then
+                          lstQualifier.ItemIndex := lstQualifier.Items.Add('T-75000' + ';' + 'T+75000' + '^' + 'T-75000' + ' to ' + 'T+75000')
+                        else
+                          if length(aStartTime) > 0 then lstQualifier.ItemIndex := lstQualifier.Items.Add(aStartTime + ';' + aStopTime + '^' + aStartTime + ' to ' + aStopTime);
                         lstQualifierClick(self);
-                        uNoRemote := false;
                       end
                     else
-                      lstQualifier.Items.Add(aStartTime + ';' + aStopTime + '^' + aStartTime + ' to ' + aStopTime);
-
+                      begin
+                        GoRemote(uRemoteReportData, aID, aQualifier, aRPC, uHState, aHDR);
+                        if aHDR = '1' then
+                          lstQualifier.ItemIndex := lstQualifier.Items.Add('T-75000' + ';' + 'T+75000' + '^' + 'T-75000' + ' to ' + 'T+75000')
+                        else
+                          if length(aStartTime) > 0 then lstQualifier.ItemIndex := lstQualifier.Items.Add(aStartTime + ';' + aStopTime + '^' + aStartTime + ' to ' + aStopTime);
+                      end;
                     lblQualifier.Caption := 'Date Range';
                     pnlLeftBottom.Visible := true;
@@ -1936,17 +2241,19 @@
                 else
                   begin
-                    LoadReportText(uLocalReportData, aID, aQualifier, aRPC, uHState);
-                    memText.Lines.Clear;
-                    //memText.Lines.Assign(uLocalReportData);
-                    RowObjects.Clear;
-                    LoadListView(uLocalReportData);
+                    GoRemote(uRemoteReportData, aID, aQualifier, aRPC, uHState, aHDR);
+                    if not (aRemote = '2' ) then
+                      begin
+                        LoadReportText(uLocalReportData, aID, aQualifier, aRPC, uHState);
+                        LoadListView(uLocalReportData);
+                      end;
                   end;
               end
             else
               begin
-                if aRemote = '1' then
+                if (aRemote = '1') or (aRemote = '2') then
                   ShowTabControl;
                 sptHorzRight.Visible := false;
                 pnlRightMiddle.Visible := false;
+                GoRemote(uRemoteReportData, aID, aQualifier, aRPC, uHState, aHDR);
                 LoadReportText(uLocalReportData, aID, aQualifier, aRPC, uHState);
                 if uLocalReportData.Count < 1 then
@@ -1965,7 +2272,5 @@
                       begin
                         lstQualifier.ItemIndex := lstQualifier.Items.Add(aStartTime + ';' + aStopTime + '^' + aStartTime + ' to ' + aStopTime);
-                        uNoRemote := true;
                         lstQualifierClick(self);
-                        uNoRemote := false;
                       end
                     else
@@ -1978,12 +2283,8 @@
                 else
                   begin
-                    memText.Lines.Clear;
-                    //memText.Lines.Assign(uLocalReportData);
-                    RowObjects.Clear;
                     LoadListView(uLocalReportData);
                   end;
               end;
             StatusText('');
-            GoRemote(uRemoteReportData, aID, aQualifier, aRPC, uHState);
           end;
         QT_PROCEDURES:
@@ -2056,5 +2357,5 @@
             splitter1.Visible := false;
             StatusText('Retrieving ' + tvReports.Selected.Text + '...');
-            GoRemote(uRemoteReportData, aID, aRptCode, aRPC, uHState);
+            GoRemote(uRemoteReportData, aID, aRptCode, aRPC, uHState, aHDR);
             uReportInstruction := #13#10 + 'Retrieving data...';
             TabControl1.OnChange(nil);
@@ -2074,9 +2375,10 @@
       end;
     end;
-  if aCategory <> '0' then
-      DisplayHeading(uQualifier)
-  else
-    DisplayHeading('');
-    
+  if not (aHDR = '1') then
+    if aCategory <> '0' then
+        DisplayHeading(uQualifier)
+    else
+      DisplayHeading('');
+
   SendMessage(tvReports.Handle, WM_HSCROLL, SB_THUMBTRACK, 0);
   RedrawActivate(tvReports.Handle);
@@ -2086,5 +2388,5 @@
       WebBrowser1.BringToFront;
     end
-  else
+  else if not GraphFormActive then
     begin
       memText.Visible := true;
@@ -2092,4 +2394,15 @@
       memText.BringToFront;
       RedrawActivate(memText.Handle);
+    end
+  else
+    begin
+      GraphPanel(true);
+      with GraphForm do
+      begin
+        lstDateRange.Items := cboDateRange.Items;
+        lstDateRange.ItemIndex := cboDateRange.ItemIndex;
+        ViewSelections;
+        BringToFront;
+      end;
     end;
   Screen.Cursor := crDefault;
@@ -2712,3 +3025,49 @@
 end;
 
+procedure TfrmReports.chkDualViewsClick(Sender: TObject);
+begin
+  inherited;
+  if (GraphForm <> nil) and GraphFormActive then
+    GraphForm.chkDualViews.Checked := chkDualViews.Checked;
+end;
+
+procedure TfrmReports.btnChangeViewClick(Sender: TObject);
+begin
+  inherited;
+  if (GraphForm <> nil) and GraphFormActive then
+  begin
+    GraphForm.btnChangeSettingsClick(GraphForm);
+    chkDualViews.Checked := GraphForm.chkDualViews.Checked;
+  end;
+end;
+
+procedure TfrmReports.btnGraphSelectionsClick(Sender: TObject);
+begin
+  inherited;
+  if (GraphForm <> nil) and GraphFormActive then
+  begin
+    GraphForm.btnGraphSelectionsClick(GraphForm);
+    chkDualViews.Checked := GraphForm.chkDualViews.Checked;
+  end;
+end;
+
+procedure TfrmReports.lstDateRangeClick(Sender: TObject);
+begin
+  inherited;
+  if (GraphForm <> nil) then
+  begin
+    GraphForm.cboDateRange.ItemIndex := lstDateRange.ItemIndex;
+    GraphForm.cboDateRangeChange(self);
+    lstDateRange.Items.Assign(GraphForm.cboDateRange.Items);
+    lstDateRange.ItemIndex := GraphForm.cboDateRange.ItemIndex;
+    //Exit;
+  end;
+end;
+
+procedure TfrmReports.sptHorzMoved(Sender: TObject);
+begin
+  inherited;
+  pnlTopViews.Height := 80;
+end;
+
 end.
Index: cprs/branches/foia-cprs/CPRS-Chart/fReportsAdhocSubItem1.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fReportsAdhocSubItem1.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fReportsAdhocSubItem1.dfm	(revision 460)
@@ -39,5 +39,4 @@
       Height = 24
       BevelOuter = bvNone
-      Caption = 'Display selected file entry earlier'
       TabOrder = 4
       TabStop = True
@@ -74,5 +73,4 @@
       Height = 24
       BevelOuter = bvNone
-      Caption = 'Display selected file entry earlier'
       TabOrder = 5
       TabStop = True
@@ -119,4 +117,5 @@
       ListItemsOnly = False
       LongList = True
+      LookupPiece = 0
       MaxLength = 0
       Pieces = '2'
@@ -127,4 +126,5 @@
       OnKeyUp = ORComboBox2KeyUp
       OnNeedData = ORComboBox2NeedData
+      CharsNeedMatch = 1
     end
     object ORListBox1: TORListBox
Index: cprs/branches/foia-cprs/CPRS-Chart/fReview.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fReview.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fReview.dfm	(revision 460)
@@ -1,9 +1,9 @@
 object frmReview: TfrmReview
-  Left = 212
-  Top = 139
+  Left = 358
+  Top = 136
   AutoScroll = False
   BorderIcons = [biMaximize]
   Caption = 'Review / Sign Changes'
-  ClientHeight = 501
+  ClientHeight = 497
   ClientWidth = 602
   Color = clBtnFace
@@ -26,5 +26,5 @@
   DesignSize = (
     602
-    501)
+    497)
   PixelsPerInch = 96
   TextHeight = 13
@@ -37,16 +37,7 @@
     Visible = False
   end
-  object lblSig: TStaticText
-    Left = 8
-    Top = 136
-    Width = 205
-    Height = 17
-    Caption = 'Signature will be Applied to Checked Items'
-    TabOrder = 5
-    TabStop = True
-  end
   object pnlSignature: TPanel
     Left = 8
-    Top = 427
+    Top = 423
     Width = 373
     Height = 65
@@ -74,5 +65,5 @@
   object pnlOrderAction: TPanel
     Left = 8
-    Top = 427
+    Top = 423
     Width = 373
     Height = 65
@@ -157,5 +148,5 @@
   object cmdOK: TButton
     Left = 442
-    Top = 475
+    Top = 471
     Width = 72
     Height = 21
@@ -168,5 +159,5 @@
   object cmdCancel: TButton
     Left = 522
-    Top = 475
+    Top = 471
     Width = 72
     Height = 21
@@ -181,5 +172,5 @@
     Top = 154
     Width = 587
-    Height = 268
+    Height = 264
     OnClickCheck = lstReviewClickCheck
     Anchors = [akLeft, akTop, akRight, akBottom]
@@ -204,4 +195,6 @@
     Height = 129
     Align = alTop
+    AutoScroll = False
+    AutoSize = True
     ParentShowHint = False
     ShowHint = True
@@ -209,5 +202,5 @@
     Visible = False
     inherited pnlRight: TPanel
-      Left = 353
+      Left = 392
       Height = 129
       inherited lblCaption: TStaticText
@@ -289,14 +282,23 @@
     end
     inherited pnlSC: TPanel
-      Width = 353
+      Width = 392
       Height = 129
       inherited lblSCDisplay: TLabel
-        Width = 353
+        Width = 392
       end
       inherited memSCDisplay: TCaptionMemo
-        Width = 353
+        Width = 392
         Height = 112
       end
     end
+  end
+  object lblSig: TStaticText
+    Left = 8
+    Top = 136
+    Width = 205
+    Height = 17
+    Caption = 'Signature will be Applied to Checked Items'
+    TabOrder = 5
+    TabStop = True
   end
   object gbxDxLookup: TGroupBox
@@ -325,5 +327,4 @@
     object Copy1: TMenuItem
       Caption = '&Copy'
-      Enabled = False
       ShortCut = 16451
       OnClick = Copy1Click
@@ -337,5 +338,4 @@
     object Diagnosis1: TMenuItem
       Caption = '&Diagnosis...'
-      Enabled = False
       ShortCut = 32836
       OnClick = buDiagnosisClick
Index: cprs/branches/foia-cprs/CPRS-Chart/fReview.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fReview.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fReview.pas	(revision 460)
@@ -97,4 +97,5 @@
     procedure SetItemTextToState;
     procedure FormatListForScreenReader;
+
   public
     procedure SetCheckBoxStatus(thisOrderID: string);
@@ -136,5 +137,5 @@
 uses ORFn, rCore, fNotes, fConsults, fOrders, rOrders, Hash, fDCSumm, fOCSession, uOrders,
      fSignItem, fOrdersPrint, fLkUpLocation, fFrame, uSignItems, fSurgery,
-     fBALocalDiagnoses, UBAConst, UBAMessages, fOrdersSign;
+     fBALocalDiagnoses, UBAConst, UBAMessages, fOrdersSign, fClinicWardMeds;
 
 const
@@ -293,7 +294,8 @@
 
     end;
-    // if Result then Changes.Clear;  possibly clear changes here ??
+
   finally
    Changes.OnRemove := nil;     {**RV**}
+   frmReview.Release;
   end;
 end;
@@ -340,5 +342,5 @@
   if  BILLING_AWARE then
   begin
-    UBAGlobals.ChangeItemOrderNum := Copy(ChangeItem.ID, 0, 8);
+    UBAGlobals.ChangeItemOrderNum := ChangeItem.ID; // GE 2/21/2006 removed "Copy(ChangeItem.ID,0,8)" issue when sites have order number > 8 digits
      // HDS00005025
 
@@ -836,5 +838,5 @@
   TC_SAVERR  = 'Error Saving Order';
 var
-  i, idx, AType, theSts: Integer;
+  i, idx, AType, PrintLoc, theSts: Integer;
   SigSts, RelSts, Nature: Char;
   ESCode, AnID, AnErrMsg: string;
@@ -842,5 +844,5 @@
   OrderList: TStringList;
   SaveCoPay: boolean;
-  DigSigErr, DigStoreErr: Boolean;
+  DigSigErr, DigStoreErr, CryptoChecked: Boolean;
   SigData, SigUser, SigDrugSch, SigDEA: string;
   cSignature, cHashData, cCrlUrl, cErr: string;
@@ -884,4 +886,5 @@
   ESCode := '';
   SaveCoPay := FALSE;
+  PrintLoc := 0;
   if BILLING_AWARE then
   begin
@@ -908,19 +911,5 @@
     OrderList := TStringList.Create;
     DigSigErr := True;
-    DigStoreErr := False;
-    if GetPKISite and GetPKIUse then
-      begin
-        try  //PKI object creation
-          crypto := CoXuDigSigS.Create;
-          crypto.GetCSP;
-          StatusText(crypto.Reason);
-          DigSigErr := False;
-        except
-        on  E: Exception do
-          begin
-            DigSigErr := True;
-          end;
-        end;
-      end;
+    CryptoChecked := False;
     try
       Nature := NO_PROVIDER;
@@ -993,5 +982,4 @@
               OrderList.Add(ChangeItem.ID + U + SS_ONCHART + U + RS_RELEASE + U + NO_WRITTEN);
 
-
           end; {with lstReview}
         end; {OR_NOKEY, OR_CLERK, OR_NURSE, OR_STUDENT}
@@ -1011,4 +999,20 @@
                                SigSts := SS_ESIGNED;
                                RelSts := RS_RELEASE;
+                               if (OrderRequiresDigitalSignature(ChangeItem.ID)) and (CryptoChecked = false)
+                                 and GetPKISite and GetPKIUse then
+                                  begin
+                                    Cryptochecked := true;
+                                    try  //PKI object creation
+                                      crypto := CoXuDigSigS.Create;
+                                      crypto.GetCSP;
+                                      StatusText(crypto.Reason);
+                                      DigSigErr := False;
+                                    except
+                                    on  E: Exception do
+                                      begin
+                                        DigSigErr := True;
+                                      end;
+                                    end;
+                                  end;
                                if (DigSigErr = false) and (OrderRequiresDigitalSignature(ChangeItem.ID))
                                  and (SigItems.OK2SaveSettings) then
@@ -1122,5 +1126,8 @@
              else
              begin
-                InfoBox(TX_Order_Error, 'Review/Sign Orders', MB_OK);
+                if BILLING_AWARE then
+                   InfoBox(TX_Order_Error, 'Review/Sign Orders', MB_OK)
+                   else
+                      InfoBox(TC_Order_Error, 'Review/Sign Orders', MB_OK);
                 Exit;
              end
@@ -1137,7 +1144,6 @@
             if (cmdOk.Caption = 'Sign') then
               begin
-                if Not BADxEntered then
+                if Not UBACore.BADxEntered then
                 begin
-                   SaveCoPay := FALSE;
                    InfoBox(TX_NO_DX, TC_NO_DX, MB_OK);
                    Exit;
@@ -1156,8 +1162,23 @@
         if OrderList.Count > 0 then
         begin
+
+        //hds7591  Clinic/Ward movement.  Nurse orders
+          if (cmdOk.Caption = 'Sign') or (cmdOK.Caption = 'OK') and (not frmFrame.TimedOut) then
+          begin
+             if IsValidIMOLoc(uCore.TempEncounterLoc,Patient.DFN) then
+                frmClinicWardMeds.ClinicOrWardLocation(OrderList, uCore.TempEncounterLoc,uCore.TempEncounterLocName, PrintLoc)
+             else
+                if (IsValidIMOLoc(Encounter.Location,Patient.DFN)) and ((frmClinicWardMeds.rpcIsPatientOnWard(patient.DFN)) and (Patient.Inpatient = false)) then
+                   frmClinicWardMeds.ClinicOrWardLocation(OrderList, Encounter.Location,Encounter.LocationName, PrintLoc);
+          end;
+          uCore.TempEncounterLoc := 0;
+          uCore.TempEncounterLocName := '';
+        end;
+        //hds7591  Clinic/Ward movement.
+        
           if SaveCoPay then
             SigItems.SaveSettings; // Save CoPay FIRST
           SendOrders(OrderList, ESCode);   {*KCM*}
-        end;
+
         with OrderList do for i := 0 to Count - 1 do
         begin
@@ -1183,5 +1204,5 @@
             if theSts = 10 then  OrderList.Delete(idx);  //signed delayed order should not be printed.
           end;
-          PrintOrdersOnSignRelease(OrderList, Nature);
+          PrintOrdersOnSignRelease(OrderList, Nature, PrintLoc);
         end;
         StatusText('');
@@ -1323,5 +1344,4 @@
        if frmFrame.TimedOut then Exit;
         //Billing Awareness 'flyover' hint includes Dx code(s) when Dx code(s) have been assigned to an order
-          tempRec := TBADxRecord.Create;
 
           if Assigned(frmReview) then
@@ -1402,5 +1422,4 @@
   UBAGlobals.PLFactorsIndexes.Clear;
 
-  numSelected := 0;
   match := false;
   allBlank := false;
@@ -1550,5 +1569,5 @@
               thisOrderList.Add(thisChangeItem.ID);
               // Returns True if All selected orders are N/A, Order selected are NON CIDC or DC'd
-              if IsAllOrdersNA(thisOrderList) then
+              if uBACore.IsAllOrdersNA(thisOrderList) then
                  begin
                  Diagnosis1.Enabled := false;
@@ -1712,8 +1731,4 @@
         end;
    end;
-
-  //CopyActive := true; //CQ6225
-  //Paste1.Enabled := true; //CQ6225  
-
 end;
 
@@ -1737,6 +1752,4 @@
           if (frmReview.lstReview.Selected[i]) then
             begin
-            thisChangeItem := TChangeItem.Create;
-            thisChangeItem := nil;
             thisChangeItem := TChangeItem(lstReview.Items.Objects[i]);
 
@@ -1756,7 +1769,6 @@
 
                   //***************************************************************
-                  if (NOT UBACore.IsOrderBillable(fReview.targetOrderID) ) then// and
-                  //   (NOT tempDxNodeExists(fReview.targetOrderID) )then   // added to allow copy to NON CIDC consult orders that requires a DX.
-                    begin
+                  if (NOT UBACore.IsOrderBillable(fReview.targetOrderID) ) then
+                   begin
                     ShowMessage(BA_NA_PASTE_DISALLOWED);
                     fReview.targetOrderID := '';
@@ -1768,9 +1780,9 @@
                   with newRec do
                     begin
-                    FOrderID := fReview.targetOrderID;
-                    FBADxCode := CopyBuffer.FBADxCode;
-                    FBASecDx1 := CopyBuffer.FBASecDx1;
-                    FBASecDx2 := CopyBuffer.FBASecDx2;
-                    FBASecDx3 := CopyBuffer.FBASecDx3;
+                      FOrderID := fReview.targetOrderID;
+                      FBADxCode := CopyBuffer.FBADxCode;
+                      FBASecDx1 := CopyBuffer.FBASecDx1;
+                      FBASecDx2 := CopyBuffer.FBASecDx2;
+                      FBASecDx3 := CopyBuffer.FBASecDx3;
                     end;
 
@@ -1796,13 +1808,5 @@
 
   lstReview.Refresh; //Update grid to show pasted Dx/TF/CI
-{
-  //CQ6225
-  if CopyActive then
-     begin
-     Paste1.Enabled := false;
-     CopyActive := false;
-     end;
-  //end CQ6225
-}
+
 end;
 
@@ -1840,6 +1844,5 @@
 begin
   howMany := 0;
-  thisItem := TChangeItem.Create;
-  
+
   for i := 0 to lstReview.Items.Count-1 do
      begin
@@ -1958,6 +1961,4 @@
      FRVTFHintWindowActive := False;
   end;
-   x := 0;
-   y := 0;
 
    FRVTFHintWindow := THintWindow.Create(frmReview); //(frmReview);
@@ -2033,5 +2034,5 @@
   Y: Integer);
 begin
-  IF BILLING_AWARE then
+//  IF BILLING_AWARE then
     if FRVTFHintWindowActive then
     begin
@@ -2043,6 +2044,4 @@
 procedure TfrmReview.FormMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
 begin
-if BILLING_AWARE then
-begin
   if FRVTFHintWindowActive then
   begin
@@ -2051,5 +2050,4 @@
      Application.ProcessMessages;
   end;
-  end;
 end;
 
@@ -2061,24 +2059,24 @@
         begin
         //Abbreviated captions
-        Label23.ShowHint := false;
-        StaticText1.ShowHint := false;
-        Label17.ShowHint := false;
-        Label15.ShowHint := false;
-        Label13.ShowHint := false;
-        Label11.ShowHint := false;
-        lblHNC.ShowHint := false;
+          Label23.ShowHint := false;
+          StaticText1.ShowHint := false;
+          Label17.ShowHint := false;
+          Label15.ShowHint := false;
+          Label13.ShowHint := false;
+          Label11.ShowHint := false;
+          lblHNC.ShowHint := false;
         //Long captions
-        Label24.ShowHint := false;
-        staticText4.ShowHint := false;
-        Label17.ShowHint := false;
-        Label18.ShowHint := false;
-        Label15.ShowHint := false;
-        Label16.ShowHint := false;
-        Label13.ShowHint := false;
-        Label14.ShowHint := false;
-        Label11.ShowHint := false;
-        Label12.ShowHint := false;
-        lblHNC.ShowHint := false;
-        lblHNC2.ShowHint := false;
+          Label24.ShowHint := false;
+          staticText4.ShowHint := false;
+          Label17.ShowHint := false;
+          Label18.ShowHint := false;
+          Label15.ShowHint := false;
+          Label16.ShowHint := false;
+          Label13.ShowHint := false;
+          Label14.ShowHint := false;
+          Label11.ShowHint := false;
+          Label12.ShowHint := false;
+          lblHNC.ShowHint := false;
+          lblHNC2.ShowHint := false;
         end;
      end
@@ -2088,34 +2086,31 @@
         begin
         //Abbreviated captions
-        Label23.ShowHint := true;
-        StaticText1.ShowHint := true;
-        Label17.ShowHint := true;
-        Label15.ShowHint := true;
-        Label13.ShowHint := true;
-        Label11.ShowHint := true;
-        lblHNC.ShowHint := true;
-        //Long captions
-        Label24.ShowHint := true;
-        staticText4.ShowHint := true;
-        Label17.ShowHint := true;
-        Label18.ShowHint := true;
-        Label15.ShowHint := true;
-        Label16.ShowHint := true;
-        Label13.ShowHint := true;
-        Label14.ShowHint := true;
-        Label11.ShowHint := true;
-        Label12.ShowHint := true;
-        lblHNC.ShowHint := true;
-        lblHNC2.ShowHint := true;
+          Label23.ShowHint := true;
+          StaticText1.ShowHint := true;
+          Label17.ShowHint := true;
+          Label15.ShowHint := true;
+          Label13.ShowHint := true;
+          Label11.ShowHint := true;
+          lblHNC.ShowHint := true;
+          //Long captions
+          Label24.ShowHint := true;
+          staticText4.ShowHint := true;
+          Label17.ShowHint := true;
+          Label18.ShowHint := true;
+          Label15.ShowHint := true;
+          Label16.ShowHint := true;
+          Label13.ShowHint := true;
+          Label14.ShowHint := true;
+          Label11.ShowHint := true;
+          Label12.ShowHint := true;
+          lblHNC.ShowHint := true;
+          lblHNC2.ShowHint := true;
         end;
      end;
 end;
 
-// determines if BA switch is on, user is provider and has orelse key
-// is true, BA data is not mandatory.
 procedure TfrmReview.FormClose(Sender: TObject; var Action: TCloseAction);
 begin
- if BILLING_AWARE then
- begin
+
     if FRVTFHintWindowActive then
     begin
@@ -2125,13 +2120,12 @@
       with fraCopay do
         begin
-        Label24.ShowHint := false;
-        staticText4.ShowHint := false;
-        Label18.ShowHint := false;
-        Label16.ShowHint := false;
-        Label14.ShowHint := false;
-        Label12.ShowHint := false;
-        lblHNC2.ShowHint := false;
+          Label24.ShowHint := false;
+          staticText4.ShowHint := false;
+          Label18.ShowHint := false;
+          Label16.ShowHint := false;
+          Label14.ShowHint := false;
+          Label12.ShowHint := false;
+          lblHNC2.ShowHint := false;
         end;
-    end;
  end;
 
@@ -2164,8 +2158,5 @@
   i : integer;
 begin
-  //The with statement below would cause access violations on other Delphi machines.
-{    with lstReview do
-    begin }
-  //Must use fully qualifying path includeing the unit... very wierd!
+
   if fReview.frmReview.lstReview.Count < 1 then Exit;
   for i := 0 to fReview.frmReview.lstReview.Count-1 do
@@ -2180,5 +2171,4 @@
   if fReview.frmReview.lstReview.ItemIndex >= 0 then
     fReview.frmReview.lstReview.Selected[fReview.frmReview.lstReview.ItemIndex] := True;
- //   end;
 end;
 
@@ -2192,9 +2182,10 @@
 procedure TfrmReview.FormatListForScreenReader;
 var
-  ListStateOn : boolean;
+  ListStateOn : longbool;
+  Success: longbool;
 begin
   //Determine if a screen reader is currently being used.
-  SystemParametersInfo(SPI_GETSCREENREADER, 0, @ListStateOn,0);
-  if ListStateOn then
+  Success := SystemParametersInfo(SPI_GETSCREENREADER, 0, @ListStateOn,0);
+  if Success and ListStateOn then
     SetItemTextToState;
 end;
Index: cprs/branches/foia-cprs/CPRS-Chart/fRptBox.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fRptBox.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fRptBox.dfm	(revision 460)
@@ -1,10 +1,11 @@
 object frmReportBox: TfrmReportBox
-  Left = 351
-  Top = 217
-  Width = 392
-  Height = 357
+  Left = 512
+  Top = 214
   Anchors = []
+  AutoScroll = False
   BorderIcons = [biSystemMenu]
   Caption = 'frmReportBox'
+  ClientHeight = 321
+  ClientWidth = 350
   Color = clBtnFace
   Font.Charset = ANSI_CHARSET
@@ -35,8 +36,7 @@
     Left = 0
     Top = 0
-    Width = 384
-    Height = 309
+    Width = 350
+    Height = 300
     Align = alClient
-    Anchors = []
     Color = clCream
     Font.Charset = ANSI_CHARSET
@@ -56,6 +56,6 @@
   object pnlButton: TPanel
     Left = 0
-    Top = 309
-    Width = 384
+    Top = 300
+    Width = 350
     Height = 21
     Align = alBottom
@@ -65,8 +65,8 @@
     TabOrder = 1
     DesignSize = (
-      384
+      350
       21)
     object cmdPrint: TButton
-      Left = 222
+      Left = 191
       Top = 0
       Width = 75
@@ -78,5 +78,5 @@
     end
     object cmdClose: TButton
-      Left = 302
+      Left = 274
       Top = 0
       Width = 75
@@ -91,6 +91,6 @@
   end
   object dlgPrintReport: TPrintDialog
-    Left = 142
-    Top = 49
+    Left = 318
+    Top = 41
   end
 end
Index: cprs/branches/foia-cprs/CPRS-Chart/fRptBox.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fRptBox.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fRptBox.pas	(revision 460)
@@ -29,5 +29,5 @@
 
 uses
-  uCore, rCore, rReports, Printers;
+  uCore, rCore, rReports, Printers, rMisc;
 
 {$R *.DFM}
@@ -79,4 +79,12 @@
       BoundsRect := Rect;
       ResizeAnchoredFormToFont(Result);
+
+      memReport.Align := alClient; //CQ6661
+
+      //CQ6889 - force Print & Close buttons to bottom right of form regardless of selected font size
+      cmdClose.Left := (pnlButton.Left+pnlButton.Width)-cmdClose.Width;
+      cmdPrint.Left := (cmdClose.Left-cmdPrint.Width)-1;
+      //end CQ6889
+
       SetLength(BtnLeft, k);
       for j := 0 to k - 1 do
Index: cprs/branches/foia-cprs/CPRS-Chart/fSurgery.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fSurgery.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fSurgery.dfm	(revision 460)
@@ -1,5 +1,5 @@
 inherited frmSurgery: TfrmSurgery
-  Left = 244
-  Top = 179
+  Left = 521
+  Top = 221
   Width = 720
   Height = 409
@@ -423,4 +423,54 @@
         end
       end
+      object mnuViewInformation: TMenuItem
+        Caption = 'Information'
+        OnClick = mnuViewInformationClick
+        object mnuViewDemo: TMenuItem
+          Tag = 1
+          Caption = 'De&mographics...'
+          OnClick = ViewInfo
+        end
+        object mnuViewVisits: TMenuItem
+          Tag = 2
+          Caption = 'Visits/Pr&ovider...'
+          OnClick = ViewInfo
+        end
+        object mnuViewPrimaryCare: TMenuItem
+          Tag = 3
+          Caption = 'Primary &Care...'
+          OnClick = ViewInfo
+        end
+        object mnuViewMyHealtheVet: TMenuItem
+          Tag = 4
+          Caption = 'MyHealthe&Vet...'
+          OnClick = ViewInfo
+        end
+        object mnuInsurance: TMenuItem
+          Tag = 5
+          Caption = '&Insurance...'
+          OnClick = ViewInfo
+        end
+        object mnuViewFlags: TMenuItem
+          Tag = 6
+          Caption = '&Flags...'
+          OnClick = ViewInfo
+        end
+        object mnuViewRemoteData: TMenuItem
+          Tag = 7
+          Caption = 'Remote &Data...'
+          OnClick = ViewInfo
+        end
+        object mnuViewReminders: TMenuItem
+          Tag = 8
+          Caption = '&Reminders...'
+          Enabled = False
+          OnClick = ViewInfo
+        end
+        object mnuViewPostings: TMenuItem
+          Tag = 9
+          Caption = '&Postings...'
+          OnClick = ViewInfo
+        end
+      end
       object Z3: TMenuItem
         Caption = '-'
Index: cprs/branches/foia-cprs/CPRS-Chart/fSurgery.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fSurgery.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fSurgery.pas	(revision 460)
@@ -131,4 +131,14 @@
     popNoteMemoInsTemplate: TMenuItem;
     popNoteMemoEncounter: TMenuItem;
+    mnuViewInformation: TMenuItem;
+    mnuViewDemo: TMenuItem;
+    mnuViewVisits: TMenuItem;
+    mnuViewPrimaryCare: TMenuItem;
+    mnuViewMyHealtheVet: TMenuItem;
+    mnuInsurance: TMenuItem;
+    mnuViewFlags: TMenuItem;
+    mnuViewReminders: TMenuItem;
+    mnuViewRemoteData: TMenuItem;
+    mnuViewPostings: TMenuItem;
     procedure mnuChartTabClick(Sender: TObject);
     procedure pnlRightResize(Sender: TObject);
@@ -196,4 +206,6 @@
     procedure tvSurgeryAddition(Sender: TObject; Node: TTreeNode);
     procedure tvSurgeryDeletion(Sender: TObject; Node: TTreeNode);
+    procedure ViewInfo(Sender: TObject);
+    procedure mnuViewInformationClick(Sender: TObject);
   private
     FEditingIndex: Integer;                      // index of note being currently edited
@@ -212,5 +224,5 @@
     FDeleted: boolean;
     procedure ClearEditControls;
-    procedure DoAutoSave;
+    procedure DoAutoSave(Suppress: integer = 1);
     function GetTitleText(AnIndex: Integer): string;
     procedure InsertAddendum;
@@ -832,5 +844,5 @@
     begin
       if Title > 0 then CurTitle := Title else CurTitle := DocType;
-      if AskCosignerForTitle(CurTitle, Author) and (Cosigner <= 0) then Result := True;
+      if AskCosignerForTitle(CurTitle, Author, DateTime) and (Cosigner <= 0) then Result := True;
     end;
   end;
@@ -1371,5 +1383,5 @@
 end;
 
-procedure TfrmSurgery.DoAutoSave;
+procedure TfrmSurgery.DoAutoSave(Suppress: integer = 1);
 var
   ErrMsg: string;
@@ -1381,5 +1393,5 @@
     timAutoSave.Enabled := False;
     try
-      SetText(ErrMsg, memNewNote.Lines, lstNotes.GetIEN(EditingIndex),1);
+      SetText(ErrMsg, memNewNote.Lines, lstNotes.GetIEN(EditingIndex), Suppress);
     finally
       timAutoSave.Enabled := True;
@@ -1755,11 +1767,14 @@
 procedure TfrmSurgery.SaveSignItem(const ItemID, ESCode: string);
 { saves and optionally signs a progress note or addendum }
+const
+  SIG_COSIGN = 'COSIGNATURE';
+  SIG_SIGN   = 'SIGNATURE';
 var
   AnIndex, IEN, i: Integer;
   Saved, ContinueSign: Boolean;  {*RAB* 8/26/99}
-  SignSts: TActionRec;
+  ActionSts, SignSts: TActionRec;
   APCEObject: TPCEData;
   OK: boolean;
-
+  ActionType, SignTitle: string;
 begin
   AnIndex := -1;
@@ -1786,5 +1801,20 @@
   if Length(ESCode) > 0 then
   begin
-    if not NoteHasText(IEN) then
+    if CosignDocument(IEN) then
+    begin
+      SignTitle := TX_COSIGN;
+      ActionType := SIG_COSIGN;
+    end else
+    begin
+      SignTitle := TX_SIGN;
+      ActionType := SIG_SIGN;
+    end;
+    ActOnDocument(ActionSts, IEN, ActionType);
+    if not ActionSts.Success then
+      begin
+        InfoBox(ActionSts.Reason, TX_IN_AUTH, MB_OK);
+        ContinueSign := False;
+      end
+    else if not NoteHasText(IEN) then
       begin
         InfoBox(TX_EMPTY_NOTE1, TC_EMPTY_NOTE, MB_OK or MB_ICONERROR);
@@ -1929,9 +1959,11 @@
 begin
   inherited;
-  DoAutoSave;
+  DoAutoSave(0);
   timAutoSave.Enabled := False;
   try
     SpellCheckForControl(memNewNote);
   finally
+    FChanged := True;
+    DoAutoSave(0);
     timAutoSave.Enabled := True;
   end;
@@ -1941,9 +1973,11 @@
 begin
   inherited;
-  DoAutoSave;
+  DoAutoSave(0);
   timAutoSave.Enabled := False;
   try
     GrammarCheckForControl(memNewNote);
   finally
+    FChanged := True;
+    DoAutoSave(0);
     timAutoSave.Enabled := True;
   end;
@@ -2019,4 +2053,5 @@
   SigAction: integer;
   SavedDocID: string;
+  ARefDate: TFMDateTime;
 begin
   inherited;
@@ -2051,5 +2086,6 @@
 
   Exclusions := GetCurrentSigners(lstNotes.ItemIEN);
-  SelectAdditionalSigners(Font.Size, lstNotes.ItemIEN, SigAction, Exclusions, SignerList, CT_NOTES);
+  ARefDate := StrToFloat(Piece(lstNotes.Items[lstNotes.ItemIndex], U, 3));
+  SelectAdditionalSigners(Font.Size, lstNotes.ItemIEN, SigAction, Exclusions, SignerList, CT_NOTES, ARefDate);
   with SignerList do
     begin
@@ -2644,4 +2680,24 @@
 end;
 
+procedure TfrmSurgery.ViewInfo(Sender: TObject);
+begin
+  inherited;
+  frmFrame.ViewInfo(Sender);
+end;
+
+procedure TfrmSurgery.mnuViewInformationClick(Sender: TObject);
+begin
+  inherited;
+  mnuViewDemo.Enabled := frmFrame.pnlPatient.Enabled;
+  mnuViewVisits.Enabled := frmFrame.pnlVisit.Enabled;
+  mnuViewPrimaryCare.Enabled := frmFrame.pnlPrimaryCare.Enabled;
+  mnuViewMyHealtheVet.Enabled := not (Copy(frmFrame.laMHV.Hint, 1, 2) = 'No');
+  mnuInsurance.Enabled := not (Copy(frmFrame.laVAA2.Hint, 1, 2) = 'No');
+  mnuViewFlags.Enabled := frmFrame.lblFlag.Enabled;
+  mnuViewRemoteData.Enabled := frmFrame.lblCirn.Enabled;
+  mnuViewReminders.Enabled := frmFrame.pnlReminders.Enabled;
+  mnuViewPostings.Enabled := frmFrame.pnlPostings.Enabled;
+end;
+
 initialization
   uPCEEdit := TPCEData.Create;
Index: cprs/branches/foia-cprs/CPRS-Chart/fVitals.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/fVitals.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/fVitals.pas	(revision 460)
@@ -37,5 +37,8 @@
   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
   StdCtrls, ORCtrls, TeEngine, Series, TeeProcs, Chart, ExtCtrls, Grids,
-  Buttons, ORNet, ORFn, uConst, Menus, ORDtTmRng;  {*KCM*}
+  Buttons, ORNet, ORFn, uConst, Menus, ORDtTmRng
+  , ComCtrls
+  , uVitals
+  ;  {*KCM*}
 
 type
@@ -114,4 +117,5 @@
   end;
 
+
 var
   frmVitals: TfrmVitals;
@@ -120,5 +124,5 @@
 
 procedure SelectVital(FontSize:integer; idx: integer);
-procedure SelectVitals(FontSize: Integer);
+procedure SelectVitals(VitalType: String);
 function VitalsGrid(const patient: string; date1, date2: TFMDateTime; restrictdates: integer; tests: TStrings): TStrings;  //*DFN*
 function VitalsMemo(const patient: string; date1, date2: TFMDateTime; tests: TStrings): TStrings;  //*DFN*
@@ -127,5 +131,5 @@
 
 uses fCover, uCore, rCore, fVit, fFrame, fEncnt, fVisit, fRptBox, rReports,
-  uAccessibleStringGrid;
+  uAccessibleStringGrid, uInit;
 
 const
@@ -157,5 +161,53 @@
 end;
 
-
+function getVitalsStartDate : String;
+begin
+  result := '';
+  if Patient.Inpatient then
+    result := FormatDateTime('mm/dd/yy',Now - 7)
+  else
+    result := FormatDateTime('mm/dd/yy',IncMonth(Now,-6));
+end;
+
+procedure SelectVitals(VitalType: String);
+var
+  VLPtVitals : TGMV_VitalsViewForm;
+  GMV_FName,
+  GMV_LibName: String;
+begin
+ { Availble Forms:
+  GMV_FName :='GMV_VitalsEnterDLG';
+  GMV_FName :='GMV_VitalsEnterForm';
+  GMV_FName :='GMV_VitalsViewForm';
+  GMV_FName :='GMV_VitalsViewDLG';
+  }
+  GMV_FName :='GMV_VitalsViewDLG';
+  GMV_LibName :='GMV_VitalsViewEnter.dll';
+  GMV_LibName := GetProgramFilesPath + SHARE_DIR + GMV_LibName;
+  VitalsDLLHandle := LoadLibrary(PChar(GMV_LibName));
+ // UpdateTimeOutInterval(5000);
+  if VitalsDLLHandle <> 0 then
+    begin
+     @VLPtVitals := GetProcAddress(VitalsDLLHandle,PChar(GMV_FName));
+     if assigned(VLPtVitals) then
+       VLPtVitals(RPCBrokerV,Patient.DFN,FloatToStr(Encounter.Location),
+                  getVitalsStartDate(),FormatDateTime('mm/dd/yy',Now),
+                  GMV_APP_SIGNATURE,
+                  GMV_CONTEXT,GMV_CONTEXT,
+                  Patient.Name,
+                  frmFrame.lblPtSSN.Caption + '    ' + frmFrame.lblPtAge.Caption,
+                  Encounter.LocationName +U+ VitalType)
+     else
+       MessageDLG('Can''t find function "'+GMV_FName+'".',mtError,[mbok],0);
+    end
+  else
+    MessageDLG('Can''t find library "'+GMV_LibName+'".',mtError,[mbok],0);
+  @VLPtVitals := nil;
+  FreeLibrary(VitalsDLLHandle);
+  if DLLForceClose then
+    frmFrame.Close; // Fix for CQ: 7535
+end;
+
+(*
 procedure SelectVitals(FontSize: Integer);
 var
@@ -209,5 +261,5 @@
   end;
 end;
-
+  *)
 procedure TfrmVitals.VGrid(griddata: TStrings);
 var
@@ -249,5 +301,5 @@
 function VitalsGrid(const patient: string; date1, date2: TFMDateTime; restrictdates: integer; tests: TStrings): TStrings;  //*DFN*
 begin
-  CallV('ORQQVI1 GRID', [patient, date1, date2, restrictdates, tests]);
+  CallV('GMV ORQQVI1 GRID', [patient, date1, date2, restrictdates, tests]);
   Result := RPCBrokerV.Results;
 end;
@@ -255,5 +307,5 @@
 function VitalsMemo(const patient: string; date1, date2: TFMDateTime; tests: TStrings): TStrings;  //*DFN*
 begin
-  CallV('ORQQVI1 DETAIL', [patient, date1, date2, 0, tests]);
+  CallV('GMV ORQQVI1 DETAIL', [patient, date1, date2, 0, tests]);
   Result := RPCBrokerV.Results;
 end;
Index: cprs/branches/foia-cprs/CPRS-Chart/mCoPayDesc.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/mCoPayDesc.dfm	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/mCoPayDesc.dfm	(revision 460)
@@ -4,11 +4,14 @@
   Width = 598
   Height = 132
+  Anchors = [akLeft, akTop, akRight]
+  AutoScroll = False
+  AutoSize = True
   ParentShowHint = False
   ShowHint = True
   TabOrder = 0
   object pnlRight: TPanel
-    Left = 349
+    Left = 388
     Top = 0
-    Width = 249
+    Width = 210
     Height = 132
     Align = alRight
@@ -18,5 +21,5 @@
       Left = 0
       Top = 0
-      Width = 249
+      Width = 210
       Height = 3
       Align = alTop
@@ -26,8 +29,7 @@
       Left = 0
       Top = 3
-      Width = 249
+      Width = 210
       Height = 14
       Align = alTop
-      Alignment = taCenter
       AutoSize = False
       Caption = 'Outpatient Medications Related To:'
@@ -37,5 +39,5 @@
       Left = 0
       Top = 17
-      Width = 249
+      Width = 210
       Height = 115
       Align = alClient
@@ -46,5 +48,5 @@
         Left = 2
         Top = 2
-        Width = 245
+        Width = 206
         Height = 3
         Align = alTop
@@ -54,5 +56,5 @@
         Left = 2
         Top = 95
-        Width = 245
+        Width = 206
         Height = 15
         Align = alTop
@@ -61,7 +63,7 @@
         TabOrder = 6
         object lblHNC2: TORStaticText
-          Left = 60
-          Top = 0
-          Width = 182
+          Left = 50
+          Top = 0
+          Width = 150
           Height = 15
           AutoSize = False
@@ -75,4 +77,5 @@
           Width = 50
           Height = 15
+          Alignment = taRightJustify
           AutoSize = False
           Caption = '  HNC -  '
@@ -84,5 +87,5 @@
         Left = 2
         Top = 80
-        Width = 245
+        Width = 206
         Height = 15
         Align = alTop
@@ -91,7 +94,7 @@
         TabOrder = 5
         object Label12: TORStaticText
-          Left = 60
-          Top = 0
-          Width = 183
+          Left = 50
+          Top = 0
+          Width = 150
           Height = 15
           AutoSize = False
@@ -105,6 +108,7 @@
           Width = 50
           Height = 15
-          AutoSize = False
-          Caption = '  MST -'
+          Alignment = taRightJustify
+          AutoSize = False
+          Caption = '  MST -  '
           TabOrder = 0
           TabStop = True
@@ -114,5 +118,5 @@
         Left = 2
         Top = 65
-        Width = 245
+        Width = 206
         Height = 15
         Align = alTop
@@ -121,7 +125,7 @@
         TabOrder = 4
         object Label14: TORStaticText
-          Left = 60
-          Top = 0
-          Width = 182
+          Left = 50
+          Top = 0
+          Width = 150
           Height = 15
           AutoSize = False
@@ -135,4 +139,5 @@
           Width = 50
           Height = 15
+          Alignment = taRightJustify
           AutoSize = False
           Caption = '    EC -  '
@@ -144,5 +149,5 @@
         Left = 2
         Top = 50
-        Width = 245
+        Width = 206
         Height = 15
         Align = alTop
@@ -151,7 +156,7 @@
         TabOrder = 3
         object Label16: TORStaticText
-          Left = 60
-          Top = 0
-          Width = 182
+          Left = 50
+          Top = 0
+          Width = 150
           Height = 15
           AutoSize = False
@@ -165,4 +170,5 @@
           Width = 50
           Height = 15
+          Alignment = taRightJustify
           AutoSize = False
           Caption = '     IR -  '
@@ -174,5 +180,5 @@
         Left = 2
         Top = 35
-        Width = 245
+        Width = 206
         Height = 15
         Align = alTop
@@ -181,7 +187,7 @@
         TabOrder = 2
         object Label18: TORStaticText
-          Left = 60
-          Top = 0
-          Width = 182
+          Left = 50
+          Top = 0
+          Width = 150
           Height = 15
           AutoSize = False
@@ -195,4 +201,5 @@
           Width = 50
           Height = 15
+          Alignment = taRightJustify
           AutoSize = False
           Caption = '    AO -  '
@@ -204,5 +211,5 @@
         Left = 2
         Top = 5
-        Width = 245
+        Width = 206
         Height = 15
         Align = alTop
@@ -211,7 +218,7 @@
         TabOrder = 0
         object Label24: TORStaticText
-          Left = 60
-          Top = 0
-          Width = 182
+          Left = 50
+          Top = 0
+          Width = 150
           Height = 15
           AutoSize = False
@@ -225,6 +232,7 @@
           Width = 50
           Height = 17
-          AutoSize = False
-          Caption = '    SC -'
+          Alignment = taRightJustify
+          AutoSize = False
+          Caption = '    SC -  '
           TabOrder = 0
           TabStop = True
@@ -234,5 +242,5 @@
         Left = 2
         Top = 20
-        Width = 245
+        Width = 206
         Height = 15
         Align = alTop
@@ -241,7 +249,7 @@
         TabOrder = 1
         object StaticText4: TORStaticText
-          Left = 60
-          Top = 0
-          Width = 182
+          Left = 50
+          Top = 0
+          Width = 150
           Height = 15
           AutoSize = False
@@ -255,4 +263,5 @@
           Width = 50
           Height = 15
+          Alignment = taRightJustify
           AutoSize = False
           Caption = '    CV -  '
@@ -266,5 +275,5 @@
     Left = 0
     Top = 0
-    Width = 349
+    Width = 388
     Height = 132
     Align = alClient
@@ -274,5 +283,5 @@
       Left = 0
       Top = 0
-      Width = 349
+      Width = 388
       Height = 17
       Align = alTop
@@ -284,5 +293,5 @@
       Left = 0
       Top = 17
-      Width = 349
+      Width = 388
       Height = 115
       Align = alClient
Index: cprs/branches/foia-cprs/CPRS-Chart/rCore.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/rCore.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/rCore.pas	(revision 460)
@@ -98,4 +98,5 @@
 { General calls }
 
+function GetProgramFilesPath: String;
 function ExternalName(IEN: Int64; FileNumber: Double): string;
 function PersonHasKey(APerson: Int64; const AKey: string): Boolean;
@@ -133,5 +134,5 @@
 procedure RenewAlert(XQAID: string);
 function GetSortMethod: string;
-procedure SetSortMethod(Sort: string);
+procedure SetSortMethod(Sort: string; Direction: string);
 
 { Patient List calls }
@@ -198,8 +199,11 @@
 function HasRemoteData(const DFN: string; var ALocations: TStringList): Boolean;
 function CheckHL7TCPLink: Boolean;
+function UseVistaWeb: Boolean;
+function GetVistaWebAddress(value: string): string;
+procedure ChangeVistaWebParam(value: string);
 
 implementation
 
-uses Hash, uCore;
+uses Hash, uCore, ShlObj, Windows;
 
 var
@@ -303,4 +307,15 @@
 
 { General calls }
+
+function GetProgramFilesPath: String;
+Const
+  CSIDL_PROGRAM_FILES = $0026;
+var
+  Path: array[0..Max_Path] of Char;
+begin
+  Path := '';
+  SHGetSpecialFolderPath(0,Path,CSIDL_PROGRAM_FILES,false);
+  Result := Path;
+end;
 
 function ExternalName(IEN: Int64; FileNumber: Double): string;
@@ -507,8 +522,8 @@
 end;
 
-procedure SetSortMethod(Sort: string);
+procedure SetSortMethod(Sort: string; Direction: string);
 // Sets alert sort method for user
 begin
-   CallV('ORWORB SETSORT', [Sort]);
+   CallV('ORWORB SETSORT', [Sort, Direction]);
 end;
 
@@ -612,5 +627,5 @@
   a pointer to RPCBrokerV.Results, so the data must be used BEFORE the next broker call!}
 begin
-  CallV('ORWU NEWPERS', [StartFrom, Direction, '', '', True]);  //TRUE = return all active and inactive users
+  CallV('ORWU NEWPERS', [StartFrom, Direction, '', '', '', True]);  //TRUE = return all active and inactive users
   MixedCaseList(RPCBrokerV.Results);
   Result := RPCBrokerV.Results;
@@ -1244,4 +1259,21 @@
  end;
 
+function UseVistaWeb: Boolean;
+ begin;
+   CallV('ORWCIRN VISTAWEB',[nil]);
+   result := RPCBrokerV.Results[0] = '1';
+ end;
+
+function GetVistaWebAddress(value: string): string;
+begin
+  CallV('ORWCIRN WEBADDR', [value]);
+  result := RPCBrokerV.Results[0];
+end;
+
+procedure ChangeVistaWebParam(value: string);
+  begin
+    CallV('ORWCIRN WEBCH',[value]);
+  end;
+
 function GetDefaultPrinter(DUZ: Int64; Location: integer): string;
 begin
Index: cprs/branches/foia-cprs/CPRS-Chart/rCover.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/rCover.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/rCover.pas	(revision 460)
@@ -156,4 +156,11 @@
         Src[i] := x;
       end;
+    if (Piece(Src[i], U, 5)='C') then  // Clin Meds
+    begin
+       MarkForDelete := False;                    // always display non-VA meds
+       x := Src[i];
+       SetPiece(x, U, 2, 'Clin Meds  ' + Piece(x, U, 2));
+       Src[i] := x;
+    end;
     // clear non-active meds   (SHOULD THIS INCLUDE PENDING ORDERS?)
     if MedStatusGroup(Piece(Src[i], U, 4)) = MED_NONACTIVE then MarkForDelete := True;
Index: cprs/branches/foia-cprs/CPRS-Chart/rGraphs.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/rGraphs.pas	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/rGraphs.pas	(revision 460)
@@ -0,0 +1,269 @@
+unit rGraphs;
+
+interface
+
+uses SysUtils, Classes, Controls, Forms, ORNet, ORFn, Graphics;
+
+function rpcPublicEdit: Boolean;
+function rpcReportParams(ien: integer): String;
+
+procedure FastAdd(source: TStrings; destination: TStrings);  // not used
+procedure FastAssign(source: TStrings; destination: TStrings);
+  // example: FastAssign(rpcDrugClass, lstDrugClass.Items)
+
+function rpcClass(itemtype: string): TStrings;
+function rpcTaxonomy(alltax: boolean; taxonomies: TStrings): TStrings;
+procedure rpcDetailDay(Dest: TStrings; const PatientDFN: string; ADate1, ADate2: TFMDateTime;
+  ATypeItem: string; complete: boolean);  //*DFN*
+function rpcDetailSelected(const PatientDFN: string; ADate1, ADate2: TFMDateTime;
+  tests: TStrings; complete: boolean): TStrings;  //*DFN*
+function rpcGetAllItems(const PatientDFN: string): TStrings;
+function rpcGetItems(typeitem: string; const PatientDFN: string): TStrings;
+function rpcGetItemData(itemdata, timestamp: string; const PatientDFN: string): TStrings;
+function rpcGetTypes(const PatientDFN: string; subtypes: boolean): TStrings;
+function rpcGetTestSpec: TStrings;
+
+function rpcGetGraphDateRange(reportid: string): TStrings;
+function rpcGetGraphSettings: TStrings;
+procedure rpcSetGraphSettings(paramsetting, permission: string);
+function rpcGetGraphSizing: TStrings;
+procedure rpcSetGraphSizing(values: TStrings);
+
+function rpcGetGraphProfiles(profiles, permission: string; ext: integer): TStrings;
+procedure rpcSetGraphProfile(paramname, permission: string; paramvalues: TStrings);
+procedure rpcDeleteGraphProfile(paramname, permission: string);
+
+function rpcLookupItems(const filename, startfrom: string; direction: integer): TStrings;
+function rpcDateItem(oldestdate, newestdate: double; filenum: string; const PatientDFN: string): TStrings;
+procedure onoff(x: integer);
+
+implementation
+
+function rpcPublicEdit: Boolean;
+begin
+  onoff(1);
+  Result := sCallV('ORWGRPC PUBLIC', [nil]) = '1';
+  //Result := false;  //************* for testing turn on
+  onoff(0);
+end;
+
+function rpcReportParams(ien: integer): String;
+begin
+  onoff(1);
+  Result := sCallV('ORWGRPC RPTPARAM', [ien]);
+  onoff(0);
+end;
+
+procedure FastAssign(source: TStrings; destination: TStrings);
+var
+  ms: TMemoryStream;
+begin
+  destination.Clear;
+  ms := TMemoryStream.Create;
+  try
+    source.SaveToStream(ms);
+    ms.Seek(0, soFromBeginning);
+    destination.LoadFromStream(ms);
+  finally
+    ms.Free;
+  end;
+end;
+
+procedure FastAdd(source: TStrings; destination: TStrings);
+var
+  ms: TMemoryStream;
+begin
+  destination.Clear;
+  ms := TMemoryStream.Create;
+  try
+    destination.SaveToStream(ms);
+    ms.Seek(soFromEnd, 0);
+    source.SaveToStream(ms);
+    ms.Seek(0, soFromBeginning);
+    destination.LoadFromStream(ms);
+  finally
+    ms.Free;
+  end;
+end;
+
+procedure rpcDetailDay(Dest: TStrings; const PatientDFN: string; ADate1, ADate2: TFMDateTime;
+  ATypeItem: string; complete: boolean);  //*DFN*
+var
+  includecomplete: string;
+begin
+  if complete then includecomplete := '1' else includecomplete := '0';
+  onoff(1);
+  CallV('ORWGRPC DETAILS', [PatientDFN, ADate1, ADate2, ATypeItem, includecomplete]);
+  onoff(0);
+  QuickCopy(RPCBrokerV.Results, Dest);
+end;
+
+function rpcDetailSelected(const PatientDFN: string; ADate1, ADate2: TFMDateTime;
+  tests: TStrings; complete: boolean): TStrings;  //*DFN*
+var
+  includecomplete: string;
+begin
+  if complete then includecomplete := '1' else includecomplete := '0';
+  onoff(1);
+  CallV('ORWGRPC DETAIL', [PatientDFN, ADate1, ADate2, tests, includecomplete]);
+  onoff(0);
+  Result := RPCBrokerV.Results;
+end;
+
+function rpcGetAllItems(const PatientDFN: string): TStrings;
+begin
+  onoff(1);
+  CallV('ORWGRPC ALLITEMS', [PatientDFN]);
+  onoff(0);
+  MixedCaseList(RPCBrokerV.Results);
+  Result := RPCBrokerV.Results;
+end;
+
+function rpcGetTypes(const PatientDFN: string; subtypes: boolean): TStrings;
+var
+  includesubtypes: string;
+begin
+  if subtypes then includesubtypes := '1' else includesubtypes := '0';
+  onoff(1);
+  CallV('ORWGRPC TYPES', [PatientDFN, includesubtypes]);
+  onoff(0);
+  MixedCaseList(RPCBrokerV.Results);
+  Result := RPCBrokerV.Results;
+end;
+
+function rpcGetItems(typeitem: string; const PatientDFN: string): TStrings;
+begin
+  onoff(1);
+  CallV('ORWGRPC ITEMS', [PatientDFN, typeitem]);
+  onoff(0);
+  MixedCaseList(RPCBrokerV.Results);
+  Result := RPCBrokerV.Results;
+end;
+
+function rpcClass(itemtype: string): TStrings;
+begin
+  onoff(1);
+  CallV('ORWGRPC CLASS', [itemtype]);
+  onoff(0);
+  MixedCaseList(RPCBrokerV.Results);
+  Result := RPCBrokerV.Results;
+end;
+
+function rpcTaxonomy(alltax: boolean; taxonomies: TStrings): TStrings;
+var
+  getall: string;
+begin
+  if alltax then getall := '1' else getall := '0';
+  onoff(1);
+  CallV('ORWGRPC TAX', [getall, taxonomies]);
+  onoff(0);
+  Result := RPCBrokerV.Results;
+end;
+
+function rpcGetItemData(itemdata, timestamp: string; const PatientDFN: string): TStrings;
+begin
+  onoff(1);
+  CallV('ORWGRPC ITEMDATA', [itemdata, timestamp, PatientDFN]);
+  onoff(0);
+  Result := RPCBrokerV.Results;
+end;
+
+function rpcGetGraphDateRange(reportid: string): TStrings;
+begin
+  onoff(1);
+  CallV('ORWGRPC GETDATES', [reportid]);
+  onoff(0);
+  Result := RPCBrokerV.Results;
+end;
+
+function rpcGetGraphSettings: TStrings;
+begin
+  onoff(1);
+  CallV('ORWGRPC GETPREF', [nil]);
+  onoff(0);
+  Result := RPCBrokerV.Results;
+end;
+
+procedure rpcSetGraphSettings(paramsetting, permission: string);
+begin
+  onoff(1);
+  CallV('ORWGRPC SETPREF', [paramsetting, permission]);
+  onoff(0);
+end;
+
+function rpcGetGraphSizing: TStrings;
+begin
+  onoff(1);
+  CallV('ORWGRPC GETSIZE', [nil]);
+  onoff(0);
+  Result := RPCBrokerV.Results;
+end;
+
+procedure rpcSetGraphSizing(values: TStrings);
+begin
+  onoff(1);
+  CallV('ORWGRPC SETSIZE', [values]);
+  onoff(0);
+end;
+
+function rpcGetGraphProfiles(profiles, permission: string; ext: integer): TStrings;
+begin
+  onoff(1);
+  CallV('ORWGRPC GETVIEWS', [profiles, permission, ext]);
+  onoff(0);
+  if (profiles = '1') or (ext = 1) then MixedCaseList(RPCBrokerV.Results);
+  Result := RPCBrokerV.Results;
+end;
+
+procedure rpcSetGraphProfile(paramname, permission: string; paramvalues: TStrings);
+begin
+  onoff(1);
+  CallV('ORWGRPC SETVIEWS', [paramname, permission, paramvalues]);
+  onoff(0);
+end;
+
+procedure rpcDeleteGraphProfile(paramname, permission: string);
+begin
+  onoff(1);
+  CallV('ORWGRPC DELVIEWS', [paramname, permission]);
+  onoff(0);
+end;
+
+function rpcGetTestSpec: TStrings;
+begin
+  onoff(1);
+  CallV('ORWGRPC TESTSPEC', []);
+  onoff(0);
+  Result := RPCBrokerV.Results;
+end;
+
+function rpcLookupItems(const filename, StartFrom: string; Direction: integer): TStrings;
+begin
+  onoff(1);
+  CallV('ORWGRPC LOOKUP', [filename, StartFrom, Direction]);
+  onoff(0);
+  MixedCaseList(RPCBrokerV.Results);
+  Result := RPCBrokerV.Results;
+end;
+
+function rpcDateItem(oldestdate, newestdate: double; filenum: string; const PatientDFN: string): TStrings;
+begin
+  onoff(1);
+  CallV('ORWGRPC DATEITEM', [oldestdate, newestdate, filenum, PatientDFN]);
+  onoff(0);
+  Result := RPCBrokerV.Results;
+end;
+
+procedure onoff(x: integer);
+begin
+  if x = 1 then
+  begin
+    //Screen.Cursor := crHourGlass;
+  end
+  else
+  begin
+    //Screen.Cursor := crDefault;
+  end;
+end;
+
+end.
Index: cprs/branches/foia-cprs/CPRS-Chart/rMeds.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/rMeds.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/rMeds.pas	(revision 460)
@@ -35,4 +35,5 @@
 procedure Refill(AnOrderID, PickUpAt: string);
 function IsFirstDoseNowOrder(OrderID: string): boolean;
+function GetMedStatus(MedID: TStringList): boolean;
 
 implementation
@@ -96,5 +97,5 @@
     if NonVAMed then
         Instruct := 'Non-VA  ' + Instruct;
-    IVFluid   := Piece(x, U, 1) = 'IV';
+    IVFluid   := Piece(x, U, 1) = '~IV';
     SrvSeq    := 0;
     LastFill  := MakeFMDateTime(Piece(x, U, 11));
@@ -135,4 +136,7 @@
   AMed: TMedListRec;
 begin
+  //Check for CQ 9814 this should prevent an M error is DFn is not defined.
+  if patient=nil then exit;
+  if patient.DFN='' then exit;
   ClinMeds := TList.Create;           //IMO new
   tmpInPtMeds := TList.Create;        //IMO new
@@ -176,4 +180,6 @@
   OutPtMeds.Sort(ByStatusThenStop);
   NonVAMeds.Sort(ByStatusThenStop);
+  if Assigned(ClinMeds) then FreeAndNil(ClinMeds);
+  if Assigned(tmpInPtMeds) then FreeAndNil(tmpInPtMeds);
 end;
 
@@ -201,3 +207,8 @@
 end;
 
+function GetMedStatus(MedID: TStringList): boolean;
+begin
+ Result := SCallV('ORWDX1 STCHANGE',[Patient.DFN, MedID])= '1';
+end;
+
 end.
Index: cprs/branches/foia-cprs/CPRS-Chart/rMisc.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/rMisc.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/rMisc.pas	(revision 460)
@@ -36,4 +36,5 @@
 function ServerHasPatch(const x: string): Boolean;
 function ServerVersion(const Option, VerClient: string): string;
+function PackageVersion(const Namespace: string): string;
 
 procedure SaveUserBounds(AControl: TControl);
@@ -111,4 +112,5 @@
   with RPCBrokerV do
   begin
+    ClearParameters := True;
     RemoteProcedure := 'XWB GET VARIABLE VALUE';
     Param[0].Value := x;
@@ -127,4 +129,9 @@
 begin
   Result := sCallV('ORWU VERSRV', [Option, VerClient]);
+end;
+
+function PackageVersion(const Namespace: string): string;
+begin
+  Result := sCallV('ORWU VERSION', [Namespace]);
 end;
 
Index: cprs/branches/foia-cprs/CPRS-Chart/rReminders.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/rReminders.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/rReminders.pas	(revision 460)
@@ -40,4 +40,6 @@
 function GetCategoryItems(CatIEN: integer): TStrings;
 function GetAllRemindersAndCategories: TStrings;
+function VerifyMentalHealthTestComplete(TestName, Answers: string): String;
+
 
 implementation
@@ -140,11 +142,5 @@
 
 function GetDialogInfo(IEN: string; RemIEN: boolean): TStrings;
-Var
-ver: string;
-
-begin
-  ver:=sCallV('ORQQPXRM CHECK REM VERSION', []);
-  if pos('2',ver)>0 then
-     begin
+begin
      if RemIEN then
         CallV('ORQQPXRM REMINDER DIALOG', [IEN, Patient.DFN])
@@ -152,13 +148,4 @@
         CallV('PXRM REMINDER DIALOG (TIU)', [IEN, Patient.DFN]);
      Result := RPCBrokerV.Results;
-     end
-  else
-      begin
-      if RemIEN then
-        CallV('ORQQPXRM REMINDER DIALOG', [IEN])
-     else
-        CallV('PXRM REMINDER DIALOG (TIU)', [IEN]);
-     Result := RPCBrokerV.Results;
-  end;
 end;
 
@@ -422,4 +409,25 @@
 end;
 
+function VerifyMentalHealthTestComplete(TestName, Answers: string): String;
+
+begin
+    CallV('ORQQPXRM MHV', [Patient.DFN, TestName, Answers]);
+    if RPCBrokerV.Results[0]='2' then
+      begin
+        Result := '2'+ U;
+        EXIT;
+      end;
+    if RPCBrokerV.Results[0] = '1' then
+      begin
+        Result := '1' + U;
+        EXIT;
+      end;
+    if RPCBrokerV.Results[0] = '0' then
+      begin
+        Result := '0' + U + RPCBrokerV.Results[1];
+        EXIT;
+      end;
+end;
+
 initialization
 
Index: cprs/branches/foia-cprs/CPRS-Chart/rReports.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/rReports.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/rReports.pas	(revision 460)
@@ -24,6 +24,10 @@
 procedure RemoteQuery(Dest: TStrings; AReportType: string; AHSType, ADaysback,
             AExamID: string; Alpha, AOmega: Double; ASite, ARemoteRPC, AHSTag: String);
+procedure DirectQuery(Dest: TStrings; AReportType: string; AHSType, ADaysback,
+            AExamID: string; Alpha, AOmega: Double; ASite, ARemoteRPC, AHSTag: String);
 function ReportQualifierType(ReportType: Integer): Integer;
 function ImagingParams: String;
+function AutoRDV: String;
+function HDRActive: String;
 procedure PrintReportsToDevice(AReport: string; const Qualifier, Patient,
      ADevice: string; var ErrMsg: string; aComponents: TStringlist;
@@ -52,4 +56,5 @@
 procedure SetAdhocLookup(aLookup: integer);
 procedure GetRemoteData(Dest: TStrings; aHandle: string; aItem: PChar);
+procedure ModifyHDRData(Dest: string; aHandle: string; aID: string);
 procedure PrintVReports(Dest, ADevice, AHeader: string; AReport: TStringList);
 
@@ -157,5 +162,5 @@
       LoadTree;
     end;
-  for i := 0 to uTree.Count - 1 do Dest.Add(Pieces(uTree[i], '^', 1, 14));
+  for i := 0 to uTree.Count - 1 do Dest.Add(Pieces(uTree[i], '^', 1, 15));
 end;
 
@@ -292,5 +297,5 @@
 var
   HSType, DaysBack, ExamID, MaxOcc, AReport, x: string;
-  Alpha, Omega: double;
+  Alpha, Omega, Trans: double;
 begin
   HSType := '';
@@ -303,4 +308,10 @@
       Alpha := StrToFMDateTime(Piece(Qualifier,';',1));
       Omega := StrToFMDateTime(Piece(Qualifier,';',2));
+      if Alpha > Omega then
+        begin
+          Trans := Omega;
+          Omega := Alpha;
+          Alpha := Trans;
+        end;
       MaxOcc := Piece(Qualifier,';',3);
       SetPiece(AHSTag,';',4,MaxOcc);
@@ -346,4 +357,17 @@
 end;
 
+procedure DirectQuery(Dest: TStrings; AReportType: string; AHSType, ADaysback,
+            AExamID: string; Alpha, AOmega: Double; ASite, ARemoteRPC, AHSTag: String);
+var
+  AReport: string;
+begin
+  AReport := AReportType + ';1' + '~' + AHSTag;
+  if length(AHSType) > 0 then
+    AHSType := piece(AHSType,':',1) + ';' + piece(AHSType,':',2);  //format for backward compatibility
+  CallV('XWB DIRECT RPC', [ASite, ARemoteRPC, 0, Patient.DFN + ';' + Patient.ICN,
+            AReport, AHSType, ADaysBack, AExamID, Alpha, AOmega]);
+  QuickCopy(RPCBrokerV.Results,Dest);
+end;
+
 function ReportQualifierType(ReportType: Integer): Integer;
 var
@@ -359,4 +383,14 @@
 begin
   Result := sCallV('ORWTPD GETIMG',[nil]);
+end;
+
+function AutoRDV: String;
+begin
+  Result := sCallV('ORWCIRN AUTORDV', [nil]);
+end;
+
+function HDRActive: String;
+begin
+  Result := sCallV('ORWCIRN HDRON', [nil]);
 end;
 
@@ -740,4 +774,9 @@
 end;
 
+procedure ModifyHDRData(Dest: string; aHandle: string; aID: string);
+begin
+  CallV('ORWRP4 HDR MODIFY', [aHandle, aID]);
+end;
+
 procedure PrintBitmap(Canvas:  TCanvas; DestRect:  TRect;  Bitmap:  TBitmap);
 var
Index: cprs/branches/foia-cprs/CPRS-Chart/rTIU.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/rTIU.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/rTIU.pas	(revision 460)
@@ -4,4 +4,10 @@
 
 uses SysUtils, Classes, ORNet, ORFn, rCore, uCore, uConst, TRPCB, uTIU;
+
+type
+  TPatchInstalled = record
+    PatchInstalled: boolean;
+    PatchChecked: boolean;
+  end;
 
 { Progress Note Titles }
@@ -10,4 +16,5 @@
 procedure ResetNoteTitles;
 function IsConsultTitle(TitleIEN: Integer): Boolean;
+function IsPRFTitle(TitleIEN: Integer): Boolean;
 function IsClinProcTitle(TitleIEN: Integer): Boolean;
 procedure ListNoteTitlesShort(Dest: TStrings);
@@ -20,7 +27,7 @@
 function AskCosignerForNotes: Boolean;
 function AskCosignerForDocument(ADocument: Integer; AnAuthor: Int64): Boolean;
-function AskCosignerForTitle(ATitle: integer; AnAuthor: Int64): Boolean;
+function AskCosignerForTitle(ATitle: integer; AnAuthor: Int64; ADate: TFMDateTime): Boolean;
 function AskSubjectForNotes: Boolean;
-function CanCosign(ATitle, ADocType: integer; AUser: Int64): Boolean;
+function CanCosign(ATitle, ADocType: integer; AUser: Int64; ADate: TFMDateTime): Boolean;
 function CanChangeCosigner(IEN: integer): boolean;
 procedure DefaultCosigner(var IEN: Int64; var Name: string);
@@ -93,8 +100,13 @@
 function UserInactive(EIN: String): boolean;
 
+//Miscellaneous
+function TIUPatch175Installed: boolean;
+
 const
   CLS_PROGRESS_NOTES = 3;
 
 implementation
+
+uses rMisc;
 
 var
@@ -103,4 +115,5 @@
   uNoteTitles: TNoteTitles;
   uTIUPrefs: TTIUPrefs;
+  uPatch175Installed: TPatchInstalled;
 
 
@@ -153,4 +166,11 @@
   if TitleIEN <= 0 then Exit;
   Result := sCallV('TIU IS THIS A CONSULT?', [TitleIEN]) = '1';
+end;
+
+function IsPRFTitle(TitleIEN: Integer): Boolean;
+begin
+  Result := False;
+  if TitleIEN <= 0 then Exit;
+  Result := sCallV('TIU ISPRF', [TitleIEN]) = '1'; 
 end;
 
@@ -238,8 +258,11 @@
 end;
 
-function AskCosignerForTitle(ATitle: integer; AnAuthor: Int64): Boolean;
+function AskCosignerForTitle(ATitle: integer; AnAuthor: Int64; ADate: TFMDateTime): Boolean;
 { returns TRUE if a cosignature is required for a document title and author }
 begin
-  Result := Piece(sCallV('TIU REQUIRES COSIGNATURE', [ATitle, 0, AnAuthor]), U, 1) = '1';
+  if TIUPatch175Installed then
+    Result := Piece(sCallV('TIU REQUIRES COSIGNATURE', [ATitle, 0, AnAuthor, ADate]), U, 1) = '1'
+  else
+    Result := Piece(sCallV('TIU REQUIRES COSIGNATURE', [ATitle, 0, AnAuthor]), U, 1) = '1';
 end;
 
@@ -258,8 +281,11 @@
 end;
 
-function CanCosign(ATitle, ADocType: integer; AUser: Int64): Boolean;
+function CanCosign(ATitle, ADocType: integer; AUser: Int64; ADate: TFMDateTime): Boolean;
 begin
   if ATitle > 0 then ADocType := 0;
-  Result := Piece(sCallV('TIU REQUIRES COSIGNATURE', [ATitle, ADocType, AUser]), U, 1) <> '1';
+  if TIUPatch175Installed and (ADocType = 0) then
+    Result := Piece(sCallV('TIU REQUIRES COSIGNATURE', [ATitle, ADocType, AUser, ADate]), U, 1) <> '1'
+  else
+    Result := Piece(sCallV('TIU REQUIRES COSIGNATURE', [ATitle, ADocType, AUser]), U, 1) <> '1';
 end;
 
@@ -1016,5 +1042,5 @@
 function IDNotesInstalled: boolean;
 begin
-  Result := True;
+  Result := True;   // old patch check no longer called
 end;
 
@@ -1123,8 +1149,20 @@
 end;
 
+function TIUPatch175Installed: boolean;
+begin
+  with uPatch175Installed do
+    if not PatchChecked then
+      begin
+        PatchInstalled := ServerHasPatch('TIU*1.0*175');
+        PatchChecked := True;
+      end;
+  Result := uPatch175Installed.PatchInstalled;
+end;
+
 function NoteHasText(NoteIEN: integer): boolean;
 begin
   Result := (StrToIntDef(sCallV('ORWTIU CHKTXT', [NoteIEN]), 0) > 0);
 end;
+
 
 initialization
Index: cprs/branches/foia-cprs/CPRS-Chart/uConst.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/uConst.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/uConst.pas	(revision 460)
@@ -211,5 +211,5 @@
   NF_STAT_RESULTS                  = 44;
   NF_DNR_EXPIRING                  = 45;
-  NF_MEDICATIONS_EXPIRING          = 47;
+  NF_MEDICATIONS_EXPIRING_INPT     = 47;
   NF_UNVERIFIED_MEDICATION_ORDER   = 48;
   NF_NEW_ORDER                     = 50;
@@ -226,4 +226,8 @@
   NF_IMAGING_REQUEST_CHANGED       = 67;
   NF_LAB_THRESHOLD_EXCEEDED        = 68;
+  NF_MAMMOGRAM_RESULTS             = 69;
+  NF_PAP_SMEAR_RESULTS             = 70;
+  NF_ANATOMIC_PATHOLOGY_RESULTS    = 71;
+  NF_MEDICATIONS_EXPIRING_OUTPT    = 72;
   NF_DCSUMM_UNSIGNED_NOTE          = 901;
   NF_CONSULT_UNSIGNED_NOTE         = 902;
@@ -263,4 +267,6 @@
   NC_BY_DATE    = 5;                             // Note context - signed notes by date range
   NC_CUSTOM     = 6;                             // Note Context - custom view
+  //Text Search CQ: HDS00002856
+  NC_SEARCHTEXT = 7;                             // Note Content - search for text
 
   { Surgery View Contexts }
@@ -343,4 +349,5 @@
   PKG_CONSULTS = 'GMR(123,';
   PKG_SURGERY  = 'SRF(';
+  PKG_PRF = 'PRF';
 
   { New Person Filters }
Index: cprs/branches/foia-cprs/CPRS-Chart/uCore.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/uCore.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/uCore.pas	(revision 460)
@@ -343,4 +343,5 @@
     RPCName  : String;         //Associated RPC
     IFN      : String;         //IFN of report in file 101.24
+    HDR      : String;         //HDR is source of data if = 1
   end;
 
@@ -355,4 +356,7 @@
   HasFlag: boolean;
   FlagList: TStringList;
+  //hds7591  Clinic/Ward movement.
+  TempEncounterLoc: Integer; // used to Save Encounter Location when user selected "Review Sign Changes" from "File"
+  TempEncounterLocName: string; // since in the path PatientRefresh is done prior to checking if patient has been admitted while entering OPT orders.
 
 procedure NotifyOtherApps(const AppEvent, AppData: string);
@@ -501,4 +505,5 @@
   if(not uNotifyAppsActive) then exit;
   if Application.MainForm = nil then Exit;
+  if User = nil then exit;
   if not User.FNotifyAppsWM then Exit;
   // register the message with windows to get a unique message number (if not already registered)
@@ -1510,5 +1515,4 @@
   i: Integer;
 begin
-  ChangeList := nil;
   ChangeList := FOrders;
   if ChangeList <> nil then with ChangeList do
Index: cprs/branches/foia-cprs/CPRS-Chart/uDocTree.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/uDocTree.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/uDocTree.pas	(revision 460)
@@ -247,5 +247,8 @@
 
   procedure MakeBold(ANode: TORTreeNode);
+  var
+    LookingForAddenda: boolean;
   begin
+    LookingForAddenda := (Pos('ADDENDUM', UpperCase(CurrentContext.Keyword)) > 0);
     with ANode do
       begin
@@ -253,10 +256,13 @@
         if Parent <> nil then
           begin
-            Parent.Expand(False);
+            if (ImageIndex <> IMG_ADDENDUM) or ((ImageIndex = IMG_ADDENDUM) and LookingForAddenda) then
+              Parent.Expand(False);
             if Parent.Parent <> nil then
               begin
-                Parent.Parent.Expand(False);
+                if (Parent.ImageIndex <> IMG_ADDENDUM) or ((Parent.ImageIndex = IMG_ADDENDUM) and LookingForAddenda) then
+                  Parent.Parent.Expand(False);
                 if Parent.Parent.Parent <> nil then
-                  Parent.Parent.Parent.Expand(False);
+                  if (Parent.Parent.ImageIndex <> IMG_ADDENDUM) or ((Parent.Parent.ImageIndex = IMG_ADDENDUM) and LookingForAddenda) then
+                    Parent.Parent.Parent.Expand(False);
               end;
           end;
Index: cprs/branches/foia-cprs/CPRS-Chart/uFormMonitor.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/uFormMonitor.pas	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/uFormMonitor.pas	(revision 460)
@@ -0,0 +1,596 @@
+unit uFormMonitor;
+
+interface
+
+uses
+  SysUtils, Forms, Classes, Windows, Messages, ExtCtrls, Contnrs, DateUtils;
+
+procedure SetFormMonitoring(activate: boolean);
+
+procedure MarkFormAsStayOnTop(Form: TForm; IsStayOnTop: Boolean);
+
+// Some forms have display tasks when first displayed that are messed up by the
+// form monitor - such as making a combo box automatically drop down.  These forms
+// should call FormMonitorBringToFrontEvent, which will be called when the
+// form monitor calls the form's BringToFront method.  The Seconds parameter is the
+// amount of time that must transpire before the form monitor will call
+// BringToFront again, unless another form has received focus since the event was called.
+
+procedure FormMonitorBringToFrontEvent(Form: TForm; AEvent: TNotifyEvent; Seconds: integer = 3);
+
+implementation
+
+type
+  TFormMonitor = class
+  private
+    FOldActiveFormChangeEvent: TNotifyEvent;
+    FOldActivateEvent: TNotifyEvent;
+    FOldRestore: TNotifyEvent;
+    FModifyingZOrder: boolean;
+    FModifyPending: boolean;
+    FActiveForm: TForm;
+    FZOrderHandles: TList;
+    FLastModal: boolean;
+    fTopOnList: TList;
+    fTopOffList: TList;
+    fTimer: TTimer;
+    FTimerCount: integer;
+    FMenuPending: boolean;
+    FWindowsHook: HHOOK;
+    FRunning: boolean;
+    FFormEvents: TObjectList;
+    FLastActiveFormHandle: HWND;
+    procedure ManageForms;
+    function FormValid(form: TForm): boolean;
+    function HandleValid(handle: HWND): boolean;
+    procedure MoveOnTop(Handle: HWND);
+    procedure MoveOffTop(Handle: HWND);
+    procedure Normalize(Handle: HWND; Yes: boolean);
+    procedure NormalizeReset;
+    function IsNormalized(Handle: HWND): boolean;
+    function GetActiveFormHandle: HWND;
+    procedure StartZOrdering;
+    function SystemRunning: boolean;
+    function ModalDelphiForm: boolean;
+    function IsTopMost(Handle: HWND): boolean;
+  public
+    procedure Start;
+    procedure Stop;
+    procedure Timer(Sender: TObject);
+    procedure Activate(Sender: TObject);
+    procedure ActiveFormChange(Sender: TObject);
+    procedure Restore(Sender: TObject);
+  end;
+
+  TFormEvent = class(TObject)
+  private
+    FForm: TForm;
+    FEvent: TNotifyEvent;
+    FSeconds: integer;
+    FTimeStamp: TDateTime;
+  end;
+
+var
+  FormMonitor: TFormMonitor = nil;
+
+type
+  HDisableGhostProc = procedure(); stdcall;
+
+const
+  NORMALIZED    = $00000001;
+  UN_NORMALIZED = $FFFFFFFE;
+  STAY_ON_TOP   = $00000002;
+  NORMAL_FORM   = $FFFFFFFD;
+
+
+procedure DisableGhosting;
+const
+  DisableProc = 'DisableProcessWindowsGhosting';
+  UserDLL = 'user32.dll';
+
+var
+  DisableGhostProc: HDisableGhostProc;
+  User32Handle: THandle;
+
+begin
+  User32Handle := LoadLibrary(PChar(UserDLL));
+  try
+    if User32Handle <= HINSTANCE_ERROR then
+      User32Handle := 0
+    else
+    begin
+      DisableGhostProc := GetProcAddress(User32Handle, PChar(DisableProc));
+      if(assigned(DisableGhostProc)) then
+      begin
+        DisableGhostProc;
+      end;
+    end;
+  finally
+    if(User32Handle <> 0) then
+      FreeLibrary(User32Handle);
+  end;
+end;
+
+procedure SetFormMonitoring(activate: boolean);
+var
+  running: boolean;
+begin
+  running := assigned(FormMonitor);
+  if(activate <> running) then
+  begin
+    if(running) then
+    begin
+      FormMonitor.Stop;
+      FormMonitor.Free;
+      FormMonitor := nil;
+    end
+    else
+    begin
+      FormMonitor := TFormMonitor.Create;
+      FormMonitor.Start;
+    end;
+  end;
+end;
+
+procedure MarkFormAsStayOnTop(Form: TForm; IsStayOnTop: Boolean);
+var
+  Data: Longint;
+begin
+  Data := GetWindowLong(Form.Handle, GWL_USERDATA);
+  if(IsStayOnTop) then
+  begin
+    Data := Data or STAY_ON_TOP;
+    SetWindowPos(Form.Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE);
+  end
+  else
+  begin
+    Data := Data and NORMAL_FORM;
+    SetWindowPos(Form.Handle, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE);
+  end;
+  SetWindowLong(Form.Handle, GWL_USERDATA, Data);
+end;
+
+function FindFormEventIndex(Form: TForm): integer;
+var
+  i: integer;
+  event: TFormEvent;
+begin
+  Result := -1;
+  for i := 0 to FormMonitor.FFormEvents.Count-1 do
+  begin
+    event := TFormEvent(FormMonitor.FFormEvents[i]);
+    if(event.FForm = Form) then
+    begin
+      Result := i;
+      exit;
+    end;
+  end;
+end;
+
+function FindFormEvent(Form: TForm): TFormEvent;
+var
+  idx: integer;
+begin
+  idx := FindFormEventIndex(Form);
+  if(idx < 0) then
+    Result := nil
+  else
+    Result := TFormEvent(FormMonitor.FFormEvents[idx]);
+end;
+
+procedure FormMonitorBringToFrontEvent(Form: TForm; AEvent: TNotifyEvent; Seconds: integer);
+var
+  event: TFormEvent;
+  idx: integer;
+begin
+  event := FindFormEvent(Form);
+  if(assigned(AEvent)) then
+  begin
+    if(event = nil) then
+    begin
+      event := TFormEvent.Create;
+      event.FForm := Form;
+      event.FTimeStamp := 0;
+      FormMonitor.FFormEvents.Add(event);
+    end;
+    event.FEvent := AEvent;
+    event.FSeconds := Seconds;
+  end
+  else
+  if(event <> nil) then
+  begin
+    idx := FindFormEventIndex(Form);
+    FormMonitor.FFormEvents.Delete(idx);
+//    event.Free; - TObjectList frees object automatically
+  end;
+end;
+
+function IsFormStayOnTop(form: TForm): boolean;
+begin
+  Result := (form.FormStyle = fsStayOnTop);
+  if(not Result) then
+    Result := ((GetWindowLong(Form.Handle, GWL_USERDATA) and STAY_ON_TOP) <> 0);
+end;
+
+{ TFormMonitor }
+
+procedure TFormMonitor.Activate(Sender: TObject);
+begin
+  if(Assigned(FOldActivateEvent)) then
+    FOldActivateEvent(Sender);
+  NormalizeReset;
+  StartZOrdering;
+end;
+
+procedure TFormMonitor.ActiveFormChange(Sender: TObject);
+begin
+  if(Assigned(FOldActiveFormChangeEvent)) then
+    FOldActiveFormChangeEvent(Sender);
+  StartZOrdering;
+end;
+
+procedure TFormMonitor.Restore(Sender: TObject);
+begin
+  if(Assigned(FOldRestore)) then
+    FOldRestore(Sender);
+  NormalizeReset;
+  StartZOrdering;
+end;
+
+function TFormMonitor.FormValid(form: TForm): boolean;
+begin
+  Result := assigned(form);
+  if Result then
+    Result := (form.Parent = nil) and (form.ParentWindow = 0) and form.Visible and (form.Handle <> 0);
+end;
+
+function TFormMonitor.HandleValid(handle: HWND): boolean;
+begin
+  Result := (handle <> 0);
+  if(Result) then
+    Result := IsWindow(handle) and IsWindowVisible(handle) and isWindowEnabled(handle);
+end;
+
+function FindWindowZOrder(Window: HWnd; Data: Longint): Bool; stdcall;
+begin
+  if(IsWindow(Window) and IsWindowVisible(Window)) then
+    FormMonitor.FZOrderHandles.Add(Pointer(Window));
+  Result := True;
+end;
+
+procedure TFormMonitor.ManageForms;
+var
+  i, j: integer;
+  form: TForm;
+  formHandle, activeHandle: HWND;
+  modal, doCall: boolean;
+  event: TFormEvent;
+
+begin
+  if(FModifyingZOrder) then exit;
+  if(not SystemRunning) then exit;
+  FModifyingZOrder := TRUE;
+  try
+    activeHandle := GetActiveFormHandle;
+    modal := ModalDelphiForm;
+    FZOrderHandles.Clear;
+    fTopOnList.Clear;
+    fTopOffList.Clear;
+
+    EnumThreadWindows(GetCurrentThreadID, @FindWindowZOrder, 0);
+    for i := 0 to FZOrderHandles.Count-1 do
+    begin
+      formHandle := HWND(FZOrderHandles[i]);
+      for j := 0 to Screen.FormCount-1 do
+      begin
+        form := Screen.Forms[j];
+        if(form.Handle = formHandle) then
+        begin
+          if formValid(form) and (form.Handle <> activeHandle) and IsFormStayOnTop(form) then
+          begin
+            if(modal and (not IsWindowEnabled(form.Handle))) then
+              fTopOffList.Add(Pointer(form.Handle))
+            else
+              fTopOnList.Add(Pointer(form.Handle));
+          end;
+          break;
+        end;
+      end;
+    end;
+    for i := fTopOffList.Count-1 downto 0 do
+      MoveOffTop(HWND(fTopOffList[i]));
+    for i := fTopOnList.Count-1 downto 0 do
+      MoveOnTop(HWND(fTopOnList[i]));
+
+    if(activeHandle <> 0) then
+    begin
+      if(assigned(FActiveForm)) then
+      begin
+        event := FindFormEvent(FActiveForm);
+        doCall := (event = nil);
+        if(not doCall) then
+          doCall := (activeHandle <> FLastActiveFormHandle);
+        if(not doCall) then
+          doCall := SecondsBetween(Now, event.FTimeStamp) > event.FSeconds;
+        if(doCall) then
+        begin
+          if IsFormStayOnTop(FActiveForm) then
+          begin
+            SetWindowPos(activeHandle, HWND_TOPMOST, 0, 0, 0, 0,
+                SWP_NOMOVE or SWP_NOSIZE);
+            Normalize(activeHandle, FALSE);
+          end;
+          FActiveForm.BringToFront;
+          if(event <> nil) then
+          begin
+            if(FormValid(event.FForm)) then
+            begin
+              event.FEvent(FActiveForm);
+              event.FTimeStamp := now;
+            end;
+          end;
+        end;
+      end
+      else
+      begin
+        if(activeHandle <> 0) then
+        begin
+          SetFocus(activeHandle);
+          BringWindowToTop(activeHandle);
+          if(IsTopMost(activeHandle)) then
+            SetWindowPos(activeHandle, HWND_TOPMOST, 0, 0, 0, 0,
+              SWP_NOMOVE or SWP_NOSIZE);
+        end;
+      end;
+    end;
+    FLastActiveFormHandle := activeHandle;
+  finally
+    FModifyingZOrder := FALSE;
+  end;
+end;
+
+function CallWndHook(Code: Integer; WParam: wParam; Msg: PCWPStruct): Longint; stdcall;
+begin
+  case Msg.message of
+    WM_INITMENU, WM_INITMENUPOPUP, WM_ENTERMENULOOP:
+      FormMonitor.FMenuPending := TRUE;
+    WM_MENUSELECT, WM_EXITMENULOOP:
+      FormMonitor.FMenuPending := FALSE;
+  end;
+  Result := CallNextHookEx(FormMonitor.FWindowsHook, Code, WParam, Longint(Msg));
+end;
+
+procedure TFormMonitor.Start;
+begin
+  if(FRunning) then exit;
+  FRunning := TRUE;
+  FTimer := TTimer.Create(Application);
+  fTimer.Enabled := FALSE;
+  FTimer.OnTimer := Timer;
+  FTimer.Interval := 10;
+  FMenuPending := FALSE;
+  FLastActiveFormHandle := 0;
+
+  FZOrderHandles := TList.Create;
+  fTopOnList := TList.Create;
+  fTopOffList := TList.Create;
+  FFormEvents := TObjectList.Create;
+  FModifyingZOrder := false;
+  FLastModal := false;
+  FOldActiveFormChangeEvent := Screen.OnActiveFormChange;
+  Screen.OnActiveFormChange := ActiveFormChange;
+  FOldActivateEvent := Application.OnActivate;
+  Application.OnActivate := Activate;
+  FOldRestore := Application.OnRestore;
+  Application.OnRestore := Restore;
+  FWindowsHook := SetWindowsHookEx(WH_CALLWNDPROC, @CallWndHook, 0, GetCurrentThreadID)
+end;
+
+procedure TFormMonitor.Stop;
+begin
+  if(not FRunning) then exit;
+  FRunning := FALSE;
+  if FWindowsHook <> 0 then
+  begin
+    UnHookWindowsHookEx(FWindowsHook);
+    FWindowsHook := 0;
+  end;
+  Screen.OnActiveFormChange := FOldActiveFormChangeEvent;
+  Application.OnActivate := FOldActivateEvent;
+  Application.OnRestore := FOldRestore;
+
+  FZOrderHandles.Free;
+  fTopOnList.Free;
+  fTopOffList.Free;
+  FFormEvents.Free;
+  fTimer.Enabled := FALSE;
+  fTimer.Free;
+end;
+
+procedure TFormMonitor.MoveOffTop(Handle: HWND);
+begin
+  if(not IsNormalized(Handle)) then
+  begin
+    SetWindowPos(Handle, HWND_NOTOPMOST, 0, 0, 0, 0,
+              SWP_NOMOVE or SWP_NOSIZE or SWP_NOACTIVATE or SWP_NOOWNERZORDER);
+    Normalize(Handle, TRUE);
+  end;
+end;
+
+procedure TFormMonitor.MoveOnTop(Handle: HWND);
+begin
+  if(isNormalized(Handle)) then
+  begin
+    SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0,
+              SWP_NOMOVE or SWP_NOSIZE or SWP_NOACTIVATE or SWP_NOOWNERZORDER);
+    Normalize(Handle, FALSE);
+  end;
+end;
+
+procedure TFormMonitor.Normalize(Handle: HWND; Yes: boolean);
+var
+  Data: Longint;
+begin
+  Data := GetWindowLong(Handle, GWL_USERDATA);
+  if(yes) then
+    Data := Data or NORMALIZED
+  else
+    Data := Data and UN_NORMALIZED;
+  SetWindowLong(Handle, GWL_USERDATA, Data);
+end;
+
+function TFormMonitor.IsNormalized(Handle: HWND): boolean;
+begin
+  Result := ((GetWindowLong(Handle, GWL_USERDATA) and NORMALIZED) <> 0);
+end;
+
+function TFormMonitor.IsTopMost(Handle: HWND): boolean;
+begin
+  Result := ((GetWindowLong(Handle, GWL_EXSTYLE) and WS_EX_TOPMOST) <> 0);
+end;
+
+function FindWindows(Window: HWnd; Data: Longint): Bool; stdcall;
+begin
+  FormMonitor.Normalize(Window, FALSE);
+  Result := True;
+end;
+
+procedure TFormMonitor.NormalizeReset;
+begin
+  EnumThreadWindows(GetCurrentThreadID, @FindWindows, 0);
+end;
+
+var
+  uActiveWindowHandle: HWND;
+  uActiveWindowCount: integer;
+
+function IsHandleOK(Handle: HWND): boolean;
+var
+  i: integer;
+  
+begin
+  Result := FALSE;
+  if(not formMonitor.HandleValid(Handle)) or (Handle = Application.Handle) then exit;
+  for i := 0 to Screen.FormCount-1 do
+  begin
+    if(Handle = Screen.Forms[i].Handle) then exit;
+  end;
+  Result := TRUE;
+end;
+
+function FindActiveWindow(Window: HWnd; Data: Longint): Bool; stdcall;
+begin
+  Result := True;
+  if(IsHandleOK(Window)) then 
+  begin
+    inc(uActiveWindowCount);
+    if(uActiveWindowCount = 1) then
+      uActiveWindowHandle := Window
+    else
+      if(uActiveWindowCount > 1) then
+        Result := false;
+  end;
+end;
+
+function TFormMonitor.GetActiveFormHandle: HWND;
+var
+  i: integer;
+  form: TForm;
+
+begin
+  FActiveForm := Screen.ActiveForm;
+  if(assigned(FActiveForm)) then
+    Result := FActiveForm.Handle
+  else
+    Result := 0;
+  if(FormValid(FActiveForm) and IsWindowEnabled(FActiveForm.Handle)) then
+    exit;
+  for i := 0 to Screen.FormCount-1 do
+  begin
+    form := Screen.Forms[i];
+    if(form.Handle = Result) then
+    begin
+      if FormValid(form) and IsWindowEnabled(form.Handle) then
+      begin
+        FActiveForm := form;
+        Result := form.Handle;
+        exit;
+      end;
+    end;
+  end;
+  FActiveForm := nil;
+  Result := GetActiveWindow;
+  if(IsHandleOK(Result)) then exit;
+  uActiveWindowHandle := 0;
+  uActiveWindowCount := 0;
+  EnumThreadWindows(GetCurrentThreadID, @FindActiveWindow, 0);
+  if(uActiveWindowCount = 1) then
+  begin
+    Result := uActiveWindowHandle;
+  end;
+end;
+
+
+procedure TFormMonitor.StartZOrdering;
+begin
+  if(FModifyPending) then exit;
+  if(SystemRunning) then
+  begin
+    FModifyPending := TRUE;
+    FTimerCount := 0;
+    FTimer.Enabled := TRUE;
+  end;
+end;
+
+function TFormMonitor.SystemRunning: boolean;
+begin
+  Result := assigned(Application.MainForm) and
+            (Application.MainForm.Handle <> 0) and
+            IsWindowVisible(Application.MainForm.Handle);
+end;
+
+
+function TFormMonitor.ModalDelphiForm: boolean;
+var
+  i: integer;
+  form: TForm;
+begin
+  for i := 0 to Screen.FormCount-1 do
+  begin
+    form := screen.Forms[i];
+    if(FormValid(form) and (fsModal in form.FormState)) then
+    begin
+      Result := TRUE;
+      exit;
+    end;
+  end;
+  Result := FALSE;
+end;
+
+procedure TFormMonitor.Timer(Sender: TObject);
+var
+  NoMenu: boolean;
+begin
+  inc(FTimerCount);
+  if(FTimerCount > 20) then
+  begin
+    FTimer.Enabled := FALSE;
+    FMenuPending := FALSE;
+    FModifyPending := FALSE;
+    exit;
+  end;
+  if(FTimerCount <> 1) then exit;
+  FTimer.Enabled := FALSE;
+  NoMenu := not FMenuPending;
+  FMenuPending := FALSE;
+  if(NoMenu and SystemRunning) then
+    ManageForms;
+  FModifyPending := FALSE;
+end;
+
+initialization
+  DisableGhosting;
+
+finalization
+
+end.
Index: cprs/branches/foia-cprs/CPRS-Chart/uGraphs.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/uGraphs.pas	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Chart/uGraphs.pas	(revision 460)
@@ -0,0 +1,213 @@
+unit uGraphs;
+
+interface
+
+uses
+  SysUtils, Classes, Graphics, ORFn;
+
+type
+  TGraphSetting = class
+  public
+    ClearBackground: boolean;
+    Dates: boolean;
+    FixedDateRange: boolean;
+    FMStartDate: double;
+    FMStopDate: double;
+    Gradient: boolean;
+    HighTime: TDateTime;
+    Hints: boolean;
+    HorizontalZoom: boolean;
+    ItemsDisplayed: TStrings;
+    ItemsForDisplay: TStrings;
+    Legend: boolean;
+    Lines: boolean;
+    LowTime: TDateTime;
+    MaxGraphs: integer;
+    MaxSelect: integer;
+    MaxSelectMin: integer;
+    MaxSelectMax: integer;
+    MinGraphHeight: integer;
+    OptionSettings: string;              // only used for storage
+    Points: boolean;
+    SortByType: boolean;
+    SortColumn: integer;
+    Sources: TStrings;
+    StayOnTop: boolean;
+    Values: boolean;
+    VerticalZoom: boolean;
+    View3D: boolean;
+  end;
+
+const
+  BIG_NUMBER = 9999999;
+  BIG_SPACES = '                                                                ';
+  FM_START_DATE = 2500101;
+  FM_STOP_DATE = 3500101;
+  MAX_ITEM_DISCLAIMER = 10;
+  NUM_COLORS = 16;
+  PROB_HEIGHT = 2;
+  RX_HEIGHT_IN = 12;
+  RX_HEIGHT_NVA = 9;
+  RX_HEIGHT_OUT = 15;
+  ZOOM_PERCENT = 95;
+  GRAPH_FLOAT = 'F';
+  GRAPH_REPORT = 'R';
+
+    // settings use single character
+  SETTING_3D = 'A';
+  SETTING_CLEAR = 'B';
+  SETTING_DATES = 'C';
+  SETTING_GRADIENT = 'D';
+  SETTING_HINTS = 'E';
+  SETTING_LEGEND = 'F';
+  SETTING_LINES = 'G';
+  SETTING_SORT = 'H';
+  SETTING_TOP = 'I';
+  SETTING_VALUES = 'J';
+  SETTING_HZOOM = 'K';
+  SETTING_VZOOM = 'L';
+  SETTING_FIXED = 'M';
+
+  // keypress flags
+  KEYPRESS_ON = 'YES';
+  KEYPRESS_OFF = 'NO';
+
+  // format date/time axis
+  DFORMAT_MDY = 'm/d/yyyy';
+  DFORMAT_MYY = 'm/yy';
+  DFORMAT_YY = 'yy';
+  DWIDTH_MDY = 66;
+  DWIDTH_MYY = 30;
+  DWIDTH_YY = 18;
+
+  // text messages
+  TXT_DISCLAIMER = 'Due to number of items and size restrictions on your display, '
+    + 'all items may not be visible.';
+  TXT_COPY_DISCLAIMER = 'Note: Graphs display limited data, view details for more information.';
+  TXT_REPORT_DISCLAIMER = 'Note: Listing displays limited data, view details for more information.';
+  TXT_INFO = 'Select multiple items using Ctrl-click or Shift-click.';
+  TXT_PRINTING = 'Graphs are being printed';
+  TXT_WARNING = 'Warning: You are using graph settings with a Special Function.';
+  TXT_WARNING_SAME_TIME = 'Warning: Items have multiple occurrences at the same time.';
+  TXT_ZOOMED = 'Zoomed Date Range: ';
+
+  COLOR_INFO = clCream;
+  COLOR_PRINTING = clMoneyGreen;    //$CCFFFF; $CCCCFF; $CCFFCC; $FFCCCC; $FFCCFF; $FFFFCC;
+  COLOR_WARNING = clCream;  //clFuchsia;
+  COLOR_ZOOM = clCream;  //clSkyBlue;
+
+  // hint messages for view definition
+  HINT_PAT_SOURCE     = 'Only items where the patient has data are displayed.'
+                + #13 + 'Use this for selecting items to display on the graph.';
+  HINT_ALL_SOURCE     = 'All possible items are displayed.'
+                + #13 + 'Use this for defining items to be displayed/saved as Views.'
+                + #13 + 'Note: For easy use, select Views for graphing.';
+  HINT_SELECTION_INFO = 'This form is primarily used for defining views.'
+                + #13 + 'Usually selection is done by selecting Views or Items to graph.'
+                + #13 + 'This form defines views.'
+                + #13 + 'The Settings form defines items that are always selectable for graphing.';
+  HINT_SOURCE         = 'These are the different types of data.'
+                + #13 + 'Types are followed by a section showing your Personal Views, then Public Views.'
+                + #13 + 'Click a type and then select individual items'
+                + #13 + 'Double-click a type to select all items of this type  - <any>';
+  HINT_SELECTION      = 'Select specific items and move them to the right.'
+                + #13 + 'Use the arrow buttons or double click.'
+                + #13 + 'Selecting a type <any> will use all patients for that type.';
+  HINT_DISPLAY        = 'This is the list of items, types, and/or views that compose the View that will be graphed.'
+                + #13 + 'You can save this as a personal view by clicking the Save Personal button.';
+  HINT_BTN_ADDALL     = 'Click to add all items for display.';
+  HINT_BTN_ADD1       = 'Click to add this item for display (or double-click item).';
+  HINT_BTN_REMOVE1    = 'Click to remove this item from display (or double-click item).';
+  HINT_BTN_REMOVEALL  = 'Click to remove all items from display.';
+  HINT_BTN_CLEAR      = 'Click to clear the Items and Items for Graphing lists.';
+  HINT_BTN_DELETE     = 'Click to delete the selected view.';
+  HINT_BTN_RENAME     = 'Click to rename the selected view.';
+  HINT_BTN_SAVE       = 'Click to save your view.'
+                + #13 + 'You will give this view a name that can be selected from the graph.';
+  HINT_BTN_SAVE_PUB   = 'Click to save a public view (available to editors only).'
+                + #13 + 'Public views can be selected by all users.';
+  HINT_APPLY          = 'Select the section you where you want to display the graph.';
+  HINT_BTN_CLOSE      = 'Click to display items for graphing.'
+                + #13 + 'Note: If you are using this from the Options menu, '
+                + #13 + 'items are not displayed (multiple graphs may be in use).'
+                + #13 + 'You should save any view definitions before closing this form.';
+
+
+
+  // hint messages for settings
+  SHINT_SOURCES     = 'This is a list of all the types of data that can be graphed.'
+              + #13 + 'Check the types you wish to be selectable on the graph.'
+              + #13 + 'It is best to only check the types that you frequently use.'
+              + #13 + 'If you select a view on the graph that has types defined that are not checked,'
+              + #13 + 'that type of data will become automatically checked.'
+              + #13 + 'Note: Data is only selectable if the patient has that type of data';
+  SHINT_OPTIONS     = 'Check options to change the appearance and behavior of the graph.'
+              + #13 + 'Common options are also available on the graph''s right-click menu';
+  SHINT_MAX =         'Enter the maximum number of graphs to appear on the screen.'
+              + #13 + 'This is used when individual graphs are displayed and'
+              + #13 + 'applies to both the top and bottom sections.'
+              + #13 + 'When the number of graphs exceeds this limited, the graphs are available by scrolling.';
+  SHINT_MIN         = 'Enter the minimum height of a graph (this is in pixels).'
+              + #13 + 'This will depend on the size of your display.'
+              + #13 + 'This setting assures that at least this amount of height will appear on the graph.'
+              + #13 + 'Use in combination with Max Graphs in Display.';
+  SHINT_MAX_ITEMS   = 'Enter the maximum number of items that can be graphed at one time.'
+              + #13 + 'This setting prevents you from mistakenly selecting a large number of items.';
+  SHINT_FUNCTIONS   = 'These functions are restricted to editors for evaluation.';
+  SHINT_BTN_SHOW    = 'Click these buttons to display default settings.';
+  SHINT_BTN_PER     = 'Click to display your personal settings.';
+  SHINT_BTN_PUB     = 'Click to display the default settings.'
+              + #13 + 'These settings are used when you have not saved a personal setting.';
+  SHINT_BTN_SAVE    = 'Click these buttons to save default settings.';
+  SHINT_BTN_PERSAVE = 'Click to save your personal defaults';
+  SHINT_BTN_PUBSAVE = 'Click to save the public default (available to editors only).';
+  SHINT_BTN_ALL     = 'Click to check all sources.';
+  SHINT_BTN_CLEAR   = 'Click to uncheck all sources.';
+  SHINT_BTN_CLOSE   = 'Click to display these settings for graphing.'
+              + #13 + 'To cancel any unsaved changes you''ve made, click the upper-right x box.'
+              + #13 + 'Note: If you are using this from the Options menu, '
+              + #13 + 'settings will not change your display (multiple graphs may be in use).'
+              + #13 + 'You should save any settings before closing this form.';
+
+function GraphSettingsInit(settings: string): TGraphSetting;
+
+
+implementation
+
+function GraphSettingsInit(settings: string): TGraphSetting;
+var
+  FGraphSetting: TGraphSetting;
+begin
+  FGraphSetting := TGraphSetting.Create;
+  with FGraphSetting do
+  begin
+    OptionSettings := Piece(settings, '|', 2);
+    SortColumn := strtointdef(Piece(settings, '|', 3), 0);
+    MaxGraphs := strtointdef(Piece(settings, '|', 4), 5);
+    MinGraphHeight := strtointdef(Piece(settings, '|', 5), 90);
+    MaxSelect := strtointdef(Piece(settings, '|', 7), 100);
+    MaxSelectMin := 1;
+    MaxSelectMax := strtointdef(Piece(settings, '|', 8), 1000);
+    Values := Pos(SETTING_VALUES, OptionSettings) > 0;
+    VerticalZoom := Pos(SETTING_VZOOM, OptionSettings) > 0;
+    HorizontalZoom := Pos(SETTING_HZOOM, OptionSettings) > 0;
+    View3D := Pos(SETTING_3D, OptionSettings) > 0;
+    Legend := Pos(SETTING_LEGEND, OptionSettings) > 0;
+    Dates := Pos(SETTING_DATES, OptionSettings) > 0;
+    Lines := Pos(SETTING_LINES, OptionSettings) > 0;
+    StayOnTop := Pos(SETTING_TOP, OptionSettings) > 0;
+    SortByType := Pos(SETTING_SORT, OptionSettings) > 0;
+    ClearBackground := Pos(SETTING_CLEAR, OptionSettings) > 0;
+    Gradient := Pos(SETTING_GRADIENT, OptionSettings) > 0;
+    Hints := Pos(SETTING_HINTS, OptionSettings) > 0;
+    FixedDateRange := Pos(SETTING_FIXED, OptionSettings) > 0;
+    HighTime := 0;
+    LowTime := BIG_NUMBER;
+    FMStartDate := FM_START_DATE;
+    FMStopDate := FM_STOP_DATE;
+    if SortByType then SortColumn := 1 else SortColumn := 0;
+  end;
+  Result := FGraphSetting;
+end;
+
+end.
Index: cprs/branches/foia-cprs/CPRS-Chart/uOrPtf.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/uOrPtf.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/uOrPtf.pas	(revision 460)
@@ -22,5 +22,5 @@
 
 procedure HasActiveFlg(var FlagList: TStringList; var HasFlag: boolean; const PTDFN: string);
-function GetCatIFlag(var FlagArr: TStrings): integer;
+function TriggerPRFPopUp(PTDFN: String): boolean;
 procedure GetActiveFlg(FlagInfo: TStrings; const PTDFN, FlagRecordID: string);
 procedure ClearFlag;
@@ -40,13 +40,9 @@
 end;
 
-function GetCatIFlag(var FlagArr: TStrings): integer;
+function TriggerPRFPopUp(PTDFN: String): boolean;
 begin
-  Result := 0;
-  CallV('ORPRF HASCAT1',[nil]);
-  if RPCBrokerV.Results.Count < 1 then
-    Exit;
-  Result := StrToIntDef(Piece(RPCBrokerV.Results[0],'^',2),0);
+  CallV('ORPRF TRIGGER POPUP',[PTDFN]);
+  Result := RPCBrokerV.Results[0] = '1';
   RPCBrokerV.Results.Delete(0);
-  FlagArr.Assign(RPCBrokerV.Results);
 end;
 
Index: cprs/branches/foia-cprs/CPRS-Chart/uProbs.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/uProbs.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/uProbs.pas	(revision 460)
@@ -134,4 +134,6 @@
    fFieldList:TstringList; {list of fields by name and class (TKeyVal or TComment)}
    fFilerObj:TstringList;
+   fCmtIsXHTML: boolean;
+   fCmtNoEditReason: string;
    Procedure LoadField(Fldrec:TKeyVal;Id:String;name:string);
    Procedure CreateFields;
@@ -223,4 +225,6 @@
    property AltFilerObject:TstringList read GetAltFilerObject;
    property PIFN:string read fPIFN write fPIFN;
+   property CmtIsXHTML: boolean read fCmtIsXHTML;
+   property CmtNoEditReason: string read fCmtNoEditReason;
  end;
 
@@ -580,5 +584,5 @@
 var
   i,j:integer;
-  cv:string;
+  cv, noedit:string;
   co:TComment;
   first:boolean;
@@ -591,5 +595,19 @@
         begin
           if first then {the first line is just a counter}
-            first := false
+            begin
+              first := false;
+              // 'NEWþ10,0þ-1^These notes are now in XHTML format and must be modified via CPRS-R.'
+              noedit := Piece(fNewRec[i], v, 3);
+              if Piece(noedit, U, 1) = '-1' then
+                begin
+                  fCmtIsXHTML := TRUE;
+                  fCmtNoEditReason := Piece(noedit, U, 2);
+                end
+              else
+                begin
+                  fCmtIsXHTML := FALSE;
+                  fCmtNoEditReason := '';
+                end;
+            end
           else
             begin
Index: cprs/branches/foia-cprs/CPRS-Chart/uReminders.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/uReminders.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/uReminders.pas	(revision 460)
@@ -20,4 +20,5 @@
     FNoResolve: boolean;
     FWHReviewIEN: string;  // AGP CHANGE 23.13 Allow for multiple processing of WH Review of Result Reminders
+    FRemWipe: integer;
   protected
     function GetIEN: string; virtual;
@@ -48,4 +49,5 @@
     property DlgData: string read FDlgData; //AGP Change 24.8
     property WHReviewIEN: string read FWHReviewIEN write FWHReviewIEN;  //AGP CHANGE 23.13
+    property RemWipe: integer read FRemWipe write FRemWipe;
   end;
 
@@ -99,5 +101,5 @@
     FMSTPrompt: TRemPrompt;
     FWHPrintDevice, FWHResultChk, FWHResultNot: String;
-    //FRemWHNotPurpose: TStrings;
+    FVitalDateTime: TFMDateTime;  //AGP Changes 26.1
   protected
     procedure Check4ChildrenSharedPrompts;
@@ -156,5 +158,5 @@
     property WHResultChk: String read FWHResultChk write FWHResultChk;
     property WHResultNot: String read FWHResultNot write FWHResultNot;
-    //property RemWHNotPurpose: TStrings read FRemWHNotPurpose write FRemWHNotPurpose;
+    property VitalDateTime: TFMDateTime read FVitalDateTime write FVitalDateTime;
   end;
 
@@ -170,5 +172,5 @@
     FPCERoot: TRemPCERoot;
     FParent: TRemDlgElement;
-    FRec3: string;  
+    FRec3: string;
     FActiveDates: TStringList; //Active dates for finding items. (rectype 3)
 //    FRoot: string;
@@ -219,4 +221,5 @@
     FMonthReq: boolean;
     FPrintNow: String;
+    FMHTestComplete: integer;
   protected
     function RemDataActive(RData: TRemData; EncDt: TFMDateTime):Boolean;
@@ -292,4 +295,5 @@
   NotPurposeValue: string;
   WHRemPrint: string;
+  InitialRemindersLoaded: boolean = FALSE;
 
 const
@@ -298,5 +302,4 @@
   RemPriorityText: array[1..3] of string = ('High','','Low');
   ClinMaintText = 'Clinical Maintenance';
-  InitialRemindersLoaded: boolean = FALSE;
 
   dtUnknown = TRemDataType(-1);
@@ -432,5 +435,5 @@
 
 uses rCore, uCore, rReminders, fRptBox, uConst, fReminderDialog, fNotes, rMisc,
-     fMHTest, rPCE, rTemplates, dShared, uTemplateFields, fIconLegend, fReminderTree;
+     fMHTest, rPCE, rTemplates, dShared, uTemplateFields, fIconLegend, fReminderTree, uInit;
 
 type
@@ -896,5 +899,6 @@
         begin
           Sts := Piece(Data, U, 6);
-          if(Sts = '0') or (Sts = '1') then
+          //if(Sts = '0') or (Sts = '1') then
+          if(Sts = '0') or (Sts = '1') or (Sts = '3') or (Sts = '4') then     //AGP Error change 26.8
           begin
             Result := TRUE;
@@ -1086,5 +1090,6 @@
     begin
       Tmp := Piece(Data, U, 6);
-      if(Tmp = '1') then iidx := 2
+      //if(Tmp = '1') then iidx := 2
+      if (Tmp = '3') or (Tmp = '4') or (Tmp = '1') then iidx :=2     //AGP ERROR CHANGE 26.8
       else if(Tmp = '0') then iidx := 3
       else
@@ -1334,4 +1339,6 @@
          if(NewStatus = '1') then Msg := 'Due'
     else if(NewStatus = '0') then Msg := 'Applicable'
+    else if(NewStatus = '3') then Msg := 'Error'    //AGP Error code change 26.8
+    else if (NewStatus = '4') then Msg := 'CNBD'    //AGP Error code change 26.8
     else                          Msg := 'Not Applicable';
     Msg := RName + ' is ' + Msg + '.';
@@ -1829,5 +1836,6 @@
       Data := RemCode + EvaluatedReminders[i];
       Tmp := Piece(Data,U,6);
-           if(Tmp = '1') then Add2Tree(rfDue, DueCatID)
+      //     if(Tmp = '1') then Add2Tree(rfDue, DueCatID)
+      if(Tmp = '1') or (Tmp = '3') or (Tmp = '4') then Add2Tree(rfDue, DueCatID) //AGP Error code change 26.8
       else if(Tmp = '0') then Add2Tree(rfApplicable, ApplCatID)
       else                    Add2Tree(rfNotApplicable, NotApplCatID);
@@ -2390,4 +2398,8 @@
 begin
   TempSL := GetDlgSL;
+  if Piece(TempSL[0],U,2)='1' then
+    begin
+      Self.RemWipe := 1;
+    end;
   idx := -1;
   repeat
@@ -2919,8 +2931,8 @@
 
 begin
-  Tmp := Piece(FRec1, U, 4);
-  if(Tmp = 'D') then Result := etDisplayOnly
-  else if(Tmp = 'T') then Result := etTaxonomy
-  else Result := etCheckBox;
+      Tmp := Piece(FRec1, U, 4);
+      if(Tmp = 'D') then Result := etDisplayOnly
+      else if(Tmp = 'T') then Result := etTaxonomy
+      else Result := etCheckBox;
 end;
 
@@ -3013,5 +3025,5 @@
         dt := Code2DataType(piece(TempSL[idx], U, r3Type));
         if(dt <> dtUnknown) and ((dt <> dtOrder) or
-          (CharAt(piece(TempSL[idx], U, 11),1) in ['D', 'Q', 'M', 'O'])) and
+          (CharAt(piece(TempSL[idx], U, 11),1) in ['D', 'Q', 'M', 'O', 'A'])) and   //AGP change 26.10 for allergy orders
           ((dt <> dtMentalHealthTest) or MHTestsOK) then
         begin
@@ -3542,5 +3554,5 @@
           DoLbl := Prompt.Required;
           case pt of
-            ptComment, ptQuantity, ptSkinReading:
+            ptComment, ptQuantity:
               begin
                 Ctrl.edt := TEdit.Create(AOwner);
@@ -3578,5 +3590,5 @@
             ptVisitLocation, ptLevelUnderstanding,
             ptSeries, ptReaction, ptExamResults,
-            ptLevelSeverity, ptSkinResults:
+            ptLevelSeverity, ptSkinResults, ptSkinReading:
               begin
                 Ctrl.cbo := TORComboBox.Create(AOwner);
@@ -3585,6 +3597,16 @@
                 Ctrl.cbo.Style := orcsDropDown;
                 Ctrl.cbo.Pieces := '2';
-                Ctrl.cbo.Tag := ComboPromptTags[pt];
-                PCELoadORCombo(Ctrl.cbo, MinX, MaxX);
+                if pt = ptSkinReading then
+                  begin
+                     Ctrl.cbo.Pieces := '1';
+                     Ctrl.cbo.Items.Add('');
+                     for j := 0 to 50 do Ctrl.cbo.Items.Add(inttostr(j));
+                     GetComboBoxMinMax(Ctrl.cbo,MinX, MaxX);
+                  end;
+                if pt <> ptSkinReading then
+                  begin
+                     Ctrl.cbo.Tag := ComboPromptTags[pt];
+                     PCELoadORCombo(Ctrl.cbo, MinX, MaxX);
+                  end;
                 if pt = ptVisitLocation then
                 begin
@@ -4184,5 +4206,5 @@
     end;
   end;
-
+  
 begin
   Result := nil;
@@ -4398,5 +4420,4 @@
 end;
 
-{ TODO -oLori -cNext : TRemDlgElement.AddText }
 procedure TRemDlgElement.AddText(Lst: TStrings);
 var
@@ -4655,13 +4676,25 @@
                 (not Prompt.Forced) then
         begin
-          if (Pt = ptMHTest) and ((Prompt.FValue = '') or (pos('X',Prompt.FValue)>0)) then
+          if (Pt = ptMHTest) and (Prompt.FMHTestComplete = 2) then
             begin
-               if Prompt.FValue = '' then
-                  WordWrap('MH test '+ Piece(Prompt.FData.FRec3,U,8) + ' not done',List,65,6);
-               if pos('X',Prompt.FValue)>0 then
-                  WordWrap('You are missing one or more responses in the MH test '+
-                           Piece(Prompt.FData.FRec3,U,8),List,65,6);
-               WordWrap(' ',List,65,6);
+               if ((Prompt.FValue = '') or (pos('X',Prompt.FValue)>0)) then
+                  begin
+                    if Prompt.FValue = '' then
+                        WordWrap('MH test '+ Piece(Prompt.FData.FRec3,U,8) + ' not done',List,65,6);
+                    if pos('X',Prompt.FValue)>0 then
+                        WordWrap('You are missing one or more responses in the MH test '+
+                               Piece(Prompt.FData.FRec3,U,8),List,65,6);
+                   WordWrap(' ',List,65,6);
+                  end;
             end;
+          if (Pt = ptMHTest) and (Prompt.FMHTestComplete = 0) or (Prompt.FValue = '') then
+                  begin
+                    if Prompt.FValue = '' then
+                        WordWrap('MH test '+ Piece(Prompt.FData.FRec3,U,8) + ' not done',List,65,6);
+                    if pos('X',Prompt.FValue)>0 then
+                        WordWrap('You are missing one or more responses in the MH test '+
+                               Piece(Prompt.FData.FRec3,U,8),List,65,6);
+                   WordWrap(' ',List,65,6);
+                  end;
           if (Pt = ptGAF) and ((Prompt.FValue = '0') or (Prompt.FValue = '')) then
             begin
@@ -4952,5 +4985,6 @@
           unt := Prompt.VitalUnitValue;
           ConvertVital(v, rte, unt);
-          txt := U + VitalCodes[v] + U + rte + U + FloatToStr(RemForm.PCEObj.VisitDateTime);
+          //txt := U + VitalCodes[v] + U + rte + U + FloatToStr(RemForm.PCEObj.VisitDateTime);  AGP Change 26.1 commented out
+          txt := U + VitalCodes[v] + U + rte + U + '0'; //AGP Change 26.1 Use for Vital date/time
           if(not Finishing) then
             txt := Char(ord('A')+ord(v)) + FormatVitalForNote(txt);  // Add vital sort char
@@ -5309,5 +5343,5 @@
       NeedRedraw := FALSE;
       case pt of
-        ptComment, ptQuantity, ptSkinReading:
+        ptComment, ptQuantity:
           TmpValue := (Sender as TEdit).Text;
 
@@ -5480,7 +5514,7 @@
                        end;
         end;
-        
+
         ptExamResults, ptSkinResults, ptLevelSeverity,
-        ptSeries, ptReaction, ptLevelUnderstanding:
+        ptSeries, ptReaction, ptLevelUnderstanding, ptSkinReading: //(AGP Change 26.1)
           TmpValue := (Sender as TORComboBox).ItemID;
         else
@@ -5492,4 +5526,6 @@
                              idx := -1;
                              TmpValue := (Sender as TORComboBox).ItemID;
+                             if FParent.VitalDateTime = 0 then
+                                  FParent.VitalDateTime := FMNow;
                            end;
               else
@@ -5497,5 +5533,12 @@
             end;
             if(idx > 0) then
-              SetPiece(TmpValue, ';', idx, TORExposedControl(Sender).Text);
+              begin
+                 //AGP Change 26.1 change Vital time/date to Now instead of encounter date/time
+                 SetPiece(TmpValue, ';', idx, TORExposedControl(Sender).Text);
+                 if (FParent.VitalDateTime > 0) and (TORExposedControl(Sender).Text = '') then
+                       FParent.VitalDateTime := 0;
+                 if (FParent.VitalDateTime = 0) and (TORExposedControl(Sender).Text <> '') then
+                       FParent.VitalDateTime := FMNow;
+              end;
           end
           else
@@ -5634,6 +5677,11 @@
                     Result := tmp;
 
-      ptSkinReading: if(StrToIntDef(tmp,0) <> 0) then
-                       Result := tmp;
+     (* ptSkinReading: if(StrToIntDef(tmp,0) <> 0) then
+                       Result := tmp;  *)
+
+     ptSkinReading:   // (AGP Change 26.1)
+       begin
+         Result := tmp;
+       end;
 
       ptVisitDate:
@@ -6151,6 +6199,6 @@
         (FCurrentControl as TUpDown).Position := StrToIntDef(GetValue,1);
 
-      ptSkinReading:
-        (FCurrentControl as TUpDown).Position := StrToIntDef(GetValue,0);
+     (* ptSkinReading:
+        (FCurrentControl as TUpDown).Position := StrToIntDef(GetValue,0); *)
 
       ptVisitDate:
@@ -6191,5 +6239,5 @@
 
       ptExamResults, ptSkinResults, ptLevelSeverity,
-      ptSeries, ptReaction, ptLevelUnderstanding:
+      ptSeries, ptReaction, ptLevelUnderstanding, ptSkinReading: //(AGP Change 26.1)
         (FCurrentControl as TORComboBox).SelectByID(GetValue);
 
@@ -6426,8 +6474,9 @@
 var
   TmpSL: TStringList;
-  i: integer;
+  i, TestComp: integer;
   Before, After: string;
 
 begin
+  TestComp := 0;
   if(MHTestAuthorized(FData.Narrative)) then
   begin
@@ -6440,9 +6489,17 @@
       Before := GetValue;
       After := PerformMHTest(Before, FData.Narrative, TmpSL);
-      if(Before <> After) then
+      if uinit.TimedOut then After := '';
+      if pos(U,After)>0 then
+        begin
+          TestComp := StrtoInt(Piece(After,U,2));
+          self.FMHTestComplete := TestComp;
+          After := Piece(After,U,1);
+        end;
+      if(Before <> After) and (not uInit.TimedOut) then
       begin
         if(After = '') or (FParent.ResultDlgID = 0) then
           FMiscText := ''
         else
+        if TestComp > 0 then
         begin
           MentalHealthTestResults(FMiscText, FParent.ResultDlgID, FData.Narrative,
@@ -6464,12 +6521,14 @@
       end;
     finally
-      FParent.FReminder.EndTextChanged(Sender);
-    end;
-    if(FParent.ElemType = etDisplayOnly) and (not assigned(FParent.FParent)) then
-      RemindersInProcess.Notifier.Notify;
-  end
-  else
-    InfoBox('Not Authorized to score the ' + FData.Narrative + ' test.',
-            'Insufficient Authorization', MB_OK + MB_ICONERROR);
+      if not uInit.TimedOut then
+         FParent.FReminder.EndTextChanged(Sender);
+    end;
+    if not uInit.TimedOut then
+         if(FParent.ElemType = etDisplayOnly) and (not assigned(FParent.FParent)) then
+            RemindersInProcess.Notifier.Notify;
+          end
+    else
+                InfoBox('Not Authorized to score the ' + FData.Narrative + ' test.',
+                   'Insufficient Authorization', MB_OK + MB_ICONERROR);
 end;
 
Index: cprs/branches/foia-cprs/CPRS-Chart/uReports.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/uReports.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/uReports.pas	(revision 460)
@@ -61,4 +61,6 @@
     SortOrder  : String;         //#:# of columns to use in a multi-column sort
     MaxDaysBack: String;         //Maximum number of Days allowed for report
+    Direct     : String;         //Direct Remote Call flag
+    HDR        : String;         //HDR is data source if = 1
 end;
 
@@ -136,4 +138,6 @@
       SortOrder       := Piece(x, U, 12);
       MaxDaysBack     := Piece(x, U, 13);
+      Direct          := Piece(x, U, 14);
+      HDR             := Piece(x, U, 15);
     end;
   Result := AnObject;
Index: cprs/branches/foia-cprs/CPRS-Chart/uSignItems.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/uSignItems.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/uSignItems.pas	(revision 460)
@@ -1,3 +1,3 @@
-unit uSignItems;
+      unit uSignItems;
 
 {.$define debug}
@@ -13,5 +13,5 @@
                   siEnvironmentalContaminants, siMST, siHeadNeckCancer, siCombatVeteran);
 
-  TSigItemTagInfo = record
+  TSigItemTagInfo =  record
     SigType: TSigItemType;
     Index: integer;
@@ -42,4 +42,5 @@
     function  FindCBValues(ATag: integer): TORCheckBox;
     function  GetTempCkBxState(Index: integer; CBValue:TSigItemType): string;
+    
   protected
     procedure Notification(AComponent: TComponent; Operation: TOperation); override;
@@ -61,4 +62,5 @@
     procedure CopyCB(FromIndex, ToIndex: integer); //BAPHII 1.3.1
     procedure SetSigItems(Sender: TObject; sourceOrderID: string); //BAPHII 1.3.1
+    //procedure SetSigItems(Sender: TObject; itemsList: TStringList; sourceOrderID: string); //BAPHII 1.3.1
     function ItemToTag(Info: TSigItemTagInfo): integer; //CQ5074
     function TagToItem(ATag: integer): TSigItemTagInfo; //CQ5074
@@ -70,6 +72,6 @@
 const
 
-  TC_Order_Error = 'All Service Connection and/or Rated Disabilities questions must be answered, '+#13+
-                   'and at least one diagnosis selected for each order that requires a diagnosis.';
+  TC_Order_Error = 'All Service Connection and/or Rated Disabilities questions must be answered.';
+
 
   TX_Order_Error = 'All Service Connection and/or Rated Disabilities questions must be answered, '+#13+
@@ -128,12 +130,9 @@
   BaseFlags: string;
   tempCkBx: TORCheckBox;
-  thisOrderID: string; //BAPHII 1.3.2
+  thisOrderID: string;
   thisChangeItem: TChangeItem;
 
 
 function TSigItems.GetSigItems : TORStringList;
-{
- BAPHII 1.3.1
-}
 begin
   Result := FItems;
@@ -141,7 +140,4 @@
 
 function TSigItems.FindCB(ATag: integer): TORCheckBox;
-{
- BAPHII 1.3.1
-}
 var
   i: integer;
@@ -161,7 +157,4 @@
 
 procedure TSigItems.CopyCB(FromIndex, ToIndex: integer);
-{
- BAPHII 1.3.1
-}
 var
   si: TSigItemType;
@@ -232,34 +225,10 @@
 var
   idx: integer;
-  i,j: integer;
 begin
   if ItemType = CH_ORD then
   begin
-
     idx := FItems.IndexOfPiece(ID);
-
     if idx < 0 then
       idx := FItems.Add(ID);
-
-      // when an order has not been sent to the server and is deleted
-      // or discontinued the treatment factors remain from the original order,
-      // this will clear the treatment factors, which will be set based on HIMS
-      if BILLING_AWARE then
-      begin
-         if UBAGlobals.BADeltedOrders.Count > 0 then
-         begin
-            for i := 0 to FItems.Count-1 do
-            begin
-               for j := 0 to UBAGlobals.BADeltedOrders.Count-1 do
-               begin
-                  if (Piece(fItems.Strings[i],U,1) = UBAGlobals.BADeltedOrders.Strings[j] ) then
-                  begin
-                     fItems.Strings[i] := UBAGlobals.BADeltedOrders.Strings[j];
-                     UBAGlobals.BADeltedOrders.Clear;
-                  end;
-               end;
-            end;
-         end;
-     end;
     FItems.SetStrPiece(idx, 2, IntToStr(Index));
     FItems.SetStrPiece(idx,5,INIT_STR);    // hds4807 value was being reatained when same order selected in FReview.
@@ -424,10 +393,9 @@
        if idx > 0 then
           begin
-          if  BILLING_AWARE then
-              rpcGetSC4Orders
+         if  BILLING_AWARE then
+              rpcGetSC4Orders // get SC/EIC information for all CIDC TYPE orders
           else
-             GetCoPay4Orders;
-
-            for i := 0 to RPCBrokerV.Results.Count-1 do
+             GetCoPay4Orders;   // enforces existing NON CIDC CO-PAY rules
+             for i := 0 to RPCBrokerV.Results.Count-1 do
                begin
                   s := RPCBrokerV.Results[i];
@@ -479,5 +447,5 @@
 
                      FItems.SetStrPiece(idx, 4, Flags);
-                      // new code  gary  if deleted order and ba on then
+                      // new code  if deleted order and ba on then
                       // reset appropriate tf flags to "?".
 
@@ -524,5 +492,5 @@
     for si := low(TSigItemType) to high(TSigItemType) do
       StsUsed[si] := FALSE;
-
+    //  loop thru orders selected to be signed fReview/fOrdersSign.
     for i := 0 to FItems.Count-1 do
        begin
@@ -531,5 +499,8 @@
          if (piece(s,u,2) <> '-1') and (piece(s,u,3) = '1') then
             begin
-            s := piece(s, u, 4);
+             s := piece(s, u, 4); // SC/EI
+             // code added 01/17/2006 - check dc'd nurse orders, originals where requiring CIDC if assigned to patient.
+             if (BILLING_AWARE) and (not UBACore.IsOrderBillable(Piece(s,U,1))) then
+               s :=  NA_FLAGS;
 
             for si := low(TSigItemType) to high(TSigItemType) do
@@ -646,5 +617,5 @@
                         begin
                         Flags := piece(s,u,4);
-
+                                                 //loop thru treatment factors
                         for sx := low(TSigItemType) to high(TSigItemType) do
                            begin
Index: cprs/branches/foia-cprs/CPRS-Chart/uSpell.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/uSpell.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/uSpell.pas	(revision 460)
@@ -173,4 +173,5 @@
         MSWord.Application.Options.SaveInterval := 0;
         MSWord.Application.Options.AutoFormatReplaceQuotes := False;
+        MSWord.Application.Options.AutoFormatAsYouTypeReplaceQuotes := False;
         MSWord.ResetIgnoreAll;
 
Index: cprs/branches/foia-cprs/CPRS-Chart/uTIU.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Chart/uTIU.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Chart/uTIU.pas	(revision 460)
@@ -32,4 +32,6 @@
     ClinProcDateTime: TFMDateTime;
     Lines: TStrings;
+    PRF_IEN: integer;
+    ActionIEN: string;
   end;
 
@@ -63,4 +65,5 @@
     KeyWord: string;
     Filtered: Boolean;
+    SearchString: String;  // Text Search CQ: HDS00002856
   end ;
 
Index: cprs/branches/foia-cprs/CPRS-Lib/ORCtrlLib60.cfg
===================================================================
--- cprs/branches/foia-cprs/CPRS-Lib/ORCtrlLib60.cfg	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Lib/ORCtrlLib60.cfg	(revision 460)
@@ -34,9 +34,9 @@
 -K$00400000
 -E"c:\program files\borland\delphi6\dev\exesave"
--N"c:\cprs\DcuSave"
--LE"c:\cprs\OR_3_195V25\Packages"
--LN"c:\cprs\OR_3_195V25\Packages"
--U"c:\cprs\OR_3_195V25\Packages"
--O"c:\cprs\OR_3_195V25\Packages"
--I"c:\cprs\OR_3_195V25\Packages"
--R"c:\cprs\OR_3_195V25\Packages"
+-N"..\Packages"
+-LE"..\Packages"
+-LN"..\Packages"
+-U"..\cprs-lib;..\Packages"
+-O"..\cprs-lib;..\Packages"
+-I"..\cprs-lib;..\Packages"
+-R"..\cprs-lib;..\Packages"
Index: cprs/branches/foia-cprs/CPRS-Lib/ORCtrlLib60.dof
===================================================================
--- cprs/branches/foia-cprs/CPRS-Lib/ORCtrlLib60.dof	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Lib/ORCtrlLib60.dof	(revision 460)
@@ -43,11 +43,11 @@
 [Directories]
 OutputDir=$(DELPHI)\dev\exesave
-UnitOutputDir=c:\cprs\DcuSave
-PackageDLLOutputDir=c:\cprs\OR_3_195V25\Packages
-PackageDCPOutputDir=c:\cprs\OR_3_195V25\Packages
-SearchPath=c:\cprs\OR_3_195V25\Packages
+UnitOutputDir=..\Packages
+PackageDLLOutputDir=..\Packages
+PackageDCPOutputDir=..\Packages
+SearchPath=..\cprs-lib;..\Packages
 Packages=Vcl40;Vclx40;Vcldb40;vcldbx40;VclSmp40;Qrpt40;TeeUI40;teedb40;tee40;ibevnt40;nmfast40;VistABroker
 Conditionals=
-DebugSourceDirs=
+DebugSourceDirs=..\Packages
 UsePackages=0
 [Parameters]
@@ -88,37 +88,34 @@
 [Excluded Packages]
 C:\Program Files\Borland\Delphi6\Projects\Bpl\SharedRPCBroker_D60.bpl=VistA SharedBroker Components
+[HistoryLists\hlDebugSourcePath]
+Count=1
+Item0=..\Packages
 [HistoryLists\hlUnitAliases]
 Count=1
 Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
 [HistoryLists\hlSearchPath]
-Count=13
-Item0=c:\cprs\OR_3_195V25\Packages
-Item1=D:\vista\cprs\OR_3_195V25\Packages
-Item2=D:\vista\cprs\OR_3_195V25\CPRS-Chart\dcu
-Item3=..\cprs-lib;..\Packages
-Item4=..\cprs-lib;..\Packages;..\cprs-chart;..\cprs-chart\dcu
-Item5=d:\vista\main\cprs-lib;d:\vista\main\Packages
-Item6=d:\vista\main\cprs-lib;d:\program files\vista\broker\bdk32\d5
-Item7=d:\vista\main\cprs-chart;d:\vista\main\cprs-lib;d:\vista\main\cprs-chart\encounter;d:\vista\main\cprs-chart\consults
-Item8=d:\vista\main\cprs-lib
-Item9=\Dev\CPRS\main\CPRS-Lib
-Item10=C:\Dev\CPRS\main\CPRS-Lib
-Item11=\Projects\Perforce\main\CPRS-Lib
-Item12=$(DELPHI)\Projects\Current\CPRS-Lib
+Count=10
+Item0=..\cprs-lib;..\Packages
+Item1=..\cprs-lib;..\Packages;..\cprs-chart;..\cprs-chart\dcu
+Item2=d:\vista\main\cprs-lib;d:\vista\main\Packages
+Item3=d:\vista\main\cprs-lib;d:\program files\vista\broker\bdk32\d5
+Item4=d:\vista\main\cprs-chart;d:\vista\main\cprs-lib;d:\vista\main\cprs-chart\encounter;d:\vista\main\cprs-chart\consults
+Item5=d:\vista\main\cprs-lib
+Item6=\Dev\CPRS\main\CPRS-Lib
+Item7=C:\Dev\CPRS\main\CPRS-Lib
+Item8=\Projects\Perforce\main\CPRS-Lib
+Item9=$(DELPHI)\Projects\Current\CPRS-Lib
 [HistoryLists\hlUnitOutputDirectory]
-Count=13
-Item0=c:\cprs\DcuSave
-Item1=c:\cprs\OR_3_195V25\DcuSave
-Item2=D:\vista\cprs\OR_3_195V25\Packages
-Item3=D:\vista\cprs\OR_3_195V25\CPRS-Chart\dcu
-Item4=..\cprs-lib\dcu
-Item5=..\cprs-lib
-Item6=d:\vista\main\cprs-lib\DCU
-Item7=d:\vista\main\cprs-lib\DCUSave
-Item8=d:\vista\main\cprs-chart\dcu
-Item9=\Dev\DCUSave
-Item10=C:\Dev\DCUSave
-Item11=\Projects\DCUSave
-Item12=$(DELPHI)\Projects\DCUSave
+Count=10
+Item0=..\Packages
+Item1=..\cprs-lib\dcu
+Item2=..\cprs-lib
+Item3=d:\vista\main\cprs-lib\DCU
+Item4=d:\vista\main\cprs-lib\DCUSave
+Item5=d:\vista\main\cprs-chart\dcu
+Item6=\Dev\DCUSave
+Item7=C:\Dev\DCUSave
+Item8=\Projects\DCUSave
+Item9=$(DELPHI)\Projects\DCUSave
 [HistoryLists\hlOutputDirectorry]
 Count=2
@@ -126,25 +123,19 @@
 Item1=d:\vista\main\cprs-chart
 [HistoryLists\hlBPLOutput]
-Count=10
-Item0=c:\cprs\OR_3_195V25\Packages
-Item1=D:\vista\cprs\OR_3_195V25\Packages
-Item2=D:\vista\cprs\OR_3_195V25\CPRS-Chart\dcu
-Item3=..\Packages
-Item4=d:\vista\main\Packages
-Item5=d:\vista\main\cprs-lib
-Item6=\Dev\Packages
-Item7=C:\Dev\Packages
-Item8=\Projects\Packages
-Item9=$(DELPHI)\Projects\Packages
+Count=7
+Item0=..\Packages
+Item1=d:\vista\main\Packages
+Item2=d:\vista\main\cprs-lib
+Item3=\Dev\Packages
+Item4=C:\Dev\Packages
+Item5=\Projects\Packages
+Item6=$(DELPHI)\Projects\Packages
 [HistoryLists\hlDCPOutput]
-Count=10
-Item0=c:\cprs\OR_3_195V25\Packages
-Item1=D:\vista\cprs\OR_3_195V25\Packages
-Item2=D:\vista\cprs\OR_3_195V25\CPRS-Chart\dcu
-Item3=..\Packages
-Item4=d:\vista\main\Packages
-Item5=d:\vista\main\cprs-lib
-Item6=\Dev\Packages
-Item7=C:\Dev\Packages
-Item8=\Projects\Packages
-Item9=$(DELPHI)\Projects\Packages
+Count=7
+Item0=..\Packages
+Item1=d:\vista\main\Packages
+Item2=d:\vista\main\cprs-lib
+Item3=\Dev\Packages
+Item4=C:\Dev\Packages
+Item5=\Projects\Packages
+Item6=$(DELPHI)\Projects\Packages
Index: cprs/branches/foia-cprs/CPRS-Lib/ORCtrlLib60.dpk
===================================================================
--- cprs/branches/foia-cprs/CPRS-Lib/ORCtrlLib60.dpk	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Lib/ORCtrlLib60.dpk	(revision 460)
@@ -2,6 +2,6 @@
 
 {$R *.res}
+{$R '..\CPRS-Chart\Accessibility_TLB.dcr'}
 {$R 'ORCtrlsDsgn.dcr'}
-{$R '..\CPRS-Chart\Accessibility_TLB.dcr'}
 {$ALIGN 8}
 {$ASSERTIONS ON}
@@ -35,9 +35,8 @@
 
 contains
+  uAccessAPI in 'uAccessAPI.pas',
+  Accessibility_TLB in '..\CPRS-Chart\Accessibility_TLB.pas',
   ORCtrls in 'ORCtrls.pas',
-  ORCtrlsDsgn in 'ORCtrlsDsgn.pas',
-  uAccessAPI in 'uAccessAPI.pas',
-  Accessibility_TLB in '..\CPRS-Chart\Accessibility_TLB.pas';
+  ORCtrlsDsgn in 'ORCtrlsDsgn.pas';
 
 end.
-
Index: cprs/branches/foia-cprs/CPRS-Lib/ORCtrlLib60.dsk
===================================================================
--- cprs/branches/foia-cprs/CPRS-Lib/ORCtrlLib60.dsk	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Lib/ORCtrlLib60.dsk	(revision 460)
@@ -0,0 +1,498 @@
+[Closed Files]
+File_0=SourceModule,'D:\vista\cprs\OR_3_195V25\CPRS-Lib\uStaticText.pas',0,1,1,1,1,0,0
+File_1=SourceModule,'D:\vista\cprs\OR_3_195V25\CPRS-Chart\unit2.pas',0,1,1,1,11,0,0
+File_2=SourceModule,'D:\vista\cprs\main\CPRS-Chart\uSignItems.pas',0,1,1044,54,1060,0,0
+File_3=SourceModule,'D:\vista\cprs\OR_3_215V26\CPRS-Chart\uSignItems.pas',0,1,1044,54,1060,0,0
+File_4=SourceModule,'D:\vista\cprs\OR_3_215V26\CPRS-Chart\fReview.pas',0,1,1833,42,1841,1,0
+File_5=SourceModule,'D:\vista\cprs\main\CPRS-Chart\fReview.pas',0,1,1830,44,1857,1,0
+File_6=SourceModule,'D:\vista\cprs\OR_3_195V25\CPRS-Lib\ORCtrls.pas',0,1,1,63,30,0,0
+File_7=SourceModule,'C:\PROGRA~1\Vista\BDK32_~1\Source\wsockc.pas',0,1,1455,1,1477,0,0
+File_8=SourceModule,'D:\vista\cprs\OR_3_195V25\CPRS-Chart\VERGENCECONTEXTORLib_TLB.pas',0,1,564,1,586,0,0
+
+[Modules]
+Module0=D:\vista\cprs\OR_3_195V25\CPRS-Chart\Orders\fOrdersSign.pas
+Module1=D:\vista\cprs\OR_3_195V25\CPRS-Chart\fReview.pas
+Module2=D:\vista\cprs\OR_3_195V25\CPRS-Chart\uSignItems.pas
+Module3=D:\vista\cprs\OR_3_195V25\CPRS-Chart\CPRSChart.dpr
+Count=4
+EditWindowCount=1
+PackageWindowCount=1
+TypeLibWindowCount=1
+
+[D:\vista\cprs\OR_3_195V25\CPRS-Chart\Orders\fOrdersSign.pas]
+ModuleType=SourceModule
+FormState=0
+FormOnTop=0
+
+[D:\vista\cprs\OR_3_195V25\CPRS-Chart\fReview.pas]
+ModuleType=SourceModule
+FormState=0
+FormOnTop=0
+
+[D:\vista\cprs\OR_3_195V25\CPRS-Chart\uSignItems.pas]
+ModuleType=SourceModule
+FormState=0
+FormOnTop=0
+
+[D:\vista\cprs\OR_3_195V25\CPRS-Chart\CPRSChart.dpr]
+ModuleType=SourceModule
+FormState=0
+FormOnTop=0
+SymbolFile=D:\vista\cprs\OR_3_195V25\CPRS-Chart\CPRSChart.dsm
+ModSinceCompile=1
+
+[D:\vista\cprs\OR_3_215V26\CPRS-Lib\ORCtrlLib60.dpk]
+FormState=0
+FormOnTop=1
+
+[D:\vista\cprs\OR_3_195V25\CPRS-Chart\CPRSChart.tlb]
+FormState=0
+FormOnTop=1
+
+[D:\Program Files\Borland\Delphi6\Projects\ProjectGroup1.bpg]
+FormState=0
+FormOnTop=0
+
+[D:\vista\cprs\OR_3_195V25\CPRS-Chart\mCoPayDesc.pas]
+FormState=0
+FormOnTop=0
+
+[EditWindow0]
+ViewCount=4
+CurrentView=3
+View0=0
+View1=1
+View2=2
+View3=3
+CodeExplorer=CodeExplorer@EditWindow0
+MessageView=MessageView@EditWindow0
+Create=1
+Visible=1
+State=0
+Left=1
+Top=104
+Width=1022
+Height=635
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=1014
+ClientHeight=608
+LeftPanelSize=0
+RightPanelSize=0
+BottomPanelSize=0
+BottomPanelClients=MessageView@EditWindow0
+BottomPanelData=00000400010000000B0000004D65737361676556696577F603000000000000021D00000000000000010000000000000000000000000100000000F3030000000000000100000000F3030000000000000100000000F3030000000000000100000000F3030000000000000100000000F3030000000000000100000000F3030000000000000100000000F5030000000000000100000000F5030000000000000100000000F5030000000000000100000000F50300000000000001000000000004000000000000010000000000040000000000000100000000F5030000000000000100000000F503000000000000010000000000040000000000000100000000720400000000000001000000007204000000000000010000000080040000000000000100000000720400000000000001000000007204000000000000010000000072040000000000000100000000750400000000000001000000008004000000000000010000000080040000000000000100000000000400000000000001000000000004000000000000010000000000040000000000000100000000F8030000000000000100000000F8030000000000000100000000F803000000000000010000000000040000000000000100000000F8030000000000000100000000F8030000000000000100000000EF030000000000000100000000EF03000000000000010000000000040000000000000100000000B0020000000000000100000000F5030000000000000100000000F503000000000000010000000000040000000000000100000000F40300000000000001000000000004000000000000010000000000040000000000000100000000F8030000000000000100000000F8030000000000000100000000F803000000000000010000000000040000000000000100000000F80300000000000001000000000004000000000000010000000000040000000000000100000000F803000000000000010000000000040000000000000100000000F8030000000000000100000000F8030000000000000100000000F80300000000000001000000000004000000000000010000000000040000000000000100000000F60300000000000001000000000004000000000000010000000000040000000000000100000000F6030000000000000100000000F6030000000000000100000000F60300000B0000004D65737361676556696577FFFFFFFF
+
+[View0]
+Module=D:\vista\cprs\OR_3_195V25\CPRS-Chart\CPRSChart.dpr
+CursorX=28
+CursorY=17
+TopLine=2
+LeftCol=1
+
+[View1]
+Module=D:\vista\cprs\OR_3_195V25\CPRS-Chart\uSignItems.pas
+CursorX=33
+CursorY=325
+TopLine=628
+LeftCol=1
+
+[View2]
+Module=D:\vista\cprs\OR_3_195V25\CPRS-Chart\fReview.pas
+CursorX=36
+CursorY=375
+TopLine=358
+LeftCol=1
+
+[View3]
+Module=D:\vista\cprs\OR_3_195V25\CPRS-Chart\Orders\fOrdersSign.pas
+CursorX=1
+CursorY=1439
+TopLine=1427
+LeftCol=1
+
+[PackageWindow0]
+Create=1
+Visible=1
+State=0
+Left=260
+Top=260
+Width=368
+Height=244
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=360
+ClientHeight=220
+TBDockHeight=244
+LRDockWidth=368
+Dockable=1
+StatusBar=0
+TextLabels=1
+Toolbar=1
+SectionWidth0=150
+SectionWidth1=210
+Module=D:\vista\cprs\OR_3_215V26\CPRS-Lib\ORCtrlLib60.dpk
+
+[TypeLibEditWindow0]
+Create=1
+Visible=0
+State=0
+Left=200
+Top=103
+Width=650
+Height=446
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=642
+ClientHeight=419
+Module=D:\vista\cprs\OR_3_195V25\CPRS-Chart\CPRSChart.tlb
+
+[Watches]
+Count=4
+Watch0='i',256,0,18,1,1
+Watch1='Piece(lbDiagnosis.Items[i],U,2)',256,0,18,1,1
+Watch2='lbDiagnosis.Items[itemNum]',256,0,18,1,0
+Watch3='lbPersonalDx.Items[J]',256,0,18,1,0
+
+[Breakpoints]
+Count=6
+Breakpoint0='D:\vista\cprs\OR_3_195V25\CPRS-Chart\uSignItems.pas',130,'',0,1,'',1,0,0,'',1,'','',''
+Breakpoint1='D:\vista\cprs\OR_3_195V25\CPRS-Chart\BA\fBAOptionsDiagnoses.pas',410,'',0,1,'',1,0,0,'',1,'','',''
+Breakpoint2='D:\vista\cprs\OR_3_195V25\CPRS-Chart\BA\fBAOptionsDiagnoses.pas',414,'',0,1,'',1,0,0,'',1,'','',''
+Breakpoint3='D:\vista\cprs\OR_3_195V25\CPRS-Chart\uSignItems.pas',275,'',0,1,'',1,0,0,'',1,'','',''
+Breakpoint4='D:\vista\cprs\OR_3_195V25\CPRS-Chart\Orders\fOrdersSign.pas',1099,'',0,1,'',1,0,0,'',1,'','',''
+Breakpoint5='D:\vista\cprs\OR_3_195V25\CPRS-Chart\uSignItems.pas',644,'',0,1,'',1,0,0,'',1,'','',''
+
+[AddressBreakpoints]
+Count=0
+
+[Main Window]
+Create=1
+Visible=1
+State=0
+Left=0
+Top=0
+Width=1024
+Height=105
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=1016
+ClientHeight=78
+
+[ProjectManager]
+Create=1
+Visible=1
+State=0
+Left=0
+Top=0
+Width=287
+Height=579
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=287
+ClientHeight=579
+TBDockHeight=571
+LRDockWidth=255
+Dockable=1
+
+[Components]
+Create=1
+Visible=0
+State=0
+Left=420
+Top=251
+Width=183
+Height=266
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=175
+ClientHeight=242
+
+[CPUWindow]
+Create=1
+Visible=0
+State=0
+Left=159
+Top=109
+Width=819
+Height=551
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=811
+ClientHeight=524
+DumpPane=212
+DisassemblyPane=377
+RegisterPane=231
+FlagPane=120
+
+[AlignmentPalette]
+Create=1
+Visible=0
+State=0
+Left=200
+Top=107
+Width=156
+Height=82
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=150
+ClientHeight=60
+
+[PropertyInspector]
+Create=1
+Visible=1
+State=0
+Left=0
+Top=0
+Width=287
+Height=579
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=287
+ClientHeight=579
+TBDockHeight=571
+LRDockWidth=255
+Dockable=1
+SplitPos=131
+ArrangeBy=Name
+SelectedItem=
+ExpandedItems=Brush,Font.Style
+HiddenCategories=
+
+[WatchWindow]
+Create=1
+Visible=1
+State=0
+Left=5
+Top=1
+Width=803
+Height=104
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=795
+ClientHeight=80
+TBDockHeight=149
+LRDockWidth=421
+Dockable=1
+
+[BreakpointWindow]
+Create=1
+Visible=1
+State=0
+Left=0
+Top=0
+Width=287
+Height=579
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=287
+ClientHeight=579
+TBDockHeight=197
+LRDockWidth=737
+Dockable=1
+Column0Width=151
+Column1Width=75
+Column2Width=200
+Column3Width=200
+Column4Width=75
+Column5Width=75
+
+[CallStackWindow]
+Create=1
+Visible=0
+State=0
+Left=365
+Top=303
+Width=294
+Height=161
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=286
+ClientHeight=137
+TBDockHeight=161
+LRDockWidth=294
+Dockable=1
+
+[ThreadStatusWindow]
+Create=1
+Visible=0
+State=0
+Left=0
+Top=0
+Width=1024
+Height=768
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=1016
+ClientHeight=744
+TBDockHeight=152
+LRDockWidth=624
+Dockable=1
+Column0Width=145
+Column1Width=100
+Column2Width=115
+Column3Width=250
+
+[ModuleWindow]
+Create=1
+Visible=0
+State=0
+Left=18
+Top=9
+Width=913
+Height=719
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=905
+ClientHeight=695
+TBDockHeight=355
+LRDockWidth=638
+Dockable=1
+Column0Width=125
+Column1Width=100
+Column2Width=356
+EntryPointPane=447
+CompUnitPane=530
+
+[ObjectTree]
+Create=1
+Visible=0
+State=0
+Left=0
+Top=105
+Width=190
+Height=264
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=182
+ClientHeight=240
+TBDockHeight=264
+LRDockWidth=190
+Dockable=1
+
+[DebugLogView]
+Create=1
+Visible=0
+State=0
+Left=0
+Top=0
+Width=798
+Height=712
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=790
+ClientHeight=688
+TBDockHeight=291
+LRDockWidth=417
+Dockable=1
+
+[LocalVarsWindow]
+Create=1
+Visible=0
+State=0
+Left=441
+Top=447
+Width=421
+Height=192
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=413
+ClientHeight=168
+TBDockHeight=192
+LRDockWidth=421
+Dockable=1
+
+[ToDo List]
+Create=1
+Visible=0
+State=0
+Left=107
+Top=48
+Width=866
+Height=649
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=858
+ClientHeight=625
+TBDockHeight=250
+LRDockWidth=713
+Dockable=1
+Column0Width=507
+Column1Width=30
+Column2Width=100
+Column3Width=70
+Column4Width=70
+SortOrder=6
+ShowHints=1
+ShowChecked=1
+
+[FPUWindow]
+Create=1
+Visible=0
+State=0
+Left=306
+Top=280
+Width=457
+Height=250
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=449
+ClientHeight=223
+RegisterPane=121
+FlagPane=59
+
+[CodeExplorer@EditWindow0]
+Create=1
+Visible=1
+State=0
+Left=0
+Top=0
+Width=287
+Height=579
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=287
+ClientHeight=579
+TBDockHeight=305
+LRDockWidth=140
+Dockable=1
+
+[MessageView@EditWindow0]
+Create=1
+Visible=0
+State=0
+Left=12
+Top=0
+Width=1002
+Height=29
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=1002
+ClientHeight=29
+TBDockHeight=29
+LRDockWidth=443
+Dockable=1
+
+[DockHosts]
+DockHostCount=1
+
+[DockSite0]
+DockSiteType=1
+Create=1
+Visible=1
+State=0
+Left=1
+Top=104
+Width=303
+Height=632
+MaxLeft=-1
+MaxTop=-1
+ClientWidth=295
+ClientHeight=608
+TBDockHeight=659
+LRDockWidth=263
+Dockable=1
+TabPosition=0
+ActiveTab=Object Inspector
+TabDockClients=PropertyInspector,ProjectManager,BreakpointWindow,CodeExplorer@EditWindow0
+
Index: cprs/branches/foia-cprs/CPRS-Lib/ORCtrls.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Lib/ORCtrls.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Lib/ORCtrls.pas	(revision 460)
@@ -26,6 +26,4 @@
      FOnEnter: TNotifyEvent;
      FOnExit: TNotifyEvent;
-  protected
-
   published
      property OnEnter: TNotifyEvent read FOnEnter write FOnEnter;
@@ -543,4 +541,9 @@
     property OnSynonymCheck: TORSynonymCheckEvent read GetOnSynonymCheck write SetOnSynonymCheck;
     property CharsNeedMatch: integer  read FCharsNeedMatch  write SetNumForMatch;
+{UniqueAutoComplete Was added as a result of the following defects:
+ 7293 - PTM 85:  Backspace and Dosage:  Desired dosage does not populate if dosage is not in local dosage field
+ 7337 - PTM 160 Meds: #8 IMO - Simple - Change Order in which Error generated if "Enter" is hit instead of "OK"
+ 7278 - PTM 36 Meds: Select 40000 UNT/2ML and backspace to 4000 the dose selected remains 40000
+ 7284 - Inconsistencies of pulling in a dose from the Possible Dose File }
     property UniqueAutoComplete: Boolean read FUniqueAutoComplete write SetUniqueAutoComplete default False;
   end;
@@ -898,12 +901,16 @@
   TCaptionListBox = class(TListBox)
   private
+    FHoverItemPos: integer;
     FAccessible: IAccessible;
     FRightClickSelect: boolean;                  // When true, a right click selects teh item
+    FHintOnItem: boolean;
     procedure SetCaption(const Value: string);
     function GetCaption: string;
     procedure WMGetObject(var Message: TMessage); message WM_GETOBJECT;
     procedure WMRButtonUp(var Message: TWMRButtonUp); message WM_RBUTTONUP;
+    procedure WMMouseMove(var Message: TWMMouseMove); message WM_MOUSEMOVE;
   protected
     FCaptionComponent: TStaticText;
+    procedure DoEnter; override;
   public
     procedure MakeAccessible( Accessible: IAccessible);
@@ -911,4 +918,6 @@
     property RightClickSelect: boolean read FRightClickSelect write FRightClickSelect default FALSE;
     property Caption: string read GetCaption write SetCaption;
+    //Make the ListBox's hint contain the contents of the listbox Item the mouse is currently over.
+    property HintOnItem: boolean read FHintOnItem write FHintOnItem default FALSE;
   end;
 
@@ -1440,5 +1449,6 @@
 end;
 
-{  ----------------------------------------------------- }
+{ TORStaticText }
+
 procedure TORStaticText.DoEnter;
 begin
@@ -1454,5 +1464,4 @@
      FOnExit(Self);
 end;
-
 
 { TORStrings }
@@ -2236,4 +2245,5 @@
   //if Items.Count > 0 then SetFocusIndex(TopIndex);  // this seems to cause problems
   //Fix For ClearQuest: HDS00001576
+  //This fix has been commented out, becuase it causes problems
 {  if (Items.Count > 0) and (Not IsAMouseButtonDown()) and (ItemIndex = -1) then
     SetFocusIndex(TopIndex);//ItemIndex := TopIndex; }
@@ -3863,6 +3873,5 @@
   //FEditBox.SelectAll;
   //Fix For ClearQuest: HDS00001576
-  {Commented out the fix for CQ: 1576, always selecing first item is
-   causing issues.}
+  //This fix has been commented out, becuase it causes problems
 {  with FListBox do
   if (Items.Count > 0) and (Not IsAMouseButtonDown()) and (ItemIndex = -1) then
@@ -3872,5 +3881,5 @@
     //Calling keyUp after key down creates a better mimic of a Keystroke.
     FwdKeyUp(Self,key,[]);   //fixes clearquest: HDS00001418
-  end; }
+  end;              }
   inherited DoEnter;
   PostMessage(Handle, UM_GOTFOCUS, 0, 0)
@@ -6476,4 +6485,11 @@
 { TCaptionListBox }
 
+procedure TCaptionListBox.DoEnter;
+begin
+  inherited;
+  if HintOnItem then
+    FHoverItemPos := -1; //CQ: 7178 & 9911 - used as last item index for ListBox
+end;
+
 function TCaptionListBox.GetCaption: string;
 begin
@@ -6512,4 +6528,24 @@
   else
     inherited;
+end;
+
+procedure TCaptionListBox.WMMouseMove(var Message: TWMMouseMove);
+var
+  i : integer;
+begin
+  inherited;
+  //CQ: 7178 & 9911 - FHoverItemPos should be set to -1 in OnEnter
+  //Make the TListBox's hint contain the contents of the listbox Item the mouse is currently over
+  if HintOnItem then
+  begin
+    i := ItemAtPos(Point(Message.XPos, Message.YPos), true);
+    if i <> FHoverItemPos then
+      Application.CancelHint;
+    if i = -1 then
+      Hint := ''
+    else
+      Hint := Items[i];
+    FHoverItemPos := i;
+  end;
 end;
 
@@ -6811,5 +6847,2 @@
 
 end.
-
-
-
Index: cprs/branches/foia-cprs/CPRS-Lib/ORCtrlsDsgn.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Lib/ORCtrlsDsgn.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Lib/ORCtrlsDsgn.pas	(revision 460)
@@ -164,3 +164,2 @@
 end.
 
-
Index: cprs/branches/foia-cprs/CPRS-Lib/ORDateLib60.dof
===================================================================
--- cprs/branches/foia-cprs/CPRS-Lib/ORDateLib60.dof	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Lib/ORDateLib60.dof	(revision 460)
@@ -86,4 +86,6 @@
 ProductVersion=1.0.0.0
 Comments=
+[Excluded Packages]
+C:\Program Files\Borland\Delphi6\Projects\Bpl\SharedRPCBroker_D60.bpl=VistA SharedBroker Components
 [HistoryLists\hlUnitAliases]
 Count=1
Index: cprs/branches/foia-cprs/CPRS-Lib/ORDtTm.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Lib/ORDtTm.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Lib/ORDtTm.pas	(revision 460)
@@ -285,4 +285,5 @@
 begin
   ResizeAnchoredFormToFont(self);
+  //FormStyle := fsStayOnTop;
   lstHour.TopIndex := 6;
   FFromSelf := False;
Index: cprs/branches/foia-cprs/CPRS-Lib/ORFn.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Lib/ORFn.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Lib/ORFn.pas	(revision 460)
@@ -114,4 +114,6 @@
 procedure CallWhenIdleNotifyWhenDone(CallProc, DoneProc: TORIdleCallProc; Msg: String);
 procedure menuHideAllBut(aMenuItem: tMenuItem; butItems: array of tMenuItem);
+function TabIsPressed : Boolean;
+function ShiftTabIsPressed : Boolean;
 
 implementation  // ---------------------------------------------------------------------------
@@ -832,5 +834,4 @@
 
 procedure LimitStringLength(var AList: TStringList; MaxLength: Integer);
-{ change a TStringList so that all strings in the list are shorter than MaxLength }
 var
   i, SpacePos: Integer;
@@ -852,5 +853,5 @@
           while (x[SpacePos] <> ' ') and (SpacePos > 1) do Dec(SpacePos);      {**REV**}  {changed 0 to 1}
           if SpacePos = 1 then SpacePos := MaxLength;                          {**REV**}  {changed 0 to 1}
-          NewList.Add(Copy(x, 1, SpacePos - 1));
+          NewList.Add(Copy(x, 1, SpacePos ));  // CQ     PSI-05-040 change SpacePos-1 to SpacePos
           Delete(x, 1, SpacePos);
         end; {while Length(x)}
@@ -1710,4 +1711,15 @@
 end;
 
+function TabIsPressed : Boolean;
+begin
+  Result := Boolean(Hi(GetKeyState(VK_TAB))) and not Boolean(Hi(GetKeyState(VK_SHIFT)));
+end;
+
+function ShiftTabIsPressed : Boolean;
+begin
+  Result := Boolean(Hi(GetKeyState(VK_TAB))) and Boolean(Hi(GetKeyState(VK_SHIFT)));
+end;
+
+
 initialization
   FBaseFont := TFont.Create;
Index: cprs/branches/foia-cprs/CPRS-Lib/ORNet.pas
===================================================================
--- cprs/branches/foia-cprs/CPRS-Lib/ORNet.pas	(revision 459)
+++ cprs/branches/foia-cprs/CPRS-Lib/ORNet.pas	(revision 460)
@@ -1,7 +1,11 @@
 unit ORNet;
 
+{$DEFINE CCOWBROKER}
+
 interface
 
-uses SysUtils, Windows, Classes, Forms, Controls, ORFn, TRPCB, RPCConf1, Dialogs; //, SharedRPCBroker;
+uses SysUtils, Windows, Classes, Forms, Controls, ORFn, TRPCB, RPCConf1, Dialogs    
+{$IFDEF CCOWBROKER}, CCOWRPCBroker {$ENDIF} ;  //, SharedRPCBroker;
+
 
 procedure SetBrokerServer(const AName: string; APort: Integer; WantDebug: Boolean);
@@ -32,8 +36,12 @@
 
 var
-  //RPCBrokerV: TSharedRPCBroker;                        // an RPC Broker object - used by all calls
+{$IFDEF CCOWBROKER}
+  RPCBrokerV: TCCOWRPCBroker;
+{$ELSE}
   RPCBrokerV: TRPCBroker;
+  //RPCBrokerV: TSharedRPCBroker;
+{$ENDIF}
   RPCLastCall: string;
-  
+
 implementation
 
@@ -59,6 +67,10 @@
   if RPCBrokerV = nil then
   begin
+{$IFDEF CCOWBROKER}
+    RPCBrokerV := TCCOWRPCBroker.Create(Application);
+{$ELSE}
+    RPCBrokerV := TRPCBroker.Create(Application);
     //RPCBrokerV := TSharedRPCBroker.Create(Application);
-    RPCBrokerV := TRPCBroker.Create(Application);
+{$ENDIF}
     with RPCBrokerV do
     begin
Index: cprs/branches/foia-cprs/CPRS-Lib/fGMV_InputTemp.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Lib/fGMV_InputTemp.dfm	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Lib/fGMV_InputTemp.dfm	(revision 460)
@@ -0,0 +1,328 @@
+object frmGMV_InputTemp: TfrmGMV_InputTemp
+  Left = 322
+  Top = 254
+  BorderStyle = bsNone
+  Caption = 'frmGMV_InputTemp'
+  ClientHeight = 447
+  ClientWidth = 728
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  OldCreateOrder = False
+  OnClose = FormClose
+  OnCloseQuery = FormCloseQuery
+  OnCreate = FormCreate
+  OnResize = FormResize
+  PixelsPerInch = 96
+  TextHeight = 13
+  object pnlInputTemplate: TPanel
+    Left = 0
+    Top = 41
+    Width = 728
+    Height = 406
+    Align = alClient
+    BevelOuter = bvNone
+    Caption = 'pnlInputTemplate'
+    TabOrder = 0
+    object Bevel1: TBevel
+      Left = 0
+      Top = 50
+      Width = 728
+      Height = 2
+      Align = alTop
+      Shape = bsBottomLine
+    end
+    object pnlInputTemplateHeader: TPanel
+      Left = 0
+      Top = 0
+      Width = 728
+      Height = 24
+      Align = alTop
+      Alignment = taLeftJustify
+      Caption = '  Input Template'
+      TabOrder = 1
+    end
+    object hc: THeaderControl
+      Left = 0
+      Top = 52
+      Width = 728
+      Height = 17
+      DragReorder = False
+      Enabled = False
+      Sections = <
+        item
+          Alignment = taCenter
+          ImageIndex = -1
+          Text = '#'
+          Width = 29
+        end
+        item
+          ImageIndex = -1
+          Text = 'Unavailable'
+          Width = 0
+        end
+        item
+          ImageIndex = -1
+          Text = 'U...  R...'
+          Width = 60
+        end
+        item
+          ImageIndex = -1
+          Text = 'Vital'
+          Width = 111
+        end
+        item
+          ImageIndex = -1
+          Text = 'Value'
+          Width = 90
+        end
+        item
+          ImageIndex = -1
+          Text = 'Units'
+          Width = 75
+        end
+        item
+          ImageIndex = -1
+          Text = 'Qualifiers'
+          Width = 50
+        end>
+      Style = hsFlat
+    end
+    object pnlScrollBox: TPanel
+      Left = 0
+      Top = 69
+      Width = 728
+      Height = 337
+      Align = alClient
+      BevelOuter = bvNone
+      BorderWidth = 4
+      TabOrder = 3
+      object sbxMain: TScrollBox
+        Left = 4
+        Top = 4
+        Width = 707
+        Height = 261
+        BorderStyle = bsNone
+        TabOrder = 0
+      end
+    end
+    object pnlOptions: TPanel
+      Left = 0
+      Top = 24
+      Width = 728
+      Height = 26
+      Align = alTop
+      BevelOuter = bvNone
+      Color = 12698049
+      TabOrder = 0
+      object bvU: TBevel
+        Left = 8
+        Top = 3
+        Width = 20
+        Height = 21
+        Shape = bsFrame
+        Visible = False
+      end
+      object bvUnavailable: TBevel
+        Left = 135
+        Top = 3
+        Width = 21
+        Height = 21
+        Shape = bsFrame
+        Visible = False
+      end
+      object lblUnavailable: TLabel
+        Left = 160
+        Top = 6
+        Width = 56
+        Height = 13
+        Caption = 'Un&available'
+        FocusControl = ckbUnavailable
+        Visible = False
+        WordWrap = True
+      end
+      object Label3: TLabel
+        Left = 34
+        Top = 6
+        Width = 73
+        Height = 13
+        Caption = '&Patient on pass'
+        FocusControl = ckbOnPass
+      end
+      object ckbOnPass: TCheckBox
+        Left = 12
+        Top = 5
+        Width = 12
+        Height = 17
+        Hint = 'Mark all vitals in the template as "Patient On Pass"'
+        Alignment = taLeftJustify
+        ParentShowHint = False
+        ShowHint = True
+        TabOrder = 0
+        OnClick = ckbOnPassClick
+        OnEnter = ckbOnPassEnter
+        OnExit = ckbOnPassExit
+      end
+      object pnlCPRSMetricStyle: TPanel
+        Left = 584
+        Top = 0
+        Width = 144
+        Height = 26
+        Align = alRight
+        BevelOuter = bvNone
+        ParentColor = True
+        TabOrder = 2
+        object chkCPRSSTyle: TCheckBox
+          Left = 1
+          Top = 5
+          Width = 136
+          Height = 17
+          Hint = 'Switch between dropdown and check box presentation of metric'
+          TabStop = False
+          Alignment = taLeftJustify
+          Caption = '&Units as Drop Down List'
+          TabOrder = 0
+          OnClick = acMetricStyleChangedExecute
+        end
+      end
+      object ckbUnavailable: TCheckBox
+        Left = 140
+        Top = 5
+        Width = 11
+        Height = 17
+        Hint = 'Mark all vitals in the template as "Patient Unavailable" '
+        Alignment = taLeftJustify
+        Caption = 'Patient on Pass'
+        ParentShowHint = False
+        ShowHint = True
+        TabOrder = 1
+        Visible = False
+      end
+    end
+  end
+  object pnlTools: TPanel
+    Left = 0
+    Top = 0
+    Width = 728
+    Height = 41
+    Align = alTop
+    BevelOuter = bvNone
+    TabOrder = 1
+    Visible = False
+    object pnlPatient: TPanel
+      Left = 0
+      Top = 0
+      Width = 208
+      Height = 41
+      Align = alLeft
+      Color = clInfoBk
+      Constraints.MinWidth = 165
+      TabOrder = 0
+      object lblPatientName: TLabel
+        Left = 7
+        Top = 5
+        Width = 73
+        Height = 13
+        Caption = 'PatientName'
+        Font.Charset = DEFAULT_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -12
+        Font.Name = 'MS Sans Serif'
+        Font.Style = [fsBold]
+        ParentFont = False
+      end
+      object lblPatientInfo: TLabel
+        Left = 7
+        Top = 21
+        Width = 85
+        Height = 13
+        Caption = 'PatientInformation'
+      end
+    end
+    object pnlSettings: TPanel
+      Left = 208
+      Top = 0
+      Width = 520
+      Height = 41
+      Align = alClient
+      TabOrder = 1
+      object lblHospital: TLabel
+        Left = 115
+        Top = 5
+        Width = 3
+        Height = 13
+      end
+      object lblDateTime: TLabel
+        Left = 115
+        Top = 21
+        Width = 3
+        Height = 13
+      end
+      object lblHospitalCap: TLabel
+        Left = 7
+        Top = 5
+        Width = 100
+        Height = 13
+        Caption = 'Hospital Location'
+        Font.Charset = DEFAULT_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -12
+        Font.Name = 'MS Sans Serif'
+        Font.Style = [fsBold]
+        ParentFont = False
+      end
+      object Label2: TLabel
+        Left = 7
+        Top = 21
+        Width = 61
+        Height = 13
+        Caption = 'Date/Time'
+        Font.Charset = DEFAULT_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -12
+        Font.Name = 'MS Sans Serif'
+        Font.Style = [fsBold]
+        ParentFont = False
+      end
+      object Panel1: TPanel
+        Left = 445
+        Top = 1
+        Width = 74
+        Height = 39
+        Align = alRight
+        BevelOuter = bvNone
+        TabOrder = 0
+        object SpeedButton1: TSpeedButton
+          Left = 8
+          Top = 8
+          Width = 57
+          Height = 25
+          Flat = True
+          OnClick = SpeedButton1Click
+        end
+      end
+    end
+  end
+  object ActionList1: TActionList
+    Left = 336
+    Top = 8
+    object acMetricStyleChanged: TAction
+      Caption = 'acMetricStyleChanged'
+      OnExecute = acMetricStyleChangedExecute
+    end
+    object acSaveInput: TAction
+      Caption = 'acSaveInput'
+      OnExecute = acSaveInputExecute
+    end
+    object acSetOnPass: TAction
+      Caption = 'acSetOnPass'
+      OnExecute = acSetOnPassExecute
+    end
+    object acUnavailableBoxStatus: TAction
+      Caption = 'acUnavailableBoxStatus'
+    end
+  end
+end
Index: cprs/branches/foia-cprs/CPRS-Lib/fGMV_Qualifiers.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Lib/fGMV_Qualifiers.dfm	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Lib/fGMV_Qualifiers.dfm	(revision 460)
@@ -0,0 +1,74 @@
+object frmGMV_Qualifiers: TfrmGMV_Qualifiers
+  Left = 460
+  Top = 247
+  BorderIcons = []
+  BorderStyle = bsNone
+  ClientHeight = 246
+  ClientWidth = 247
+  Color = clBtnFace
+  Constraints.MinWidth = 127
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -14
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  OldCreateOrder = False
+  OnActivate = FormActivate
+  OnClose = FormClose
+  OnCreate = FormCreate
+  PixelsPerInch = 120
+  TextHeight = 16
+  object pnlMain: TPanel
+    Left = 0
+    Top = 0
+    Width = 247
+    Height = 246
+    Align = alClient
+    BevelInner = bvLowered
+    BorderWidth = 1
+    TabOrder = 0
+    object pnlBottom: TPanel
+      Left = 3
+      Top = 178
+      Width = 241
+      Height = 65
+      Align = alBottom
+      BevelOuter = bvNone
+      TabOrder = 0
+      OnResize = pnlBottomResize
+      DesignSize = (
+        241
+        65)
+      object btnOK: TButton
+        Left = 85
+        Top = 34
+        Width = 74
+        Height = 25
+        Anchors = [akTop, akRight]
+        Caption = '&OK'
+        Default = True
+        ModalResult = 1
+        TabOrder = 0
+      end
+      object btnCancel: TButton
+        Left = 161
+        Top = 34
+        Width = 74
+        Height = 25
+        Anchors = [akTop, akRight]
+        Cancel = True
+        Caption = '&Cancel'
+        ModalResult = 2
+        TabOrder = 1
+      end
+      object edtQuals: TEdit
+        Left = 9
+        Top = 0
+        Width = 224
+        Height = 24
+        TabOrder = 2
+        Text = 'edtQuals'
+      end
+    end
+  end
+end
Index: cprs/branches/foia-cprs/CPRS-Lib/fGMV_SupO2.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Lib/fGMV_SupO2.dfm	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Lib/fGMV_SupO2.dfm	(revision 460)
@@ -0,0 +1,202 @@
+object frmGMV_SupO2: TfrmGMV_SupO2
+  Left = 815
+  Top = 181
+  BorderIcons = [biSystemMenu]
+  BorderStyle = bsNone
+  Caption = 'frmGMV_SupO2'
+  ClientHeight = 193
+  ClientWidth = 313
+  Color = clBtnFace
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -14
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  OldCreateOrder = False
+  Position = poDefault
+  OnActivate = FormActivate
+  PixelsPerInch = 120
+  TextHeight = 16
+  object pnlMain: TPanel
+    Left = 0
+    Top = 0
+    Width = 313
+    Height = 193
+    Align = alClient
+    BevelInner = bvLowered
+    BorderWidth = 1
+    TabOrder = 0
+    object pnlBottom: TPanel
+      Left = 3
+      Top = 142
+      Width = 307
+      Height = 48
+      Align = alBottom
+      BevelOuter = bvLowered
+      TabOrder = 0
+      DesignSize = (
+        307
+        48)
+      object btnOK: TButton
+        Left = 146
+        Top = 12
+        Width = 73
+        Height = 25
+        Anchors = [akTop, akRight]
+        Caption = 'O&K'
+        ModalResult = 1
+        TabOrder = 0
+        OnClick = btnOKClick
+      end
+      object btnCancel: TButton
+        Left = 223
+        Top = 12
+        Width = 70
+        Height = 25
+        Anchors = [akTop, akRight]
+        Cancel = True
+        Caption = '&Cancel'
+        ModalResult = 2
+        TabOrder = 1
+      end
+    end
+    object Panel1: TPanel
+      Left = 3
+      Top = 30
+      Width = 307
+      Height = 74
+      Align = alTop
+      BevelOuter = bvNone
+      TabOrder = 1
+      object lblFlow: TLabel
+        Left = 9
+        Top = 21
+        Width = 63
+        Height = 16
+        Caption = '&Flow Rate:'
+        FocusControl = edtFlow
+      end
+      object lblO2Con: TLabel
+        Left = 9
+        Top = 50
+        Width = 105
+        Height = 16
+        Caption = '&O2 Concentration:'
+        FocusControl = edtO2Con
+      end
+      object lblPercent: TLabel
+        Left = 117
+        Top = 50
+        Width = 20
+        Height = 16
+        Caption = '(%)'
+        ParentShowHint = False
+        ShowHint = False
+      end
+      object lblLitMin: TLabel
+        Left = 98
+        Top = 21
+        Width = 38
+        Height = 16
+        Hint = 'liters/minute'
+        Caption = '(l/min)'
+        ParentShowHint = False
+        ShowHint = True
+      end
+      object edtFlow: TEdit
+        Left = 146
+        Top = 16
+        Width = 121
+        Height = 24
+        Hint = 'Enter values between 0.5 and 20'
+        MaxLength = 4
+        ParentShowHint = False
+        ShowHint = True
+        TabOrder = 0
+        OnKeyUp = edtFlowKeyUp
+      end
+      object edtO2Con: TEdit
+        Left = 146
+        Top = 46
+        Width = 121
+        Height = 24
+        Hint = 'Enter value between 21 and 100'
+        MaxLength = 3
+        ParentShowHint = False
+        ShowHint = True
+        TabOrder = 1
+        OnKeyUp = edtO2ConKeyUp
+      end
+      object udFlow: TUpDown
+        Left = 271
+        Top = 16
+        Width = 19
+        Height = 26
+        Min = -32768
+        Max = 32767
+        TabOrder = 2
+        OnChangingEx = udFlowChangingEx
+      end
+      object udO2: TUpDown
+        Left = 271
+        Top = 46
+        Width = 19
+        Height = 25
+        Min = -32768
+        Max = 32767
+        TabOrder = 3
+        OnChangingEx = udO2ChangingEx
+      end
+    end
+    object Panel2: TPanel
+      Left = 3
+      Top = 3
+      Width = 307
+      Height = 27
+      Align = alTop
+      BevelInner = bvRaised
+      BevelOuter = bvNone
+      Caption = 'Supplemental Oxygen'
+      TabOrder = 2
+    end
+    object pnlQual: TPanel
+      Left = 3
+      Top = 138
+      Width = 307
+      Height = 4
+      Align = alClient
+      BevelOuter = bvNone
+      TabOrder = 3
+    end
+    object Panel5: TPanel
+      Left = 3
+      Top = 104
+      Width = 307
+      Height = 34
+      Align = alTop
+      BevelOuter = bvNone
+      TabOrder = 4
+      object lblMethodValue: TLabel
+        Left = 10
+        Top = 7
+        Width = 45
+        Height = 16
+        Caption = '&Method'
+        FocusControl = cbMethod
+      end
+      object cbMethod: TComboBox
+        Left = 146
+        Top = 1
+        Width = 147
+        Height = 24
+        Hint = 'Select Method from the list'
+        Style = csDropDownList
+        ItemHeight = 16
+        ParentShowHint = False
+        ShowHint = True
+        TabOrder = 0
+        OnChange = cbMethodChange
+      end
+    end
+  end
+end
Index: cprs/branches/foia-cprs/CPRS-Lib/mGMV_InputOne2.dfm
===================================================================
--- cprs/branches/foia-cprs/CPRS-Lib/mGMV_InputOne2.dfm	(revision 460)
+++ cprs/branches/foia-cprs/CPRS-Lib/mGMV_InputOne2.dfm	(revision 460)
@@ -0,0 +1,262 @@
+object fraGMV_InputOne2: TfraGMV_InputOne2
+  Left = 0
+  Top = 0
+  Width = 854
+  Height = 25
+  TabOrder = 0
+  object pnlMain: TPanel
+    Left = 0
+    Top = 0
+    Width = 854
+    Height = 25
+    Align = alClient
+    BevelOuter = bvNone
+    TabOrder = 0
+    object pnlValues: TPanel
+      Left = 205
+      Top = 0
+      Width = 187
+      Height = 25
+      Align = alLeft
+      BevelOuter = bvNone
+      ParentColor = True
+      TabOrder = 1
+      object lblUnit: TLabel
+        Left = 119
+        Top = 8
+        Width = 29
+        Height = 13
+        Caption = 'lblUnit'
+      end
+      object bvMetric: TBevel
+        Left = 162
+        Top = 4
+        Width = 21
+        Height = 21
+        Shape = bsFrame
+        Visible = False
+      end
+      object cbxInput: TComboBox
+        Left = 1
+        Top = 1
+        Width = 112
+        Height = 21
+        Hint = 'Enter the appropriate vitals measurement'
+        Style = csDropDownList
+        DropDownCount = 12
+        Font.Charset = DEFAULT_CHARSET
+        Font.Color = clBlack
+        Font.Height = -11
+        Font.Name = 'MS Sans Serif'
+        Font.Style = []
+        ItemHeight = 13
+        ParentFont = False
+        ParentShowHint = False
+        ShowHint = True
+        TabOrder = 0
+        OnChange = cbxInputChange
+        OnClick = cbxInputClick
+        OnExit = cbxInputExit
+        OnKeyDown = cbxInputKeyDown
+      end
+      object ckbMetric: TCheckBox
+        Left = 166
+        Top = 6
+        Width = 15
+        Height = 17
+        Hint = 
+          'Check to switch display values between English and Metric equiva' +
+          'lents'
+        ParentShowHint = False
+        ShowHint = True
+        TabOrder = 1
+        OnClick = ckbMetricClick
+        OnEnter = ckbMetricEnter
+        OnExit = ckbMetricExit
+      end
+      object cbxUnits: TComboBox
+        Left = 116
+        Top = 1
+        Width = 69
+        Height = 21
+        Hint = 'Press to select metric'
+        Style = csDropDownList
+        ItemHeight = 13
+        ParentShowHint = False
+        ShowHint = True
+        TabOrder = 2
+        Visible = False
+        OnChange = acMetricChangedExecute
+      end
+    end
+    object pnlRefusedUnavailable: TPanel
+      Left = 0
+      Top = 0
+      Width = 75
+      Height = 25
+      Align = alLeft
+      BevelOuter = bvNone
+      ParentColor = True
+      TabOrder = 0
+      object lblNum: TLabel
+        Left = 0
+        Top = 0
+        Width = 24
+        Height = 25
+        Align = alLeft
+        Alignment = taRightJustify
+        AutoSize = False
+        Caption = '#. '
+        Layout = tlCenter
+      end
+      object bvU: TBevel
+        Left = 28
+        Top = 3
+        Width = 21
+        Height = 21
+        Shape = bsFrame
+        Visible = False
+      end
+      object bvR: TBevel
+        Left = 53
+        Top = 3
+        Width = 21
+        Height = 21
+        Shape = bsFrame
+        Visible = False
+      end
+      object cbxRefused: TCheckBox
+        Left = 54
+        Top = 5
+        Width = 16
+        Height = 17
+        Hint = 'Mark as Refused'
+        Alignment = taLeftJustify
+        ParentShowHint = False
+        ShowHint = True
+        TabOrder = 1
+        OnClick = cbxRefusedClick
+        OnEnter = cbxRefusedEnter
+        OnExit = cbxRefusedExit
+        OnMouseUp = cbxRefusedMouseUp
+      end
+      object cbxUnavailable: TCheckBox
+        Left = 32
+        Top = 5
+        Width = 13
+        Height = 17
+        Hint = 'Mark as Unavailable'
+        Alignment = taLeftJustify
+        ParentShowHint = False
+        ShowHint = True
+        TabOrder = 0
+        OnClick = cbxUnavailableClick
+        OnEnter = cbxUnavailableEnter
+        OnExit = cbxUnavailableExit
+        OnMouseUp = cbxUnavailableMouseUp
+      end
+    end
+    object pnlQualifiers: TPanel
+      Left = 392
+      Top = 0
+      Width = 462
+      Height = 25
+      Align = alClient
+      BevelOuter = bvNone
+      ParentColor = True
+      TabOrder = 2
+      object lblQualifiers: TLabel
+        Left = 28
+        Top = 5
+        Width = 53
+        Height = 13
+        Hint = 'Current qualifiers to be filed with this vital measurement'
+        Caption = 'lblQualifiers'
+        ParentShowHint = False
+        ShowHint = True
+      end
+      object bvQual: TBevel
+        Left = 2
+        Top = 3
+        Width = 23
+        Height = 21
+        Shape = bsFrame
+        Visible = False
+      end
+      object bbtnQualifiers: TBitBtn
+        Left = 5
+        Top = 5
+        Width = 17
+        Height = 16
+        Hint = 'Press to display the qualifier selection screen'
+        ParentShowHint = False
+        ShowHint = True
+        TabOrder = 0
+        OnClick = bbtnQualifiersClick
+        OnEnter = bbtnQualifiersEnter
+        OnExit = bbtnQualifiersExit
+        Glyph.Data = {
+          7E040000424D7E0400000000000036040000280000000B000000060000000100
+          08000000000048000000C40E0000C40E00000001000000000000000000000000
+          80000080000000808000800000008000800080800000C0C0C000C0DCC000F0CA
+          A6000020400000206000002080000020A0000020C0000020E000004000000040
+          20000040400000406000004080000040A0000040C0000040E000006000000060
+          20000060400000606000006080000060A0000060C0000060E000008000000080
+          20000080400000806000008080000080A0000080C0000080E00000A0000000A0
+          200000A0400000A0600000A0800000A0A00000A0C00000A0E00000C0000000C0
+          200000C0400000C0600000C0800000C0A00000C0C00000C0E00000E0000000E0
+          200000E0400000E0600000E0800000E0A00000E0C00000E0E000400000004000
+          20004000400040006000400080004000A0004000C0004000E000402000004020
+          20004020400040206000402080004020A0004020C0004020E000404000004040
+          20004040400040406000404080004040A0004040C0004040E000406000004060
+          20004060400040606000406080004060A0004060C0004060E000408000004080
+          20004080400040806000408080004080A0004080C0004080E00040A0000040A0
+          200040A0400040A0600040A0800040A0A00040A0C00040A0E00040C0000040C0
+          200040C0400040C0600040C0800040C0A00040C0C00040C0E00040E0000040E0
+          200040E0400040E0600040E0800040E0A00040E0C00040E0E000800000008000
+          20008000400080006000800080008000A0008000C0008000E000802000008020
+          20008020400080206000802080008020A0008020C0008020E000804000008040
+          20008040400080406000804080008040A0008040C0008040E000806000008060
+          20008060400080606000806080008060A0008060C0008060E000808000008080
+          20008080400080806000808080008080A0008080C0008080E00080A0000080A0
+          200080A0400080A0600080A0800080A0A00080A0C00080A0E00080C0000080C0
+          200080C0400080C0600080C0800080C0A00080C0C00080C0E00080E0000080E0
+          200080E0400080E0600080E0800080E0A00080E0C00080E0E000C0000000C000
+          2000C0004000C0006000C0008000C000A000C000C000C000E000C0200000C020
+          2000C0204000C0206000C0208000C020A000C020C000C020E000C0400000C040
+          2000C0404000C0406000C0408000C040A000C040C000C040E000C0600000C060
+          2000C0604000C0606000C0608000C060A000C060C000C060E000C0800000C080
+          2000C0804000C0806000C0808000C080A000C080C000C080E000C0A00000C0A0
+          2000C0A04000C0A06000C0A08000C0A0A000C0A0C000C0A0E000C0C00000C0C0
+          2000C0C04000C0C06000C0C08000C0C0A000F0FBFF00A4A0A000808080000000
+          FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00FAFAFAFAFA00
+          FAFAFAFAFA00FAFAFAFA000000FAFAFAFA00FAFAFA0000000000FAFAFA00FAFA
+          00000000000000FAFA00FA000000000000000000FA0000000000000000000000
+          0000}
+      end
+    end
+    object pnlName: TPanel
+      Left = 75
+      Top = 0
+      Width = 130
+      Height = 25
+      Align = alLeft
+      BevelOuter = bvNone
+      ParentColor = True
+      TabOrder = 3
+      object lblVital: TLabel
+        Left = 0
+        Top = 0
+        Width = 113
+        Height = 25
+        Hint = 'Display name of the vitals measurement'
+        Align = alLeft
+        AutoSize = False
+        Caption = 'lblVital'
+        ParentShowHint = False
+        ShowHint = True
+        Layout = tlCenter
+      end
+    end
+  end
+end
Index: cprs/branches/foia-cprs/Packages/ORCtrlLib60.map
===================================================================
--- cprs/branches/foia-cprs/Packages/ORCtrlLib60.map	(revision 459)
+++ cprs/branches/foia-cprs/Packages/ORCtrlLib60.map	(revision 460)
@@ -1,5 +1,5 @@
 
  Start         Length     Name                   Class
- 0001:00000000 0001342CH .text                   CODE
+ 0001:00000000 00013550H .text                   CODE
  0002:00000000 00000264H .data                   DATA
  0002:00000264 000000B9H .bss                    BSS
@@ -12,10 +12,10 @@
  0001:000003EC 0000018C C=CODE     S=.text    G=(none)   M=Windows  ACBP=A9
  0001:00000578 0000000E C=CODE     S=.text    G=(none)   M=Types    ACBP=A9
- 0001:00000588 00000038 C=CODE     S=.text    G=(none)   M=Messages ACBP=A9
- 0001:000005C0 00000076 C=CODE     S=.text    G=(none)   M=SysUtils ACBP=A9
- 0001:00000638 0000000E C=CODE     S=.text    G=(none)   M=SysConst ACBP=A9
- 0001:00000648 0000017E C=CODE     S=.text    G=(none)   M=Classes  ACBP=A9
- 0001:000007C8 0000000E C=CODE     S=.text    G=(none)   M=ActiveX  ACBP=A9
- 0001:000007D8 0000000E C=CODE     S=.text    G=(none)   M=TypInfo  ACBP=A9
+ 0001:00000588 0000000E C=CODE     S=.text    G=(none)   M=ActiveX  ACBP=A9
+ 0001:00000598 00000038 C=CODE     S=.text    G=(none)   M=Messages ACBP=A9
+ 0001:000005D0 0000017E C=CODE     S=.text    G=(none)   M=Classes  ACBP=A9
+ 0001:00000750 0000000E C=CODE     S=.text    G=(none)   M=TypInfo  ACBP=A9
+ 0001:00000760 00000076 C=CODE     S=.text    G=(none)   M=SysUtils ACBP=A9
+ 0001:000007D8 0000000E C=CODE     S=.text    G=(none)   M=SysConst ACBP=A9
  0001:000007E8 00000016 C=CODE     S=.text    G=(none)   M=Variants ACBP=A9
  0001:00000800 0000000E C=CODE     S=.text    G=(none)   M=VarUtils ACBP=A9
@@ -23,60 +23,60 @@
  0001:00000820 0000008E C=CODE     S=.text    G=(none)   M=Graphics ACBP=A9
  0001:000008B0 0000000E C=CODE     S=.text    G=(none)   M=Consts   ACBP=A9
- 0001:000008C0 00000456 C=CODE     S=.text    G=(none)   M=Controls ACBP=A9
- 0001:00000D18 0000000E C=CODE     S=.text    G=(none)   M=ActnList ACBP=A9
- 0001:00000D28 0000000E C=CODE     S=.text    G=(none)   M=Contnrs  ACBP=A9
- 0001:00000D38 0000000E C=CODE     S=.text    G=(none)   M=Math     ACBP=A9
- 0001:00000D48 0000002E C=CODE     S=.text    G=(none)   M=ImgList  ACBP=A9
- 0001:00000D78 00000068 C=CODE     S=.text    G=(none)   M=CommCtrl ACBP=A9
- 0001:00000DE0 0000000E C=CODE     S=.text    G=(none)   M=Forms    ACBP=A9
- 0001:00000DF0 0000000E C=CODE     S=.text    G=(none)   M=HelpIntfs ACBP=A9
- 0001:00000E00 0000000E C=CODE     S=.text    G=(none)   M=MultiMon ACBP=A9
- 0001:00000E10 00000038 C=CODE     S=.text    G=(none)   M=Imm      ACBP=A9
- 0001:00000E48 000000B6 C=CODE     S=.text    G=(none)   M=Menus    ACBP=A9
- 0001:00000F00 0000000E C=CODE     S=.text    G=(none)   M=WinHelpViewer ACBP=A9
- 0001:00000F10 0000000E C=CODE     S=.text    G=(none)   M=StdActns ACBP=A9
- 0001:00000F20 0000000E C=CODE     S=.text    G=(none)   M=Dialogs  ACBP=A9
- 0001:00000F30 00000038 C=CODE     S=.text    G=(none)   M=ShlObj   ACBP=A9
- 0001:00000F68 00000038 C=CODE     S=.text    G=(none)   M=UrlMon   ACBP=A9
- 0001:00000FA0 00000038 C=CODE     S=.text    G=(none)   M=WinInet  ACBP=A9
- 0001:00000FD8 00000038 C=CODE     S=.text    G=(none)   M=RegStr   ACBP=A9
- 0001:00001010 00000038 C=CODE     S=.text    G=(none)   M=ShellAPI ACBP=A9
- 0001:00001048 0000000E C=CODE     S=.text    G=(none)   M=Printers ACBP=A9
- 0001:00001058 00000038 C=CODE     S=.text    G=(none)   M=WinSpool ACBP=A9
- 0001:00001090 0000039E C=CODE     S=.text    G=(none)   M=StdCtrls ACBP=A9
- 0001:00001430 00000038 C=CODE     S=.text    G=(none)   M=CommDlg  ACBP=A9
- 0001:00001468 00000038 C=CODE     S=.text    G=(none)   M=Dlgs     ACBP=A9
- 0001:000014A0 00000086 C=CODE     S=.text    G=(none)   M=ExtCtrls ACBP=A9
- 0001:00001528 0000000E C=CODE     S=.text    G=(none)   M=StrUtils ACBP=A9
- 0001:00001538 0000000E C=CODE     S=.text    G=(none)   M=Clipbrd  ACBP=A9
- 0001:00001548 0000000E C=CODE     S=.text    G=(none)   M=FlatSB   ACBP=A9
- 0001:00001558 00000336 C=CODE     S=.text    G=(none)   M=ComCtrls ACBP=A9
- 0001:00001890 0000000E C=CODE     S=.text    G=(none)   M=ListActns ACBP=A9
- 0001:000018A0 0000000E C=CODE     S=.text    G=(none)   M=ToolWin  ACBP=A9
- 0001:000018B0 00000038 C=CODE     S=.text    G=(none)   M=RichEdit ACBP=A9
- 0001:000018E8 0000000E C=CODE     S=.text    G=(none)   M=ExtActns ACBP=A9
- 0001:000018F8 0000000E C=CODE     S=.text    G=(none)   M=Registry ACBP=A9
- 0001:00001908 0000000E C=CODE     S=.text    G=(none)   M=IniFiles ACBP=A9
- 0001:00001918 0000000E C=CODE     S=.text    G=(none)   M=ExtDlgs  ACBP=A9
- 0001:00001928 00000056 C=CODE     S=.text    G=(none)   M=Buttons  ACBP=A9
- 0001:00001980 0000000E C=CODE     S=.text    G=(none)   M=Mapi     ACBP=A9
- 0001:00001990 0000000E C=CODE     S=.text    G=(none)   M=ComStrs  ACBP=A9
- 0001:000019A0 0000006E C=CODE     S=.text    G=(none)   M=Grids    ACBP=A9
- 0001:00001A10 0000000E C=CODE     S=.text    G=(none)   M=Mask     ACBP=A9
- 0001:00001A20 0000000E C=CODE     S=.text    G=(none)   M=MaskUtils ACBP=A9
- 0001:00001A30 0000003E C=CODE     S=.text    G=(none)   M=CheckLst ACBP=A9
- 0001:00001A70 0000000E C=CODE     S=.text    G=(none)   M=StdVCL   ACBP=A9
- 0001:00001A80 0000000E C=CODE     S=.text    G=(none)   M=ComObj   ACBP=A9
- 0001:00001A90 0000000E C=CODE     S=.text    G=(none)   M=ComConst ACBP=A9
- 0001:00001AA0 000000F8 C=CODE     S=.text    G=(none)   M=Accessibility_TLB ACBP=A9
- 0001:00001B98 000001D0 C=CODE     S=.text    G=(none)   M=uAccessAPI ACBP=A9
- 0001:00001D68 00010C8F C=CODE     S=.text    G=(none)   M=ORCtrls  ACBP=A9
- 0001:000129F8 00000016 C=CODE     S=.text    G=(none)   M=DesignIntf ACBP=A9
- 0001:00012A10 0000000E C=CODE     S=.text    G=(none)   M=DesignMenus ACBP=A9
- 0001:00012A20 000000A6 C=CODE     S=.text    G=(none)   M=DesignEditors ACBP=A9
- 0001:00012AC8 0000000E C=CODE     S=.text    G=(none)   M=Proxies  ACBP=A9
- 0001:00012AD8 0000000E C=CODE     S=.text    G=(none)   M=DesignConst ACBP=A9
- 0001:00012AE8 000006DC C=CODE     S=.text    G=(none)   M=ORCtrlsDsgn ACBP=A9
- 0001:000131C4 00000265 C=CODE     S=.text    G=(none)   M=ORCtrlLib60 ACBP=A9
+ 0001:000008C0 0000000E C=CODE     S=.text    G=(none)   M=StdVCL   ACBP=A9
+ 0001:000008D0 0000000E C=CODE     S=.text    G=(none)   M=ComObj   ACBP=A9
+ 0001:000008E0 0000000E C=CODE     S=.text    G=(none)   M=ComConst ACBP=A9
+ 0001:000008F0 000000F8 C=CODE     S=.text    G=(none)   M=Accessibility_TLB ACBP=A9
+ 0001:000009E8 0000045E C=CODE     S=.text    G=(none)   M=Controls ACBP=A9
+ 0001:00000E48 0000000E C=CODE     S=.text    G=(none)   M=ActnList ACBP=A9
+ 0001:00000E58 0000000E C=CODE     S=.text    G=(none)   M=Contnrs  ACBP=A9
+ 0001:00000E68 0000000E C=CODE     S=.text    G=(none)   M=Math     ACBP=A9
+ 0001:00000E78 0000002E C=CODE     S=.text    G=(none)   M=ImgList  ACBP=A9
+ 0001:00000EA8 00000068 C=CODE     S=.text    G=(none)   M=CommCtrl ACBP=A9
+ 0001:00000F10 00000016 C=CODE     S=.text    G=(none)   M=Forms    ACBP=A9
+ 0001:00000F28 0000000E C=CODE     S=.text    G=(none)   M=HelpIntfs ACBP=A9
+ 0001:00000F38 0000000E C=CODE     S=.text    G=(none)   M=MultiMon ACBP=A9
+ 0001:00000F48 00000038 C=CODE     S=.text    G=(none)   M=Imm      ACBP=A9
+ 0001:00000F80 000000B6 C=CODE     S=.text    G=(none)   M=Menus    ACBP=A9
+ 0001:00001038 0000000E C=CODE     S=.text    G=(none)   M=WinHelpViewer ACBP=A9
+ 0001:00001048 0000000E C=CODE     S=.text    G=(none)   M=StdActns ACBP=A9
+ 0001:00001058 0000000E C=CODE     S=.text    G=(none)   M=Dialogs  ACBP=A9
+ 0001:00001068 00000038 C=CODE     S=.text    G=(none)   M=ShlObj   ACBP=A9
+ 0001:000010A0 00000038 C=CODE     S=.text    G=(none)   M=UrlMon   ACBP=A9
+ 0001:000010D8 00000038 C=CODE     S=.text    G=(none)   M=WinInet  ACBP=A9
+ 0001:00001110 00000038 C=CODE     S=.text    G=(none)   M=RegStr   ACBP=A9
+ 0001:00001148 00000038 C=CODE     S=.text    G=(none)   M=ShellAPI ACBP=A9
+ 0001:00001180 0000000E C=CODE     S=.text    G=(none)   M=Printers ACBP=A9
+ 0001:00001190 00000038 C=CODE     S=.text    G=(none)   M=WinSpool ACBP=A9
+ 0001:000011C8 0000039E C=CODE     S=.text    G=(none)   M=StdCtrls ACBP=A9
+ 0001:00001568 00000038 C=CODE     S=.text    G=(none)   M=CommDlg  ACBP=A9
+ 0001:000015A0 00000038 C=CODE     S=.text    G=(none)   M=Dlgs     ACBP=A9
+ 0001:000015D8 00000086 C=CODE     S=.text    G=(none)   M=ExtCtrls ACBP=A9
+ 0001:00001660 0000000E C=CODE     S=.text    G=(none)   M=StrUtils ACBP=A9
+ 0001:00001670 0000000E C=CODE     S=.text    G=(none)   M=Clipbrd  ACBP=A9
+ 0001:00001680 0000000E C=CODE     S=.text    G=(none)   M=FlatSB   ACBP=A9
+ 0001:00001690 00000336 C=CODE     S=.text    G=(none)   M=ComCtrls ACBP=A9
+ 0001:000019C8 0000000E C=CODE     S=.text    G=(none)   M=ListActns ACBP=A9
+ 0001:000019D8 0000000E C=CODE     S=.text    G=(none)   M=ToolWin  ACBP=A9
+ 0001:000019E8 00000038 C=CODE     S=.text    G=(none)   M=RichEdit ACBP=A9
+ 0001:00001A20 0000000E C=CODE     S=.text    G=(none)   M=ExtActns ACBP=A9
+ 0001:00001A30 0000000E C=CODE     S=.text    G=(none)   M=Registry ACBP=A9
+ 0001:00001A40 0000000E C=CODE     S=.text    G=(none)   M=IniFiles ACBP=A9
+ 0001:00001A50 0000000E C=CODE     S=.text    G=(none)   M=ExtDlgs  ACBP=A9
+ 0001:00001A60 00000056 C=CODE     S=.text    G=(none)   M=Buttons  ACBP=A9
+ 0001:00001AB8 0000000E C=CODE     S=.text    G=(none)   M=Mapi     ACBP=A9
+ 0001:00001AC8 0000000E C=CODE     S=.text    G=(none)   M=ComStrs  ACBP=A9
+ 0001:00001AD8 000001D0 C=CODE     S=.text    G=(none)   M=uAccessAPI ACBP=A9
+ 0001:00001CA8 0000006E C=CODE     S=.text    G=(none)   M=Grids    ACBP=A9
+ 0001:00001D18 0000000E C=CODE     S=.text    G=(none)   M=Mask     ACBP=A9
+ 0001:00001D28 0000000E C=CODE     S=.text    G=(none)   M=MaskUtils ACBP=A9
+ 0001:00001D38 0000003E C=CODE     S=.text    G=(none)   M=CheckLst ACBP=A9
+ 0001:00001D78 00010DA3 C=CODE     S=.text    G=(none)   M=ORCtrls  ACBP=A9
+ 0001:00012B1C 00000016 C=CODE     S=.text    G=(none)   M=DesignIntf ACBP=A9
+ 0001:00012B34 0000000E C=CODE     S=.text    G=(none)   M=DesignMenus ACBP=A9
+ 0001:00012B44 000000A6 C=CODE     S=.text    G=(none)   M=DesignEditors ACBP=A9
+ 0001:00012BEC 0000000E C=CODE     S=.text    G=(none)   M=Proxies  ACBP=A9
+ 0001:00012BFC 0000000E C=CODE     S=.text    G=(none)   M=DesignConst ACBP=A9
+ 0001:00012C0C 000006DC C=CODE     S=.text    G=(none)   M=ORCtrlsDsgn ACBP=A9
+ 0001:000132E8 00000265 C=CODE     S=.text    G=(none)   M=ORCtrlLib60 ACBP=A9
  0002:00000000 00000028 C=DATA     S=.data    G=DGROUP   M=SysInit  ACBP=A9
  0002:00000028 00000030 C=DATA     S=.data    G=DGROUP   M=Accessibility_TLB ACBP=A9
@@ -85,16 +85,16 @@
  0002:00001018 00000004 C=BSS      S=.bss     G=DGROUP   M=Windows  ACBP=A9
  0002:0000101C 00000004 C=BSS      S=.bss     G=DGROUP   M=Messages ACBP=A9
- 0002:00001020 00000004 C=BSS      S=.bss     G=DGROUP   M=CommCtrl ACBP=A9
- 0002:00001024 00000004 C=BSS      S=.bss     G=DGROUP   M=Imm      ACBP=A9
- 0002:00001028 00000004 C=BSS      S=.bss     G=DGROUP   M=ShlObj   ACBP=A9
- 0002:0000102C 00000004 C=BSS      S=.bss     G=DGROUP   M=UrlMon   ACBP=A9
- 0002:00001030 00000004 C=BSS      S=.bss     G=DGROUP   M=WinInet  ACBP=A9
- 0002:00001034 00000004 C=BSS      S=.bss     G=DGROUP   M=RegStr   ACBP=A9
- 0002:00001038 00000004 C=BSS      S=.bss     G=DGROUP   M=ShellAPI ACBP=A9
- 0002:0000103C 00000004 C=BSS      S=.bss     G=DGROUP   M=WinSpool ACBP=A9
- 0002:00001040 00000004 C=BSS      S=.bss     G=DGROUP   M=CommDlg  ACBP=A9
- 0002:00001044 00000004 C=BSS      S=.bss     G=DGROUP   M=Dlgs     ACBP=A9
- 0002:00001048 00000004 C=BSS      S=.bss     G=DGROUP   M=RichEdit ACBP=A9
- 0002:0000104C 00000004 C=BSS      S=.bss     G=DGROUP   M=Accessibility_TLB ACBP=A9
+ 0002:00001020 00000004 C=BSS      S=.bss     G=DGROUP   M=Accessibility_TLB ACBP=A9
+ 0002:00001024 00000004 C=BSS      S=.bss     G=DGROUP   M=CommCtrl ACBP=A9
+ 0002:00001028 00000004 C=BSS      S=.bss     G=DGROUP   M=Imm      ACBP=A9
+ 0002:0000102C 00000004 C=BSS      S=.bss     G=DGROUP   M=ShlObj   ACBP=A9
+ 0002:00001030 00000004 C=BSS      S=.bss     G=DGROUP   M=UrlMon   ACBP=A9
+ 0002:00001034 00000004 C=BSS      S=.bss     G=DGROUP   M=WinInet  ACBP=A9
+ 0002:00001038 00000004 C=BSS      S=.bss     G=DGROUP   M=RegStr   ACBP=A9
+ 0002:0000103C 00000004 C=BSS      S=.bss     G=DGROUP   M=ShellAPI ACBP=A9
+ 0002:00001040 00000004 C=BSS      S=.bss     G=DGROUP   M=WinSpool ACBP=A9
+ 0002:00001044 00000004 C=BSS      S=.bss     G=DGROUP   M=CommDlg  ACBP=A9
+ 0002:00001048 00000004 C=BSS      S=.bss     G=DGROUP   M=Dlgs     ACBP=A9
+ 0002:0000104C 00000004 C=BSS      S=.bss     G=DGROUP   M=RichEdit ACBP=A9
  0002:00001050 00000010 C=BSS      S=.bss     G=DGROUP   M=uAccessAPI ACBP=A9
  0002:00001060 00000054 C=BSS      S=.bss     G=DGROUP   M=ORCtrls  ACBP=A9
@@ -104,30 +104,30 @@
   Address         Publics by Name
 
+ 0002:0000103C       .1
+ 0002:00001024       .1
  0002:0000104C       .1
+ 0002:00001028       .1
+ 0002:00001020       .1
+ 0002:0000102C       .1
+ 0002:00001034       .1
+ 0002:00001038       .1
+ 0002:00001030       .1
  0002:00001044       .1
- 0002:00001020       .1
+ 0002:00001010       .1
  0002:00001048       .1
- 0002:00001040       .1
- 0002:00001010       .1
- 0002:00001024       .1
- 0002:00001038       .1
- 0002:00001034       .1
+ 0002:00001050       .1
  0002:0000101C       .1
- 0002:00001050       .1
- 0002:00001028       .1
- 0002:00001030       .1
- 0002:0000102C       .1
  0002:00001060       .13
- 0002:0000103C       .3
+ 0002:000010B4       .3
  0002:00001018       .3
- 0002:000010B4       .3
- 0001:00013404       @GetPackageInfoTable
+ 0002:00001040       .3
+ 0001:00013528       @GetPackageInfoTable
  0001:00000338       @InitPkg
- 0001:0001340C       @PackageLoad
  0001:0000039C       @PackageLoad
- 0001:00013418       @PackageUnload
+ 0001:00013530       @PackageLoad
  0001:000003A8       @PackageUnload
- 0001:00001B90       Accessibility_TLB
- 0001:000068A0       AddItemTipRef
+ 0001:0001353C       @PackageUnload
+ 0001:000009E0       Accessibility_TLB
+ 0001:000068E0       AddItemTipRef
  0001:00000238       AllocTlsBuffer
  0002:00000058       ALPHA_DISTRIBUTION
@@ -135,50 +135,50 @@
  0002:00000248       ButtonLayout
  0002:00000240       ButtonWordWrap
- 0001:0000F744       CalcShortName
+ 0001:0000F784       CalcShortName
  0001:00000434       CallNextHookEx
  0002:000001EC       CheckBoxImageResNames
- 0001:0000AF0C       ClearLong
- 0001:000062A0       ClientWidthOfList
+ 0001:0000AF4C       ClearLong
+ 0001:000062E0       ClientWidthOfList
  0002:0000022C       ComboBoxImages
- 0001:00000DD8       CommCtrl
- 0001:00001460       CommDlg
+ 0001:00000F08       CommCtrl
+ 0001:00001598       CommDlg
  0002:00001054       CreateStdAccessibleObject
- 0001:0000711C       DestroyORCBBitmaps
- 0001:00001498       Dlgs
+ 0001:0000715C       DestroyORCBBitmaps
+ 0001:000015D0       Dlgs
  0001:0000043C       DrawText
- 0001:00011810       EnableCtrl
+ 0001:00011850       EnableCtrl
  0001:000002E4       ExitProcessTLS
  0001:000002BC       ExitThreadTLS
- 0001:00001B60       Finalization
+ 0001:000019E8       Finalization
+ 0001:000015A0       Finalization
  0001:00000540       Finalization
- 0001:00000588       Finalization
- 0001:00000DA8       Finalization
- 0001:00000E10       Finalization
- 0001:00000F30       Finalization
- 0001:00000F68       Finalization
- 0001:00012970       Finalization
- 0001:00000FA0       Finalization
- 0001:0001318C       Finalization
- 0001:00000FD8       Finalization
- 0001:00001C88       Finalization
- 0001:00001010       Finalization
- 0001:00001058       Finalization
- 0001:00001430       Finalization
- 0001:00001468       Finalization
+ 0001:00000598       Finalization
+ 0001:000009B0       Finalization
+ 0001:00000ED8       Finalization
+ 0001:00000F48       Finalization
+ 0001:00001068       Finalization
+ 0001:000010A0       Finalization
  0001:000003B4       Finalization
- 0001:000018B0       Finalization
- 0001:000063F0       FontHeightPixel
- 0001:000062E4       FontWidthPixel
+ 0001:000010D8       Finalization
+ 0001:00001110       Finalization
+ 0001:00001BC8       Finalization
+ 0001:00012A94       Finalization
+ 0001:000132B0       Finalization
+ 0001:00001148       Finalization
+ 0001:00001190       Finalization
+ 0001:00001568       Finalization
+ 0001:00006430       FontHeightPixel
+ 0001:00006324       FontWidthPixel
+ 0001:00000200       FreeLibrary
  0001:000003EC       FreeLibrary
- 0001:00000200       FreeLibrary
  0001:000003F4       GetCurrentThreadId
  0001:00000444       GetCursorPos
  0001:0000044C       GetDC
- 0001:00001BDC       GetDefaultObject
- 0001:00001B98       GetDefaultObject
+ 0001:00001B1C       GetDefaultObject
+ 0001:00001AD8       GetDefaultObject
  0001:00000454       GetDesktopWindow
  0001:0000045C       GetKeyState
- 0001:00001C20       GetLResult
- 0001:00007090       GetORCBBitmap
+ 0001:00001B60       GetLResult
+ 0001:000070D0       GetORCBBitmap
  0001:000003FC       GetProcAddress
  0001:00000464       GetScrollPos
@@ -190,20 +190,20 @@
  0001:00000404       GetVersion
  0001:0000047C       GetWindowDC
- 0001:00012560       GoodNotifyWinEvent
+ 0001:00012684       GoodNotifyWinEvent
  0001:00000484       HideCaret
- 0001:00006434       HigherOf
+ 0001:00006474       HigherOf
  0002:0000100C       HInstance
  0002:00000038       IID_IAccessible
  0002:00000048       IID_IAccessibleHandler
- 0001:00000E40       Imm
+ 0001:00000F78       Imm
  0001:0000048C       InflateRect
  0001:00000308       InitializeModule
  0001:00000290       InitProcessTLS
  0001:0000024C       InitThreadTLS
- 0001:000065F0       IntArrayToString
+ 0001:00006630       IntArrayToString
  0001:00000494       IntersectRect
  0001:0000049C       InvalidateRect
- 0001:00012790       IsAMouseButtonDown
- 0001:0000686C       ItemTipKeyHook
+ 0001:000128B4       IsAMouseButtonDown
+ 0001:000068AC       ItemTipKeyHook
  0001:000004A4       KillTimer
  0002:00000028       LIBID_Accessibility
@@ -211,10 +211,10 @@
  0001:00000208       LocalAlloc
  0001:00000210       LocalFree
- 0001:00006440       LowerOf
+ 0001:00006480       LowerOf
  0002:00001058       LresultFromObject
  0001:0000050C       MakeLong
  0001:00000538       MakeLParam
  0001:00000530       MakeWParam
- 0001:000005B8       Messages
+ 0001:000005C8       Messages
  0002:00000000       Module
  0002:00001000       ModuleIsLib
@@ -223,66 +223,68 @@
  0002:0000105C       OleAccHandle
  0002:00001074       ORCBImages
- 0001:00013424       ORCtrlLib60
- 0001:000129BC       ORCtrls
- 0001:000131BC       ORCtrlsDsgn
- 0001:0000644C       Piece
+ 0001:00013548       ORCtrlLib60
+ 0001:00012AE0       ORCtrls
+ 0001:000132E0       ORCtrlsDsgn
+ 0001:0000648C       Piece
  0001:00000518       PointToSmallPoint
  0001:000004B4       PostMessage
  0001:000004BC       PtInRect
- 0001:0001307C       Register
- 0001:00001008       RegStr
+ 0001:000131A0       Register
+ 0001:00001140       RegStr
  0001:000004C4       ReleaseDC
- 0001:000068D8       RemoveItemTipRef
- 0001:000018E0       RichEdit
- 0001:00010378       RStr
+ 0001:00006918       RemoveItemTipRef
+ 0001:00001A18       RichEdit
+ 0001:000103B8       RStr
  0001:00000424       SelectObject
  0001:000004CC       SendMessage
  0001:0000042C       SetBkMode
- 0001:000064CC       SetPiece
+ 0001:0000650C       SetPiece
  0001:000004D4       SetTimer
  0001:000004DC       SetWindowPos
  0001:000004E4       SetWindowsHookEx
- 0001:00001040       ShellAPI
- 0001:00000F60       ShlObj
+ 0001:00001178       ShellAPI
+ 0001:00001098       ShlObj
  0001:000004EC       ShowWindow
- 0001:00006834       StringBetween
- 0001:000066C0       StringToIntArray
+ 0001:00006874       StringBetween
+ 0001:00006700       StringToIntArray
  0001:000003E4       SysInit
  0001:000004F4       SystemParametersInfo
  0001:000004FC       TabbedTextOut
- 0001:00012084       TCaptionCheckListBox.GetCaption
- 0001:000120B0       TCaptionCheckListBox.SetCaption
- 0001:00012438       TCaptionComboBox.GetCaption
- 0001:00012464       TCaptionComboBox.SetCaption
- 0001:000121E4       TCaptionEdit.GetCaption
- 0001:00012210       TCaptionEdit.SetCaption
- 0001:00011DA0       TCaptionListBox.GetCaption
- 0001:00011DCC       TCaptionListBox.MakeAccessible
- 0001:00011E94       TCaptionListBox.SetCaption
- 0001:00011F18       TCaptionListBox.WMGetObject
- 0001:00011F50       TCaptionListBox.WMRButtonUp
- 0001:00012134       TCaptionMemo.GetCaption
- 0001:00012160       TCaptionMemo.SetCaption
- 0001:00012294       TCaptionRichEdit.MakeAccessible
- 0001:00012358       TCaptionRichEdit.WMGetObject
- 0001:00012568       TCaptionStringGrid.ColRowToIndex
- 0001:000125B8       TCaptionStringGrid.IndexToColRow
- 0001:0001261C       TCaptionStringGrid.KeyUp
- 0001:00012694       TCaptionStringGrid.MakeAccessible
- 0001:00012758       TCaptionStringGrid.WMGetObject
- 0001:00012390       TCaptionTreeView.GetCaption
- 0001:000123A8       TCaptionTreeView.SetCaption
- 0001:00006908       TItemTip.Create
- 0001:00006998       TItemTip.CreateParams
- 0001:0000695C       TItemTip.Destroy
- 0001:00006AF0       TItemTip.GetTabSettings
- 0001:00006AAC       TItemTip.Hide
- 0001:000069C4       TItemTip.Paint
- 0001:00006EC0       TItemTip.Show
- 0001:00006C1C       TItemTip.UpdateText
- 0001:00011C70       TKeyClickPanel.KeyDown
- 0001:00011C98       TKeyClickRadioGroup.Click
- 0001:00011CD0       TKeyClickRadioGroup.Create
- 0001:00011D30       TKeyClickRadioGroup.KeyDown
+ 0001:000121A8       TCaptionCheckListBox.GetCaption
+ 0001:000121D4       TCaptionCheckListBox.SetCaption
+ 0001:0001255C       TCaptionComboBox.GetCaption
+ 0001:00012588       TCaptionComboBox.SetCaption
+ 0001:00012308       TCaptionEdit.GetCaption
+ 0001:00012334       TCaptionEdit.SetCaption
+ 0001:00011DE0       TCaptionListBox.DoEnter
+ 0001:00011E04       TCaptionListBox.GetCaption
+ 0001:00011E30       TCaptionListBox.MakeAccessible
+ 0001:00011EF8       TCaptionListBox.SetCaption
+ 0001:00011F7C       TCaptionListBox.WMGetObject
+ 0001:00011FB4       TCaptionListBox.WMMouseMove
+ 0001:00012074       TCaptionListBox.WMRButtonUp
+ 0001:00012258       TCaptionMemo.GetCaption
+ 0001:00012284       TCaptionMemo.SetCaption
+ 0001:000123B8       TCaptionRichEdit.MakeAccessible
+ 0001:0001247C       TCaptionRichEdit.WMGetObject
+ 0001:0001268C       TCaptionStringGrid.ColRowToIndex
+ 0001:000126DC       TCaptionStringGrid.IndexToColRow
+ 0001:00012740       TCaptionStringGrid.KeyUp
+ 0001:000127B8       TCaptionStringGrid.MakeAccessible
+ 0001:0001287C       TCaptionStringGrid.WMGetObject
+ 0001:000124B4       TCaptionTreeView.GetCaption
+ 0001:000124CC       TCaptionTreeView.SetCaption
+ 0001:00006948       TItemTip.Create
+ 0001:000069D8       TItemTip.CreateParams
+ 0001:0000699C       TItemTip.Destroy
+ 0001:00006B30       TItemTip.GetTabSettings
+ 0001:00006AEC       TItemTip.Hide
+ 0001:00006A04       TItemTip.Paint
+ 0001:00006F00       TItemTip.Show
+ 0001:00006C5C       TItemTip.UpdateText
+ 0001:00011CB0       TKeyClickPanel.KeyDown
+ 0001:00011CD8       TKeyClickRadioGroup.Click
+ 0001:00011D10       TKeyClickRadioGroup.Create
+ 0001:00011D70       TKeyClickRadioGroup.KeyDown
  0001:00000218       TlsAlloc
  0002:00001014       tlsBuffer
@@ -293,375 +295,375 @@
  0002:00000018       TlsProc
  0001:00000230       TlsSetValue
- 0001:0000F25C       TORAlignButton.Create
- 0001:0000F2AC       TORAlignButton.CreateParams
- 0001:0000F2F8       TORAlignButton.SetAlignment
- 0001:0000F310       TORAlignButton.SetLayout
- 0001:0000F328       TORAlignButton.SetWordWrap
- 0001:000124E8       TORAlignSpeedButton.Paint
- 0001:0000EC68       TORAutoPanel.BuildSizes
- 0001:0000EBF0       TORAutoPanel.Destroy
- 0001:0000ED94       TORAutoPanel.DoResize
- 0001:0000ED60       TORAutoPanel.Loaded
- 0001:0000EF3C       TORAutoPanel.Resize
- 0001:00010280       TORCBImageIndexes.Create
- 0001:00010304       TORCBImageIndexes.Destroy
- 0001:000103B4       TORCBImageIndexes.IdxString
- 0001:000105F8       TORCBImageIndexes.ImageListChanged
- 0001:0001062C       TORCBImageIndexes.Notification
- 0001:0001065C       TORCBImageIndexes.SetCheckedDisabledIndex
- 0001:00010670       TORCBImageIndexes.SetCheckedEnabledIndex
- 0001:00010684       TORCBImageIndexes.SetGrayedDisabledIndex
- 0001:00010698       TORCBImageIndexes.SetGrayedEnabledIndex
- 0001:00010498       TORCBImageIndexes.SetIdxString
- 0001:00010338       TORCBImageIndexes.SetImages
- 0001:000106AC       TORCBImageIndexes.SetUncheckedDisabledIndex
- 0001:000106C0       TORCBImageIndexes.SetUncheckedEnabledIndex
- 0001:0001149C       TORCheckBox.AutoAdjustSize
- 0001:00011910       TORCheckBox.BMGetCheck
- 0001:0001193C       TORCheckBox.BMGetState
- 0001:00011348       TORCheckBox.BMSetCheck
- 0001:000108E4       TORCheckBox.CMEnabledChanged
- 0001:000108FC       TORCheckBox.CMFontChanged
- 0001:00010914       TORCheckBox.CNDrawItem
- 0001:00010930       TORCheckBox.CNMeasureItem
- 0001:000106D4       TORCheckBox.Create
- 0001:0001077C       TORCheckBox.CreateCommon
- 0001:000108C8       TORCheckBox.CreateParams
- 0001:000107AC       TORCheckBox.Destroy
- 0001:00010EFC       TORCheckBox.DrawItem
- 0001:00011670       TORCheckBox.GetCaption
- 0001:00010954       TORCheckBox.GetDrawData
- 0001:000107F4       TORCheckBox.GetImageIndexes
- 0001:00010810       TORCheckBox.GetImageList
- 0001:00010730       TORCheckBox.ListViewCreate
- 0001:000118CC       TORCheckBox.Notification
- 0001:000116F0       TORCheckBox.SetAllowAllUnchecked
- 0001:000117D4       TORCheckBox.SetAssociate
- 0001:00011474       TORCheckBox.SetAutoSize
- 0001:00011688       TORCheckBox.SetCaption
- 0001:00011900       TORCheckBox.SetFocusOnBox
- 0001:000112E4       TORCheckBox.SetGrayedStyle
- 0001:00011700       TORCheckBox.SetGroupIndex
- 0001:0001081C       TORCheckBox.SetImageIndexes
- 0001:0001082C       TORCheckBox.SetImageList
- 0001:000117AC       TORCheckBox.SetParent
- 0001:000117C4       TORCheckBox.SetRadioStyle
- 0001:0001144C       TORCheckBox.SetWordWrap
- 0001:00011730       TORCheckBox.SyncAllowAllUnchecked
- 0001:0001083C       TORCheckBox.Toggle
- 0001:000118AC       TORCheckBox.UpdateAssociate
- 0001:00011308       TORCheckBox.WMLButtonDblClk
- 0001:00011320       TORCheckBox.WMSize
- 0001:0000DE14       TORComboBox.AddReference
- 0001:0000C9EC       TORComboBox.AdjustSizeOfSelf
- 0001:0000EA78       TORComboBox.CheckBoxSelected
- 0001:0000DE78       TORComboBox.Clear
- 0001:0000DEA0       TORComboBox.ClearTop
- 0001:0000C92C       TORComboBox.CMFontChanged
- 0001:0000C75C       TORComboBox.Create
- 0001:0000CBCC       TORComboBox.DoEnter
- 0001:0000CC24       TORComboBox.DoExit
- 0001:0000CB6C       TORComboBox.DropButtonDown
- 0001:0000CB9C       TORComboBox.DropButtonUp
- 0001:0000E6C0       TORComboBox.DropPanelBtnPressed
- 0001:0000C9D8       TORComboBox.EditControl
- 0001:0000DEB0       TORComboBox.ForDataUse
- 0001:0000CC88       TORComboBox.FwdChange
- 0001:0000CCBC       TORComboBox.FwdChangeDelayed
- 0001:0000CFCC       TORComboBox.FwdClick
- 0001:0000D120       TORComboBox.FwdDblClick
- 0001:0000D144       TORComboBox.FwdKeyDown
- 0001:0000D51C       TORComboBox.FwdKeyPress
- 0001:0000D564       TORComboBox.FwdKeyUp
- 0001:0000D5D0       TORComboBox.FwdMouseUp
- 0001:0000D5F4       TORComboBox.FwdNeedData
- 0001:0000DFE8       TORComboBox.GetAutoSelect
- 0001:0000EAC4       TORComboBox.GetCaption
- 0001:0000EB38       TORComboBox.GetCaseChanged
- 0001:0000E434       TORComboBox.GetCheckBoxes
- 0001:0000E444       TORComboBox.GetChecked
- 0001:0000E728       TORComboBox.GetCheckedString
- 0001:0000E454       TORComboBox.GetCheckEntireLine
- 0001:0000DFF8       TORComboBox.GetColor
- 0001:0000E004       TORComboBox.GetDelimiter
- 0001:0000E014       TORComboBox.GetDisplayText
- 0001:0000E8E8       TORComboBox.GetEditBoxText
- 0001:0000E890       TORComboBox.GetEnabled
- 0001:0000E464       TORComboBox.GetFlatCheckBoxes
- 0001:0000E1A0       TORComboBox.GetHideSynonyms
- 0001:0000E044       TORComboBox.GetIEN
- 0001:0000E034       TORComboBox.GetItemHeight
- 0001:0000E068       TORComboBox.GetItemID
- 0001:0000E084       TORComboBox.GetItemIEN
- 0001:0000E0A8       TORComboBox.GetItemIndex
- 0001:0000E0CC       TORComboBox.GetItemTipColor
- 0001:0000E0BC       TORComboBox.GetItemTipEnable
- 0001:0000E0DC       TORComboBox.GetLongList
- 0001:0000EB58       TORComboBox.GetLookupPiece
- 0001:0000E0EC       TORComboBox.GetMaxLength
- 0001:0000EAAC       TORComboBox.GetMItems
- 0001:0000E858       TORComboBox.GetOnSynonymCheck
- 0001:0000E0FC       TORComboBox.GetPieces
- 0001:0000E118       TORComboBox.GetReference
- 0001:0000E138       TORComboBox.GetSelLength
- 0001:0000E14C       TORComboBox.GetSelStart
- 0001:0000E160       TORComboBox.GetSelText
- 0001:0000E180       TORComboBox.GetShortCount
- 0001:0000E190       TORComboBox.GetSorted
- 0001:0000E1B0       TORComboBox.GetSynonymChars
- 0001:0000E24C       TORComboBox.GetTabPosInPixels
- 0001:0000E230       TORComboBox.GetTabPositions
- 0001:0000E25C       TORComboBox.GetText
- 0001:0000DF10       TORComboBox.IndexOfReference
- 0001:0000DEC0       TORComboBox.InitLongList
- 0001:0000DF70       TORComboBox.InsertReference
- 0001:0000DFD8       TORComboBox.InsertSeparator
- 0001:0000CC6C       TORComboBox.Loaded
- 0001:0000EAE0       TORComboBox.MakeAccessible
- 0001:0000E278       TORComboBox.SelectAll
- 0001:0000DB48       TORComboBox.SelectByID
- 0001:0000DB1C       TORComboBox.SelectByIEN
- 0001:0000E288       TORComboBox.SetAutoSelect
- 0001:0000EAB4       TORComboBox.SetCaption
- 0001:0000EB48       TORComboBox.SetCaseChanged
- 0001:0000E754       TORComboBox.SetCheckBoxEditColor
- 0001:0000E474       TORComboBox.SetCheckBoxes
- 0001:0000E668       TORComboBox.SetChecked
- 0001:0000E744       TORComboBox.SetCheckedString
- 0001:0000E6A0       TORComboBox.SetCheckEntireLine
- 0001:0000E298       TORComboBox.SetColor
- 0001:0000E2D0       TORComboBox.SetDelimiter
- 0001:0000D66C       TORComboBox.SetDropDownCount
- 0001:0000D678       TORComboBox.SetDroppedDown
- 0001:0000D8C4       TORComboBox.SetEditRect
- 0001:0000D994       TORComboBox.SetEditText
- 0001:0000E89C       TORComboBox.SetEnabled
- 0001:0000DB6C       TORComboBox.SetExactByIEN
- 0001:0000E6B0       TORComboBox.SetFlatCheckBoxes
- 0001:0000E1D0       TORComboBox.SetHideSynonyms
- 0001:0000E2E0       TORComboBox.SetItemHeight
- 0001:0000DA38       TORComboBox.SetItemIndex
- 0001:0000E420       TORComboBox.SetItems
- 0001:0000E300       TORComboBox.SetItemTipColor
- 0001:0000E2F0       TORComboBox.SetItemTipEnable
- 0001:0000E788       TORComboBox.SetListItemsOnly
- 0001:0000E310       TORComboBox.SetLongList
- 0001:0000EB68       TORComboBox.SetLookupPiece
- 0001:0000E320       TORComboBox.SetMaxLength
- 0001:000127C8       TORComboBox.SetNumForMatch
- 0001:0000E7A8       TORComboBox.SetOnCheckedText
- 0001:0000E870       TORComboBox.SetOnSynonymCheck
- 0001:0000E330       TORComboBox.SetPieces
- 0001:0000E340       TORComboBox.SetReference
- 0001:0000E3A0       TORComboBox.SetSelLength
- 0001:0000E3B8       TORComboBox.SetSelStart
- 0001:0000E3D0       TORComboBox.SetSelText
- 0001:0000E3E0       TORComboBox.SetSorted
- 0001:0000DB98       TORComboBox.SetStyle
- 0001:0000E1E0       TORComboBox.SetSynonymChars
- 0001:0000E400       TORComboBox.SetTabPosInPixels
- 0001:0000E3F0       TORComboBox.SetTabPositions
- 0001:0000E810       TORComboBox.SetTemplateField
- 0001:0000E410       TORComboBox.SetText
- 0001:000128F4       TORComboBox.SetTextAutoComplete
- 0001:000127F0       TORComboBox.SetUniqueAutoComplete
- 0001:0000DD78       TORComboBox.StartKeyTimer
- 0001:0000DDE8       TORComboBox.StopKeyTimer
- 0001:0000CBF4       TORComboBox.UMGotFocus
- 0001:0000E9F8       TORComboBox.UpdateCheckEditBoxText
- 0001:0000C8FC       TORComboBox.WMDestroy
- 0001:0000C944       TORComboBox.WMMove
- 0001:0000C960       TORComboBox.WMSize
- 0001:0000C978       TORComboBox.WMTimer
- 0001:0000C668       TORComboEdit.CreateParams
- 0001:0000C688       TORComboEdit.WMKillFocus
- 0001:0000C700       TORComboEdit.WMSetFocus
- 0001:00011B70       TORComboPanelEdit.Destroy
- 0001:00011BA8       TORComboPanelEdit.Paint
- 0001:0000C218       TORDropPanel.BtnClicked
- 0001:0000C250       TORDropPanel.Create
- 0001:0000C2C8       TORDropPanel.CreateParams
- 0001:0000C308       TORDropPanel.GetButton
- 0001:0000C3B8       TORDropPanel.ResetButtons
- 0001:0000C3EC       TORDropPanel.Resize
- 0001:0000C484       TORDropPanel.UpdateButtons
- 0001:0000C608       TORDropPanel.WMActivateApp
- 0001:00012D30       TORImageIndexesElementPropertyEditor.Create
- 0001:00012DB8       TORImageIndexesElementPropertyEditor.GetAttributes
- 0001:00012DC4       TORImageIndexesElementPropertyEditor.GetName
- 0001:00012F00       TORImageIndexesElementPropertyEditor.GetValue
- 0001:00012D7C       TORImageIndexesElementPropertyEditor.ParentImgIdx
- 0001:00012FC8       TORImageIndexesElementPropertyEditor.SetValue
- 0001:00012CCC       TORImageIndexesPropertyEditor.GetAttributes
- 0001:00012CD8       TORImageIndexesPropertyEditor.GetProperties
- 0001:00012D0C       TORImageIndexesPropertyEditor.GetValue
- 0001:00012CC0       TORImageIndexesPropertyEditor.Modified
- 0001:00012D24       TORImageIndexesPropertyEditor.SetValue
- 0001:00009F24       TORListBox.AddReference
- 0001:0000A848       TORListBox.AdjustScrollBar
- 0001:0000C040       TORListBox.Clear
- 0001:0000AEA8       TORListBox.ClearTop
- 0001:00008B70       TORListBox.Click
- 0001:000082C0       TORListBox.CMFontChanged
- 0001:00008B14       TORListBox.CMHintShow
- 0001:000090A8       TORListBox.CNDrawItem
- 0001:00007900       TORListBox.Create
- 0001:00007A4C       TORListBox.CreateParams
- 0001:0000A8D8       TORListBox.CreateScrollBar
- 0001:00007A64       TORListBox.CreateWnd
- 0001:000079F8       TORListBox.Destroy
- 0001:00008C00       TORListBox.DestroyItems
- 0001:00007AF0       TORListBox.DestroyWnd
- 0001:00008B8C       TORListBox.DoChange
- 0001:00008BD0       TORListBox.DoEnter
- 0001:00008BDC       TORListBox.DoExit
- 0001:000090CC       TORListBox.DrawItem
- 0001:0000A9AC       TORListBox.ForDataUse
- 0001:0000A988       TORListBox.FreeScrollBar
- 0001:0000C0FC       TORListBox.GetCaption
- 0001:0000BCB8       TORListBox.GetChecked
- 0001:0000BD94       TORListBox.GetCheckedState
- 0001:0000BE80       TORListBox.GetCheckedString
- 0001:00007CFC       TORListBox.GetDisplayText
- 0001:00009990       TORListBox.GetIEN
- 0001:00009504       TORListBox.GetIndexFromY
- 0001:00009C54       TORListBox.GetItemID
- 0001:00009A40       TORListBox.GetItemIEN
- 0001:0000BFC4       TORListBox.GetMItems
- 0001:0000BE54       TORListBox.GetMultiSelect
- 0001:0000A5F0       TORListBox.GetPieces
- 0001:00009DB4       TORListBox.GetReference
- 0001:0000B804       TORListBox.GetStringIndex
- 0001:0000A5A4       TORListBox.GetStyle
- 0001:0000A0BC       TORListBox.GetTabPositions
- 0001:0000A008       TORListBox.IndexOfReference
- 0001:0000AC64       TORListBox.InitLongList
- 0001:00009F94       TORListBox.InsertReference
- 0001:0000AE00       TORListBox.InsertSeparator
- 0001:00007C0C       TORListBox.IsSynonym
- 0001:00008D68       TORListBox.KeyPress
- 0001:00007F88       TORListBox.LBAddString
- 0001:00008184       TORListBox.LBDeleteString
- 0001:00007D58       TORListBox.LBGetItemData
- 0001:00007E18       TORListBox.LBGetText
- 0001:00007EE4       TORListBox.LBGetTextLen
- 0001:00008074       TORListBox.LBInsertString
- 0001:00008208       TORListBox.LBResetContent
- 0001:000082A4       TORListBox.LBSetCurSel
- 0001:00007D8C       TORListBox.LBSetItemData
- 0001:00007ABC       TORListBox.Loaded
- 0001:0000C118       TORListBox.MakeAccessible
- 0001:00008FD8       TORListBox.MeasureItem
- 0001:00008D98       TORListBox.MouseDown
- 0001:00008E18       TORListBox.MouseMove
- 0001:0000AFFC       TORListBox.NeedData
- 0001:0000B314       TORListBox.PositionThumb
- 0001:0000A634       TORListBox.ResetItems
- 0001:0000B3C4       TORListBox.ScrollTo
- 0001:00009CF0       TORListBox.SelectByID
- 0001:00009AF0       TORListBox.SelectByIEN
- 0001:0000B94C       TORListBox.SelectString
- 0001:0000C05C       TORListBox.SetCaption
- 0001:0000BC54       TORListBox.SetCheckBoxes
- 0001:0000BD00       TORListBox.SetChecked
- 0001:0000BDD0       TORListBox.SetCheckedState
- 0001:0000BF28       TORListBox.SetCheckedString
- 0001:0000A5E0       TORListBox.SetDelimiter
- 0001:00009B54       TORListBox.SetExactByIEN
- 0001:0000BCA0       TORListBox.SetFlatCheckBoxes
- 0001:00009598       TORListBox.SetFocusIndex
- 0001:0000A44C       TORListBox.SetHideSynonyms
- 0001:0000A810       TORListBox.SetLongList
- 0001:0000BFFC       TORListBox.SetMItems
- 0001:0000BE5C       TORListBox.SetMultiSelect
- 0001:0000A610       TORListBox.SetPieces
- 0001:00009E50       TORListBox.SetReference
- 0001:0000A5AC       TORListBox.SetStyle
- 0001:0000A510       TORListBox.SetSynonymChars
- 0001:0000A2A4       TORListBox.SetTabPosInPixels
- 0001:0000A0F8       TORListBox.SetTabPositions
- 0001:0000A2BC       TORListBox.SetTabStops
- 0001:00007B10       TORListBox.TextToShow
- 0001:00008C78       TORListBox.ToggleCheckBox
- 0001:00009858       TORListBox.UMShowTip
- 0001:000127F8       TORListBox.VerifyUnique
- 0001:00008A54       TORListBox.WMCancelMode
- 0001:0000907C       TORListBox.WMDestroy
- 0001:0000C1E0       TORListBox.WMGetObject
- 0001:000082F8       TORListBox.WMKeyDown
- 0001:0000888C       TORListBox.WMLButtonDblClk
- 0001:000084E0       TORListBox.WMLButtonDown
- 0001:00008794       TORListBox.WMLButtonUp
- 0001:00008A88       TORListBox.WMMove
- 0001:000087DC       TORListBox.WMRButtonUp
- 0001:00008AA8       TORListBox.WMSize
- 0001:00008AF0       TORListBox.WMVScroll
- 0001:00011A08       TORListView.LVMSetColumn
- 0001:00011ABC       TORListView.LVMSetColumnWidth
- 0001:00011940       TORListView.WMNotify
- 0001:0000EFF8       TOROffsetLabel.AdjustSizeOfSelf
- 0001:0000EFE0       TOROffsetLabel.CMFontChanged
- 0001:0000EFC8       TOROffsetLabel.CMTextChanged
- 0001:0000EF68       TOROffsetLabel.Create
- 0001:0000F098       TOROffsetLabel.DoDrawText
- 0001:0000F1D4       TOROffsetLabel.GetTransparent
- 0001:0000F138       TOROffsetLabel.Paint
- 0001:0000F234       TOROffsetLabel.SetHorzOffset
- 0001:0000F1E0       TOROffsetLabel.SetTransparent
- 0001:0000F224       TOROffsetLabel.SetVertOffset
- 0001:0000F244       TOROffsetLabel.SetWordWrap
- 0001:00007140       TORStaticText.DoEnter
- 0001:00007168       TORStaticText.DoExit
- 0001:00007190       TORStrings.Add
- 0001:0000720C       TORStrings.Clear
- 0001:00007238       TORStrings.Create
- 0001:00007290       TORStrings.Delete
- 0001:000072C4       TORStrings.Destroy
- 0001:000072F8       TORStrings.Get
- 0001:00007320       TORStrings.GetCount
- 0001:00007338       TORStrings.GetObject
- 0001:00007358       TORStrings.IndexOf
- 0001:00007378       TORStrings.Insert
- 0001:000073FC       TORStrings.Put
- 0001:0000747C       TORStrings.PutObject
- 0001:00007498       TORStrings.SetUpdateState
- 0001:000074B4       TORStrings.Verify
- 0001:0000F340       TORTreeNode.EnsureVisible
- 0001:0000F3F0       TORTreeNode.GetBold
- 0001:0000F42C       TORTreeNode.GetORTreeView
- 0001:0000F448       TORTreeNode.GetParent
- 0001:0000F464       TORTreeNode.GetText
- 0001:0000F64C       TORTreeNode.MakeAccessible
- 0001:0000F47C       TORTreeNode.SetBold
- 0001:0000F970       TORTreeNode.SetCaption
- 0001:0000F4C0       TORTreeNode.SetPiece
- 0001:0000F504       TORTreeNode.SetStringData
- 0001:0000F5B0       TORTreeNode.SetText
- 0001:0000F5BC       TORTreeNode.UpdateText
- 0001:0000F710       TORTreeNode.WMGetObject
- 0001:0000FA20       TORTreeView.CNNotify
- 0001:0000FAAC       TORTreeView.Create
- 0001:0000FAEC       TORTreeView.CreateNode
- 0001:0000FB28       TORTreeView.FindPieceNode
- 0001:0000FB88       TORTreeView.FindPieceNode
- 0001:0000FC70       TORTreeView.GetExpandedIDStr
- 0001:0000FEF0       TORTreeView.GetHorzScrollPos
- 0001:00010084       TORTreeView.GetNodeID
- 0001:000100AC       TORTreeView.GetNodeID
- 0001:0000FF08       TORTreeView.GetVertScrollPos
- 0001:00010170       TORTreeView.MakeAccessible
- 0001:0000FF20       TORTreeView.RenameNodes
- 0001:0000FD7C       TORTreeView.SetExpandedIDStr
- 0001:0000FD6C       TORTreeView.SetExpandedIDStr
- 0001:0000FFF4       TORTreeView.SetHorzScrollPos
- 0001:0000FFDC       TORTreeView.SetNodeDelim
- 0001:00010030       TORTreeView.SetNodePiece
- 0001:00010270       TORTreeView.SetShortNodeCaptions
- 0001:00010048       TORTreeView.SetVertScrollPos
- 0001:00010238       TORTreeView.WMGetObject
- 0001:00000D78       TreeView_GetItem
- 0001:00000D90       TreeView_SetItem
- 0001:0000EB78       TSizeRatio.Create
- 0001:00001CCC       uAccessAPI
+ 0001:0000F29C       TORAlignButton.Create
+ 0001:0000F2EC       TORAlignButton.CreateParams
+ 0001:0000F338       TORAlignButton.SetAlignment
+ 0001:0000F350       TORAlignButton.SetLayout
+ 0001:0000F368       TORAlignButton.SetWordWrap
+ 0001:0001260C       TORAlignSpeedButton.Paint
+ 0001:0000ECA8       TORAutoPanel.BuildSizes
+ 0001:0000EC30       TORAutoPanel.Destroy
+ 0001:0000EDD4       TORAutoPanel.DoResize
+ 0001:0000EDA0       TORAutoPanel.Loaded
+ 0001:0000EF7C       TORAutoPanel.Resize
+ 0001:000102C0       TORCBImageIndexes.Create
+ 0001:00010344       TORCBImageIndexes.Destroy
+ 0001:000103F4       TORCBImageIndexes.IdxString
+ 0001:00010638       TORCBImageIndexes.ImageListChanged
+ 0001:0001066C       TORCBImageIndexes.Notification
+ 0001:0001069C       TORCBImageIndexes.SetCheckedDisabledIndex
+ 0001:000106B0       TORCBImageIndexes.SetCheckedEnabledIndex
+ 0001:000106C4       TORCBImageIndexes.SetGrayedDisabledIndex
+ 0001:000106D8       TORCBImageIndexes.SetGrayedEnabledIndex
+ 0001:000104D8       TORCBImageIndexes.SetIdxString
+ 0001:00010378       TORCBImageIndexes.SetImages
+ 0001:000106EC       TORCBImageIndexes.SetUncheckedDisabledIndex
+ 0001:00010700       TORCBImageIndexes.SetUncheckedEnabledIndex
+ 0001:000114DC       TORCheckBox.AutoAdjustSize
+ 0001:00011950       TORCheckBox.BMGetCheck
+ 0001:0001197C       TORCheckBox.BMGetState
+ 0001:00011388       TORCheckBox.BMSetCheck
+ 0001:00010924       TORCheckBox.CMEnabledChanged
+ 0001:0001093C       TORCheckBox.CMFontChanged
+ 0001:00010954       TORCheckBox.CNDrawItem
+ 0001:00010970       TORCheckBox.CNMeasureItem
+ 0001:00010714       TORCheckBox.Create
+ 0001:000107BC       TORCheckBox.CreateCommon
+ 0001:00010908       TORCheckBox.CreateParams
+ 0001:000107EC       TORCheckBox.Destroy
+ 0001:00010F3C       TORCheckBox.DrawItem
+ 0001:000116B0       TORCheckBox.GetCaption
+ 0001:00010994       TORCheckBox.GetDrawData
+ 0001:00010834       TORCheckBox.GetImageIndexes
+ 0001:00010850       TORCheckBox.GetImageList
+ 0001:00010770       TORCheckBox.ListViewCreate
+ 0001:0001190C       TORCheckBox.Notification
+ 0001:00011730       TORCheckBox.SetAllowAllUnchecked
+ 0001:00011814       TORCheckBox.SetAssociate
+ 0001:000114B4       TORCheckBox.SetAutoSize
+ 0001:000116C8       TORCheckBox.SetCaption
+ 0001:00011940       TORCheckBox.SetFocusOnBox
+ 0001:00011324       TORCheckBox.SetGrayedStyle
+ 0001:00011740       TORCheckBox.SetGroupIndex
+ 0001:0001085C       TORCheckBox.SetImageIndexes
+ 0001:0001086C       TORCheckBox.SetImageList
+ 0001:000117EC       TORCheckBox.SetParent
+ 0001:00011804       TORCheckBox.SetRadioStyle
+ 0001:0001148C       TORCheckBox.SetWordWrap
+ 0001:00011770       TORCheckBox.SyncAllowAllUnchecked
+ 0001:0001087C       TORCheckBox.Toggle
+ 0001:000118EC       TORCheckBox.UpdateAssociate
+ 0001:00011348       TORCheckBox.WMLButtonDblClk
+ 0001:00011360       TORCheckBox.WMSize
+ 0001:0000DE54       TORComboBox.AddReference
+ 0001:0000CA2C       TORComboBox.AdjustSizeOfSelf
+ 0001:0000EAB8       TORComboBox.CheckBoxSelected
+ 0001:0000DEB8       TORComboBox.Clear
+ 0001:0000DEE0       TORComboBox.ClearTop
+ 0001:0000C96C       TORComboBox.CMFontChanged
+ 0001:0000C79C       TORComboBox.Create
+ 0001:0000CC0C       TORComboBox.DoEnter
+ 0001:0000CC64       TORComboBox.DoExit
+ 0001:0000CBAC       TORComboBox.DropButtonDown
+ 0001:0000CBDC       TORComboBox.DropButtonUp
+ 0001:0000E700       TORComboBox.DropPanelBtnPressed
+ 0001:0000CA18       TORComboBox.EditControl
+ 0001:0000DEF0       TORComboBox.ForDataUse
+ 0001:0000CCC8       TORComboBox.FwdChange
+ 0001:0000CCFC       TORComboBox.FwdChangeDelayed
+ 0001:0000D00C       TORComboBox.FwdClick
+ 0001:0000D160       TORComboBox.FwdDblClick
+ 0001:0000D184       TORComboBox.FwdKeyDown
+ 0001:0000D55C       TORComboBox.FwdKeyPress
+ 0001:0000D5A4       TORComboBox.FwdKeyUp
+ 0001:0000D610       TORComboBox.FwdMouseUp
+ 0001:0000D634       TORComboBox.FwdNeedData
+ 0001:0000E028       TORComboBox.GetAutoSelect
+ 0001:0000EB04       TORComboBox.GetCaption
+ 0001:0000EB78       TORComboBox.GetCaseChanged
+ 0001:0000E474       TORComboBox.GetCheckBoxes
+ 0001:0000E484       TORComboBox.GetChecked
+ 0001:0000E768       TORComboBox.GetCheckedString
+ 0001:0000E494       TORComboBox.GetCheckEntireLine
+ 0001:0000E038       TORComboBox.GetColor
+ 0001:0000E044       TORComboBox.GetDelimiter
+ 0001:0000E054       TORComboBox.GetDisplayText
+ 0001:0000E928       TORComboBox.GetEditBoxText
+ 0001:0000E8D0       TORComboBox.GetEnabled
+ 0001:0000E4A4       TORComboBox.GetFlatCheckBoxes
+ 0001:0000E1E0       TORComboBox.GetHideSynonyms
+ 0001:0000E084       TORComboBox.GetIEN
+ 0001:0000E074       TORComboBox.GetItemHeight
+ 0001:0000E0A8       TORComboBox.GetItemID
+ 0001:0000E0C4       TORComboBox.GetItemIEN
+ 0001:0000E0E8       TORComboBox.GetItemIndex
+ 0001:0000E10C       TORComboBox.GetItemTipColor
+ 0001:0000E0FC       TORComboBox.GetItemTipEnable
+ 0001:0000E11C       TORComboBox.GetLongList
+ 0001:0000EB98       TORComboBox.GetLookupPiece
+ 0001:0000E12C       TORComboBox.GetMaxLength
+ 0001:0000EAEC       TORComboBox.GetMItems
+ 0001:0000E898       TORComboBox.GetOnSynonymCheck
+ 0001:0000E13C       TORComboBox.GetPieces
+ 0001:0000E158       TORComboBox.GetReference
+ 0001:0000E178       TORComboBox.GetSelLength
+ 0001:0000E18C       TORComboBox.GetSelStart
+ 0001:0000E1A0       TORComboBox.GetSelText
+ 0001:0000E1C0       TORComboBox.GetShortCount
+ 0001:0000E1D0       TORComboBox.GetSorted
+ 0001:0000E1F0       TORComboBox.GetSynonymChars
+ 0001:0000E28C       TORComboBox.GetTabPosInPixels
+ 0001:0000E270       TORComboBox.GetTabPositions
+ 0001:0000E29C       TORComboBox.GetText
+ 0001:0000DF50       TORComboBox.IndexOfReference
+ 0001:0000DF00       TORComboBox.InitLongList
+ 0001:0000DFB0       TORComboBox.InsertReference
+ 0001:0000E018       TORComboBox.InsertSeparator
+ 0001:0000CCAC       TORComboBox.Loaded
+ 0001:0000EB20       TORComboBox.MakeAccessible
+ 0001:0000E2B8       TORComboBox.SelectAll
+ 0001:0000DB88       TORComboBox.SelectByID
+ 0001:0000DB5C       TORComboBox.SelectByIEN
+ 0001:0000E2C8       TORComboBox.SetAutoSelect
+ 0001:0000EAF4       TORComboBox.SetCaption
+ 0001:0000EB88       TORComboBox.SetCaseChanged
+ 0001:0000E794       TORComboBox.SetCheckBoxEditColor
+ 0001:0000E4B4       TORComboBox.SetCheckBoxes
+ 0001:0000E6A8       TORComboBox.SetChecked
+ 0001:0000E784       TORComboBox.SetCheckedString
+ 0001:0000E6E0       TORComboBox.SetCheckEntireLine
+ 0001:0000E2D8       TORComboBox.SetColor
+ 0001:0000E310       TORComboBox.SetDelimiter
+ 0001:0000D6AC       TORComboBox.SetDropDownCount
+ 0001:0000D6B8       TORComboBox.SetDroppedDown
+ 0001:0000D904       TORComboBox.SetEditRect
+ 0001:0000D9D4       TORComboBox.SetEditText
+ 0001:0000E8DC       TORComboBox.SetEnabled
+ 0001:0000DBAC       TORComboBox.SetExactByIEN
+ 0001:0000E6F0       TORComboBox.SetFlatCheckBoxes
+ 0001:0000E210       TORComboBox.SetHideSynonyms
+ 0001:0000E320       TORComboBox.SetItemHeight
+ 0001:0000DA78       TORComboBox.SetItemIndex
+ 0001:0000E460       TORComboBox.SetItems
+ 0001:0000E340       TORComboBox.SetItemTipColor
+ 0001:0000E330       TORComboBox.SetItemTipEnable
+ 0001:0000E7C8       TORComboBox.SetListItemsOnly
+ 0001:0000E350       TORComboBox.SetLongList
+ 0001:0000EBA8       TORComboBox.SetLookupPiece
+ 0001:0000E360       TORComboBox.SetMaxLength
+ 0001:000128EC       TORComboBox.SetNumForMatch
+ 0001:0000E7E8       TORComboBox.SetOnCheckedText
+ 0001:0000E8B0       TORComboBox.SetOnSynonymCheck
+ 0001:0000E370       TORComboBox.SetPieces
+ 0001:0000E380       TORComboBox.SetReference
+ 0001:0000E3E0       TORComboBox.SetSelLength
+ 0001:0000E3F8       TORComboBox.SetSelStart
+ 0001:0000E410       TORComboBox.SetSelText
+ 0001:0000E420       TORComboBox.SetSorted
+ 0001:0000DBD8       TORComboBox.SetStyle
+ 0001:0000E220       TORComboBox.SetSynonymChars
+ 0001:0000E440       TORComboBox.SetTabPosInPixels
+ 0001:0000E430       TORComboBox.SetTabPositions
+ 0001:0000E850       TORComboBox.SetTemplateField
+ 0001:0000E450       TORComboBox.SetText
+ 0001:00012A18       TORComboBox.SetTextAutoComplete
+ 0001:00012914       TORComboBox.SetUniqueAutoComplete
+ 0001:0000DDB8       TORComboBox.StartKeyTimer
+ 0001:0000DE28       TORComboBox.StopKeyTimer
+ 0001:0000CC34       TORComboBox.UMGotFocus
+ 0001:0000EA38       TORComboBox.UpdateCheckEditBoxText
+ 0001:0000C93C       TORComboBox.WMDestroy
+ 0001:0000C984       TORComboBox.WMMove
+ 0001:0000C9A0       TORComboBox.WMSize
+ 0001:0000C9B8       TORComboBox.WMTimer
+ 0001:0000C6A8       TORComboEdit.CreateParams
+ 0001:0000C6C8       TORComboEdit.WMKillFocus
+ 0001:0000C740       TORComboEdit.WMSetFocus
+ 0001:00011BB0       TORComboPanelEdit.Destroy
+ 0001:00011BE8       TORComboPanelEdit.Paint
+ 0001:0000C258       TORDropPanel.BtnClicked
+ 0001:0000C290       TORDropPanel.Create
+ 0001:0000C308       TORDropPanel.CreateParams
+ 0001:0000C348       TORDropPanel.GetButton
+ 0001:0000C3F8       TORDropPanel.ResetButtons
+ 0001:0000C42C       TORDropPanel.Resize
+ 0001:0000C4C4       TORDropPanel.UpdateButtons
+ 0001:0000C648       TORDropPanel.WMActivateApp
+ 0001:00012E54       TORImageIndexesElementPropertyEditor.Create
+ 0001:00012EDC       TORImageIndexesElementPropertyEditor.GetAttributes
+ 0001:00012EE8       TORImageIndexesElementPropertyEditor.GetName
+ 0001:00013024       TORImageIndexesElementPropertyEditor.GetValue
+ 0001:00012EA0       TORImageIndexesElementPropertyEditor.ParentImgIdx
+ 0001:000130EC       TORImageIndexesElementPropertyEditor.SetValue
+ 0001:00012DF0       TORImageIndexesPropertyEditor.GetAttributes
+ 0001:00012DFC       TORImageIndexesPropertyEditor.GetProperties
+ 0001:00012E30       TORImageIndexesPropertyEditor.GetValue
+ 0001:00012DE4       TORImageIndexesPropertyEditor.Modified
+ 0001:00012E48       TORImageIndexesPropertyEditor.SetValue
+ 0001:00009F64       TORListBox.AddReference
+ 0001:0000A888       TORListBox.AdjustScrollBar
+ 0001:0000C080       TORListBox.Clear
+ 0001:0000AEE8       TORListBox.ClearTop
+ 0001:00008BB0       TORListBox.Click
+ 0001:00008300       TORListBox.CMFontChanged
+ 0001:00008B54       TORListBox.CMHintShow
+ 0001:000090E8       TORListBox.CNDrawItem
+ 0001:00007940       TORListBox.Create
+ 0001:00007A8C       TORListBox.CreateParams
+ 0001:0000A918       TORListBox.CreateScrollBar
+ 0001:00007AA4       TORListBox.CreateWnd
+ 0001:00007A38       TORListBox.Destroy
+ 0001:00008C40       TORListBox.DestroyItems
+ 0001:00007B30       TORListBox.DestroyWnd
+ 0001:00008BCC       TORListBox.DoChange
+ 0001:00008C10       TORListBox.DoEnter
+ 0001:00008C1C       TORListBox.DoExit
+ 0001:0000910C       TORListBox.DrawItem
+ 0001:0000A9EC       TORListBox.ForDataUse
+ 0001:0000A9C8       TORListBox.FreeScrollBar
+ 0001:0000C13C       TORListBox.GetCaption
+ 0001:0000BCF8       TORListBox.GetChecked
+ 0001:0000BDD4       TORListBox.GetCheckedState
+ 0001:0000BEC0       TORListBox.GetCheckedString
+ 0001:00007D3C       TORListBox.GetDisplayText
+ 0001:000099D0       TORListBox.GetIEN
+ 0001:00009544       TORListBox.GetIndexFromY
+ 0001:00009C94       TORListBox.GetItemID
+ 0001:00009A80       TORListBox.GetItemIEN
+ 0001:0000C004       TORListBox.GetMItems
+ 0001:0000BE94       TORListBox.GetMultiSelect
+ 0001:0000A630       TORListBox.GetPieces
+ 0001:00009DF4       TORListBox.GetReference
+ 0001:0000B844       TORListBox.GetStringIndex
+ 0001:0000A5E4       TORListBox.GetStyle
+ 0001:0000A0FC       TORListBox.GetTabPositions
+ 0001:0000A048       TORListBox.IndexOfReference
+ 0001:0000ACA4       TORListBox.InitLongList
+ 0001:00009FD4       TORListBox.InsertReference
+ 0001:0000AE40       TORListBox.InsertSeparator
+ 0001:00007C4C       TORListBox.IsSynonym
+ 0001:00008DA8       TORListBox.KeyPress
+ 0001:00007FC8       TORListBox.LBAddString
+ 0001:000081C4       TORListBox.LBDeleteString
+ 0001:00007D98       TORListBox.LBGetItemData
+ 0001:00007E58       TORListBox.LBGetText
+ 0001:00007F24       TORListBox.LBGetTextLen
+ 0001:000080B4       TORListBox.LBInsertString
+ 0001:00008248       TORListBox.LBResetContent
+ 0001:000082E4       TORListBox.LBSetCurSel
+ 0001:00007DCC       TORListBox.LBSetItemData
+ 0001:00007AFC       TORListBox.Loaded
+ 0001:0000C158       TORListBox.MakeAccessible
+ 0001:00009018       TORListBox.MeasureItem
+ 0001:00008DD8       TORListBox.MouseDown
+ 0001:00008E58       TORListBox.MouseMove
+ 0001:0000B03C       TORListBox.NeedData
+ 0001:0000B354       TORListBox.PositionThumb
+ 0001:0000A674       TORListBox.ResetItems
+ 0001:0000B404       TORListBox.ScrollTo
+ 0001:00009D30       TORListBox.SelectByID
+ 0001:00009B30       TORListBox.SelectByIEN
+ 0001:0000B98C       TORListBox.SelectString
+ 0001:0000C09C       TORListBox.SetCaption
+ 0001:0000BC94       TORListBox.SetCheckBoxes
+ 0001:0000BD40       TORListBox.SetChecked
+ 0001:0000BE10       TORListBox.SetCheckedState
+ 0001:0000BF68       TORListBox.SetCheckedString
+ 0001:0000A620       TORListBox.SetDelimiter
+ 0001:00009B94       TORListBox.SetExactByIEN
+ 0001:0000BCE0       TORListBox.SetFlatCheckBoxes
+ 0001:000095D8       TORListBox.SetFocusIndex
+ 0001:0000A48C       TORListBox.SetHideSynonyms
+ 0001:0000A850       TORListBox.SetLongList
+ 0001:0000C03C       TORListBox.SetMItems
+ 0001:0000BE9C       TORListBox.SetMultiSelect
+ 0001:0000A650       TORListBox.SetPieces
+ 0001:00009E90       TORListBox.SetReference
+ 0001:0000A5EC       TORListBox.SetStyle
+ 0001:0000A550       TORListBox.SetSynonymChars
+ 0001:0000A2E4       TORListBox.SetTabPosInPixels
+ 0001:0000A138       TORListBox.SetTabPositions
+ 0001:0000A2FC       TORListBox.SetTabStops
+ 0001:00007B50       TORListBox.TextToShow
+ 0001:00008CB8       TORListBox.ToggleCheckBox
+ 0001:00009898       TORListBox.UMShowTip
+ 0001:0001291C       TORListBox.VerifyUnique
+ 0001:00008A94       TORListBox.WMCancelMode
+ 0001:000090BC       TORListBox.WMDestroy
+ 0001:0000C220       TORListBox.WMGetObject
+ 0001:00008338       TORListBox.WMKeyDown
+ 0001:000088CC       TORListBox.WMLButtonDblClk
+ 0001:00008520       TORListBox.WMLButtonDown
+ 0001:000087D4       TORListBox.WMLButtonUp
+ 0001:00008AC8       TORListBox.WMMove
+ 0001:0000881C       TORListBox.WMRButtonUp
+ 0001:00008AE8       TORListBox.WMSize
+ 0001:00008B30       TORListBox.WMVScroll
+ 0001:00011A48       TORListView.LVMSetColumn
+ 0001:00011AFC       TORListView.LVMSetColumnWidth
+ 0001:00011980       TORListView.WMNotify
+ 0001:0000F038       TOROffsetLabel.AdjustSizeOfSelf
+ 0001:0000F020       TOROffsetLabel.CMFontChanged
+ 0001:0000F008       TOROffsetLabel.CMTextChanged
+ 0001:0000EFA8       TOROffsetLabel.Create
+ 0001:0000F0D8       TOROffsetLabel.DoDrawText
+ 0001:0000F214       TOROffsetLabel.GetTransparent
+ 0001:0000F178       TOROffsetLabel.Paint
+ 0001:0000F274       TOROffsetLabel.SetHorzOffset
+ 0001:0000F220       TOROffsetLabel.SetTransparent
+ 0001:0000F264       TOROffsetLabel.SetVertOffset
+ 0001:0000F284       TOROffsetLabel.SetWordWrap
+ 0001:00007180       TORStaticText.DoEnter
+ 0001:000071A8       TORStaticText.DoExit
+ 0001:000071D0       TORStrings.Add
+ 0001:0000724C       TORStrings.Clear
+ 0001:00007278       TORStrings.Create
+ 0001:000072D0       TORStrings.Delete
+ 0001:00007304       TORStrings.Destroy
+ 0001:00007338       TORStrings.Get
+ 0001:00007360       TORStrings.GetCount
+ 0001:00007378       TORStrings.GetObject
+ 0001:00007398       TORStrings.IndexOf
+ 0001:000073B8       TORStrings.Insert
+ 0001:0000743C       TORStrings.Put
+ 0001:000074BC       TORStrings.PutObject
+ 0001:000074D8       TORStrings.SetUpdateState
+ 0001:000074F4       TORStrings.Verify
+ 0001:0000F380       TORTreeNode.EnsureVisible
+ 0001:0000F430       TORTreeNode.GetBold
+ 0001:0000F46C       TORTreeNode.GetORTreeView
+ 0001:0000F488       TORTreeNode.GetParent
+ 0001:0000F4A4       TORTreeNode.GetText
+ 0001:0000F68C       TORTreeNode.MakeAccessible
+ 0001:0000F4BC       TORTreeNode.SetBold
+ 0001:0000F9B0       TORTreeNode.SetCaption
+ 0001:0000F500       TORTreeNode.SetPiece
+ 0001:0000F544       TORTreeNode.SetStringData
+ 0001:0000F5F0       TORTreeNode.SetText
+ 0001:0000F5FC       TORTreeNode.UpdateText
+ 0001:0000F750       TORTreeNode.WMGetObject
+ 0001:0000FA60       TORTreeView.CNNotify
+ 0001:0000FAEC       TORTreeView.Create
+ 0001:0000FB2C       TORTreeView.CreateNode
+ 0001:0000FBC8       TORTreeView.FindPieceNode
+ 0001:0000FB68       TORTreeView.FindPieceNode
+ 0001:0000FCB0       TORTreeView.GetExpandedIDStr
+ 0001:0000FF30       TORTreeView.GetHorzScrollPos
+ 0001:000100EC       TORTreeView.GetNodeID
+ 0001:000100C4       TORTreeView.GetNodeID
+ 0001:0000FF48       TORTreeView.GetVertScrollPos
+ 0001:000101B0       TORTreeView.MakeAccessible
+ 0001:0000FF60       TORTreeView.RenameNodes
+ 0001:0000FDBC       TORTreeView.SetExpandedIDStr
+ 0001:0000FDAC       TORTreeView.SetExpandedIDStr
+ 0001:00010034       TORTreeView.SetHorzScrollPos
+ 0001:0001001C       TORTreeView.SetNodeDelim
+ 0001:00010070       TORTreeView.SetNodePiece
+ 0001:000102B0       TORTreeView.SetShortNodeCaptions
+ 0001:00010088       TORTreeView.SetVertScrollPos
+ 0001:00010278       TORTreeView.WMGetObject
+ 0001:00000EA8       TreeView_GetItem
+ 0001:00000EC0       TreeView_SetItem
+ 0001:0000EBB8       TSizeRatio.Create
+ 0001:00001C0C       uAccessAPI
  0002:00001068       uItemTip
  0002:0000106C       uItemTipCount
@@ -670,8 +672,8 @@
  0001:00000504       UnhookWindowsHookEx
  0001:00000314       UninitializeModule
- 0001:00000F98       UrlMon
+ 0001:000010D0       UrlMon
  0001:00000570       Windows
- 0001:00000FD0       WinInet
- 0001:00001088       WinSpool
+ 0001:00001108       WinInet
+ 0001:000011C0       WinSpool
 
 
@@ -741,469 +743,471 @@
  0001:00000540       Finalization
  0001:00000570       Windows
- 0001:00000588       Finalization
- 0001:000005B8       Messages
- 0001:00000D78       TreeView_GetItem
- 0001:00000D90       TreeView_SetItem
- 0001:00000DA8       Finalization
- 0001:00000DD8       CommCtrl
- 0001:00000E10       Finalization
- 0001:00000E40       Imm
- 0001:00000F30       Finalization
- 0001:00000F60       ShlObj
- 0001:00000F68       Finalization
- 0001:00000F98       UrlMon
- 0001:00000FA0       Finalization
- 0001:00000FD0       WinInet
- 0001:00000FD8       Finalization
- 0001:00001008       RegStr
- 0001:00001010       Finalization
- 0001:00001040       ShellAPI
- 0001:00001058       Finalization
- 0001:00001088       WinSpool
- 0001:00001430       Finalization
- 0001:00001460       CommDlg
- 0001:00001468       Finalization
- 0001:00001498       Dlgs
- 0001:000018B0       Finalization
- 0001:000018E0       RichEdit
- 0001:00001B60       Finalization
- 0001:00001B90       Accessibility_TLB
- 0001:00001B98       GetDefaultObject
- 0001:00001BDC       GetDefaultObject
- 0001:00001C20       GetLResult
- 0001:00001C88       Finalization
- 0001:00001CCC       uAccessAPI
- 0001:000062A0       ClientWidthOfList
- 0001:000062E4       FontWidthPixel
- 0001:000063F0       FontHeightPixel
- 0001:00006434       HigherOf
- 0001:00006440       LowerOf
- 0001:0000644C       Piece
- 0001:000064CC       SetPiece
- 0001:000065F0       IntArrayToString
- 0001:000066C0       StringToIntArray
- 0001:00006834       StringBetween
- 0001:0000686C       ItemTipKeyHook
- 0001:000068A0       AddItemTipRef
- 0001:000068D8       RemoveItemTipRef
- 0001:00006908       TItemTip.Create
- 0001:0000695C       TItemTip.Destroy
- 0001:00006998       TItemTip.CreateParams
- 0001:000069C4       TItemTip.Paint
- 0001:00006AAC       TItemTip.Hide
- 0001:00006AF0       TItemTip.GetTabSettings
- 0001:00006C1C       TItemTip.UpdateText
- 0001:00006EC0       TItemTip.Show
- 0001:00007090       GetORCBBitmap
- 0001:0000711C       DestroyORCBBitmaps
- 0001:00007140       TORStaticText.DoEnter
- 0001:00007168       TORStaticText.DoExit
- 0001:00007190       TORStrings.Add
- 0001:0000720C       TORStrings.Clear
- 0001:00007238       TORStrings.Create
- 0001:00007290       TORStrings.Delete
- 0001:000072C4       TORStrings.Destroy
- 0001:000072F8       TORStrings.Get
- 0001:00007320       TORStrings.GetCount
- 0001:00007338       TORStrings.GetObject
- 0001:00007358       TORStrings.IndexOf
- 0001:00007378       TORStrings.Insert
- 0001:000073FC       TORStrings.Put
- 0001:0000747C       TORStrings.PutObject
- 0001:00007498       TORStrings.SetUpdateState
- 0001:000074B4       TORStrings.Verify
- 0001:00007900       TORListBox.Create
- 0001:000079F8       TORListBox.Destroy
- 0001:00007A4C       TORListBox.CreateParams
- 0001:00007A64       TORListBox.CreateWnd
- 0001:00007ABC       TORListBox.Loaded
- 0001:00007AF0       TORListBox.DestroyWnd
- 0001:00007B10       TORListBox.TextToShow
- 0001:00007C0C       TORListBox.IsSynonym
- 0001:00007CFC       TORListBox.GetDisplayText
- 0001:00007D58       TORListBox.LBGetItemData
- 0001:00007D8C       TORListBox.LBSetItemData
- 0001:00007E18       TORListBox.LBGetText
- 0001:00007EE4       TORListBox.LBGetTextLen
- 0001:00007F88       TORListBox.LBAddString
- 0001:00008074       TORListBox.LBInsertString
- 0001:00008184       TORListBox.LBDeleteString
- 0001:00008208       TORListBox.LBResetContent
- 0001:000082A4       TORListBox.LBSetCurSel
- 0001:000082C0       TORListBox.CMFontChanged
- 0001:000082F8       TORListBox.WMKeyDown
- 0001:000084E0       TORListBox.WMLButtonDown
- 0001:00008794       TORListBox.WMLButtonUp
- 0001:000087DC       TORListBox.WMRButtonUp
- 0001:0000888C       TORListBox.WMLButtonDblClk
- 0001:00008A54       TORListBox.WMCancelMode
- 0001:00008A88       TORListBox.WMMove
- 0001:00008AA8       TORListBox.WMSize
- 0001:00008AF0       TORListBox.WMVScroll
- 0001:00008B14       TORListBox.CMHintShow
- 0001:00008B70       TORListBox.Click
- 0001:00008B8C       TORListBox.DoChange
- 0001:00008BD0       TORListBox.DoEnter
- 0001:00008BDC       TORListBox.DoExit
- 0001:00008C00       TORListBox.DestroyItems
- 0001:00008C78       TORListBox.ToggleCheckBox
- 0001:00008D68       TORListBox.KeyPress
- 0001:00008D98       TORListBox.MouseDown
- 0001:00008E18       TORListBox.MouseMove
- 0001:00008FD8       TORListBox.MeasureItem
- 0001:0000907C       TORListBox.WMDestroy
- 0001:000090A8       TORListBox.CNDrawItem
- 0001:000090CC       TORListBox.DrawItem
- 0001:00009504       TORListBox.GetIndexFromY
- 0001:00009598       TORListBox.SetFocusIndex
- 0001:00009858       TORListBox.UMShowTip
- 0001:00009990       TORListBox.GetIEN
- 0001:00009A40       TORListBox.GetItemIEN
- 0001:00009AF0       TORListBox.SelectByIEN
- 0001:00009B54       TORListBox.SetExactByIEN
- 0001:00009C54       TORListBox.GetItemID
- 0001:00009CF0       TORListBox.SelectByID
- 0001:00009DB4       TORListBox.GetReference
- 0001:00009E50       TORListBox.SetReference
- 0001:00009F24       TORListBox.AddReference
- 0001:00009F94       TORListBox.InsertReference
- 0001:0000A008       TORListBox.IndexOfReference
- 0001:0000A0BC       TORListBox.GetTabPositions
- 0001:0000A0F8       TORListBox.SetTabPositions
- 0001:0000A2A4       TORListBox.SetTabPosInPixels
- 0001:0000A2BC       TORListBox.SetTabStops
- 0001:0000A44C       TORListBox.SetHideSynonyms
- 0001:0000A510       TORListBox.SetSynonymChars
- 0001:0000A5A4       TORListBox.GetStyle
- 0001:0000A5AC       TORListBox.SetStyle
- 0001:0000A5E0       TORListBox.SetDelimiter
- 0001:0000A5F0       TORListBox.GetPieces
- 0001:0000A610       TORListBox.SetPieces
- 0001:0000A634       TORListBox.ResetItems
- 0001:0000A810       TORListBox.SetLongList
- 0001:0000A848       TORListBox.AdjustScrollBar
- 0001:0000A8D8       TORListBox.CreateScrollBar
- 0001:0000A988       TORListBox.FreeScrollBar
- 0001:0000A9AC       TORListBox.ForDataUse
- 0001:0000AC64       TORListBox.InitLongList
- 0001:0000AE00       TORListBox.InsertSeparator
- 0001:0000AEA8       TORListBox.ClearTop
- 0001:0000AF0C       ClearLong
- 0001:0000AFFC       TORListBox.NeedData
- 0001:0000B314       TORListBox.PositionThumb
- 0001:0000B3C4       TORListBox.ScrollTo
- 0001:0000B804       TORListBox.GetStringIndex
- 0001:0000B94C       TORListBox.SelectString
- 0001:0000BC54       TORListBox.SetCheckBoxes
- 0001:0000BCA0       TORListBox.SetFlatCheckBoxes
- 0001:0000BCB8       TORListBox.GetChecked
- 0001:0000BD00       TORListBox.SetChecked
- 0001:0000BD94       TORListBox.GetCheckedState
- 0001:0000BDD0       TORListBox.SetCheckedState
- 0001:0000BE54       TORListBox.GetMultiSelect
- 0001:0000BE5C       TORListBox.SetMultiSelect
- 0001:0000BE80       TORListBox.GetCheckedString
- 0001:0000BF28       TORListBox.SetCheckedString
- 0001:0000BFC4       TORListBox.GetMItems
- 0001:0000BFFC       TORListBox.SetMItems
- 0001:0000C040       TORListBox.Clear
- 0001:0000C05C       TORListBox.SetCaption
- 0001:0000C0FC       TORListBox.GetCaption
- 0001:0000C118       TORListBox.MakeAccessible
- 0001:0000C1E0       TORListBox.WMGetObject
- 0001:0000C218       TORDropPanel.BtnClicked
- 0001:0000C250       TORDropPanel.Create
- 0001:0000C2C8       TORDropPanel.CreateParams
- 0001:0000C308       TORDropPanel.GetButton
- 0001:0000C3B8       TORDropPanel.ResetButtons
- 0001:0000C3EC       TORDropPanel.Resize
- 0001:0000C484       TORDropPanel.UpdateButtons
- 0001:0000C608       TORDropPanel.WMActivateApp
- 0001:0000C668       TORComboEdit.CreateParams
- 0001:0000C688       TORComboEdit.WMKillFocus
- 0001:0000C700       TORComboEdit.WMSetFocus
- 0001:0000C75C       TORComboBox.Create
- 0001:0000C8FC       TORComboBox.WMDestroy
- 0001:0000C92C       TORComboBox.CMFontChanged
- 0001:0000C944       TORComboBox.WMMove
- 0001:0000C960       TORComboBox.WMSize
- 0001:0000C978       TORComboBox.WMTimer
- 0001:0000C9D8       TORComboBox.EditControl
- 0001:0000C9EC       TORComboBox.AdjustSizeOfSelf
- 0001:0000CB6C       TORComboBox.DropButtonDown
- 0001:0000CB9C       TORComboBox.DropButtonUp
- 0001:0000CBCC       TORComboBox.DoEnter
- 0001:0000CBF4       TORComboBox.UMGotFocus
- 0001:0000CC24       TORComboBox.DoExit
- 0001:0000CC6C       TORComboBox.Loaded
- 0001:0000CC88       TORComboBox.FwdChange
- 0001:0000CCBC       TORComboBox.FwdChangeDelayed
- 0001:0000CFCC       TORComboBox.FwdClick
- 0001:0000D120       TORComboBox.FwdDblClick
- 0001:0000D144       TORComboBox.FwdKeyDown
- 0001:0000D51C       TORComboBox.FwdKeyPress
- 0001:0000D564       TORComboBox.FwdKeyUp
- 0001:0000D5D0       TORComboBox.FwdMouseUp
- 0001:0000D5F4       TORComboBox.FwdNeedData
- 0001:0000D66C       TORComboBox.SetDropDownCount
- 0001:0000D678       TORComboBox.SetDroppedDown
- 0001:0000D8C4       TORComboBox.SetEditRect
- 0001:0000D994       TORComboBox.SetEditText
- 0001:0000DA38       TORComboBox.SetItemIndex
- 0001:0000DB1C       TORComboBox.SelectByIEN
- 0001:0000DB48       TORComboBox.SelectByID
- 0001:0000DB6C       TORComboBox.SetExactByIEN
- 0001:0000DB98       TORComboBox.SetStyle
- 0001:0000DD78       TORComboBox.StartKeyTimer
- 0001:0000DDE8       TORComboBox.StopKeyTimer
- 0001:0000DE14       TORComboBox.AddReference
- 0001:0000DE78       TORComboBox.Clear
- 0001:0000DEA0       TORComboBox.ClearTop
- 0001:0000DEB0       TORComboBox.ForDataUse
- 0001:0000DEC0       TORComboBox.InitLongList
- 0001:0000DF10       TORComboBox.IndexOfReference
- 0001:0000DF70       TORComboBox.InsertReference
- 0001:0000DFD8       TORComboBox.InsertSeparator
- 0001:0000DFE8       TORComboBox.GetAutoSelect
- 0001:0000DFF8       TORComboBox.GetColor
- 0001:0000E004       TORComboBox.GetDelimiter
- 0001:0000E014       TORComboBox.GetDisplayText
- 0001:0000E034       TORComboBox.GetItemHeight
- 0001:0000E044       TORComboBox.GetIEN
- 0001:0000E068       TORComboBox.GetItemID
- 0001:0000E084       TORComboBox.GetItemIEN
- 0001:0000E0A8       TORComboBox.GetItemIndex
- 0001:0000E0BC       TORComboBox.GetItemTipEnable
- 0001:0000E0CC       TORComboBox.GetItemTipColor
- 0001:0000E0DC       TORComboBox.GetLongList
- 0001:0000E0EC       TORComboBox.GetMaxLength
- 0001:0000E0FC       TORComboBox.GetPieces
- 0001:0000E118       TORComboBox.GetReference
- 0001:0000E138       TORComboBox.GetSelLength
- 0001:0000E14C       TORComboBox.GetSelStart
- 0001:0000E160       TORComboBox.GetSelText
- 0001:0000E180       TORComboBox.GetShortCount
- 0001:0000E190       TORComboBox.GetSorted
- 0001:0000E1A0       TORComboBox.GetHideSynonyms
- 0001:0000E1B0       TORComboBox.GetSynonymChars
- 0001:0000E1D0       TORComboBox.SetHideSynonyms
- 0001:0000E1E0       TORComboBox.SetSynonymChars
- 0001:0000E230       TORComboBox.GetTabPositions
- 0001:0000E24C       TORComboBox.GetTabPosInPixels
- 0001:0000E25C       TORComboBox.GetText
- 0001:0000E278       TORComboBox.SelectAll
- 0001:0000E288       TORComboBox.SetAutoSelect
- 0001:0000E298       TORComboBox.SetColor
- 0001:0000E2D0       TORComboBox.SetDelimiter
- 0001:0000E2E0       TORComboBox.SetItemHeight
- 0001:0000E2F0       TORComboBox.SetItemTipEnable
- 0001:0000E300       TORComboBox.SetItemTipColor
- 0001:0000E310       TORComboBox.SetLongList
- 0001:0000E320       TORComboBox.SetMaxLength
- 0001:0000E330       TORComboBox.SetPieces
- 0001:0000E340       TORComboBox.SetReference
- 0001:0000E3A0       TORComboBox.SetSelLength
- 0001:0000E3B8       TORComboBox.SetSelStart
- 0001:0000E3D0       TORComboBox.SetSelText
- 0001:0000E3E0       TORComboBox.SetSorted
- 0001:0000E3F0       TORComboBox.SetTabPositions
- 0001:0000E400       TORComboBox.SetTabPosInPixels
- 0001:0000E410       TORComboBox.SetText
- 0001:0000E420       TORComboBox.SetItems
- 0001:0000E434       TORComboBox.GetCheckBoxes
- 0001:0000E444       TORComboBox.GetChecked
- 0001:0000E454       TORComboBox.GetCheckEntireLine
- 0001:0000E464       TORComboBox.GetFlatCheckBoxes
- 0001:0000E474       TORComboBox.SetCheckBoxes
- 0001:0000E668       TORComboBox.SetChecked
- 0001:0000E6A0       TORComboBox.SetCheckEntireLine
- 0001:0000E6B0       TORComboBox.SetFlatCheckBoxes
- 0001:0000E6C0       TORComboBox.DropPanelBtnPressed
- 0001:0000E728       TORComboBox.GetCheckedString
- 0001:0000E744       TORComboBox.SetCheckedString
- 0001:0000E754       TORComboBox.SetCheckBoxEditColor
- 0001:0000E788       TORComboBox.SetListItemsOnly
- 0001:0000E7A8       TORComboBox.SetOnCheckedText
- 0001:0000E810       TORComboBox.SetTemplateField
- 0001:0000E858       TORComboBox.GetOnSynonymCheck
- 0001:0000E870       TORComboBox.SetOnSynonymCheck
- 0001:0000E890       TORComboBox.GetEnabled
- 0001:0000E89C       TORComboBox.SetEnabled
- 0001:0000E8E8       TORComboBox.GetEditBoxText
- 0001:0000E9F8       TORComboBox.UpdateCheckEditBoxText
- 0001:0000EA78       TORComboBox.CheckBoxSelected
- 0001:0000EAAC       TORComboBox.GetMItems
- 0001:0000EAB4       TORComboBox.SetCaption
- 0001:0000EAC4       TORComboBox.GetCaption
- 0001:0000EAE0       TORComboBox.MakeAccessible
- 0001:0000EB38       TORComboBox.GetCaseChanged
- 0001:0000EB48       TORComboBox.SetCaseChanged
- 0001:0000EB58       TORComboBox.GetLookupPiece
- 0001:0000EB68       TORComboBox.SetLookupPiece
- 0001:0000EB78       TSizeRatio.Create
- 0001:0000EBF0       TORAutoPanel.Destroy
- 0001:0000EC68       TORAutoPanel.BuildSizes
- 0001:0000ED60       TORAutoPanel.Loaded
- 0001:0000ED94       TORAutoPanel.DoResize
- 0001:0000EF3C       TORAutoPanel.Resize
- 0001:0000EF68       TOROffsetLabel.Create
- 0001:0000EFC8       TOROffsetLabel.CMTextChanged
- 0001:0000EFE0       TOROffsetLabel.CMFontChanged
- 0001:0000EFF8       TOROffsetLabel.AdjustSizeOfSelf
- 0001:0000F098       TOROffsetLabel.DoDrawText
- 0001:0000F138       TOROffsetLabel.Paint
- 0001:0000F1D4       TOROffsetLabel.GetTransparent
- 0001:0000F1E0       TOROffsetLabel.SetTransparent
- 0001:0000F224       TOROffsetLabel.SetVertOffset
- 0001:0000F234       TOROffsetLabel.SetHorzOffset
- 0001:0000F244       TOROffsetLabel.SetWordWrap
- 0001:0000F25C       TORAlignButton.Create
- 0001:0000F2AC       TORAlignButton.CreateParams
- 0001:0000F2F8       TORAlignButton.SetAlignment
- 0001:0000F310       TORAlignButton.SetLayout
- 0001:0000F328       TORAlignButton.SetWordWrap
- 0001:0000F340       TORTreeNode.EnsureVisible
- 0001:0000F3F0       TORTreeNode.GetBold
- 0001:0000F42C       TORTreeNode.GetORTreeView
- 0001:0000F448       TORTreeNode.GetParent
- 0001:0000F464       TORTreeNode.GetText
- 0001:0000F47C       TORTreeNode.SetBold
- 0001:0000F4C0       TORTreeNode.SetPiece
- 0001:0000F504       TORTreeNode.SetStringData
- 0001:0000F5B0       TORTreeNode.SetText
- 0001:0000F5BC       TORTreeNode.UpdateText
- 0001:0000F64C       TORTreeNode.MakeAccessible
- 0001:0000F710       TORTreeNode.WMGetObject
- 0001:0000F744       CalcShortName
- 0001:0000F970       TORTreeNode.SetCaption
- 0001:0000FA20       TORTreeView.CNNotify
- 0001:0000FAAC       TORTreeView.Create
- 0001:0000FAEC       TORTreeView.CreateNode
- 0001:0000FB28       TORTreeView.FindPieceNode
- 0001:0000FB88       TORTreeView.FindPieceNode
- 0001:0000FC70       TORTreeView.GetExpandedIDStr
- 0001:0000FD6C       TORTreeView.SetExpandedIDStr
- 0001:0000FD7C       TORTreeView.SetExpandedIDStr
- 0001:0000FEF0       TORTreeView.GetHorzScrollPos
- 0001:0000FF08       TORTreeView.GetVertScrollPos
- 0001:0000FF20       TORTreeView.RenameNodes
- 0001:0000FFDC       TORTreeView.SetNodeDelim
- 0001:0000FFF4       TORTreeView.SetHorzScrollPos
- 0001:00010030       TORTreeView.SetNodePiece
- 0001:00010048       TORTreeView.SetVertScrollPos
- 0001:00010084       TORTreeView.GetNodeID
- 0001:000100AC       TORTreeView.GetNodeID
- 0001:00010170       TORTreeView.MakeAccessible
- 0001:00010238       TORTreeView.WMGetObject
- 0001:00010270       TORTreeView.SetShortNodeCaptions
- 0001:00010280       TORCBImageIndexes.Create
- 0001:00010304       TORCBImageIndexes.Destroy
- 0001:00010338       TORCBImageIndexes.SetImages
- 0001:00010378       RStr
- 0001:000103B4       TORCBImageIndexes.IdxString
- 0001:00010498       TORCBImageIndexes.SetIdxString
- 0001:000105F8       TORCBImageIndexes.ImageListChanged
- 0001:0001062C       TORCBImageIndexes.Notification
- 0001:0001065C       TORCBImageIndexes.SetCheckedDisabledIndex
- 0001:00010670       TORCBImageIndexes.SetCheckedEnabledIndex
- 0001:00010684       TORCBImageIndexes.SetGrayedDisabledIndex
- 0001:00010698       TORCBImageIndexes.SetGrayedEnabledIndex
- 0001:000106AC       TORCBImageIndexes.SetUncheckedDisabledIndex
- 0001:000106C0       TORCBImageIndexes.SetUncheckedEnabledIndex
- 0001:000106D4       TORCheckBox.Create
- 0001:00010730       TORCheckBox.ListViewCreate
- 0001:0001077C       TORCheckBox.CreateCommon
- 0001:000107AC       TORCheckBox.Destroy
- 0001:000107F4       TORCheckBox.GetImageIndexes
- 0001:00010810       TORCheckBox.GetImageList
- 0001:0001081C       TORCheckBox.SetImageIndexes
- 0001:0001082C       TORCheckBox.SetImageList
- 0001:0001083C       TORCheckBox.Toggle
- 0001:000108C8       TORCheckBox.CreateParams
- 0001:000108E4       TORCheckBox.CMEnabledChanged
- 0001:000108FC       TORCheckBox.CMFontChanged
- 0001:00010914       TORCheckBox.CNDrawItem
- 0001:00010930       TORCheckBox.CNMeasureItem
- 0001:00010954       TORCheckBox.GetDrawData
- 0001:00010EFC       TORCheckBox.DrawItem
- 0001:000112E4       TORCheckBox.SetGrayedStyle
- 0001:00011308       TORCheckBox.WMLButtonDblClk
- 0001:00011320       TORCheckBox.WMSize
- 0001:00011348       TORCheckBox.BMSetCheck
- 0001:0001144C       TORCheckBox.SetWordWrap
- 0001:00011474       TORCheckBox.SetAutoSize
- 0001:0001149C       TORCheckBox.AutoAdjustSize
- 0001:00011670       TORCheckBox.GetCaption
- 0001:00011688       TORCheckBox.SetCaption
- 0001:000116F0       TORCheckBox.SetAllowAllUnchecked
- 0001:00011700       TORCheckBox.SetGroupIndex
- 0001:00011730       TORCheckBox.SyncAllowAllUnchecked
- 0001:000117AC       TORCheckBox.SetParent
- 0001:000117C4       TORCheckBox.SetRadioStyle
- 0001:000117D4       TORCheckBox.SetAssociate
- 0001:00011810       EnableCtrl
- 0001:000118AC       TORCheckBox.UpdateAssociate
- 0001:000118CC       TORCheckBox.Notification
- 0001:00011900       TORCheckBox.SetFocusOnBox
- 0001:00011910       TORCheckBox.BMGetCheck
- 0001:0001193C       TORCheckBox.BMGetState
- 0001:00011940       TORListView.WMNotify
- 0001:00011A08       TORListView.LVMSetColumn
- 0001:00011ABC       TORListView.LVMSetColumnWidth
- 0001:00011B70       TORComboPanelEdit.Destroy
- 0001:00011BA8       TORComboPanelEdit.Paint
- 0001:00011C70       TKeyClickPanel.KeyDown
- 0001:00011C98       TKeyClickRadioGroup.Click
- 0001:00011CD0       TKeyClickRadioGroup.Create
- 0001:00011D30       TKeyClickRadioGroup.KeyDown
- 0001:00011DA0       TCaptionListBox.GetCaption
- 0001:00011DCC       TCaptionListBox.MakeAccessible
- 0001:00011E94       TCaptionListBox.SetCaption
- 0001:00011F18       TCaptionListBox.WMGetObject
- 0001:00011F50       TCaptionListBox.WMRButtonUp
- 0001:00012084       TCaptionCheckListBox.GetCaption
- 0001:000120B0       TCaptionCheckListBox.SetCaption
- 0001:00012134       TCaptionMemo.GetCaption
- 0001:00012160       TCaptionMemo.SetCaption
- 0001:000121E4       TCaptionEdit.GetCaption
- 0001:00012210       TCaptionEdit.SetCaption
- 0001:00012294       TCaptionRichEdit.MakeAccessible
- 0001:00012358       TCaptionRichEdit.WMGetObject
- 0001:00012390       TCaptionTreeView.GetCaption
- 0001:000123A8       TCaptionTreeView.SetCaption
- 0001:00012438       TCaptionComboBox.GetCaption
- 0001:00012464       TCaptionComboBox.SetCaption
- 0001:000124E8       TORAlignSpeedButton.Paint
- 0001:00012560       GoodNotifyWinEvent
- 0001:00012568       TCaptionStringGrid.ColRowToIndex
- 0001:000125B8       TCaptionStringGrid.IndexToColRow
- 0001:0001261C       TCaptionStringGrid.KeyUp
- 0001:00012694       TCaptionStringGrid.MakeAccessible
- 0001:00012758       TCaptionStringGrid.WMGetObject
- 0001:00012790       IsAMouseButtonDown
- 0001:000127C8       TORComboBox.SetNumForMatch
- 0001:000127F0       TORComboBox.SetUniqueAutoComplete
- 0001:000127F8       TORListBox.VerifyUnique
- 0001:000128F4       TORComboBox.SetTextAutoComplete
- 0001:00012970       Finalization
- 0001:000129BC       ORCtrls
- 0001:00012CC0       TORImageIndexesPropertyEditor.Modified
- 0001:00012CCC       TORImageIndexesPropertyEditor.GetAttributes
- 0001:00012CD8       TORImageIndexesPropertyEditor.GetProperties
- 0001:00012D0C       TORImageIndexesPropertyEditor.GetValue
- 0001:00012D24       TORImageIndexesPropertyEditor.SetValue
- 0001:00012D30       TORImageIndexesElementPropertyEditor.Create
- 0001:00012D7C       TORImageIndexesElementPropertyEditor.ParentImgIdx
- 0001:00012DB8       TORImageIndexesElementPropertyEditor.GetAttributes
- 0001:00012DC4       TORImageIndexesElementPropertyEditor.GetName
- 0001:00012F00       TORImageIndexesElementPropertyEditor.GetValue
- 0001:00012FC8       TORImageIndexesElementPropertyEditor.SetValue
- 0001:0001307C       Register
- 0001:0001318C       Finalization
- 0001:000131BC       ORCtrlsDsgn
- 0001:00013404       @GetPackageInfoTable
- 0001:0001340C       @PackageLoad
- 0001:00013418       @PackageUnload
- 0001:00013424       ORCtrlLib60
+ 0001:00000598       Finalization
+ 0001:000005C8       Messages
+ 0001:000009B0       Finalization
+ 0001:000009E0       Accessibility_TLB
+ 0001:00000EA8       TreeView_GetItem
+ 0001:00000EC0       TreeView_SetItem
+ 0001:00000ED8       Finalization
+ 0001:00000F08       CommCtrl
+ 0001:00000F48       Finalization
+ 0001:00000F78       Imm
+ 0001:00001068       Finalization
+ 0001:00001098       ShlObj
+ 0001:000010A0       Finalization
+ 0001:000010D0       UrlMon
+ 0001:000010D8       Finalization
+ 0001:00001108       WinInet
+ 0001:00001110       Finalization
+ 0001:00001140       RegStr
+ 0001:00001148       Finalization
+ 0001:00001178       ShellAPI
+ 0001:00001190       Finalization
+ 0001:000011C0       WinSpool
+ 0001:00001568       Finalization
+ 0001:00001598       CommDlg
+ 0001:000015A0       Finalization
+ 0001:000015D0       Dlgs
+ 0001:000019E8       Finalization
+ 0001:00001A18       RichEdit
+ 0001:00001AD8       GetDefaultObject
+ 0001:00001B1C       GetDefaultObject
+ 0001:00001B60       GetLResult
+ 0001:00001BC8       Finalization
+ 0001:00001C0C       uAccessAPI
+ 0001:000062E0       ClientWidthOfList
+ 0001:00006324       FontWidthPixel
+ 0001:00006430       FontHeightPixel
+ 0001:00006474       HigherOf
+ 0001:00006480       LowerOf
+ 0001:0000648C       Piece
+ 0001:0000650C       SetPiece
+ 0001:00006630       IntArrayToString
+ 0001:00006700       StringToIntArray
+ 0001:00006874       StringBetween
+ 0001:000068AC       ItemTipKeyHook
+ 0001:000068E0       AddItemTipRef
+ 0001:00006918       RemoveItemTipRef
+ 0001:00006948       TItemTip.Create
+ 0001:0000699C       TItemTip.Destroy
+ 0001:000069D8       TItemTip.CreateParams
+ 0001:00006A04       TItemTip.Paint
+ 0001:00006AEC       TItemTip.Hide
+ 0001:00006B30       TItemTip.GetTabSettings
+ 0001:00006C5C       TItemTip.UpdateText
+ 0001:00006F00       TItemTip.Show
+ 0001:000070D0       GetORCBBitmap
+ 0001:0000715C       DestroyORCBBitmaps
+ 0001:00007180       TORStaticText.DoEnter
+ 0001:000071A8       TORStaticText.DoExit
+ 0001:000071D0       TORStrings.Add
+ 0001:0000724C       TORStrings.Clear
+ 0001:00007278       TORStrings.Create
+ 0001:000072D0       TORStrings.Delete
+ 0001:00007304       TORStrings.Destroy
+ 0001:00007338       TORStrings.Get
+ 0001:00007360       TORStrings.GetCount
+ 0001:00007378       TORStrings.GetObject
+ 0001:00007398       TORStrings.IndexOf
+ 0001:000073B8       TORStrings.Insert
+ 0001:0000743C       TORStrings.Put
+ 0001:000074BC       TORStrings.PutObject
+ 0001:000074D8       TORStrings.SetUpdateState
+ 0001:000074F4       TORStrings.Verify
+ 0001:00007940       TORListBox.Create
+ 0001:00007A38       TORListBox.Destroy
+ 0001:00007A8C       TORListBox.CreateParams
+ 0001:00007AA4       TORListBox.CreateWnd
+ 0001:00007AFC       TORListBox.Loaded
+ 0001:00007B30       TORListBox.DestroyWnd
+ 0001:00007B50       TORListBox.TextToShow
+ 0001:00007C4C       TORListBox.IsSynonym
+ 0001:00007D3C       TORListBox.GetDisplayText
+ 0001:00007D98       TORListBox.LBGetItemData
+ 0001:00007DCC       TORListBox.LBSetItemData
+ 0001:00007E58       TORListBox.LBGetText
+ 0001:00007F24       TORListBox.LBGetTextLen
+ 0001:00007FC8       TORListBox.LBAddString
+ 0001:000080B4       TORListBox.LBInsertString
+ 0001:000081C4       TORListBox.LBDeleteString
+ 0001:00008248       TORListBox.LBResetContent
+ 0001:000082E4       TORListBox.LBSetCurSel
+ 0001:00008300       TORListBox.CMFontChanged
+ 0001:00008338       TORListBox.WMKeyDown
+ 0001:00008520       TORListBox.WMLButtonDown
+ 0001:000087D4       TORListBox.WMLButtonUp
+ 0001:0000881C       TORListBox.WMRButtonUp
+ 0001:000088CC       TORListBox.WMLButtonDblClk
+ 0001:00008A94       TORListBox.WMCancelMode
+ 0001:00008AC8       TORListBox.WMMove
+ 0001:00008AE8       TORListBox.WMSize
+ 0001:00008B30       TORListBox.WMVScroll
+ 0001:00008B54       TORListBox.CMHintShow
+ 0001:00008BB0       TORListBox.Click
+ 0001:00008BCC       TORListBox.DoChange
+ 0001:00008C10       TORListBox.DoEnter
+ 0001:00008C1C       TORListBox.DoExit
+ 0001:00008C40       TORListBox.DestroyItems
+ 0001:00008CB8       TORListBox.ToggleCheckBox
+ 0001:00008DA8       TORListBox.KeyPress
+ 0001:00008DD8       TORListBox.MouseDown
+ 0001:00008E58       TORListBox.MouseMove
+ 0001:00009018       TORListBox.MeasureItem
+ 0001:000090BC       TORListBox.WMDestroy
+ 0001:000090E8       TORListBox.CNDrawItem
+ 0001:0000910C       TORListBox.DrawItem
+ 0001:00009544       TORListBox.GetIndexFromY
+ 0001:000095D8       TORListBox.SetFocusIndex
+ 0001:00009898       TORListBox.UMShowTip
+ 0001:000099D0       TORListBox.GetIEN
+ 0001:00009A80       TORListBox.GetItemIEN
+ 0001:00009B30       TORListBox.SelectByIEN
+ 0001:00009B94       TORListBox.SetExactByIEN
+ 0001:00009C94       TORListBox.GetItemID
+ 0001:00009D30       TORListBox.SelectByID
+ 0001:00009DF4       TORListBox.GetReference
+ 0001:00009E90       TORListBox.SetReference
+ 0001:00009F64       TORListBox.AddReference
+ 0001:00009FD4       TORListBox.InsertReference
+ 0001:0000A048       TORListBox.IndexOfReference
+ 0001:0000A0FC       TORListBox.GetTabPositions
+ 0001:0000A138       TORListBox.SetTabPositions
+ 0001:0000A2E4       TORListBox.SetTabPosInPixels
+ 0001:0000A2FC       TORListBox.SetTabStops
+ 0001:0000A48C       TORListBox.SetHideSynonyms
+ 0001:0000A550       TORListBox.SetSynonymChars
+ 0001:0000A5E4       TORListBox.GetStyle
+ 0001:0000A5EC       TORListBox.SetStyle
+ 0001:0000A620       TORListBox.SetDelimiter
+ 0001:0000A630       TORListBox.GetPieces
+ 0001:0000A650       TORListBox.SetPieces
+ 0001:0000A674       TORListBox.ResetItems
+ 0001:0000A850       TORListBox.SetLongList
+ 0001:0000A888       TORListBox.AdjustScrollBar
+ 0001:0000A918       TORListBox.CreateScrollBar
+ 0001:0000A9C8       TORListBox.FreeScrollBar
+ 0001:0000A9EC       TORListBox.ForDataUse
+ 0001:0000ACA4       TORListBox.InitLongList
+ 0001:0000AE40       TORListBox.InsertSeparator
+ 0001:0000AEE8       TORListBox.ClearTop
+ 0001:0000AF4C       ClearLong
+ 0001:0000B03C       TORListBox.NeedData
+ 0001:0000B354       TORListBox.PositionThumb
+ 0001:0000B404       TORListBox.ScrollTo
+ 0001:0000B844       TORListBox.GetStringIndex
+ 0001:0000B98C       TORListBox.SelectString
+ 0001:0000BC94       TORListBox.SetCheckBoxes
+ 0001:0000BCE0       TORListBox.SetFlatCheckBoxes
+ 0001:0000BCF8       TORListBox.GetChecked
+ 0001:0000BD40       TORListBox.SetChecked
+ 0001:0000BDD4       TORListBox.GetCheckedState
+ 0001:0000BE10       TORListBox.SetCheckedState
+ 0001:0000BE94       TORListBox.GetMultiSelect
+ 0001:0000BE9C       TORListBox.SetMultiSelect
+ 0001:0000BEC0       TORListBox.GetCheckedString
+ 0001:0000BF68       TORListBox.SetCheckedString
+ 0001:0000C004       TORListBox.GetMItems
+ 0001:0000C03C       TORListBox.SetMItems
+ 0001:0000C080       TORListBox.Clear
+ 0001:0000C09C       TORListBox.SetCaption
+ 0001:0000C13C       TORListBox.GetCaption
+ 0001:0000C158       TORListBox.MakeAccessible
+ 0001:0000C220       TORListBox.WMGetObject
+ 0001:0000C258       TORDropPanel.BtnClicked
+ 0001:0000C290       TORDropPanel.Create
+ 0001:0000C308       TORDropPanel.CreateParams
+ 0001:0000C348       TORDropPanel.GetButton
+ 0001:0000C3F8       TORDropPanel.ResetButtons
+ 0001:0000C42C       TORDropPanel.Resize
+ 0001:0000C4C4       TORDropPanel.UpdateButtons
+ 0001:0000C648       TORDropPanel.WMActivateApp
+ 0001:0000C6A8       TORComboEdit.CreateParams
+ 0001:0000C6C8       TORComboEdit.WMKillFocus
+ 0001:0000C740       TORComboEdit.WMSetFocus
+ 0001:0000C79C       TORComboBox.Create
+ 0001:0000C93C       TORComboBox.WMDestroy
+ 0001:0000C96C       TORComboBox.CMFontChanged
+ 0001:0000C984       TORComboBox.WMMove
+ 0001:0000C9A0       TORComboBox.WMSize
+ 0001:0000C9B8       TORComboBox.WMTimer
+ 0001:0000CA18       TORComboBox.EditControl
+ 0001:0000CA2C       TORComboBox.AdjustSizeOfSelf
+ 0001:0000CBAC       TORComboBox.DropButtonDown
+ 0001:0000CBDC       TORComboBox.DropButtonUp
+ 0001:0000CC0C       TORComboBox.DoEnter
+ 0001:0000CC34       TORComboBox.UMGotFocus
+ 0001:0000CC64       TORComboBox.DoExit
+ 0001:0000CCAC       TORComboBox.Loaded
+ 0001:0000CCC8       TORComboBox.FwdChange
+ 0001:0000CCFC       TORComboBox.FwdChangeDelayed
+ 0001:0000D00C       TORComboBox.FwdClick
+ 0001:0000D160       TORComboBox.FwdDblClick
+ 0001:0000D184       TORComboBox.FwdKeyDown
+ 0001:0000D55C       TORComboBox.FwdKeyPress
+ 0001:0000D5A4       TORComboBox.FwdKeyUp
+ 0001:0000D610       TORComboBox.FwdMouseUp
+ 0001:0000D634       TORComboBox.FwdNeedData
+ 0001:0000D6AC       TORComboBox.SetDropDownCount
+ 0001:0000D6B8       TORComboBox.SetDroppedDown
+ 0001:0000D904       TORComboBox.SetEditRect
+ 0001:0000D9D4       TORComboBox.SetEditText
+ 0001:0000DA78       TORComboBox.SetItemIndex
+ 0001:0000DB5C       TORComboBox.SelectByIEN
+ 0001:0000DB88       TORComboBox.SelectByID
+ 0001:0000DBAC       TORComboBox.SetExactByIEN
+ 0001:0000DBD8       TORComboBox.SetStyle
+ 0001:0000DDB8       TORComboBox.StartKeyTimer
+ 0001:0000DE28       TORComboBox.StopKeyTimer
+ 0001:0000DE54       TORComboBox.AddReference
+ 0001:0000DEB8       TORComboBox.Clear
+ 0001:0000DEE0       TORComboBox.ClearTop
+ 0001:0000DEF0       TORComboBox.ForDataUse
+ 0001:0000DF00       TORComboBox.InitLongList
+ 0001:0000DF50       TORComboBox.IndexOfReference
+ 0001:0000DFB0       TORComboBox.InsertReference
+ 0001:0000E018       TORComboBox.InsertSeparator
+ 0001:0000E028       TORComboBox.GetAutoSelect
+ 0001:0000E038       TORComboBox.GetColor
+ 0001:0000E044       TORComboBox.GetDelimiter
+ 0001:0000E054       TORComboBox.GetDisplayText
+ 0001:0000E074       TORComboBox.GetItemHeight
+ 0001:0000E084       TORComboBox.GetIEN
+ 0001:0000E0A8       TORComboBox.GetItemID
+ 0001:0000E0C4       TORComboBox.GetItemIEN
+ 0001:0000E0E8       TORComboBox.GetItemIndex
+ 0001:0000E0FC       TORComboBox.GetItemTipEnable
+ 0001:0000E10C       TORComboBox.GetItemTipColor
+ 0001:0000E11C       TORComboBox.GetLongList
+ 0001:0000E12C       TORComboBox.GetMaxLength
+ 0001:0000E13C       TORComboBox.GetPieces
+ 0001:0000E158       TORComboBox.GetReference
+ 0001:0000E178       TORComboBox.GetSelLength
+ 0001:0000E18C       TORComboBox.GetSelStart
+ 0001:0000E1A0       TORComboBox.GetSelText
+ 0001:0000E1C0       TORComboBox.GetShortCount
+ 0001:0000E1D0       TORComboBox.GetSorted
+ 0001:0000E1E0       TORComboBox.GetHideSynonyms
+ 0001:0000E1F0       TORComboBox.GetSynonymChars
+ 0001:0000E210       TORComboBox.SetHideSynonyms
+ 0001:0000E220       TORComboBox.SetSynonymChars
+ 0001:0000E270       TORComboBox.GetTabPositions
+ 0001:0000E28C       TORComboBox.GetTabPosInPixels
+ 0001:0000E29C       TORComboBox.GetText
+ 0001:0000E2B8       TORComboBox.SelectAll
+ 0001:0000E2C8       TORComboBox.SetAutoSelect
+ 0001:0000E2D8       TORComboBox.SetColor
+ 0001:0000E310       TORComboBox.SetDelimiter
+ 0001:0000E320       TORComboBox.SetItemHeight
+ 0001:0000E330       TORComboBox.SetItemTipEnable
+ 0001:0000E340       TORComboBox.SetItemTipColor
+ 0001:0000E350       TORComboBox.SetLongList
+ 0001:0000E360       TORComboBox.SetMaxLength
+ 0001:0000E370       TORComboBox.SetPieces
+ 0001:0000E380       TORComboBox.SetReference
+ 0001:0000E3E0       TORComboBox.SetSelLength
+ 0001:0000E3F8       TORComboBox.SetSelStart
+ 0001:0000E410       TORComboBox.SetSelText
+ 0001:0000E420       TORComboBox.SetSorted
+ 0001:0000E430       TORComboBox.SetTabPositions
+ 0001:0000E440       TORComboBox.SetTabPosInPixels
+ 0001:0000E450       TORComboBox.SetText
+ 0001:0000E460       TORComboBox.SetItems
+ 0001:0000E474       TORComboBox.GetCheckBoxes
+ 0001:0000E484       TORComboBox.GetChecked
+ 0001:0000E494       TORComboBox.GetCheckEntireLine
+ 0001:0000E4A4       TORComboBox.GetFlatCheckBoxes
+ 0001:0000E4B4       TORComboBox.SetCheckBoxes
+ 0001:0000E6A8       TORComboBox.SetChecked
+ 0001:0000E6E0       TORComboBox.SetCheckEntireLine
+ 0001:0000E6F0       TORComboBox.SetFlatCheckBoxes
+ 0001:0000E700       TORComboBox.DropPanelBtnPressed
+ 0001:0000E768       TORComboBox.GetCheckedString
+ 0001:0000E784       TORComboBox.SetCheckedString
+ 0001:0000E794       TORComboBox.SetCheckBoxEditColor
+ 0001:0000E7C8       TORComboBox.SetListItemsOnly
+ 0001:0000E7E8       TORComboBox.SetOnCheckedText
+ 0001:0000E850       TORComboBox.SetTemplateField
+ 0001:0000E898       TORComboBox.GetOnSynonymCheck
+ 0001:0000E8B0       TORComboBox.SetOnSynonymCheck
+ 0001:0000E8D0       TORComboBox.GetEnabled
+ 0001:0000E8DC       TORComboBox.SetEnabled
+ 0001:0000E928       TORComboBox.GetEditBoxText
+ 0001:0000EA38       TORComboBox.UpdateCheckEditBoxText
+ 0001:0000EAB8       TORComboBox.CheckBoxSelected
+ 0001:0000EAEC       TORComboBox.GetMItems
+ 0001:0000EAF4       TORComboBox.SetCaption
+ 0001:0000EB04       TORComboBox.GetCaption
+ 0001:0000EB20       TORComboBox.MakeAccessible
+ 0001:0000EB78       TORComboBox.GetCaseChanged
+ 0001:0000EB88       TORComboBox.SetCaseChanged
+ 0001:0000EB98       TORComboBox.GetLookupPiece
+ 0001:0000EBA8       TORComboBox.SetLookupPiece
+ 0001:0000EBB8       TSizeRatio.Create
+ 0001:0000EC30       TORAutoPanel.Destroy
+ 0001:0000ECA8       TORAutoPanel.BuildSizes
+ 0001:0000EDA0       TORAutoPanel.Loaded
+ 0001:0000EDD4       TORAutoPanel.DoResize
+ 0001:0000EF7C       TORAutoPanel.Resize
+ 0001:0000EFA8       TOROffsetLabel.Create
+ 0001:0000F008       TOROffsetLabel.CMTextChanged
+ 0001:0000F020       TOROffsetLabel.CMFontChanged
+ 0001:0000F038       TOROffsetLabel.AdjustSizeOfSelf
+ 0001:0000F0D8       TOROffsetLabel.DoDrawText
+ 0001:0000F178       TOROffsetLabel.Paint
+ 0001:0000F214       TOROffsetLabel.GetTransparent
+ 0001:0000F220       TOROffsetLabel.SetTransparent
+ 0001:0000F264       TOROffsetLabel.SetVertOffset
+ 0001:0000F274       TOROffsetLabel.SetHorzOffset
+ 0001:0000F284       TOROffsetLabel.SetWordWrap
+ 0001:0000F29C       TORAlignButton.Create
+ 0001:0000F2EC       TORAlignButton.CreateParams
+ 0001:0000F338       TORAlignButton.SetAlignment
+ 0001:0000F350       TORAlignButton.SetLayout
+ 0001:0000F368       TORAlignButton.SetWordWrap
+ 0001:0000F380       TORTreeNode.EnsureVisible
+ 0001:0000F430       TORTreeNode.GetBold
+ 0001:0000F46C       TORTreeNode.GetORTreeView
+ 0001:0000F488       TORTreeNode.GetParent
+ 0001:0000F4A4       TORTreeNode.GetText
+ 0001:0000F4BC       TORTreeNode.SetBold
+ 0001:0000F500       TORTreeNode.SetPiece
+ 0001:0000F544       TORTreeNode.SetStringData
+ 0001:0000F5F0       TORTreeNode.SetText
+ 0001:0000F5FC       TORTreeNode.UpdateText
+ 0001:0000F68C       TORTreeNode.MakeAccessible
+ 0001:0000F750       TORTreeNode.WMGetObject
+ 0001:0000F784       CalcShortName
+ 0001:0000F9B0       TORTreeNode.SetCaption
+ 0001:0000FA60       TORTreeView.CNNotify
+ 0001:0000FAEC       TORTreeView.Create
+ 0001:0000FB2C       TORTreeView.CreateNode
+ 0001:0000FB68       TORTreeView.FindPieceNode
+ 0001:0000FBC8       TORTreeView.FindPieceNode
+ 0001:0000FCB0       TORTreeView.GetExpandedIDStr
+ 0001:0000FDAC       TORTreeView.SetExpandedIDStr
+ 0001:0000FDBC       TORTreeView.SetExpandedIDStr
+ 0001:0000FF30       TORTreeView.GetHorzScrollPos
+ 0001:0000FF48       TORTreeView.GetVertScrollPos
+ 0001:0000FF60       TORTreeView.RenameNodes
+ 0001:0001001C       TORTreeView.SetNodeDelim
+ 0001:00010034       TORTreeView.SetHorzScrollPos
+ 0001:00010070       TORTreeView.SetNodePiece
+ 0001:00010088       TORTreeView.SetVertScrollPos
+ 0001:000100C4       TORTreeView.GetNodeID
+ 0001:000100EC       TORTreeView.GetNodeID
+ 0001:000101B0       TORTreeView.MakeAccessible
+ 0001:00010278       TORTreeView.WMGetObject
+ 0001:000102B0       TORTreeView.SetShortNodeCaptions
+ 0001:000102C0       TORCBImageIndexes.Create
+ 0001:00010344       TORCBImageIndexes.Destroy
+ 0001:00010378       TORCBImageIndexes.SetImages
+ 0001:000103B8       RStr
+ 0001:000103F4       TORCBImageIndexes.IdxString
+ 0001:000104D8       TORCBImageIndexes.SetIdxString
+ 0001:00010638       TORCBImageIndexes.ImageListChanged
+ 0001:0001066C       TORCBImageIndexes.Notification
+ 0001:0001069C       TORCBImageIndexes.SetCheckedDisabledIndex
+ 0001:000106B0       TORCBImageIndexes.SetCheckedEnabledIndex
+ 0001:000106C4       TORCBImageIndexes.SetGrayedDisabledIndex
+ 0001:000106D8       TORCBImageIndexes.SetGrayedEnabledIndex
+ 0001:000106EC       TORCBImageIndexes.SetUncheckedDisabledIndex
+ 0001:00010700       TORCBImageIndexes.SetUncheckedEnabledIndex
+ 0001:00010714       TORCheckBox.Create
+ 0001:00010770       TORCheckBox.ListViewCreate
+ 0001:000107BC       TORCheckBox.CreateCommon
+ 0001:000107EC       TORCheckBox.Destroy
+ 0001:00010834       TORCheckBox.GetImageIndexes
+ 0001:00010850       TORCheckBox.GetImageList
+ 0001:0001085C       TORCheckBox.SetImageIndexes
+ 0001:0001086C       TORCheckBox.SetImageList
+ 0001:0001087C       TORCheckBox.Toggle
+ 0001:00010908       TORCheckBox.CreateParams
+ 0001:00010924       TORCheckBox.CMEnabledChanged
+ 0001:0001093C       TORCheckBox.CMFontChanged
+ 0001:00010954       TORCheckBox.CNDrawItem
+ 0001:00010970       TORCheckBox.CNMeasureItem
+ 0001:00010994       TORCheckBox.GetDrawData
+ 0001:00010F3C       TORCheckBox.DrawItem
+ 0001:00011324       TORCheckBox.SetGrayedStyle
+ 0001:00011348       TORCheckBox.WMLButtonDblClk
+ 0001:00011360       TORCheckBox.WMSize
+ 0001:00011388       TORCheckBox.BMSetCheck
+ 0001:0001148C       TORCheckBox.SetWordWrap
+ 0001:000114B4       TORCheckBox.SetAutoSize
+ 0001:000114DC       TORCheckBox.AutoAdjustSize
+ 0001:000116B0       TORCheckBox.GetCaption
+ 0001:000116C8       TORCheckBox.SetCaption
+ 0001:00011730       TORCheckBox.SetAllowAllUnchecked
+ 0001:00011740       TORCheckBox.SetGroupIndex
+ 0001:00011770       TORCheckBox.SyncAllowAllUnchecked
+ 0001:000117EC       TORCheckBox.SetParent
+ 0001:00011804       TORCheckBox.SetRadioStyle
+ 0001:00011814       TORCheckBox.SetAssociate
+ 0001:00011850       EnableCtrl
+ 0001:000118EC       TORCheckBox.UpdateAssociate
+ 0001:0001190C       TORCheckBox.Notification
+ 0001:00011940       TORCheckBox.SetFocusOnBox
+ 0001:00011950       TORCheckBox.BMGetCheck
+ 0001:0001197C       TORCheckBox.BMGetState
+ 0001:00011980       TORListView.WMNotify
+ 0001:00011A48       TORListView.LVMSetColumn
+ 0001:00011AFC       TORListView.LVMSetColumnWidth
+ 0001:00011BB0       TORComboPanelEdit.Destroy
+ 0001:00011BE8       TORComboPanelEdit.Paint
+ 0001:00011CB0       TKeyClickPanel.KeyDown
+ 0001:00011CD8       TKeyClickRadioGroup.Click
+ 0001:00011D10       TKeyClickRadioGroup.Create
+ 0001:00011D70       TKeyClickRadioGroup.KeyDown
+ 0001:00011DE0       TCaptionListBox.DoEnter
+ 0001:00011E04       TCaptionListBox.GetCaption
+ 0001:00011E30       TCaptionListBox.MakeAccessible
+ 0001:00011EF8       TCaptionListBox.SetCaption
+ 0001:00011F7C       TCaptionListBox.WMGetObject
+ 0001:00011FB4       TCaptionListBox.WMMouseMove
+ 0001:00012074       TCaptionListBox.WMRButtonUp
+ 0001:000121A8       TCaptionCheckListBox.GetCaption
+ 0001:000121D4       TCaptionCheckListBox.SetCaption
+ 0001:00012258       TCaptionMemo.GetCaption
+ 0001:00012284       TCaptionMemo.SetCaption
+ 0001:00012308       TCaptionEdit.GetCaption
+ 0001:00012334       TCaptionEdit.SetCaption
+ 0001:000123B8       TCaptionRichEdit.MakeAccessible
+ 0001:0001247C       TCaptionRichEdit.WMGetObject
+ 0001:000124B4       TCaptionTreeView.GetCaption
+ 0001:000124CC       TCaptionTreeView.SetCaption
+ 0001:0001255C       TCaptionComboBox.GetCaption
+ 0001:00012588       TCaptionComboBox.SetCaption
+ 0001:0001260C       TORAlignSpeedButton.Paint
+ 0001:00012684       GoodNotifyWinEvent
+ 0001:0001268C       TCaptionStringGrid.ColRowToIndex
+ 0001:000126DC       TCaptionStringGrid.IndexToColRow
+ 0001:00012740       TCaptionStringGrid.KeyUp
+ 0001:000127B8       TCaptionStringGrid.MakeAccessible
+ 0001:0001287C       TCaptionStringGrid.WMGetObject
+ 0001:000128B4       IsAMouseButtonDown
+ 0001:000128EC       TORComboBox.SetNumForMatch
+ 0001:00012914       TORComboBox.SetUniqueAutoComplete
+ 0001:0001291C       TORListBox.VerifyUnique
+ 0001:00012A18       TORComboBox.SetTextAutoComplete
+ 0001:00012A94       Finalization
+ 0001:00012AE0       ORCtrls
+ 0001:00012DE4       TORImageIndexesPropertyEditor.Modified
+ 0001:00012DF0       TORImageIndexesPropertyEditor.GetAttributes
+ 0001:00012DFC       TORImageIndexesPropertyEditor.GetProperties
+ 0001:00012E30       TORImageIndexesPropertyEditor.GetValue
+ 0001:00012E48       TORImageIndexesPropertyEditor.SetValue
+ 0001:00012E54       TORImageIndexesElementPropertyEditor.Create
+ 0001:00012EA0       TORImageIndexesElementPropertyEditor.ParentImgIdx
+ 0001:00012EDC       TORImageIndexesElementPropertyEditor.GetAttributes
+ 0001:00012EE8       TORImageIndexesElementPropertyEditor.GetName
+ 0001:00013024       TORImageIndexesElementPropertyEditor.GetValue
+ 0001:000130EC       TORImageIndexesElementPropertyEditor.SetValue
+ 0001:000131A0       Register
+ 0001:000132B0       Finalization
+ 0001:000132E0       ORCtrlsDsgn
+ 0001:00013528       @GetPackageInfoTable
+ 0001:00013530       @PackageLoad
+ 0001:0001353C       @PackageUnload
+ 0001:00013548       ORCtrlLib60
  0002:00000000       Module
  0002:00000018       TlsProc
@@ -1232,6 +1236,6 @@
  0002:00001034       .1
  0002:00001038       .1
- 0002:0000103C       .3
- 0002:00001040       .1
+ 0002:0000103C       .1
+ 0002:00001040       .3
  0002:00001044       .1
  0002:00001048       .1
@@ -1252,853 +1256,857 @@
 Line numbers for Accessibility_TLB(..\CPRS-Chart\Accessibility_TLB.pas) segment .text
 
-   149 0001:00001B90   149 0001:00001B97
+   149 0001:000009E0   149 0001:000009E7
 
 Line numbers for uAccessAPI(uAccessAPI.pas) segment .text
 
-   115 0001:00001B98   116 0001:00001BA1   118 0001:00001BAA   119 0001:00001BC5
-   122 0001:00001BCE   123 0001:00001BD5   126 0001:00001BDC   127 0001:00001BE5
-   129 0001:00001BEE   130 0001:00001C09   133 0001:00001C12   134 0001:00001C19
-   137 0001:00001C20   138 0001:00001C40   140 0001:00001C49   143 0001:00001C60
-   144 0001:00001C84   161 0001:00001C88   162 0001:00001CAA   164 0001:00001CCA
-   147 0001:00001CCC   148 0001:00001CD8   149 0001:00001CE7   151 0001:00001CF0
-   152 0001:00001D05   156 0001:00001D1C   157 0001:00001D23   160 0001:00001D2A
+   115 0001:00001AD8   116 0001:00001AE1   118 0001:00001AEA   119 0001:00001B05
+   122 0001:00001B0E   123 0001:00001B15   126 0001:00001B1C   127 0001:00001B25
+   129 0001:00001B2E   130 0001:00001B49   133 0001:00001B52   134 0001:00001B59
+   137 0001:00001B60   138 0001:00001B80   140 0001:00001B89   143 0001:00001BA0
+   144 0001:00001BC4   161 0001:00001BC8   162 0001:00001BEA   164 0001:00001C0A
+   147 0001:00001C0C   148 0001:00001C18   149 0001:00001C27   151 0001:00001C30
+   152 0001:00001C45   156 0001:00001C5C   157 0001:00001C63   160 0001:00001C6A
 
 Line numbers for ORCtrls(ORCtrls.pas) segment .text
 
-  1077 0001:000062A0  1080 0001:000062A4  1081 0001:000062A7  1083 0001:000062B0
-  1084 0001:000062BA  1087 0001:000062CD  1088 0001:000062DF  1096 0001:000062E4
-  1097 0001:000062ED  1098 0001:000062F7  1099 0001:00006305  1100 0001:00006312
-  1101 0001:00006320  1102 0001:00006334  1104 0001:0000636C  1107 0001:0000638E
-  1109 0001:000063A4  1117 0001:000063F0  1118 0001:000063FB  1119 0001:00006404
-  1120 0001:0000640D  1121 0001:00006417  1122 0001:0000641A  1123 0001:00006421
-  1124 0001:0000642B  1129 0001:00006434  1130 0001:00006436  1131 0001:0000643E
-  1136 0001:00006440  1137 0001:00006442  1138 0001:0000644A  1145 0001:0000644C
-  1146 0001:0000645A  1147 0001:0000645F  1148 0001:00006468  1151 0001:00006473
-  1152 0001:0000647D  1153 0001:00006482  1149 0001:0000648B  1155 0001:00006494
-  1156 0001:0000649F  1157 0001:000064C3  1164 0001:000064CC  1165 0001:000064F7
-  1166 0001:000064FC  1167 0001:00006508  1170 0001:00006516  1171 0001:00006520
-  1172 0001:00006525  1168 0001:00006531  1174 0001:0000653A  1175 0001:00006547
-  1176 0001:0000654C  1177 0001:0000657D  1178 0001:000065E7  1184 0001:000065F0
-  1185 0001:00006614  1186 0001:0000661B  1187 0001:00006670  1188 0001:000066AD
-  1195 0001:000066C0  1196 0001:000066E8  1198 0001:00006707  1200 0001:00006718
-  1201 0001:00006742  1204 0001:00006760  1205 0001:0000676B  1207 0001:0000677B
-  1208 0001:00006790  1210 0001:0000679E  1211 0001:000067B8  1213 0001:000067DA
-  1214 0001:00006820  1218 0001:00006834  1219 0001:00006842  1220 0001:00006844
-  1221 0001:00006863  1227 0001:0000686C  1228 0001:00006873  1229 0001:00006884
-  1230 0001:00006898  1235 0001:000068A0  1236 0001:000068A3  1237 0001:000068C5
-  1238 0001:000068D3  1241 0001:000068D8  1242 0001:000068DB  1243 0001:000068E9
-  1244 0001:00006905  1248 0001:00006908  1249 0001:0000691D  1250 0001:00006926
-  1251 0001:00006956  1255 0001:0000695C  1256 0001:0000696A  1257 0001:00006975
-  1258 0001:00006981  1259 0001:00006993  1263 0001:00006998  1264 0001:0000699E
-  1265 0001:000069A5  1266 0001:000069AC  1267 0001:000069BC  1268 0001:000069C0
-  1276 0001:000069C4  1277 0001:000069E2  1278 0001:000069EC  1280 0001:000069F2
-  1281 0001:00006A01  1282 0001:00006A15  1286 0001:00006A59  1288 0001:00006AA3
-  1292 0001:00006AAC  1293 0001:00006AB2  1297 0001:00006ABB  1298 0001:00006AD0
-  1299 0001:00006AD7  1300 0001:00006AE6  1302 0001:00006AED  1308 0001:00006AF0
-  1309 0001:00006AFB  1310 0001:00006B07  1311 0001:00006B11  1313 0001:00006B16
-  1314 0001:00006B25  1318 0001:00006B3C  1319 0001:00006B5C  1320 0001:00006B73
-  1321 0001:00006BA0  1323 0001:00006BB5  1325 0001:00006BBA  1326 0001:00006BBE
-  1329 0001:00006BF2  1330 0001:00006C03  1332 0001:00006C0D  1323 0001:00006C0E
-  1333 0001:00006C13  1340 0001:00006C1C  1341 0001:00006C42  1342 0001:00006C53
-  1343 0001:00006C67  1345 0001:00006C70  1346 0001:00006C83  1349 0001:00006C98
-  1350 0001:00006CB2  1352 0001:00006CC5  1353 0001:00006CF3  1355 0001:00006D2E
-  1357 0001:00006D35  1360 0001:00006D7A  1361 0001:00006D89  1362 0001:00006D90
-  1363 0001:00006D95  1364 0001:00006D9B  1366 0001:00006DAA  1367 0001:00006DB4
-  1369 0001:00006DBE  1370 0001:00006DC2  1372 0001:00006DCE  1373 0001:00006DD0
-  1375 0001:00006DE3  1377 0001:00006DF8  1378 0001:00006E07  1381 0001:00006E14
-  1383 0001:00006E16  1384 0001:00006E1D  1385 0001:00006E39  1387 0001:00006E5F
-  1388 0001:00006E95  1393 0001:00006EC0  1394 0001:00006ED3  1395 0001:00006ED9
-  1396 0001:00006EDF  1397 0001:00006EE5  1398 0001:00006EF7  1399 0001:00006F1A
-  1400 0001:00006F24  1421 0001:00007090  1422 0001:000070A7  1424 0001:000070B6
-  1425 0001:000070C9  1427 0001:000070F1  1428 0001:00007117  1434 0001:0000711C
-  1435 0001:00007121  1437 0001:00007128  1438 0001:0000712E  1439 0001:00007133
-  1435 0001:00007136  1440 0001:0000713A  1444 0001:00007140  1445 0001:00007146
-  1446 0001:0000714D  1447 0001:00007157  1448 0001:00007165  1451 0001:00007168
-  1452 0001:0000716E  1453 0001:00007175  1454 0001:0000717F  1455 0001:0000718D
-  1463 0001:00007190  1464 0001:000071AF  1465 0001:000071B5  1466 0001:000071B9
-  1467 0001:000071D2  1468 0001:000071D8  1469 0001:00007205  1474 0001:0000720C
-  1475 0001:00007213  1476 0001:0000721A  1477 0001:00007222  1478 0001:00007225
-  1479 0001:00007229  1480 0001:00007231  1481 0001:00007234  1484 0001:00007238
-  1485 0001:00007250  1486 0001:0000725F  1487 0001:00007262  1488 0001:0000726E
-  1489 0001:00007289  1494 0001:00007290  1495 0001:0000729A  1496 0001:000072A1
-  1497 0001:000072AB  1498 0001:000072AE  1499 0001:000072B2  1500 0001:000072BC
-  1501 0001:000072BF  1504 0001:000072C4  1505 0001:000072D2  1506 0001:000072DA
-  1507 0001:000072F1  1510 0001:000072F8  1511 0001:00007305  1512 0001:0000730C
-  1513 0001:00007319  1516 0001:00007320  1517 0001:00007326  1518 0001:0000732D
-  1519 0001:00007335  1522 0001:00007338  1523 0001:00007341  1524 0001:00007348
-  1525 0001:00007352  1528 0001:00007358  1529 0001:00007361  1530 0001:00007368
-  1531 0001:00007372  1536 0001:00007378  1537 0001:0000739B  1538 0001:000073A2
-  1539 0001:000073AF  1540 0001:000073B5  1541 0001:000073B9  1542 0001:000073D2
-  1543 0001:000073F5  1549 0001:000073FC  1550 0001:0000741F  1551 0001:0000742C
-  1552 0001:00007432  1553 0001:00007436  1554 0001:0000744F  1555 0001:00007472
-  1558 0001:0000747C  1559 0001:00007486  1560 0001:00007490  1563 0001:00007498
-  1564 0001:0000749B  1565 0001:0000749F  1567 0001:000074A9  1568 0001:000074B1
-  1577 0001:000074B4  1578 0001:000074D7  1579 0001:000074E1  1580 0001:000074E7
-  1581 0001:000074FD  1582 0001:00007504  1583 0001:0000751A  1584 0001:00007529
-  1585 0001:00007537  1586 0001:00007541  1587 0001:00007557  1588 0001:00007582
-  1589 0001:000075AD  1590 0001:000075B9  1592 0001:000075C3  1593 0001:000075DB
-  1594 0001:000075E7  1595 0001:0000762B  1596 0001:00007637  1598 0001:00007687
-  1599 0001:000076A0  1600 0001:000076AD  1601 0001:000076BE  1603 0001:000076E3
-  1607 0001:000076F2  1608 0001:00007724  1612 0001:00007756  1592 0001:00007757
-  1613 0001:00007760  1614 0001:0000776C  1615 0001:0000777B  1618 0001:000077A7
-  1621 0001:000077E6  1627 0001:00007900  1628 0001:00007915  1629 0001:0000791E
-  1630 0001:00007923  1631 0001:0000792D  1632 0001:00007937  1633 0001:0000793E
-  1634 0001:00007948  1635 0001:0000794F  1636 0001:00007956  1637 0001:0000795D
-  1638 0001:00007964  1639 0001:0000796B  1640 0001:00007972  1641 0001:0000797C
-  1642 0001:00007986  1643 0001:0000798F  1644 0001:00007996  1645 0001:000079A6
-  1646 0001:000079AD  1647 0001:000079B4  1648 0001:000079BB  1649 0001:000079C2
-  1650 0001:000079C9  1651 0001:000079E8  1655 0001:000079F8  1656 0001:00007A06
-  1657 0001:00007A11  1658 0001:00007A24  1659 0001:00007A2B  1660 0001:00007A30
-  1661 0001:00007A47  1665 0001:00007A4C  1666 0001:00007A52  1667 0001:00007A59
-  1668 0001:00007A60  1676 0001:00007A64  1677 0001:00007A6B  1678 0001:00007A72
-  1679 0001:00007A74  1681 0001:00007A7E  1682 0001:00007A81  1684 0001:00007A85
-  1685 0001:00007A8C  1687 0001:00007A96  1688 0001:00007A99  1690 0001:00007A9E
-  1691 0001:00007AA5  1692 0001:00007AB5  1696 0001:00007ABC  1697 0001:00007AC2
-  1698 0001:00007AC9  1699 0001:00007AE4  1700 0001:00007AEB  1705 0001:00007AF0
-  1706 0001:00007AF6  1707 0001:00007AFD  1708 0001:00007B04  1709 0001:00007B0B
-  1715 0001:00007B10  1716 0001:00007B3D  1718 0001:00007B47  1719 0001:00007B4E
-  1720 0001:00007B59  1719 0001:00007BA4  1721 0001:00007BA7  1725 0001:00007BBD
-  1727 0001:00007C02  1733 0001:00007C0C  1734 0001:00007C2D  1735 0001:00007C31
-  1737 0001:00007C4B  1738 0001:00007C59  1739 0001:00007C5E  1740 0001:00007C6A
-  1739 0001:00007CA7  1741 0001:00007CAA  1742 0001:00007CB6  1743 0001:00007CC0
-  1745 0001:00007CF5  1752 0001:00007CFC  1753 0001:00007D0F  1754 0001:00007D16
-  1755 0001:00007D1D  1756 0001:00007D37  1757 0001:00007D3E  1759 0001:00007D42
-  1761 0001:00007D50  1775 0001:00007D58  1776 0001:00007D61  1777 0001:00007D6A
-  1779 0001:00007D73  1780 0001:00007D76  1781 0001:00007D7A  1783 0001:00007D82
-  1785 0001:00007D87  1791 0001:00007D8C  1792 0001:00007D95  1794 0001:00007D9E
-  1795 0001:00007DA5  1796 0001:00007DBD  1797 0001:00007DC4  1798 0001:00007DC8
-  1799 0001:00007DCE  1800 0001:00007DD1  1801 0001:00007DFC  1803 0001:00007E08
-  1804 0001:00007E11  1811 0001:00007E18  1812 0001:00007E32  1813 0001:00007E3B
-  1815 0001:00007E4A  1816 0001:00007E51  1817 0001:00007E69  1818 0001:00007E70
-  1820 0001:00007E74  1821 0001:00007E7B  1822 0001:00007E8C  1823 0001:00007E9E
-  1824 0001:00007EA9  1828 0001:00007EB2  1829 0001:00007EBC  1832 0001:00007EDE
-  1838 0001:00007EE4  1839 0001:00007EFE  1840 0001:00007F07  1842 0001:00007F16
-  1843 0001:00007F1D  1844 0001:00007F35  1845 0001:00007F39  1847 0001:00007F57
-  1848 0001:00007F5C  1850 0001:00007F80  1857 0001:00007F88  1858 0001:00007F92
-  1860 0001:00007F9F  1862 0001:00007FA8  1864 0001:00007FBA  1865 0001:00007FC3
-  1866 0001:00007FD8  1869 0001:00007FDD  1870 0001:00007FEF  1872 0001:00007FF1
-  1873 0001:00007FF6  1874 0001:00007FFA  1876 0001:00008008  1877 0001:0000800F
-  1878 0001:00008018  1880 0001:0000801F  1881 0001:00008029  1883 0001:0000802F
-  1884 0001:00008036  1885 0001:0000804D  1887 0001:00008056  1889 0001:00008065
-  1890 0001:0000806E  1896 0001:00008074  1897 0001:0000807E  1899 0001:0000808B
-  1901 0001:00008094  1903 0001:0000809D  1904 0001:000080A4  1908 0001:000080B4
-  1910 0001:000080BF  1911 0001:000080D6  1913 0001:000080DF  1916 0001:000080ED
-  1917 0001:000080FF  1919 0001:00008101  1920 0001:00008106  1921 0001:0000810A
-  1923 0001:00008118  1924 0001:0000811F  1925 0001:00008128  1926 0001:0000812F
-  1927 0001:00008139  1929 0001:0000813F  1930 0001:00008146  1931 0001:0000815D
-  1933 0001:00008166  1935 0001:00008175  1936 0001:0000817E  1942 0001:00008184
-  1945 0001:0000818D  1946 0001:00008194  1947 0001:000081AC  1948 0001:000081B3
-  1950 0001:000081B7  1951 0001:000081C9  1952 0001:000081D7  1955 0001:000081E2
-  1956 0001:000081E9  1957 0001:000081F2  1958 0001:000081F9  1959 0001:00008203
-  1966 0001:00008208  1967 0001:00008214  1969 0001:0000821D  1970 0001:0000822D
-  1972 0001:00008240  1973 0001:00008247  1974 0001:0000825C  1975 0001:00008263
-  1976 0001:0000826E  1970 0001:0000826F  1977 0001:00008272  1980 0001:00008282
-  1981 0001:0000828B  1982 0001:00008293  1983 0001:0000829D  1987 0001:000082A4
-  1988 0001:000082AA  1989 0001:000082B1  1990 0001:000082BB  1994 0001:000082C0
-  1995 0001:000082C6  1996 0001:000082CD  1997 0001:000082EE  1998 0001:000082F5
-  2005 0001:000082F8  2007 0001:00008301  2009 0001:00008364  2011 0001:00008371
-  2013 0001:0000837C  2014 0001:00008390  2016 0001:000083B1  2024 0001:000083C5
-  2025 0001:000083CE  2027 0001:0000840A  2029 0001:00008446  2030 0001:00008462
-  2031 0001:0000847E  2032 0001:0000848C  2033 0001:0000849A  2034 0001:000084B3
-  2035 0001:000084CC  2037 0001:000084D5  2038 0001:000084DA  2048 0001:000084E0
-  2049 0001:000084ED  2051 0001:000084FA  2052 0001:00008501  2053 0001:0000850B
-  2055 0001:00008528  2057 0001:0000854B  2058 0001:00008558  2059 0001:00008574
-  2060 0001:00008581  2065 0001:00008588  2066 0001:000085B2  2068 0001:000085D9
-  2070 0001:000085E6  2072 0001:0000861F  2073 0001:00008628  2075 0001:00008669
-  2078 0001:00008677  2079 0001:0000869F  2080 0001:000086A8  2082 0001:000086E3
-  2086 0001:000086F1  2088 0001:000086FE  2089 0001:0000870A  2090 0001:00008710
-  2091 0001:00008720  2092 0001:0000872B  2094 0001:0000874E  2095 0001:0000876C
-  2099 0001:00008783  2100 0001:0000878C  2105 0001:00008794  2106 0001:0000879D
-  2107 0001:000087C5  2108 0001:000087CC  2109 0001:000087D5  2117 0001:000087DC
-  2118 0001:000087E9  2120 0001:000087FF  2121 0001:00008809  2123 0001:00008826
-  2125 0001:00008849  2126 0001:00008856  2129 0001:0000886B  2130 0001:0000886E
-  2132 0001:0000887A  2133 0001:00008883  2140 0001:0000888C  2141 0001:00008898
-  2143 0001:000088A5  2147 0001:000088B5  2148 0001:000088E9  2150 0001:00008934
-  2152 0001:00008941  2154 0001:0000897A  2155 0001:00008983  2157 0001:000089C4
-  2160 0001:000089CF  2161 0001:000089F7  2162 0001:00008A00  2164 0001:00008A3B
-  2168 0001:00008A44  2169 0001:00008A4D  2174 0001:00008A54  2175 0001:00008A5D
-  2176 0001:00008A67  2177 0001:00008A78  2178 0001:00008A81  2182 0001:00008A88
-  2183 0001:00008A8E  2184 0001:00008A95  2185 0001:00008AA5  2190 0001:00008AA8
-  2191 0001:00008AB1  2192 0001:00008ABA  2193 0001:00008ADC  2194 0001:00008AEC
-  2200 0001:00008AF0  2201 0001:00008AF6  2202 0001:00008AFD  2203 0001:00008B0E
-  2209 0001:00008B14  2210 0001:00008B1D  2211 0001:00008B24  2212 0001:00008B2B
-  2213 0001:00008B34  2214 0001:00008B4D  2215 0001:00008B65  2218 0001:00008B70
-  2219 0001:00008B76  2220 0001:00008B7D  2221 0001:00008B87  2225 0001:00008B8C
-  2226 0001:00008B92  2228 0001:00008BA4  2229 0001:00008BB4  2231 0001:00008BCC
-  2235 0001:00008BD0  2240 0001:00008BD3  2241 0001:00008BD8  2245 0001:00008BDC
-  2246 0001:00008BE2  2247 0001:00008BEC  2248 0001:00008BF3  2249 0001:00008BFA
-  2256 0001:00008C00  2257 0001:00008C08  2259 0001:00008C11  2260 0001:00008C21
-  2262 0001:00008C34  2263 0001:00008C3B  2264 0001:00008C50  2265 0001:00008C57
-  2266 0001:00008C5B  2267 0001:00008C66  2260 0001:00008C67  2268 0001:00008C6A
-  2271 0001:00008C71  2279 0001:00008C78  2280 0001:00008C84  2281 0001:00008CAD
-  2282 0001:00008CB6  2283 0001:00008CBD  2284 0001:00008CD2  2285 0001:00008CDB
-  2287 0001:00008CDF  2289 0001:00008CE8  2290 0001:00008CF8  2291 0001:00008CFE
-  2292 0001:00008D04  2297 0001:00008D0A  2298 0001:00008D10  2300 0001:00008D16
-  2303 0001:00008D1A  2304 0001:00008D26  2305 0001:00008D39  2306 0001:00008D43
-  2307 0001:00008D53  2308 0001:00008D5D  2309 0001:00008D62  2312 0001:00008D68
-  2313 0001:00008D71  2314 0001:00008D7A  2315 0001:00008D92  2322 0001:00008D98
-  2323 0001:00008DAD  2324 0001:00008DB7  2325 0001:00008DC6  2327 0001:00008DE1
-  2328 0001:00008DEA  2330 0001:00008DEE  2331 0001:00008DF7  2333 0001:00008E02
-  2336 0001:00008E10  2346 0001:00008E18  2347 0001:00008E2B  2348 0001:00008E38
-  2352 0001:00008E59  2353 0001:00008E76  2354 0001:00008E7C  2356 0001:00008E82
-  2358 0001:00008EAB  2359 0001:00008EB5  2360 0001:00008EBC  2361 0001:00008EC6
-  2364 0001:00008ECB  2366 0001:00008EE1  2367 0001:00008EEC  2368 0001:00008F10
-  2370 0001:00008F1C  2372 0001:00008F64  2373 0001:00008F9E  2374 0001:00008FB2
-  2377 0001:00008FBA  2378 0001:00008FC4  2381 0001:00008FCE  2387 0001:00008FD8
-  2388 0001:00008FFB  2390 0001:0000900D  2391 0001:00009016  2393 0001:00009026
-  2394 0001:00009037  2396 0001:0000904C  2397 0001:00009075  2400 0001:0000907C
-  2401 0001:00009085  2402 0001:00009092  2403 0001:00009099  2404 0001:000090A2
-  2407 0001:000090A8  2408 0001:000090AB  2409 0001:000090B4  2410 0001:000090B7
-  2411 0001:000090C2  2412 0001:000090C7  2424 0001:000090CC  2425 0001:000090F5
-  2426 0001:000090FF  2427 0001:00009118  2430 0001:00009140  2431 0001:0000914E
-  2433 0001:00009162  2434 0001:00009171  2435 0001:00009180  2437 0001:0000918D
-  2438 0001:00009198  2439 0001:000091A1  2440 0001:000091A8  2441 0001:000091BD
-  2443 0001:000091C6  2445 0001:000091D3  2447 0001:000091D7  2450 0001:000091E2
-  2451 0001:000091EB  2453 0001:000091F6  2457 0001:00009201  2458 0001:0000920A
-  2460 0001:00009215  2464 0001:00009220  2465 0001:00009229  2467 0001:00009234
-  2473 0001:0000923F  2474 0001:00009248  2476 0001:00009253  2478 0001:0000925C
-  2479 0001:0000926A  2480 0001:00009270  2481 0001:0000927B  2482 0001:000092A1
-  2485 0001:000092BC  2486 0001:000092C5  2488 0001:000092E4  2489 0001:000092F0
-  2491 0001:0000930C  2493 0001:0000931F  2494 0001:00009334  2495 0001:00009363
-  2496 0001:00009388  2497 0001:000093AE  2491 0001:000093AF  2498 0001:000093B6
-  2500 0001:000093FB  2502 0001:0000940E  2503 0001:00009423  2504 0001:00009452
-  2505 0001:00009477  2506 0001:0000949D  2500 0001:0000949E  2509 0001:000094A7
-  2512 0001:000094F8  2515 0001:00009504  2516 0001:0000950E  2518 0001:00009517
-  2520 0001:0000952A  2521 0001:00009534  2522 0001:00009548  2523 0001:00009558
-  2526 0001:0000956E  2527 0001:00009592  2537 0001:00009598  2538 0001:000095A5
-  2540 0001:000095B2  2542 0001:000095C2  2543 0001:000095D8  2544 0001:000095E7
-  2545 0001:000095F5  2548 0001:0000961E  2549 0001:00009628  2550 0001:00009637
-  2551 0001:0000963E  2553 0001:00009644  2554 0001:00009669  2555 0001:00009690
-  2556 0001:0000969E  2558 0001:000096B7  2560 0001:000096C2  2561 0001:000096E2
-  2562 0001:00009706  2564 0001:00009714  2568 0001:0000971F  2569 0001:00009727
-  2571 0001:00009733  2566 0001:0000973D  2576 0001:00009765  2577 0001:00009773
-  2578 0001:000097A3  2579 0001:000097A9  2580 0001:000097B5  2585 0001:000097D6
-  2586 0001:000097E5  2587 0001:000097F4  2588 0001:00009812  2595 0001:00009831
-  2596 0001:0000983A  2597 0001:0000984F  2607 0001:00009858  2609 0001:00009866
-  2612 0001:00009893  2614 0001:000098AA  2615 0001:000098C7  2617 0001:000098D0
-  2618 0001:000098D9  2621 0001:000098E4  2622 0001:000098F8  2623 0001:00009902
-  2619 0001:0000990C  2627 0001:00009926  2628 0001:0000992C  2630 0001:00009966
-  2631 0001:00009987  2635 0001:00009990  2636 0001:000099B2  2637 0001:000099C7
-  2638 0001:00009A03  2639 0001:00009A39  2643 0001:00009A40  2644 0001:00009A60
-  2645 0001:00009A6D  2646 0001:00009AB3  2647 0001:00009AE9  2653 0001:00009AF0
-  2654 0001:00009AF9  2655 0001:00009B00  2656 0001:00009B1F  2658 0001:00009B32
-  2659 0001:00009B3E  2660 0001:00009B41  2661 0001:00009B43  2655 0001:00009B44
-  2662 0001:00009B4A  2669 0001:00009B54  2670 0001:00009B75  2671 0001:00009B79
-  2672 0001:00009B80  2673 0001:00009BB1  2675 0001:00009BE6  2676 0001:00009BF2
-  2677 0001:00009BF5  2678 0001:00009BF9  2679 0001:00009BFB  2673 0001:00009BFC
-  2680 0001:00009BFF  2682 0001:00009C0E  2683 0001:00009C18  2685 0001:00009C48
-  2689 0001:00009C54  2690 0001:00009C70  2691 0001:00009CE6  2697 0001:00009CF0
-  2698 0001:00009D14  2699 0001:00009D1B  2700 0001:00009D3B  2702 0001:00009D70
-  2703 0001:00009D7C  2704 0001:00009D7F  2705 0001:00009D81  2699 0001:00009D82
-  2706 0001:00009DAC  2712 0001:00009DB4  2713 0001:00009DC0  2714 0001:00009DD4
-  2715 0001:00009DEA  2716 0001:00009DF1  2717 0001:00009E08  2718 0001:00009E0F
-  2719 0001:00009E13  2721 0001:00009E1E  2722 0001:00009E25  2728 0001:00009E50
-  2729 0001:00009E7C  2730 0001:00009E90  2731 0001:00009EA6  2732 0001:00009EAD
-  2733 0001:00009EC4  2734 0001:00009ECB  2735 0001:00009ECF  2736 0001:00009EF6
-  2740 0001:00009F24  2741 0001:00009F50  2742 0001:00009F60  2743 0001:00009F8B
-  2747 0001:00009F94  2748 0001:00009FC3  2749 0001:00009FD3  2750 0001:00009FFC
-  2756 0001:0000A008  2757 0001:0000A040  2758 0001:0000A047  2759 0001:0000A066
-  2761 0001:0000A07F  2762 0001:0000A082  2763 0001:0000A084  2758 0001:0000A085
-  2764 0001:0000A0B3  2768 0001:0000A0BC  2769 0001:0000A0C5  2770 0001:0000A0CE
-  2772 0001:0000A0E2  2773 0001:0000A0F4  2780 0001:0000A0F8  2781 0001:0000A109
-  2782 0001:0000A11E  2783 0001:0000A133  2785 0001:0000A1AF  2782 0001:0000A1C6
-  2786 0001:0000A1CD  2788 0001:0000A1D6  2792 0001:0000A20D  2794 0001:0000A242
-  2795 0001:0000A249  2796 0001:0000A262  2797 0001:0000A269  2800 0001:0000A2A4
-  2801 0001:0000A2A7  2803 0001:0000A2AF  2804 0001:0000A2B5  2806 0001:0000A2BA
-  2813 0001:0000A2BC  2814 0001:0000A2CA  2815 0001:0000A2DC  2816 0001:0000A2EC
-  2818 0001:0000A2F9  2819 0001:0000A30B  2820 0001:0000A317  2822 0001:0000A32A
-  2823 0001:0000A352  2824 0001:0000A380  2820 0001:0000A381  2828 0001:0000A389
-  2829 0001:0000A39B  2830 0001:0000A3A7  2833 0001:0000A3B6  2834 0001:0000A3E2
-  2835 0001:0000A419  2830 0001:0000A41A  2837 0001:0000A41D  2838 0001:0000A429
-  2839 0001:0000A43E  2840 0001:0000A445  2846 0001:0000A44C  2847 0001:0000A453
-  2849 0001:0000A45B  2850 0001:0000A468  2851 0001:0000A47E  2852 0001:0000A486
-  2854 0001:0000A48A  2858 0001:0000A495  2859 0001:0000A49E  2860 0001:0000A4AE
-  2861 0001:0000A4B7  2862 0001:0000A4C0  2865 0001:0000A4C9  2868 0001:0000A510
-  2869 0001:0000A530  2871 0001:0000A540  2872 0001:0000A54E  2873 0001:0000A55D
-  2874 0001:0000A566  2876 0001:0000A56F  2877 0001:0000A578  2880 0001:0000A59E
-  2884 0001:0000A5A4  2885 0001:0000A5AA  2888 0001:0000A5AC  2889 0001:0000A5AF
-  2890 0001:0000A5BD  2891 0001:0000A5C4  2892 0001:0000A5D1  2893 0001:0000A5D8
-  2894 0001:0000A5DD  2898 0001:0000A5E0  2899 0001:0000A5E3  2900 0001:0000A5E9
-  2901 0001:0000A5EE  2905 0001:0000A5F0  2906 0001:0000A5F9  2907 0001:0000A60B
-  2911 0001:0000A610  2912 0001:0000A616  2913 0001:0000A629  2914 0001:0000A630
-  2925 0001:0000A634  2926 0001:0000A653  2927 0001:0000A657  2928 0001:0000A65C
-  2929 0001:0000A661  2930 0001:0000A66F  2931 0001:0000A67D  2932 0001:0000A689
-  2933 0001:0000A691  2934 0001:0000A69D  2935 0001:0000A6AC  2936 0001:0000A6BB
-  2937 0001:0000A6C5  2938 0001:0000A6CF  2940 0001:0000A6F4  2941 0001:0000A70F
-  2942 0001:0000A719  2938 0001:0000A71C  2943 0001:0000A71F  2944 0001:0000A731
-  2945 0001:0000A73E  2946 0001:0000A748  2948 0001:0000A764  2949 0001:0000A771
-  2951 0001:0000A775  2952 0001:0000A798  2954 0001:0000A7A4  2946 0001:0000A7A7
-  2956 0001:0000A7B7  2957 0001:0000A7BF  2958 0001:0000A7C7  2959 0001:0000A7D5
-  2961 0001:0000A806  2965 0001:0000A810  2966 0001:0000A816  2968 0001:0000A81E
-  2969 0001:0000A823  2972 0001:0000A82C  2973 0001:0000A833  2974 0001:0000A83C
-  2977 0001:0000A845  2983 0001:0000A848  2984 0001:0000A853  2985 0001:0000A868
-  2986 0001:0000A86C  2987 0001:0000A873  2988 0001:0000A895  2989 0001:0000A89F
-  2990 0001:0000A8AE  2991 0001:0000A8C6  2992 0001:0000A8D1  2996 0001:0000A8D8
-  2997 0001:0000A8E0  2998 0001:0000A8E7  2999 0001:0000A8FE  3000 0001:0000A914
-  3001 0001:0000A91D  3002 0001:0000A92A  3003 0001:0000A93D  3004 0001:0000A944
-  3005 0001:0000A95A  3006 0001:0000A964  3007 0001:0000A970  3008 0001:0000A97D
-  3012 0001:0000A988  3013 0001:0000A98E  3014 0001:0000A995  3015 0001:0000A9A0
-  3016 0001:0000A9A8  3024 0001:0000A9AC  3025 0001:0000A9D1  3030 0001:0000A9E0
-  3033 0001:0000AA44  3034 0001:0000AA5D  3035 0001:0000AA87  3036 0001:0000AA8B
-  3037 0001:0000AA9D  3038 0001:0000AAB2  3040 0001:0000AAC5  3041 0001:0000AAD7
-  3042 0001:0000AAEC  3043 0001:0000AB3B  3045 0001:0000AB84  3046 0001:0000AB99
-  3047 0001:0000ABE7  3050 0001:0000AC5C  3056 0001:0000AC64  3057 0001:0000AC8B
-  3059 0001:0000AC98  3061 0001:0000ACA1  3062 0001:0000ACAD  3063 0001:0000ACB2
-  3065 0001:0000ACDB  3066 0001:0000ACE4  3068 0001:0000ACFA  3069 0001:0000AD8B
-  3070 0001:0000AD97  3071 0001:0000ADB5  3073 0001:0000ADEB  3076 0001:0000AE00
-  3077 0001:0000AE07  3079 0001:0000AE10  3080 0001:0000AE27  3082 0001:0000AE3E
-  3088 0001:0000AEA8  3089 0001:0000AEAF  3090 0001:0000AEC2  3091 0001:0000AEEB
-  3092 0001:0000AEFE  3093 0001:0000AF05  3104 0001:0000AF0C  3105 0001:0000AF18
-  3107 0001:0000AF34  3106 0001:0000AF86  3108 0001:0000AF8B  3109 0001:0000AFC4
-  3111 0001:0000AFF5  3113 0001:0000AFFC  3114 0001:0000B029  3115 0001:0000B033
-  3116 0001:0000B03D  3117 0001:0000B047  3118 0001:0000B050  3119 0001:0000B064
-  3120 0001:0000B07F  3121 0001:0000B098  3123 0001:0000B0CD  3124 0001:0000B0D4
-  3126 0001:0000B0E3  3127 0001:0000B0F0  3129 0001:0000B0FA  3131 0001:0000B109
-  3132 0001:0000B132  3134 0001:0000B156  3136 0001:0000B162  3137 0001:0000B16F
-  3138 0001:0000B174  3140 0001:0000B1A4  3141 0001:0000B1B0  3142 0001:0000B1C6
-  3143 0001:0000B1DC  3144 0001:0000B1DE  3146 0001:0000B20D  3147 0001:0000B20F
-  3148 0001:0000B211  3144 0001:0000B212  3149 0001:0000B215  3150 0001:0000B236
-  3151 0001:0000B26C  3152 0001:0000B2B8  3153 0001:0000B2CC  3154 0001:0000B2D6
-  3155 0001:0000B300  3161 0001:0000B314  3162 0001:0000B32D  3163 0001:0000B332
-  3164 0001:0000B345  3165 0001:0000B35D  3167 0001:0000B361  3166 0001:0000B36B
-  3168 0001:0000B3BC  3176 0001:0000B3C4  3177 0001:0000B3E7  3178 0001:0000B3F1
-  3179 0001:0000B3FE  3181 0001:0000B407  3182 0001:0000B42E  3183 0001:0000B43E
-  3184 0001:0000B449  3185 0001:0000B458  3187 0001:0000B481  3190 0001:0000B493
-  3192 0001:0000B4A0  3193 0001:0000B4A5  3194 0001:0000B4B9  3195 0001:0000B4C9
-  3196 0001:0000B4D9  3197 0001:0000B4EB  3202 0001:0000B4FB  3203 0001:0000B4FD
-  3205 0001:0000B507  3206 0001:0000B53C  3207 0001:0000B54A  3209 0001:0000B568
-  3210 0001:0000B584  3215 0001:0000B588  3216 0001:0000B5AF  3218 0001:0000B5B8
-  3219 0001:0000B5C0  3222 0001:0000B5C2  3224 0001:0000B5C6  3225 0001:0000B5D6
-  3227 0001:0000B5EE  3228 0001:0000B5F9  3231 0001:0000B602  3232 0001:0000B60A
-  3236 0001:0000B61C  3238 0001:0000B638  3239 0001:0000B65F  3242 0001:0000B684
-  3243 0001:0000B6B9  3244 0001:0000B6C7  3247 0001:0000B702  3248 0001:0000B729
-  3251 0001:0000B74E  3252 0001:0000B783  3253 0001:0000B791  3257 0001:0000B7CA
-  3258 0001:0000B7FA  3264 0001:0000B804  3265 0001:0000B827  3266 0001:0000B82A
-  3268 0001:0000B839  3270 0001:0000B842  3271 0001:0000B860  3274 0001:0000B871
-  3276 0001:0000B89F  3278 0001:0000B8D6  3279 0001:0000B8D9  3281 0001:0000B8DB
-  3274 0001:0000B8DE  3282 0001:0000B8E3  3284 0001:0000B8E7  3285 0001:0000B914
-  3289 0001:0000B943  3297 0001:0000B94C  3298 0001:0000B971  3299 0001:0000B974
-  3301 0001:0000B984  3303 0001:0000B98D  3304 0001:0000B9AC  3306 0001:0000B9B4
-  3309 0001:0000B9BF  3311 0001:0000B9E8  3313 0001:0000BA20  3314 0001:0000BA22
-  3316 0001:0000BA24  3309 0001:0000BA25  3317 0001:0000BA2A  3319 0001:0000BA74
-  3320 0001:0000BA7F  3322 0001:0000BA88  3323 0001:0000BA95  3324 0001:0000BA9B
-  3326 0001:0000BAC5  3327 0001:0000BACE  3329 0001:0000BAE4  3330 0001:0000BB75
-  3332 0001:0000BB81  3334 0001:0000BB85  3335 0001:0000BBB3  3336 0001:0000BBC0
-  3337 0001:0000BBCD  3341 0001:0000BBD7  3342 0001:0000BBE3  3343 0001:0000BBE9
-  3344 0001:0000BBF7  3345 0001:0000BC40  3348 0001:0000BC54  3349 0001:0000BC5A
-  3351 0001:0000BC62  3352 0001:0000BC68  3354 0001:0000BC6C  3355 0001:0000BC77
-  3356 0001:0000BC80  3357 0001:0000BC89  3359 0001:0000BC95  3361 0001:0000BC9C
-  3364 0001:0000BCA0  3365 0001:0000BCA3  3367 0001:0000BCAB  3368 0001:0000BCB1
-  3370 0001:0000BCB6  3376 0001:0000BCB8  3377 0001:0000BCC1  3378 0001:0000BCC3
-  3379 0001:0000BCC7  3380 0001:0000BCCE  3381 0001:0000BCE3  3382 0001:0000BCEA
-  3383 0001:0000BCEE  3385 0001:0000BCF7  3386 0001:0000BCF9  3393 0001:0000BD00
-  3394 0001:0000BD0F  3395 0001:0000BD16  3396 0001:0000BD2B  3397 0001:0000BD32
-  3399 0001:0000BD42  3400 0001:0000BD48  3402 0001:0000BD4E  3403 0001:0000BD52
-  3404 0001:0000BD5E  3405 0001:0000BD71  3406 0001:0000BD7B  3408 0001:0000BD8B
-  3414 0001:0000BD94  3415 0001:0000BD9D  3416 0001:0000BDA4  3417 0001:0000BDB9
-  3418 0001:0000BDC0  3419 0001:0000BDC4  3421 0001:0000BDC9  3422 0001:0000BDCB
-  3430 0001:0000BDD0  3431 0001:0000BDDF  3432 0001:0000BDE6  3433 0001:0000BDFB
-  3434 0001:0000BE02  3436 0001:0000BE0E  3437 0001:0000BE14  3438 0001:0000BE20
-  3439 0001:0000BE33  3440 0001:0000BE3D  3442 0001:0000BE4D  3446 0001:0000BE54
-  3447 0001:0000BE5A  3450 0001:0000BE5C  3451 0001:0000BE65  3452 0001:0000BE6E
-  3453 0001:0000BE7B  3459 0001:0000BE80  3460 0001:0000BEA0  3461 0001:0000BEA7
-  3463 0001:0000BEB0  3464 0001:0000BED4  3463 0001:0000BF01  3466 0001:0000BF21
-  3472 0001:0000BF28  3473 0001:0000BF49  3474 0001:0000BF68  3473 0001:0000BF9B
-  3475 0001:0000BFBB  3478 0001:0000BFC4  3479 0001:0000BFCA  3480 0001:0000BFD3
-  3481 0001:0000BFF1  3482 0001:0000BFF7  3485 0001:0000BFFC  3486 0001:0000C005
-  3487 0001:0000C00E  3488 0001:0000C02C  3489 0001:0000C039  3492 0001:0000C040
-  3493 0001:0000C046  3494 0001:0000C052  3495 0001:0000C059  3498 0001:0000C05C
-  3499 0001:0000C066  3500 0001:0000C06F  3501 0001:0000C085  3502 0001:0000C08E
-  3503 0001:0000C09B  3504 0001:0000C0A8  3505 0001:0000C0B5  3506 0001:0000C0BF
-  3508 0001:0000C0CE  3509 0001:0000C0DC  3511 0001:0000C0E7  3512 0001:0000C0F4
-  3515 0001:0000C0FC  3516 0001:0000C105  3517 0001:0000C112  3520 0001:0000C118
-  3521 0001:0000C13F  3522 0001:0000C14E  3524 0001:0000C17B  3525 0001:0000C1AE
-  3528 0001:0000C1E0  3529 0001:0000C1E9  3530 0001:0000C1F8  3532 0001:0000C20B
-  3533 0001:0000C214  3541 0001:0000C218  3542 0001:0000C221  3543 0001:0000C24C
-  3550 0001:0000C250  3551 0001:0000C265  3552 0001:0000C26E  3553 0001:0000C277
-  3554 0001:0000C280  3555 0001:0000C289  3556 0001:0000C292  3557 0001:0000C29B
-  3558 0001:0000C2A4  3559 0001:0000C2C2  3563 0001:0000C2C8  3564 0001:0000C2D1
-  3565 0001:0000C2DA  3567 0001:0000C2E0  3568 0001:0000C2F0  3569 0001:0000C2F4
-  3570 0001:0000C2FB  3572 0001:0000C303  3578 0001:0000C308  3579 0001:0000C316
-  3580 0001:0000C31B  3582 0001:0000C328  3583 0001:0000C342  3585 0001:0000C35A
-  3588 0001:0000C39A  3589 0001:0000C3A6  3591 0001:0000C3A8  3582 0001:0000C3A9
-  3593 0001:0000C3AF  3599 0001:0000C3B8  3600 0001:0000C3BE  3601 0001:0000C3C7
-  3602 0001:0000C3D2  3603 0001:0000C3DB  3604 0001:0000C3E6  3611 0001:0000C3EC
-  3612 0001:0000C3F4  3613 0001:0000C3FB  3615 0001:0000C404  3616 0001:0000C40F
-  3618 0001:0000C413  3619 0001:0000C41D  3620 0001:0000C426  3621 0001:0000C42F
-  3622 0001:0000C443  3623 0001:0000C44E  3624 0001:0000C457  3625 0001:0000C46A
-  3628 0001:0000C47E  3636 0001:0000C484  3637 0001:0000C48B  3638 0001:0000C499
-  3640 0001:0000C4AC  3642 0001:0000C4B9  3643 0001:0000C4C9  3644 0001:0000C4D2
-  3645 0001:0000C4DE  3646 0001:0000C4EA  3647 0001:0000C4F1  3648 0001:0000C4FA
-  3649 0001:0000C506  3650 0001:0000C516  3651 0001:0000C526  3652 0001:0000C52F
-  3653 0001:0000C53B  3654 0001:0000C547  3655 0001:0000C54E  3656 0001:0000C557
-  3657 0001:0000C563  3658 0001:0000C573  3659 0001:0000C57A  3663 0001:0000C587
-  3665 0001:0000C590  3666 0001:0000C5A8  3667 0001:0000C5C0  3665 0001:0000C5CF
-  3668 0001:0000C5D4  3669 0001:0000C5DB  3671 0001:0000C5E6  3675 0001:0000C608
-  3676 0001:0000C60E  3677 0001:0000C62E  3685 0001:0000C668  3686 0001:0000C66E
-  3687 0001:0000C675  3688 0001:0000C683  3691 0001:0000C688  3692 0001:0000C692
-  3693 0001:0000C69B  3695 0001:0000C6AB  3699 0001:0000C6E8  3700 0001:0000C6F5
-  3703 0001:0000C6FA  3706 0001:0000C700  3707 0001:0000C707  3708 0001:0000C70E
-  3710 0001:0000C71E  3712 0001:0000C736  3713 0001:0000C743  3714 0001:0000C750
-  3717 0001:0000C755  3723 0001:0000C75C  3724 0001:0000C773  3725 0001:0000C77C
-  3726 0001:0000C788  3727 0001:0000C794  3728 0001:0000C79F  3729 0001:0000C7A9
-  3730 0001:0000C7B0  3731 0001:0000C7BA  3732 0001:0000C7D0  3733 0001:0000C7D9
-  3734 0001:0000C7E6  3735 0001:0000C7FC  3736 0001:0000C80C  3737 0001:0000C81C
-  3738 0001:0000C82C  3739 0001:0000C83C  3740 0001:0000C843  3741 0001:0000C854
-  3742 0001:0000C865  3743 0001:0000C87B  3744 0001:0000C884  3745 0001:0000C89A
-  3746 0001:0000C8AA  3747 0001:0000C8BA  3748 0001:0000C8CA  3749 0001:0000C8D1
-  3750 0001:0000C8F4  3753 0001:0000C8FC  3754 0001:0000C905  3755 0001:0000C912
-  3756 0001:0000C91D  3757 0001:0000C926  3761 0001:0000C92C  3762 0001:0000C932
-  3763 0001:0000C939  3764 0001:0000C940  3768 0001:0000C944  3769 0001:0000C94A
-  3770 0001:0000C951  3771 0001:0000C95A  3775 0001:0000C960  3776 0001:0000C966
-  3777 0001:0000C96D  3778 0001:0000C974  3781 0001:0000C978  3782 0001:0000C981
-  3783 0001:0000C98A  3785 0001:0000C993  3786 0001:0000C99A  3787 0001:0000C9B9
-  3789 0001:0000C9D1  3793 0001:0000C9D8  3794 0001:0000C9E2  3796 0001:0000C9E5
-  3797 0001:0000C9EB  3806 0001:0000C9EC  3807 0001:0000C9F7  3808 0001:0000CA00
-  3809 0001:0000CA0F  3811 0001:0000CA18  3812 0001:0000CA1D  3813 0001:0000CA24
-  3817 0001:0000CA2D  3818 0001:0000CA34  3819 0001:0000CA3B  3821 0001:0000CA42
-  3822 0001:0000CA5F  3823 0001:0000CA83  3824 0001:0000CA8D  3825 0001:0000CAC1
-  3827 0001:0000CACA  3828 0001:0000CADD  3832 0001:0000CB24  3835 0001:0000CB5B
-  3836 0001:0000CB62  3841 0001:0000CB6C  3842 0001:0000CB72  3844 0001:0000CB76
-  3845 0001:0000CB7D  3846 0001:0000CB8D  3848 0001:0000CB94  3853 0001:0000CB9C
-  3854 0001:0000CBA2  3855 0001:0000CBB8  3856 0001:0000CBC6  3862 0001:0000CBCC
-  3875 0001:0000CBD2  3876 0001:0000CBD9  3877 0001:0000CBEF  3880 0001:0000CBF4
-  3881 0001:0000CBFA  3882 0001:0000CC08  3883 0001:0000CC1E  3887 0001:0000CC24
-  3888 0001:0000CC2A  3889 0001:0000CC33  3891 0001:0000CC3C  3892 0001:0000CC43
-  3894 0001:0000CC62  3895 0001:0000CC69  3899 0001:0000CC6C  3900 0001:0000CC72
-  3901 0001:0000CC79  3902 0001:0000CC84  3906 0001:0000CC88  3907 0001:0000CC8B
-  3908 0001:0000CC94  3909 0001:0000CC9B  3910 0001:0000CCB3  3911 0001:0000CCB8
-  3918 0001:0000CCBC  3919 0001:0000CCDB  3920 0001:0000CCE2  3921 0001:0000CD1B
-  3922 0001:0000CD48  3923 0001:0000CD56  3924 0001:0000CD59  3925 0001:0000CD69
-  3926 0001:0000CD79  3927 0001:0000CD9A  3928 0001:0000CDAA  3929 0001:0000CDB3
-  3930 0001:0000CDC5  3932 0001:0000CDE4  3933 0001:0000CDEB  3934 0001:0000CDF9
-  3935 0001:0000CE09  3936 0001:0000CE23  3937 0001:0000CE32  3938 0001:0000CE68
-  3939 0001:0000CE6F  3941 0001:0000CE74  3942 0001:0000CE7B  3944 0001:0000CE80
-  3945 0001:0000CE9A  3946 0001:0000CEA8  3947 0001:0000CEBB  3950 0001:0000CEF3
-  3951 0001:0000CF02  3953 0001:0000CF1E  3954 0001:0000CF2C  3956 0001:0000CF44
-  3957 0001:0000CF4B  3958 0001:0000CF5A  3959 0001:0000CFC4  3992 0001:0000CFCC
-  3993 0001:0000CFE7  3995 0001:0000CFFC  3996 0001:0000D003  3997 0001:0000D01D
-  3998 0001:0000D041  3999 0001:0000D05D  4002 0001:0000D064  4003 0001:0000D073
-  4004 0001:0000D0A2  4006 0001:0000D0B0  4007 0001:0000D0C8  4008 0001:0000D0D7
-  4009 0001:0000D119  4013 0001:0000D120  4014 0001:0000D124  4015 0001:0000D13E
-  4022 0001:0000D144  4024 0001:0000D168  4025 0001:0000D18D  4026 0001:0000D194
-  4027 0001:0000D1B2  4029 0001:0000D1CE  4031 0001:0000D1E9  4033 0001:0000D1FE
-  4035 0001:0000D20E  4037 0001:0000D21B  4038 0001:0000D245  4039 0001:0000D266
-  4040 0001:0000D26E  4042 0001:0000D273  4043 0001:0000D289  4047 0001:0000D29E
-  4049 0001:0000D2B3  4051 0001:0000D2D7  4052 0001:0000D2EE  4053 0001:0000D2F5
-  4055 0001:0000D306  4056 0001:0000D32E  4058 0001:0000D34A  4061 0001:0000D351
-  4062 0001:0000D37F  4064 0001:0000D389  4065 0001:0000D390  4066 0001:0000D39E
-  4067 0001:0000D3AE  4068 0001:0000D3CC  4069 0001:0000D3DB  4071 0001:0000D3FE
-  4072 0001:0000D40C  4073 0001:0000D41A  4074 0001:0000D42A  4076 0001:0000D431
-  4078 0001:0000D450  4079 0001:0000D476  4081 0001:0000D48F  4083 0001:0000D4A7
-  4084 0001:0000D4B8  4087 0001:0000D4C9  4088 0001:0000D512  4092 0001:0000D51C
-  4094 0001:0000D520  4096 0001:0000D540  4097 0001:0000D543  4099 0001:0000D546
-  4100 0001:0000D560  4104 0001:0000D564  4105 0001:0000D56D  4107 0001:0000D574
-  4108 0001:0000D5A2  4109 0001:0000D5C0  4110 0001:0000D5C7  4114 0001:0000D5D0
-  4115 0001:0000D5D4  4116 0001:0000D5EE  4121 0001:0000D5F4  4122 0001:0000D60D
-  4123 0001:0000D662  4128 0001:0000D66C  4129 0001:0000D676  4139 0001:0000D678
-  4140 0001:0000D699  4141 0001:0000D6B2  4142 0001:0000D6BA  4144 0001:0000D6C2
-  4145 0001:0000D6DA  4146 0001:0000D6E9  4147 0001:0000D6FD  4148 0001:0000D718
-  4150 0001:0000D74B  4152 0001:0000D76C  4153 0001:0000D775  4154 0001:0000D77E
-  4155 0001:0000D788  4156 0001:0000D7A1  4158 0001:0000D7B0  4159 0001:0000D7BB
-  4161 0001:0000D7D7  4162 0001:0000D7E4  4163 0001:0000D7EF  4164 0001:0000D804
-  4167 0001:0000D820  4168 0001:0000D838  4169 0001:0000D845  4170 0001:0000D84F
-  4171 0001:0000D85A  4173 0001:0000D88D  4175 0001:0000D8BD  4181 0001:0000D8C4
-  4182 0001:0000D8CD  4183 0001:0000D8E9  4184 0001:0000D8FD  4186 0001:0000D906
-  4187 0001:0000D92A  4188 0001:0000D933  4191 0001:0000D940  4192 0001:0000D954
-  4193 0001:0000D959  4194 0001:0000D962  4196 0001:0000D96B  4197 0001:0000D970
-  4198 0001:0000D98C  4202 0001:0000D994  4203 0001:0000D9AC  4204 0001:0000D9B3
-  4205 0001:0000D9BE  4206 0001:0000D9DA  4207 0001:0000D9E1  4208 0001:0000DA32
-  4212 0001:0000DA38  4213 0001:0000DA54  4215 0001:0000DA5A  4218 0001:0000DA66
-  4219 0001:0000DA80  4220 0001:0000DA8A  4221 0001:0000DA99  4224 0001:0000DABB
-  4227 0001:0000DB15  4230 0001:0000DB1C  4231 0001:0000DB23  4232 0001:0000DB36
-  4233 0001:0000DB41  4236 0001:0000DB48  4237 0001:0000DB4F  4238 0001:0000DB5C
-  4239 0001:0000DB67  4242 0001:0000DB6C  4243 0001:0000DB73  4244 0001:0000DB86
-  4245 0001:0000DB91  4251 0001:0000DB98  4252 0001:0000DB9F  4254 0001:0000DBAB
-  4255 0001:0000DBB3  4257 0001:0000DBB7  4258 0001:0000DBC6  4259 0001:0000DBD5
-  4260 0001:0000DBDD  4261 0001:0000DBE5  4262 0001:0000DBF3  4263 0001:0000DBFA
-  4264 0001:0000DC11  4267 0001:0000DC23  4268 0001:0000DC37  4269 0001:0000DC47
-  4270 0001:0000DC53  4271 0001:0000DC64  4272 0001:0000DC74  4273 0001:0000DC81
-  4274 0001:0000DCAA  4275 0001:0000DCC0  4276 0001:0000DCD0  4277 0001:0000DCD7
-  4278 0001:0000DCE4  4279 0001:0000DCEF  4281 0001:0000DCF5  4282 0001:0000DD0B
-  4283 0001:0000DD14  4284 0001:0000DD20  4285 0001:0000DD2B  4288 0001:0000DD48
-  4290 0001:0000DD55  4292 0001:0000DD66  4294 0001:0000DD6D  4300 0001:0000DD78
-  4301 0001:0000DD7E  4303 0001:0000DD97  4304 0001:0000DD9E  4305 0001:0000DDC0
-  4307 0001:0000DDCB  4309 0001:0000DDE2  4313 0001:0000DDE8  4314 0001:0000DDEE
-  4316 0001:0000DDF7  4317 0001:0000DE09  4319 0001:0000DE10  4326 0001:0000DE14
-  4327 0001:0000DE40  4328 0001:0000DE71  4331 0001:0000DE78  4332 0001:0000DE7E
-  4333 0001:0000DE8C  4334 0001:0000DE9A  4337 0001:0000DEA0  4338 0001:0000DEA3
-  4339 0001:0000DEAE  4342 0001:0000DEB0  4343 0001:0000DEB3  4344 0001:0000DEBE
-  4347 0001:0000DEC0  4348 0001:0000DEE0  4349 0001:0000DF0B  4352 0001:0000DF10
-  4353 0001:0000DF3A  4354 0001:0000DF69  4357 0001:0000DF70  4358 0001:0000DF9F
-  4359 0001:0000DFCF  4362 0001:0000DFD8  4363 0001:0000DFDB  4364 0001:0000DFE6
-  4368 0001:0000DFE8  4369 0001:0000DFF4  4373 0001:0000DFF8  4374 0001:0000E001
-  4378 0001:0000E004  4379 0001:0000E010  4382 0001:0000E014  4383 0001:0000E020
-  4384 0001:0000E02F  4387 0001:0000E034  4388 0001:0000E037  4389 0001:0000E042
-  4392 0001:0000E044  4393 0001:0000E04A  4394 0001:0000E061  4397 0001:0000E068
-  4398 0001:0000E071  4399 0001:0000E07E  4402 0001:0000E084  4403 0001:0000E08A
-  4404 0001:0000E0A1  4407 0001:0000E0A8  4408 0001:0000E0AB  4409 0001:0000E0B9
-  4413 0001:0000E0BC  4414 0001:0000E0C8  4418 0001:0000E0CC  4419 0001:0000E0D8
-  4423 0001:0000E0DC  4424 0001:0000E0E8  4428 0001:0000E0EC  4429 0001:0000E0F8
-  4432 0001:0000E0FC  4433 0001:0000E105  4434 0001:0000E112  4437 0001:0000E118
-  4438 0001:0000E124  4439 0001:0000E133  4442 0001:0000E138  4443 0001:0000E13B
-  4444 0001:0000E149  4447 0001:0000E14C  4448 0001:0000E14F  4449 0001:0000E15D
-  4452 0001:0000E160  4453 0001:0000E169  4454 0001:0000E179  4458 0001:0000E180
-  4459 0001:0000E18C  4463 0001:0000E190  4464 0001:0000E19C  4468 0001:0000E1A0
-  4469 0001:0000E1AC  4472 0001:0000E1B0  4473 0001:0000E1B9  4474 0001:0000E1CC
-  4477 0001:0000E1D0  4478 0001:0000E1D3  4479 0001:0000E1DE  4482 0001:0000E1E0
-  4483 0001:0000E200  4484 0001:0000E22B  4487 0001:0000E230  4488 0001:0000E239
-  4489 0001:0000E246  4493 0001:0000E24C  4494 0001:0000E258  4497 0001:0000E25C
-  4498 0001:0000E265  4499 0001:0000E272  4502 0001:0000E278  4503 0001:0000E27B
-  4504 0001:0000E286  4508 0001:0000E288  4509 0001:0000E294  4512 0001:0000E298
-  4513 0001:0000E2A1  4514 0001:0000E2B0  4515 0001:0000E2BD  4516 0001:0000E2CA
-  4519 0001:0000E2D0  4520 0001:0000E2D3  4521 0001:0000E2DE  4524 0001:0000E2E0
-  4525 0001:0000E2E3  4526 0001:0000E2EE  4530 0001:0000E2F0  4531 0001:0000E2FC
-  4535 0001:0000E300  4536 0001:0000E30C  4539 0001:0000E310  4540 0001:0000E313
-  4541 0001:0000E31E  4544 0001:0000E320  4545 0001:0000E323  4546 0001:0000E32E
-  4549 0001:0000E330  4550 0001:0000E333  4551 0001:0000E33E  4554 0001:0000E340
-  4555 0001:0000E36C  4556 0001:0000E399  4559 0001:0000E3A0  4560 0001:0000E3A6
-  4561 0001:0000E3B4  4564 0001:0000E3B8  4565 0001:0000E3BE  4566 0001:0000E3CC
-  4569 0001:0000E3D0  4570 0001:0000E3D3  4571 0001:0000E3DE  4574 0001:0000E3E0
-  4575 0001:0000E3E3  4576 0001:0000E3EE  4579 0001:0000E3F0  4580 0001:0000E3F3
-  4581 0001:0000E3FE  4584 0001:0000E400  4585 0001:0000E403  4586 0001:0000E40E
-  4589 0001:0000E410  4590 0001:0000E413  4591 0001:0000E41E  4594 0001:0000E420
-  4595 0001:0000E426  4596 0001:0000E431  4600 0001:0000E434  4601 0001:0000E440
-  4604 0001:0000E444  4605 0001:0000E447  4606 0001:0000E452  4610 0001:0000E454
-  4611 0001:0000E460  4615 0001:0000E464  4616 0001:0000E470  4619 0001:0000E474
-  4620 0001:0000E493  4622 0001:0000E4A8  4623 0001:0000E4AF  4624 0001:0000E4BC
-  4625 0001:0000E4C1  4626 0001:0000E4D1  4627 0001:0000E4DF  4629 0001:0000E4E7
-  4630 0001:0000E4F1  4631 0001:0000E4FB  4632 0001:0000E512  4633 0001:0000E531
-  4634 0001:0000E541  4635 0001:0000E55B  4636 0001:0000E565  4637 0001:0000E575
-  4638 0001:0000E588  4639 0001:0000E59F  4640 0001:0000E5A8  4644 0001:0000E5C0
-  4645 0001:0000E5D1  4646 0001:0000E5EB  4647 0001:0000E5FB  4648 0001:0000E609
-  4651 0001:0000E621  4653 0001:0000E639  4655 0001:0000E65E  4658 0001:0000E668
-  4659 0001:0000E671  4660 0001:0000E67E  4661 0001:0000E688  4662 0001:0000E68D
-  4663 0001:0000E691  4664 0001:0000E69A  4668 0001:0000E6A0  4669 0001:0000E6AC
-  4672 0001:0000E6B0  4673 0001:0000E6B3  4674 0001:0000E6BE  4680 0001:0000E6C0
-  4681 0001:0000E6CD  4683 0001:0000E6D7  4684 0001:0000E6DE  4685 0001:0000E6E2
-  4687 0001:0000E6E9  4688 0001:0000E6FE  4690 0001:0000E704  4691 0001:0000E711
-  4693 0001:0000E71A  4694 0001:0000E721  4697 0001:0000E728  4698 0001:0000E731
-  4699 0001:0000E73E  4702 0001:0000E744  4703 0001:0000E747  4704 0001:0000E752
-  4707 0001:0000E754  4708 0001:0000E757  4710 0001:0000E75F  4711 0001:0000E767
-  4712 0001:0000E776  4714 0001:0000E783  4717 0001:0000E788  4718 0001:0000E78B
-  4720 0001:0000E793  4721 0001:0000E799  4722 0001:0000E79D  4724 0001:0000E7A4
-  4727 0001:0000E7A8  4728 0001:0000E7BE  4729 0001:0000E7D0  4730 0001:0000E808
-  4733 0001:0000E810  4734 0001:0000E816  4736 0001:0000E81E  4737 0001:0000E824
-  4739 0001:0000E828  4740 0001:0000E831  4743 0001:0000E840  4744 0001:0000E84D
-  4746 0001:0000E854  4750 0001:0000E858  4751 0001:0000E86F  4754 0001:0000E870
-  4755 0001:0000E873  4756 0001:0000E88B  4759 0001:0000E890  4760 0001:0000E893
-  4761 0001:0000E898  4764 0001:0000E89C  4765 0001:0000E8A6  4767 0001:0000E8B1
-  4768 0001:0000E8BA  4769 0001:0000E8C4  4771 0001:0000E8E1  4777 0001:0000E8E8
-  4778 0001:0000E90B  4780 0001:0000E91E  4781 0001:0000E925  4782 0001:0000E92A
-  4784 0001:0000E94A  4786 0001:0000E95B  4787 0001:0000E966  4788 0001:0000E96B
-  4789 0001:0000E977  4791 0001:0000E991  4782 0001:0000E992  4792 0001:0000E997
-  4793 0001:0000E9A1  4796 0001:0000E9B9  4797 0001:0000E9E2  4800 0001:0000E9F8
-  4801 0001:0000EA0E  4803 0001:0000EA1D  4804 0001:0000EA24  4805 0001:0000EA3F
-  4806 0001:0000EA4F  4808 0001:0000EA73  4811 0001:0000EA78  4812 0001:0000EA7E
-  4813 0001:0000EA85  4814 0001:0000EA98  4815 0001:0000EAA6  4819 0001:0000EAAC
-  4820 0001:0000EAB2  4823 0001:0000EAB4  4824 0001:0000EAB7  4825 0001:0000EAC2
-  4828 0001:0000EAC4  4829 0001:0000EACD  4830 0001:0000EADA  4833 0001:0000EAE0
-  4834 0001:0000EB00  4835 0001:0000EB0E  4836 0001:0000EB33  4840 0001:0000EB38
-  4841 0001:0000EB44  4845 0001:0000EB48  4846 0001:0000EB54  4850 0001:0000EB58
-  4851 0001:0000EB64  4855 0001:0000EB68  4856 0001:0000EB74  4862 0001:0000EB78
-  4863 0001:0000EB87  4864 0001:0000EBEA  4873 0001:0000EBF0  4874 0001:0000EC03
-  4876 0001:0000EC27  4877 0001:0000EC31  4878 0001:0000EC36  4874 0001:0000EC37
-  4879 0001:0000EC3A  4880 0001:0000EC45  4881 0001:0000EC5F  4888 0001:0000EC68
-  4889 0001:0000EC77  4890 0001:0000EC81  4891 0001:0000EC8B  4892 0001:0000EC9B
-  4894 0001:0000ECC0  4895 0001:0000ECCD  4897 0001:0000ED21  4900 0001:0000ED30
-  4901 0001:0000ED41  4902 0001:0000ED4B  4892 0001:0000ED4E  4903 0001:0000ED57
-  4907 0001:0000ED60  4908 0001:0000ED66  4909 0001:0000ED6D  4910 0001:0000ED73
-  4911 0001:0000ED85  4912 0001:0000ED8E  4919 0001:0000ED94  4920 0001:0000EDA5
-  4921 0001:0000EDB0  4922 0001:0000EDBB  4924 0001:0000EDE0  4925 0001:0000EDED
-  4927 0001:0000EE04  4928 0001:0000EE12  4930 0001:0000EE1F  4931 0001:0000EE41
-  4933 0001:0000EE8F  4935 0001:0000EF0B  4936 0001:0000EF1C  4937 0001:0000EF29
-  4922 0001:0000EF2C  4938 0001:0000EF35  4944 0001:0000EF3C  4945 0001:0000EF43
-  4946 0001:0000EF4A  4947 0001:0000EF50  4948 0001:0000EF55  4949 0001:0000EF61
-  4955 0001:0000EF68  4956 0001:0000EF7D  4957 0001:0000EF86  4958 0001:0000EF92
-  4959 0001:0000EF9C  4960 0001:0000EFBD  4964 0001:0000EFC8  4965 0001:0000EFCE
-  4966 0001:0000EFD5  4967 0001:0000EFDC  4971 0001:0000EFE0  4972 0001:0000EFE6
-  4973 0001:0000EFED  4974 0001:0000EFF4  4982 0001:0000EFF8  4983 0001:0000F002
-  4985 0001:0000F00C  4986 0001:0000F015  4987 0001:0000F022  4988 0001:0000F02C
-  4989 0001:0000F030  4990 0001:0000F03D  4991 0001:0000F049  4992 0001:0000F056
-  4994 0001:0000F05E  4996 0001:0000F090  5002 0001:0000F098  5003 0001:0000F0B4
-  5004 0001:0000F0BE  5005 0001:0000F0CC  5006 0001:0000F0EA  5007 0001:0000F12F
-  5014 0001:0000F138  5015 0001:0000F142  5017 0001:0000F148  5019 0001:0000F153
-  5020 0001:0000F15E  5021 0001:0000F168  5023 0001:0000F17C  5024 0001:0000F186
-  5025 0001:0000F190  5026 0001:0000F1A0  5027 0001:0000F1B0  5028 0001:0000F1B4
-  5029 0001:0000F1C1  5031 0001:0000F1CD  5036 0001:0000F1D4  5037 0001:0000F1DF
-  5041 0001:0000F1E0  5042 0001:0000F1E9  5044 0001:0000F1F4  5045 0001:0000F1F8
-  5046 0001:0000F207  5047 0001:0000F212  5049 0001:0000F219  5053 0001:0000F224
-  5054 0001:0000F227  5055 0001:0000F22D  5056 0001:0000F232  5060 0001:0000F234
-  5061 0001:0000F237  5062 0001:0000F23D  5063 0001:0000F242  5067 0001:0000F244
-  5068 0001:0000F247  5070 0001:0000F24F  5071 0001:0000F255  5073 0001:0000F25A
-  5102 0001:0000F25C  5103 0001:0000F271  5104 0001:0000F27A  5105 0001:0000F281
-  5106 0001:0000F288  5107 0001:0000F2A6  5114 0001:0000F2AC  5115 0001:0000F2B5
-  5116 0001:0000F2BE  5119 0001:0000F2F1  5122 0001:0000F2F8  5123 0001:0000F2FB
-  5125 0001:0000F303  5126 0001:0000F309  5128 0001:0000F30E  5131 0001:0000F310
-  5132 0001:0000F313  5134 0001:0000F31B  5135 0001:0000F321  5137 0001:0000F326
-  5140 0001:0000F328  5141 0001:0000F32B  5143 0001:0000F333  5144 0001:0000F339
-  5146 0001:0000F33E  5155 0001:0000F340  5156 0001:0000F34B  5157 0001:0000F352
-  5158 0001:0000F35E  5159 0001:0000F364  5161 0001:0000F374  5163 0001:0000F387
-  5164 0001:0000F39F  5165 0001:0000F3B5  5166 0001:0000F3C6  5168 0001:0000F3E9
-  5173 0001:0000F3F0  5174 0001:0000F3FA  5177 0001:0000F3FC  5178 0001:0000F403
-  5179 0001:0000F409  5180 0001:0000F41C  5182 0001:0000F425  5185 0001:0000F42C
-  5186 0001:0000F432  5187 0001:0000F444  5190 0001:0000F448  5191 0001:0000F44E
-  5192 0001:0000F460  5195 0001:0000F464  5196 0001:0000F46D  5197 0001:0000F477
-  5204 0001:0000F47C  5205 0001:0000F485  5206 0001:0000F48E  5209 0001:0000F490
-  5210 0001:0000F497  5211 0001:0000F49D  5212 0001:0000F4A5  5214 0001:0000F4AA
-  5215 0001:0000F4B9  5218 0001:0000F4C0  5219 0001:0000F4CE  5221 0001:0000F4D7
-  5222 0001:0000F4EB  5223 0001:0000F4F3  5225 0001:0000F4FD  5228 0001:0000F504
-  5229 0001:0000F520  5231 0001:0000F52C  5232 0001:0000F536  5233 0001:0000F53F
-  5234 0001:0000F552  5236 0001:0000F570  5237 0001:0000F5A6  5240 0001:0000F5B0
-  5241 0001:0000F5B3  5242 0001:0000F5BA  5245 0001:0000F5BC  5246 0001:0000F5D8
-  5247 0001:0000F5E1  5248 0001:0000F5F5  5249 0001:0000F5F9  5251 0001:0000F600
-  5252 0001:0000F613  5254 0001:0000F643  5257 0001:0000F64C  5258 0001:0000F673
-  5259 0001:0000F67F  5262 0001:0000F6AC  5264 0001:0000F6DC  5267 0001:0000F710
-  5268 0001:0000F719  5269 0001:0000F725  5271 0001:0000F735  5272 0001:0000F73E
-  5278 0001:0000F744  5279 0001:0000F77F  5280 0001:0000F784  5282 0001:0000F79B
-  5284 0001:0000F828  5285 0001:0000F82A  5287 0001:0000F866  5280 0001:0000F867
-  5288 0001:0000F86E  5289 0001:0000F873  5290 0001:0000F883  5291 0001:0000F88F
-  5293 0001:0000F8AB  5294 0001:0000F937  5299 0001:0000F970  5300 0001:0000F98B
-  5301 0001:0000F995  5303 0001:0000F99E  5304 0001:0000F9A8  5305 0001:0000F9B9
-  5306 0001:0000F9CD  5308 0001:0000F9ED  5309 0001:0000FA1A  5318 0001:0000FA20
-  5319 0001:0000FA2C  5320 0001:0000FA30  5324 0001:0000FA3A  5327 0001:0000FA48
-  5329 0001:0000FA4B  5330 0001:0000FA59  5332 0001:0000FA6A  5333 0001:0000FA7F
-  5335 0001:0000FA85  5336 0001:0000FA8C  5342 0001:0000FA96  5343 0001:0000FAA5
-  5346 0001:0000FAAC  5347 0001:0000FAC1  5348 0001:0000FACA  5349 0001:0000FAE8
-  5352 0001:0000FAEC  5353 0001:0000FAF3  5354 0001:0000FB07  5355 0001:0000FB11
-  5356 0001:0000FB23  5360 0001:0000FB28  5361 0001:0000FB4B  5362 0001:0000FB81
-  5370 0001:0000FB88  5371 0001:0000FBB7  5372 0001:0000FBBB  5374 0001:0000FBD0
-  5375 0001:0000FBD2  5376 0001:0000FBD7  5378 0001:0000FBF6  5379 0001:0000FC11
-  5381 0001:0000FC32  5382 0001:0000FC35  5384 0001:0000FC37  5376 0001:0000FC3A
-  5385 0001:0000FC65  5391 0001:0000FC70  5392 0001:0000FC97  5393 0001:0000FC9F
-  5395 0001:0000FCC1  5397 0001:0000FCDC  5399 0001:0000FCE8  5400 0001:0000FCF0
-  5401 0001:0000FD0C  5404 0001:0000FD3B  5393 0001:0000FD3C  5405 0001:0000FD61
-  5408 0001:0000FD6C  5409 0001:0000FD6F  5410 0001:0000FD77  5421 0001:0000FD7C
-  5422 0001:0000FDA5  5423 0001:0000FDB3  5424 0001:0000FDC1  5425 0001:0000FDCC
-  5426 0001:0000FDD7  5427 0001:0000FDDF  5428 0001:0000FDEA  5430 0001:0000FDF5
-  5431 0001:0000FE13  5432 0001:0000FE2B  5433 0001:0000FE48  5434 0001:0000FE5B
-  5435 0001:0000FE5F  5436 0001:0000FE66  5437 0001:0000FE83  5438 0001:0000FE8D
-  5439 0001:0000FE98  5441 0001:0000FEB0  5443 0001:0000FEE8  5446 0001:0000FEF0
-  5447 0001:0000FEF6  5448 0001:0000FF05  5451 0001:0000FF08  5452 0001:0000FF0E
-  5453 0001:0000FF1D  5459 0001:0000FF20  5460 0001:0000FF3E  5462 0001:0000FF50
-  5463 0001:0000FF73  5464 0001:0000FF8E  5462 0001:0000FFB5  5466 0001:0000FFD5
-  5469 0001:0000FFDC  5470 0001:0000FFDF  5472 0001:0000FFE7  5473 0001:0000FFED
-  5475 0001:0000FFF2  5478 0001:0000FFF4  5479 0001:0000FFFD  5480 0001:00010003
-  5481 0001:0001002B  5484 0001:00010030  5485 0001:00010033  5487 0001:0001003B
-  5488 0001:00010041  5490 0001:00010046  5493 0001:00010048  5494 0001:00010051
-  5495 0001:00010057  5496 0001:0001007F  5500 0001:00010084  5501 0001:00010090
-  5502 0001:000100A4  5506 0001:000100AC  5507 0001:000100D0  5509 0001:000100D4
-  5510 0001:000100E9  5511 0001:00010100  5514 0001:0001013C  5515 0001:00010166
-  5518 0001:00010170  5519 0001:00010197  5520 0001:000101A6  5523 0001:000101D3
-  5525 0001:00010206  5528 0001:00010238  5529 0001:00010241  5530 0001:00010250
-  5532 0001:00010263  5533 0001:0001026C  5536 0001:00010270  5537 0001:00010273
-  5538 0001:00010279  5539 0001:0001027E  5544 0001:00010280  5545 0001:00010297
-  5546 0001:000102A0  5547 0001:000102A7  5548 0001:000102AE  5549 0001:000102B5
-  5550 0001:000102BC  5551 0001:000102C3  5552 0001:000102CA  5553 0001:000102DB
-  5554 0001:000102FE  5557 0001:00010304  5558 0001:00010312  5559 0001:0001031A
-  5560 0001:00010331  5563 0001:00010338  5564 0001:00010341  5565 0001:00010350
-  5566 0001:00010355  5568 0001:00010359  5569 0001:00010361  5571 0001:0001036B
-  5572 0001:00010374  5576 0001:00010378  5577 0001:00010381  5578 0001:00010386
-  5580 0001:00010391  5581 0001:00010398  5582 0001:000103A4  5584 0001:000103B4
-  5585 0001:000103D3  5591 0001:00010433  5592 0001:00010448  5593 0001:0001047F
-  5600 0001:00010498  5601 0001:000104BF  5603 0001:000104C5  5604 0001:000104CC
-  5605 0001:000104D3  5606 0001:000104DA  5607 0001:000104E1  5608 0001:000104E8
-  5612 0001:000104F4  5613 0001:000104F6  5615 0001:00010501  5616 0001:00010510
-  5617 0001:00010528  5618 0001:00010550  5619 0001:00010576  5620 0001:0001057B
-  5621 0001:00010580  5622 0001:00010585  5623 0001:0001058A  5624 0001:0001058F
-  5626 0001:00010592  5627 0001:0001059C  5628 0001:000105B9  5630 0001:000105E5
-  5633 0001:000105F8  5634 0001:000105FF  5635 0001:00010613  5636 0001:00010625
-  5639 0001:0001062C  5640 0001:00010638  5641 0001:00010643  5642 0001:00010656
-  5645 0001:0001065C  5646 0001:0001065F  5648 0001:00010664  5649 0001:00010667
-  5651 0001:0001066E  5654 0001:00010670  5655 0001:00010673  5657 0001:00010678
-  5658 0001:0001067B  5660 0001:00010682  5663 0001:00010684  5664 0001:00010687
-  5666 0001:0001068C  5667 0001:0001068F  5669 0001:00010696  5672 0001:00010698
-  5673 0001:0001069B  5675 0001:000106A0  5676 0001:000106A3  5678 0001:000106AA
-  5681 0001:000106AC  5682 0001:000106AF  5684 0001:000106B4  5685 0001:000106B7
-  5687 0001:000106BE  5690 0001:000106C0  5691 0001:000106C3  5693 0001:000106C8
-  5694 0001:000106CB  5696 0001:000106D2  5701 0001:000106D4  5702 0001:000106E9
-  5703 0001:000106F2  5704 0001:00010706  5705 0001:0001070D  5706 0001:0001072B
-  5709 0001:00010730  5710 0001:00010745  5711 0001:0001074E  5712 0001:00010757
-  5713 0001:00010775  5716 0001:0001077C  5717 0001:00010782  5718 0001:0001078D
-  5719 0001:00010794  5720 0001:000107A6  5723 0001:000107AC  5724 0001:000107BA
-  5725 0001:000107CE  5726 0001:000107D9  5727 0001:000107F0  5731 0001:000107F4
-  5732 0001:000107FD  5733 0001:0001080A  5737 0001:00010810  5738 0001:00010819
-  5741 0001:0001081C  5742 0001:0001081F  5743 0001:0001082A  5746 0001:0001082C
-  5747 0001:0001082F  5748 0001:0001083A  5751 0001:0001083C  5752 0001:0001083F
-  5754 0001:00010848  5756 0001:0001085B  5757 0001:00010876  5758 0001:0001087F
-  5763 0001:00010888  5764 0001:0001089B  5765 0001:000108A4  5766 0001:000108BF
-  5769 0001:000108C6  5772 0001:000108C8  5773 0001:000108CE  5774 0001:000108D5
-  5775 0001:000108E1  5778 0001:000108E4  5779 0001:000108EA  5780 0001:000108F1
-  5781 0001:000108F8  5784 0001:000108FC  5785 0001:00010902  5786 0001:00010909
-  5787 0001:00010910  5790 0001:00010914  5791 0001:0001091A  5792 0001:0001092A
-  5796 0001:00010930  5798 0001:00010933  5799 0001:00010942  5801 0001:00010951
-  5812 0001:00010954  5813 0001:00010997  5814 0001:0001099E  5815 0001:000109A4
-  5816 0001:000109AB  5818 0001:000109B5  5820 0001:000109C2  5822 0001:000109CB
-  5823 0001:000109DC  5824 0001:000109EA  5825 0001:00010A00  5827 0001:00010A09
-  5828 0001:00010A10  5830 0001:00010A1A  5832 0001:00010A2C  5833 0001:00010A41
-  5834 0001:00010A49  5835 0001:00010A51  5840 0001:00010A59  5841 0001:00010A6E
-  5842 0001:00010A76  5843 0001:00010A7E  5846 0001:00010A84  5847 0001:00010A97
-  5849 0001:00010A9E  5851 0001:00010AA8  5852 0001:00010AAC  5854 0001:00010ABE
-  5856 0001:00010ACA  5857 0001:00010AD6  5859 0001:00010ADF  5863 0001:00010AE8
-  5864 0001:00010B00  5865 0001:00010B09  5868 0001:00010B12  5869 0001:00010B27
-  5870 0001:00010B2D  5871 0001:00010B33  5879 0001:00010B39  5881 0001:00010B45
-  5882 0001:00010B51  5884 0001:00010B57  5888 0001:00010B5D  5889 0001:00010B72
-  5890 0001:00010B78  5893 0001:00010B7E  5894 0001:00010B8A  5896 0001:00010B90
-  5901 0001:00010B94  5905 0001:00010BA3  5906 0001:00010BB4  5907 0001:00010BC4
-  5909 0001:00010BCA  5910 0001:00010BD4  5912 0001:00010BE1  5913 0001:00010BED
-  5915 0001:00010BF5  5917 0001:00010C0B  5918 0001:00010C18  5920 0001:00010C20
-  5922 0001:00010C30  5924 0001:00010C38  5925 0001:00010C44  5927 0001:00010C6C
-  5928 0001:00010C75  5929 0001:00010C7C  5930 0001:00010C8F  5931 0001:00010C9A
-  5932 0001:00010CA7  5934 0001:00010CED  5935 0001:00010D10  5936 0001:00010D27
-  5940 0001:00010D37  5942 0001:00010D4F  5943 0001:00010D51  5944 0001:00010D67
-  5945 0001:00010D76  5947 0001:00010D7B  5950 0001:00010D85  5951 0001:00010DDF
-  5945 0001:00010DEC  5953 0001:00010DF1  5954 0001:00010E00  5955 0001:00010E17
-  5956 0001:00010E25  5957 0001:00010E31  5958 0001:00010E63  5959 0001:00010E79
-  5963 0001:00010E9F  5967 0001:00010ED9  5977 0001:00010EFC  5978 0001:00010F2C
-  5980 0001:00010F39  5981 0001:00010F5A  5982 0001:00010F68  5983 0001:00010F7C
-  5984 0001:00010F8A  5986 0001:00010F96  5987 0001:00010FA7  5988 0001:00010FB4
-  5989 0001:00010FC1  5990 0001:00010FCC  5992 0001:00010FD9  5993 0001:00010FE6
-  5995 0001:00010FF4  5997 0001:00011009  6001 0001:0001104C  6002 0001:00011058
-  6003 0001:00011066  6005 0001:00011072  6006 0001:0001107F  6007 0001:0001108F
-  6008 0001:000110CD  6010 0001:000110DA  6011 0001:000110EA  6013 0001:00011135
-  6016 0001:0001114B  6017 0001:0001115C  6020 0001:00011169  6022 0001:00011172
-  6023 0001:0001117F  6025 0001:0001118B  6027 0001:000111A1  6030 0001:000111AB
-  6031 0001:000111BB  6032 0001:000111CB  6033 0001:000111D6  6036 0001:000111E3
-  6037 0001:000111EF  6039 0001:0001120F  6040 0001:00011214  6041 0001:00011220
-  6043 0001:00011228  6045 0001:00011261  6048 0001:00011280  6051 0001:000112A5
-  6052 0001:000112AB  6055 0001:000112DD  6058 0001:000112E4  6059 0001:000112E7
-  6061 0001:000112EF  6062 0001:000112F5  6064 0001:00011303  6067 0001:00011308
-  6068 0001:0001130B  6069 0001:0001131C  6072 0001:00011320  6073 0001:00011326
-  6074 0001:0001132D  6075 0001:0001133C  6076 0001:00011343  6084 0001:00011348
-  6085 0001:00011353  6087 0001:00011358  6089 0001:0001136F  6090 0001:0001137C
-  6092 0001:0001138F  6093 0001:00011394  6095 0001:000113AF  6097 0001:000113C8
-  6098 0001:000113D5  6100 0001:000113DA  6102 0001:000113FA  6103 0001:00011400
-  6105 0001:0001140F  6109 0001:0001141A  6093 0001:0001141B  6110 0001:0001141E
-  6111 0001:0001142A  6114 0001:00011436  6115 0001:0001143D  6116 0001:00011444
-  6119 0001:0001144C  6120 0001:00011452  6122 0001:0001145A  6123 0001:00011460
-  6124 0001:00011467  6126 0001:0001146E  6129 0001:00011474  6130 0001:0001147A
-  6132 0001:00011482  6133 0001:00011488  6134 0001:0001148F  6136 0001:00011496
-  6147 0001:0001149C  6148 0001:000114A7  6150 0001:000114D5  6151 0001:000114DF
-  6152 0001:000114E9  6153 0001:000114F7  6154 0001:0001150F  6155 0001:0001151D
-  6157 0001:00011548  6160 0001:0001156A  6162 0001:0001157D  6169 0001:000115C7
-  6170 0001:000115D1  6172 0001:000115DD  6173 0001:000115E8  6176 0001:00011606
-  6177 0001:00011622  6178 0001:00011641  6181 0001:00011660  6184 0001:00011670
-  6185 0001:00011679  6186 0001:00011682  6189 0001:00011688  6190 0001:000116A1
-  6192 0001:000116B7  6193 0001:000116C0  6194 0001:000116C7  6196 0001:000116EB
-  6199 0001:000116F0  6200 0001:000116F3  6201 0001:000116F9  6202 0001:000116FE
-  6205 0001:00011700  6206 0001:00011706  6207 0001:0001170C  6208 0001:0001171C
-  6209 0001:00011725  6210 0001:0001172C  6217 0001:00011730  6218 0001:00011738
-  6220 0001:00011748  6222 0001:00011762  6224 0001:0001177B  6225 0001:00011785
-  6226 0001:00011797  6228 0001:000117A3  6220 0001:000117A4  6230 0001:000117A7
-  6233 0001:000117AC  6234 0001:000117B2  6235 0001:000117B9  6236 0001:000117C0
-  6239 0001:000117C4  6240 0001:000117C7  6241 0001:000117CD  6242 0001:000117D2
-  6245 0001:000117D4  6246 0001:000117DD  6248 0001:000117E7  6249 0001:000117EB
-  6250 0001:000117F2  6251 0001:000117FA  6253 0001:000117FE  6254 0001:00011805
-  6257 0001:0001180C  6266 0001:00011810  6267 0001:0001181E  6268 0001:00011824
-  6269 0001:0001183C  6271 0001:0001184E  6273 0001:00011869  6274 0001:0001186F
-  6276 0001:00011873  6277 0001:00011888  6278 0001:0001188C  6279 0001:000118A2
-  6271 0001:000118A3  6281 0001:000118A6  6283 0001:000118AC  6284 0001:000118B3
-  6285 0001:000118C0  6286 0001:000118C9  6290 0001:000118CC  6291 0001:000118D8
-  6292 0001:000118E3  6293 0001:000118F0  6294 0001:000118F8  6297 0001:00011900
-  6298 0001:00011903  6299 0001:00011909  6300 0001:0001190E  6303 0001:00011910
-  6309 0001:00011919  6310 0001:00011927  6312 0001:00011930  6313 0001:00011935
-  6323 0001:0001193C  6328 0001:00011940  6329 0001:0001194A  6330 0001:00011953
-  6331 0001:00011958  6333 0001:00011969  6334 0001:0001196E  6336 0001:00011977
-  6337 0001:00011999  6338 0001:000119A9  6339 0001:000119CB  6340 0001:000119DB
-  6343 0001:00011A00  6350 0001:00011A08  6351 0001:00011A15  6352 0001:00011A17
-  6353 0001:00011A1C  6354 0001:00011A21  6356 0001:00011A27  6358 0001:00011A3C
-  6359 0001:00011A4C  6360 0001:00011A4E  6362 0001:00011A54  6364 0001:00011A69
-  6365 0001:00011A79  6366 0001:00011A7B  6369 0001:00011A81  6370 0001:00011A8A
-  6371 0001:00011A8E  6372 0001:00011AB3  6379 0001:00011ABC  6380 0001:00011AC9
-  6381 0001:00011ACB  6382 0001:00011AD0  6385 0001:00011AD5  6387 0001:00011AE7
-  6388 0001:00011AF7  6389 0001:00011AF9  6390 0001:00011AFF  6392 0001:00011B05
-  6394 0001:00011B17  6395 0001:00011B27  6396 0001:00011B29  6397 0001:00011B2F
-  6400 0001:00011B35  6401 0001:00011B3E  6402 0001:00011B42  6403 0001:00011B67
-  6408 0001:00011B70  6409 0001:00011B7E  6410 0001:00011B88  6411 0001:00011B8D
-  6412 0001:00011BA4  6419 0001:00011BA8  6420 0001:00011BB1  6421 0001:00011BB9
-  6423 0001:00011BC9  6424 0001:00011BD5  6425 0001:00011BEA  6426 0001:00011BFB
-  6427 0001:00011C09  6428 0001:00011C1A  6429 0001:00011C25  6430 0001:00011C32
-  6432 0001:00011C50  6435 0001:00011C6A  6439 0001:00011C70  6440 0001:00011C76
-  6442 0001:00011C8A  6444 0001:00011C95  6449 0001:00011C98  6450 0001:00011C9E
-  6451 0001:00011CA5  6452 0001:00011CCC  6455 0001:00011CD0  6456 0001:00011CE5
-  6457 0001:00011CEE  6458 0001:00011D2C  6461 0001:00011D30  6462 0001:00011D3E
-  6463 0001:00011D4A  6465 0001:00011D59  6466 0001:00011D62  6467 0001:00011D6B
-  6468 0001:00011D76  6469 0001:00011D81  6471 0001:00011D92  6474 0001:00011D97
-  6479 0001:00011DA0  6480 0001:00011DAA  6481 0001:00011DB4  6483 0001:00011DBD
-  6484 0001:00011DC6  6487 0001:00011DCC  6488 0001:00011DF3  6489 0001:00011E02
-  6491 0001:00011E2F  6492 0001:00011E62  6495 0001:00011E94  6496 0001:00011E9E
-  6497 0001:00011EA7  6498 0001:00011EBD  6499 0001:00011EC6  6500 0001:00011ED3
-  6501 0001:00011EE0  6502 0001:00011EED  6503 0001:00011EFB  6505 0001:00011F06
-  6506 0001:00011F13  6509 0001:00011F18  6510 0001:00011F21  6511 0001:00011F30
-  6513 0001:00011F43  6514 0001:00011F4C  6521 0001:00011F50  6522 0001:00011F5E
-  6524 0001:00011F6E  6526 0001:00011F84  6528 0001:00011FA6  6530 0001:00011FC0
-  6532 0001:00011FD2  6533 0001:00011FE0  6534 0001:00011FEE  6535 0001:00012007
-  6536 0001:00012028  6535 0001:00012035  6537 0001:00012038  6539 0001:0001205C
-  6544 0001:00012072  6545 0001:0001207D  6550 0001:00012084  6551 0001:0001208E
-  6552 0001:00012098  6554 0001:000120A1  6555 0001:000120AA  6558 0001:000120B0
-  6559 0001:000120BA  6560 0001:000120C3  6561 0001:000120D9  6562 0001:000120E2
-  6563 0001:000120EF  6564 0001:000120FC  6565 0001:00012109  6566 0001:00012117
-  6568 0001:00012122  6569 0001:0001212F  6574 0001:00012134  6575 0001:0001213E
-  6576 0001:00012148  6578 0001:00012151  6579 0001:0001215A  6582 0001:00012160
-  6583 0001:0001216A  6584 0001:00012173  6585 0001:00012189  6586 0001:00012192
-  6587 0001:0001219F  6588 0001:000121AC  6589 0001:000121B9  6590 0001:000121C7
-  6592 0001:000121D2  6593 0001:000121DF  6598 0001:000121E4  6599 0001:000121EE
-  6600 0001:000121F8  6602 0001:00012201  6603 0001:0001220A  6606 0001:00012210
-  6607 0001:0001221A  6608 0001:00012223  6609 0001:00012239  6610 0001:00012242
-  6611 0001:0001224F  6612 0001:0001225C  6613 0001:00012269  6614 0001:00012277
-  6616 0001:00012282  6617 0001:0001228F  6622 0001:00012294  6623 0001:000122BB
-  6624 0001:000122CA  6626 0001:000122F3  6627 0001:00012326  6630 0001:00012358
-  6631 0001:00012361  6632 0001:00012370  6634 0001:00012383  6635 0001:0001238C
-  6640 0001:00012390  6641 0001:00012399  6642 0001:000123A2  6645 0001:000123A8
-  6646 0001:000123B2  6647 0001:000123BB  6648 0001:000123D1  6649 0001:000123DA
-  6650 0001:000123E7  6651 0001:000123F4  6652 0001:00012401  6653 0001:0001240F
-  6655 0001:0001241A  6656 0001:00012427  6657 0001:00012430  6662 0001:00012438
-  6663 0001:00012442  6664 0001:0001244C  6666 0001:00012455  6667 0001:0001245E
-  6670 0001:00012464  6671 0001:0001246E  6672 0001:00012477  6673 0001:0001248D
-  6674 0001:00012496  6675 0001:000124A3  6676 0001:000124B0  6677 0001:000124BD
-  6678 0001:000124CB  6680 0001:000124D6  6681 0001:000124E3  6688 0001:000124E8
-  6689 0001:000124F3  6690 0001:000124FA  6692 0001:00012521  6693 0001:0001252B
-  6694 0001:00012538  6695 0001:00012549  6697 0001:00012557  6702 0001:00012560
-  6705 0001:00012568  6706 0001:0001256A  6708 0001:000125B4  6712 0001:000125B8
-  6713 0001:000125C6  6714 0001:000125FC  6715 0001:00012613  6718 0001:0001261C
-  6719 0001:00012629  6721 0001:00012635  6723 0001:0001265D  6725 0001:00012685
-  6728 0001:00012694  6729 0001:000126BB  6730 0001:000126CA  6732 0001:000126F3
-  6733 0001:00012726  6736 0001:00012758  6737 0001:00012761  6738 0001:00012770
-  6740 0001:00012783  6741 0001:0001278C  6744 0001:00012790  6745 0001:00012793
-  6748 0001:000127C0  6750 0001:000127C4  6751 0001:000127C6  6755 0001:000127C8
-  6756 0001:000127CD  6757 0001:000127D8  6758 0001:000127DD  6760 0001:000127E9
-  6761 0001:000127EF  6765 0001:000127F0  6766 0001:000127F6  6772 0001:000127F8
-  6773 0001:00012826  6774 0001:00012829  6782 0001:00012832  6783 0001:00012837
-  6784 0001:00012856  6785 0001:0001288E  6783 0001:0001289A  6786 0001:0001289D
-  6787 0001:000128A3  6789 0001:000128AA  6790 0001:000128B3  6791 0001:000128ED
-  6796 0001:000128F4  6797 0001:0001291B  6798 0001:00012925  6799 0001:00012940
-  6800 0001:00012969  6810 0001:00012970  6812 0001:000129B8  6802 0001:000129BC
-  6804 0001:000129C8  6805 0001:000129CF  6806 0001:000129E4  6808 0001:000129F5
+  1086 0001:000062E0  1089 0001:000062E4  1090 0001:000062E7  1092 0001:000062F0
+  1093 0001:000062FA  1096 0001:0000630D  1097 0001:0000631F  1105 0001:00006324
+  1106 0001:0000632D  1107 0001:00006337  1108 0001:00006345  1109 0001:00006352
+  1110 0001:00006360  1111 0001:00006374  1113 0001:000063AC  1116 0001:000063CE
+  1118 0001:000063E4  1126 0001:00006430  1127 0001:0000643B  1128 0001:00006444
+  1129 0001:0000644D  1130 0001:00006457  1131 0001:0000645A  1132 0001:00006461
+  1133 0001:0000646B  1138 0001:00006474  1139 0001:00006476  1140 0001:0000647E
+  1145 0001:00006480  1146 0001:00006482  1147 0001:0000648A  1154 0001:0000648C
+  1155 0001:0000649A  1156 0001:0000649F  1157 0001:000064A8  1160 0001:000064B3
+  1161 0001:000064BD  1162 0001:000064C2  1158 0001:000064CB  1164 0001:000064D4
+  1165 0001:000064DF  1166 0001:00006503  1173 0001:0000650C  1174 0001:00006537
+  1175 0001:0000653C  1176 0001:00006548  1179 0001:00006556  1180 0001:00006560
+  1181 0001:00006565  1177 0001:00006571  1183 0001:0000657A  1184 0001:00006587
+  1185 0001:0000658C  1186 0001:000065BD  1187 0001:00006627  1193 0001:00006630
+  1194 0001:00006654  1195 0001:0000665B  1196 0001:000066B0  1197 0001:000066ED
+  1204 0001:00006700  1205 0001:00006728  1207 0001:00006747  1209 0001:00006758
+  1210 0001:00006782  1213 0001:000067A0  1214 0001:000067AB  1216 0001:000067BB
+  1217 0001:000067D0  1219 0001:000067DE  1220 0001:000067F8  1222 0001:0000681A
+  1223 0001:00006860  1227 0001:00006874  1228 0001:00006882  1229 0001:00006884
+  1230 0001:000068A3  1236 0001:000068AC  1237 0001:000068B3  1238 0001:000068C4
+  1239 0001:000068D8  1244 0001:000068E0  1245 0001:000068E3  1246 0001:00006905
+  1247 0001:00006913  1250 0001:00006918  1251 0001:0000691B  1252 0001:00006929
+  1253 0001:00006945  1257 0001:00006948  1258 0001:0000695D  1259 0001:00006966
+  1260 0001:00006996  1264 0001:0000699C  1265 0001:000069AA  1266 0001:000069B5
+  1267 0001:000069C1  1268 0001:000069D3  1272 0001:000069D8  1273 0001:000069DE
+  1274 0001:000069E5  1275 0001:000069EC  1276 0001:000069FC  1277 0001:00006A00
+  1285 0001:00006A04  1286 0001:00006A22  1287 0001:00006A2C  1289 0001:00006A32
+  1290 0001:00006A41  1291 0001:00006A55  1295 0001:00006A99  1297 0001:00006AE3
+  1301 0001:00006AEC  1302 0001:00006AF2  1306 0001:00006AFB  1307 0001:00006B10
+  1308 0001:00006B17  1309 0001:00006B26  1311 0001:00006B2D  1317 0001:00006B30
+  1318 0001:00006B3B  1319 0001:00006B47  1320 0001:00006B51  1322 0001:00006B56
+  1323 0001:00006B65  1327 0001:00006B7C  1328 0001:00006B9C  1329 0001:00006BB3
+  1330 0001:00006BE0  1332 0001:00006BF5  1334 0001:00006BFA  1335 0001:00006BFE
+  1338 0001:00006C32  1339 0001:00006C43  1341 0001:00006C4D  1332 0001:00006C4E
+  1342 0001:00006C53  1349 0001:00006C5C  1350 0001:00006C82  1351 0001:00006C93
+  1352 0001:00006CA7  1354 0001:00006CB0  1355 0001:00006CC3  1358 0001:00006CD8
+  1359 0001:00006CF2  1361 0001:00006D05  1362 0001:00006D33  1364 0001:00006D6E
+  1366 0001:00006D75  1369 0001:00006DBA  1370 0001:00006DC9  1371 0001:00006DD0
+  1372 0001:00006DD5  1373 0001:00006DDB  1375 0001:00006DEA  1376 0001:00006DF4
+  1378 0001:00006DFE  1379 0001:00006E02  1381 0001:00006E0E  1382 0001:00006E10
+  1384 0001:00006E23  1386 0001:00006E38  1387 0001:00006E47  1390 0001:00006E54
+  1392 0001:00006E56  1393 0001:00006E5D  1394 0001:00006E79  1396 0001:00006E9F
+  1397 0001:00006ED5  1402 0001:00006F00  1403 0001:00006F13  1404 0001:00006F19
+  1405 0001:00006F1F  1406 0001:00006F25  1407 0001:00006F37  1408 0001:00006F5A
+  1409 0001:00006F64  1430 0001:000070D0  1431 0001:000070E7  1433 0001:000070F6
+  1434 0001:00007109  1436 0001:00007131  1437 0001:00007157  1443 0001:0000715C
+  1444 0001:00007161  1446 0001:00007168  1447 0001:0000716E  1448 0001:00007173
+  1444 0001:00007176  1449 0001:0000717A  1454 0001:00007180  1455 0001:00007186
+  1456 0001:0000718D  1457 0001:00007197  1458 0001:000071A5  1461 0001:000071A8
+  1462 0001:000071AE  1463 0001:000071B5  1464 0001:000071BF  1465 0001:000071CD
+  1472 0001:000071D0  1473 0001:000071EF  1474 0001:000071F5  1475 0001:000071F9
+  1476 0001:00007212  1477 0001:00007218  1478 0001:00007245  1483 0001:0000724C
+  1484 0001:00007253  1485 0001:0000725A  1486 0001:00007262  1487 0001:00007265
+  1488 0001:00007269  1489 0001:00007271  1490 0001:00007274  1493 0001:00007278
+  1494 0001:00007290  1495 0001:0000729F  1496 0001:000072A2  1497 0001:000072AE
+  1498 0001:000072C9  1503 0001:000072D0  1504 0001:000072DA  1505 0001:000072E1
+  1506 0001:000072EB  1507 0001:000072EE  1508 0001:000072F2  1509 0001:000072FC
+  1510 0001:000072FF  1513 0001:00007304  1514 0001:00007312  1515 0001:0000731A
+  1516 0001:00007331  1519 0001:00007338  1520 0001:00007345  1521 0001:0000734C
+  1522 0001:00007359  1525 0001:00007360  1526 0001:00007366  1527 0001:0000736D
+  1528 0001:00007375  1531 0001:00007378  1532 0001:00007381  1533 0001:00007388
+  1534 0001:00007392  1537 0001:00007398  1538 0001:000073A1  1539 0001:000073A8
+  1540 0001:000073B2  1545 0001:000073B8  1546 0001:000073DB  1547 0001:000073E2
+  1548 0001:000073EF  1549 0001:000073F5  1550 0001:000073F9  1551 0001:00007412
+  1552 0001:00007435  1558 0001:0000743C  1559 0001:0000745F  1560 0001:0000746C
+  1561 0001:00007472  1562 0001:00007476  1563 0001:0000748F  1564 0001:000074B2
+  1567 0001:000074BC  1568 0001:000074C6  1569 0001:000074D0  1572 0001:000074D8
+  1573 0001:000074DB  1574 0001:000074DF  1576 0001:000074E9  1577 0001:000074F1
+  1586 0001:000074F4  1587 0001:00007517  1588 0001:00007521  1589 0001:00007527
+  1590 0001:0000753D  1591 0001:00007544  1592 0001:0000755A  1593 0001:00007569
+  1594 0001:00007577  1595 0001:00007581  1596 0001:00007597  1597 0001:000075C2
+  1598 0001:000075ED  1599 0001:000075F9  1601 0001:00007603  1602 0001:0000761B
+  1603 0001:00007627  1604 0001:0000766B  1605 0001:00007677  1607 0001:000076C7
+  1608 0001:000076E0  1609 0001:000076ED  1610 0001:000076FE  1612 0001:00007723
+  1616 0001:00007732  1617 0001:00007764  1621 0001:00007796  1601 0001:00007797
+  1622 0001:000077A0  1623 0001:000077AC  1624 0001:000077BB  1627 0001:000077E7
+  1630 0001:00007826  1636 0001:00007940  1637 0001:00007955  1638 0001:0000795E
+  1639 0001:00007963  1640 0001:0000796D  1641 0001:00007977  1642 0001:0000797E
+  1643 0001:00007988  1644 0001:0000798F  1645 0001:00007996  1646 0001:0000799D
+  1647 0001:000079A4  1648 0001:000079AB  1649 0001:000079B2  1650 0001:000079BC
+  1651 0001:000079C6  1652 0001:000079CF  1653 0001:000079D6  1654 0001:000079E6
+  1655 0001:000079ED  1656 0001:000079F4  1657 0001:000079FB  1658 0001:00007A02
+  1659 0001:00007A09  1660 0001:00007A28  1664 0001:00007A38  1665 0001:00007A46
+  1666 0001:00007A51  1667 0001:00007A64  1668 0001:00007A6B  1669 0001:00007A70
+  1670 0001:00007A87  1674 0001:00007A8C  1675 0001:00007A92  1676 0001:00007A99
+  1677 0001:00007AA0  1685 0001:00007AA4  1686 0001:00007AAB  1687 0001:00007AB2
+  1688 0001:00007AB4  1690 0001:00007ABE  1691 0001:00007AC1  1693 0001:00007AC5
+  1694 0001:00007ACC  1696 0001:00007AD6  1697 0001:00007AD9  1699 0001:00007ADE
+  1700 0001:00007AE5  1701 0001:00007AF5  1705 0001:00007AFC  1706 0001:00007B02
+  1707 0001:00007B09  1708 0001:00007B24  1709 0001:00007B2B  1714 0001:00007B30
+  1715 0001:00007B36  1716 0001:00007B3D  1717 0001:00007B44  1718 0001:00007B4B
+  1724 0001:00007B50  1725 0001:00007B7D  1727 0001:00007B87  1728 0001:00007B8E
+  1729 0001:00007B99  1728 0001:00007BE4  1730 0001:00007BE7  1734 0001:00007BFD
+  1736 0001:00007C42  1742 0001:00007C4C  1743 0001:00007C6D  1744 0001:00007C71
+  1746 0001:00007C8B  1747 0001:00007C99  1748 0001:00007C9E  1749 0001:00007CAA
+  1748 0001:00007CE7  1750 0001:00007CEA  1751 0001:00007CF6  1752 0001:00007D00
+  1754 0001:00007D35  1761 0001:00007D3C  1762 0001:00007D4F  1763 0001:00007D56
+  1764 0001:00007D5D  1765 0001:00007D77  1766 0001:00007D7E  1768 0001:00007D82
+  1770 0001:00007D90  1784 0001:00007D98  1785 0001:00007DA1  1786 0001:00007DAA
+  1788 0001:00007DB3  1789 0001:00007DB6  1790 0001:00007DBA  1792 0001:00007DC2
+  1794 0001:00007DC7  1800 0001:00007DCC  1801 0001:00007DD5  1803 0001:00007DDE
+  1804 0001:00007DE5  1805 0001:00007DFD  1806 0001:00007E04  1807 0001:00007E08
+  1808 0001:00007E0E  1809 0001:00007E11  1810 0001:00007E3C  1812 0001:00007E48
+  1813 0001:00007E51  1820 0001:00007E58  1821 0001:00007E72  1822 0001:00007E7B
+  1824 0001:00007E8A  1825 0001:00007E91  1826 0001:00007EA9  1827 0001:00007EB0
+  1829 0001:00007EB4  1830 0001:00007EBB  1831 0001:00007ECC  1832 0001:00007EDE
+  1833 0001:00007EE9  1837 0001:00007EF2  1838 0001:00007EFC  1841 0001:00007F1E
+  1847 0001:00007F24  1848 0001:00007F3E  1849 0001:00007F47  1851 0001:00007F56
+  1852 0001:00007F5D  1853 0001:00007F75  1854 0001:00007F79  1856 0001:00007F97
+  1857 0001:00007F9C  1859 0001:00007FC0  1866 0001:00007FC8  1867 0001:00007FD2
+  1869 0001:00007FDF  1871 0001:00007FE8  1873 0001:00007FFA  1874 0001:00008003
+  1875 0001:00008018  1878 0001:0000801D  1879 0001:0000802F  1881 0001:00008031
+  1882 0001:00008036  1883 0001:0000803A  1885 0001:00008048  1886 0001:0000804F
+  1887 0001:00008058  1889 0001:0000805F  1890 0001:00008069  1892 0001:0000806F
+  1893 0001:00008076  1894 0001:0000808D  1896 0001:00008096  1898 0001:000080A5
+  1899 0001:000080AE  1905 0001:000080B4  1906 0001:000080BE  1908 0001:000080CB
+  1910 0001:000080D4  1912 0001:000080DD  1913 0001:000080E4  1917 0001:000080F4
+  1919 0001:000080FF  1920 0001:00008116  1922 0001:0000811F  1925 0001:0000812D
+  1926 0001:0000813F  1928 0001:00008141  1929 0001:00008146  1930 0001:0000814A
+  1932 0001:00008158  1933 0001:0000815F  1934 0001:00008168  1935 0001:0000816F
+  1936 0001:00008179  1938 0001:0000817F  1939 0001:00008186  1940 0001:0000819D
+  1942 0001:000081A6  1944 0001:000081B5  1945 0001:000081BE  1951 0001:000081C4
+  1954 0001:000081CD  1955 0001:000081D4  1956 0001:000081EC  1957 0001:000081F3
+  1959 0001:000081F7  1960 0001:00008209  1961 0001:00008217  1964 0001:00008222
+  1965 0001:00008229  1966 0001:00008232  1967 0001:00008239  1968 0001:00008243
+  1975 0001:00008248  1976 0001:00008254  1978 0001:0000825D  1979 0001:0000826D
+  1981 0001:00008280  1982 0001:00008287  1983 0001:0000829C  1984 0001:000082A3
+  1985 0001:000082AE  1979 0001:000082AF  1986 0001:000082B2  1989 0001:000082C2
+  1990 0001:000082CB  1991 0001:000082D3  1992 0001:000082DD  1996 0001:000082E4
+  1997 0001:000082EA  1998 0001:000082F1  1999 0001:000082FB  2003 0001:00008300
+  2004 0001:00008306  2005 0001:0000830D  2006 0001:0000832E  2007 0001:00008335
+  2014 0001:00008338  2016 0001:00008341  2018 0001:000083A4  2020 0001:000083B1
+  2022 0001:000083BC  2023 0001:000083D0  2025 0001:000083F1  2033 0001:00008405
+  2034 0001:0000840E  2036 0001:0000844A  2038 0001:00008486  2039 0001:000084A2
+  2040 0001:000084BE  2041 0001:000084CC  2042 0001:000084DA  2043 0001:000084F3
+  2044 0001:0000850C  2046 0001:00008515  2047 0001:0000851A  2057 0001:00008520
+  2058 0001:0000852D  2060 0001:0000853A  2061 0001:00008541  2062 0001:0000854B
+  2064 0001:00008568  2066 0001:0000858B  2067 0001:00008598  2068 0001:000085B4
+  2069 0001:000085C1  2074 0001:000085C8  2075 0001:000085F2  2077 0001:00008619
+  2079 0001:00008626  2081 0001:0000865F  2082 0001:00008668  2084 0001:000086A9
+  2087 0001:000086B7  2088 0001:000086DF  2089 0001:000086E8  2091 0001:00008723
+  2095 0001:00008731  2097 0001:0000873E  2098 0001:0000874A  2099 0001:00008750
+  2100 0001:00008760  2101 0001:0000876B  2103 0001:0000878E  2104 0001:000087AC
+  2108 0001:000087C3  2109 0001:000087CC  2114 0001:000087D4  2115 0001:000087DD
+  2116 0001:00008805  2117 0001:0000880C  2118 0001:00008815  2126 0001:0000881C
+  2127 0001:00008829  2129 0001:0000883F  2130 0001:00008849  2132 0001:00008866
+  2134 0001:00008889  2135 0001:00008896  2138 0001:000088AB  2139 0001:000088AE
+  2141 0001:000088BA  2142 0001:000088C3  2149 0001:000088CC  2150 0001:000088D8
+  2152 0001:000088E5  2156 0001:000088F5  2157 0001:00008929  2159 0001:00008974
+  2161 0001:00008981  2163 0001:000089BA  2164 0001:000089C3  2166 0001:00008A04
+  2169 0001:00008A0F  2170 0001:00008A37  2171 0001:00008A40  2173 0001:00008A7B
+  2177 0001:00008A84  2178 0001:00008A8D  2183 0001:00008A94  2184 0001:00008A9D
+  2185 0001:00008AA7  2186 0001:00008AB8  2187 0001:00008AC1  2191 0001:00008AC8
+  2192 0001:00008ACE  2193 0001:00008AD5  2194 0001:00008AE5  2199 0001:00008AE8
+  2200 0001:00008AF1  2201 0001:00008AFA  2202 0001:00008B1C  2203 0001:00008B2C
+  2209 0001:00008B30  2210 0001:00008B36  2211 0001:00008B3D  2212 0001:00008B4E
+  2218 0001:00008B54  2219 0001:00008B5D  2220 0001:00008B64  2221 0001:00008B6B
+  2222 0001:00008B74  2223 0001:00008B8D  2224 0001:00008BA5  2227 0001:00008BB0
+  2228 0001:00008BB6  2229 0001:00008BBD  2230 0001:00008BC7  2234 0001:00008BCC
+  2235 0001:00008BD2  2237 0001:00008BE4  2238 0001:00008BF4  2240 0001:00008C0C
+  2244 0001:00008C10  2250 0001:00008C13  2251 0001:00008C18  2255 0001:00008C1C
+  2256 0001:00008C22  2257 0001:00008C2C  2258 0001:00008C33  2259 0001:00008C3A
+  2266 0001:00008C40  2267 0001:00008C48  2269 0001:00008C51  2270 0001:00008C61
+  2272 0001:00008C74  2273 0001:00008C7B  2274 0001:00008C90  2275 0001:00008C97
+  2276 0001:00008C9B  2277 0001:00008CA6  2270 0001:00008CA7  2278 0001:00008CAA
+  2281 0001:00008CB1  2289 0001:00008CB8  2290 0001:00008CC4  2291 0001:00008CED
+  2292 0001:00008CF6  2293 0001:00008CFD  2294 0001:00008D12  2295 0001:00008D1B
+  2297 0001:00008D1F  2299 0001:00008D28  2300 0001:00008D38  2301 0001:00008D3E
+  2302 0001:00008D44  2307 0001:00008D4A  2308 0001:00008D50  2310 0001:00008D56
+  2313 0001:00008D5A  2314 0001:00008D66  2315 0001:00008D79  2316 0001:00008D83
+  2317 0001:00008D93  2318 0001:00008D9D  2319 0001:00008DA2  2322 0001:00008DA8
+  2323 0001:00008DB1  2324 0001:00008DBA  2325 0001:00008DD2  2332 0001:00008DD8
+  2333 0001:00008DED  2334 0001:00008DF7  2335 0001:00008E06  2337 0001:00008E21
+  2338 0001:00008E2A  2340 0001:00008E2E  2341 0001:00008E37  2343 0001:00008E42
+  2346 0001:00008E50  2356 0001:00008E58  2357 0001:00008E6B  2358 0001:00008E78
+  2362 0001:00008E99  2363 0001:00008EB6  2364 0001:00008EBC  2366 0001:00008EC2
+  2368 0001:00008EEB  2369 0001:00008EF5  2370 0001:00008EFC  2371 0001:00008F06
+  2374 0001:00008F0B  2376 0001:00008F21  2377 0001:00008F2C  2378 0001:00008F50
+  2380 0001:00008F5C  2382 0001:00008FA4  2383 0001:00008FDE  2384 0001:00008FF2
+  2387 0001:00008FFA  2388 0001:00009004  2391 0001:0000900E  2397 0001:00009018
+  2398 0001:0000903B  2400 0001:0000904D  2401 0001:00009056  2403 0001:00009066
+  2404 0001:00009077  2406 0001:0000908C  2407 0001:000090B5  2410 0001:000090BC
+  2411 0001:000090C5  2412 0001:000090D2  2413 0001:000090D9  2414 0001:000090E2
+  2417 0001:000090E8  2418 0001:000090EB  2419 0001:000090F4  2420 0001:000090F7
+  2421 0001:00009102  2422 0001:00009107  2434 0001:0000910C  2435 0001:00009135
+  2436 0001:0000913F  2437 0001:00009158  2440 0001:00009180  2441 0001:0000918E
+  2443 0001:000091A2  2444 0001:000091B1  2445 0001:000091C0  2447 0001:000091CD
+  2448 0001:000091D8  2449 0001:000091E1  2450 0001:000091E8  2451 0001:000091FD
+  2453 0001:00009206  2455 0001:00009213  2457 0001:00009217  2460 0001:00009222
+  2461 0001:0000922B  2463 0001:00009236  2467 0001:00009241  2468 0001:0000924A
+  2470 0001:00009255  2474 0001:00009260  2475 0001:00009269  2477 0001:00009274
+  2483 0001:0000927F  2484 0001:00009288  2486 0001:00009293  2488 0001:0000929C
+  2489 0001:000092AA  2490 0001:000092B0  2491 0001:000092BB  2492 0001:000092E1
+  2495 0001:000092FC  2496 0001:00009305  2498 0001:00009324  2499 0001:00009330
+  2501 0001:0000934C  2503 0001:0000935F  2504 0001:00009374  2505 0001:000093A3
+  2506 0001:000093C8  2507 0001:000093EE  2501 0001:000093EF  2508 0001:000093F6
+  2510 0001:0000943B  2512 0001:0000944E  2513 0001:00009463  2514 0001:00009492
+  2515 0001:000094B7  2516 0001:000094DD  2510 0001:000094DE  2519 0001:000094E7
+  2522 0001:00009538  2525 0001:00009544  2526 0001:0000954E  2528 0001:00009557
+  2530 0001:0000956A  2531 0001:00009574  2532 0001:00009588  2533 0001:00009598
+  2536 0001:000095AE  2537 0001:000095D2  2547 0001:000095D8  2548 0001:000095E5
+  2550 0001:000095F2  2552 0001:00009602  2553 0001:00009618  2554 0001:00009627
+  2555 0001:00009635  2558 0001:0000965E  2559 0001:00009668  2560 0001:00009677
+  2561 0001:0000967E  2563 0001:00009684  2564 0001:000096A9  2565 0001:000096D0
+  2566 0001:000096DE  2568 0001:000096F7  2570 0001:00009702  2571 0001:00009722
+  2572 0001:00009746  2574 0001:00009754  2578 0001:0000975F  2579 0001:00009767
+  2581 0001:00009773  2576 0001:0000977D  2586 0001:000097A5  2587 0001:000097B3
+  2588 0001:000097E3  2589 0001:000097E9  2590 0001:000097F5  2595 0001:00009816
+  2596 0001:00009825  2597 0001:00009834  2598 0001:00009852  2605 0001:00009871
+  2606 0001:0000987A  2607 0001:0000988F  2617 0001:00009898  2619 0001:000098A6
+  2622 0001:000098D3  2624 0001:000098EA  2625 0001:00009907  2627 0001:00009910
+  2628 0001:00009919  2631 0001:00009924  2632 0001:00009938  2633 0001:00009942
+  2629 0001:0000994C  2637 0001:00009966  2638 0001:0000996C  2640 0001:000099A6
+  2641 0001:000099C7  2645 0001:000099D0  2646 0001:000099F2  2647 0001:00009A07
+  2648 0001:00009A43  2649 0001:00009A79  2653 0001:00009A80  2654 0001:00009AA0
+  2655 0001:00009AAD  2656 0001:00009AF3  2657 0001:00009B29  2663 0001:00009B30
+  2664 0001:00009B39  2665 0001:00009B40  2666 0001:00009B5F  2668 0001:00009B72
+  2669 0001:00009B7E  2670 0001:00009B81  2671 0001:00009B83  2665 0001:00009B84
+  2672 0001:00009B8A  2679 0001:00009B94  2680 0001:00009BB5  2681 0001:00009BB9
+  2682 0001:00009BC0  2683 0001:00009BF1  2685 0001:00009C26  2686 0001:00009C32
+  2687 0001:00009C35  2688 0001:00009C39  2689 0001:00009C3B  2683 0001:00009C3C
+  2690 0001:00009C3F  2692 0001:00009C4E  2693 0001:00009C58  2695 0001:00009C88
+  2699 0001:00009C94  2700 0001:00009CB0  2701 0001:00009D26  2707 0001:00009D30
+  2708 0001:00009D54  2709 0001:00009D5B  2710 0001:00009D7B  2712 0001:00009DB0
+  2713 0001:00009DBC  2714 0001:00009DBF  2715 0001:00009DC1  2709 0001:00009DC2
+  2716 0001:00009DEC  2722 0001:00009DF4  2723 0001:00009E00  2724 0001:00009E14
+  2725 0001:00009E2A  2726 0001:00009E31  2727 0001:00009E48  2728 0001:00009E4F
+  2729 0001:00009E53  2731 0001:00009E5E  2732 0001:00009E65  2738 0001:00009E90
+  2739 0001:00009EBC  2740 0001:00009ED0  2741 0001:00009EE6  2742 0001:00009EED
+  2743 0001:00009F04  2744 0001:00009F0B  2745 0001:00009F0F  2746 0001:00009F36
+  2750 0001:00009F64  2751 0001:00009F90  2752 0001:00009FA0  2753 0001:00009FCB
+  2757 0001:00009FD4  2758 0001:0000A003  2759 0001:0000A013  2760 0001:0000A03C
+  2766 0001:0000A048  2767 0001:0000A080  2768 0001:0000A087  2769 0001:0000A0A6
+  2771 0001:0000A0BF  2772 0001:0000A0C2  2773 0001:0000A0C4  2768 0001:0000A0C5
+  2774 0001:0000A0F3  2778 0001:0000A0FC  2779 0001:0000A105  2780 0001:0000A10E
+  2782 0001:0000A122  2783 0001:0000A134  2790 0001:0000A138  2791 0001:0000A149
+  2792 0001:0000A15E  2793 0001:0000A173  2795 0001:0000A1EF  2792 0001:0000A206
+  2796 0001:0000A20D  2798 0001:0000A216  2802 0001:0000A24D  2804 0001:0000A282
+  2805 0001:0000A289  2806 0001:0000A2A2  2807 0001:0000A2A9  2810 0001:0000A2E4
+  2811 0001:0000A2E7  2813 0001:0000A2EF  2814 0001:0000A2F5  2816 0001:0000A2FA
+  2823 0001:0000A2FC  2824 0001:0000A30A  2825 0001:0000A31C  2826 0001:0000A32C
+  2828 0001:0000A339  2829 0001:0000A34B  2830 0001:0000A357  2832 0001:0000A36A
+  2833 0001:0000A392  2834 0001:0000A3C0  2830 0001:0000A3C1  2838 0001:0000A3C9
+  2839 0001:0000A3DB  2840 0001:0000A3E7  2843 0001:0000A3F6  2844 0001:0000A422
+  2845 0001:0000A459  2840 0001:0000A45A  2847 0001:0000A45D  2848 0001:0000A469
+  2849 0001:0000A47E  2850 0001:0000A485  2856 0001:0000A48C  2857 0001:0000A493
+  2859 0001:0000A49B  2860 0001:0000A4A8  2861 0001:0000A4BE  2862 0001:0000A4C6
+  2864 0001:0000A4CA  2868 0001:0000A4D5  2869 0001:0000A4DE  2870 0001:0000A4EE
+  2871 0001:0000A4F7  2872 0001:0000A500  2875 0001:0000A509  2878 0001:0000A550
+  2879 0001:0000A570  2881 0001:0000A580  2882 0001:0000A58E  2883 0001:0000A59D
+  2884 0001:0000A5A6  2886 0001:0000A5AF  2887 0001:0000A5B8  2890 0001:0000A5DE
+  2894 0001:0000A5E4  2895 0001:0000A5EA  2898 0001:0000A5EC  2899 0001:0000A5EF
+  2900 0001:0000A5FD  2901 0001:0000A604  2902 0001:0000A611  2903 0001:0000A618
+  2904 0001:0000A61D  2908 0001:0000A620  2909 0001:0000A623  2910 0001:0000A629
+  2911 0001:0000A62E  2915 0001:0000A630  2916 0001:0000A639  2917 0001:0000A64B
+  2921 0001:0000A650  2922 0001:0000A656  2923 0001:0000A669  2924 0001:0000A670
+  2935 0001:0000A674  2936 0001:0000A693  2937 0001:0000A697  2938 0001:0000A69C
+  2939 0001:0000A6A1  2940 0001:0000A6AF  2941 0001:0000A6BD  2942 0001:0000A6C9
+  2943 0001:0000A6D1  2944 0001:0000A6DD  2945 0001:0000A6EC  2946 0001:0000A6FB
+  2947 0001:0000A705  2948 0001:0000A70F  2950 0001:0000A734  2951 0001:0000A74F
+  2952 0001:0000A759  2948 0001:0000A75C  2953 0001:0000A75F  2954 0001:0000A771
+  2955 0001:0000A77E  2956 0001:0000A788  2958 0001:0000A7A4  2959 0001:0000A7B1
+  2961 0001:0000A7B5  2962 0001:0000A7D8  2964 0001:0000A7E4  2956 0001:0000A7E7
+  2966 0001:0000A7F7  2967 0001:0000A7FF  2968 0001:0000A807  2969 0001:0000A815
+  2971 0001:0000A846  2975 0001:0000A850  2976 0001:0000A856  2978 0001:0000A85E
+  2979 0001:0000A863  2982 0001:0000A86C  2983 0001:0000A873  2984 0001:0000A87C
+  2987 0001:0000A885  2993 0001:0000A888  2994 0001:0000A893  2995 0001:0000A8A8
+  2996 0001:0000A8AC  2997 0001:0000A8B3  2998 0001:0000A8D5  2999 0001:0000A8DF
+  3000 0001:0000A8EE  3001 0001:0000A906  3002 0001:0000A911  3006 0001:0000A918
+  3007 0001:0000A920  3008 0001:0000A927  3009 0001:0000A93E  3010 0001:0000A954
+  3011 0001:0000A95D  3012 0001:0000A96A  3013 0001:0000A97D  3014 0001:0000A984
+  3015 0001:0000A99A  3016 0001:0000A9A4  3017 0001:0000A9B0  3018 0001:0000A9BD
+  3022 0001:0000A9C8  3023 0001:0000A9CE  3024 0001:0000A9D5  3025 0001:0000A9E0
+  3026 0001:0000A9E8  3034 0001:0000A9EC  3035 0001:0000AA11  3040 0001:0000AA20
+  3043 0001:0000AA84  3044 0001:0000AA9D  3045 0001:0000AAC7  3046 0001:0000AACB
+  3047 0001:0000AADD  3048 0001:0000AAF2  3050 0001:0000AB05  3051 0001:0000AB17
+  3052 0001:0000AB2C  3053 0001:0000AB7B  3055 0001:0000ABC4  3056 0001:0000ABD9
+  3057 0001:0000AC27  3060 0001:0000AC9C  3066 0001:0000ACA4  3067 0001:0000ACCB
+  3069 0001:0000ACD8  3071 0001:0000ACE1  3072 0001:0000ACED  3073 0001:0000ACF2
+  3075 0001:0000AD1B  3076 0001:0000AD24  3078 0001:0000AD3A  3079 0001:0000ADCB
+  3080 0001:0000ADD7  3081 0001:0000ADF5  3083 0001:0000AE2B  3086 0001:0000AE40
+  3087 0001:0000AE47  3089 0001:0000AE50  3090 0001:0000AE67  3092 0001:0000AE7E
+  3098 0001:0000AEE8  3099 0001:0000AEEF  3100 0001:0000AF02  3101 0001:0000AF2B
+  3102 0001:0000AF3E  3103 0001:0000AF45  3114 0001:0000AF4C  3115 0001:0000AF58
+  3117 0001:0000AF74  3116 0001:0000AFC6  3118 0001:0000AFCB  3119 0001:0000B004
+  3121 0001:0000B035  3123 0001:0000B03C  3124 0001:0000B069  3125 0001:0000B073
+  3126 0001:0000B07D  3127 0001:0000B087  3128 0001:0000B090  3129 0001:0000B0A4
+  3130 0001:0000B0BF  3131 0001:0000B0D8  3133 0001:0000B10D  3134 0001:0000B114
+  3136 0001:0000B123  3137 0001:0000B130  3139 0001:0000B13A  3141 0001:0000B149
+  3142 0001:0000B172  3144 0001:0000B196  3146 0001:0000B1A2  3147 0001:0000B1AF
+  3148 0001:0000B1B4  3150 0001:0000B1E4  3151 0001:0000B1F0  3152 0001:0000B206
+  3153 0001:0000B21C  3154 0001:0000B21E  3156 0001:0000B24D  3157 0001:0000B24F
+  3158 0001:0000B251  3154 0001:0000B252  3159 0001:0000B255  3160 0001:0000B276
+  3161 0001:0000B2AC  3162 0001:0000B2F8  3163 0001:0000B30C  3164 0001:0000B316
+  3165 0001:0000B340  3171 0001:0000B354  3172 0001:0000B36D  3173 0001:0000B372
+  3174 0001:0000B385  3175 0001:0000B39D  3177 0001:0000B3A1  3176 0001:0000B3AB
+  3178 0001:0000B3FC  3186 0001:0000B404  3187 0001:0000B427  3188 0001:0000B431
+  3189 0001:0000B43E  3191 0001:0000B447  3192 0001:0000B46E  3193 0001:0000B47E
+  3194 0001:0000B489  3195 0001:0000B498  3197 0001:0000B4C1  3200 0001:0000B4D3
+  3202 0001:0000B4E0  3203 0001:0000B4E5  3204 0001:0000B4F9  3205 0001:0000B509
+  3206 0001:0000B519  3207 0001:0000B52B  3212 0001:0000B53B  3213 0001:0000B53D
+  3215 0001:0000B547  3216 0001:0000B57C  3217 0001:0000B58A  3219 0001:0000B5A8
+  3220 0001:0000B5C4  3225 0001:0000B5C8  3226 0001:0000B5EF  3228 0001:0000B5F8
+  3229 0001:0000B600  3232 0001:0000B602  3234 0001:0000B606  3235 0001:0000B616
+  3237 0001:0000B62E  3238 0001:0000B639  3241 0001:0000B642  3242 0001:0000B64A
+  3246 0001:0000B65C  3248 0001:0000B678  3249 0001:0000B69F  3252 0001:0000B6C4
+  3253 0001:0000B6F9  3254 0001:0000B707  3257 0001:0000B742  3258 0001:0000B769
+  3261 0001:0000B78E  3262 0001:0000B7C3  3263 0001:0000B7D1  3267 0001:0000B80A
+  3268 0001:0000B83A  3274 0001:0000B844  3275 0001:0000B867  3276 0001:0000B86A
+  3278 0001:0000B879  3280 0001:0000B882  3281 0001:0000B8A0  3284 0001:0000B8B1
+  3286 0001:0000B8DF  3288 0001:0000B916  3289 0001:0000B919  3291 0001:0000B91B
+  3284 0001:0000B91E  3292 0001:0000B923  3294 0001:0000B927  3295 0001:0000B954
+  3299 0001:0000B983  3307 0001:0000B98C  3308 0001:0000B9B1  3309 0001:0000B9B4
+  3311 0001:0000B9C4  3313 0001:0000B9CD  3314 0001:0000B9EC  3316 0001:0000B9F4
+  3319 0001:0000B9FF  3321 0001:0000BA28  3323 0001:0000BA60  3324 0001:0000BA62
+  3326 0001:0000BA64  3319 0001:0000BA65  3327 0001:0000BA6A  3329 0001:0000BAB4
+  3330 0001:0000BABF  3332 0001:0000BAC8  3333 0001:0000BAD5  3334 0001:0000BADB
+  3336 0001:0000BB05  3337 0001:0000BB0E  3339 0001:0000BB24  3340 0001:0000BBB5
+  3342 0001:0000BBC1  3344 0001:0000BBC5  3345 0001:0000BBF3  3346 0001:0000BC00
+  3347 0001:0000BC0D  3351 0001:0000BC17  3352 0001:0000BC23  3353 0001:0000BC29
+  3354 0001:0000BC37  3355 0001:0000BC80  3358 0001:0000BC94  3359 0001:0000BC9A
+  3361 0001:0000BCA2  3362 0001:0000BCA8  3364 0001:0000BCAC  3365 0001:0000BCB7
+  3366 0001:0000BCC0  3367 0001:0000BCC9  3369 0001:0000BCD5  3371 0001:0000BCDC
+  3374 0001:0000BCE0  3375 0001:0000BCE3  3377 0001:0000BCEB  3378 0001:0000BCF1
+  3380 0001:0000BCF6  3386 0001:0000BCF8  3387 0001:0000BD01  3388 0001:0000BD03
+  3389 0001:0000BD07  3390 0001:0000BD0E  3391 0001:0000BD23  3392 0001:0000BD2A
+  3393 0001:0000BD2E  3395 0001:0000BD37  3396 0001:0000BD39  3403 0001:0000BD40
+  3404 0001:0000BD4F  3405 0001:0000BD56  3406 0001:0000BD6B  3407 0001:0000BD72
+  3409 0001:0000BD82  3410 0001:0000BD88  3412 0001:0000BD8E  3413 0001:0000BD92
+  3414 0001:0000BD9E  3415 0001:0000BDB1  3416 0001:0000BDBB  3418 0001:0000BDCB
+  3424 0001:0000BDD4  3425 0001:0000BDDD  3426 0001:0000BDE4  3427 0001:0000BDF9
+  3428 0001:0000BE00  3429 0001:0000BE04  3431 0001:0000BE09  3432 0001:0000BE0B
+  3440 0001:0000BE10  3441 0001:0000BE1F  3442 0001:0000BE26  3443 0001:0000BE3B
+  3444 0001:0000BE42  3446 0001:0000BE4E  3447 0001:0000BE54  3448 0001:0000BE60
+  3449 0001:0000BE73  3450 0001:0000BE7D  3452 0001:0000BE8D  3456 0001:0000BE94
+  3457 0001:0000BE9A  3460 0001:0000BE9C  3461 0001:0000BEA5  3462 0001:0000BEAE
+  3463 0001:0000BEBB  3469 0001:0000BEC0  3470 0001:0000BEE0  3471 0001:0000BEE7
+  3473 0001:0000BEF0  3474 0001:0000BF14  3473 0001:0000BF41  3476 0001:0000BF61
+  3482 0001:0000BF68  3483 0001:0000BF89  3484 0001:0000BFA8  3483 0001:0000BFDB
+  3485 0001:0000BFFB  3488 0001:0000C004  3489 0001:0000C00A  3490 0001:0000C013
+  3491 0001:0000C031  3492 0001:0000C037  3495 0001:0000C03C  3496 0001:0000C045
+  3497 0001:0000C04E  3498 0001:0000C06C  3499 0001:0000C079  3502 0001:0000C080
+  3503 0001:0000C086  3504 0001:0000C092  3505 0001:0000C099  3508 0001:0000C09C
+  3509 0001:0000C0A6  3510 0001:0000C0AF  3511 0001:0000C0C5  3512 0001:0000C0CE
+  3513 0001:0000C0DB  3514 0001:0000C0E8  3515 0001:0000C0F5  3516 0001:0000C0FF
+  3518 0001:0000C10E  3519 0001:0000C11C  3521 0001:0000C127  3522 0001:0000C134
+  3525 0001:0000C13C  3526 0001:0000C145  3527 0001:0000C152  3530 0001:0000C158
+  3531 0001:0000C17F  3532 0001:0000C18E  3534 0001:0000C1BB  3535 0001:0000C1EE
+  3538 0001:0000C220  3539 0001:0000C229  3540 0001:0000C238  3542 0001:0000C24B
+  3543 0001:0000C254  3551 0001:0000C258  3552 0001:0000C261  3553 0001:0000C28C
+  3560 0001:0000C290  3561 0001:0000C2A5  3562 0001:0000C2AE  3563 0001:0000C2B7
+  3564 0001:0000C2C0  3565 0001:0000C2C9  3566 0001:0000C2D2  3567 0001:0000C2DB
+  3568 0001:0000C2E4  3569 0001:0000C302  3573 0001:0000C308  3574 0001:0000C311
+  3575 0001:0000C31A  3577 0001:0000C320  3578 0001:0000C330  3579 0001:0000C334
+  3580 0001:0000C33B  3582 0001:0000C343  3588 0001:0000C348  3589 0001:0000C356
+  3590 0001:0000C35B  3592 0001:0000C368  3593 0001:0000C382  3595 0001:0000C39A
+  3598 0001:0000C3DA  3599 0001:0000C3E6  3601 0001:0000C3E8  3592 0001:0000C3E9
+  3603 0001:0000C3EF  3609 0001:0000C3F8  3610 0001:0000C3FE  3611 0001:0000C407
+  3612 0001:0000C412  3613 0001:0000C41B  3614 0001:0000C426  3621 0001:0000C42C
+  3622 0001:0000C434  3623 0001:0000C43B  3625 0001:0000C444  3626 0001:0000C44F
+  3628 0001:0000C453  3629 0001:0000C45D  3630 0001:0000C466  3631 0001:0000C46F
+  3632 0001:0000C483  3633 0001:0000C48E  3634 0001:0000C497  3635 0001:0000C4AA
+  3638 0001:0000C4BE  3646 0001:0000C4C4  3647 0001:0000C4CB  3648 0001:0000C4D9
+  3650 0001:0000C4EC  3652 0001:0000C4F9  3653 0001:0000C509  3654 0001:0000C512
+  3655 0001:0000C51E  3656 0001:0000C52A  3657 0001:0000C531  3658 0001:0000C53A
+  3659 0001:0000C546  3660 0001:0000C556  3661 0001:0000C566  3662 0001:0000C56F
+  3663 0001:0000C57B  3664 0001:0000C587  3665 0001:0000C58E  3666 0001:0000C597
+  3667 0001:0000C5A3  3668 0001:0000C5B3  3669 0001:0000C5BA  3673 0001:0000C5C7
+  3675 0001:0000C5D0  3676 0001:0000C5E8  3677 0001:0000C600  3675 0001:0000C60F
+  3678 0001:0000C614  3679 0001:0000C61B  3681 0001:0000C626  3685 0001:0000C648
+  3686 0001:0000C64E  3687 0001:0000C66E  3695 0001:0000C6A8  3696 0001:0000C6AE
+  3697 0001:0000C6B5  3698 0001:0000C6C3  3701 0001:0000C6C8  3702 0001:0000C6D2
+  3703 0001:0000C6DB  3705 0001:0000C6EB  3709 0001:0000C728  3710 0001:0000C735
+  3713 0001:0000C73A  3716 0001:0000C740  3717 0001:0000C747  3718 0001:0000C74E
+  3720 0001:0000C75E  3722 0001:0000C776  3723 0001:0000C783  3724 0001:0000C790
+  3727 0001:0000C795  3733 0001:0000C79C  3734 0001:0000C7B3  3735 0001:0000C7BC
+  3736 0001:0000C7C8  3737 0001:0000C7D4  3738 0001:0000C7DF  3739 0001:0000C7E9
+  3740 0001:0000C7F0  3741 0001:0000C7FA  3742 0001:0000C810  3743 0001:0000C819
+  3744 0001:0000C826  3745 0001:0000C83C  3746 0001:0000C84C  3747 0001:0000C85C
+  3748 0001:0000C86C  3749 0001:0000C87C  3750 0001:0000C883  3751 0001:0000C894
+  3752 0001:0000C8A5  3753 0001:0000C8BB  3754 0001:0000C8C4  3755 0001:0000C8DA
+  3756 0001:0000C8EA  3757 0001:0000C8FA  3758 0001:0000C90A  3759 0001:0000C911
+  3760 0001:0000C934  3763 0001:0000C93C  3764 0001:0000C945  3765 0001:0000C952
+  3766 0001:0000C95D  3767 0001:0000C966  3771 0001:0000C96C  3772 0001:0000C972
+  3773 0001:0000C979  3774 0001:0000C980  3778 0001:0000C984  3779 0001:0000C98A
+  3780 0001:0000C991  3781 0001:0000C99A  3785 0001:0000C9A0  3786 0001:0000C9A6
+  3787 0001:0000C9AD  3788 0001:0000C9B4  3791 0001:0000C9B8  3792 0001:0000C9C1
+  3793 0001:0000C9CA  3795 0001:0000C9D3  3796 0001:0000C9DA  3797 0001:0000C9F9
+  3799 0001:0000CA11  3803 0001:0000CA18  3804 0001:0000CA22  3806 0001:0000CA25
+  3807 0001:0000CA2B  3816 0001:0000CA2C  3817 0001:0000CA37  3818 0001:0000CA40
+  3819 0001:0000CA4F  3821 0001:0000CA58  3822 0001:0000CA5D  3823 0001:0000CA64
+  3827 0001:0000CA6D  3828 0001:0000CA74  3829 0001:0000CA7B  3831 0001:0000CA82
+  3832 0001:0000CA9F  3833 0001:0000CAC3  3834 0001:0000CACD  3835 0001:0000CB01
+  3837 0001:0000CB0A  3838 0001:0000CB1D  3842 0001:0000CB64  3845 0001:0000CB9B
+  3846 0001:0000CBA2  3851 0001:0000CBAC  3852 0001:0000CBB2  3854 0001:0000CBB6
+  3855 0001:0000CBBD  3856 0001:0000CBCD  3858 0001:0000CBD4  3863 0001:0000CBDC
+  3864 0001:0000CBE2  3865 0001:0000CBF8  3866 0001:0000CC06  3872 0001:0000CC0C
+  3884 0001:0000CC12  3885 0001:0000CC19  3886 0001:0000CC2F  3889 0001:0000CC34
+  3890 0001:0000CC3A  3891 0001:0000CC48  3892 0001:0000CC5E  3896 0001:0000CC64
+  3897 0001:0000CC6A  3898 0001:0000CC73  3900 0001:0000CC7C  3901 0001:0000CC83
+  3903 0001:0000CCA2  3904 0001:0000CCA9  3908 0001:0000CCAC  3909 0001:0000CCB2
+  3910 0001:0000CCB9  3911 0001:0000CCC4  3915 0001:0000CCC8  3916 0001:0000CCCB
+  3917 0001:0000CCD4  3918 0001:0000CCDB  3919 0001:0000CCF3  3920 0001:0000CCF8
+  3927 0001:0000CCFC  3928 0001:0000CD1B  3929 0001:0000CD22  3930 0001:0000CD5B
+  3931 0001:0000CD88  3932 0001:0000CD96  3933 0001:0000CD99  3934 0001:0000CDA9
+  3935 0001:0000CDB9  3936 0001:0000CDDA  3937 0001:0000CDEA  3938 0001:0000CDF3
+  3939 0001:0000CE05  3941 0001:0000CE24  3942 0001:0000CE2B  3943 0001:0000CE39
+  3944 0001:0000CE49  3945 0001:0000CE63  3946 0001:0000CE72  3947 0001:0000CEA8
+  3948 0001:0000CEAF  3950 0001:0000CEB4  3951 0001:0000CEBB  3953 0001:0000CEC0
+  3954 0001:0000CEDA  3955 0001:0000CEE8  3956 0001:0000CEFB  3959 0001:0000CF33
+  3960 0001:0000CF42  3962 0001:0000CF5E  3963 0001:0000CF6C  3965 0001:0000CF84
+  3966 0001:0000CF8B  3967 0001:0000CF9A  3968 0001:0000D004  4001 0001:0000D00C
+  4002 0001:0000D027  4004 0001:0000D03C  4005 0001:0000D043  4006 0001:0000D05D
+  4007 0001:0000D081  4008 0001:0000D09D  4011 0001:0000D0A4  4012 0001:0000D0B3
+  4013 0001:0000D0E2  4015 0001:0000D0F0  4016 0001:0000D108  4017 0001:0000D117
+  4018 0001:0000D159  4022 0001:0000D160  4023 0001:0000D164  4024 0001:0000D17E
+  4031 0001:0000D184  4033 0001:0000D1A8  4034 0001:0000D1CD  4035 0001:0000D1D4
+  4036 0001:0000D1F2  4038 0001:0000D20E  4040 0001:0000D229  4042 0001:0000D23E
+  4044 0001:0000D24E  4046 0001:0000D25B  4047 0001:0000D285  4048 0001:0000D2A6
+  4049 0001:0000D2AE  4051 0001:0000D2B3  4052 0001:0000D2C9  4056 0001:0000D2DE
+  4058 0001:0000D2F3  4060 0001:0000D317  4061 0001:0000D32E  4062 0001:0000D335
+  4064 0001:0000D346  4065 0001:0000D36E  4067 0001:0000D38A  4070 0001:0000D391
+  4071 0001:0000D3BF  4073 0001:0000D3C9  4074 0001:0000D3D0  4075 0001:0000D3DE
+  4076 0001:0000D3EE  4077 0001:0000D40C  4078 0001:0000D41B  4080 0001:0000D43E
+  4081 0001:0000D44C  4082 0001:0000D45A  4083 0001:0000D46A  4085 0001:0000D471
+  4087 0001:0000D490  4088 0001:0000D4B6  4090 0001:0000D4CF  4092 0001:0000D4E7
+  4093 0001:0000D4F8  4096 0001:0000D509  4097 0001:0000D552  4101 0001:0000D55C
+  4103 0001:0000D560  4105 0001:0000D580  4106 0001:0000D583  4108 0001:0000D586
+  4109 0001:0000D5A0  4113 0001:0000D5A4  4114 0001:0000D5AD  4116 0001:0000D5B4
+  4117 0001:0000D5E2  4118 0001:0000D600  4119 0001:0000D607  4123 0001:0000D610
+  4124 0001:0000D614  4125 0001:0000D62E  4130 0001:0000D634  4131 0001:0000D64D
+  4132 0001:0000D6A2  4137 0001:0000D6AC  4138 0001:0000D6B6  4148 0001:0000D6B8
+  4149 0001:0000D6D9  4150 0001:0000D6F2  4151 0001:0000D6FA  4153 0001:0000D702
+  4154 0001:0000D71A  4155 0001:0000D729  4156 0001:0000D73D  4157 0001:0000D758
+  4159 0001:0000D78B  4161 0001:0000D7AC  4162 0001:0000D7B5  4163 0001:0000D7BE
+  4164 0001:0000D7C8  4165 0001:0000D7E1  4167 0001:0000D7F0  4168 0001:0000D7FB
+  4170 0001:0000D817  4171 0001:0000D824  4172 0001:0000D82F  4173 0001:0000D844
+  4176 0001:0000D860  4177 0001:0000D878  4178 0001:0000D885  4179 0001:0000D88F
+  4180 0001:0000D89A  4182 0001:0000D8CD  4184 0001:0000D8FD  4190 0001:0000D904
+  4191 0001:0000D90D  4192 0001:0000D929  4193 0001:0000D93D  4195 0001:0000D946
+  4196 0001:0000D96A  4197 0001:0000D973  4200 0001:0000D980  4201 0001:0000D994
+  4202 0001:0000D999  4203 0001:0000D9A2  4205 0001:0000D9AB  4206 0001:0000D9B0
+  4207 0001:0000D9CC  4211 0001:0000D9D4  4212 0001:0000D9EC  4213 0001:0000D9F3
+  4214 0001:0000D9FE  4215 0001:0000DA1A  4216 0001:0000DA21  4217 0001:0000DA72
+  4221 0001:0000DA78  4222 0001:0000DA94  4224 0001:0000DA9A  4227 0001:0000DAA6
+  4228 0001:0000DAC0  4229 0001:0000DACA  4230 0001:0000DAD9  4233 0001:0000DAFB
+  4236 0001:0000DB55  4239 0001:0000DB5C  4240 0001:0000DB63  4241 0001:0000DB76
+  4242 0001:0000DB81  4245 0001:0000DB88  4246 0001:0000DB8F  4247 0001:0000DB9C
+  4248 0001:0000DBA7  4251 0001:0000DBAC  4252 0001:0000DBB3  4253 0001:0000DBC6
+  4254 0001:0000DBD1  4260 0001:0000DBD8  4261 0001:0000DBDF  4263 0001:0000DBEB
+  4264 0001:0000DBF3  4266 0001:0000DBF7  4267 0001:0000DC06  4268 0001:0000DC15
+  4269 0001:0000DC1D  4270 0001:0000DC25  4271 0001:0000DC33  4272 0001:0000DC3A
+  4273 0001:0000DC51  4276 0001:0000DC63  4277 0001:0000DC77  4278 0001:0000DC87
+  4279 0001:0000DC93  4280 0001:0000DCA4  4281 0001:0000DCB4  4282 0001:0000DCC1
+  4283 0001:0000DCEA  4284 0001:0000DD00  4285 0001:0000DD10  4286 0001:0000DD17
+  4287 0001:0000DD24  4288 0001:0000DD2F  4290 0001:0000DD35  4291 0001:0000DD4B
+  4292 0001:0000DD54  4293 0001:0000DD60  4294 0001:0000DD6B  4297 0001:0000DD88
+  4299 0001:0000DD95  4301 0001:0000DDA6  4303 0001:0000DDAD  4309 0001:0000DDB8
+  4310 0001:0000DDBE  4312 0001:0000DDD7  4313 0001:0000DDDE  4314 0001:0000DE00
+  4316 0001:0000DE0B  4318 0001:0000DE22  4322 0001:0000DE28  4323 0001:0000DE2E
+  4325 0001:0000DE37  4326 0001:0000DE49  4328 0001:0000DE50  4335 0001:0000DE54
+  4336 0001:0000DE80  4337 0001:0000DEB1  4340 0001:0000DEB8  4341 0001:0000DEBE
+  4342 0001:0000DECC  4343 0001:0000DEDA  4346 0001:0000DEE0  4347 0001:0000DEE3
+  4348 0001:0000DEEE  4351 0001:0000DEF0  4352 0001:0000DEF3  4353 0001:0000DEFE
+  4356 0001:0000DF00  4357 0001:0000DF20  4358 0001:0000DF4B  4361 0001:0000DF50
+  4362 0001:0000DF7A  4363 0001:0000DFA9  4366 0001:0000DFB0  4367 0001:0000DFDF
+  4368 0001:0000E00F  4371 0001:0000E018  4372 0001:0000E01B  4373 0001:0000E026
+  4377 0001:0000E028  4378 0001:0000E034  4382 0001:0000E038  4383 0001:0000E041
+  4387 0001:0000E044  4388 0001:0000E050  4391 0001:0000E054  4392 0001:0000E060
+  4393 0001:0000E06F  4396 0001:0000E074  4397 0001:0000E077  4398 0001:0000E082
+  4401 0001:0000E084  4402 0001:0000E08A  4403 0001:0000E0A1  4406 0001:0000E0A8
+  4407 0001:0000E0B1  4408 0001:0000E0BE  4411 0001:0000E0C4  4412 0001:0000E0CA
+  4413 0001:0000E0E1  4416 0001:0000E0E8  4417 0001:0000E0EB  4418 0001:0000E0F9
+  4422 0001:0000E0FC  4423 0001:0000E108  4427 0001:0000E10C  4428 0001:0000E118
+  4432 0001:0000E11C  4433 0001:0000E128  4437 0001:0000E12C  4438 0001:0000E138
+  4441 0001:0000E13C  4442 0001:0000E145  4443 0001:0000E152  4446 0001:0000E158
+  4447 0001:0000E164  4448 0001:0000E173  4451 0001:0000E178  4452 0001:0000E17B
+  4453 0001:0000E189  4456 0001:0000E18C  4457 0001:0000E18F  4458 0001:0000E19D
+  4461 0001:0000E1A0  4462 0001:0000E1A9  4463 0001:0000E1B9  4467 0001:0000E1C0
+  4468 0001:0000E1CC  4472 0001:0000E1D0  4473 0001:0000E1DC  4477 0001:0000E1E0
+  4478 0001:0000E1EC  4481 0001:0000E1F0  4482 0001:0000E1F9  4483 0001:0000E20C
+  4486 0001:0000E210  4487 0001:0000E213  4488 0001:0000E21E  4491 0001:0000E220
+  4492 0001:0000E240  4493 0001:0000E26B  4496 0001:0000E270  4497 0001:0000E279
+  4498 0001:0000E286  4502 0001:0000E28C  4503 0001:0000E298  4506 0001:0000E29C
+  4507 0001:0000E2A5  4508 0001:0000E2B2  4511 0001:0000E2B8  4512 0001:0000E2BB
+  4513 0001:0000E2C6  4517 0001:0000E2C8  4518 0001:0000E2D4  4521 0001:0000E2D8
+  4522 0001:0000E2E1  4523 0001:0000E2F0  4524 0001:0000E2FD  4525 0001:0000E30A
+  4528 0001:0000E310  4529 0001:0000E313  4530 0001:0000E31E  4533 0001:0000E320
+  4534 0001:0000E323  4535 0001:0000E32E  4539 0001:0000E330  4540 0001:0000E33C
+  4544 0001:0000E340  4545 0001:0000E34C  4548 0001:0000E350  4549 0001:0000E353
+  4550 0001:0000E35E  4553 0001:0000E360  4554 0001:0000E363  4555 0001:0000E36E
+  4558 0001:0000E370  4559 0001:0000E373  4560 0001:0000E37E  4563 0001:0000E380
+  4564 0001:0000E3AC  4565 0001:0000E3D9  4568 0001:0000E3E0  4569 0001:0000E3E6
+  4570 0001:0000E3F4  4573 0001:0000E3F8  4574 0001:0000E3FE  4575 0001:0000E40C
+  4578 0001:0000E410  4579 0001:0000E413  4580 0001:0000E41E  4583 0001:0000E420
+  4584 0001:0000E423  4585 0001:0000E42E  4588 0001:0000E430  4589 0001:0000E433
+  4590 0001:0000E43E  4593 0001:0000E440  4594 0001:0000E443  4595 0001:0000E44E
+  4598 0001:0000E450  4599 0001:0000E453  4600 0001:0000E45E  4603 0001:0000E460
+  4604 0001:0000E466  4605 0001:0000E471  4609 0001:0000E474  4610 0001:0000E480
+  4613 0001:0000E484  4614 0001:0000E487  4615 0001:0000E492  4619 0001:0000E494
+  4620 0001:0000E4A0  4624 0001:0000E4A4  4625 0001:0000E4B0  4628 0001:0000E4B4
+  4629 0001:0000E4D3  4631 0001:0000E4E8  4632 0001:0000E4EF  4633 0001:0000E4FC
+  4634 0001:0000E501  4635 0001:0000E511  4636 0001:0000E51F  4638 0001:0000E527
+  4639 0001:0000E531  4640 0001:0000E53B  4641 0001:0000E552  4642 0001:0000E571
+  4643 0001:0000E581  4644 0001:0000E59B  4645 0001:0000E5A5  4646 0001:0000E5B5
+  4647 0001:0000E5C8  4648 0001:0000E5DF  4649 0001:0000E5E8  4653 0001:0000E600
+  4654 0001:0000E611  4655 0001:0000E62B  4656 0001:0000E63B  4657 0001:0000E649
+  4660 0001:0000E661  4662 0001:0000E679  4664 0001:0000E69E  4667 0001:0000E6A8
+  4668 0001:0000E6B1  4669 0001:0000E6BE  4670 0001:0000E6C8  4671 0001:0000E6CD
+  4672 0001:0000E6D1  4673 0001:0000E6DA  4677 0001:0000E6E0  4678 0001:0000E6EC
+  4681 0001:0000E6F0  4682 0001:0000E6F3  4683 0001:0000E6FE  4689 0001:0000E700
+  4690 0001:0000E70D  4692 0001:0000E717  4693 0001:0000E71E  4694 0001:0000E722
+  4696 0001:0000E729  4697 0001:0000E73E  4699 0001:0000E744  4700 0001:0000E751
+  4702 0001:0000E75A  4703 0001:0000E761  4706 0001:0000E768  4707 0001:0000E771
+  4708 0001:0000E77E  4711 0001:0000E784  4712 0001:0000E787  4713 0001:0000E792
+  4716 0001:0000E794  4717 0001:0000E797  4719 0001:0000E79F  4720 0001:0000E7A7
+  4721 0001:0000E7B6  4723 0001:0000E7C3  4726 0001:0000E7C8  4727 0001:0000E7CB
+  4729 0001:0000E7D3  4730 0001:0000E7D9  4731 0001:0000E7DD  4733 0001:0000E7E4
+  4736 0001:0000E7E8  4737 0001:0000E7FE  4738 0001:0000E810  4739 0001:0000E848
+  4742 0001:0000E850  4743 0001:0000E856  4745 0001:0000E85E  4746 0001:0000E864
+  4748 0001:0000E868  4749 0001:0000E871  4752 0001:0000E880  4753 0001:0000E88D
+  4755 0001:0000E894  4759 0001:0000E898  4760 0001:0000E8AF  4763 0001:0000E8B0
+  4764 0001:0000E8B3  4765 0001:0000E8CB  4768 0001:0000E8D0  4769 0001:0000E8D3
+  4770 0001:0000E8D8  4773 0001:0000E8DC  4774 0001:0000E8E6  4776 0001:0000E8F1
+  4777 0001:0000E8FA  4778 0001:0000E904  4780 0001:0000E921  4786 0001:0000E928
+  4787 0001:0000E94B  4789 0001:0000E95E  4790 0001:0000E965  4791 0001:0000E96A
+  4793 0001:0000E98A  4795 0001:0000E99B  4796 0001:0000E9A6  4797 0001:0000E9AB
+  4798 0001:0000E9B7  4800 0001:0000E9D1  4791 0001:0000E9D2  4801 0001:0000E9D7
+  4802 0001:0000E9E1  4805 0001:0000E9F9  4806 0001:0000EA22  4809 0001:0000EA38
+  4810 0001:0000EA4E  4812 0001:0000EA5D  4813 0001:0000EA64  4814 0001:0000EA7F
+  4815 0001:0000EA8F  4817 0001:0000EAB3  4820 0001:0000EAB8  4821 0001:0000EABE
+  4822 0001:0000EAC5  4823 0001:0000EAD8  4824 0001:0000EAE6  4828 0001:0000EAEC
+  4829 0001:0000EAF2  4832 0001:0000EAF4  4833 0001:0000EAF7  4834 0001:0000EB02
+  4837 0001:0000EB04  4838 0001:0000EB0D  4839 0001:0000EB1A  4842 0001:0000EB20
+  4843 0001:0000EB40  4844 0001:0000EB4E  4845 0001:0000EB73  4849 0001:0000EB78
+  4850 0001:0000EB84  4854 0001:0000EB88  4855 0001:0000EB94  4859 0001:0000EB98
+  4860 0001:0000EBA4  4864 0001:0000EBA8  4865 0001:0000EBB4  4871 0001:0000EBB8
+  4872 0001:0000EBC7  4873 0001:0000EC2A  4882 0001:0000EC30  4883 0001:0000EC43
+  4885 0001:0000EC67  4886 0001:0000EC71  4887 0001:0000EC76  4883 0001:0000EC77
+  4888 0001:0000EC7A  4889 0001:0000EC85  4890 0001:0000EC9F  4897 0001:0000ECA8
+  4898 0001:0000ECB7  4899 0001:0000ECC1  4900 0001:0000ECCB  4901 0001:0000ECDB
+  4903 0001:0000ED00  4904 0001:0000ED0D  4906 0001:0000ED61  4909 0001:0000ED70
+  4910 0001:0000ED81  4911 0001:0000ED8B  4901 0001:0000ED8E  4912 0001:0000ED97
+  4916 0001:0000EDA0  4917 0001:0000EDA6  4918 0001:0000EDAD  4919 0001:0000EDB3
+  4920 0001:0000EDC5  4921 0001:0000EDCE  4928 0001:0000EDD4  4929 0001:0000EDE5
+  4930 0001:0000EDF0  4931 0001:0000EDFB  4933 0001:0000EE20  4934 0001:0000EE2D
+  4936 0001:0000EE44  4937 0001:0000EE52  4939 0001:0000EE5F  4940 0001:0000EE81
+  4942 0001:0000EECF  4944 0001:0000EF4B  4945 0001:0000EF5C  4946 0001:0000EF69
+  4931 0001:0000EF6C  4947 0001:0000EF75  4953 0001:0000EF7C  4954 0001:0000EF83
+  4955 0001:0000EF8A  4956 0001:0000EF90  4957 0001:0000EF95  4958 0001:0000EFA1
+  4964 0001:0000EFA8  4965 0001:0000EFBD  4966 0001:0000EFC6  4967 0001:0000EFD2
+  4968 0001:0000EFDC  4969 0001:0000EFFD  4973 0001:0000F008  4974 0001:0000F00E
+  4975 0001:0000F015  4976 0001:0000F01C  4980 0001:0000F020  4981 0001:0000F026
+  4982 0001:0000F02D  4983 0001:0000F034  4991 0001:0000F038  4992 0001:0000F042
+  4994 0001:0000F04C  4995 0001:0000F055  4996 0001:0000F062  4997 0001:0000F06C
+  4998 0001:0000F070  4999 0001:0000F07D  5000 0001:0000F089  5001 0001:0000F096
+  5003 0001:0000F09E  5005 0001:0000F0D0  5011 0001:0000F0D8  5012 0001:0000F0F4
+  5013 0001:0000F0FE  5014 0001:0000F10C  5015 0001:0000F12A  5016 0001:0000F16F
+  5023 0001:0000F178  5024 0001:0000F182  5026 0001:0000F188  5028 0001:0000F193
+  5029 0001:0000F19E  5030 0001:0000F1A8  5032 0001:0000F1BC  5033 0001:0000F1C6
+  5034 0001:0000F1D0  5035 0001:0000F1E0  5036 0001:0000F1F0  5037 0001:0000F1F4
+  5038 0001:0000F201  5040 0001:0000F20D  5045 0001:0000F214  5046 0001:0000F21F
+  5050 0001:0000F220  5051 0001:0000F229  5053 0001:0000F234  5054 0001:0000F238
+  5055 0001:0000F247  5056 0001:0000F252  5058 0001:0000F259  5062 0001:0000F264
+  5063 0001:0000F267  5064 0001:0000F26D  5065 0001:0000F272  5069 0001:0000F274
+  5070 0001:0000F277  5071 0001:0000F27D  5072 0001:0000F282  5076 0001:0000F284
+  5077 0001:0000F287  5079 0001:0000F28F  5080 0001:0000F295  5082 0001:0000F29A
+  5111 0001:0000F29C  5112 0001:0000F2B1  5113 0001:0000F2BA  5114 0001:0000F2C1
+  5115 0001:0000F2C8  5116 0001:0000F2E6  5123 0001:0000F2EC  5124 0001:0000F2F5
+  5125 0001:0000F2FE  5128 0001:0000F331  5131 0001:0000F338  5132 0001:0000F33B
+  5134 0001:0000F343  5135 0001:0000F349  5137 0001:0000F34E  5140 0001:0000F350
+  5141 0001:0000F353  5143 0001:0000F35B  5144 0001:0000F361  5146 0001:0000F366
+  5149 0001:0000F368  5150 0001:0000F36B  5152 0001:0000F373  5153 0001:0000F379
+  5155 0001:0000F37E  5164 0001:0000F380  5165 0001:0000F38B  5166 0001:0000F392
+  5167 0001:0000F39E  5168 0001:0000F3A4  5170 0001:0000F3B4  5172 0001:0000F3C7
+  5173 0001:0000F3DF  5174 0001:0000F3F5  5175 0001:0000F406  5177 0001:0000F429
+  5182 0001:0000F430  5183 0001:0000F43A  5186 0001:0000F43C  5187 0001:0000F443
+  5188 0001:0000F449  5189 0001:0000F45C  5191 0001:0000F465  5194 0001:0000F46C
+  5195 0001:0000F472  5196 0001:0000F484  5199 0001:0000F488  5200 0001:0000F48E
+  5201 0001:0000F4A0  5204 0001:0000F4A4  5205 0001:0000F4AD  5206 0001:0000F4B7
+  5213 0001:0000F4BC  5214 0001:0000F4C5  5215 0001:0000F4CE  5218 0001:0000F4D0
+  5219 0001:0000F4D7  5220 0001:0000F4DD  5221 0001:0000F4E5  5223 0001:0000F4EA
+  5224 0001:0000F4F9  5227 0001:0000F500  5228 0001:0000F50E  5230 0001:0000F517
+  5231 0001:0000F52B  5232 0001:0000F533  5234 0001:0000F53D  5237 0001:0000F544
+  5238 0001:0000F560  5240 0001:0000F56C  5241 0001:0000F576  5242 0001:0000F57F
+  5243 0001:0000F592  5245 0001:0000F5B0  5246 0001:0000F5E6  5249 0001:0000F5F0
+  5250 0001:0000F5F3  5251 0001:0000F5FA  5254 0001:0000F5FC  5255 0001:0000F618
+  5256 0001:0000F621  5257 0001:0000F635  5258 0001:0000F639  5260 0001:0000F640
+  5261 0001:0000F653  5263 0001:0000F683  5266 0001:0000F68C  5267 0001:0000F6B3
+  5268 0001:0000F6BF  5271 0001:0000F6EC  5273 0001:0000F71C  5276 0001:0000F750
+  5277 0001:0000F759  5278 0001:0000F765  5280 0001:0000F775  5281 0001:0000F77E
+  5287 0001:0000F784  5288 0001:0000F7BF  5289 0001:0000F7C4  5291 0001:0000F7DB
+  5293 0001:0000F868  5294 0001:0000F86A  5296 0001:0000F8A6  5289 0001:0000F8A7
+  5297 0001:0000F8AE  5298 0001:0000F8B3  5299 0001:0000F8C3  5300 0001:0000F8CF
+  5302 0001:0000F8EB  5303 0001:0000F977  5308 0001:0000F9B0  5309 0001:0000F9CB
+  5310 0001:0000F9D5  5312 0001:0000F9DE  5313 0001:0000F9E8  5314 0001:0000F9F9
+  5315 0001:0000FA0D  5317 0001:0000FA2D  5318 0001:0000FA5A  5327 0001:0000FA60
+  5328 0001:0000FA6C  5329 0001:0000FA70  5333 0001:0000FA7A  5336 0001:0000FA88
+  5338 0001:0000FA8B  5339 0001:0000FA99  5341 0001:0000FAAA  5342 0001:0000FABF
+  5344 0001:0000FAC5  5345 0001:0000FACC  5351 0001:0000FAD6  5352 0001:0000FAE5
+  5355 0001:0000FAEC  5356 0001:0000FB01  5357 0001:0000FB0A  5358 0001:0000FB28
+  5361 0001:0000FB2C  5362 0001:0000FB33  5363 0001:0000FB47  5364 0001:0000FB51
+  5365 0001:0000FB63  5369 0001:0000FB68  5370 0001:0000FB8B  5371 0001:0000FBC1
+  5379 0001:0000FBC8  5380 0001:0000FBF7  5381 0001:0000FBFB  5383 0001:0000FC10
+  5384 0001:0000FC12  5385 0001:0000FC17  5387 0001:0000FC36  5388 0001:0000FC51
+  5390 0001:0000FC72  5391 0001:0000FC75  5393 0001:0000FC77  5385 0001:0000FC7A
+  5394 0001:0000FCA5  5400 0001:0000FCB0  5401 0001:0000FCD7  5402 0001:0000FCDF
+  5404 0001:0000FD01  5406 0001:0000FD1C  5408 0001:0000FD28  5409 0001:0000FD30
+  5410 0001:0000FD4C  5413 0001:0000FD7B  5402 0001:0000FD7C  5414 0001:0000FDA1
+  5417 0001:0000FDAC  5418 0001:0000FDAF  5419 0001:0000FDB7  5430 0001:0000FDBC
+  5431 0001:0000FDE5  5432 0001:0000FDF3  5433 0001:0000FE01  5434 0001:0000FE0C
+  5435 0001:0000FE17  5436 0001:0000FE1F  5437 0001:0000FE2A  5439 0001:0000FE35
+  5440 0001:0000FE53  5441 0001:0000FE6B  5442 0001:0000FE88  5443 0001:0000FE9B
+  5444 0001:0000FE9F  5445 0001:0000FEA6  5446 0001:0000FEC3  5447 0001:0000FECD
+  5448 0001:0000FED8  5450 0001:0000FEF0  5452 0001:0000FF28  5455 0001:0000FF30
+  5456 0001:0000FF36  5457 0001:0000FF45  5460 0001:0000FF48  5461 0001:0000FF4E
+  5462 0001:0000FF5D  5468 0001:0000FF60  5469 0001:0000FF7E  5471 0001:0000FF90
+  5472 0001:0000FFB3  5473 0001:0000FFCE  5471 0001:0000FFF5  5475 0001:00010015
+  5478 0001:0001001C  5479 0001:0001001F  5481 0001:00010027  5482 0001:0001002D
+  5484 0001:00010032  5487 0001:00010034  5488 0001:0001003D  5489 0001:00010043
+  5490 0001:0001006B  5493 0001:00010070  5494 0001:00010073  5496 0001:0001007B
+  5497 0001:00010081  5499 0001:00010086  5502 0001:00010088  5503 0001:00010091
+  5504 0001:00010097  5505 0001:000100BF  5509 0001:000100C4  5510 0001:000100D0
+  5511 0001:000100E4  5515 0001:000100EC  5516 0001:00010110  5518 0001:00010114
+  5519 0001:00010129  5520 0001:00010140  5523 0001:0001017C  5524 0001:000101A6
+  5527 0001:000101B0  5528 0001:000101D7  5529 0001:000101E6  5532 0001:00010213
+  5534 0001:00010246  5537 0001:00010278  5538 0001:00010281  5539 0001:00010290
+  5541 0001:000102A3  5542 0001:000102AC  5545 0001:000102B0  5546 0001:000102B3
+  5547 0001:000102B9  5548 0001:000102BE  5553 0001:000102C0  5554 0001:000102D7
+  5555 0001:000102E0  5556 0001:000102E7  5557 0001:000102EE  5558 0001:000102F5
+  5559 0001:000102FC  5560 0001:00010303  5561 0001:0001030A  5562 0001:0001031B
+  5563 0001:0001033E  5566 0001:00010344  5567 0001:00010352  5568 0001:0001035A
+  5569 0001:00010371  5572 0001:00010378  5573 0001:00010381  5574 0001:00010390
+  5575 0001:00010395  5577 0001:00010399  5578 0001:000103A1  5580 0001:000103AB
+  5581 0001:000103B4  5585 0001:000103B8  5586 0001:000103C1  5587 0001:000103C6
+  5589 0001:000103D1  5590 0001:000103D8  5591 0001:000103E4  5593 0001:000103F4
+  5594 0001:00010413  5600 0001:00010473  5601 0001:00010488  5602 0001:000104BF
+  5609 0001:000104D8  5610 0001:000104FF  5612 0001:00010505  5613 0001:0001050C
+  5614 0001:00010513  5615 0001:0001051A  5616 0001:00010521  5617 0001:00010528
+  5621 0001:00010534  5622 0001:00010536  5624 0001:00010541  5625 0001:00010550
+  5626 0001:00010568  5627 0001:00010590  5628 0001:000105B6  5629 0001:000105BB
+  5630 0001:000105C0  5631 0001:000105C5  5632 0001:000105CA  5633 0001:000105CF
+  5635 0001:000105D2  5636 0001:000105DC  5637 0001:000105F9  5639 0001:00010625
+  5642 0001:00010638  5643 0001:0001063F  5644 0001:00010653  5645 0001:00010665
+  5648 0001:0001066C  5649 0001:00010678  5650 0001:00010683  5651 0001:00010696
+  5654 0001:0001069C  5655 0001:0001069F  5657 0001:000106A4  5658 0001:000106A7
+  5660 0001:000106AE  5663 0001:000106B0  5664 0001:000106B3  5666 0001:000106B8
+  5667 0001:000106BB  5669 0001:000106C2  5672 0001:000106C4  5673 0001:000106C7
+  5675 0001:000106CC  5676 0001:000106CF  5678 0001:000106D6  5681 0001:000106D8
+  5682 0001:000106DB  5684 0001:000106E0  5685 0001:000106E3  5687 0001:000106EA
+  5690 0001:000106EC  5691 0001:000106EF  5693 0001:000106F4  5694 0001:000106F7
+  5696 0001:000106FE  5699 0001:00010700  5700 0001:00010703  5702 0001:00010708
+  5703 0001:0001070B  5705 0001:00010712  5710 0001:00010714  5711 0001:00010729
+  5712 0001:00010732  5713 0001:00010746  5714 0001:0001074D  5715 0001:0001076B
+  5718 0001:00010770  5719 0001:00010785  5720 0001:0001078E  5721 0001:00010797
+  5722 0001:000107B5  5725 0001:000107BC  5726 0001:000107C2  5727 0001:000107CD
+  5728 0001:000107D4  5729 0001:000107E6  5732 0001:000107EC  5733 0001:000107FA
+  5734 0001:0001080E  5735 0001:00010819  5736 0001:00010830  5740 0001:00010834
+  5741 0001:0001083D  5742 0001:0001084A  5746 0001:00010850  5747 0001:00010859
+  5750 0001:0001085C  5751 0001:0001085F  5752 0001:0001086A  5755 0001:0001086C
+  5756 0001:0001086F  5757 0001:0001087A  5760 0001:0001087C  5761 0001:0001087F
+  5763 0001:00010888  5765 0001:0001089B  5766 0001:000108B6  5767 0001:000108BF
+  5772 0001:000108C8  5773 0001:000108DB  5774 0001:000108E4  5775 0001:000108FF
+  5778 0001:00010906  5781 0001:00010908  5782 0001:0001090E  5783 0001:00010915
+  5784 0001:00010921  5787 0001:00010924  5788 0001:0001092A  5789 0001:00010931
+  5790 0001:00010938  5793 0001:0001093C  5794 0001:00010942  5795 0001:00010949
+  5796 0001:00010950  5799 0001:00010954  5800 0001:0001095A  5801 0001:0001096A
+  5805 0001:00010970  5807 0001:00010973  5808 0001:00010982  5810 0001:00010991
+  5821 0001:00010994  5822 0001:000109D7  5823 0001:000109DE  5824 0001:000109E4
+  5825 0001:000109EB  5827 0001:000109F5  5829 0001:00010A02  5831 0001:00010A0B
+  5832 0001:00010A1C  5833 0001:00010A2A  5834 0001:00010A40  5836 0001:00010A49
+  5837 0001:00010A50  5839 0001:00010A5A  5841 0001:00010A6C  5842 0001:00010A81
+  5843 0001:00010A89  5844 0001:00010A91  5849 0001:00010A99  5850 0001:00010AAE
+  5851 0001:00010AB6  5852 0001:00010ABE  5855 0001:00010AC4  5856 0001:00010AD7
+  5858 0001:00010ADE  5860 0001:00010AE8  5861 0001:00010AEC  5863 0001:00010AFE
+  5865 0001:00010B0A  5866 0001:00010B16  5868 0001:00010B1F  5872 0001:00010B28
+  5873 0001:00010B40  5874 0001:00010B49  5877 0001:00010B52  5878 0001:00010B67
+  5879 0001:00010B6D  5880 0001:00010B73  5888 0001:00010B79  5890 0001:00010B85
+  5891 0001:00010B91  5893 0001:00010B97  5897 0001:00010B9D  5898 0001:00010BB2
+  5899 0001:00010BB8  5902 0001:00010BBE  5903 0001:00010BCA  5905 0001:00010BD0
+  5910 0001:00010BD4  5914 0001:00010BE3  5915 0001:00010BF4  5916 0001:00010C04
+  5918 0001:00010C0A  5919 0001:00010C14  5921 0001:00010C21  5922 0001:00010C2D
+  5924 0001:00010C35  5926 0001:00010C4B  5927 0001:00010C58  5929 0001:00010C60
+  5931 0001:00010C70  5933 0001:00010C78  5934 0001:00010C84  5936 0001:00010CAC
+  5937 0001:00010CB5  5938 0001:00010CBC  5939 0001:00010CCF  5940 0001:00010CDA
+  5941 0001:00010CE7  5943 0001:00010D2D  5944 0001:00010D50  5945 0001:00010D67
+  5949 0001:00010D77  5951 0001:00010D8F  5952 0001:00010D91  5953 0001:00010DA7
+  5954 0001:00010DB6  5956 0001:00010DBB  5959 0001:00010DC5  5960 0001:00010E1F
+  5954 0001:00010E2C  5962 0001:00010E31  5963 0001:00010E40  5964 0001:00010E57
+  5965 0001:00010E65  5966 0001:00010E71  5967 0001:00010EA3  5968 0001:00010EB9
+  5972 0001:00010EDF  5976 0001:00010F19  5986 0001:00010F3C  5987 0001:00010F6C
+  5989 0001:00010F79  5990 0001:00010F9A  5991 0001:00010FA8  5992 0001:00010FBC
+  5993 0001:00010FCA  5995 0001:00010FD6  5996 0001:00010FE7  5997 0001:00010FF4
+  5998 0001:00011001  5999 0001:0001100C  6001 0001:00011019  6002 0001:00011026
+  6004 0001:00011034  6006 0001:00011049  6010 0001:0001108C  6011 0001:00011098
+  6012 0001:000110A6  6014 0001:000110B2  6015 0001:000110BF  6016 0001:000110CF
+  6017 0001:0001110D  6019 0001:0001111A  6020 0001:0001112A  6022 0001:00011175
+  6025 0001:0001118B  6026 0001:0001119C  6029 0001:000111A9  6031 0001:000111B2
+  6032 0001:000111BF  6034 0001:000111CB  6036 0001:000111E1  6039 0001:000111EB
+  6040 0001:000111FB  6041 0001:0001120B  6042 0001:00011216  6045 0001:00011223
+  6046 0001:0001122F  6048 0001:0001124F  6049 0001:00011254  6050 0001:00011260
+  6052 0001:00011268  6054 0001:000112A1  6057 0001:000112C0  6060 0001:000112E5
+  6061 0001:000112EB  6064 0001:0001131D  6067 0001:00011324  6068 0001:00011327
+  6070 0001:0001132F  6071 0001:00011335  6073 0001:00011343  6076 0001:00011348
+  6077 0001:0001134B  6078 0001:0001135C  6081 0001:00011360  6082 0001:00011366
+  6083 0001:0001136D  6084 0001:0001137C  6085 0001:00011383  6093 0001:00011388
+  6094 0001:00011393  6096 0001:00011398  6098 0001:000113AF  6099 0001:000113BC
+  6101 0001:000113CF  6102 0001:000113D4  6104 0001:000113EF  6106 0001:00011408
+  6107 0001:00011415  6109 0001:0001141A  6111 0001:0001143A  6112 0001:00011440
+  6114 0001:0001144F  6118 0001:0001145A  6102 0001:0001145B  6119 0001:0001145E
+  6120 0001:0001146A  6123 0001:00011476  6124 0001:0001147D  6125 0001:00011484
+  6128 0001:0001148C  6129 0001:00011492  6131 0001:0001149A  6132 0001:000114A0
+  6133 0001:000114A7  6135 0001:000114AE  6138 0001:000114B4  6139 0001:000114BA
+  6141 0001:000114C2  6142 0001:000114C8  6143 0001:000114CF  6145 0001:000114D6
+  6156 0001:000114DC  6157 0001:000114E7  6159 0001:00011515  6160 0001:0001151F
+  6161 0001:00011529  6162 0001:00011537  6163 0001:0001154F  6164 0001:0001155D
+  6166 0001:00011588  6169 0001:000115AA  6171 0001:000115BD  6178 0001:00011607
+  6179 0001:00011611  6181 0001:0001161D  6182 0001:00011628  6185 0001:00011646
+  6186 0001:00011662  6187 0001:00011681  6190 0001:000116A0  6193 0001:000116B0
+  6194 0001:000116B9  6195 0001:000116C2  6198 0001:000116C8  6199 0001:000116E1
+  6201 0001:000116F7  6202 0001:00011700  6203 0001:00011707  6205 0001:0001172B
+  6208 0001:00011730  6209 0001:00011733  6210 0001:00011739  6211 0001:0001173E
+  6214 0001:00011740  6215 0001:00011746  6216 0001:0001174C  6217 0001:0001175C
+  6218 0001:00011765  6219 0001:0001176C  6226 0001:00011770  6227 0001:00011778
+  6229 0001:00011788  6231 0001:000117A2  6233 0001:000117BB  6234 0001:000117C5
+  6235 0001:000117D7  6237 0001:000117E3  6229 0001:000117E4  6239 0001:000117E7
+  6242 0001:000117EC  6243 0001:000117F2  6244 0001:000117F9  6245 0001:00011800
+  6248 0001:00011804  6249 0001:00011807  6250 0001:0001180D  6251 0001:00011812
+  6254 0001:00011814  6255 0001:0001181D  6257 0001:00011827  6258 0001:0001182B
+  6259 0001:00011832  6260 0001:0001183A  6262 0001:0001183E  6263 0001:00011845
+  6266 0001:0001184C  6275 0001:00011850  6276 0001:0001185E  6277 0001:00011864
+  6278 0001:0001187C  6280 0001:0001188E  6282 0001:000118A9  6283 0001:000118AF
+  6285 0001:000118B3  6286 0001:000118C8  6287 0001:000118CC  6288 0001:000118E2
+  6280 0001:000118E3  6290 0001:000118E6  6292 0001:000118EC  6293 0001:000118F3
+  6294 0001:00011900  6295 0001:00011909  6299 0001:0001190C  6300 0001:00011918
+  6301 0001:00011923  6302 0001:00011930  6303 0001:00011938  6306 0001:00011940
+  6307 0001:00011943  6308 0001:00011949  6309 0001:0001194E  6312 0001:00011950
+  6318 0001:00011959  6319 0001:00011967  6321 0001:00011970  6322 0001:00011975
+  6332 0001:0001197C  6337 0001:00011980  6338 0001:0001198A  6339 0001:00011993
+  6340 0001:00011998  6342 0001:000119A9  6343 0001:000119AE  6345 0001:000119B7
+  6346 0001:000119D9  6347 0001:000119E9  6348 0001:00011A0B  6349 0001:00011A1B
+  6352 0001:00011A40  6359 0001:00011A48  6360 0001:00011A55  6361 0001:00011A57
+  6362 0001:00011A5C  6363 0001:00011A61  6365 0001:00011A67  6367 0001:00011A7C
+  6368 0001:00011A8C  6369 0001:00011A8E  6371 0001:00011A94  6373 0001:00011AA9
+  6374 0001:00011AB9  6375 0001:00011ABB  6378 0001:00011AC1  6379 0001:00011ACA
+  6380 0001:00011ACE  6381 0001:00011AF3  6388 0001:00011AFC  6389 0001:00011B09
+  6390 0001:00011B0B  6391 0001:00011B10  6394 0001:00011B15  6396 0001:00011B27
+  6397 0001:00011B37  6398 0001:00011B39  6399 0001:00011B3F  6401 0001:00011B45
+  6403 0001:00011B57  6404 0001:00011B67  6405 0001:00011B69  6406 0001:00011B6F
+  6409 0001:00011B75  6410 0001:00011B7E  6411 0001:00011B82  6412 0001:00011BA7
+  6417 0001:00011BB0  6418 0001:00011BBE  6419 0001:00011BC8  6420 0001:00011BCD
+  6421 0001:00011BE4  6428 0001:00011BE8  6429 0001:00011BF1  6430 0001:00011BF9
+  6432 0001:00011C09  6433 0001:00011C15  6434 0001:00011C2A  6435 0001:00011C3B
+  6436 0001:00011C49  6437 0001:00011C5A  6438 0001:00011C65  6439 0001:00011C72
+  6441 0001:00011C90  6444 0001:00011CAA  6448 0001:00011CB0  6449 0001:00011CB6
+  6451 0001:00011CCA  6453 0001:00011CD5  6458 0001:00011CD8  6459 0001:00011CDE
+  6460 0001:00011CE5  6461 0001:00011D0C  6464 0001:00011D10  6465 0001:00011D25
+  6466 0001:00011D2E  6467 0001:00011D6C  6470 0001:00011D70  6471 0001:00011D7E
+  6472 0001:00011D8A  6474 0001:00011D99  6475 0001:00011DA2  6476 0001:00011DAB
+  6477 0001:00011DB6  6478 0001:00011DC1  6480 0001:00011DD2  6483 0001:00011DD7
+  6488 0001:00011DE0  6489 0001:00011DE6  6490 0001:00011DED  6491 0001:00011DF6
+  6492 0001:00011E00  6495 0001:00011E04  6496 0001:00011E0E  6497 0001:00011E18
+  6499 0001:00011E21  6500 0001:00011E2A  6503 0001:00011E30  6504 0001:00011E57
+  6505 0001:00011E66  6507 0001:00011E93  6508 0001:00011EC6  6511 0001:00011EF8
+  6512 0001:00011F02  6513 0001:00011F0B  6514 0001:00011F21  6515 0001:00011F2A
+  6516 0001:00011F37  6517 0001:00011F44  6518 0001:00011F51  6519 0001:00011F5F
+  6521 0001:00011F6A  6522 0001:00011F77  6525 0001:00011F7C  6526 0001:00011F85
+  6527 0001:00011F94  6529 0001:00011FA7  6530 0001:00011FB0  6535 0001:00011FB4
+  6536 0001:00011FD4  6539 0001:00011FDD  6541 0001:00011FE6  6542 0001:00012004
+  6543 0001:0001200C  6544 0001:00012018  6545 0001:0001201D  6547 0001:0001202A
+  6548 0001:00012048  6550 0001:0001206B  6557 0001:00012074  6558 0001:00012082
+  6560 0001:00012092  6562 0001:000120A8  6564 0001:000120CA  6566 0001:000120E4
+  6568 0001:000120F6  6569 0001:00012104  6570 0001:00012112  6571 0001:0001212B
+  6572 0001:0001214C  6571 0001:00012159  6573 0001:0001215C  6575 0001:00012180
+  6580 0001:00012196  6581 0001:000121A1  6586 0001:000121A8  6587 0001:000121B2
+  6588 0001:000121BC  6590 0001:000121C5  6591 0001:000121CE  6594 0001:000121D4
+  6595 0001:000121DE  6596 0001:000121E7  6597 0001:000121FD  6598 0001:00012206
+  6599 0001:00012213  6600 0001:00012220  6601 0001:0001222D  6602 0001:0001223B
+  6604 0001:00012246  6605 0001:00012253  6610 0001:00012258  6611 0001:00012262
+  6612 0001:0001226C  6614 0001:00012275  6615 0001:0001227E  6618 0001:00012284
+  6619 0001:0001228E  6620 0001:00012297  6621 0001:000122AD  6622 0001:000122B6
+  6623 0001:000122C3  6624 0001:000122D0  6625 0001:000122DD  6626 0001:000122EB
+  6628 0001:000122F6  6629 0001:00012303  6634 0001:00012308  6635 0001:00012312
+  6636 0001:0001231C  6638 0001:00012325  6639 0001:0001232E  6642 0001:00012334
+  6643 0001:0001233E  6644 0001:00012347  6645 0001:0001235D  6646 0001:00012366
+  6647 0001:00012373  6648 0001:00012380  6649 0001:0001238D  6650 0001:0001239B
+  6652 0001:000123A6  6653 0001:000123B3  6658 0001:000123B8  6659 0001:000123DF
+  6660 0001:000123EE  6662 0001:00012417  6663 0001:0001244A  6666 0001:0001247C
+  6667 0001:00012485  6668 0001:00012494  6670 0001:000124A7  6671 0001:000124B0
+  6676 0001:000124B4  6677 0001:000124BD  6678 0001:000124C6  6681 0001:000124CC
+  6682 0001:000124D6  6683 0001:000124DF  6684 0001:000124F5  6685 0001:000124FE
+  6686 0001:0001250B  6687 0001:00012518  6688 0001:00012525  6689 0001:00012533
+  6691 0001:0001253E  6692 0001:0001254B  6693 0001:00012554  6698 0001:0001255C
+  6699 0001:00012566  6700 0001:00012570  6702 0001:00012579  6703 0001:00012582
+  6706 0001:00012588  6707 0001:00012592  6708 0001:0001259B  6709 0001:000125B1
+  6710 0001:000125BA  6711 0001:000125C7  6712 0001:000125D4  6713 0001:000125E1
+  6714 0001:000125EF  6716 0001:000125FA  6717 0001:00012607  6724 0001:0001260C
+  6725 0001:00012617  6726 0001:0001261E  6728 0001:00012645  6729 0001:0001264F
+  6730 0001:0001265C  6731 0001:0001266D  6733 0001:0001267B  6738 0001:00012684
+  6741 0001:0001268C  6742 0001:0001268E  6744 0001:000126D8  6748 0001:000126DC
+  6749 0001:000126EA  6750 0001:00012720  6751 0001:00012737  6754 0001:00012740
+  6755 0001:0001274D  6757 0001:00012759  6759 0001:00012781  6761 0001:000127A9
+  6764 0001:000127B8  6765 0001:000127DF  6766 0001:000127EE  6768 0001:00012817
+  6769 0001:0001284A  6772 0001:0001287C  6773 0001:00012885  6774 0001:00012894
+  6776 0001:000128A7  6777 0001:000128B0  6780 0001:000128B4  6781 0001:000128B7
+  6784 0001:000128E4  6786 0001:000128E8  6787 0001:000128EA  6791 0001:000128EC
+  6792 0001:000128F1  6793 0001:000128FC  6794 0001:00012901  6796 0001:0001290D
+  6797 0001:00012913  6801 0001:00012914  6802 0001:0001291A  6808 0001:0001291C
+  6809 0001:0001294A  6810 0001:0001294D  6818 0001:00012956  6819 0001:0001295B
+  6820 0001:0001297A  6821 0001:000129B2  6819 0001:000129BE  6822 0001:000129C1
+  6823 0001:000129C7  6825 0001:000129CE  6826 0001:000129D7  6827 0001:00012A11
+  6832 0001:00012A18  6833 0001:00012A3F  6834 0001:00012A49  6835 0001:00012A64
+  6836 0001:00012A8D  6846 0001:00012A94  6848 0001:00012ADC  6838 0001:00012AE0
+  6840 0001:00012AEC  6841 0001:00012AF3  6842 0001:00012B08  6844 0001:00012B19
 
 Line numbers for ORCtrlsDsgn(ORCtrlsDsgn.pas) segment .text
 
-    46 0001:00012CC0    47 0001:00012CC3    48 0001:00012CC8    52 0001:00012CCC
-    53 0001:00012CD2    59 0001:00012CD8    60 0001:00012CDF    61 0001:00012CE1
-    60 0001:00012D00    62 0001:00012D05    65 0001:00012D0C    66 0001:00012D15
-    67 0001:00012D1E    70 0001:00012D24    71 0001:00012D27    72 0001:00012D2C
-    77 0001:00012D30    78 0001:00012D48    79 0001:00012D53    80 0001:00012D59
-    81 0001:00012D73    84 0001:00012D7C    85 0001:00012D85    86 0001:00012D9E
-    91 0001:00012DB0    92 0001:00012DB2    96 0001:00012DB8    97 0001:00012DBE
-   100 0001:00012DC4   101 0001:00012DCA   102 0001:00012DF1   103 0001:00012E00
-   104 0001:00012E0F   105 0001:00012E1E   106 0001:00012E2D   107 0001:00012E3C
-   109 0001:00012E48   115 0001:00012F00   116 0001:00012F0E   118 0001:00012F26
-   119 0001:00012F32   120 0001:00012F59   121 0001:00012F69   122 0001:00012F79
-   123 0001:00012F89   124 0001:00012F99   125 0001:00012FA9   127 0001:00012FB7
-   116 0001:00012FB8   128 0001:00012FBF   134 0001:00012FC8   135 0001:00012FD1
-   136 0001:00012FDE   138 0001:00012FF2   139 0001:00012FFB   140 0001:00013022
-   141 0001:0001302C   142 0001:00013036   143 0001:00013040   144 0001:0001304A
-   145 0001:00013054   147 0001:0001305C   136 0001:0001305D   148 0001:00013060
-   149 0001:00013073   153 0001:0001307C   154 0001:00013082   160 0001:00013144
-   162 0001:0001315F   164 0001:000131BC   164 0001:000131C3
-
-Line numbers for ORCtrlLib60(C:\perforce\cprs\OR_3_195V25\CPRS-Lib\ORCtrlLib60.dpk) segment .text
-
-    42 0001:00013424
+    46 0001:00012DE4    47 0001:00012DE7    48 0001:00012DEC    52 0001:00012DF0
+    53 0001:00012DF6    59 0001:00012DFC    60 0001:00012E03    61 0001:00012E05
+    60 0001:00012E24    62 0001:00012E29    65 0001:00012E30    66 0001:00012E39
+    67 0001:00012E42    70 0001:00012E48    71 0001:00012E4B    72 0001:00012E50
+    77 0001:00012E54    78 0001:00012E6C    79 0001:00012E77    80 0001:00012E7D
+    81 0001:00012E97    84 0001:00012EA0    85 0001:00012EA9    86 0001:00012EC2
+    91 0001:00012ED4    92 0001:00012ED6    96 0001:00012EDC    97 0001:00012EE2
+   100 0001:00012EE8   101 0001:00012EEE   102 0001:00012F15   103 0001:00012F24
+   104 0001:00012F33   105 0001:00012F42   106 0001:00012F51   107 0001:00012F60
+   109 0001:00012F6C   115 0001:00013024   116 0001:00013032   118 0001:0001304A
+   119 0001:00013056   120 0001:0001307D   121 0001:0001308D   122 0001:0001309D
+   123 0001:000130AD   124 0001:000130BD   125 0001:000130CD   127 0001:000130DB
+   116 0001:000130DC   128 0001:000130E3   134 0001:000130EC   135 0001:000130F5
+   136 0001:00013102   138 0001:00013116   139 0001:0001311F   140 0001:00013146
+   141 0001:00013150   142 0001:0001315A   143 0001:00013164   144 0001:0001316E
+   145 0001:00013178   147 0001:00013180   136 0001:00013181   148 0001:00013184
+   149 0001:00013197   153 0001:000131A0   154 0001:000131A6   160 0001:00013268
+   162 0001:00013283   164 0001:000132E0   164 0001:000132E7
+
+Line numbers for ORCtrlLib60(C:\perforce\cprs\OR_3_215V26\CPRS-Lib\ORCtrlLib60.dpk) segment .text
+
+    42 0001:00013548
 
 Bound resource files
@@ -2106,8 +2114,8 @@
 ORCTRLS.RES
 ORCtrlLib60.res
+..\CPRS-Chart\Accessibility_TLB.dcr
 ORCtrlsDsgn.dcr
-..\CPRS-Chart\Accessibility_TLB.dcr
 ORCtrlLib60.drf
 
 
-Program entry point at 0001:00013424
+Program entry point at 0001:00013548
Index: cprs/branches/foia-cprs/Packages/ORDateLib60.map
===================================================================
--- cprs/branches/foia-cprs/Packages/ORDateLib60.map	(revision 459)
+++ cprs/branches/foia-cprs/Packages/ORDateLib60.map	(revision 460)
@@ -13,7 +13,7 @@
  0001:00000404 00000098 C=CODE     S=.text    G=(none)   M=Windows  ACBP=A9
  0001:0000049C 00000038 C=CODE     S=.text    G=(none)   M=Messages ACBP=A9
- 0001:000004D4 0000000E C=CODE     S=.text    G=(none)   M=SysConst ACBP=A9
- 0001:000004E4 0000010E C=CODE     S=.text    G=(none)   M=SysUtils ACBP=A9
- 0001:000005F4 0000000E C=CODE     S=.text    G=(none)   M=ActiveX  ACBP=A9
+ 0001:000004D4 0000000E C=CODE     S=.text    G=(none)   M=ActiveX  ACBP=A9
+ 0001:000004E4 0000000E C=CODE     S=.text    G=(none)   M=SysConst ACBP=A9
+ 0001:000004F4 0000010E C=CODE     S=.text    G=(none)   M=SysUtils ACBP=A9
  0001:00000604 0000000E C=CODE     S=.text    G=(none)   M=VarUtils ACBP=A9
  0001:00000614 0000000E C=CODE     S=.text    G=(none)   M=Variants ACBP=A9
@@ -23,50 +23,50 @@
  0001:000006FC 0000000E C=CODE     S=.text    G=(none)   M=Consts   ACBP=A9
  0001:0000070C 000000A6 C=CODE     S=.text    G=(none)   M=Graphics ACBP=A9
- 0001:000007B4 0000000E C=CODE     S=.text    G=(none)   M=Math     ACBP=A9
- 0001:000007C4 0000000E C=CODE     S=.text    G=(none)   M=Contnrs  ACBP=A9
- 0001:000007D4 00000038 C=CODE     S=.text    G=(none)   M=CommCtrl ACBP=A9
- 0001:0000080C 0000000E C=CODE     S=.text    G=(none)   M=HelpIntfs ACBP=A9
- 0001:0000081C 0000000E C=CODE     S=.text    G=(none)   M=MultiMon ACBP=A9
- 0001:0000082C 00000038 C=CODE     S=.text    G=(none)   M=Imm      ACBP=A9
- 0001:00000864 0000000E C=CODE     S=.text    G=(none)   M=WinHelpViewer ACBP=A9
- 0001:00000874 00000038 C=CODE     S=.text    G=(none)   M=UrlMon   ACBP=A9
- 0001:000008AC 00000038 C=CODE     S=.text    G=(none)   M=WinInet  ACBP=A9
- 0001:000008E4 00000038 C=CODE     S=.text    G=(none)   M=RegStr   ACBP=A9
- 0001:0000091C 00000038 C=CODE     S=.text    G=(none)   M=ShellAPI ACBP=A9
- 0001:00000954 00000038 C=CODE     S=.text    G=(none)   M=ShlObj   ACBP=A9
- 0001:0000098C 00000038 C=CODE     S=.text    G=(none)   M=WinSpool ACBP=A9
- 0001:000009C4 0000000E C=CODE     S=.text    G=(none)   M=Printers ACBP=A9
- 0001:000009D4 000000D6 C=CODE     S=.text    G=(none)   M=StdCtrls ACBP=A9
- 0001:00000AAC 00000038 C=CODE     S=.text    G=(none)   M=CommDlg  ACBP=A9
- 0001:00000AE4 00000038 C=CODE     S=.text    G=(none)   M=Dlgs     ACBP=A9
- 0001:00000B1C 0000005E C=CODE     S=.text    G=(none)   M=ExtCtrls ACBP=A9
- 0001:00000B7C 0000000E C=CODE     S=.text    G=(none)   M=Dialogs  ACBP=A9
- 0001:00000B8C 0000000E C=CODE     S=.text    G=(none)   M=StrUtils ACBP=A9
- 0001:00000B9C 0000000E C=CODE     S=.text    G=(none)   M=Clipbrd  ACBP=A9
- 0001:00000BAC 0000000E C=CODE     S=.text    G=(none)   M=StdActns ACBP=A9
- 0001:00000BBC 0000000E C=CODE     S=.text    G=(none)   M=FlatSB   ACBP=A9
- 0001:00000BCC 00000026 C=CODE     S=.text    G=(none)   M=Menus    ACBP=A9
- 0001:00000BF4 00000166 C=CODE     S=.text    G=(none)   M=Forms    ACBP=A9
- 0001:00000D5C 0000000E C=CODE     S=.text    G=(none)   M=ImgList  ACBP=A9
- 0001:00000D6C 0000000E C=CODE     S=.text    G=(none)   M=ActnList ACBP=A9
- 0001:00000D7C 0000027E C=CODE     S=.text    G=(none)   M=Controls ACBP=A9
- 0001:00000FFC 0000000E C=CODE     S=.text    G=(none)   M=ToolWin  ACBP=A9
- 0001:0000100C 00000038 C=CODE     S=.text    G=(none)   M=RichEdit ACBP=A9
- 0001:00001044 0000000E C=CODE     S=.text    G=(none)   M=IniFiles ACBP=A9
- 0001:00001054 0000000E C=CODE     S=.text    G=(none)   M=Registry ACBP=A9
- 0001:00001064 0000002E C=CODE     S=.text    G=(none)   M=Buttons  ACBP=A9
- 0001:00001094 0000000E C=CODE     S=.text    G=(none)   M=ExtDlgs  ACBP=A9
- 0001:000010A4 0000000E C=CODE     S=.text    G=(none)   M=Mapi     ACBP=A9
- 0001:000010B4 0000000E C=CODE     S=.text    G=(none)   M=ExtActns ACBP=A9
- 0001:000010C4 0000000E C=CODE     S=.text    G=(none)   M=ComStrs  ACBP=A9
- 0001:000010D4 0000000E C=CODE     S=.text    G=(none)   M=ListActns ACBP=A9
- 0001:000010E4 0000008E C=CODE     S=.text    G=(none)   M=ComCtrls ACBP=A9
- 0001:00001174 00000066 C=CODE     S=.text    G=(none)   M=Grids    ACBP=A9
- 0001:000011DC 0000005E C=CODE     S=.text    G=(none)   M=Mask     ACBP=A9
- 0001:0000123C 0000000E C=CODE     S=.text    G=(none)   M=MaskUtils ACBP=A9
- 0001:0000124C 0000000E C=CODE     S=.text    G=(none)   M=CheckLst ACBP=A9
- 0001:0000125C 0000000E C=CODE     S=.text    G=(none)   M=StdVCL   ACBP=A9
- 0001:0000126C 0000000E C=CODE     S=.text    G=(none)   M=ComConst ACBP=A9
- 0001:0000127C 0000000E C=CODE     S=.text    G=(none)   M=ComObj   ACBP=A9
+ 0001:000007B4 0000000E C=CODE     S=.text    G=(none)   M=StdVCL   ACBP=A9
+ 0001:000007C4 0000000E C=CODE     S=.text    G=(none)   M=ComConst ACBP=A9
+ 0001:000007D4 0000000E C=CODE     S=.text    G=(none)   M=ComObj   ACBP=A9
+ 0001:000007E4 0000000E C=CODE     S=.text    G=(none)   M=Math     ACBP=A9
+ 0001:000007F4 0000000E C=CODE     S=.text    G=(none)   M=Contnrs  ACBP=A9
+ 0001:00000804 00000038 C=CODE     S=.text    G=(none)   M=CommCtrl ACBP=A9
+ 0001:0000083C 0000000E C=CODE     S=.text    G=(none)   M=HelpIntfs ACBP=A9
+ 0001:0000084C 0000000E C=CODE     S=.text    G=(none)   M=MultiMon ACBP=A9
+ 0001:0000085C 00000038 C=CODE     S=.text    G=(none)   M=Imm      ACBP=A9
+ 0001:00000894 0000000E C=CODE     S=.text    G=(none)   M=WinHelpViewer ACBP=A9
+ 0001:000008A4 00000038 C=CODE     S=.text    G=(none)   M=UrlMon   ACBP=A9
+ 0001:000008DC 00000038 C=CODE     S=.text    G=(none)   M=WinInet  ACBP=A9
+ 0001:00000914 00000038 C=CODE     S=.text    G=(none)   M=RegStr   ACBP=A9
+ 0001:0000094C 00000038 C=CODE     S=.text    G=(none)   M=ShellAPI ACBP=A9
+ 0001:00000984 00000038 C=CODE     S=.text    G=(none)   M=ShlObj   ACBP=A9
+ 0001:000009BC 00000038 C=CODE     S=.text    G=(none)   M=WinSpool ACBP=A9
+ 0001:000009F4 0000000E C=CODE     S=.text    G=(none)   M=Printers ACBP=A9
+ 0001:00000A04 000000D6 C=CODE     S=.text    G=(none)   M=StdCtrls ACBP=A9
+ 0001:00000ADC 00000038 C=CODE     S=.text    G=(none)   M=CommDlg  ACBP=A9
+ 0001:00000B14 00000038 C=CODE     S=.text    G=(none)   M=Dlgs     ACBP=A9
+ 0001:00000B4C 0000005E C=CODE     S=.text    G=(none)   M=ExtCtrls ACBP=A9
+ 0001:00000BAC 0000000E C=CODE     S=.text    G=(none)   M=Dialogs  ACBP=A9
+ 0001:00000BBC 0000000E C=CODE     S=.text    G=(none)   M=StrUtils ACBP=A9
+ 0001:00000BCC 0000000E C=CODE     S=.text    G=(none)   M=Clipbrd  ACBP=A9
+ 0001:00000BDC 0000000E C=CODE     S=.text    G=(none)   M=StdActns ACBP=A9
+ 0001:00000BEC 0000000E C=CODE     S=.text    G=(none)   M=FlatSB   ACBP=A9
+ 0001:00000BFC 00000026 C=CODE     S=.text    G=(none)   M=Menus    ACBP=A9
+ 0001:00000C24 00000166 C=CODE     S=.text    G=(none)   M=Forms    ACBP=A9
+ 0001:00000D8C 0000000E C=CODE     S=.text    G=(none)   M=ImgList  ACBP=A9
+ 0001:00000D9C 0000000E C=CODE     S=.text    G=(none)   M=ActnList ACBP=A9
+ 0001:00000DAC 0000027E C=CODE     S=.text    G=(none)   M=Controls ACBP=A9
+ 0001:0000102C 0000000E C=CODE     S=.text    G=(none)   M=ToolWin  ACBP=A9
+ 0001:0000103C 00000038 C=CODE     S=.text    G=(none)   M=RichEdit ACBP=A9
+ 0001:00001074 0000000E C=CODE     S=.text    G=(none)   M=IniFiles ACBP=A9
+ 0001:00001084 0000000E C=CODE     S=.text    G=(none)   M=Registry ACBP=A9
+ 0001:00001094 0000002E C=CODE     S=.text    G=(none)   M=Buttons  ACBP=A9
+ 0001:000010C4 0000000E C=CODE     S=.text    G=(none)   M=ExtDlgs  ACBP=A9
+ 0001:000010D4 0000000E C=CODE     S=.text    G=(none)   M=Mapi     ACBP=A9
+ 0001:000010E4 0000000E C=CODE     S=.text    G=(none)   M=ExtActns ACBP=A9
+ 0001:000010F4 0000000E C=CODE     S=.text    G=(none)   M=ComStrs  ACBP=A9
+ 0001:00001104 0000000E C=CODE     S=.text    G=(none)   M=ListActns ACBP=A9
+ 0001:00001114 0000008E C=CODE     S=.text    G=(none)   M=ComCtrls ACBP=A9
+ 0001:000011A4 00000066 C=CODE     S=.text    G=(none)   M=Grids    ACBP=A9
+ 0001:0000120C 0000005E C=CODE     S=.text    G=(none)   M=Mask     ACBP=A9
+ 0001:0000126C 0000000E C=CODE     S=.text    G=(none)   M=MaskUtils ACBP=A9
+ 0001:0000127C 0000000E C=CODE     S=.text    G=(none)   M=CheckLst ACBP=A9
  0001:0000128C 00000066 C=CODE     S=.text    G=(none)   M=Calendar ACBP=A9
  0001:000012F4 000003DC C=CODE     S=.text    G=(none)   M=ORDtTmCal ACBP=A9
@@ -179,6 +179,6 @@
  0001:00006848       CallWhenIdleNotifyWhenDone
  0001:00002610       CharAt
- 0001:00000804       CommCtrl
- 0001:00000ADC       CommDlg
+ 0001:00000834       CommCtrl
+ 0001:00000B0C       CommDlg
  0001:000039E8       ComparePieces
  0001:00007A5C       ConnectToServer
@@ -195,5 +195,5 @@
  0001:0000040C       DeleteObject
  0001:00004020       DelimCount
- 0001:00000B14       Dlgs
+ 0001:00000B44       Dlgs
  0001:00007F10       DottedIPStr
  0001:0000043C       DrawText
@@ -209,13 +209,13 @@
  0002:00001054       FBaseFont
  0001:000029E4       FilteredString
- 0001:0000098C       Finalization
- 0001:00000954       Finalization
- 0001:0000091C       Finalization
- 0001:00000AAC       Finalization
- 0001:000008E4       Finalization
- 0001:00000AE4       Finalization
- 0001:000008AC       Finalization
- 0001:00000874       Finalization
- 0001:0000100C       Finalization
+ 0001:000009BC       Finalization
+ 0001:00000984       Finalization
+ 0001:0000094C       Finalization
+ 0001:00000ADC       Finalization
+ 0001:00000914       Finalization
+ 0001:00000B14       Finalization
+ 0001:000008DC       Finalization
+ 0001:000008A4       Finalization
+ 0001:0000103C       Finalization
  0001:00006988       Finalization
  0001:00008008       Finalization
@@ -224,8 +224,8 @@
  0001:0000D230       Finalization
  0001:00001698       Finalization
- 0001:0000082C       Finalization
+ 0001:0000085C       Finalization
  0001:00000464       Finalization
  0001:00006B60       Finalization
- 0001:000007D4       Finalization
+ 0001:00000804       Finalization
  0001:000003BC       Finalization
  0001:00001C60       FMDateTimeOffsetBy
@@ -250,5 +250,5 @@
  0002:0000100C       HInstance
  0002:00000518       IdleCaller
- 0001:0000085C       Imm
+ 0001:0000088C       Imm
  0001:00006B48       inet_ntoa
  0001:00004748       InfoBox
@@ -306,5 +306,5 @@
  0001:00001668       Register
  0001:0000C5CC       Register
- 0001:00000914       RegStr
+ 0001:00000944       RegStr
  0001:00008F30       RelativeDateTime
  0001:00000454       ReleaseDC
@@ -326,5 +326,5 @@
  0001:00007EBC       RetainedRPCCount
  0001:00003C14       ReverseStr
- 0001:0000103C       RichEdit
+ 0001:0000106C       RichEdit
  0002:00001060       RPCBrokerV
  0001:00007F84       RPCIdleCallDone
@@ -346,6 +346,6 @@
  0001:00003DE0       SetPieces
  0001:00007EC8       SetRetainedRPCMax
- 0001:0000094C       ShellAPI
- 0001:00000984       ShlObj
+ 0001:0000097C       ShellAPI
+ 0001:000009B4       ShlObj
  0001:00005A14       ShowMsgOn
  0001:00003EB4       SortByPiece
@@ -464,12 +464,12 @@
  0001:000027A8       UpdateCrc32
  0002:00001058       uReadOnlyColor
- 0001:000008A4       UrlMon
+ 0001:000008D4       UrlMon
  0002:0000107C       uServerToday
  0002:00001074       uShowRPCs
  0001:000044F4       ValidFileName
  0001:00000494       Windows
- 0001:000008DC       WinInet
+ 0001:0000090C       WinInet
  0001:00006B90       WinSock
- 0001:000009BC       WinSpool
+ 0001:000009EC       WinSpool
  0001:00005B1C       WrappedTextHeightByFont
 
@@ -514,26 +514,26 @@
  0001:0000049C       Finalization
  0001:000004CC       Messages
- 0001:000007D4       Finalization
- 0001:00000804       CommCtrl
- 0001:0000082C       Finalization
- 0001:0000085C       Imm
- 0001:00000874       Finalization
- 0001:000008A4       UrlMon
- 0001:000008AC       Finalization
- 0001:000008DC       WinInet
- 0001:000008E4       Finalization
- 0001:00000914       RegStr
- 0001:0000091C       Finalization
- 0001:0000094C       ShellAPI
- 0001:00000954       Finalization
- 0001:00000984       ShlObj
- 0001:0000098C       Finalization
- 0001:000009BC       WinSpool
- 0001:00000AAC       Finalization
- 0001:00000ADC       CommDlg
- 0001:00000AE4       Finalization
- 0001:00000B14       Dlgs
- 0001:0000100C       Finalization
- 0001:0000103C       RichEdit
+ 0001:00000804       Finalization
+ 0001:00000834       CommCtrl
+ 0001:0000085C       Finalization
+ 0001:0000088C       Imm
+ 0001:000008A4       Finalization
+ 0001:000008D4       UrlMon
+ 0001:000008DC       Finalization
+ 0001:0000090C       WinInet
+ 0001:00000914       Finalization
+ 0001:00000944       RegStr
+ 0001:0000094C       Finalization
+ 0001:0000097C       ShellAPI
+ 0001:00000984       Finalization
+ 0001:000009B4       ShlObj
+ 0001:000009BC       Finalization
+ 0001:000009EC       WinSpool
+ 0001:00000ADC       Finalization
+ 0001:00000B0C       CommDlg
+ 0001:00000B14       Finalization
+ 0001:00000B44       Dlgs
+ 0001:0000103C       Finalization
+ 0001:0000106C       RichEdit
  0001:00001470       TORCalendar.DrawCell
  0001:000015F4       TORCalendar.KeyDown
@@ -1037,59 +1037,59 @@
 Line numbers for ORNet(ORNet.pas) segment .text
 
-    58 0001:00006C88    59 0001:00006C8B    62 0001:00006C94    65 0001:00006CAD
-    66 0001:00006CB9    67 0001:00006CCB    68 0001:00006CD7    69 0001:00006CE3
-    72 0001:00006CEF    78 0001:00006CF4    79 0001:00006D16    81 0001:00006D29
-    82 0001:00006D30    84 0001:00006DA5    93 0001:00006DAC    94 0001:00006DE9
-    95 0001:00006DFB    96 0001:00006E1D    99 0001:00006E22   100 0001:00006E2E
-   101 0001:00006E58   103 0001:00006E7A   104 0001:00006E90   105 0001:00006EE9
-   106 0001:00006F1D   107 0001:00006F46   108 0001:00006F4B   110 0001:00006F6A
-   113 0001:00006F8B   114 0001:00006FA0   115 0001:00006FBE   117 0001:00006FFB
-   119 0001:00007010   120 0001:0000701D   122 0001:00007056   123 0001:0000707A
-   126 0001:00007086   127 0001:000070BA   128 0001:000070BF   129 0001:000070D0
-   130 0001:000070EB   131 0001:0000710E   133 0001:00007123   134 0001:00007130
-   136 0001:00007165   137 0001:00007189   140 0001:00007192   141 0001:000071C8
-   143 0001:000071DE   101 0001:000071DF   145 0001:000071E6   146 0001:0000721D
-   151 0001:000072D0   152 0001:000072EE   153 0001:000072FE   156 0001:00007302
-   157 0001:00007311   158 0001:00007315   160 0001:00007324   161 0001:00007348
-   163 0001:0000735A   165 0001:00007383   168 0001:00007388   169 0001:0000738B
-   170 0001:000073AC   177 0001:000073B0   178 0001:000073F0   179 0001:00007428
-   180 0001:00007453   182 0001:00007461   183 0001:0000746D   185 0001:00007472
-   187 0001:00007482   188 0001:00007491   189 0001:00007499   191 0001:000074A5
-   192 0001:000074B4   193 0001:000074D9   194 0001:000074EB   195 0001:0000750F
-   196 0001:0000751C   197 0001:00007529   199 0001:00007554   201 0001:00007579
-   202 0001:00007588   204 0001:00007597   205 0001:000075A6   208 0001:000075B3
-   209 0001:000075EE   211 0001:0000760A   213 0001:00007638   214 0001:00007657
-   215 0001:00007677   216 0001:000076A5   211 0001:000076A6   218 0001:000076A9
-   197 0001:000076AA   220 0001:000076B3   221 0001:000076C1   225 0001:000076E6
-   227 0001:000076E8   229 0001:000076F1   230 0001:00007701   232 0001:00007720
-   248 0001:00007725   251 0001:00007744   252 0001:00007751   253 0001:0000775E
-   254 0001:00007771   255 0001:0000777E   256 0001:0000778E   257 0001:000077F8
-   260 0001:00007998   261 0001:0000799B   262 0001:000079A5   263 0001:000079AA
-   267 0001:000079AC   268 0001:000079BE   271 0001:000079C3   272 0001:000079E5
-   273 0001:000079F4   274 0001:000079FF   276 0001:00007A0B   280 0001:00007A14
-   281 0001:00007A1B   282 0001:00007A20   283 0001:00007A2E   285 0001:00007A32
-   286 0001:00007A3B   287 0001:00007A47   289 0001:00007A55   298 0001:00007A5C
-   299 0001:00007A80   300 0001:00007A82   301 0001:00007A86   302 0001:00007A8E
-   303 0001:00007A96   305 0001:00007AAA   306 0001:00007AD2   307 0001:00007AFD
-   308 0001:00007B25   309 0001:00007B60   310 0001:00007B9B   303 0001:00007B9C
-   311 0001:00007BA3   313 0001:00007BAF   314 0001:00007BBA   317 0001:00007BC3
-   318 0001:00007BD1   319 0001:00007BEB   320 0001:00007BF5   321 0001:00007C04
-   325 0001:00007C2E   326 0001:00007C48   329 0001:00007C73   333 0001:00007CE8
-   334 0001:00007D08   335 0001:00007D34   341 0001:00007D44   342 0001:00007D52
-   343 0001:00007D5D   344 0001:00007D6D   345 0001:00007D79   346 0001:00007D7E
-   347 0001:00007D8C   353 0001:00007D94   354 0001:00007DA8   355 0001:00007DB3
-   356 0001:00007DC3   357 0001:00007DD0   358 0001:00007DD5   359 0001:00007E06
-   360 0001:00007E14   366 0001:00007E20   367 0001:00007E2E   368 0001:00007E48
-   369 0001:00007E53   370 0001:00007E63   371 0001:00007E70   372 0001:00007E75
-   373 0001:00007E87   374 0001:00007E95   425 0001:00007EBC   426 0001:00007EC4
-   430 0001:00007EC8   431 0001:00007ED1   435 0001:00007ED4   436 0001:00007ED9
-   439 0001:00007EDC   440 0001:00007EE5   441 0001:00007F09   453 0001:00007F10
-   454 0001:00007F1D   459 0001:00007F29   461 0001:00007F3E   462 0001:00007F4A
-   467 0001:00007F4E   470 0001:00007F53   475 0001:00007F63   478 0001:00007F84
-   479 0001:00007F95   480 0001:00007FB6   483 0001:00007FB8   484 0001:00007FD8
-   485 0001:00008004   495 0001:00008008   497 0001:00008029   498 0001:00008037
-   495 0001:00008040   500 0001:00008048   502 0001:00008082   487 0001:00008088
-   488 0001:000080A2   489 0001:000080A9   490 0001:000080B8   491 0001:000080C9
-   492 0001:000080D3   494 0001:000080EF
+    64 0001:00006C88    65 0001:00006C8B    70 0001:00006C94    75 0001:00006CAD
+    76 0001:00006CB9    77 0001:00006CCB    78 0001:00006CD7    79 0001:00006CE3
+    82 0001:00006CEF    88 0001:00006CF4    89 0001:00006D16    91 0001:00006D29
+    92 0001:00006D30    94 0001:00006DA5   103 0001:00006DAC   104 0001:00006DE9
+   105 0001:00006DFB   106 0001:00006E1D   109 0001:00006E22   110 0001:00006E2E
+   111 0001:00006E58   113 0001:00006E7A   114 0001:00006E90   115 0001:00006EE9
+   116 0001:00006F1D   117 0001:00006F46   118 0001:00006F4B   120 0001:00006F6A
+   123 0001:00006F8B   124 0001:00006FA0   125 0001:00006FBE   127 0001:00006FFB
+   129 0001:00007010   130 0001:0000701D   132 0001:00007056   133 0001:0000707A
+   136 0001:00007086   137 0001:000070BA   138 0001:000070BF   139 0001:000070D0
+   140 0001:000070EB   141 0001:0000710E   143 0001:00007123   144 0001:00007130
+   146 0001:00007165   147 0001:00007189   150 0001:00007192   151 0001:000071C8
+   153 0001:000071DE   111 0001:000071DF   155 0001:000071E6   156 0001:0000721D
+   161 0001:000072D0   162 0001:000072EE   163 0001:000072FE   166 0001:00007302
+   167 0001:00007311   168 0001:00007315   170 0001:00007324   171 0001:00007348
+   173 0001:0000735A   175 0001:00007383   178 0001:00007388   179 0001:0000738B
+   180 0001:000073AC   187 0001:000073B0   188 0001:000073F0   189 0001:00007428
+   190 0001:00007453   192 0001:00007461   193 0001:0000746D   195 0001:00007472
+   197 0001:00007482   198 0001:00007491   199 0001:00007499   201 0001:000074A5
+   202 0001:000074B4   203 0001:000074D9   204 0001:000074EB   205 0001:0000750F
+   206 0001:0000751C   207 0001:00007529   209 0001:00007554   211 0001:00007579
+   212 0001:00007588   214 0001:00007597   215 0001:000075A6   218 0001:000075B3
+   219 0001:000075EE   221 0001:0000760A   223 0001:00007638   224 0001:00007657
+   225 0001:00007677   226 0001:000076A5   221 0001:000076A6   228 0001:000076A9
+   207 0001:000076AA   230 0001:000076B3   231 0001:000076C1   235 0001:000076E6
+   237 0001:000076E8   239 0001:000076F1   240 0001:00007701   242 0001:00007720
+   258 0001:00007725   261 0001:00007744   262 0001:00007751   263 0001:0000775E
+   264 0001:00007771   265 0001:0000777E   266 0001:0000778E   267 0001:000077F8
+   270 0001:00007998   271 0001:0000799B   272 0001:000079A5   273 0001:000079AA
+   277 0001:000079AC   278 0001:000079BE   281 0001:000079C3   282 0001:000079E5
+   283 0001:000079F4   284 0001:000079FF   286 0001:00007A0B   290 0001:00007A14
+   291 0001:00007A1B   292 0001:00007A20   293 0001:00007A2E   295 0001:00007A32
+   296 0001:00007A3B   297 0001:00007A47   299 0001:00007A55   308 0001:00007A5C
+   309 0001:00007A80   310 0001:00007A82   311 0001:00007A86   312 0001:00007A8E
+   313 0001:00007A96   315 0001:00007AAA   316 0001:00007AD2   317 0001:00007AFD
+   318 0001:00007B25   319 0001:00007B60   320 0001:00007B9B   313 0001:00007B9C
+   321 0001:00007BA3   323 0001:00007BAF   324 0001:00007BBA   327 0001:00007BC3
+   328 0001:00007BD1   329 0001:00007BEB   330 0001:00007BF5   331 0001:00007C04
+   335 0001:00007C2E   336 0001:00007C48   339 0001:00007C73   343 0001:00007CE8
+   344 0001:00007D08   345 0001:00007D34   351 0001:00007D44   352 0001:00007D52
+   353 0001:00007D5D   354 0001:00007D6D   355 0001:00007D79   356 0001:00007D7E
+   357 0001:00007D8C   363 0001:00007D94   364 0001:00007DA8   365 0001:00007DB3
+   366 0001:00007DC3   367 0001:00007DD0   368 0001:00007DD5   369 0001:00007E06
+   370 0001:00007E14   376 0001:00007E20   377 0001:00007E2E   378 0001:00007E48
+   379 0001:00007E53   380 0001:00007E63   381 0001:00007E70   382 0001:00007E75
+   383 0001:00007E87   384 0001:00007E95   435 0001:00007EBC   436 0001:00007EC4
+   440 0001:00007EC8   441 0001:00007ED1   445 0001:00007ED4   446 0001:00007ED9
+   449 0001:00007EDC   450 0001:00007EE5   451 0001:00007F09   463 0001:00007F10
+   464 0001:00007F1D   469 0001:00007F29   471 0001:00007F3E   472 0001:00007F4A
+   477 0001:00007F4E   480 0001:00007F53   485 0001:00007F63   488 0001:00007F84
+   489 0001:00007F95   490 0001:00007FB6   493 0001:00007FB8   494 0001:00007FD8
+   495 0001:00008004   505 0001:00008008   507 0001:00008029   508 0001:00008037
+   505 0001:00008040   510 0001:00008048   512 0001:00008082   497 0001:00008088
+   498 0001:000080A2   499 0001:000080A9   500 0001:000080B8   501 0001:000080C9
+   502 0001:000080D3   504 0001:000080EF
 
 Line numbers for ORDtTm(ORDtTm.pas) segment .text
@@ -1297,5 +1297,5 @@
    191 0001:0000D221   192 0001:0000D22C   194 0001:0000D260   194 0001:0000D267
 
-Line numbers for ORDateLib60(C:\cprs\OR_3_195v25\CPRS-Lib\ORDateLib60.dpk) segment .text
+Line numbers for ORDateLib60(C:\cprs\OR_3_215v26\CPRS-Lib\ORDateLib60.dpk) segment .text
 
     45 0001:0000D5D0
Index: cprs/branches/foia-cprs/Version Info.txt
===================================================================
--- cprs/branches/foia-cprs/Version Info.txt	(revision 459)
+++ cprs/branches/foia-cprs/Version Info.txt	(revision 460)
@@ -1,1 +1,1 @@
-This is the FOIA CPRS version from OR_30_235_SRC.zip
+This is the FOIA CPRS version from OR_30_258_SRC.zip
