Procedure

PrintOrdersOnSignRelease

Module

uOrders

Last Modified

7/15/2014 3:26:42 PM

Scope

Interfaced

Declaration

procedure PrintOrdersOnSignRelease(OrderList: TStringList; Nature: Char; PrintLoc : Integer =0; PrintName: string = '');

Calls Hierarchy


PrintOrdersOnSignRelease
 ├CurrentLocationForPatient
 ├TEncounter.SetLocation
 ├CommonLocationForOrders
 ├LookupLocation
 │ └TfrmBase508Form.Create
 │   ├TfrmBase508Form.UpdateAccessibilityActions
 │   ├UnfocusableControlEnter
 │   └AdjustControls
 │     ├TfrmBase508Form.ModifyUnfocusableControl
 │     └..(rec)..
 ├TfrmFrame.DisplayEncounterText
 │ ├TEncounter.GetLocationText
 │ │ └TEncounter.UpdateText
 │ │   └GetEncounterText
 │ ├TEncounter.GetProviderName
 │ │ └TEncounter.UpdateText...
 │ └TfrmFrame.FitToolbar
 ├SetupOrdersPrint
 │ ├TfrmBase508Form.Create...
 │ ├OrderPrintDeviceInfo
 │ └TfrmOrdersPrint.SetupControls
 │   └TfrmOrdersPrint.SetupPrompting
 ├PrintOrdersOnReview
 └PrintServiceCopies

