Procedure

OrderPrintDeviceInfo

Module

rOrders

Last Modified

7/15/2014 3:26:42 PM

Comments

KCM*
TEMPORARILY COMMENTED OUT WHILE TESTING
function GetPromptandDeviceParameters(Location: integer; OrderList: TStringList; Nature: string): TPrintParams;
var
  TempParams: TPrintParams;
  x: string;
begin
  tempParams.OrdersToPrint := TStringList.Create;
  try
    CallV('ORWD1 PARAM', [Location, Nature, OrderList]);
    x := RPCBrokerV.Results[0];
    with TempParams do
      begin
        PromptForChartCopy    := CharAt(Piece(x, U, 1),1);
        if Piece(x, U, 5) <> '' then
          ChartCopyDevice     := Piece(Piece(x, U, 5),';',1) + '^' + Piece(Piece(x, U, 5),';',2);
        PromptForLabels       := CharAt(Piece(x, U, 2),1);
        if Piece(x, U, 6) <> '' then
          LabelDevice         := Piece(Piece(x, U, 6),';',1) + '^' + Piece(Piece(x, U, 6),';',2);
        PromptForRequisitions := CharAt(Piece(x, U, 3),1);
        if Piece(x, U, 7) <> '' then
          RequisitionDevice   := Piece(Piece(x, U, 7),';',1) + '^' + Piece(Piece(x, U, 7),';',2);
        PromptForWorkCopy     := CharAt(Piece(x, U, 4),1);
        if Piece(x, U, 8) <> '' then
          WorkCopyDevice      := Piece(Piece(x, U, 8),';',1) + '^' + Piece(Piece(x, U, 8),';',2);
        AnyPrompts            := ((PromptForChartCopy    in ['1','2']) or
                                  (PromptForLabels       in ['1','2']) or
                                  (PromptForRequisitions in ['1','2']) or
                                  (PromptForWorkCopy     in ['1','2']));
        RPCBrokerV.Results.Delete(0);
        FastAssign(RPCBrokerV.Results, OrdersToPrint);
      end;
    Result := TempParams;
  finally
    tempParams.OrdersToPrint.Free;
  end;
end;

Scope

Interfaced

Declaration

procedure OrderPrintDeviceInfo(OrderList: TStringList; var PrintParams: TPrintParams; Nature: Char; PrintLoc: Integer = 0); {*KCM*}

Called-By Hierarchy


                                                  OrderPrintDeviceInfo
                                                    SetupOrdersPrint┘ 
                                          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...┘ │   
                                           TfrmOrders.RequestPrint┘   
                                     TfrmFrame.mnuFilePrintClick┘     

Called-By

Name Declaration Comments
SetupOrdersPrint procedure SetupOrdersPrint(OrderList: TStringList; var DeviceInfo: string; Nature: Char; SelectAll: Boolean; var PrintIt: Boolean; PrintTitle: string = ''; PrintLoc: Integer = 0); -


Source

2390  procedure OrderPrintDeviceInfo(OrderList: TStringList; var PrintParams: TPrintParams; Nature: Char; PrintLoc: Integer = 0);
2391  var
2392    x: string;
2393  begin
2394    if Nature <> #0 then
2395      begin
2396         if PrintLoc > 0 then CallV('ORWD2 DEVINFO', [PrintLoc, Nature, OrderList])
2397         else CallV('ORWD2 DEVINFO', [Encounter.Location, Nature, OrderList]);
2398      end
2399    else
2400      begin
2401        if PrintLoc > 0 then CallV('ORWD2 MANUAL', [PrintLoc, OrderList])
2402        else CallV('ORWD2 MANUAL', [Encounter.Location, OrderList]);
2403      end;
2404    x := RPCBrokerV.Results[0];
2405    FillChar(PrintParams, SizeOf(PrintParams), #0);
2406    with PrintParams do
2407    begin
2408      PromptForChartCopy    := CharAt(Piece(x, U, 1),1);
2409      if Piece(x, U, 5) <> '' then
2410        ChartCopyDevice     := Piece(Piece(x, U, 5),';',1) + '^' + Piece(Piece(x, U, 5),';',2);
2411      PromptForLabels       := CharAt(Piece(x, U, 2),1);
2412      if Piece(x, U, 6) <> '' then
2413        LabelDevice         := Piece(Piece(x, U, 6),';',1) + '^' + Piece(Piece(x, U, 6),';',2);
2414      PromptForRequisitions := CharAt(Piece(x, U, 3),1);
2415      if Piece(x, U, 7) <> '' then
2416        RequisitionDevice   := Piece(Piece(x, U, 7),';',1) + '^' + Piece(Piece(x, U, 7),';',2);
2417      PromptForWorkCopy     := CharAt(Piece(x, U, 4),1);
2418      if Piece(x, U, 8) <> '' then
2419      WorkCopyDevice      := Piece(Piece(x, U, 8),';',1) + '^' + Piece(Piece(x, U, 8),';',2);
2420      AnyPrompts            := ((PromptForChartCopy    in ['1','2']) or
2421                                (PromptForLabels       in ['1','2']) or
2422                                (PromptForRequisitions in ['1','2']) or
2423                                (PromptForWorkCopy     in ['1','2']));
2424    end;
2425    if Nature <> #0 then
2426      begin
2427        RPCBrokerV.Results.Delete(0);
2428        OrderList.Clear;
2429        FastAssign(RPCBrokerV.Results, OrderList);
2430      end;
2431  end;