Procedure

AssignBPText

Module

fODBase

Last Modified

7/15/2014 3:26:40 PM

Scope

Local

Local subprogram to

SetControl

Declaration

procedure AssignBPText(List: TStrings; const Value: string);

Calls Hierarchy


AssignBPText
 ├DisplayGroupToLinkType
 │ └DisplayGroupByName
 ├TResponses.EValueFor
 ├GetServiceIEN
 ├TResponses.IValueFor
 ├GetProcedureIEN
 ├ExpandOrderObjects
 │ ├TdmodShared.BoilerplateOK
 │ │ ├ErrCount
 │ │ ├AddErr
 │ │ └TdmodShared.LoadTIUObjects
 │ │   └GetObjectList
 │ └GetTemplateText
 │   └TEncounter.GetVisitStr
 │     └TEncounter.GetVisitCategory
 ├SetTemplateDialogCanceled
 ├CheckBoilerplate4Fields
 ├ExecuteTemplateOrBoilerPlate
 └WasTemplateDialogCanceled

Called-By Hierarchy


                                 AssignBPText
                      TResponses.SetControl┘ 
                   TfrmODMisc.SetupDialog┤   
                    TfrmODGen.SetupDialog┤   
                  TfrmODMedIn.SetupDialog┤   
          TfrmODMedIn.cboMedicationSelect┤   
               TfrmODMedIn.CheckFormAlt┘ │   
          TfrmODMedIn.cboDispenseExit┤   │   
    TfrmODMedIn.cboDispenseMouseClick┘   │   
 TfrmODMedIn.cboMedicationSelect...┘     │   
                 TfrmODMedOut.SetupDialog┤   
         TfrmODMedOut.cboMedicationSelect┤   
              TfrmODMedOut.CheckFormAlt┘ │   
         TfrmODMedOut.cboDispenseExit┤   │   
   TfrmODMedOut.cboDispenseMouseClick┘   │   
TfrmODMedOut.cboMedicationSelect...┘     │   
             TfrmODMedOut.SetInstructions┤   
               TfrmODMedOut.SetupDialog┤ │   
    TfrmODMedOut.cboMedicationSelect...┤ │   
           TfrmODMedOut.cmdComplexClick┘ │   
                   TfrmODText.SetupDialog┤   
                   TfrmODProc.SetupDialog┤   
                 TfrmODProc.cboProcSelect┤   
                   TfrmODCslt.SetupDialog┤   
              TfrmODCslt.treServiceChange┤   
           TfrmODCslt.treServiceKeyDown┘ │   
              TfrmODCslt.cboServiceSelect┤   
              TfrmODCslt.cboServiceExit┘ │   
                    TfrmODRad.SetupDialog┤   
             TfrmODRad.cboProcedureSelect┤   
             TfrmODRad.cboProcedureExit┘ │   
                    TfrmODLab.SetupDialog┤   
             TfrmODLab.cboAvailTestSelect┤   
                  TfrmODLab.SetupDialog┤ │   
             TfrmODLab.cboAvailTestExit┘ │   
                  TfrmODBBank.SetupDialog┤   
              TfrmODBBank.SetOnQuickOrder┤   
              TfrmODBBank.cboQuickClick┘ │   
       TfrmODMedIV.SetValuesFromResponses┤   
                TfrmODMedIV.SetupDialog┤ │   
      TfrmODMedIV.cboSolutionMouseClick┘ │   
          TfrmODMedIV.cboSolutionExit┘   │   
                 TfrmODVitals.SetupDialog┤   
             TfrmODMedNVA.SetOnQuickOrder┤   
               TfrmODMedNVA.SetupDialog┤ │   
            TfrmODMedNVA.btnSelectClick┘ │   
            TfrmODMedNVA.UMDelayClick┘   │   
               TfrmODMeds.SetOnQuickOrder┤   
                 TfrmODMeds.SetupDialog┤ │   
              TfrmODMeds.btnSelectClick┘ │   
              TfrmODMeds.UMDelayClick┘   │   
      TfrmODDiet.SetValuesFromResponsesDO┤   
                 TfrmODDiet.SetupDialog┤ │   
      TfrmODDiet.cboDietAvailMouseClick┘ │   
          TfrmODDiet.cboDietAvailExit┘   │   
      TfrmODDiet.SetValuesFromResponsesTF┤   
                 TfrmODDiet.SetupDialog┤ │   
        TfrmODDiet.cboProductMouseClick┘ │   
            TfrmODDiet.cboProductExit┘   │   
      TfrmODDiet.SetValuesFromResponsesEL┤   
                 TfrmODDiet.SetupDialog┘ │   
      TfrmODDiet.SetValuesFromResponsesIP┤   
                 TfrmODDiet.SetupDialog┘ │   
      TfrmODDiet.SetValuesFromResponsesAO┤   
                 TfrmODDiet.SetupDialog┘ │   
      TfrmODDiet.SetValuesFromResponsesOP┤   
                 TfrmODDiet.SetupDialog┤ │   
    TfrmODDiet.cboOPDietAvailMouseClick┘ │   
             TfrmODDiet.nbkDietChange┤   │   
              TfrmODDiet.InitDialog┤ │   │   
             TfrmODDiet.SetupDialog┤ │   │   
                          ..(rec)..┘ │   │   
        TfrmODDiet.cboOPDietAvailExit┤   │   
     TfrmODDiet.cboOPDietAvailKeyDown┘   │   
                TfrmODAllergy.SetupDialog┤   
           TfrmODAllergy.lstAllergySelect┘   
              TfrmODAllergy.SetupDialog┤     
                              ..(rec)..┘     