Called-By Hierarchy


                                          PrintOrdersOnSignRelease
                                    PrintOrdersOnSignReleaseMult┤ 
                                             ExecuteSignOrders┤ │ 
                                  TfrmOrders.mnuActSignClick┘ │ │ 
                                         TfrmReview.cmdOKClick┘ │ 
                                               ReviewChanges┘   │ 
                           TfrmFrame.AllowContextChangeAll┤     │ 
                                TfrmFrame.FormCloseQuery┤ │     │ 
                              TfrmFrame.mnuFileNextClick┤ │     │ 
                            TfrmFrame.mnuFileOpenClick┤ │ │     │ 
                                TfrmFrame.UMInitiate┤ │ │ │     │ 
                       TfrmFrame.mnuFileNextClick...┤ │ │ │     │ 
                       TfrmFrame.mnuFileRefreshClick┤ │ │ │     │ 
                       TfrmOrders.CheckOrderStatus┤ │ │ │ │     │ 
                   TfrmOrders.mnuActChgEvntClick┤ │ │ │ │ │     │ 
                      TfrmOrders.mnuActHoldClick┤ │ │ │ │ │     │ 
                    TfrmOrders.mnuActUnholdClick┤ │ │ │ │ │     │ 
                     TfrmOrders.mnuActRenewClick┤ │ │ │ │ │     │ 
                    TfrmOrders.mnuActChangeClick┤ │ │ │ │ │     │ 
                      TfrmOrders.mnuActCopyClick┘ │ │ │ │ │     │ 
                            TfrmMeds.mnuActDCClick┤ │ │ │ │     │ 
                           TfrmMeds.CheckMedStatus┘ │ │ │ │     │ 
                        TfrmMeds.mnuActHoldClick┤   │ │ │ │     │ 
                       TfrmMeds.mnuActRenewClick┤   │ │ │ │     │ 
                      TfrmMeds.mnuActUnholdClick┤   │ │ │ │     │ 
                      TfrmMeds.mnuActChangeClick┤   │ │ │ │     │ 
                        TfrmMeds.mnuActCopyClick┤   │ │ │ │     │ 
                      TfrmMeds.mnuActRefillClick┘   │ │ │ │     │ 
                                  TfrmFrame.ViewInfo┘ │ │ │     │ 
                               TfrmDCSumm.ViewInfo┤   │ │ │     │ 
                             TfrmConsults.ViewInfo┤   │ │ │     │ 
                     TfrmFrame.pnlRemindersMouseUp┤   │ │ │     │ 
                      TfrmFrame.RemindersChanged┘ │   │ │ │     │ 
                          TfrmFrame.FormCreate┘   │   │ │ │     │ 
                            TfrmFrame.pnlCIRNClick┤   │ │ │     │ 
                      TfrmFrame.pnlVistaWebClick┤ │   │ │ │     │ 
                           TfrmFrame.FormKeyDown┘ │   │ │ │     │ 
                         TfrmFrame.pnlPatientClick┤   │ │ │     │ 
                           TfrmFrame.pnlVisitClick┤   │ │ │     │ 
                     TfrmFrame.pnlPrimaryCareClick┤   │ │ │     │ 
                       TfrmFrame.pnlRemindersClick┤   │ │ │     │ 
                        TfrmFrame.pnlPostingsClick┤   │ │ │     │ 
                            TfrmFrame.pnlFlagClick┤   │ │ │     │ 
                              TfrmFrame.laMHVClick┤   │ │ │     │ 
                             TfrmFrame.laVAA2Click┤   │ │ │     │ 
                               TfrmOrders.ViewInfo┤   │ │ │     │ 
                                 TfrmMeds.ViewInfo┤   │ │ │     │ 
                              TfrmSurgery.ViewInfo┤   │ │ │     │ 
                                TfrmNotes.ViewInfo┤   │ │ │     │ 
                             TfrmProblems.ViewInfo┘   │ │ │     │ 
                     TfrmFrame.mnuFileNotifRemoveClick┤ │ │     │ 
                             TfrmFrame.NextButtonClick┘ │ │     │ 
                           TfrmFrame.SetUpNextButton┘   │ │     │ 
                     TfrmFrame.mnuFileOpenClick...┤     │ │     │ 
                              TfrmFrame.FormResize┘     │ │     │ 
                            TfrmFrame.ChangeFont┘       │ │     │ 
                    TfrmFrame.LoadSizesForUser┤         │ │     │ 
               TfrmFrame.LoadUserPreferences┘ │         │ │     │ 
                      TfrmFrame.UMInitiate┘   │         │ │     │ 
                    TfrmFrame.mnuFontSizeClick┘         │ │     │ 
                           TfrmFrame.mnuFileOpenClick...┤ │     │ 
                           TfrmFrame.ctxContextorPending┤ │     │ 
                          TfrmFrame.StartCCOWContextor┘ │ │     │ 
                                TfrmFrame.FormCreate┘   │ │     │ 
                         TfrmFrame.ctxContextorCommitted┤ │     │ 
                       TfrmFrame.StartCCOWContextor...┘ │ │     │ 
                  TfrmFrame.mnuFileResumeContextGetClick┤ │     │ 
                  TfrmFrame.mnuFileResumeContextSetClick┘ │     │ 
                                  TfrmFrame.FormCloseQuery┤     │ 
                              TfrmFrame.mnuFileReviewClick┤     │ 
                                           UpdateEncounter┘     │ 
                         TfrmFrame.mnuFileEncounterClick┤       │ 
                                 TfrmFrame.ViewInfo...┤ │       │ 
                    TfrmODMedIV.SetValuesFromResponses┤ │       │ 
                             TfrmODMedIV.SetupDialog┤ │ │       │ 
                   TfrmODMedIV.cboSolutionMouseClick┘ │ │       │ 
                       TfrmODMedIV.cboSolutionExit┘   │ │       │ 
                  TfrmODMedIV.cboSolutionMouseClick...┤ │       │ 
                     TfrmODMedIV.cboAdditiveMouseClick┤ │       │ 
                         TfrmODMedIV.cboAdditiveExit┘ │ │       │ 
                                TfrmODAuto.SetupDialog┤ │       │ 
                                   ActivateOrderDialog┤ │       │ 
                           TfrmRemDlg.btnFinishClick┤ │ │       │ 
           TfrmConsults.mnuActNewConsultRequestClick┤ │ │       │ 
                   TfrmConsults.cmdNewConsultClick┘ │ │ │       │ 
                TfrmConsults.mnuActNewProcedureClick┤ │ │       │ 
                      TfrmConsults.cmdNewProcClick┘ │ │ │       │ 
                                        ChangeOrders┤ │ │       │ 
                      TfrmOrders.mnuActChangeClick┤ │ │ │       │ 
                        TfrmMeds.mnuActChangeClick┘ │ │ │       │ 
                                     ChangeOrdersEvt┤ │ │       │ 
                                          CopyOrders┤ │ │       │ 
                        TfrmOrders.mnuActCopyClick┤ │ │ │       │ 
                          TfrmMeds.mnuActCopyClick┤ │ │ │       │ 
                           TfrmODActive.btnOKClick┘ │ │ │       │ 
                                      TransferOrders┤ │ │       │ 
                        TfrmOrders.mnuActCopyClick┤ │ │ │       │ 
                          TfrmMeds.mnuActCopyClick┤ │ │ │       │ 
                           TfrmODActive.btnOKClick┘ │ │ │       │ 
                            TfrmOrders.lstWriteClick┤ │ │       │ 
               TfrmOrders.PlaceOrderForDefaultDialog┤ │ │       │ 
                  TfrmOrders.DisplayDefaultDlgList┤ │ │ │       │ 
                       TfrmOrders.ResetOrderPage┘ │ │ │ │       │ 
               TfrmOrders.btnDelayedOrderClick┘   │ │ │ │       │ 
                                 DisplayEvntDialog┤ │ │ │       │ 
                             SetDelayEventForMed┘ │ │ │ │       │ 
                      TfrmMeds.mnuActCopyClick┘   │ │ │ │       │ 
                                 DisplayEvntDialog┤ │ │ │       │ 
                                  SetViewForCopy┘ │ │ │ │       │ 
                    TfrmOrders.mnuActCopyClick┘   │ │ │ │       │ 
                                 DisplayEvntDialog┘ │ │ │       │ 
                                ExecuteChangeEvt┘   │ │ │       │ 
                 TfrmOrders.mnuActChgEvntClick┘     │ │ │       │ 
                             TfrmMeds.mnuActNewClick┤ │ │       │ 
                           TfrmOMNavA.ActivateDialog┤ │ │       │ 
                         TfrmOMNavA.grdMenuKeyDown┤ │ │ │       │ 
                         TfrmOMNavA.grdMenuMouseUp┘ │ │ │       │ 
                                TfrmOMSet.DoNextItem┘ │ │       │ 
                              TfrmOMSet.InsertList┤   │ │       │ 
                               ActivateOrderList┘ │   │ │       │ 
                     TfrmRemDlg.btnFinishClick┤   │   │ │       │ 
                             ActivateOrderHTML┤   │   │ │       │ 
                    TfrmOrders.lstWriteClick┤ │   │   │ │       │ 
    TfrmOrders.PlaceOrderForDefaultDialog...┘ │   │   │ │       │ 
                              ActivateOrderSet┤   │   │ │       │ 
                   TfrmRemDlg.btnFinishClick┤ │   │   │ │       │ 
