Class

TfrmOrders

Module

fOrders

Last Modified

7/15/2014 3:26:42 PM

Scope

Interfaced

Inherits from

TfrmHSplit

Declaration


TfrmOrders = class(TfrmHSplit)
  mnuOrders: TMainMenu;
  mnuAct: TMenuItem;
  mnuActChange: TMenuItem;
  mnuActDC: TMenuItem;
  mnuActHold: TMenuItem;
  mnuActUnhold: TMenuItem;
  mnuActRenew: TMenuItem;
  Z4: TMenuItem;
  mnuActFlag: TMenuItem;
  mnuActUnflag: TMenuItem;
  Z5: TMenuItem;
  mnuActVerify: TMenuItem;
  mnuActRelease: TMenuItem;
  mnuActSign: TMenuItem;
  mnuView: TMenuItem;
  mnuViewChart: TMenuItem;
  mnuChartReports: TMenuItem;
  mnuChartLabs: TMenuItem;
  mnuChartDCSumm: TMenuItem;
  mnuChartCslts: TMenuItem;
  mnuChartNotes: TMenuItem;
  mnuChartOrders: TMenuItem;
  mnuChartMeds: TMenuItem;
  mnuChartProbs: TMenuItem;
  mnuChartCover: TMenuItem;
  mnuViewActive: TMenuItem;
  mnuViewExpiring: TMenuItem;
  Z2: TMenuItem;
  mnuViewCustom: TMenuItem;
  Z3: TMenuItem;
  mnuViewDetail: TMenuItem;
  Z1: TMenuItem;
  OROffsetLabel1: TOROffsetLabel;
  hdrOrders: THeaderControl;
  lstOrders: TCaptionListBox;
  lblOrders: TOROffsetLabel;
  lstSheets: TORListBox;
  lstWrite: TORListBox;
  mnuViewUnsigned: TMenuItem;
  popOrder: TPopupMenu;
  popOrderChange: TMenuItem;
  popOrderDC: TMenuItem;
  popOrderRenew: TMenuItem;
  popOrderDetail: TMenuItem;
  N1: TMenuItem;
  mnuActCopy: TMenuItem;
  mnuActAlert: TMenuItem;
  mnuViewResult: TMenuItem;
  mnuActOnChart: TMenuItem;
  mnuActComplete: TMenuItem;
  sepOrderVerify: TMenuItem;
  popOrderVerify: TMenuItem;
  popOrderResult: TMenuItem;
  imgHide: TImage;
  mnuOpt: TMenuItem;
  mnuOptSaveQuick: TMenuItem;
  mnuOptEditCommon: TMenuItem;
  popOrderSign: TMenuItem;
  popOrderCopy: TMenuItem;
  mnuActChartRev: TMenuItem;
  popOrderChartRev: TMenuItem;
  Z6: TMenuItem;
  mnuViewDfltSave: TMenuItem;
  mnuViewDfltShow: TMenuItem;
  mnuViewCurrent: TMenuItem;
  mnuChartSurgery: TMenuItem;
  mnuViewResultsHistory: TMenuItem;
  popResultsHistory: TMenuItem;
  btnDelayedOrder: TORAlignButton;
  mnuActChgEvnt: TMenuItem;
  mnuChgEvnt: TMenuItem;
  mnuActRel: TMenuItem;
  popOrderRel: TMenuItem;
  EventRealeasedOrder1: TMenuItem;
  lblWrite: TLabel;
  sptVert: TSplitter;
  mnuViewExpired: TMenuItem;
  mnuViewInformation: TMenuItem;
  mnuViewDemo: TMenuItem;
  mnuViewVisits: TMenuItem;
  mnuViewPrimaryCare: TMenuItem;
  mnuViewMyHealtheVet: TMenuItem;
  mnuInsurance: TMenuItem;
  mnuViewFlags: TMenuItem;
  mnuViewReminders: TMenuItem;
  mnuViewRemoteData: TMenuItem;
  mnuViewPostings: TMenuItem;
  mnuOptimizeFields: TMenuItem;
  procedure mnuChartTabClick(Sender: TObject);
  procedure FormCreate(Sender: TObject);
  procedure FormDestroy(Sender: TObject);
  procedure lstOrdersDrawItem(Control: TWinControl; Index: Integer;
    TheRect: TRect; State: TOwnerDrawState);
  procedure lstOrdersMeasureItem(Control: TWinControl; Index: Integer;
    var AHeight: Integer);
  procedure mnuViewActiveClick(Sender: TObject);
  procedure hdrOrdersSectionResize(HeaderControl: THeaderControl;
    Section: THeaderSection);
  procedure mnuViewCustomClick(Sender: TObject);
  procedure mnuViewExpiringClick(Sender: TObject);
  procedure mnuViewExpiredClick(Sender: TObject);
  procedure mnuViewUnsignedClick(Sender: TObject);
  procedure mnuViewDetailClick(Sender: TObject);
  procedure lstOrdersDblClick(Sender: TObject);
  procedure lstWriteClick(Sender: TObject);
  procedure mnuActHoldClick(Sender: TObject);
  procedure mnuActUnholdClick(Sender: TObject);
  procedure mnuActDCClick(Sender: TObject);
  procedure mnuActAlertClick(Sender: TObject);
  procedure mnuActFlagClick(Sender: TObject);
  procedure mnuActUnflagClick(Sender: TObject);
  procedure mnuActSignClick(Sender: TObject);
  procedure mnuActReleaseClick(Sender: TObject);
  procedure mnuActOnChartClick(Sender: TObject);
  procedure mnuActCompleteClick(Sender: TObject);
  procedure mnuActVerifyClick(Sender: TObject);
  procedure mnuViewResultClick(Sender: TObject);
  procedure mnuActCommentClick(Sender: TObject);
  procedure mnuOptSaveQuickClick(Sender: TObject);
  procedure mnuOptEditCommonClick(Sender: TObject);
  procedure mnuActCopyClick(Sender: TObject);
  procedure mnuActChangeClick(Sender: TObject);
  procedure mnuActRenewClick(Sender: TObject);
  procedure pnlRightResize(Sender: TObject);
  procedure lstSheetsClick(Sender: TObject);
  procedure mnuActChartRevClick(Sender: TObject);
  procedure mnuViewDfltShowClick(Sender: TObject);
  procedure mnuViewDfltSaveClick(Sender: TObject);
  procedure mnuViewCurrentClick(Sender: TObject);
  procedure mnuViewResultsHistoryClick(Sender: TObject);
  procedure btnDelayedOrderClick(Sender: TObject);
  procedure mnuActChgEvntClick(Sender: TObject);
  procedure mnuActRelClick(Sender: TObject);
  procedure EventRealeasedOrder1Click(Sender: TObject);
  procedure lblWriteMouseMove(Sender: TObject; Shift: TShiftState; X,
    Y: Integer);
  procedure popOrderPopup(Sender: TObject);
  procedure mnuViewClick(Sender: TObject);
  procedure mnuActClick(Sender: TObject);
  procedure mnuOptClick(Sender: TObject);
  procedure FormShow(Sender: TObject);
  procedure hdrOrdersMouseUp(Sender: TObject; Button: TMouseButton;
    Shift: TShiftState; X, Y: Integer);
  procedure hdrOrdersMouseDown(Sender: TObject; Button: TMouseButton;
    Shift: TShiftState; X, Y: Integer);
  procedure ViewInfo(Sender: TObject);
  procedure mnuViewInformationClick(Sender: TObject);
  procedure mnuOptimizeFieldsClick(Sender: TObject);
  procedure hdrOrdersSectionClick(HeaderControl: THeaderControl;
    Section: THeaderSection);
  procedure sptHorzMoved(Sender: TObject);
  procedure sptVertMoved(Sender: TObject);
