Function

TfrmDCSumm.AllowContextChange

Directives

Override

Module

fDCSumm

Last Modified

7/15/2014 3:26:36 PM

Comments

TPage common methods ---------------------------------------------------------------------

Visibility

Public

Overrides

TfrmPage.AllowContextChange

Owner

TfrmDCSumm

Declaration

function  AllowContextChange(var WhyNot: string): Boolean; override;

Calls Hierarchy


TfrmDCSumm.AllowContextChange
 └TfrmDCSumm.SaveCurrentSumm
   └TfrmDCSumm.SaveEditedSumm
     ├TfrmDCSumm.tvSummsChange
     │ ├CanBeAttached
     │ ├CanReceiveAttachment
     │ ├TraverseTree
     │ │ ├ContextMatch
     │ │ ├TextFound
     │ │ ├AddListViewItem
     │ │ └..(rec)..
     │ ├TfrmDCSumm.lvSummsSelectItem
     │ │ └TfrmDCSumm.lstSummsClick
     │ │   ├MakeDCSummDisplayText
     │ │   ├LoadDocumentText
     │ │   ├TfrmDCSumm.DisplayPCE
     │ │   │ ├TPCEData.AddStrData
     │ │   │ │ ├Add
     │ │   │ │ ├TPCEData.StrVisitType
     │ │   │ │ │ ├GetPCEDataText
     │ │   │ │ │ │ └GetDiagnosisText
     │ │   │ │ │ ├TPCEProc.ModText
     │ │   │ │ │ │ └ModifierName
     │ │   │ │ │ │   └ModifierIdx
     │ │   │ │ │ │     ├TPCEData.VisitDateTime
     │ │   │ │ │ │     │ └TPCEData.IsSecondaryVisit
     │ │   │ │ │ │     ├FMToday
     │ │   │ │ │ │     │ └FMNow
     │ │   │ │ │ │     └MixedCaseModifier
     │ │   │ │ │ └TPCEData.StrVisitType
     │ │   │ │ │   └AddTxt
     │ │   │ │ ├TPCEData.StrDiagnoses
     │ │   │ │ │ └GetPCEDataText...
     │ │   │ │ ├TPCEData.StrProcedures
     │ │   │ │ │ ├GetPCEDataText...
     │ │   │ │ │ └TPCEProc.ModText...
     │ │   │ │ ├TPCEData.StrImmunizations
     │ │   │ │ │ └GetPCEDataText...
     │ │   │ │ ├TPCEData.StrSkinTests
     │ │   │ │ │ └GetPCEDataText...
     │ │   │ │ ├TPCEData.StrPatientEds
     │ │   │ │ │ └GetPCEDataText...
     │ │   │ │ ├TPCEData.StrHealthFactors
     │ │   │ │ │ └GetPCEDataText...
     │ │   │ │ └TPCEData.StrExams
     │ │   │ │   └GetPCEDataText...
     │ │   │ ├GetVitalsFromDate
     │ │   │ │ ├TPCEData.IsSecondaryVisit
     │ │   │ │ └GetVitalsFromEncDateTime
     │ │   │ ├TPCEData.AddVitalData
     │ │   │ │ └FormatVitalForNote
     │ │   │ │   └ConvertVitalData
     │ │   │ ├CanEditPCE
     │ │   │ │ ├GetAskPCE
     │ │   │ │ └FutureEncounter
     │ │   │ │   └FMToday...
     │ │   │ ├TfrmDCSumm.ShowPCEControls
     │ │   │ ├TfrmDrawers.DisplayDrawers
     │ │   │ │ └..(rec)..
     │ │   │ ├ActOnDocument
     │ │   │ ├TPCEData.PCEForNote
     │ │   │ │ ├TEncounter.GetVisitStr
     │ │   │ │ │ └TEncounter.GetVisitCategory
     │ │   │ │ ├VisitStrForNote
     │ │   │ │ ├TPCEData.GetVisitString
     │ │   │ │ │ └TPCEData.VisitDateTime...
     │ │   │ │ ├TPCEData.CopyPCEData
     │ │   │ │ │ ├TPCEData.Clear
     │ │   │ │ │ │ ├ClearList
     │ │   │ │ │ │ ├TPCEProc.Clear
     │ │   │ │ │ │ │ └TPCEItem.Clear
     │ │   │ │ │ │ │   └TPCEItem.SetComment
     │ │   │ │ │ │ └TPCEProviderList.Clear
     │ │   │ │ │ │   └TPCEProviderList.GetPrimaryIdx
     │ │   │ │ │ ├TPCEProc.CopyProc
     │ │   │ │ │ │ └TPCEItem.SetComment
     │ │   │ │ │ ├TPCEProviderList.Assign
     │ │   │ │ │ └TPCEData.CopyPCEItems
     │ │   │ │ │   └TPCEItem.Assign
     │ │   │ │ │     └TPCEItem.SetComment
     │ │   │ │ ├TPCEData.IsSecondaryVisit
     │ │   │ │ ├GetLocSecondaryVisitCode
     │ │   │ │ ├TPCEData.Clear...
     │ │   │ │ ├LoadPCEDataForNote
     │ │   │ │ ├ListVisitTypeByLoc
     │ │   │ │ ├SetRPCEncLocation
     │ │   │ │ ├SCCValue
     │ │   │ │ ├TPCEProviderList.Add
     │ │   │ │ │ ├TPCEProviderList.GetPrimaryIdx
     │ │   │ │ │ ├TPCEProviderList.IndexOfProvider
     │ │   │ │ │ └TPCEProviderList.SetPrimaryIdx
     │ │   │ │ │   ├TPCEProviderList.GetPrimaryIdx
     │ │   │ │ │   └TPCEProviderList.SetPrimary
     │ │   │ │ ├AppendComment
     │ │   │ │ ├TPCEDiag.SetFromString
     │ │   │ │ │ └TPCEItem.SetFromString
     │ │   │ │ │   └TPCEItem.SetComment
     │ │   │ │ ├TPCEProc.SetFromString
     │ │   │ │ │ └TPCEItem.SetFromString...
     │ │   │ │ ├TPCEImm.SetFromString
     │ │   │ │ │ └TPCEItem.SetFromString...
     │ │   │ │ ├TPCESkin.SetFromString
     │ │   │ │ │ ├TPCEItem.SetFromString...
     │ │   │ │ │ └StrToFMDateTime
     │ │   │ │ ├TPCEPat.SetFromString
     │ │   │ │ │ └TPCEItem.SetFromString...
     │ │   │ │ ├TPCEHealth.SetFromString
     │ │   │ │ │ └TPCEItem.SetFromString...
     │ │   │ │ └TPCEExams.SetFromString
     │ │   │ │   └TPCEItem.SetFromString...
     │ │   │ └GetVitalsFromNote
     │ │   │   ├TPCEData.IsSecondaryVisit
     │ │   │   ├GetVitalsFromEncDateTime
     │ │   │   └GetVitalFromNoteIEN
     │ │   └NotifyOtherApps
     │ │     ├AppNotificationEnabled
     │ │     │ └TNotifyAppsThread.CreateThread
     │ │     └TNotifyAppsThread.ResumeIfIdle
     │ ├TfrmDCSumm.ShowPCEControls
     │ └TfrmDCSumm.lstSummsClick...
     ├TfrmDCSumm.GetTitleText
     ├TfrmDCSumm.mnuActDeleteClick
     │ ├TfrmDCSumm.NoSummSelected
     │ ├ActOnDocument
     │ ├SelectDeleteReason
     │ │ ├JustifyDocumentDelete
     │ │ └TfrmBase508Form.Create
     │ │   ├TfrmBase508Form.UpdateAccessibilityActions
     │ │   ├UnfocusableControlEnter
     │ │   └AdjustControls
     │ │     ├TfrmBase508Form.ModifyUnfocusableControl
     │ │     └..(rec)..
     │ ├MakeDCSummDisplayText
     │ ├TfrmDCSumm.LockSumm
     │ │ ├TChanges.Exist
     │ │ └LockDocument
     │ ├JustifyDocumentDelete
     │ ├TfrmDCSumm.SaveCurrentSumm...
     │ ├TfrmDCSumm.SetEditingIndex
     │ ├VisitStrForNote
     │ ├TfrmDCSumm.RemovePCEFromChanges
     │ │ ├VisitStrForNote
     │ │ └TChanges.Remove
     │ │   ├UnlockOrder
     │ │   └UnlockDocument
     │ ├DeleteDocument
     │ ├TChanges.Exist
     │ ├UnlockDocument
     │ ├TChanges.Remove...
     │ ├DeletePCE
     │ ├TfrmDCSumm.ClearEditControls
     │ │ ├TPCEData.Clear...
     │ │ └TfrmDCSumm.SetEditingIndex
     │ ├TfrmDCSumm.LoadSumms
     │ │ ├KillDocTreeObjects
     │ │ │ └ResetDocTreeObjectStrings
     │ │ ├ListSummsForTree
     │ │ ├CreateListItemsForDocumentTree
     │ │ ├TfrmDCSumm.UpdateTreeView
     │ │ │ └BuildDocumentTree
     │ │ │   ├MakeNoteDisplayText
     │ │ │   ├MakeConsultNoteDisplayText
     │ │ │   ├MakeDCSummDisplayText
     │ │ │   ├MakeNoteTreeObject
     │ │ │   │ └MakeNoteDisplayText
     │ │ │   ├MakeConsultsNoteTreeObject
     │ │ │   │ ├MakeConsultNoteDisplayText
     │ │ │   │ └GetConsultOrderIEN
     │ │ │   ├MakeDCSummTreeObject
     │ │ │   │ └MakeDCSummDisplayText
     │ │ │   ├SetTreeNodeImagesAndFormatting
     │ │ │   │ ├ExternalName
     │ │ │   │ ├TextFound
     │ │ │   │ └MakeBold
     │ │ │   └..(rec)..
     │ │ ├RemoveParentsWithNoChildren
     │ │ │ └KillDocTreeNode
     │ │ │   └ResetDocTreeObjectStrings
     │ │ └TfrmDCSumm.tvSummsChange...
     │ ├UpdateReminderFinish
     │ │ └TfrmRemDlg.UpdateButtons
     │ │   ├TfrmRemDlg.BackReminder
     │ │   │ └TfrmRemDlg.GetCurReminderList
     │ │   │   └TReminderDialog.GetIEN
     │ │   └TfrmRemDlg.NextReminder
     │ │     └TfrmRemDlg.GetCurReminderList...
     │ ├TfrmDCSumm.ShowPCEControls
     │ └TfrmDrawers.DisplayDrawers...
     ├TfrmDCSumm.cmdChangeClick
     │ ├ExecuteDCSummProperties
     │ │ ├TfrmBase508Form.Create...
     │ │ ├ListDCSummTitlesShort
     │ │ │ └LoadDCSummTitles
     │ │ │   └TDCSummTitles.Create
     │ │ ├LoadDCUrgencies
     │ │ ├TfrmDCSummProperties.ShowAdmissionList
     │ │ │ └ListAdmitAll
     │ │ ├PrintNameForTitle
     │ │ ├StrToFMDateTime
     │ │ ├GetDischargeDate
     │ │ ├FMNow
     │ │ └GetTIUListItem
     │ ├TChanges.ReplaceSignState
     │ ├MakeDCSummDisplayText
     │ ├TChanges.ReplaceText
     │ ├TfrmDCSumm.GetTitleText
     │ └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...
     │   └QuickAddWith508Msg
     │     └SpeakTextInserted
     ├TPCEData.GetCPTRequired
     │ └TPCEData.NeededPCEData
     │   ├FutureEncounter...
     │   ├PromptForWorkload
     │   ├TPCEData.StandAlone
     │   │ └HasVisit
     │   ├TPCEData.GetHasCPTList
     │   │ └AddList
     │   │   └TPCEItem.HasCPTStr
     │   ├DataHasCPTCodes
     │   ├RequireExposures
     │   └EligbleConditions
     ├RequireMASVerification
     ├RequireRelease
     ├PutEditedDCSumm
     │ └SetText
     │   └InitParams
     ├TChanges.Remove...
     ├UnlockDocument
     ├TfrmDCSumm.SetEditingIndex
     └TfrmDCSumm.lstSummsClick...