TfrmConsults.mnuActNewConsultRequestClick...┤ │   │   │ │       │ 
     TfrmConsults.mnuActNewProcedureClick...┤ │   │   │ │       │ 
                    TfrmOrders.lstWriteClick┤ │   │   │ │       │ 
    TfrmOrders.PlaceOrderForDefaultDialog...┤ │   │   │ │       │ 
                     TfrmMeds.mnuActNewClick┤ │   │   │ │       │ 
                TfrmOMNavA.ActivateDialog...┤ │   │   │ │       │ 
                     TfrmOMSet.DoNextItem...┘ │   │   │ │       │ 
                       TfrmOMNavA.DoSelectList┘   │   │ │       │ 
                     TfrmOMNavA.grdMenuKeyUp┤     │   │ │       │ 
                   TfrmOMNavA.grdMenuMouseUp┘     │   │ │       │ 
                                        SkipToNext┤   │ │       │ 
                         TfrmOMSet.DoNextItem...┘ │   │ │       │ 
                            TfrmOMSet.UMDelayEvent┘   │ │       │ 
                               TfrmOMSet.InsertList...┤ │       │ 
                                TfrmODMeds.SetupDialog┤ │       │ 
                             TfrmODMeds.btnSelectClick┤ │       │ 
                             TfrmODMeds.UMDelayClick┘ │ │       │ 
                                    ExecuteRenewOrders┘ │       │ 
                         TfrmOrders.mnuActRenewClick┤   │       │ 
                           TfrmMeds.mnuActRenewClick┘   │       │ 
                                        EncounterPresent┤       │ 
                                      ReadyForNewOrder┤ │       │ 
                           TfrmRemDlg.btnFinishClick┤ │ │       │ 
        TfrmConsults.mnuActNewConsultRequestClick...┤ │ │       │ 
             TfrmConsults.mnuActNewProcedureClick...┤ │ │       │ 
                                     ChangeOrders...┤ │ │       │ 
                                     ChangeOrdersEvt┤ │ │       │ 
                                       CopyOrders...┤ │ │       │ 
                                   TransferOrders...┤ │ │       │ 
                            TfrmOrders.lstWriteClick┤ │ │       │ 
                             TfrmMeds.mnuActNewClick┘ │ │       │ 
                                     ReadyForNewOrder1┤ │       │ 
            TfrmOrders.PlaceOrderForDefaultDialog...┘ │ │       │ 
                              TfrmOrders.mnuActDCClick┤ │       │ 
                             TfrmOrders.mnuActRelClick┤ │       │ 
                            TfrmOrders.mnuActHoldClick┤ │       │ 
                          TfrmOrders.mnuActUnholdClick┤ │       │ 
                           TfrmOrders.mnuActRenewClick┤ │       │ 
                         TfrmOrders.mnuActReleaseClick┤ │       │ 
                         TfrmOrders.mnuActOnChartClick┤ │       │ 
                            TfrmOrders.mnuActSignClick┤ │       │ 
                                TfrmMeds.mnuActDCClick┤ │       │ 
                              TfrmMeds.mnuActHoldClick┤ │       │ 
                             TfrmMeds.mnuActRenewClick┤ │       │ 
                            TfrmMeds.mnuActUnholdClick┤ │       │ 
                              TfrmMeds.mnuActCopyClick┤ │       │ 
                            TfrmMeds.mnuActRefillClick┘ │       │ 
                                     EncounterPresentEDO┤       │ 
                                   ReadyForNewOrder...┤ │       │ 
                         TfrmOrders.mnuActChgEvntClick┤ │       │ 
                          TfrmOrders.mnuActChangeClick┤ │       │ 
                            TfrmOrders.mnuActCopyClick┤ │       │ 
                       TfrmOrders.btnDelayedOrderClick┤ │       │ 
                            TfrmMeds.mnuActChangeClick┤ │       │ 
                              TfrmMeds.mnuActCopyClick┘ │       │ 
                                             UpdateVisit┤       │ 
                                           EditPCEData┤ │       │ 
                             TfrmSurgery.cmdPCEClick┤ │ │       │ 
                                 UpdateEncounterInfo┘ │ │       │ 
                             TfrmNotes.cmdPCEClick┘   │ │       │ 
                        TfrmVitals.btnEnterVitalsClick┘ │       │ 
                                             UpdateVisit┤       │ 
                                        EncounterPresent┘       │ 
                         TfrmProblems.lstProbActsClick┘         │ 
                     TfrmProblems.wgProbDataDblClick┤           │ 
                           TfrmProblems.lstViewClick┘           │ 
                   TfrmProblems.HighlightDuplicate┘             │ 
                         TfrmProblems.AddProblem┤               │ 
              TfrmProblems.lstProbActsClick...┤ │               │ 
                 TfrmProblems.lstProbPickClick┤ │               │ 
              TfrmProblems.lstProbPickDblClick┤ │               │ 
              TfrmProblems.edProbEntKeyPress┘ │ │               │ 
                      TfrmProblems.UMPLLexicon┘ │               │ 
                   TfrmdlgProb.bbChangeProbClick┘               │ 
                                            ExecuteReleaseOrders┤ 
                                 TfrmOrders.mnuActReleaseClick┘ │ 
                                            ExecuteOnChartOrders┤ 
                                 TfrmOrders.mnuActOnChartClick┘ │ 
                                       ExecuteReleaseEventOrders┤ 
                                     TfrmOrders.mnuActRelClick┘ │ 
                                            ExecuteSignOrders...┤ 
                                        TfrmReview.cmdOKClick...┘ 