private
  { Private declarations }
  OrderListClickProcessing : Boolean;
  FDfltSort: Integer;
  FCurrentView: TOrderView;
  FCompress: boolean;
  FFromDCRelease: boolean;
  FSendDelayOrders: boolean;
  FNewEvent: boolean;
  FAskForCancel: boolean;
  FNeedShowModal: boolean;
  FOrderViewForActiveOrders: TOrderView;
  FEventForCopyActiveOrders: TOrderDelayEvent;
  FEventDefaultOrder      : string;
  FIsDefaultDlg: boolean;
  FHighlightFromMedsTab: integer;
  FCalledFromWDO: boolean; //called from Write Delay Orders button
  FEvtOrderList: TStringlist;
  FEvtColWidth: integer;
  FRightAfterWriteOrderBox : boolean;
  FDontCheck: boolean;
  FParentComplexOrderID: string;
  FHighContrast2Mode: boolean;
  function CanChangeOrderView: Boolean;
  function GetEvtIFN(AnIndex: integer): string;
  function DisplayDefaultDlgList(ADest: TORListBox; ADlgList: TStringList): boolean;
  procedure AddToListBox(AnOrderList: TList);
  procedure ExpandEventSection;
  procedure CompressEventSection;
  procedure ClearOrderSheets;
  procedure InitOrderSheets;
  procedure DfltViewForEvtDelay;
  procedure MakeSelectedList(AList: TList);
  function  NoneSelected(const ErrMsg: string): Boolean;
  procedure ProcessNotifications;
  procedure PositionTopOrder(DGroup: Integer);
  procedure RedrawOrderList;
  procedure RefreshOrderList(FromServer: Boolean; APtEvtID: string = '');
  procedure RetrieveVisibleOrders(AnIndex: Integer);
  procedure RemoveSelectedFromChanges(AList: TList);
  procedure SetOrderView(AFilter, ADGroup: Integer; const AViewName: string; NotifSort: Boolean);
  //procedure SetEvtIFN(var AnEvtIFN: integer);
  procedure UseDefaultSort;
  procedure SynchListToOrders;
  procedure ActivateDeactiveRenew;
  procedure ValidateSelected(const AnAction, WarningMsg, WarningTitle: string);
  procedure ViewAlertedOrders(OrderIEN: string; Status: integer; DispGrp: string;
        BySvc, InvDate: boolean; Title: string);
  procedure UMDestroy(var Message: TMessage); message UM_DESTROY;
  function GetStartStopText(StartTime: string; StopTime: string): string;
  function GetOrderText(AnOrder: TOrder; Index: integer; Column: integer): string;
  function MeasureColumnHeight(AnOrder: TOrder; Index: Integer; Column: integer):integer;
  function GetPlainText(AnOrder: TOrder; index: integer):string;
  //function PatientStatusChanged: boolean;
  procedure UMEventOccur(var Message: TMessage); message UM_EVENTOCCUR;
  function CheckOrderStatus: boolean;
  procedure RightClickMessageHandler(var Msg: TMessage; var Handled: Boolean);