Calls

Name Declaration Comments
CheckBoilerplate4Fields procedure CheckBoilerplate4Fields(var AText: string; const CaptionText: string = ''; PreviewMode: boolean = FALSE); overload; -
DisplayGroupToLinkType function DisplayGroupToLinkType(DGroup: integer): TTemplateLinkType; -
TResponses.EValueFor function EValueFor(const APromptID: string; AnInstance: Integer): string; -
ExecuteTemplateOrBoilerPlate procedure ExecuteTemplateOrBoilerPlate(var AText: string; IEN: Integer; LType: TTemplateLinkType; OwningForm: TForm; CaptionText: string; var DocInfo: string); overload; -
ExpandOrderObjects procedure ExpandOrderObjects(var Txt: string; var ContainsObjects: boolean; msg: string = ''); -
GetProcedureIEN function GetProcedureIEN(ORIEN: string): string; -
GetServiceIEN function GetServiceIEN(ORIEN: string): string; -
TResponses.IValueFor function IValueFor(const APromptID: string; AnInstance: Integer): string; -
SetTemplateDialogCanceled procedure SetTemplateDialogCanceled(value: Boolean); -
WasTemplateDialogCanceled function WasTemplateDialogCanceled: Boolean; -

Called-By

Name Declaration Comments
TResponses.SetControl procedure SetControl(AControl: TControl; const APromptID: string; AnInstance: Integer); -


Source

1137  procedure AssignBPText(List: TStrings; const Value: string);
1138  var
1139    tmp, cptn, DocInfo: string;
1140    LType: TTemplateLinkType;
1141  
1142  begin
1143    DocInfo := '';
1144    LType := DisplayGroupToLinkType(DisplayGroup);
1145    cptn := 'Reason for Request: ' + EValueFor('ORDERABLE', 1);
1146    tmp := Value;
1147    case LType of
1148      ltConsult:   IEN := StrToIntDef(GetServiceIEN(IValueFor('ORDERABLE', 1)),0);
1149      ltProcedure: IEN := StrToIntDef(GetProcedureIEN(IValueFor('ORDERABLE', 1)),0);
1150      else         IEN := 0;
1151    end;
1152    ExpandOrderObjects(tmp, HasObjects);
1153    FOrderContainsObjects := FOrderContainsObjects or HasObjects;
1154    
1155    if frmODBase.FAbortOrder then
1156    begin
1157      SetTemplateDialogCanceled(FALSE);
1158      Exit;
1159    end;
1160  
1161    if IEN <> 0 then
1162      begin
1163        // template will execute on copy order if commented out  (tried to eliminate for CSV v22, RV)
1164        //
1165        //if (Length(tmp) > 0) and (not HasTemplateField(tmp)) then
1166        //  CheckBoilerplate4Fields(tmp, cptn)
1167        //else
1168  
1169        // CQ #11669 - changing an existing order shouldn't restart template - JM
1170          if assigned(frmODBase) and (frmODBase.FOrderAction = ORDER_EDIT) then
1171            CheckBoilerplate4Fields(tmp, cptn)
1172          else
1173            ExecuteTemplateOrBoilerPlate(tmp, IEN, LType, nil, cptn, DocInfo);
1174      end
1175    else
1176      CheckBoilerplate4Fields(tmp, cptn);
1177    List.Text := tmp;
1178    if WasTemplateDialogCanceled then frmODBase.FAbortOrder := True;
1179  
1180  end;