Calls

Name Declaration Comments
CommonLocationForOrders function CommonLocationForOrders(OrderList: TStringList): Integer; -
CurrentLocationForPatient procedure CurrentLocationForPatient(const DFN: string; var ALocation: Integer; var AName: string; var ASvc: string); -
TfrmFrame.DisplayEncounterText procedure DisplayEncounterText; -
LookupLocation procedure LookupLocation(var IEN: Integer; var AName: string; const AType: integer; const HelpInfo: string); -
PrintOrdersOnReview procedure PrintOrdersOnReview(OrderList: TStringList; const DeviceInfo: string; PrintLoc: Integer = 0); {*KCM*} -
PrintServiceCopies procedure PrintServiceCopies(OrderList: TStringList; PrintLoc: Integer = 0); {*REV*} -
TEncounter.SetLocation procedure SetLocation(Value: Integer); -
SetupOrdersPrint procedure SetupOrdersPrint(OrderList: TStringList; var DeviceInfo: string; Nature: Char; SelectAll: Boolean; var PrintIt: Boolean; PrintTitle: string = ''; PrintLoc: Integer = 0); -

Called-By

Name Declaration Comments
TfrmReview.cmdOKClick procedure cmdOKClick(Sender: TObject); -
ExecuteOnChartOrders function ExecuteOnChartOrders(SelectedList: TList): Boolean; -
ExecuteReleaseEventOrders function ExecuteReleaseEventOrders(AnOrderList: TList): boolean; -
ExecuteReleaseOrders function ExecuteReleaseOrders(SelectedList: TList): Boolean; -
ExecuteSignOrders {Forward} function ExecuteSignOrders(SelectedList: TList): Boolean; -
PrintOrdersOnSignReleaseMult procedure PrintOrdersOnSignReleaseMult(OrderList, ClinicLst, WardLst: TStringList; Nature: Char; EncLoc, WardLoc: integer; EncLocName, WardLocName: string); -


