Procedure

ExtractToResponses

Module

rODBase

Last Modified

7/15/2014 3:26:42 PM

Scope

Global

Declaration

procedure ExtractToResponses(Dest: TList; var HasObjects: boolean);

Calls Hierarchy


ExtractToResponses
 └ExpandOrderObjects
   ├TdmodShared.BoilerplateOK
   │ ├ErrCount
   │ ├AddErr
   │ └TdmodShared.LoadTIUObjects
   │   └GetObjectList
   └GetTemplateText
     └TEncounter.GetVisitStr
       └TEncounter.GetVisitCategory

Called-By Hierarchy


                                            ExtractToResponses
                                               LoadResponses┘ 
                                   TResponses.SetCopyOrder┤   
                                  TfrmODBase.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┘       │   
                                   TResponses.SetEditOrder┤   
                               TfrmODBase.SetupDialog...┘ │   
                                  TResponses.SetQuickOrder┤   
                         TfrmODMedIn.cboMedicationSelect┤ │   
                              TfrmODMedIn.CheckFormAlt┘ │ │   
                         TfrmODMedIn.cboDispenseExit┤   │ │   
                   TfrmODMedIn.cboDispenseMouseClick┘   │ │   
                TfrmODMedIn.cboMedicationSelect...┘     │ │   
                        TfrmODMedOut.cboMedicationSelect┤ │   
                             TfrmODMedOut.CheckFormAlt┘ │ │   
                        TfrmODMedOut.cboDispenseExit┤   │ │   
                  TfrmODMedOut.cboDispenseMouseClick┘   │ │   
               TfrmODMedOut.cboMedicationSelect...┘     │ │   
                                TfrmODProc.cboProcSelect┤ │   
                             TfrmODCslt.treServiceChange┤ │   
                          TfrmODCslt.treServiceKeyDown┘ │ │   
                             TfrmODCslt.cboServiceSelect┤ │   
                             TfrmODCslt.cboServiceExit┘ │ │   
                            TfrmODRad.cboProcedureSelect┤ │   
                            TfrmODRad.cboProcedureExit┘ │ │   
                            TfrmODLab.cboAvailTestSelect┤ │   
                                 TfrmODLab.SetupDialog┤ │ │   
                            TfrmODLab.cboAvailTestExit┘ │ │   
                             TfrmODBBank.SetOnQuickOrder┤ │   
                             TfrmODBBank.cboQuickClick┘ │ │   
                       TfrmODMedIV.cboSolutionMouseClick┤ │   
                           TfrmODMedIV.cboSolutionExit┘ │ │   
                             TfrmODMedNVA.btnSelectClick┤ │   
                             TfrmODMedNVA.UMDelayClick┘ │ │   
                               TfrmODMeds.btnSelectClick┤ │   
                               TfrmODMeds.UMDelayClick┘ │ │   
                       TfrmODDiet.cboDietAvailMouseClick┤ │   
                           TfrmODDiet.cboDietAvailExit┘ │ │   
                         TfrmODDiet.cboProductMouseClick┤ │   
                             TfrmODDiet.cboProductExit┘ │ │   
                     TfrmODDiet.cboOPDietAvailMouseClick┤ │   
                              TfrmODDiet.nbkDietChange┤ │ │   
                               TfrmODDiet.InitDialog┤ │ │ │   
                              TfrmODDiet.SetupDialog┤ │ │ │   
                                           ..(rec)..┘ │ │ │   
                         TfrmODDiet.cboOPDietAvailExit┤ │ │   
                      TfrmODDiet.cboOPDietAvailKeyDown┘ │ │   
                          TfrmODAllergy.lstAllergySelect┘ │   
                             TfrmODAllergy.SetupDialog┤   │   
                                             ..(rec)..┘   │   
                              TResponses.SetQuickOrderByID┤   
                               TfrmODBase.SetupDialog...┘ │   
                                 ExecuteChangeRenewedOrder┤   
                                         ChangeOrders...┘ │   
                                        ExecuteRenewOutMed┘   
                          TfrmRenewOrders.cmdChangeClick┘     

Calls

Name Declaration Comments
ExpandOrderObjects procedure ExpandOrderObjects(var Txt: string; var ContainsObjects: boolean; msg: string = ''); -

Called-By

Name Declaration Comments
LoadResponses procedure LoadResponses(Dest: TList; const OrderID: string; var HasObjects: boolean); -


Source

388   procedure ExtractToResponses(Dest: TList; var HasObjects: boolean);
389   { load a list with TResponse records, assumes source strings are in RPCBrokerV.Results }
390   var
391     i: Integer;
392     AResponse: TResponse;
393     WPContainsObjects, TxContainsObjects: boolean;
394     TempBroker: TStrings;
395   begin
396     i := 0;
397     HasObjects := FALSE;
398     TempBroker := TStringlist.Create;
399     FastAssign(RPCBrokerV.Results, TempBroker);
400     try
401     with TempBroker do while i < Count do
402     begin
403       if CharAt(Strings[i], 1) = '~' then
404       begin
405         AResponse := TResponse.Create;
406         with AResponse do
407         begin
408           PromptIEN := StrToIntDef(Piece(Copy(Strings[i], 2, 255), U, 1), 0);
409           Instance := StrToIntDef(Piece(Strings[i], U, 2), 0);
410           PromptID := Piece(Strings[i], U, 3);
411           Inc(i);
412           while (i < Count) and (CharAt(Strings[i], 1) <> '~') do
413           begin
414             if CharAt(Strings[i], 1) = 'i' then IValue := Copy(Strings[i], 2, 255);
415             if CharAt(Strings[i], 1) = 'e' then EValue := Copy(Strings[i], 2, 255);
416             if CharAt(Strings[i], 1) = 't' then
417             begin
418               if Length(EValue) > 0 then EValue := EValue + CRLF;
419               EValue := EValue + Copy(Strings[i], 2, 255);
420               IValue := TX_WPTYPE;  // signals that this is a word processing field
421             end;
422             Inc(i);
423           end; {while i}
424           if IValue <> TX_WPTYPE then ExpandOrderObjects(IValue, TxContainsObjects);
425           ExpandOrderObjects(EValue, WPContainsObjects);
426           HasObjects := HasObjects or WPContainsObjects or TxContainsObjects;
427           Dest.Add(AResponse);
428         end; {with AResponse}
429       end; {if CharAt}
430     end; {With RPCBrokerV}
431     finally
432       TempBroker.Free;
433     end;
434   end;