Procedure

TfrmConsults.cmdChangeClick

Module

fConsults

Last Modified

7/15/2014 3:26:34 PM

Visibility

Public/Published

Owner

TfrmConsults

Declaration

procedure cmdChangeClick(Sender: TObject);

Calls Hierarchy


TfrmConsults.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
 │ │ │   └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
 ├MakeConsultNoteDisplayText
 ├TChanges.ReplaceText
 ├TfrmConsults.GetTitleText
 │ └MakeConsultNoteDisplayText
 ├TfrmConsults.LockConsultRequest
 │ ├GetConsultOrderIEN
 │ ├TfrmNotes.ActiveEditOf
 │ └OrderCanBeLocked
 │   └LockOrder
 ├UnlockOrderIfAble
 │ └UnlockOrder
 ├GetConsultOrderIEN
 └TfrmConsults.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
   ├QueryBoilerPlate
   │ └TfrmBase508Form.Create...
   └QuickCopyWith508Msg...

Called-By Hierarchy


                                           TfrmConsults.cmdChangeClick
                                        TfrmConsults.CompleteConsult┤ 
                                  TfrmConsults.mnuActCompleteClick┤ │ 
                                TfrmConsults.mnuActAddIDEntryClick┘ │ 
                                         TfrmConsults.InsertAddendum┤ 
                              TfrmConsults.mnuActMakeAddendumClick┘ │ 
                                            TfrmConsults.LoadForEdit┤ 
                                  TfrmConsults.mnuActNoteEditClick┘ │ 
                                TfrmConsults.mnuActCompleteClick┘   │ 
                                      TfrmConsults.SaveEditedConsult┤ 
                                      TfrmConsults.SaveCurrentNote┘ │ 
                                 TfrmConsults.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┘   │   │ 
                                     TfrmConsults.SetViewContext┤   │ 
                                      TfrmConsults.DisplayPage┤ │   │ 
                      TfrmConsults.mnuViewReturntoDefaultClick┘ │   │ 
                                       TfrmConsults.mnuViewClick┤   │ 
                                TfrmConsults.SetViewContext...┘ │   │ 
                      TfrmConsults.mnuActDetachFromIDParentClick┤   │ 
                              TfrmConsults.mnuActNoteDeleteClick┤   │ 
                             TfrmConsults.SaveEditedConsult...┘ │   │ 
                           TfrmConsults.mnuActSignatureSaveClick┤   │ 
                           TfrmConsults.mnuActSignatureSignClick┤   │ 
                                       TfrmConsults.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┘               │   │ 
                                 TfrmConsults.mnuActConsultClick┤   │ 
                                       TfrmConsults.RequestPrint┤   │ 
                            TfrmConsults.mnuActPrintSF513Click┤ │   │ 
                                   TfrmFrame.mnuFilePrintClick┘ │   │ 
                          TfrmConsults.mnuActDisplayResultsClick┤   │ 
                             TfrmConsults.ProcessNotifications┘ │   │ 
                                    TfrmConsults.DisplayPage┘   │   │ 
                            TfrmConsults.mnuActDisplaySF513Click┤   │ 
                              TfrmConsults.mnuActPrintSF513Click┤   │ 
                          TfrmConsults.mnuActDisplayDetailsClick┤   │ 
                                          TfrmConsults.FormClose┤   │ 
                     TfrmConsults.mnuActIdentifyAddlSignersClick┤   │ 
                         TfrmConsults.popNoteMemoAddlSignClick┘ │   │ 
                            TfrmConsults.ProcessNotifications...┤   │ 
                               TfrmConsults.mnuActNotePrintClick┤   │ 
                            TfrmConsults.popNoteMemoPrintClick┘ │   │ 
                                       TfrmConsults.StartNewEdit┤   │ 
                              TfrmConsults.mnuActCompleteClick┤ │   │ 
                            TfrmConsults.mnuActAddIDEntryClick┤ │   │ 
                          TfrmConsults.mnuActMakeAddendumClick┤ │   │ 
                           TfrmConsults.mnuActNoteEditClick...┘ │   │ 
                                TfrmConsults.tvCsltNotesDragDrop┤   │ 
                               TfrmConsults.tvCsltNotesStartDrag┤   │ 
                        TfrmConsults.mnuActAttachtoIDParentClick┤   │ 
                                 TfrmConsults.LstConsultsToPrint┘   │ 
                      TfrmFrame.mnuFilePrintSelectedItemsClick┘     │ 
                                      TfrmConsults.mnuActChangeClick┘ 

Calls

Name Declaration Comments
ExecuteNoteProperties function ExecuteNoteProperties(var ANote: TEditNoteRec; CallingTab: integer; IDNoteTitlesOnly, IsNewIDEntry: boolean; AClassName: string; CPStatusFlag: integer): Boolean; -
GetConsultOrderIEN function GetConsultOrderIEN(ConsultIEN: integer): string; -
TfrmConsults.GetTitleText function GetTitleText(AnIndex: Integer): string; -
TfrmConsults.LockConsultRequest function LockConsultRequest(AConsult: Integer): Boolean; -
MakeConsultNoteDisplayText function MakeConsultNoteDisplayText(RawText: string): string; -
TfrmConsults.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); -
UnlockOrderIfAble procedure UnlockOrderIfAble(OrderID: string); -

