Procedure

TfrmNotes.mnuActLoadBoilerClick

Module

fNotes

Last Modified

7/15/2014 3:26:38 PM

Visibility

Public/Published

Owner

TfrmNotes

Declaration

procedure mnuActLoadBoilerClick(Sender: TObject);

Calls Hierarchy


TfrmNotes.mnuActLoadBoilerClick
 ├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
 │ └TfrmNotes.UpdateNoteAuthor
 │   ├GetXMLParamReturnValueTIU
 │   ├ExternalName
 │   ├AskCosignerForTitle
 │   │ └TIUPatch175Installed
 │   │   └ServerHasPatch
 │   └TfrmNotes.cmdChangeClick
 │     ├ExecuteNoteProperties
 │     │ ├TfrmBase508Form.Create
 │     │ │ ├TfrmBase508Form.UpdateAccessibilityActions
 │     │ │ ├UnfocusableControlEnter
 │     │ │ └AdjustControls
 │     │ │   ├TfrmBase508Form.ModifyUnfocusableControl
 │     │ │   └..(rec)..
 │     │ ├FMToday
 │     │ │ └FMNow
 │     │ ├ListClinProcTitlesShort
 │     │ │ └LoadClinProcTitles
 │     │ │   ├IdentifyClinProcClass
 │     │ │   └TClinProcTitles.Create
 │     │ ├ListConsultTitlesShort
 │     │ │ └LoadConsultTitles
 │     │ │   ├IdentifyConsultsClass
 │     │ │   └TConsultTitles.Create
 │     │ ├ListSurgeryTitlesShort
 │     │ │ └LoadSurgeryTitles
 │     │ │   └TSurgeryTitles.Create
 │     │ ├GetUnresolvedConsultsInfo
 │     │ ├ListNoteTitlesShort
 │     │ │ └LoadNoteTitles
 │     │ │   └TNoteTitles.Create
 │     │ ├TfrmNoteProperties.ShowClinProcFields
 │     │ ├TfrmNoteProperties.SetCosignerRequired
 │     │ │ ├AskCosignerForDocument
 │     │ │ │ └TIUPatch175Installed...
 │     │ │ ├AskCosignerForTitle...
 │     │ │ └DefaultCosigner
 │     │ │   └LoadTIUPrefs
 │     │ │     └ExternalName
 │     │ ├TfrmNoteProperties.SetGenericFormSize
 │     │ ├TfrmNoteProperties.ShowRequestList
 │     │ │ └ListConsultRequests
 │     │ ├TfrmNoteProperties.ShowSurgCaseList
 │     │ │ └ListSurgeryCases
 │     │ ├TfrmNoteProperties.ShowPRFList
 │     │ │ ├TPRFActions.Create
 │     │ │ ├TPRFActions.Load
 │     │ │ └TPRFActions.ShowActionsOnList
 │     │ │   └TPRFActions.SelActionHasNote
 │     │ ├IsConsultTitle
 │     │ ├IsSurgeryTitle
 │     │ │ └ShowSurgeryTab
 │     │ ├IsPRFTitle
 │     │ ├TfrmNoteProperties.cboNewTitleExit
 │     │ │ └TfrmNoteProperties.cboNewTitleMouseClick
 │     │ │   ├IsConsultTitle
 │     │ │   ├TfrmNoteProperties.SetGenericFormSize
 │     │ │   ├TfrmNoteProperties.ShowRequestList...
 │     │ │   ├TfrmNoteProperties.ShowSurgCaseList...
 │     │ │   ├IsSurgeryTitle...
 │     │ │   ├TfrmNoteProperties.ShowPRFList...
 │     │ │   ├IsPRFTitle
 │     │ │   └TfrmNoteProperties.SetCosignerRequired...
 │     │ ├TfrmNoteProperties.FormatRequestList
 │     │ │ └TfrmNoteProperties.ShowRequestList...
 │     │ ├PrintNameForTitle
 │     │ ├TEncounter.GetLocationName
 │     │ │ └TEncounter.UpdateText
 │     │ │   └GetEncounterText
 │     │ ├TPRFActions.GetPRF_IEN
 │     │ └TPRFActions.GetActionIEN
 │     ├TChanges.ReplaceSignState
 │     ├MakeNoteDisplayText
 │     ├TChanges.ReplaceText
 │     ├TfrmNotes.GetTitleText
 │     ├TfrmNotes.LockConsultRequest
 │     │ ├GetConsultOrderIEN
 │     │ └OrderCanBeLocked
 │     │   └LockOrder
 │     ├UnlockOrderIfAble
 │     │ └UnlockOrder
 │     ├GetConsultOrderIEN
 │     └TfrmNotes.mnuActLoadBoilerClick...
 ├QueryBoilerPlate
 │ └TfrmBase508Form.Create...
 ├QuickAddWith508Msg
 │ └SpeakTextInserted
 └TfrmNotes.UpdateNoteAuthor...