public
  procedure setSectionWidths; //CQ6170
  function getTotalSectionsWidth : integer; //CQ6170
  function AllowContextChange(var WhyNot: string): Boolean; override;
  function PlaceOrderForDefaultDialog(ADlgInfo: string; IsDefaultDialog: boolean; AEvent: TOrderDelayEvent): boolean;
  function PtEvtCompleted(APtEvtID: integer; APtEvtName: string; FromMeds: boolean = False; Signing: boolean = False): boolean;
  procedure RefreshToFirstItem;
  procedure ChangesUpdate(APtEvtID: string);
  procedure GroupChangesUpdate(GrpName: string);
  procedure ClearPtData; override;
  procedure DisplayPage; override;
  procedure InitOrderSheetsForEvtDelay;
  procedure ResetOrderPage(AnEvent: TOrderDelayEvent; ADlgLst: TStringList; IsRealeaseNow: boolean);
  procedure NotifyOrder(OrderAction: Integer; AnOrder: TOrder); override;
  procedure SaveSignOrders;
  procedure ClickLstSheet;
  procedure RequestPrint; override;
  procedure InitOrderSheets2(AnItem: string = '');
  procedure SetFontSize( FontSize: integer); override;
  property IsDefaultDlg: boolean      read FIsDefaultDlg       write FIsDefaultDlg;
  property SendDelayOrders: Boolean   read FSendDelayOrders    write FSendDelayOrders;
  property NewEvent: Boolean          read FNewEvent           write FNewEvent;
  property NeedShowModal: Boolean     read FNeedShowModal      write FNeedShowModal;
  property AskForCancel: Boolean      read FAskForCancel       write FAskForCancel;
  property EventDefaultOrder: string  read FEventDefaultOrder  write FEventDefaultOrder;
  property TheCurrentView: TOrderView read FCurrentView;
  property HighlightFromMedsTab: integer read FHighlightFromMedsTab write FHighlightFromMedsTab;
  property CalledFromWDO: boolean     read FCalledFromWDO;
  property EvtOrderList: TStringlist  read FEvtOrderList       write FEvtOrderList;
  property FromDCRelease: boolean     read FFromDCRelease      write FFromDCRelease;
  property EvtColWidth: integer       read FEvtColWidth        write FEvtColWidth;
  property DontCheck: boolean         read FDontCheck          write FDontCheck;
  property ParentComplexOrderID: string       read FParentComplexOrderID        write FParentComplexOrderID;
end;

DFM Objects


