Ignore:
Timestamp:
May 7, 2015, 12:34:29 PM (9 years ago)
Author:
healthsevak
Message:

Updating the working copy to CPRS version 28

File:
1 edited

Legend:

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

    r830 r1679  
    8282    FOldHintEvent: TShowHintEvent;
    8383    OKPressed: Boolean;
     84    DoNotNeedLocation: Boolean;     //AGP This is used to not force a location when writing a delayed order
    8485    procedure AppShowHint(var HintStr: string; var CanShow: Boolean;
    8586                          var HintInfo: THintInfo);
     
    9091  end;
    9192
    92 procedure UpdateEncounter(PersonFilter: Int64; ADate: TFMDateTime = 0; TIULocation: integer = 0);
     93procedure UpdateEncounter(PersonFilter: Int64; ADate: TFMDateTime = 0; TIULocation: integer = 0; DelayedOrder: Boolean = False);
    9394procedure UpdateVisit(FontSize: Integer); overload;
    9495procedure UpdateVisit(FontSize: Integer; TIULocation: integer); overload;
     
    124125end;
    125126
    126 procedure UpdateEncounter(PersonFilter: Int64; ADate: TFMDateTime = 0;  TIULocation: integer = 0);
     127procedure UpdateEncounter(PersonFilter: Int64; ADate: TFMDateTime = 0;  TIULocation: integer = 0; DelayedOrder: Boolean = False);
    127128const
    128129  UP_SHIFT = 85;
     
    136137  frmEncounter := TfrmEncounter.Create(Application);
    137138  try
     139    if DelayedOrder = True then frmEncounter.DoNotNeedLocation := True
     140    else frmEncounter.DoNotNeedLocation := False;
    138141    TimedOut := False;
    139142    ResizeAnchoredFormToFont(frmEncounter);
     
    397400  inherited;
    398401  msg := '';
    399   if FLocation = 0 then msg := TX_NO_LOC;
    400   if FDateTime <= 0 then msg := msg + CRLF + TX_NO_DATE
    401   else if(pos('.',FloatToStr(FDateTime)) = 0) then msg := msg + CRLF + TX_NO_TIME;
    402   if(msg <> '') then
    403   begin
    404     InfoBox(msg, TC_MISSING, MB_OK);
    405     Exit;
    406   end
    407   else
    408   begin
    409     ADate := FMDateTimeToDateTime(Trunc(FDateTime));
    410     AMaxDate := FMDateTimeToDateTime(FMToday) + StrToIntDef(FEncFutureLimit, 0);
    411     if ADate > AMaxDate then
    412       if InfoBox(TX_FUTURE_WARNING, TC_FUTURE_WARNING, MB_YESNO or MB_ICONQUESTION) = MRNO then exit;
    413   end;
     402  if DoNotNeedLocation = False then
     403    begin
     404      if FLocation = 0 then msg := TX_NO_LOC;
     405      if FDateTime <= 0 then msg := msg + CRLF + TX_NO_DATE
     406      else if(pos('.',FloatToStr(FDateTime)) = 0) then msg := msg + CRLF + TX_NO_TIME;
     407      if(msg <> '') then
     408        begin
     409          InfoBox(msg, TC_MISSING, MB_OK);
     410          Exit;
     411        end
     412      else
     413        begin
     414          ADate := FMDateTimeToDateTime(Trunc(FDateTime));
     415          AMaxDate := FMDateTimeToDateTime(FMToday) + StrToIntDef(FEncFutureLimit, 0);
     416          if ADate > AMaxDate then
     417              if InfoBox(TX_FUTURE_WARNING, TC_FUTURE_WARNING, MB_YESNO or MB_ICONQUESTION) = MRNO then exit;
     418        end;
     419    end;
    414420  if FFilter <> NPF_SUPPRESS then FProvider := cboPtProvider.ItemIEN;
    415421  OKPressed := True;
Note: See TracChangeset for help on using the changeset viewer.