Procedure

TfrmDCSumm.mnuActLoadBoilerClick

Module

fDCSumm

Last Modified

7/15/2014 3:26:36 PM

Visibility

Public/Published

Owner

TfrmDCSumm

Declaration

procedure mnuActLoadBoilerClick(Sender: TObject);

Calls Hierarchy


TfrmDCSumm.mnuActLoadBoilerClick
 ├TfrmDCSumm.NoSummSelected
 ├LoadBoilerPlate
 ├GetLinkedTemplate
 │ ├GetLinkedTemplateData
 │ └AddTemplate
 │   ├TTemplate.Create
 │   │ └TTemplate.ReminderDialogIEN
 │   └TTemplate.AddChild
 │     └TTemplate.GetItems
 │       └ExpandTemplate
 │         ├TTemplate.GetChildren
 │         ├GetTemplateChildren
 │         ├AddTemplate...
 │         └TTemplate.ItemIENs
 │           └TTemplate.GetItems...
 ├MakeXMLParamTIU
 │ └ExternalName
 ├AssignBoilerText
 │ └QuickCopyWith508Msg
 │   └SpeakTextInserted
 ├QueryBoilerPlate
 │ └TfrmBase508Form.Create
 │   ├TfrmBase508Form.UpdateAccessibilityActions
 │   ├UnfocusableControlEnter
 │   └AdjustControls
 │     ├TfrmBase508Form.ModifyUnfocusableControl
 │     └..(rec)..
 └QuickAddWith508Msg
   └SpeakTextInserted

Called-By Hierarchy


                                        TfrmDCSumm.mnuActLoadBoilerClick
                                             TfrmDCSumm.cmdChangeClick┘ 
                                            TfrmDCSumm.InsertNewSumm┤   
                                         TfrmDCSumm.mnuActNewClick┤ │   
                                      TfrmDCSumm.cmdNewSummClick┘ │ │   
                                  TfrmDCSumm.mnuActAddIDEntryClick┘ │   
                                           TfrmDCSumm.InsertAddendum┤   
                                      TfrmDCSumm.mnuActAddendClick┘ │   
                                              TfrmDCSumm.LoadForEdit┤   
                                       TfrmDCSumm.InsertNewSumm...┤ │   
                                        TfrmDCSumm.mnuActEditClick┘ │   
                                           TfrmDCSumm.SaveEditedSumm┤   
                                        TfrmDCSumm.SaveCurrentSumm┘ │   
                                   TfrmDCSumm.AllowContextChange┤   │   
                               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┘   │   │   
                                      TfrmDCSumm.LstSummsToPrint┤   │   
                      TfrmFrame.mnuFilePrintSelectedItemsClick┘ │   │   
                                         TfrmDCSumm.RequestPrint┤   │   
                                   TfrmFrame.mnuFilePrintClick┘ │   │   
                                     TfrmDCSumm.InsertNewSumm...┤   │   
                                         TfrmDCSumm.mnuViewClick┤   │   
                                     TfrmDCSumm.SetViewContext┤ │   │   
                                      TfrmDCSumm.DisplayPage┤ │ │   │   
                      TfrmDCSumm.mnuViewReturntoDefaultClick┘ │ │   │   
                          TfrmDCSumm.mnuViewSaveAsDefaultClick┘ │   │   
                                         TfrmDCSumm.StartNewEdit┤   │   
                                  TfrmDCSumm.mnuActNewClick...┤ │   │   
                              TfrmDCSumm.mnuActAddIDEntryClick┤ │   │   
                                  TfrmDCSumm.mnuActAddendClick┤ │   │   
                                    TfrmDCSumm.mnuActEditClick┘ │   │   
                        TfrmDCSumm.mnuActDetachFromIDParentClick┤   │   
                                    TfrmDCSumm.mnuActDeleteClick┤   │   
                                  TfrmDCSumm.SaveEditedSumm...┘ │   │   
                                      TfrmDCSumm.mnuActSaveClick┤   │   
                                      TfrmDCSumm.mnuActSignClick┤   │   
                                         TfrmDCSumm.SaveSignItem┤   │   
                                         TfrmReview.cmdOKClick┘ │   │   
                                               ReviewChanges┘   │   │   
                        TfrmFrame.AllowContextChangeAll...┤     │   │   
                                  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┘               │   │   
                                            TfrmDCSumm.FormClose┤   │   
                       TfrmDCSumm.mnuActIdentifyAddlSignersClick┤   │   
                           TfrmDCSumm.popSummMemoAddlSignClick┘ │   │   
                                 TfrmDCSumm.ProcessNotifications┤   │   
                                        TfrmDCSumm.DisplayPage┘ │   │   
                                    TfrmDCSumm.SetViewContext...┤   │   
                                      TfrmDCSumm.tvSummsDragDrop┤   │   
                                     TfrmDCSumm.tvSummsStartDrag┤   │   
                          TfrmDCSumm.mnuActAttachtoIDParentClick┘   │   
                                        TfrmDCSumm.mnuActChangeClick┘   