frmOrders : TfrmOrders
 ├shpPageBottom : TShape
 ├sptHorz : TSplitter
 ├pnlLeft : TPanel
 │ ├OROffsetLabel1 : TOROffsetLabel
 │ ├lblWrite : TLabel
 │ ├sptVert : TSplitter
 │ ├lstSheets : TORListBox
 │ ├lstWrite : TORListBox
 │ └btnDelayedOrder : TORAlignButton
 ├pnlRight : TPanel
 │ ├lblOrders : TOROffsetLabel
 │ ├imgHide : TImage
 │ ├hdrOrders : THeaderControl
 │ └lstOrders : TCaptionListBox
 ├amgrMain : TVA508AccessibilityManager
 ├mnuOrders : TMainMenu
 │ ├mnuView : TMenuItem
 │ │ ├mnuViewChart : TMenuItem
 │ │ │ ├mnuChartCover : TMenuItem
 │ │ │ ├mnuChartProbs : TMenuItem
 │ │ │ ├mnuChartMeds : TMenuItem
 │ │ │ ├mnuChartOrders : TMenuItem
 │ │ │ ├mnuChartNotes : TMenuItem
 │ │ │ ├mnuChartCslts : TMenuItem
 │ │ │ ├mnuChartSurgery : TMenuItem
 │ │ │ ├mnuChartDCSumm : TMenuItem
 │ │ │ ├mnuChartLabs : TMenuItem
 │ │ │ └mnuChartReports : TMenuItem
 │ │ ├mnuViewInformation : TMenuItem
 │ │ │ ├mnuViewDemo : TMenuItem
 │ │ │ ├mnuViewVisits : TMenuItem
 │ │ │ ├mnuViewPrimaryCare : TMenuItem
 │ │ │ ├mnuViewMyHealtheVet : TMenuItem
 │ │ │ ├mnuInsurance : TMenuItem
 │ │ │ ├mnuViewFlags : TMenuItem
 │ │ │ ├mnuViewRemoteData : TMenuItem
 │ │ │ ├mnuViewReminders : TMenuItem
 │ │ │ └mnuViewPostings : TMenuItem
 │ │ ├Z1 : TMenuItem
 │ │ ├mnuViewActive : TMenuItem
 │ │ ├mnuViewCurrent : TMenuItem
 │ │ ├EventRealeasedOrder1 : TMenuItem
 │ │ ├mnuViewExpiring : TMenuItem
 │ │ ├mnuViewUnsigned : TMenuItem
 │ │ ├mnuViewExpired : TMenuItem
 │ │ ├Z2 : TMenuItem
 │ │ ├mnuViewCustom : TMenuItem
 │ │ ├Z6 : TMenuItem
 │ │ ├mnuViewDfltSave : TMenuItem
 │ │ ├mnuViewDfltShow : TMenuItem
 │ │ ├Z3 : TMenuItem
 │ │ ├mnuViewDetail : TMenuItem
 │ │ ├mnuViewResult : TMenuItem
 │ │ └mnuViewResultsHistory : TMenuItem
 │ ├mnuAct : TMenuItem
 │ │ ├mnuActChange : TMenuItem
 │ │ ├mnuActCopy : TMenuItem
 │ │ ├mnuActDC : TMenuItem
 │ │ ├mnuActRel : TMenuItem
 │ │ ├mnuActChgEvnt : TMenuItem
 │ │ ├mnuActHold : TMenuItem
 │ │ ├mnuActUnhold : TMenuItem
 │ │ ├mnuActRenew : TMenuItem
 │ │ ├Z4 : TMenuItem
 │ │ ├mnuActAlert : TMenuItem
 │ │ ├mnuActComplete : TMenuItem
 │ │ ├mnuActFlag : TMenuItem
 │ │ ├mnuActUnflag : TMenuItem
 │ │ ├mnuActVerify : TMenuItem
 │ │ ├mnuActChartRev : TMenuItem
 │ │ ├Z5 : TMenuItem
 │ │ ├mnuActRelease : TMenuItem
 │ │ ├mnuActOnChart : TMenuItem
 │ │ └mnuActSign : TMenuItem
 │ └mnuOpt : TMenuItem
 │   ├mnuOptSaveQuick : TMenuItem
 │   └mnuOptEditCommon : TMenuItem
 └popOrder : TPopupMenu
   ├popOrderDetail : TMenuItem
   ├popOrderResult : TMenuItem
   ├popResultsHistory : TMenuItem
   ├N1 : TMenuItem
   ├popOrderChange : TMenuItem
   ├popOrderRel : TMenuItem
   ├mnuChgEvnt : TMenuItem
   ├popOrderCopy : TMenuItem
   ├popOrderDC : TMenuItem
   ├popOrderRenew : TMenuItem
   ├sepOrderVerify : TMenuItem
   ├popOrderVerify : TMenuItem
   ├popOrderChartRev : TMenuItem
   ├popOrderSign : TMenuItem
   └mnuOptimizeFields : TMenuItem

Class Hierarchy


Class Fields