Called-By Hierarchy


                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┘   

Calls

Name Declaration Comments
TfrmDCSumm.SaveCurrentSumm procedure SaveCurrentSumm(var Saved: Boolean); -

Called-By

Name Declaration Comments
TfrmFrame.AllowContextChangeAll function AllowContextChangeAll(var Reason: string): Boolean; -


Source

393   function TfrmDCSumm.AllowContextChange(var WhyNot: string): Boolean;
394   begin
395     dlgFindText.CloseDialog;
396     Result := inherited AllowContextChange(WhyNot);  // sets result = true
397     if Assigned(frmTemplateDialog) then
398       if Screen.ActiveForm = frmTemplateDialog then
399       //if (fsModal in frmTemplateDialog.FormState) then
400       case BOOLCHAR[frmFrame.CCOWContextChanging] of
401         '1': begin
402                WhyNot := 'A template in progress will be aborted.  ';
403                Result := False;
404              end;
405         '0': begin
406                if WhyNot = 'COMMIT' then
407                  begin
408                    FSilent := True;
409                    frmTemplateDialog.Silent := True;
410                    frmTemplateDialog.ModalResult := mrCancel;
411                  end;
412              end;
413       end;
414     if EditingIndex <> -1 then
415       case BOOLCHAR[frmFrame.CCOWContextChanging] of
416       '1': begin
417                if memNewSumm.GetTextLen > 0 then
418                  WhyNot := WhyNot + 'A discharge summary in progress will be saved as unsigned.  '
419                else
420                  WhyNot := WhyNot + 'An empty discharge summary in progress will be deleted.  ';
421              Result := False;
422            end;
423       '0': begin
424              if WhyNot = 'COMMIT' then FSilent := True;
425              SaveCurrentSumm(Result);
426            end;
427     end;
428     if Assigned(frmEncounterFrame) then
429       if Screen.ActiveForm = frmEncounterFrame then
430       //if (fsModal in frmEncounterFrame.FormState) then
431       case BOOLCHAR[frmFrame.CCOWContextChanging] of
432         '1': begin
433                WhyNot := WhyNot + 'Encounter information being edited will not be saved';
434                Result := False;
435              end;
436         '0': begin
437                if WhyNot = 'COMMIT' then
438                  begin
439                    FSilent := True;
440                    frmEncounterFrame.Abort := False;
441                    frmEncounterFrame.Cancel := True;
442                  end;
443              end;
444       end;
445   end;