Calls

Name Declaration Comments
AssignBoilerText procedure AssignBoilerText; -
GetLinkedTemplate function GetLinkedTemplate(IEN: string; LType: TTemplateLinkType): TTemplate; -
LoadBoilerPlate procedure LoadBoilerPlate(Dest: TStrings; Title: Integer); -
MakeXMLParamTIU function MakeXMLParamTIU(ADCSummID: string; ADCSummRec: TEditDCSummRec): string; overload; -
TfrmDCSumm.NoSummSelected function NoSummSelected : Boolean; -
QueryBoilerPlate function QueryBoilerPlate(BPText: TStrings): Integer; -
QuickAddWith508Msg procedure QuickAddWith508Msg(AFrom, ATo: TObject; docType: string = ''); -

Called-By

Name Declaration Comments
TfrmDCSumm.cmdChangeClick procedure cmdChangeClick(Sender: TObject); -


Source

2491  procedure TfrmDCSumm.mnuActLoadBoilerClick(Sender: TObject);
2492  var
2493    NoteEmpty: Boolean;
2494    BoilerText: TStringList;
2495    DocInfo: string;
2496  
2497    procedure AssignBoilerText;
2498    begin
2499      ExecuteTemplateOrBoilerPlate(BoilerText, FEditDCSumm.Title, ltTitle, Self, 'Title: ' + FEditDCSumm.TitleName, DocInfo);
2500      QuickCopyWith508Msg(BoilerText, memNewSumm);
2501      FChanged := False;
2502    end;
2503  
2504  begin
2505    inherited;
2506    if NoSummSelected() then Exit;
2507    if (FEditingIndex < 0) or (lstSumms.ItemIndex <> FEditingIndex) then Exit;
2508    BoilerText := TStringList.Create;
2509    try
2510      NoteEmpty := memNewSumm.Text = '';
2511      LoadBoilerPlate(BoilerText, FEditDCSumm.Title);
2512      if (BoilerText.Text <> '') or
2513         assigned(GetLinkedTemplate(IntToStr(FEditDCSumm.Title), ltTitle)) then
2514      begin
2515        DocInfo := MakeXMLParamTIU(IntToStr(lstSumms.ItemIEN), FEditDCSumm);
2516        if NoteEmpty then AssignBoilerText else
2517        begin
2518          case QueryBoilerPlate(BoilerText) of
2519          0:  { do nothing } ;                         // ignore
2520          1: begin
2521               ExecuteTemplateOrBoilerPlate(BoilerText, FEditDCSumm.Title, ltTitle, Self, 'Title: ' + FEditDCSumm.TitleName, DocInfo);
2522               QuickAddWith508Msg(BoilerText, memNewSumm);  // append
2523             end;
2524          2: AssignBoilerText                          // replace
2525          end;
2526        end;
2527      end else
2528      begin
2529        if Sender = mnuActLoadBoiler
2530          then InfoBox(TX_NO_BOIL, TC_NO_BOIL, MB_OK)
2531          else
2532          begin
2533            if not NoteEmpty then
2534              if not FChanged and (InfoBox(TX_BLR_CLEAR, TC_BLR_CLEAR, MB_YESNO) = ID_YES)
2535                then memNewSumm.Lines.Clear;
2536          end;
2537      end; {if BoilerText.Text <> ''}
2538    finally
2539      BoilerText.Free;
2540    end;
2541  end;