Name Type Scope Comments
btnDelayedOrder Simple (unknown) Public/Published -
EventRealeasedOrder1 TMenuItem Public/Published -
FAskForCancel Boolean Private -
FCalledFromWDO Boolean Private Called from Write Delay Orders button
FCompress Boolean Private -
FCurrentView TOrderView Private -
FDfltSort Integer Private -
FDontCheck Boolean Private -
FEventDefaultOrder UnicodeString Private -
FEventForCopyActiveOrders Private -
FEvtColWidth Integer Private -
FEvtOrderList TStringList Private -
FFromDCRelease Boolean Private -
FHighContrast2Mode Boolean Private -
FHighlightFromMedsTab Integer Private -
FIsDefaultDlg Boolean Private -
FNeedShowModal Boolean Private -
FNewEvent Boolean Private -
FOrderViewForActiveOrders TOrderView Private -
FParentComplexOrderID UnicodeString Private -
FRightAfterWriteOrderBox Boolean Private -
FSendDelayOrders Boolean Private -
hdrOrders Simple (unknown) Public/Published -
imgHide Simple (unknown) Public/Published -
lblOrders Simple (unknown) Public/Published -
lblWrite TLabel Public/Published -
lstOrders Simple (unknown) Public/Published -
lstSheets Simple (unknown) Public/Published -
lstWrite Simple (unknown) Public/Published -
mnuAct TMenuItem Public/Published -
mnuActAlert TMenuItem Public/Published -
mnuActChange TMenuItem Public/Published -
mnuActChartRev TMenuItem Public/Published -
mnuActChgEvnt TMenuItem Public/Published -
mnuActComplete TMenuItem Public/Published -
mnuActCopy TMenuItem Public/Published -
mnuActDC TMenuItem Public/Published -
mnuActFlag TMenuItem Public/Published -
mnuActHold TMenuItem Public/Published -
mnuActOnChart TMenuItem Public/Published -
mnuActRel TMenuItem Public/Published -
mnuActRelease TMenuItem Public/Published -
mnuActRenew TMenuItem Public/Published -
mnuActSign TMenuItem Public/Published -
mnuActUnflag TMenuItem Public/Published -
mnuActUnhold TMenuItem Public/Published -
mnuActVerify TMenuItem Public/Published -
mnuChartCover TMenuItem Public/Published -
mnuChartCslts TMenuItem Public/Published -
mnuChartDCSumm TMenuItem Public/Published -
mnuChartLabs TMenuItem Public/Published -
mnuChartMeds TMenuItem Public/Published -
mnuChartNotes TMenuItem Public/Published -
mnuChartOrders TMenuItem Public/Published -
mnuChartProbs TMenuItem Public/Published -
mnuChartReports TMenuItem Public/Published -
mnuChartSurgery TMenuItem Public/Published -
mnuChgEvnt TMenuItem Public/Published -
mnuInsurance TMenuItem Public/Published -
mnuOpt TMenuItem Public/Published -
mnuOptEditCommon TMenuItem Public/Published -
mnuOptimizeFields TMenuItem Public/Published -
mnuOptSaveQuick TMenuItem Public/Published -
mnuOrders Simple (unknown) Public/Published -
mnuView TMenuItem Public/Published -
mnuViewActive TMenuItem Public/Published -
mnuViewChart TMenuItem Public/Published -
mnuViewCurrent TMenuItem Public/Published -
mnuViewCustom TMenuItem Public/Published -
mnuViewDemo TMenuItem Public/Published -
mnuViewDetail TMenuItem Public/Published -
mnuViewDfltSave TMenuItem Public/Published -
mnuViewDfltShow TMenuItem Public/Published -
mnuViewExpired TMenuItem Public/Published -
mnuViewExpiring TMenuItem Public/Published -
mnuViewFlags TMenuItem Public/Published -
mnuViewInformation TMenuItem Public/Published -
mnuViewMyHealtheVet TMenuItem Public/Published -
mnuViewPostings TMenuItem Public/Published -
mnuViewPrimaryCare TMenuItem Public/Published -
mnuViewReminders TMenuItem Public/Published -
mnuViewRemoteData TMenuItem Public/Published -
mnuViewResult TMenuItem Public/Published -
mnuViewResultsHistory TMenuItem Public/Published -
mnuViewUnsigned TMenuItem Public/Published -
mnuViewVisits TMenuItem Public/Published -
N1 TMenuItem Public/Published -
OrderListClickProcessing Boolean Private Private declarations
OROffsetLabel1 Simple (unknown) Public/Published -
popOrder TPopupMenu Public/Published -
popOrderChange TMenuItem Public/Published -
popOrderChartRev TMenuItem Public/Published -
popOrderCopy TMenuItem Public/Published -
popOrderDC TMenuItem Public/Published -
popOrderDetail TMenuItem Public/Published -
popOrderRel TMenuItem Public/Published -
popOrderRenew TMenuItem Public/Published -
popOrderResult TMenuItem Public/Published -
popOrderSign TMenuItem Public/Published -
popOrderVerify TMenuItem Public/Published -
popResultsHistory TMenuItem Public/Published -
sepOrderVerify TMenuItem Public/Published -
sptVert TSplitter Public/Published -
Z1 TMenuItem Public/Published -
Z2 TMenuItem Public/Published -
Z3 TMenuItem Public/Published -
Z4 TMenuItem Public/Published -
Z5 TMenuItem Public/Published -
Z6 TMenuItem Public/Published -

Properties

