Procedure

TfrmNotes.UpdateNoteAuthor

Module

fNotes

Last Modified

7/15/2014 3:26:38 PM

Visibility

Private

Owner

TfrmNotes

Declaration

procedure UpdateNoteAuthor(DocInfo: string);

Calls Hierarchy


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
     ├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...
     ├QueryBoilerPlate
     │ └TfrmBase508Form.Create...
     ├QuickAddWith508Msg
     │ └SpeakTextInserted
     └TfrmNotes.UpdateNoteAuthor...

Called-By Hierarchy


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

Calls

Name Declaration Comments
AskCosignerForTitle function AskCosignerForTitle(ATitle: integer; AnAuthor: Int64; ADate: TFMDateTime): Boolean; -
TfrmNotes.cmdChangeClick procedure cmdChangeClick(Sender: TObject); -
ExternalName function ExternalName(IEN: Int64; FileNumber: Double): string; -
GetXMLParamReturnValueTIU function GetXMLParamReturnValueTIU(DocInfo, ParamTag: string): string; -

Called-By

Name Declaration Comments
AssignBoilerText procedure AssignBoilerText; -
TfrmNotes.InsertNewNote procedure InsertNewNote(IsIDChild: boolean; AnIDParent: integer); -
TfrmNotes.mnuActLoadBoilerClick procedure mnuActLoadBoilerClick(Sender: TObject); -


Source

3628  procedure TfrmNotes.UpdateNoteAuthor(DocInfo: string);
3629  const
3630    TX_INVALID_AUTHOR1 = 'The author returned by the template (';
3631    TX_INVALID_AUTHOR2 = ') is not valid.' + #13#10 + 'The note''s author will remain as ';
3632    TC_INVALID_AUTHOR  = 'Invalid Author';
3633    TX_COSIGNER_REQD   = ' requires a cosigner for this note.';
3634    TC_COSIGNER_REQD   = 'Cosigner Required';
3635  var
3636    NewAuth, NewAuthName, AuthNameCheck, x: string;
3637    ADummySender: TObject;
3638  begin
3639    if DocInfo = '' then Exit;
3640    NewAuth := GetXMLParamReturnValueTIU(DocInfo, 'AUTHOR_IEN');
3641    if NewAuth = '' then Exit;
3642    AuthNameCheck := ExternalName(StrToInt64Def(NewAuth, 0), 200);
3643    if AuthNameCheck = '' then
3644    begin
3645      NewAuthName := GetXMLParamReturnValueTIU(DocInfo, 'AUTHOR_NAME');
3646      InfoBox(TX_INVALID_AUTHOR1 + UpperCase(NewAuthName) +  TX_INVALID_AUTHOR2 + UpperCase(FEditNote.AuthorName),
3647              TC_INVALID_AUTHOR, MB_OK and MB_ICONERROR);
3648      Exit;
3649    end;
3650    with FEditNote do if StrToInt64Def(NewAuth, 0) <> Author then
3651    begin
3652      Author := StrToInt64Def(NewAuth, 0);
3653      AuthorName := AuthNameCheck;
3654      x := lstNotes.Items[EditingIndex];
3655      SetPiece(x, U, 5, NewAuth + ';' + AuthNameCheck);
3656      lstNotes.Items[EditingIndex] := x;
3657      if AskCosignerForTitle(Title, Author, DateTime) then
3658      begin
3659        InfoBox(UpperCase(AuthNameCheck) + TX_COSIGNER_REQD, TC_COSIGNER_REQD, MB_OK);
3660        //Cosigner := 0;   CosignerName := '';  // not sure about this yet
3661        ADummySender := TObject.Create;
3662        try
3663          cmdChangeClick(ADummySender);
3664        finally
3665          FreeAndNil(ADummySender);
3666        end;
3667      end
3668      else cmdChangeClick(Self);
3669    end;
3670  end;