Procedure

TResponses.BuildOCItems

Module

fODBase

Last Modified

7/15/2014 3:26:40 PM

Visibility

Private

Owner

TResponses

Declaration

procedure BuildOCItems(AList: TStringList; var AStartDtTm: string; const AFillerID: string);

Calls Hierarchy


TResponses.BuildOCItems
 ├TResponses.IValueFor
 └TResponses.EValueFor

Called-By Hierarchy


                                       TResponses.BuildOCItems
                                TfrmODBase.AcceptOrderChecks┘ 
                                      TfrmODBase.ValidSave┘   
                               TfrmODBase.cmdAcceptClick┤     
                                   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┘     │     
                               TfrmODBase.FormCloseQuery┤     
                                     TfrmODBase.TabClose┤     
                            TfrmODAllergy.cmdAcceptClick┘     

Calls

Name Declaration Comments
TResponses.EValueFor function EValueFor(const APromptID: string; AnInstance: Integer): string; -
TResponses.IValueFor function IValueFor(const APromptID: string; AnInstance: Integer): string; -

Called-By

Name Declaration Comments
TfrmODBase.AcceptOrderChecks function AcceptOrderChecks: Boolean; -


Source

640   procedure TResponses.BuildOCItems(AList: TStringList; var AStartDtTm: string;
641     const AFillerID: string);
642   var
643     i, TheInstance: Integer;
644     OrderableIEN, PkgPart: string;
645   begin
646     if EditOrder <> '' then DupORIFN := EditOrder;
647     if CopyOrder <> '' then DupORIFN := CopyOrder;
648     //if {(CopyOrder <> '') or} (EditOrder <> '') then Exit;  // only check new orders
649     with FResponseList do
650       for i := 0 to FResponseList.Count - 1 do
651         begin
652           with TResponse(Items[i]) do
653             begin
654               if (PromptID = 'ORDERABLE') or (PromptID = 'ADDITIVE') then
655                 begin
656                   OrderableIEN := IValue;
657                   TheInstance := Instance;
658                   PkgPart := '';
659                   if AFillerID = 'LR' then PkgPart := '^LR^' + IValueFor('SPECIMEN', TheInstance);
660                   if (AFillerID = 'PSI') or (AFillerID = 'PSO') or (AFillerID = 'PSH') or (AFillerID = 'PSNV')
661                     then PkgPart := U + AFillerID + U + IValueFor('DRUG', TheInstance);
662                   // was -- then PkgPart := '^PS^' + IValueFor('DRUG', TheInstance);
663                   if AFillerID = 'PSIV' then
664                     begin
665                       if PromptID = 'ORDERABLE' then PkgPart := '^PSIV^B;' + IValueFor('VOLUME', TheInstance);
666                       if PromptID = 'ADDITIVE'  then PkgPart := '^PSIV^A';
667                     end;
668                   AList.Add(OrderableIEN + PkgPart);
669                 end;
670               //AGP IV CHANGES
671               if (AFillerID = 'PSI') or (AFillerID = 'PSO') or (AFillerID = 'PSH') or (AFillerID = 'PSIV') or (AFillerID = 'PSNV') then
672                 begin
673                   IF PromptID = 'COMMENT' then continue;
674                   Alist.Add(AFillerID + U + PromptID + U + InttoStr(Instance) + U + IValueFor(PromptID, Instance) + U + EValueFor(PromptID, Instance));
675                 end;
676         end;
677     end;
678     AStartDtTm := IValueFor('START', 1);
679   end;