Procedure

TfrmSurgery.cmdChangeClick

Module

fSurgery

Last Modified

7/15/2014 3:26:38 PM

Visibility

Public/Published

Owner

TfrmSurgery

Declaration

procedure cmdChangeClick(Sender: TObject);

Calls Hierarchy


TfrmSurgery.cmdChangeClick
 ├IsNonORProcedure
 ├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
 │ │ │   └ServerHasPatch
 │ │ ├AskCosignerForTitle
 │ │ │ └TIUPatch175Installed...
 │ │ └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
 ├TfrmSurgery.GetTitleText
 └TfrmSurgery.mnuActLoadBoilerClick
   ├LoadBoilerPlate
   ├GetLinkedTemplate
   │ ├GetLinkedTemplateData
   │ └AddTemplate
   │   ├TTemplate.Create
   │   │ └TTemplate.ReminderDialogIEN
   │   └TTemplate.AddChild
   │     └TTemplate.GetItems
   │       └ExpandTemplate
   │         ├TTemplate.GetChildren
   │         ├GetTemplateChildren
   │         ├AddTemplate...
   │         └TTemplate.ItemIENs
   │           └TTemplate.GetItems...
   ├AssignBoilerText
   ├MakeXMLParamTIU
   │ └ExternalName
   └QueryBoilerPlate
     └TfrmBase508Form.Create...

Called-By Hierarchy


       TfrmSurgery.cmdChangeClick
      TfrmSurgery.InsertNewNote┤ 
   TfrmSurgery.mnuActNewClick┘ │ 
TfrmSurgery.cmdNewNoteClick┘   │ 
     TfrmSurgery.InsertAddendum┤ 
TfrmSurgery.mnuActAddendClick┘ │ 
        TfrmSurgery.LoadForEdit┤ 
  TfrmSurgery.mnuActEditClick┘ │ 
  TfrmSurgery.mnuActChangeClick┘ 

Calls

Name Declaration Comments
ExecuteNoteProperties function ExecuteNoteProperties(var ANote: TEditNoteRec; CallingTab: integer; IDNoteTitlesOnly, IsNewIDEntry: boolean; AClassName: string; CPStatusFlag: integer): Boolean; -
TfrmSurgery.GetTitleText function GetTitleText(AnIndex: Integer): string; -
IsNonORProcedure function IsNonORProcedure(ACaseIEN: integer): boolean; -
MakeNoteDisplayText function MakeNoteDisplayText(RawText: string): string; -
TfrmSurgery.mnuActLoadBoilerClick procedure mnuActLoadBoilerClick(Sender: TObject); -
TChanges.ReplaceSignState procedure ReplaceSignState(ItemType: Integer; const AnID: string; NewState: Integer); -
TChanges.ReplaceText procedure ReplaceText(ItemType: Integer; const AnID, NewText: string); -

Called-By

Name Declaration Comments
TfrmSurgery.InsertAddendum procedure InsertAddendum; -
TfrmSurgery.InsertNewNote procedure InsertNewNote(IsIDChild: boolean; AnIDParent: integer); -
TfrmSurgery.LoadForEdit procedure LoadForEdit; -
TfrmSurgery.mnuActChangeClick procedure mnuActChangeClick(Sender: TObject); -


Source

1321  procedure TfrmSurgery.cmdChangeClick(Sender: TObject);
1322  const
1323    IS_ID_CHILD = False;
1324  var
1325    LastTitle: Integer;
1326    OKPressed: boolean;
1327    x, AClassName: string;
1328  begin
1329    inherited;
1330    LastTitle   := FEditNote.Title;
1331    if IsNonORProcedure(FEditNote.PkgIEN) then AClassName := DCL_SURG_NON_OR else AClassName := DCL_SURG_OR;
1332    if Sender <> Self then OKPressed := ExecuteNoteProperties(FEditNote, CT_SURGERY, IS_ID_CHILD, IS_ID_CHILD, AClassName, 0)
1333      else OKPressed := True;
1334    if not OKPressed then Exit;
1335    // update display fields & uPCEEdit
1336    lblNewTitle.Caption := ' ' + FEditNote.TitleName + ' ';
1337    if (FEditNote.Addend > 0) and (CompareText(Copy(lblNewTitle.Caption, 2, 8), 'Addendum') <> 0)
1338      then lblNewTitle.Caption := ' Addendum to:' + lblNewTitle.Caption;
1339    with lblNewTitle do bvlNewTitle.SetBounds(Left - 1, Top - 1, Width + 2, Height + 2);
1340    lblRefDate.Caption := FormatFMDateTime('mmm dd,yyyy@hh:nn', FEditNote.DateTime);
1341    lblAuthor.Caption  := FEditNote.AuthorName;
1342    if uPCEEdit.Inpatient then x := 'Adm: ' else x := 'Vst: ';
1343    x := x + FormatFMDateTime('mm/dd/yy', FEditNote.VisitDate) + '  ' + FEditNote.LocationName;
1344    lblVisit.Caption   := x;
1345    if Length(FEditNote.CosignerName) > 0
1346      then lblCosigner.Caption := 'Expected Cosigner: ' + FEditNote.CosignerName
1347      else lblCosigner.Caption := '';
1348    uPCEEdit.NoteTitle  := FEditNote.Title;
1349    // modify signature requirements if author or cosigner changed
1350    if (User.DUZ <> FEditNote.Author) and (User.DUZ <> FEditNote.Cosigner)
1351      then Changes.ReplaceSignState(CH_SUR, lstNotes.ItemID, CH_SIGN_NA)
1352      else Changes.ReplaceSignState(CH_SUR, lstNotes.ItemID, CH_SIGN_YES);
1353    x := lstNotes.Items[EditingIndex];
1354    SetPiece(x, U, 2, lblNewTitle.Caption);
1355    SetPiece(x, U, 3, FloatToStr(FEditNote.DateTime));
1356    tvSurgery.Selected.Text := MakeNoteDisplayText(x);
1357    TORTreeNode(tvSurgery.Selected).StringData := x;
1358    lstNotes.Items[EditingIndex] := x;
1359    Changes.ReplaceText(CH_SUR, lstNotes.ItemID, GetTitleText(EditingIndex));
1360    if LastTitle <> FEditNote.Title then mnuActLoadBoilerClick(Self);
1361  end;