Name Type Scope Comments
AskForCancel Boolean Public -
CalledFromWDO Boolean Public -
DontCheck Boolean Public -
EventDefaultOrder UnicodeString Public -
EvtColWidth Integer Public -
EvtOrderList TStringList Public -
FromDCRelease Boolean Public -
HighlightFromMedsTab Integer Public -
IsDefaultDlg Boolean Public -
NeedShowModal Boolean Public -
NewEvent Boolean Public -
ParentComplexOrderID UnicodeString Public -
SendDelayOrders Boolean Public -
TheCurrentView TOrderView Public -

Methods

Name Declaration Scope Comments
ActivateDeactiveRenew procedure ActivateDeactiveRenew; Private -
AddToListBox procedure AddToListBox(AnOrderList: TList); Private -
AllowContextChange function AllowContextChange(var WhyNot: string): Boolean; override; Public TPage common methods ---------------------------------------------------------------------
btnDelayedOrderClick procedure btnDelayedOrderClick(Sender: TObject); Public/Published -
CanChangeOrderView function CanChangeOrderView: Boolean; Private Disallows changing view while doing delayed release orders.
ChangesUpdate procedure ChangesUpdate(APtEvtID: string); Public -
CheckOrderStatus function CheckOrderStatus: boolean; Private
Function TfrmOrders.PatientStatusChanged: boolean;
const

  msgTxt1 = 'Patient status was changed from ';
  msgTxt2 = 'CPRS needs to refresh patient information to display patient latest record.';
   //GE CQ9537  - Change message text
  msgTxt3 = 'Patient has been admitted. ';
  msgTxt4 = CRLF + 'You will be prompted to sign your orders.  Any new orders subsequently' +
            CRLF +'entered and signed will be directed to the inpatient staff.';
var
  PtSelect: TPtSelect;
  IsInpatientNow: boolean;
  ptSts: string;
begin
  result := False;
  SelectPatient(Patient.DFN, PtSelect);
  IsInpatientNow := Length(PtSelect.Location) > 0;
  if Patient.Inpatient <> IsInpatientNow then
  begin
    if (not Patient.Inpatient) then   //GE CQ9537  - Change message text
       MessageDlg(msgTxt3 + msgTxt4, mtWarning, [mbOK], 0)
    else
       begin
          if Patient.Inpatient then ptSts := 'Inpatient to Outpatient.';
          MessageDlg(msgTxt1 + ptSts + #13#10#13 + msgTxt2, mtWarning, [mbOK], 0);
       end;
    frmFrame.mnuFileRefreshClick(Application);
    Result := True;
  end;
end;
ClearOrderSheets procedure ClearOrderSheets; Private
LstSheets events ------------------------------------------------------------------------- 

 delete all order sheets & associated TOrderView objects, set current view to nil
ClearPtData procedure ClearPtData; override; Public -
ClickLstSheet procedure ClickLstSheet; Public -
CompressEventSection procedure CompressEventSection; Private -
DfltViewForEvtDelay procedure DfltViewForEvtDelay; Private -
DisplayDefaultDlgList function DisplayDefaultDlgList(ADest: TORListBox; ADlgList: TStringList): boolean; Private -
DisplayPage procedure DisplayPage; override; Public -
EventRealeasedOrder1Click procedure EventRealeasedOrder1Click(Sender: TObject); Public/Published -
ExpandEventSection procedure ExpandEventSection; Private -
FormCreate procedure FormCreate(Sender: TObject); Public/Published Form events ------------------------------------------------------------------------------
FormDestroy procedure FormDestroy(Sender: TObject); Public/Published -
FormShow procedure FormShow(Sender: TObject); Public/Published -
GetEvtIFN function GetEvtIFN(AnIndex: integer): string; Private -
GetOrderText function GetOrderText(AnOrder: TOrder; Index: integer; Column: integer): string; Private -
GetPlainText function GetPlainText(AnOrder: TOrder; index: integer):string; Private -
GetStartStopText function GetStartStopText(StartTime: string; StopTime: string): string; Private -
getTotalSectionsWidth function getTotalSectionsWidth : integer; Public CQ6170
GroupChangesUpdate procedure GroupChangesUpdate(GrpName: string); Public -
hdrOrdersMouseDown procedure hdrOrdersMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); Public/Published -
hdrOrdersMouseUp procedure hdrOrdersMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); Public/Published -
hdrOrdersSectionClick procedure hdrOrdersSectionClick(HeaderControl: THeaderControl; Section: THeaderSection); Public/Published -
hdrOrdersSectionResize procedure hdrOrdersSectionResize(HeaderControl: THeaderControl; Section: THeaderSection); Public/Published -
InitOrderSheets procedure InitOrderSheets; Private Sets up list of order sheets based on what orders are on the server in delayed status for pt
InitOrderSheets2 procedure InitOrderSheets2(AnItem: string = ''); Public -
InitOrderSheetsForEvtDelay procedure InitOrderSheetsForEvtDelay; Public
Procedure TfrmOrders.SetEvtIFN(var AnEvtIFN: integer);
var
  APtEvntID,AnEvtInfo: string;
