Ignore:
Timestamp:
May 8, 2015, 7:52:55 AM (10 years ago)
Author:
healthsevak
Message:

Committing the files for first time to this new branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/branches/HealthSevak-CPRS/CPRS-Chart/Vitals/uVitals.pas

    r829 r1693  
    22{ Old class TVital currently not used - commented out at bottom of unit }
    33
     4{$DEFINE CCOWBROKER}
     5
    46interface
    57
    68uses
    79  SysUtils, Dialogs, Controls, Windows, Classes, ORClasses, ORCtrls, ORFn, Forms
    8   , TRPCB
    9   ;
     10  , TRPCB ;
    1011
    1112const
     
    8687
    8788  TGMV_VitalsEnterForm = function(
    88         aBroker:TRPCBroker;
     89         RPCBrokerV: TRPCBroker;
    8990        aPatient, aLocation, aTemplate,aSignature:String;
    9091        aDateTime:TDateTime): TCustomForm; stdcall;
    9192
    9293  TGMV_VitalsEnterDLG = function(
    93         aBroker:TRPCBroker;
     94         RPCBrokerV: TRPCBroker;
    9495        aDFN, aLocation, aTemplate,aSignature:String;
    9596        aDateTime:TDateTime;
     
    9798
    9899  TGFM_VitalsViewDLG = function(
    99         aBroker:TRPCBroker;
     100         RPCBrokerV: TRPCBroker;
    100101        aDFN, aLocation,
    101102        DateStart, DateStop,
     
    105106
    106107  TGMV_VitalsViewForm = function(
    107         aBroker:TRPCBroker;
     108         RPCBrokerV: TRPCBroker;
    108109        aDFN, aLocation,
    109110        DateStart, DateStop,
     
    114115
    115116  TGMV_LatestVitalsList = function (
    116         aBroker:TRPCBroker;
     117         RPCBrokerV: TRPCBroker;
    117118        aDFN,
    118119        aDelim:String;
     
    124125var
    125126  VitalsDLLHandle : THandle = 0;
    126 //  DLLForceClose : Boolean = False;  // jm - removed as part of timeout fix
    127 
     127
     128const
     129  VitalsDLLName = 'GMV_VitalsViewEnter.dll';
     130
     131procedure LoadVitalsDLL;
     132procedure UnloadVitalsDLL;
    128133
    129134const
     
    188193    if assigned(VitalsExit) then
    189194      VitalsExit();
    190     FreeLibrary(VitalsDLLHandle);
    191     VitalsDLLHandle := 0;
    192 //    DLLForceClose := True;   // jm - removed as part of timeout fix
     195    UnloadVitalsDLL;
    193196  end;
    194197end;
     
    619622  for i := 1 to Length(x) do if not (x[i] in ['0'..'9','.']) then Result := False;
    620623end;
     624
     625procedure LoadVitalsDLL;
     626var
     627  GMV_LibName: String;
     628
     629begin
     630  if VitalsDLLHandle = 0 then
     631  begin
     632    GMV_LibName := GetProgramFilesPath + SHARE_DIR + VitalsDLLName;
     633    VitalsDLLHandle := LoadLibrary(PChar(GMV_LibName));
     634  end;
     635end;
     636
     637procedure UnloadVitalsDLL;
     638begin
     639  if VitalsDLLHandle <> 0 then
     640  begin
     641    FreeLibrary(VitalsDLLHandle);
     642    VitalsDLLHandle := 0;
     643  end;
     644end;
     645
    621646(* Old class currently not used
    622647{$OPTIMIZATION OFF}                              // REMOVE AFTER UNIT IS DEBUGGED
Note: See TracChangeset for help on using the changeset viewer.