Procedure

TfrmOrders.mnuActUnflagClick

Module

fOrders

Last Modified

7/15/2014 3:26:42 PM

Visibility

Public/Published

Owner

TfrmOrders

Declaration

procedure mnuActUnflagClick(Sender: TObject);

Calls Hierarchy


TfrmOrders.mnuActUnflagClick
 ├TfrmOrders.NoneSelected
 ├AuthorizedUser
 ├ValidateOrderAction
 ├ExecuteUnflagOrder
 │ ├TfrmBase508Form.Create
 │ │ ├TfrmBase508Form.UpdateAccessibilityActions
 │ │ ├UnfocusableControlEnter
 │ │ └AdjustControls
 │ │   ├TfrmBase508Form.ModifyUnfocusableControl
 │ │   └..(rec)..
 │ ├LoadFlagReason
 │ └UnflagOrder
 │   └SetOrderFromResults
 │     └SetOrderFields
 │       ├TOrder.Clear
 │       ├SeqOfDGroup
 │       │ └LoadDGroupMap
 │       └TopNameOfDGroup
 │         └LoadDGroupMap
 └AutoUnflagAlertedOrders

Calls

Name Declaration Comments
AuthorizedUser function AuthorizedUser: Boolean; -
AutoUnflagAlertedOrders procedure AutoUnflagAlertedOrders(PatientDFN, XQAID: string); -
ExecuteUnflagOrder function ExecuteUnflagOrder(AnOrder: TOrder): Boolean; -
TfrmOrders.NoneSelected function NoneSelected(const ErrMsg: string): Boolean; -
ValidateOrderAction procedure ValidateOrderAction(const ID, Action: string; var ErrMsg: string); -


Source

2040  procedure TfrmOrders.mnuActUnflagClick(Sender: TObject);
2041  var
2042    i: Integer;
2043    AnOrder: TOrder;
2044    ErrMsg: string;
2045  begin
2046    inherited;
2047    if NoneSelected(TX_NOSEL) then Exit;
2048    if not AuthorizedUser then Exit;
2049    with lstOrders do for i := 0 to Items.Count - 1 do if Selected[i] then
2050    begin
2051      AnOrder := TOrder(Items.Objects[i]);
2052      ValidateOrderAction(AnOrder.ID, OA_UNFLAG, ErrMsg);
2053      if Length(ErrMsg) > 0
2054        then InfoBox(AnOrder.Text + TX_NO_UNFLAG + ErrMsg, TC_NO_UNFLAG, MB_OK)
2055        else ExecuteUnflagOrder(AnOrder);
2056      Selected[i] := False;
2057    end;
2058    lstOrders.Invalidate;
2059    if Notifications.Active then AutoUnflagAlertedOrders(Patient.DFN, Piece(Notifications.RecordID, U, 2));
2060  end;