begin
  if lstSheets.ItemIndex < 0 then
    APtEvntID := Piece(lstSheets.Items[0],'^',1)
  else
    APtEvntID := Piece(lstSheets.Items[lstSheets.ItemIndex],'^',1);
  if CharAt(APtEvntID,1) <> 'C' then
  begin
    if Pos('EVT',APtEvntID)>0 then
      AnEvtIFN  := StrToIntDef(Piece(APtEvntID,';',1),0)
    else
    begin
      AnEvtInfo := EventInfo(APtEvntID);
      AnEvtIFN  := StrToIntDef(Piece(AnEvtInfo,'^',2),0);
    end;
  end else
    AnEvtIFN := 0;
end;
lblWriteMouseMove procedure lblWriteMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); Public/Published -
lstOrdersDblClick procedure lstOrdersDblClick(Sender: TObject); Public/Published -
lstOrdersDrawItem procedure lstOrdersDrawItem(Control: TWinControl; Index: Integer; TheRect: TRect; State: TOwnerDrawState); Public/Published -
lstOrdersMeasureItem procedure lstOrdersMeasureItem(Control: TWinControl; Index: Integer; var AHeight: Integer); Public/Published -
lstSheetsClick procedure lstSheetsClick(Sender: TObject); Public/Published -
lstWriteClick procedure lstWriteClick(Sender: TObject); Public/Published
Writing Orders 

 ItemID = DlgIEN;FormID;DGroup;DlgType
