Procedure

TfrmODBBank.cboCollTimeChange

Module

fODBBank

Last Modified

7/15/2014 3:26:40 PM

Visibility

Public/Published

Owner

TfrmODBBank

Declaration

procedure cboCollTimeChange(Sender: TObject);

Calls Hierarchy


TfrmODBBank.cboCollTimeChange
 ├GetFutureLabTime
 │ └TfrmBase508Form.Create
 │   ├TfrmBase508Form.UpdateAccessibilityActions
 │   ├UnfocusableControlEnter
 │   └AdjustControls
 │     ├TfrmBase508Form.ModifyUnfocusableControl
 │     └..(rec)..
 ├FMToday
 │ └FMNow
 ├TResponses.Update
 │ ├TResponses.FindResponseByName
 │ └TResponses.IENForPrompt
 └TfrmODBBank.ValidCollTime
   └StrToFMDateTime

Calls

Name Declaration Comments
FMToday function FMToday: TFMDateTime; -
GetFutureLabTime function GetFutureLabTime(ACollDate: TFMDateTime): string; -
TResponses.Update procedure Update(const APromptID: string; AnInstance: Integer; const AnIValue, AnEValue: string); -
TfrmODBBank.ValidCollTime function ValidCollTime(UserEntry: string): string; -


Source

3285  procedure TfrmODBBank.cboCollTimeChange(Sender: TObject);
3286  var
3287    CollType: string;
3288  const
3289    TX_BAD_TIME         = ' is not a routine lab collection time.' ;
3290    TX_BAD_TIME_CAP     = 'Invalid Time';
3291  begin
3292    CollType := 'LC';
3293    with cboCollTime do
3294      begin
3295        if ItemID = 'LO' then
3296          begin
3297            ItemIndex := -1;
3298            Text := GetFutureLabTime(FMToday);
3299          end;
3300      end;
3301    cboCollType.SelectByID(CollType);
3302    if uSelectedItems.Count > 0 then
3303      begin
3304        with cboCollTime do
3305          if Length(ItemID) > 0 then
3306            begin
3307              Responses.Update('START', 1, Copy(ItemID, 2, 999), Copy(ItemID, 2, 999));
3308              FLastLabCollTime := ItemID + U + Text;
3309            end
3310          else if Length(Text) > 0 then
3311            begin
3312              Responses.Update('START', 1, ValidCollTime(Text), Text) ;
3313              FLastLabCollTime := ValidCollTime(Text);
3314            end;
3315      end;
3316  end;