Index: cprs/trunk/CPRS-Chart/Encounter/fEncVitals.pas
===================================================================
--- cprs/trunk/CPRS-Chart/Encounter/fEncVitals.pas	(revision 456)
+++ cprs/trunk/CPRS-Chart/Encounter/fEncVitals.pas	(revision 829)
@@ -6,20 +6,5 @@
   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
   fPCEBase, ORDtTm, StdCtrls, ORCtrls, ExtCtrls, Buttons, fAutoSz, ORFn,
-  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 ===================================================}
+  rvitals, ComCtrls, ORNet, uVitals, VAUtils, TRPCB, VA508AccessibilityManager;
 
 type
@@ -63,6 +48,8 @@
     txtMeasHt: TCaptionEdit;
     pnlBottom: TPanel;
+    lvVitals: TCaptionListView;
     btnEnterVitals: TButton;
-    lvVitals: TCaptionListView;
+    btnOKkludge: TButton;
+    btnCancelkludge: TButton;
     procedure SetVitPointer(Sender: TObject);
     procedure txtMeasBPExit(Sender: TObject);
@@ -87,6 +74,4 @@
     procedure txtMeasHtExit(Sender: TObject);
     procedure txtMeasWtExit(Sender: TObject);
-    procedure FormKeyDown(Sender: TObject; var Key: Word;
-      Shift: TShiftState);
     procedure btnEnterVitalsClick(Sender: TObject); //vitals lite
   private
@@ -120,5 +105,5 @@
      fEncounterFrame, uInit
   //   , fGMV_InputTemp // Vitals Lite 2004-05-21
-     ;
+     , VA508AccessibilityRouter;
 
 const
@@ -418,5 +403,9 @@
 
 {== Vitals Lite 2004-05-21 ===================================================}
-  FreeLibrary(VitalsDLLHandle);
+  if VitalsDLLHandle <> 0 then
+  begin
+    FreeLibrary(VitalsDLLHandle);
+    VitalsDLLHandle := 0;
+  end;
 {== Vitals Lite 2004-05-21 ===================================================}
   inherited;
@@ -448,5 +437,6 @@
   GMV_LibName :='GMV_VitalsViewEnter.dll';
   GMV_LibName := GetProgramFilesPath + SHARE_DIR + GMV_LibName;
-  VitalsDLLHandle := LoadLibrary(PChar(GMV_LibName));
+  if VitalsDLLHandle = 0 then
+    VitalsDLLHandle := LoadLibrary(PChar(GMV_LibName));
   if VitalsDLLHandle = 0 then // No Handle found
     MessageDLG('Can''t find library "'+GMV_LibName+'".',mtError,[mbok],0)
@@ -555,27 +545,4 @@
   txtMeasWt.text    := '';
   cboPain.text      := '';
-end;
-
-procedure TfrmEncVitals.FormKeyDown(Sender: TObject; var Key: Word;
-  Shift: TShiftState);
-begin
-  {capture return key press if on the vital screen}
-  begin
-    inherited;
-    if (ActiveCtrl.tag in VitalDateTagSet)then
-    begin
-      if Key = VK_RETURN then
-      begin
-        Key := 0;
-        if (ActiveCtrl.Tag = TAG_VITPAIN) then
-          ChangeFocus(btnOK)
-        else
-        begin
-          GetParentForm(Self).Perform(WM_NEXTDLGCTL,0,0);
-          SetVitPointer(Sender);
-        end;
-      end;
-    end;
-  end;
 end;
 
@@ -636,5 +603,5 @@
   end
   else
-    MessageDLG('Can not find function "'+GMV_FName+'".',mtError,[mbok],0);
+    MessageDLG('Unable to find function "'+GMV_FName+'".',mtError,[mbok],0);
   @VLPtVitals := nil;
   LoadVitalsList;
@@ -652,5 +619,5 @@
   if assigned(VLPtVitals) then
   begin
-    frmFrame.VitalsDLLActive := True;  // need this flag for CCOW (RV)
+//    frmFrame.DLLActive := True;  // need this flag for CCOW (RV)
     VitalsList := VLPtVitals(RPCBrokerV,Patient.DFN,U,false);
     if assigned(VitalsList) then
@@ -660,7 +627,10 @@
     MessageDLG('Can''t find function "'+GMV_FName+'".',mtError,[mbok],0);
   @VLPtVitals := nil;
-  frmFrame.VitalsDLLActive := False;  // need this flag for CCOW (RV)
+//  frmFrame.DLLActive := False;  // need this flag for CCOW (RV)
 end;
 //End Vitals Lite
 
+initialization
+  SpecifyFormIsNotADialog(TfrmEncVitals);
+
 end.