Source

2032  procedure PrintOrdersOnSignRelease(OrderList: TStringList; Nature: Char; PrintLoc : Integer =0; PrintName: string = '');
2033  const
2034    TX_NEW_LOC1   = 'The patient''s location has changed to ';
2035    TX_NEW_LOC2   = '.' + CRLF + 'Should the orders be printed using the new location?';
2036    TC_NEW_LOC    = 'New Patient Location';
2037    TX_SIGN_LOC   = 'No location was selected.  Orders could not be printed!';
2038    TC_REQ_LOC    = 'Orders Not Printed';
2039    TX_LOC_PRINT  = 'The selected location will be used to determine where orders are printed.';
2040  var
2041    ALocation: Integer;
2042    AName, ASvc, DeviceInfo: string;
2043    PrintIt: Boolean;
2044  begin
2045    if PrintLoc = 0 then
2046      begin
2047        CurrentLocationForPatient(Patient.DFN, ALocation, AName, ASvc);
2048        if (ALocation > 0) and (ALocation <> Encounter.Location) then
2049          begin
2050            if InfoBox(TX_NEW_LOC1 + AName + TX_NEW_LOC2, TC_NEW_LOC, MB_YESNO) = IDYES
2051            then Encounter.Location := ALocation;
2052          end;
2053      end;
2054    //else
2055    //Encounter.Location := PrintLoc;
2056    if (PrintLoc = 0) and (Encounter.Location > 0) then PrintLoc := Encounter.Location;
2057    if PrintLoc = 0
2058      then PrintLoc := CommonLocationForOrders(OrderList);
2059    if PrintLoc = 0 then                      // location required for DEVINFO
2060    begin
2061      LookupLocation(ALocation, AName, LOC_ALL, TX_LOC_PRINT);
2062      if ALocation > 0 then
2063        begin
2064          PrintLoc := ALocation;
2065          Encounter.Location := ALocation;
2066        end;
2067    end;
2068    if printLoc = 0 then frmFrame.DisplayEncounterText;
2069    if PrintLoc <> 0 then
2070    begin
2071      SetupOrdersPrint(OrderList, DeviceInfo, Nature, False, PrintIt, PrintName, PrintLoc);
2072      if PrintIt then
2073        PrintOrdersOnReview(OrderList, DeviceInfo, PrintLoc)
2074      else
2075        PrintServiceCopies(OrderList, PrintLoc);
2076    end
2077    else InfoBox(TX_SIGN_LOC, TC_REQ_LOC, MB_OK or MB_ICONWARNING);
2078  end;