MakeSelectedList procedure MakeSelectedList(AList: TList); Private Make a list of selected orders
MeasureColumnHeight function MeasureColumnHeight(AnOrder: TOrder; Index: Integer; Column: integer):integer; Private -
mnuActAlertClick procedure mnuActAlertClick(Sender: TObject); Public/Published Set selected orders to send alerts when results are available, - no new orders created
mnuActChangeClick procedure mnuActChangeClick(Sender: TObject); Public/Published Loop thru selected orders, present ordering dialog for each with defaults to selected order
mnuActChartRevClick procedure mnuActChartRevClick(Sender: TObject); Public/Published -
mnuActChgEvntClick procedure mnuActChgEvntClick(Sender: TObject); Public/Published -
mnuActClick procedure mnuActClick(Sender: TObject); Public/Published -
mnuActCommentClick procedure mnuActCommentClick(Sender: TObject); Public/Published Loop thru selected orders, allowing ward comments to be edited for each
mnuActCompleteClick procedure mnuActCompleteClick(Sender: TObject); Public/Published Complete generic orders, no signature required - no new orders created
mnuActCopyClick procedure mnuActCopyClick(Sender: TObject); Public/Published Loop thru selected orders, present ordering dialog for each with defaults to selected order
mnuActDCClick procedure mnuActDCClick(Sender: TObject); Public/Published Discontinue/cancel/delete the selected orders (as appropriate for each order
mnuActFlagClick procedure mnuActFlagClick(Sender: TObject); Public/Published -
mnuActHoldClick procedure mnuActHoldClick(Sender: TObject); Public/Published Place the selected orders on hold, creates new orders
mnuActOnChartClick procedure mnuActOnChartClick(Sender: TObject); Public/Published Mark orders orders as signed on chart, release to services, do appropriate prints
mnuActRelClick procedure mnuActRelClick(Sender: TObject); Public/Published -
mnuActReleaseClick procedure mnuActReleaseClick(Sender: TObject); Public/Published Release orders to services without a signature, do appropriate prints
mnuActRenewClick procedure mnuActRenewClick(Sender: TObject); Public/Published Renew the selected orders (as appropriate for each order
mnuActSignClick procedure mnuActSignClick(Sender: TObject); Public/Published Obtain signature for orders, release them to services, do appropriate prints
mnuActUnflagClick procedure mnuActUnflagClick(Sender: TObject); Public/Published -
mnuActUnholdClick procedure mnuActUnholdClick(Sender: TObject); Public/Published Release orders from hold, no signature required - no new orders created
mnuActVerifyClick procedure mnuActVerifyClick(Sender: TObject); Public/Published Verify orders, signature required but no new orders created
mnuChartTabClick procedure mnuChartTabClick(Sender: TObject); Public/Published -
mnuOptClick procedure mnuOptClick(Sender: TObject); Public/Published -
mnuOptEditCommonClick procedure mnuOptEditCommonClick(Sender: TObject); Public/Published -
mnuOptimizeFieldsClick procedure mnuOptimizeFieldsClick(Sender: TObject); Public/Published -
mnuOptSaveQuickClick procedure mnuOptSaveQuickClick(Sender: TObject); Public/Published -
mnuViewActiveClick procedure mnuViewActiveClick(Sender: TObject); Public/Published -
mnuViewClick procedure mnuViewClick(Sender: TObject); Public/Published -
mnuViewCurrentClick procedure mnuViewCurrentClick(Sender: TObject); Public/Published -
mnuViewCustomClick procedure mnuViewCustomClick(Sender: TObject); Public/Published -
mnuViewDetailClick procedure mnuViewDetailClick(Sender: TObject); Public/Published -
mnuViewDfltSaveClick procedure mnuViewDfltSaveClick(Sender: TObject); Public/Published -
mnuViewDfltShowClick procedure mnuViewDfltShowClick(Sender: TObject); Public/Published -
mnuViewExpiredClick procedure mnuViewExpiredClick(Sender: TObject); Public/Published -
mnuViewExpiringClick procedure mnuViewExpiringClick(Sender: TObject); Public/Published -
mnuViewInformationClick procedure mnuViewInformationClick(Sender: TObject); Public/Published -
mnuViewResultClick procedure mnuViewResultClick(Sender: TObject); Public/Published -
mnuViewResultsHistoryClick procedure mnuViewResultsHistoryClick(Sender: TObject); Public/Published -
mnuViewUnsignedClick procedure mnuViewUnsignedClick(Sender: TObject); Public/Published -
NoneSelected function NoneSelected(const ErrMsg: string): Boolean; Private -
NotifyOrder procedure NotifyOrder(OrderAction: Integer; AnOrder: TOrder); override; Public -
PlaceOrderForDefaultDialog function PlaceOrderForDefaultDialog(ADlgInfo: string; IsDefaultDialog: boolean; AEvent: TOrderDelayEvent): boolean; Public ADlgInfo = DlgIEN;FormID;DGroup;DlgType
pnlRightResize procedure pnlRightResize(Sender: TObject); Public/Published -
popOrderPopup procedure popOrderPopup(Sender: TObject); Public/Published -
PositionTopOrder procedure PositionTopOrder(DGroup: Integer); Private View menu events -------------------------------------------------------------------------
ProcessNotifications procedure ProcessNotifications; Private -
PtEvtCompleted function PtEvtCompleted(APtEvtID: integer; APtEvtName: string; FromMeds: boolean = False; Signing: boolean = False): boolean; Public -
RedrawOrderList procedure RedrawOrderList; Private Redraws the Orders list, compensates for changes in item height by re-adding everything
RefreshOrderList procedure RefreshOrderList(FromServer: Boolean; APtEvtID: string = ''); Private -
RefreshToFirstItem procedure RefreshToFirstItem; Public -
RemoveSelectedFromChanges procedure RemoveSelectedFromChanges(AList: TList); Private Remove from Changes orders that were signed or released
RequestPrint procedure RequestPrint; override; Public Obtain print devices for selected orders, do appropriate prints
ResetOrderPage procedure ResetOrderPage(AnEvent: TOrderDelayEvent; ADlgLst: TStringList; IsRealeaseNow: boolean); Public -
RetrieveVisibleOrders procedure RetrieveVisibleOrders(AnIndex: Integer); Private LstOrders events -------------------------------------------------------------------------
RightClickMessageHandler procedure RightClickMessageHandler(var Msg: TMessage; var Handled: Boolean); Private -
SaveSignOrders procedure SaveSignOrders; Public -
SetFontSize procedure SetFontSize( FontSize: integer); override; Public -
SetOrderView procedure SetOrderView(AFilter, ADGroup: Integer; const AViewName: string; NotifSort: Boolean); Private Sets up a 'canned' order view, assumes the date range is never restricted
setSectionWidths procedure setSectionWidths; Public CQ6170
sptHorzMoved procedure sptHorzMoved(Sender: TObject); Public/Published -
sptVertMoved procedure sptVertMoved(Sender: TObject); Public/Published -
SynchListToOrders procedure SynchListToOrders; Private Make sure lstOrders now reflects the current state of orders
UMDestroy procedure UMDestroy(var Message: TMessage); message UM_DESTROY; Private Sent by ordering dialog when it is closing
UMEventOccur procedure UMEventOccur(var Message: TMessage); message UM_EVENTOCCUR; Private Function PatientStatusChanged: boolean;
UseDefaultSort procedure UseDefaultSort; Private Procedure SetEvtIFN(var AnEvtIFN: integer);
ValidateSelected procedure ValidateSelected(const AnAction, WarningMsg, WarningTitle: string); Private
Action menu events ----------------------------------------------------------------------- 

 loop to validate action on each selected order, deselect if not valid
ViewAlertedOrders procedure ViewAlertedOrders(OrderIEN: string; Status: integer; DispGrp: string; BySvc, InvDate: boolean; Title: string); Private -
ViewInfo procedure ViewInfo(Sender: TObject); Public/Published -

Referenced By (3)

Module (line) Referrer Type
fFrame (3383) - Read
fOrders (262) frmOrders Read
fOrders (3489) - Read