Called-By

Name Declaration Comments
TfrmConsults.CompleteConsult procedure CompleteConsult(IsIDChild: boolean; AnIDParent: integer; UseClinProcTitles: boolean); -
TfrmConsults.InsertAddendum procedure InsertAddendum; -
TfrmConsults.LoadForEdit procedure LoadForEdit ; -
TfrmConsults.mnuActChangeClick procedure mnuActChangeClick(Sender: TObject); -
TfrmConsults.SaveEditedConsult procedure SaveEditedConsult(var Saved: Boolean); -


Source

3894  procedure TfrmConsults.cmdChangeClick(Sender: TObject);
3895  var
3896    LastTitle, LastConsult: Integer;
3897    (*OKPressed, *)IsIDChild, UseClinProcTitles: Boolean;
3898    x, AClassName: string;
3899  begin
3900    inherited;
3901    FcmdChangeOKPressed := False;
3902    IsIDChild := uIDNotesActive and (FEditNote.IDParent > 0);
3903    LastTitle   := FEditNote.Title;
3904    LastConsult := FEditNote.PkgIEN;
3905    with MenuAccessRec do
3906      UseClinProcTitles := ((IsClinicalProcedure) and
3907                           (ClinProcFlag in [CP_NO_INSTRUMENT, CP_INSTR_INCOMPLETE, CP_INSTR_COMPLETE]));
3908    if UseClinProcTitles then AClassName := DCL_CLINPROC else AClassName := DCL_CONSULTS;
3909    if Sender <> Self then
3910      FcmdChangeOKPressed := ExecuteNoteProperties(FEditNote, CT_CONSULTS, IsIDChild, False, AClassName,
3911                                MenuAccessRec.ClinProcFlag)
3912    else FcmdChangeOKPressed := True;
3913    if not FcmdChangeOKPressed then Exit;
3914    // update display fields & uPCEEdit
3915    lblNewTitle.Caption := ' ' + FEditNote.TitleName + ' ';
3916    if (FEditNote.Addend > 0) and (CompareText(Copy(lblNewTitle.Caption, 2, 8), 'Addendum') <> 0)
3917      then lblNewTitle.Caption := ' Addendum to:' + lblNewTitle.Caption;
3918    with lblNewTitle do bvlNewTitle.SetBounds(Left - 1, Top - 1, Width + 2, Height + 2);
3919    lblRefDate.Caption := FormatFMDateTime('mmm dd,yyyy@hh:nn', FEditNote.DateTime);
3920    lblAuthor.Caption  := FEditNote.AuthorName;
3921    if uPCEEdit.Inpatient then x := 'Adm: ' else x := 'Vst: ';
3922    x := x + FormatFMDateTime('mm/dd/yy', FEditNote.VisitDate) + '  ' + FEditNote.LocationName;
3923    lblVisit.Caption   := x;
3924    if Length(FEditNote.CosignerName) > 0
3925      then lblCosigner.Caption := 'Expected Cosigner: ' + FEditNote.CosignerName
3926      else lblCosigner.Caption := '';
3927    uPCEEdit.NoteTitle  := FEditNote.Title;
3928    // modify signature requirements if author or cosigner changed
3929    if (User.DUZ <> FEditNote.Author) and (User.DUZ <> FEditNote.Cosigner)
3930      then Changes.ReplaceSignState(CH_CON, lstNotes.ItemID, CH_SIGN_NA)
3931      else Changes.ReplaceSignState(CH_CON, lstNotes.ItemID, CH_SIGN_YES);
3932    x := lstNotes.Items[EditingIndex];
3933    SetPiece(x, U, 2, lblNewTitle.Caption);
3934    SetPiece(x, U, 3, FloatToStr(FEditNote.DateTime));
3935    tvCsltNotes.Selected.Text := MakeConsultNoteDisplayText(x);
3936    TORTreeNode(tvCsltNotes.Selected).StringData := x;
3937    lstNotes.Items[EditingIndex] := x;
3938    Changes.ReplaceText(CH_CON, lstNotes.ItemID, GetTitleText(EditingIndex));
3939    if LastConsult <> FEditNote.PkgIEN then
3940    //if LastConsult <> FEditNote.Consult then
3941    begin
3942      // try to lock the new consult, reset to previous if unable
3943      if (FEditNote.PkgIEN > 0) and not LockConsultRequest(FEditNote.PkgIEN) then
3944      //if (FEditNote.Consult > 0) and not LockConsultRequest(FEditNote.Consult) then
3945      begin
3946        Infobox(TX_NO_ORD_CHG, TC_NO_ORD_CHG, MB_OK);
3947        FEditNote.PkgIEN := LastConsult;
3948        //FEditNote.Consult := LastConsult;
3949      end else
3950      begin
3951        // unlock the previous consult
3952        if LastConsult > 0 then UnlockOrderIfAble(GetConsultOrderIEN(LastConsult));
3953        if FEditNote.PkgIEN = 0 then FOrderID := '';
3954        //if FEditNote.Consult = 0 then FOrderID := '';
3955      end;
3956    end;
3957    if LastTitle <> FEditNote.Title then mnuActLoadBoilerClick(Self);
3958  end;