Called-By Hierarchy


           TfrmNotes.mnuActLoadBoilerClick
                TfrmNotes.cmdChangeClick┘ 
               TfrmNotes.InsertNewNote┤   
            TfrmNotes.mnuActNewClick┤ │   
         TfrmNotes.cmdNewNoteClick┘ │ │   
     TfrmNotes.mnuActAddIDEntryClick┘ │   
              TfrmNotes.InsertAddendum┤   
         TfrmNotes.mnuActAddendClick┘ │   
                 TfrmNotes.LoadForEdit┤   
           TfrmNotes.mnuActEditClick┘ │   
           TfrmNotes.mnuActChangeClick┤   
            TfrmNotes.UpdateNoteAuthor┘   
          TfrmNotes.InsertNewNote...┤     
                    AssignBoilerText┤     
TfrmNotes.mnuActLoadBoilerClick...┘ │     
  TfrmNotes.mnuActLoadBoilerClick...┘     

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(ANoteID: string; ANoteRec: TEditNoteRec): string; overload; -
QueryBoilerPlate function QueryBoilerPlate(BPText: TStrings): Integer; -
QuickAddWith508Msg procedure QuickAddWith508Msg(AFrom, ATo: TObject; docType: string = ''); -
TfrmNotes.UpdateNoteAuthor procedure UpdateNoteAuthor(DocInfo: string); -

Called-By

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


Source

1467  procedure TfrmNotes.mnuActLoadBoilerClick(Sender: TObject);
1468  var
1469    NoteEmpty: Boolean;
1470    BoilerText: TStringList;
1471    DocInfo: string;
1472  
1473    procedure AssignBoilerText;
1474    begin
1475      ExecuteTemplateOrBoilerPlate(BoilerText, FEditNote.Title, ltTitle, Self, 'Title: ' + FEditNote.TitleName, DocInfo);
1476      QuickCopyWith508Msg(BoilerText, memNewNote);
1477      UpdateNoteAuthor(DocInfo);
1478      FChanged := False;
1479    end;
1480  
1481  begin
1482    inherited;
1483    if (FEditingIndex < 0) or (lstNotes.ItemIndex <> FEditingIndex) then Exit;
1484    BoilerText := TStringList.Create;
1485    try
1486      NoteEmpty := memNewNote.Text = '';
1487      LoadBoilerPlate(BoilerText, FEditNote.Title);
1488      if (BoilerText.Text <> '') or
1489         assigned(GetLinkedTemplate(IntToStr(FEditNote.Title), ltTitle)) then
1490      begin
1491        DocInfo := MakeXMLParamTIU(IntToStr(lstNotes.ItemIEN), FEditNote);
1492        if NoteEmpty then AssignBoilerText else
1493        begin
1494          case QueryBoilerPlate(BoilerText) of
1495          0:  { do nothing } ;                         // ignore
1496          1: begin
1497               ExecuteTemplateOrBoilerPlate(BoilerText, FEditNote.Title, ltTitle, Self, 'Title: ' + FEditNote.TitleName, DocInfo);
1498               QuickAddWith508Msg(BoilerText, memNewNote);  // append
1499               UpdateNoteAuthor(DocInfo);
1500             end;
1501          2: AssignBoilerText;                         // replace
1502          end;
1503        end;
1504      end else
1505      begin
1506        if Sender = mnuActLoadBoiler
1507          then InfoBox(TX_NO_BOIL, TC_NO_BOIL, MB_OK)
1508          else
1509          begin
1510            if not NoteEmpty then
1511  //            if not FChanged and (InfoBox(TX_BLR_CLEAR, TC_BLR_CLEAR, MB_YESNO) = ID_YES)
1512              if (InfoBox(TX_BLR_CLEAR, TC_BLR_CLEAR,
1513                          MB_ICONQUESTION or MB_YESNO or MB_DEFBUTTON2) = ID_YES)
1514                then memNewNote.Lines.Clear;
1515          end;
1516      end; {if BoilerText.Text <> ''}
1517    finally
1518      BoilerText.Free;
1519    end;
1520  end;