Function

TRemDlgElement.BuildControls

Module

uReminders

Last Modified

10/8/2014 2:49:30 PM

Visibility

Protected

Owner

TRemDlgElement

Declaration

function BuildControls(var Y: integer; ParentWidth: integer;
                            BaseParent, AOwner: TWinControl): TWinControl;

Calls Hierarchy


TRemDlgElement.BuildControls
 ├TRemDlgElement.TrueIndent
 │ ├TRemDlgElement.Indent
 │ ├TRemDlgElement.Box
 │ └TRemDlgElement.ChildrenIndent
 ├TRemDlgElement.ElemType
 ├GetPanel
 │ ├GetDialogEntry
 │ │ └TTemplateDialogEntry.Create
 │ │   ├TDlgFieldPanel.Create
 │ │   ├GetTemplateField
 │ │   │ ├LoadTemplateFieldByIEN
 │ │   │ ├LoadTemplateField
 │ │   │ └TTemplateField.Create
 │ │   │   ├TemplateFieldCode2Field
 │ │   │   └TemplateDateCode2DateType
 │ │   ├TTemplateField.GetRequired
 │ │   └TTemplateField.CreateDialogControls
 │ │     ├TCPRSDialogFieldEdit.Create
 │ │     │ └TCPRSDialogComponent.Create
 │ │     ├TTemplateField.GetRequired
 │ │     ├ht
 │ │     ├wdth
 │ │     ├TTemplateField.Width
 │ │     │ └StripEmbedded
 │ │     ├TTemplateDialogEntry.DoChange
 │ │     ├TCPRSDialogComboBox.Create
 │ │     │ └TCPRSDialogComponent.Create
 │ │     ├StripEmbedded
 │ │     ├TfraTemplateFieldButton.Create
 │ │     │ ├TfraTemplateFieldButton.ButtonKeyDown
 │ │     │ │ └TfraTemplateFieldButton.pnlBtnMouseDown
 │ │     │ │   ├TfraTemplateFieldButton.GetButtonText
 │ │     │ │   └TfraTemplateFieldButton.SetButtonText
 │ │     │ ├TfraTemplateFieldButton.ButtonKeyUp
 │ │     │ │ └TfraTemplateFieldButton.pnlBtnMouseUp
 │ │     │ └TCPRSDialogComponent.Create
 │ │     ├TfraTemplateFieldButton.SetButtonText
 │ │     ├TCPRSDialogCheckBox.Create
 │ │     │ └TCPRSDialogComponent.Create
 │ │     ├UpdateIndents
 │ │     │ └wdth
 │ │     ├StrToFMDateTime
 │ │     ├TCPRSDialogDateCombo.Create
 │ │     │ └TCPRSDialogComponent.Create
 │ │     ├TCPRSDialogDateBox.Create
 │ │     │ └TCPRSDialogComponent.Create
 │ │     ├TCPRSDialogNumber.CreatePanel
 │ │     │ └TCPRSDialogComponent.Create
 │ │     ├TTemplateDialogEntry.UpDownChange
 │ │     │ ├EnsureText
 │ │     │ └TTemplateDialogEntry.DoChange
 │ │     ├TCPRSDialogHyperlinkLabel.Create
 │ │     │ ├TCPRSDialogComponent.Create
 │ │     │ └TCPRSDialogHyperlinkLabel.KeyPressed
 │ │     │   └TCPRSDialogHyperlinkLabel.Clicked
 │ │     │     └GotoWebPage
 │ │     ├TCPRSDialogHyperlinkLabel.Init
 │ │     │ └TCPRSDialogHyperlinkLabel.Clicked...
 │ │     └TCPRSDialogRichEdit.Create
 │ │       └TCPRSDialogComponent.Create
 │ ├TTemplateDialogEntry.SetFieldValues
 │ │ └TTemplateDialogEntry.SetControlText
 │ │   └TfraTemplateFieldButton.SetButtonText
 │ ├TTemplateDialogEntry.SetAutoDestroyOnPanelFree
 │ │ └PanelDestroy
 │ ├TRemDlgElement.FieldPanelChange
 │ │ ├TReminderDialog.BeginTextChanged
 │ │ ├TTemplateDialogEntry.GetFieldValues
 │ │ │ └TTemplateDialogEntry.GetControlText
 │ │ │   ├GetTemplateField...
 │ │ │   ├GetOriginalItem
 │ │ │   │ ├GetTemplateField...
 │ │ │   │ └StripEmbedded
 │ │ │   └TfraTemplateFieldButton.GetButtonText
 │ │ └TReminderDialog.EndTextChanged
 │ └TTemplateDialogEntry.GetPanel
 │   ├Init
 │   │ ├TTemplateDialogEntry.KillLabels
 │   │ └ScreenReaderSystem_CurrentCheckBox
 │   │   └ScreenReaderSystem_Stop
 │   │     ├UpdateCheckBox
 │   │     ├UpdatePending
 │   │     └ScreenReaderSystem_Clear
 │   ├Text508Work
 │   │ ├TTemplateDialogEntry.StripCode
 │   │ ├ScreenReaderSystem_Stop...
 │   │ ├StripSRCode
 │   │ └ScreenReaderSystem_Continue
 │   ├TTemplateDialogEntry.StripCode
 │   ├NextLine
 │   ├DoLabel
 │   │ ├Add2TabOrder
 │   │ ├ScreenReaderSystem_CurrentLabel
 │   │ │ └ScreenReaderSystem_Stop...
 │   │ └ScreenReaderSystem_AddText
 │   ├Ctrl508Work
 │   │ ├ScreenReaderSystem_CurrentLabel...
 │   │ ├ScreenReaderSystem_AddText
 │   │ ├ScreenReaderSystem_Stop...
 │   │ ├Add2TabOrder
 │   │ └ScreenReaderSystem_CurrentComponent
 │   │   ├UpdateCheckBox
 │   │   ├UpdatePending
 │   │   └ScreenReaderSystem_Stop...
 │   ├TTemplateDialogEntry.SetFieldValues...
 │   └ScreenReaderSystem_Stop...
 ├TRemDlgElement.EntryID
 ├CRLFText
 │ └InitText
 ├UpdatePrompts
 │ ├TRemDlgElement.FieldPanelEntered
 │ │ └TDlgFieldPanel.SetTheFocus
 │ ├TRemDlgElement.FieldPanelExited
 │ │ └TDlgFieldPanel.SetTheFocus
 │ └AddPrompts
 │   ├TRemPrompt.PromptOK
 │   │ ├TRemPrompt.PromptType
 │   │ │ └Code2PromptType
 │   │ ├TRemDlgElement.Historical
 │   │ ├TRemPrompt.RemDataActive
 │   │ │ └TRemPrompt.CompareActiveDate
 │   │ └TRemPrompt.CompareActiveDate
 │   ├TRemPrompt.Forced
 │   ├TRemPrompt.PromptType...
 │   ├TRemPrompt.Required
 │   │ └TRemPrompt.PromptType...
 │   ├TCPRSDialogFieldEdit.Create...
 │   ├TRemPrompt.GetValue
 │   │ ├TRemDlgElement.Historical
 │   │ ├TPCEData.VisitDateTime
 │   │ │ └TPCEData.IsSecondaryVisit
 │   │ ├TRemPrompt.RemDataActive...
 │   │ └TRemPrompt.RemDataChoiceActive
 │   ├TRemPrompt.EditKeyPress
 │   ├TRemPrompt.PromptChange
 │   │ ├TReminderDialog.BeginTextChanged
 │   │ ├TRemPrompt.GetValue...
 │   │ ├TRemPrompt.PromptType...
 │   │ ├FMToday
 │   │ │ └FMNow
 │   │ ├TRemPrompt.Caption
 │   │ │ └AssignFieldIDs
 │   │ │   └GetNewFieldID
 │   │ ├SelectDevice
 │   │ │ ├TfrmBase508Form.Create
 │   │ │ │ ├TfrmBase508Form.UpdateAccessibilityActions
 │   │ │ │ ├UnfocusableControlEnter
 │   │ │ │ └AdjustControls
 │   │ │ │   ├TfrmBase508Form.ModifyUnfocusableControl
 │   │ │ │   └..(rec)..
 │   │ │ └GetDefaultPrinter
 │   │ ├FMNow
 │   │ ├MHDLLFound
 │   │ │ └CheckforMHDll
 │   │ │   ├LoadMHDLL
 │   │ │   └UnloadMHDLL
 │   │ ├TReminderDialog.BeginNeedRedraw
 │   │ ├TRemPrompt.SetValue
 │   │ │ ├TRemPrompt.Forced
 │   │ │ ├TRemPrompt.PromptType...
 │   │ │ ├FMToday...
 │   │ │ ├TRemPrompt.GetValue...
 │   │ │ ├TPCEData.VisitDateTime...
 │   │ │ ├TRemData.InternalValue
 │   │ │ ├TRemDlgElement.Historical
 │   │ │ ├TRemPrompt.RemDataActive...
 │   │ │ ├TRemPrompt.RemDataChoiceActive
 │   │ │ ├IsSyncPrompt
 │   │ │ ├TRemPCERoot.Sync
 │   │ │ │ ├TRemPrompt.PromptType...
 │   │ │ │ ├TRemPrompt.GetValue...
 │   │ │ │ ├TRemPrompt.Forced
 │   │ │ │ ├TRemDlgElement.IsChecked
 │   │ │ │ ├TRemPrompt.SetValue...
 │   │ │ │ └TRemDlgElement.cbClicked
 │   │ │ │   ├TReminderDialog.BeginTextChanged
 │   │ │ │   ├TReminderDialog.BeginNeedRedraw
 │   │ │ │   ├TRemDlgElement.SetChecked
 │   │ │ │   │ ├TRemDlgElement.GetData
 │   │ │ │   │ │ ├GetDialogPrompts
 │   │ │ │   │ │ ├TRemDlgElement.Historical
 │   │ │ │   │ │ ├TRemDlgElement.FindingType
 │   │ │ │   │ │ │ └TRemDlgElement.ElemType
 │   │ │ │   │ │ ├TReminderDialog.GetDlgSL
 │   │ │ │   │ │ │ ├TReminderDialog.GetIEN
 │   │ │ │   │ │ │ └GetDialogInfo
 │   │ │ │   │ │ └TRemDlgElement.UpdateData
 │   │ │ │   │ │   ├TReminderDialog.GetDlgSL...
 │   │ │ │   │ │   ├Code2DataType
 │   │ │ │   │ │   ├MHTestsOK
 │   │ │ │   │ │   ├TRemPrompt.Create
 │   │ │ │   │ │   ├TRemData.Add2PN
 │   │ │ │   │ │   ├TPCEData.VisitDateTime...
 │   │ │ │   │ │   ├TRemDlgElement.OneValidCode
 │   │ │ │   │ │   │ ├TRemPrompt.Create
 │   │ │ │   │ │   │ └TRemPrompt.CompareActiveDate
 │   │ │ │   │ │   ├TRemDlgElement.setActiveDates
 │   │ │ │   │ │   ├TRemPCERoot.GetRoot
 │   │ │ │   │ │   ├TRemDlgElement.Historical
 │   │ │ │   │ │   ├Code2VitalType
 │   │ │ │   │ │   ├MHDLLFound...
 │   │ │ │   │ │   ├Code2PromptType
 │   │ │ │   │ │   ├TRemPrompt.InitValue
 │   │ │ │   │ │   │ ├TRemPrompt.InternalValue
 │   │ │ │   │ │   │ ├TRemPrompt.PromptType...
 │   │ │ │   │ │   │ ├GetPCECodes
 │   │ │ │   │ │   │ │ ├LoadHistLocations
 │   │ │ │   │ │   │ │ └CodeSetIndex
 │   │ │ │   │ │   │ │   ├LoadImmSeriesItems
 │   │ │ │   │ │   │ │   ├LoadImmReactionItems
 │   │ │ │   │ │   │ │   ├LoadSkResultsItems
 │   │ │ │   │ │   │ │   ├LoadPEDLevelItems
 │   │ │ │   │ │   │ │   ├LoadHFLevelItems
 │   │ │ │   │ │   │ │   └LoadXAMResultsItems
 │   │ │ │   │ │   │ ├TRemPrompt.Forced
 │   │ │ │   │ │   │ ├IsSyncPrompt
 │   │ │ │   │ │   │ ├TRemPCERoot.GetValue
 │   │ │ │   │ │   │ └TRemPrompt.SetValueFromParent
 │   │ │ │   │ │   │   └TRemPrompt.SetValue...
 │   │ │ │   │ │   ├PrepText4NextLine
 │   │ │ │   │ │   └ExpandTIUObjects
 │   │ │ │   │ │     ├TdmodShared.BoilerplateOK
 │   │ │ │   │ │     │ ├ErrCount
 │   │ │ │   │ │     │ ├AddErr
 │   │ │ │   │ │     │ └TdmodShared.LoadTIUObjects
 │   │ │ │   │ │     │   └GetObjectList
 │   │ │ │   │ │     └GetTemplateText
 │   │ │ │   │ │       └TEncounter.GetVisitStr
 │   │ │ │   │ │         └TEncounter.GetVisitCategory
 │   │ │ │   │ ├TRemDlgElement.Check4ChildrenSharedPrompts
 │   │ │ │   │ │ ├TRemDlgElement.ChildrenSharePrompts
 │   │ │ │   │ │ ├TRemDlgElement.GetData...
 │   │ │ │   │ │ └TRemPrompt.CanShare
 │   │ │ │   │ │   ├TRemPrompt.Forced
 │   │ │ │   │ │   ├TRemPrompt.Required...
 │   │ │ │   │ │   ├TRemPrompt.PromptType...
 │   │ │ │   │ │   ├TRemPrompt.Add2PN
 │   │ │ │   │ │   │ ├TRemPrompt.Forced
 │   │ │ │   │ │   │ └TRemPrompt.PromptOK...
 │   │ │ │   │ │   └TRemPrompt.Caption...
 │   │ │ │   │ ├TRemDlgElement.ChildrenRequired
 │   │ │ │   │ ├..(rec)..
 │   │ │ │   │ ├UpdateForcedValues
 │   │ │ │   │ │ ├TRemDlgElement.IsChecked
 │   │ │ │   │ │ ├TRemPrompt.Forced
 │   │ │ │   │ │ ├TRemPrompt.SetValueFromParent...
 │   │ │ │   │ │ └..(rec)..
 │   │ │ │   │ ├TRemPrompt.Forced
 │   │ │ │   │ ├IsSyncPrompt
 │   │ │ │   │ ├TRemPrompt.PromptType...
 │   │ │ │   │ └TRemPCERoot.UnSync
 │   │ │ │   │   └TRemPrompt.Forced
 │   │ │ │   ├TReminderDialog.EndNeedRedraw
 │   │ │ │   └TReminderDialog.EndTextChanged
 │   │ │ ├TReminderDialog.Visible
 │   │ │ │ └CurrentReminderInDialog
 │   │ │ ├TRemPrompt.VitalValue
 │   │ │ │ └TRemPrompt.GetValue...
 │   │ │ └TRemPrompt.VitalUnitValue
 │   │ │   ├TRemPrompt.VitalType
 │   │ │   │ ├Code2VitalType
 │   │ │   │ └TRemData.InternalValue
 │   │ │   └TRemPrompt.GetValue...
 │   │ ├TReminderDialog.EndNeedRedraw
 │   │ └TReminderDialog.EndTextChanged
 │   ├TCPRSDialogComboBox.Create...
 │   ├TRemPrompt.ComboBoxKeyDown
 │   ├GetComboBoxMinMax
 │   ├PCELoadORCombo
 │   │ └PCELoadORComboData
 │   │   ├GetPCECodes...
 │   │   └GetComboBoxMinMax
 │   ├GetDefLocations
 │   ├TRemData.DisplayWHResults
 │   ├NextLine
 │   ├TCPRSDialogButton.Create
 │   │ └TCPRSDialogComponent.Create
 │   ├TRemPrompt.DoWHReport
 │   │ └ReportBox
 │   │   └CreateReportBox
 │   │     └TfrmBase508Form.Create...
 │   ├ScreenReaderSupport
 │   │ ├ScreenReaderSystem_CurrentComponent...
 │   │ └ScreenReaderSystem_Stop...
 │   ├TCPRSDialogCheckBox.Create...
 │   ├ProcessLabel
 │   │ ├TRemPrompt.Caption...
 │   │ ├ScreenReaderSystem_CurrentLabel...
 │   │ └ScreenReaderSystem_AddText
 │   ├TRemPrompt.ViewWHText
 │   │ └ReportBox...
 │   ├TCPRSDialogDateCombo.Create...
 │   ├TRemPrompt.Caption...
 │   ├TRemDlgElement.ParentCBEnter
 │   ├TRemDlgElement.ParentCBExit
 │   ├TRemDlgElement.SubCommentChange
 │   │ ├TRemPrompt.PromptType...
 │   │ ├TRemPrompt.Caption...
 │   │ └TRemPrompt.SetValue...
 │   ├TRemPrompt.VitalType...
 │   ├InitPainCombo
 │   ├TRemPrompt.VitalValue...
 │   ├TVitalEdit.Create
 │   │ └TCPRSDialogComponent.Create
 │   ├TRemPrompt.VitalVerify
 │   │ ├ConvertHeight2Inches
 │   │ └VitalInvalid
 │   │   ├VerifyVital
 │   │   ├IsNumericWeight
 │   │   └VitalErrorText
 │   ├TVitalComboBox.Create
 │   │ └TCPRSDialogComponent.Create
 │   ├VitalControlTag
 │   ├TVitalComboBox.SelectByID
 │   ├TRemPrompt.VitalUnitValue...
 │   ├TRemDlgElement.Historical
 │   ├TPCEData.VisitDateTime...
 │   ├TReminderDialog.ComboBoxCheckedText
 │   ├TReminderDialog.ComboBoxResized
 │   ├MHDLLFound...
 │   ├TRemPrompt.DoMHTest
 │   │ ├MHTestAuthorized
 │   │ ├TRemData.Narrative
 │   │ ├TReminderDialog.BeginTextChanged
 │   │ ├TRemDlgElement.IncludeMHTestInPN
 │   │ ├TRemPrompt.GetValue...
 │   │ ├PerformMHTest
 │   │ │ └TfrmMHTest.CallMHDLL
 │   │ │   ├LoadMHDLL
 │   │ │   └UnloadMHDLL
 │   │ ├TimedOut
 │   │ ├GetMHResultText
 │   │ ├TRemPrompt.SetValue...
 │   │ ├MentalHealthTestResults
 │   │ ├ExpandTIUObjects...
 │   │ └TReminderDialog.EndTextChanged
 │   ├TRemPrompt.ForcedCaption
 │   │ ├TRemPrompt.Caption...
 │   │ ├TRemPrompt.PromptType...
 │   │ ├TRemPrompt.VitalType...
 │   │ └TRemData.Narrative
 │   ├GAFURL
 │   ├TRemPrompt.GAFHelp
 │   │ ├GotoWebPage
 │   │ └GAFURL
 │   ├TRemPrompt.SameLine
 │   ├TRemDlgElement.TrueIndent...
 │   ├ScreenReaderSystem_CurrentComponent...
 │   ├ScreenReaderSystem_Stop...
 │   └TRemDlgElement.Enabled
 │     └TRemDlgElement.EnableChildren
 │       ├..(rec)..
 │       └TRemDlgElement.ElemType
 ├TRemDlgElement.cbClicked...
 ├TRemDlgElement.cbEntered
 │ └UnfocusableControlEnter
 ├TRemDlgElement.ParentCBExit
 ├TRemDlgElement.FieldPanelKeyPress
 │ └TRemDlgElement.FieldPanelOnClick
 ├TRemDlgElement.FieldPanelOnClick
 ├TRemDlgElement.FieldPanelLabelOnClick
 │ └TRemDlgElement.FieldPanelOnClick
 ├TRemDlgElement.ChildrenRequired
 ├TRemDlgElement.ShowChildren
 │ ├TRemDlgElement.ElemType
 │ └TRemDlgElement.HideChildren
 ├TRemDlgElement.Box
 ├TRemDlgElement.ChildrenIndent
 ├TRemDlgElement.BoxCaption
 │ └TRemDlgElement.Box
 ├TRemDlgElement.EnableChildren...
 ├..(rec)..
 ├AddPrompts...
 ├TRemDlgElement.SubCommentChange...
 └ScreenReaderSystem_Stop...

Called-By Hierarchy


                                                                          TRemDlgElement.BuildControls
                                                                       TReminderDialog.BuildControls┤ 
                                                                          TfrmRemDlg.BuildControls┘ │ 
                                                                      TfrmRemDlg.ProcessReminder┤   │ 
                                                                            ViewRemDlgFromForm┤ │   │ 
                                                                                  ViewRemDlg┤ │ │   │ 
                                                                        ViewReminderDialog┤ │ │ │   │ 
                                                          TfrmDrawers.tvRemindersMouseUp┤ │ │ │ │   │ 
                                                          TfrmDrawers.RemindersChanged┘ │ │ │ │ │   │ 
                                                             TfrmDrawers.ShowDrawers┘   │ │ │ │ │   │ 
                                                         TfrmDrawers.CreateDrawers┤     │ │ │ │ │   │ 
                                                           TfrmDCSumm.FormCreate┤ │     │ │ │ │ │   │ 
                                                         TfrmConsults.FormCreate┤ │     │ │ │ │ │   │ 
                                                          TfrmSurgery.FormCreate┤ │     │ │ │ │ │   │ 
                                                            TfrmNotes.FormCreate┘ │     │ │ │ │ │   │ 
                                                        TfrmDrawers.DisplayDrawers┘     │ │ │ │ │   │ 
                                                         TfrmConsults.DisplayPCE┤       │ │ │ │ │   │ 
                                                 TfrmConsults.lstConsultsClick┤ │       │ │ │ │ │   │ 
                                               TfrmConsults.tvConsultsChange┘ │ │       │ │ │ │ │   │ 
                                TfrmConsults.mnuActDetachFromIDParentClick┤   │ │       │ │ │ │ │   │ 
                                                  TfrmConsults.NotifyOrder┤   │ │       │ │ │ │ │   │ 
                                                    TfrmFrame.UMNewOrder┘ │   │ │       │ │ │ │ │   │ 
                                    TfrmConsults.mnuActDisplayDetailsClick┤   │ │       │ │ │ │ │   │ 
                               TfrmConsults.mnuActIdentifyAddlSignersClick┤   │ │       │ │ │ │ │   │ 
                                   TfrmConsults.popNoteMemoAddlSignClick┘ │   │ │       │ │ │ │ │   │ 
                                         TfrmConsults.ProcessNotifications┤   │ │       │ │ │ │ │   │ 
                                                TfrmConsults.DisplayPage┘ │   │ │       │ │ │ │ │   │ 
                                                 TfrmConsults.LoadConsults┤   │ │       │ │ │ │ │   │ 
                                                 TfrmConsults.UpdateList┤ │   │ │       │ │ │ │ │   │ 
                                             TfrmConsults.mnuViewClick┤ │ │   │ │       │ │ │ │ │   │ 
                                         TfrmConsults.SetViewContext┘ │ │ │   │ │       │ │ │ │ │   │ 
                                          TfrmConsults.DisplayPage┤   │ │ │   │ │       │ │ │ │ │   │ 
                          TfrmConsults.mnuViewReturntoDefaultClick┘   │ │ │   │ │       │ │ │ │ │   │ 
                                    TfrmConsults.mnuActNoteDeleteClick┤ │ │   │ │       │ │ │ │ │   │ 
                                      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.mnuViewClick...┤     │ │ │   │ │       │ │ │ │ │   │ 
                      TfrmConsults.mnuActDetachFromIDParentClick┤     │ │ │   │ │       │ │ │ │ │   │ 
                           TfrmConsults.mnuActNoteDeleteClick...┤     │ │ │   │ │       │ │ │ │ │   │ 
                           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.mnuActDisplaySF513Click┤     │ │ │   │ │       │ │ │ │ │   │ 
                              TfrmConsults.mnuActPrintSF513Click┤     │ │ │   │ │       │ │ │ │ │   │ 
                          TfrmConsults.mnuActDisplayDetailsClick┤     │ │ │   │ │       │ │ │ │ │   │ 
                                          TfrmConsults.FormClose┤     │ │ │   │ │       │ │ │ │ │   │ 
                  TfrmConsults.mnuActIdentifyAddlSignersClick...┤     │ │ │   │ │       │ │ │ │ │   │ 
                            TfrmConsults.ProcessNotifications...┤     │ │ │   │ │       │ │ │ │ │   │ 
                               TfrmConsults.mnuActNotePrintClick┤     │ │ │   │ │       │ │ │ │ │   │ 
                            TfrmConsults.popNoteMemoPrintClick┘ │     │ │ │   │ │       │ │ │ │ │   │ 
                                       TfrmConsults.StartNewEdit┤     │ │ │   │ │       │ │ │ │ │   │ 
                              TfrmConsults.mnuActCompleteClick┤ │     │ │ │   │ │       │ │ │ │ │   │ 
                            TfrmConsults.mnuActAddIDEntryClick┤ │     │ │ │   │ │       │ │ │ │ │   │ 
                          TfrmConsults.mnuActMakeAddendumClick┤ │     │ │ │   │ │       │ │ │ │ │   │ 
                              TfrmConsults.mnuActNoteEditClick┘ │     │ │ │   │ │       │ │ │ │ │   │ 
                            TfrmConsults.mnuActCompleteClick┘   │     │ │ │   │ │       │ │ │ │ │   │ 
                                TfrmConsults.tvCsltNotesDragDrop┤     │ │ │   │ │       │ │ │ │ │   │ 
                               TfrmConsults.tvCsltNotesStartDrag┤     │ │ │   │ │       │ │ │ │ │   │ 
                        TfrmConsults.mnuActAttachtoIDParentClick┤     │ │ │   │ │       │ │ │ │ │   │ 
                                 TfrmConsults.LstConsultsToPrint┘     │ │ │   │ │       │ │ │ │ │   │ 
                      TfrmFrame.mnuFilePrintSelectedItemsClick┘       │ │ │   │ │       │ │ │ │ │   │ 
                                 TfrmConsults.mnuActSignatureSaveClick┤ │ │   │ │       │ │ │ │ │   │ 
                                 TfrmConsults.mnuActSignatureSignClick┤ │ │   │ │       │ │ │ │ │   │ 
                                          TfrmConsults.SaveSignItem...┤ │ │   │ │       │ │ │ │ │   │ 
                                       TfrmConsults.mnuActConsultClick┤ │ │   │ │       │ │ │ │ │   │ 
                                           TfrmConsults.NotifyOrder...┤ │ │   │ │       │ │ │ │ │   │ 
                                               TfrmConsults.UMNewOrder┤ │ │   │ │       │ │ │ │ │   │ 
                                        TfrmConsults.ProcessMedResults┘ │ │   │ │       │ │ │ │ │   │ 
                                   TfrmConsults.mnuActAttachMedClick┤   │ │   │ │       │ │ │ │ │   │ 
                                   TfrmConsults.mnuActRemoveMedClick┘   │ │   │ │       │ │ │ │ │   │ 
                                    TfrmConsults.mnuActEditResubmitClick┤ │   │ │       │ │ │ │ │   │ 
                                     TfrmConsults.cmdEditResubmitClick┘ │ │   │ │       │ │ │ │ │   │ 
                                      TfrmConsults.LstConsultsToPrint...┘ │   │ │       │ │ │ │ │   │ 
                                              TfrmConsults.tvConsultsClick┤   │ │       │ │ │ │ │   │ 
                                            TfrmConsults.mnuViewClick...┤ │   │ │       │ │ │ │ │   │ 
                              TfrmConsults.mnuActDetachFromIDParentClick┤ │   │ │       │ │ │ │ │   │ 
                                   TfrmConsults.mnuActNoteDeleteClick...┤ │   │ │       │ │ │ │ │   │ 
                                   TfrmConsults.mnuActSignatureSaveClick┤ │   │ │       │ │ │ │ │   │ 
                                   TfrmConsults.mnuActSignatureSignClick┤ │   │ │       │ │ │ │ │   │ 
                                            TfrmConsults.SaveSignItem...┤ │   │ │       │ │ │ │ │   │ 
                                         TfrmConsults.mnuActConsultClick┤ │   │ │       │ │ │ │ │   │ 
                                 TfrmConsults.mnuActEditResubmitClick...┤ │   │ │       │ │ │ │ │   │ 
                                            TfrmConsults.StartNewEdit...┤ │   │ │       │ │ │ │ │   │ 
                                       TfrmConsults.ProcessMedResults...┤ │   │ │       │ │ │ │ │   │ 
                                TfrmConsults.mnuActAttachtoIDParentClick┘ │   │ │       │ │ │ │ │   │ 
                                              TfrmConsults.DoAttachIDChild┤   │ │       │ │ │ │ │   │ 
                                        TfrmConsults.tvCsltNotesDragDrop┤ │   │ │       │ │ │ │ │   │ 
                                TfrmConsults.mnuActAttachtoIDParentClick┘ │   │ │       │ │ │ │ │   │ 
                                              TfrmConsults.tvConsultsKeyUp┘   │ │       │ │ │ │ │   │ 
                                                      TfrmConsults.cmdPCEClick┤ │       │ │ │ │ │   │ 
                                                    TfrmConsults.lstNotesClick┤ │       │ │ │ │ │   │ 
                                                TfrmConsults.CompleteConsult┤ │ │       │ │ │ │ │   │ 
                                          TfrmConsults.mnuActCompleteClick┤ │ │ │       │ │ │ │ │   │ 
                                        TfrmConsults.mnuActAddIDEntryClick┘ │ │ │       │ │ │ │ │   │ 
                                                 TfrmConsults.InsertAddendum┤ │ │       │ │ │ │ │   │ 
                                      TfrmConsults.mnuActMakeAddendumClick┘ │ │ │       │ │ │ │ │   │ 
                                                    TfrmConsults.LoadForEdit┤ │ │       │ │ │ │ │   │ 
                                       TfrmConsults.mnuActNoteEditClick...┘ │ │ │       │ │ │ │ │   │ 
                                                                 SaveOrAbort┤ │ │       │ │ │ │ │   │ 
                                         TfrmConsults.SaveEditedConsult...┘ │ │ │       │ │ │ │ │   │ 
                                           TfrmConsults.SaveEditedConsult...┤ │ │       │ │ │ │ │   │ 
                                       TfrmConsults.mnuActSignatureSignClick┤ │ │       │ │ │ │ │   │ 
                                                TfrmConsults.SaveSignItem...┤ │ │       │ │ │ │ │   │ 
                              TfrmConsults.mnuActIdentifyAddlSignersClick...┤ │ │       │ │ │ │ │   │ 
                                              TfrmConsults.tvCsltNotesChange┘ │ │       │ │ │ │ │   │ 
                                         TfrmConsults.SaveEditedConsult...┤   │ │       │ │ │ │ │   │ 
                                     TfrmConsults.mnuActSignatureSignClick┤   │ │       │ │ │ │ │   │ 
                                      TfrmConsults.ProcessNotifications...┘   │ │       │ │ │ │ │   │ 
                                                    TfrmConsults.AssignRemForm┘ │       │ │ │ │ │   │ 
                                                       ViewRemDlgFromForm...┘   │       │ │ │ │ │   │ 
                                                          TfrmSurgery.DisplayPCE┤       │ │ │ │ │   │ 
                                                       TfrmSurgery.cmdPCEClick┤ │       │ │ │ │ │   │ 
                                                   TfrmSurgery.tvSurgeryChange┤ │       │ │ │ │ │   │ 
                                                  TfrmSurgery.SaveEditedNote┤ │ │       │ │ │ │ │   │ 
                                               TfrmSurgery.SaveCurrentNote┘ │ │ │       │ │ │ │ │   │ 
                                          TfrmSurgery.AllowContextChange┤   │ │ │       │ │ │ │ │   │ 
                                    TfrmFrame.AllowContextChangeAll...┘ │   │ │ │       │ │ │ │ │   │ 
                                              TfrmSurgery.SetViewContext┤   │ │ │       │ │ │ │ │   │ 
                                               TfrmSurgery.DisplayPage┤ │   │ │ │       │ │ │ │ │   │ 
                               TfrmSurgery.mnuViewReturntoDefaultClick┘ │   │ │ │       │ │ │ │ │   │ 
                                                TfrmSurgery.RequestPrint┤   │ │ │       │ │ │ │ │   │ 
                                           TfrmFrame.mnuFilePrintClick┘ │   │ │ │       │ │ │ │ │   │ 
                                                TfrmSurgery.mnuViewClick┤   │ │ │       │ │ │ │ │   │ 
                                         TfrmSurgery.SetViewContext...┘ │   │ │ │       │ │ │ │ │   │ 
                                                TfrmSurgery.StartNewEdit┤   │ │ │       │ │ │ │ │   │ 
                                            TfrmSurgery.mnuActNewClick┤ │   │ │ │       │ │ │ │ │   │ 
                                         TfrmSurgery.cmdNewNoteClick┘ │ │   │ │ │       │ │ │ │ │   │ 
                                         TfrmSurgery.mnuActAddendClick┤ │   │ │ │       │ │ │ │ │   │ 
                                           TfrmSurgery.mnuActEditClick┘ │   │ │ │       │ │ │ │ │   │ 
                                           TfrmSurgery.mnuActDeleteClick┤   │ │ │       │ │ │ │ │   │ 
                                         TfrmSurgery.SaveEditedNote...┘ │   │ │ │       │ │ │ │ │   │ 
                                             TfrmSurgery.mnuActSaveClick┤   │ │ │       │ │ │ │ │   │ 
                                             TfrmSurgery.mnuActSignClick┤   │ │ │       │ │ │ │ │   │ 
                                                TfrmSurgery.SaveSignItem┤   │ │ │       │ │ │ │ │   │ 
                                              TfrmReview.cmdOKClick...┘ │   │ │ │       │ │ │ │ │   │ 
                                                   TfrmSurgery.FormClose┤   │ │ │       │ │ │ │ │   │ 
                              TfrmSurgery.mnuActIdentifyAddlSignersClick┤   │ │ │       │ │ │ │ │   │ 
                                  TfrmSurgery.popNoteMemoAddlSignClick┘ │   │ │ │       │ │ │ │ │   │ 
                                        TfrmSurgery.ProcessNotifications┘   │ │ │       │ │ │ │ │   │ 
                                               TfrmSurgery.DisplayPage┘     │ │ │       │ │ │ │ │   │ 
                                                 TfrmSurgery.mnuActSignClick┤ │ │       │ │ │ │ │   │ 
                                              TfrmSurgery.mnuViewDetailClick┤ │ │       │ │ │ │ │   │ 
                                         TfrmSurgery.ProcessNotifications...┤ │ │       │ │ │ │ │   │ 
                                                TfrmSurgery.LoadSurgeryCases┘ │ │       │ │ │ │ │   │ 
                                               TfrmSurgery.mnuViewClick...┤   │ │       │ │ │ │ │   │ 
                                               TfrmSurgery.StartNewEdit...┤   │ │       │ │ │ │ │   │ 
                                          TfrmSurgery.mnuActDeleteClick...┤   │ │       │ │ │ │ │   │ 
                                               TfrmSurgery.mnuActSaveClick┤   │ │       │ │ │ │ │   │ 
                                               TfrmSurgery.mnuActSignClick┤   │ │       │ │ │ │ │   │ 
                                               TfrmSurgery.SaveSignItem...┤   │ │       │ │ │ │ │   │ 
                             TfrmSurgery.mnuActIdentifyAddlSignersClick...┘   │ │       │ │ │ │ │   │ 
                                                     TfrmSurgery.lstNotesClick┘ │       │ │ │ │ │   │ 
                                                   TfrmSurgery.InsertNewNote┤   │       │ │ │ │ │   │ 
                                             TfrmSurgery.mnuActNewClick...┘ │   │       │ │ │ │ │   │ 
                                                  TfrmSurgery.InsertAddendum┤   │       │ │ │ │ │   │ 
                                             TfrmSurgery.mnuActAddendClick┘ │   │       │ │ │ │ │   │ 
                                                     TfrmSurgery.LoadForEdit┤   │       │ │ │ │ │   │ 
                                               TfrmSurgery.mnuActEditClick┘ │   │       │ │ │ │ │   │ 
                                               TfrmSurgery.SaveEditedNote...┤   │       │ │ │ │ │   │ 
                                                 TfrmSurgery.mnuActSignClick┤   │       │ │ │ │ │   │ 
                                                 TfrmSurgery.SaveSignItem...┤   │       │ │ │ │ │   │ 
                               TfrmSurgery.mnuActIdentifyAddlSignersClick...┤   │       │ │ │ │ │   │ 
                                              TfrmSurgery.tvSurgeryChange...┘   │       │ │ │ │ │   │ 
                                                            TfrmNotes.DisplayPCE┘       │ │ │ │ │   │ 
                                                       TfrmNotes.lstNotesClick┤         │ │ │ │ │   │ 
                                                     TfrmNotes.InsertNewNote┤ │         │ │ │ │ │   │ 
                                                  TfrmNotes.mnuActNewClick┤ │ │         │ │ │ │ │   │ 
                                               TfrmNotes.cmdNewNoteClick┘ │ │ │         │ │ │ │ │   │ 
                                           TfrmNotes.mnuActAddIDEntryClick┘ │ │         │ │ │ │ │   │ 
                                                    TfrmNotes.InsertAddendum┤ │         │ │ │ │ │   │ 
                                               TfrmNotes.mnuActAddendClick┘ │ │         │ │ │ │ │   │ 
                                                       TfrmNotes.LoadForEdit┤ │         │ │ │ │ │   │ 
                                                 TfrmNotes.mnuActEditClick┘ │ │         │ │ │ │ │   │ 
                                                    TfrmNotes.SaveEditedNote┤ │         │ │ │ │ │   │ 
                                                 TfrmNotes.SaveCurrentNote┘ │ │         │ │ │ │ │   │ 
                                            TfrmNotes.AllowContextChange┤   │ │         │ │ │ │ │   │ 
                                    TfrmFrame.AllowContextChangeAll...┘ │   │ │         │ │ │ │ │   │ 
                                               TfrmNotes.LstNotesToPrint┤   │ │         │ │ │ │ │   │ 
                              TfrmFrame.mnuFilePrintSelectedItemsClick┘ │   │ │         │ │ │ │ │   │ 
                                                  TfrmNotes.RequestPrint┤   │ │         │ │ │ │ │   │ 
                                           TfrmFrame.mnuFilePrintClick┘ │   │ │         │ │ │ │ │   │ 
                                                  TfrmNotes.mnuViewClick┤   │ │         │ │ │ │ │   │ 
                                              TfrmNotes.SetViewContext┤ │   │ │         │ │ │ │ │   │ 
                                               TfrmNotes.DisplayPage┤ │ │   │ │         │ │ │ │ │   │ 
                               TfrmNotes.mnuViewReturntoDefaultClick┘ │ │   │ │         │ │ │ │ │   │ 
                                   TfrmNotes.mnuViewSaveAsDefaultClick┘ │   │ │         │ │ │ │ │   │ 
                                                  TfrmNotes.StartNewEdit┤   │ │         │ │ │ │ │   │ 
                                           TfrmNotes.mnuActNewClick...┤ │   │ │         │ │ │ │ │   │ 
                                       TfrmNotes.mnuActAddIDEntryClick┤ │   │ │         │ │ │ │ │   │ 
                                           TfrmNotes.mnuActAddendClick┤ │   │ │         │ │ │ │ │   │ 
                                             TfrmNotes.mnuActEditClick┘ │   │ │         │ │ │ │ │   │ 
                                 TfrmNotes.mnuActDetachFromIDParentClick┤   │ │         │ │ │ │ │   │ 
                                             TfrmNotes.mnuActDeleteClick┤   │ │         │ │ │ │ │   │ 
                                           TfrmNotes.SaveEditedNote...┘ │   │ │         │ │ │ │ │   │ 
                                               TfrmNotes.mnuActSaveClick┤   │ │         │ │ │ │ │   │ 
                                               TfrmNotes.mnuActSignClick┤   │ │         │ │ │ │ │   │ 
                                                  TfrmNotes.SaveSignItem┤   │ │         │ │ │ │ │   │ 
                                              TfrmReview.cmdOKClick...┘ │   │ │         │ │ │ │ │   │ 
                                                     TfrmNotes.FormClose┤   │ │         │ │ │ │ │   │ 
                                TfrmNotes.mnuActIdentifyAddlSignersClick┤   │ │         │ │ │ │ │   │ 
                                    TfrmNotes.popNoteMemoAddlSignClick┘ │   │ │         │ │ │ │ │   │ 
                                          TfrmNotes.ProcessNotifications┤   │ │         │ │ │ │ │   │ 
                                                 TfrmNotes.DisplayPage┘ │   │ │         │ │ │ │ │   │ 
                                             TfrmNotes.SetViewContext...┤   │ │         │ │ │ │ │   │ 
                                               TfrmNotes.tvNotesDragDrop┤   │ │         │ │ │ │ │   │ 
                                   TfrmNotes.mnuActAttachtoIDParentClick┘   │ │         │ │ │ │ │   │ 
                                                   TfrmNotes.mnuActSignClick┤ │         │ │ │ │ │   │ 
                                                   TfrmNotes.SaveSignItem...┤ │         │ │ │ │ │   │ 
                                                TfrmNotes.mnuViewDetailClick┤ │         │ │ │ │ │   │ 
                                 TfrmNotes.mnuActIdentifyAddlSignersClick...┤ │         │ │ │ │ │   │ 
                                                     TfrmNotes.tvNotesChange┤ │         │ │ │ │ │   │ 
                                               TfrmNotes.SaveEditedNote...┤ │ │         │ │ │ │ │   │ 
                                                 TfrmNotes.mnuActSignClick┤ │ │         │ │ │ │ │   │ 
                                         TfrmNotes.ProcessNotifications...┤ │ │         │ │ │ │ │   │ 
                                                       TfrmNotes.LoadNotes┘ │ │         │ │ │ │ │   │ 
                                            TfrmNotes.LstNotesToPrint...┤   │ │         │ │ │ │ │   │ 
                                               TfrmNotes.mnuViewClick...┤   │ │         │ │ │ │ │   │ 
                                               TfrmNotes.StartNewEdit...┤   │ │         │ │ │ │ │   │ 
                                 TfrmNotes.mnuActDetachFromIDParentClick┤   │ │         │ │ │ │ │   │ 
                                          TfrmNotes.mnuActDeleteClick...┤   │ │         │ │ │ │ │   │ 
                                               TfrmNotes.mnuActSaveClick┤   │ │         │ │ │ │ │   │ 
                                               TfrmNotes.mnuActSignClick┤   │ │         │ │ │ │ │   │ 
                                               TfrmNotes.SaveSignItem...┤   │ │         │ │ │ │ │   │ 
                             TfrmNotes.mnuActIdentifyAddlSignersClick...┤   │ │         │ │ │ │ │   │ 
                                   TfrmNotes.mnuActAttachtoIDParentClick┤   │ │         │ │ │ │ │   │ 
                                               TfrmNotes.DoAttachIDChild┘   │ │         │ │ │ │ │   │ 
                                             TfrmNotes.tvNotesDragDrop┤     │ │         │ │ │ │ │   │ 
                                 TfrmNotes.mnuActAttachtoIDParentClick┘     │ │         │ │ │ │ │   │ 
                                                 TfrmNotes.lvNotesSelectItem┘ │         │ │ │ │ │   │ 
                                                TfrmNotes.tvNotesChange...┘   │         │ │ │ │ │   │ 
                                                        UpdateEncounterInfo...┤         │ │ │ │ │   │ 
                                                       TfrmNotes.AssignRemForm┘         │ │ │ │ │   │ 
                                                       ViewRemDlgFromForm...┘           │ │ │ │ │   │ 
                                                          TfrmDrawers.tvRemindersKeyDown┘ │ │ │ │   │ 
                                                                ViewReminderDialogTemplate┘ │ │ │   │ 
                                                                  ViewRemDlgTemplateFromForm┘ │ │   │ 
                                                           TTemplate.ExecuteReminderDialog┘   │ │   │ 
                                                            ExecuteTemplateOrBoilerPlate┤     │ │   │ 
                                                                  TfrmDrawers.InsertText┘     │ │   │ 
                                                       TfrmDrawers.tvTemplatesDblClick┤       │ │   │ 
                                                        TfrmDrawers.tvTemplatesKeyDown┤       │ │   │ 
                                                            TfrmDrawers.NewRECDragDrop┤       │ │   │ 
                                                      TfrmDrawers.SetRichEditControl┘ │       │ │   │ 
                                                             TfrmDCSumm.FormCreate┤   │       │ │   │ 
                                                           TfrmConsults.FormCreate┤   │       │ │   │ 
                                                            TfrmSurgery.FormCreate┤   │       │ │   │ 
                                                              TfrmNotes.FormCreate┘   │       │ │   │ 
                                                    TfrmDrawers.mnuInsertTemplateClick┘       │ │   │ 
                                              TfrmDCSumm.popSummMemoInsTemplateClick┤         │ │   │ 
                                            TfrmConsults.popNoteMemoInsTemplateClick┤         │ │   │ 
                                             TfrmSurgery.popNoteMemoInsTemplateClick┤         │ │   │ 
                                               TfrmNotes.popNoteMemoInsTemplateClick┘         │ │   │ 
                                                                      TfrmRemDlg.btnClearClick┤ │   │ 
                                                         TfrmRemDlg.ProcessReminderFromNodeStr┘ │   │ 
                                                                     TfrmRemDlg.btnNextClick┤   │   │ 
                                                                     TfrmRemDlg.btnBackClick┘   │   │ 
                                                                          TfrmRemDlg.UMResyncRem┤   │ 
                                                                      TfrmRemDlg.ProcessTemplate┤   │ 
                                                                         ViewRemDlgFromForm...┘ │   │ 
                                                                          TfrmRemDlg.SetFontSize┘   │ 
                                                                         ViewRemDlgFromForm...┤     │ 
                                                                       TfrmFrame.ChangeFont...┘     │ 
                                                                                           ..(rec)..┘ 

Calls

Name Declaration Comments
AddPrompts procedure AddPrompts(Shared: boolean; AParent: TWinControl; PWidth: integer; var Y: integer); -
TRemDlgElement.Box function Box: boolean; -
TRemDlgElement.BoxCaption function BoxCaption: string; -
TRemDlgElement.BuildControls function BuildControls(var Y: integer; ParentWidth: integer; BaseParent, AOwner: TWinControl): TWinControl; -
TRemDlgElement.cbClicked procedure cbClicked(Sender: TObject); -
TRemDlgElement.cbEntered procedure cbEntered(Sender: TObject); -
TRemDlgElement.ChildrenIndent function ChildrenIndent: integer; -
TRemDlgElement.ChildrenRequired function ChildrenRequired: TRDChildReq; -
CRLFText function CRLFText(const InStr: string): string; -
TRemDlgElement.ElemType function ElemType: TRDElemType; -
TRemDlgElement.EnableChildren function EnableChildren: boolean; -
TRemDlgElement.EntryID function EntryID: string; -
TRemDlgElement.FieldPanelKeyPress procedure FieldPanelKeyPress(Sender: TObject; var Key: Char); -
TRemDlgElement.FieldPanelLabelOnClick procedure FieldPanelLabelOnClick(Sender: TObject); -
TRemDlgElement.FieldPanelOnClick procedure FieldPanelOnClick(Sender: TObject); -
GetPanel function GetPanel(const EID, AText: string; const PnlWidth: integer; OwningCheckBox: TCPRSDialogParentCheckBox): TDlgFieldPanel; -
TRemDlgElement.ParentCBExit procedure ParentCBExit(Sender: TObject); -
ScreenReaderSystem_Stop procedure ScreenReaderSystem_Stop; -
TRemDlgElement.ShowChildren function ShowChildren: boolean; -
TRemDlgElement.SubCommentChange procedure SubCommentChange(Sender: TObject); -
TRemDlgElement.TrueIndent function TrueIndent: integer; -
UpdatePrompts procedure UpdatePrompts(EnablePanel: boolean; ClearCB: boolean); -

Called-By

Name Declaration Comments
TReminderDialog.BuildControls function BuildControls(ParentWidth: integer; AParent, AOwner: TWinControl): TWinControl; -
TRemDlgElement.BuildControls function BuildControls(var Y: integer; ParentWidth: integer; BaseParent, AOwner: TWinControl): TWinControl; -


Source

3482  function TRemDlgElement.BuildControls(var Y: integer; ParentWidth: integer;
3483                                             BaseParent, AOwner: TWinControl): TWinControl;
3484  var
3485    lbl: TLabel;
3486    lblText: string;
3487    sLbl: TCPRSDialogStaticLabel;
3488    lblCtrl: TControl;
3489    pnl: TDlgFieldPanel;
3490    AutoFocusControl: TWinControl;
3491    cb: TCPRSDialogParentCheckBox;
3492    gb: TGroupBox;
3493    ERes, prnt: TWinControl;
3494    PrntWidth: integer;
3495    i, X, Y1: integer;
3496    LastX, MinX, MaxX: integer;
3497    Prompt: TRemPrompt;
3498    Ctrl: TMultiClassObj;
3499    OK, DoLbl, HasVCombo, cbSingleLine: boolean;
3500    ud: TUpDown;
3501    HelpBtn: TButton;
3502    vCombo: TComboBox;
3503    pt: TRemPromptType;
3504    SameLineCtrl: TList;
3505    Kid: TRemDlgElement;
3506    vt: TVitalType;
3507    DefaultDate: TFMDateTime;
3508    Req: boolean;
3509  
3510    function GetPanel(const EID, AText: string; const PnlWidth: integer;
3511                      OwningCheckBox: TCPRSDialogParentCheckBox): TDlgFieldPanel;
3512    var
3513      idx, p: integer;
3514      Entry: TTemplateDialogEntry;
3515  
3516    begin
3517      // This call creates a new TTemplateDialogEntry if necessary and creates the
3518      // necessary template field controls with their default values stored in the
3519      // TTemplateField object.
3520      Entry := GetDialogEntry(BaseParent, EID + IntToStr(Integer(BaseParent)), AText);
3521      Entry.InternalID := EID;
3522      // This call looks for the Entry's values in TRemDlgElement.FFieldValues
3523      idx := FFieldValues.IndexOfPiece(EID);
3524      // If the Entry's values were found in the previous step then they will be
3525      // restored to the TTemplateDialogEntry.FieldValues in the next step.
3526      if(idx >= 0) then
3527      begin
3528        p := pos(U, FFieldValues[idx]); // Can't use Piece because 2nd piece may contain ^ characters
3529        if(p > 0) then
3530          Entry.FieldValues := copy(FFieldValues[idx],p+1,MaxInt);
3531      end;
3532      Entry.AutoDestroyOnPanelFree := TRUE;
3533      // The FieldPanelChange event handler is where the Entry.FieldValues are saved to the
3534      // Element.FFieldValues.
3535      Entry.OnChange := FieldPanelChange;
3536      //AGP BACKED OUT THE CHANGE CAUSE A PROBLEM WITH TEMPLATE WORD PROCESSING FIELDS WHEN RESIZING
3537      //FieldPanelChange(Entry); // to accomodate fields with default values - CQ#15960
3538      //AGP END BACKED OUT
3539      // Calls TTemplateDialogEntry.SetFieldValues which calls
3540      // TTemplateDialogEntry.SetControlText to reset the template field default
3541      // values to the values that were restored to the Entry from the Element if
3542      // they exist, otherwise the default values will remain.
3543      Result := Entry.GetPanel(PnlWidth, BaseParent, OwningCheckBox);
3544    end;
3545  
3546    procedure NextLine(var Y: integer);
3547    var
3548      i: integer;
3549      MaxY: integer;
3550      C: TControl;
3551  
3552  
3553    begin
3554      MaxY := 0;
3555      for i := 0 to SameLineCtrl.Count-1 do
3556      begin
3557        C := TControl(SameLineCtrl[i]);
3558        if(MaxY < C.Height) then
3559          MaxY := C.Height;
3560      end;
3561      for i := 0 to SameLineCtrl.Count-1 do
3562      begin
3563        C := TControl(SameLineCtrl[i]);
3564        if(MaxY > C.Height) then
3565          C.Top := Y + ((MaxY - C.Height) div 2);
3566      end;
3567      inc(Y, MaxY);
3568      if assigned(cb) and assigned(pnl) then
3569        cb.Top := pnl.Top;
3570      SameLineCtrl.Clear;
3571    end;
3572  
3573    procedure ProcessLabel(Required, AEnabled: boolean;
3574                           AParent: TWinControl; Control: TControl);  begin
3575      if(Trim(Prompt.Caption) = '') and (not Required) then
3576        lblCtrl := nil
3577      else
3578      begin
3579        lbl := TLabel.Create(AOwner);
3580        lbl.Parent := AParent;
3581        if ScreenReaderSystemActive then
3582        begin
3583          sLbl := TCPRSDialogStaticLabel.Create(AOwner);
3584          sLbl.Parent := AParent;
3585          sLbl.Height := lbl.Height;
3586  // get groop box hearder, if any
3587  //                (sLbl as ICPRSDialogComponent).BeforeText := ScreenReaderSystem_GetPendingText;
3588          lbl.Free;
3589          lblCtrl := sLbl;
3590        end
3591        else
3592          lblCtrl := lbl;
3593        lblText := Prompt.Caption;
3594        if Required then
3595        begin
3596          if assigned(Control) and Supports(Control, ICPRSDialogComponent) then
3597          begin
3598            (Control as ICPRSDialogComponent).RequiredField := TRUE;
3599            if ScreenReaderSystemActive and (AOwner = frmRemDlg) then
3600              frmRemDlg.amgrMain.AccessText[sLbl] := lblText;
3601          end;
3602          lblText := lblText + ' *';
3603        end;
3604        SetStrProp(lblCtrl, CaptionProperty, lblText);
3605        if ScreenReaderSystemActive then
3606        begin
3607          ScreenReaderSystem_CurrentLabel(sLbl);
3608          ScreenReaderSystem_AddText(lblText);
3609        end;
3610        lblCtrl.Enabled := AEnabled;
3611        UpdateColorsFor508Compliance(lblCtrl);
3612      end;
3613    end;
3614  
3615    procedure ScreenReaderSupport(Control: TWinControl);
3616    begin
3617      if ScreenReaderSystemActive then
3618      begin
3619        if Supports(Control, ICPRSDialogComponent) then
3620          ScreenReaderSystem_CurrentComponent(Control as ICPRSDialogComponent)
3621        else
3622          ScreenReaderSystem_Stop;
3623      end;
3624    end;
3625  
3626    procedure AddPrompts(Shared: boolean; AParent: TWinControl; PWidth: integer; var Y: integer);
3627    var
3628      i, j, k, idx: integer;
3629      DefLoc: TStrings;
3630      LocText: string;
3631      LocFound: boolean;
3632      m, n: integer;
3633      ActDt, InActDt: Double;
3634      EncDt: TFMDateTime;
3635      ActChoicesSL: TORStringList;
3636      Piece12, WHReportStr: String;
3637      WrapLeft, LineWidth: integer;
3638  
3639    begin
3640      SameLineCtrl := TList.Create;
3641      try
3642        if(assigned(cb)) then
3643        begin
3644          if(not Shared) then
3645          begin
3646            SameLineCtrl.Add(cb);
3647            SameLineCtrl.Add(pnl);
3648          end;
3649          if(cbSingleLine and (not Shared)) then
3650            LastX := cb.Left + pnl.Width + PromptGap + IndentGap
3651          else
3652            LastX := PWidth;
3653        end
3654        else
3655        begin
3656          if(not Shared) then SameLineCtrl.Add(pnl);
3657          LastX := PWidth;
3658        end;
3659        for i := 0 to FPrompts.Count-1 do
3660        begin
3661          Prompt := TRemPrompt(FPrompts[i]);
3662          OK := ((Prompt.FIsShared = Shared) and Prompt.PromptOK and (not Prompt.Forced));
3663          if(OK and Shared) then
3664          begin
3665            OK := FALSE;
3666            for j := 0 to Prompt.FSharedChildren.Count-1 do
3667            begin
3668              Kid := TRemDlgElement(Prompt.FSharedChildren[j]);
3669  //            if(Kid.ElemType <> etDisplayOnly) and (Kid.FChecked) then
3670              if(Kid.FChecked) then
3671              begin
3672                OK := TRUE;
3673                break;
3674              end;
3675            end;
3676          end;
3677          Ctrl.Ctrl := nil;
3678          ud := nil;
3679          HelpBtn := nil;
3680          vCombo := nil;
3681          HasVCombo := FALSE;
3682          if(OK) then
3683          begin
3684            pt := Prompt.PromptType;
3685            MinX := 0;
3686            MaxX := 0;
3687            lbl := nil;
3688            sLbl := nil;
3689            lblCtrl := nil;
3690            DoLbl := Prompt.Required;
3691            case pt of
3692              ptComment, ptQuantity:
3693                begin
3694                  Ctrl.edt := TCPRSDialogFieldEdit.Create(AOwner);
3695                  Ctrl.ctrl.Parent := AParent;
3696                  Ctrl.edt.Text := Prompt.Value;
3697                  if(pt = ptComment) then
3698                  begin
3699                    Ctrl.edt.MaxLength := 245;
3700                    MinX := TextWidthByFont(Ctrl.edt.Font.Handle, 'AbCdEfGhIjKlMnOpQrStUvWxYz 1234');
3701                    MaxX := PWidth;
3702                  end
3703                  else
3704                  begin
3705                    ud := TUpDown.Create(AOwner);
3706                    ud.Parent := AParent;
3707                    ud.Associate := Ctrl.edt;
3708                    if(pt = ptQuantity) then
3709                    begin
3710                      ud.Min := 1;
3711                      ud.Max := 100;
3712                    end
3713                    else
3714                    begin
3715                      ud.Min := 0;
3716                      ud.Max := 40;
3717                    end;
3718                    MinX := TextWidthByFont(Ctrl.edt.Font.Handle, IntToStr(ud.Max)) + 24;
3719                    ud.Position := StrToIntDef(Prompt.Value, ud.Min);
3720                    UpdateColorsFor508Compliance(ud);
3721                  end;
3722                  Ctrl.edt.OnKeyPress := Prompt.EditKeyPress;
3723                  Ctrl.edt.OnChange := Prompt.PromptChange;
3724                  UpdateColorsFor508Compliance(Ctrl.edt);
3725                  DoLbl := TRUE;
3726                end;
3727  
3728              ptVisitLocation, ptLevelUnderstanding,
3729              ptSeries, ptReaction, ptExamResults,
3730              ptLevelSeverity, ptSkinResults, ptSkinReading:
3731                begin
3732                  Ctrl.cbo := TCPRSDialogComboBox.Create(AOwner);
3733                  Ctrl.ctrl.Parent := AParent;
3734                  Ctrl.cbo.OnKeyDown := Prompt.ComboBoxKeyDown;
3735                  Ctrl.cbo.Style := orcsDropDown;
3736                  Ctrl.cbo.Pieces := '2';
3737                  if pt = ptSkinReading then
3738                    begin
3739                       Ctrl.cbo.Pieces := '1';
3740                       Ctrl.cbo.Items.Add('');
3741                       for j := 0 to 50 do Ctrl.cbo.Items.Add(inttostr(j));
3742                       GetComboBoxMinMax(Ctrl.cbo,MinX, MaxX);
3743                    end;
3744                  if pt <> ptSkinReading then
3745                    begin
3746                       Ctrl.cbo.Tag := ComboPromptTags[pt];
3747                       PCELoadORCombo(Ctrl.cbo, MinX, MaxX);
3748                    end;
3749                  if pt = ptVisitLocation then
3750                  begin
3751                    DefLoc := GetDefLocations;
3752                    if DefLoc.Count > 0 then
3753                    begin
3754                      idx := 1;
3755                      for j := 0 to DefLoc.Count-1 do
3756                      begin
3757                        LocText := piece(DefLoc[j],U,2);
3758                        if LocText <> '' then
3759                        begin
3760                          if (LocText <> '0') and (IntToStr(StrToIntDef(LocText,0)) = LocText) then
3761                          begin
3762                            LocFound := FALSE;
3763                            for k := 0 to Ctrl.cbo.Items.Count-1 do
3764                            begin
3765                              if(piece(Ctrl.cbo.Items[k],U,1) = LocText) then
3766                              begin
3767                                LocText := Ctrl.cbo.Items[k];
3768                                LocFound := TRUE;
3769                                break;
3770                              end;
3771                            end;
3772                            if not LocFound then
3773                              LocText := '';
3774                          end
3775                          else
3776                            LocText := '0^'+LocText;
3777                          if LocText <> '' then
3778                          begin
3779                            Ctrl.cbo.Items.Insert(idx, LocText);
3780                            inc(idx);
3781                          end;
3782                        end;
3783                      end;
3784  
3785                      if idx > 1 then
3786                      begin
3787                        Ctrl.cbo.Items.Insert(idx, '-1' + LLS_LINE);
3788                        Ctrl.cbo.Items.Insert(idx+1, '-1' + LLS_SPACE);
3789                      end;
3790                    end;
3791                  end;
3792  
3793                  MinX := MaxX;
3794                  Ctrl.cbo.SelectByID(Prompt.Value);
3795                  if(Ctrl.cbo.ItemIndex < 0) then
3796                  begin
3797                    Ctrl.cbo.Text := Prompt.Value;
3798                    if(pt = ptVisitLocation) then
3799                      Ctrl.cbo.Items[0] := '0' + U + Prompt.Value;
3800                  end;
3801                  if(Ctrl.cbo.ItemIndex < 0) then
3802                    Ctrl.cbo.ItemIndex := 0;
3803                  Ctrl.cbo.OnChange := Prompt.PromptChange;
3804                  DoLbl := TRUE;
3805                  Ctrl.cbo.ListItemsOnly := (pt <> ptVisitLocation);
3806                  UpdateColorsFor508Compliance(Ctrl.cbo);
3807                end;
3808  
3809                ptWHPapResult:
3810                begin
3811                  if FData<>nil then
3812                  begin
3813                    if (TRemData(FData[i]).DisplayWHResults)=true then
3814                    begin
3815                      NextLine(Y);
3816                      Ctrl.btn := TCPRSDialogButton.Create(AOwner);
3817                      Ctrl.ctrl.Parent := AParent;
3818                      Ctrl.btn.Left := NewLInePromptGap+15;
3819                      Ctrl.btn.Top := Y+7;
3820                      Ctrl.btn.OnClick := Prompt.DoWHReport;
3821                      Ctrl.btn.Caption := 'Review complete report';
3822                      Ctrl.btn.Width := TextWidthByFont(Ctrl.btn.Font.Handle, Ctrl.btn.Caption) + 13;
3823                      Ctrl.btn.Height := TextHeightByFont(Ctrl.btn.Font.Handle, Ctrl.btn.Caption) + 13;
3824                      Ctrl.btn.Height := TextHeightByFont(Ctrl.btn.Handle, Ctrl.btn.Caption) + 8;
3825                      ScreenReaderSupport(Ctrl.btn);
3826                      UpdateColorsFor508Compliance(Ctrl.btn);
3827                      Y := ctrl.btn.Top + Ctrl.btn.Height;
3828                      NextLine(Y);
3829                      Ctrl.WHChk := TWHCheckBox.Create(AOwner);
3830                      Ctrl.ctrl.Parent := AParent;
3831                      ProcessLabel(Prompt.Required, TRUE, Ctrl.WHChk.Parent, Ctrl.WHChk);
3832                      if lblCtrl is TWinControl then
3833                        TWinControl(lblCtrl).TabOrder := Ctrl.WHChk.TabOrder;
3834                      Ctrl.WHChk.Flbl := lblCtrl;
3835                      Ctrl.WHChk.Flbl.Top := Y + 5;
3836                      Ctrl.WHChk.Flbl.Left := NewLinePromptGap+15;
3837                      WrapLeft := Ctrl.WHChk.Flbl.Left;
3838  //                    Ctrl.WHChk.Flbl.Width := TextWidthByFont(
3839  //                      TExposedComponent(Ctrl.WHChk.Flbl).Font.Handle,
3840  //                      TExposedComponent(Ctrl.WHChk.Flbl).Caption)+25;
3841  //                    Ctrl.WHChk.Flbl.Height := TextHeightByFont(
3842  //                      TExposedComponent(Ctrl.WHChk.Flbl).Font.Handle,
3843  //                      TExposedComponent(Ctrl.WHChk.Flbl).Caption);
3844                      //LineWidth := WrapLeft + Ctrl.WHChk.Flbl.Width+10;
3845                      Y := Ctrl.WHChk.Flbl.Top + Ctrl.WHChk.Flbl.Height;
3846                      NextLine(Y);
3847                      Ctrl.WHChk.RadioStyle:=true;
3848                      Ctrl.WHChk.GroupIndex:=1;
3849                      Ctrl.WHChk.Check2 := TWHCheckBox.Create(AOwner);
3850                      Ctrl.WHChk.Check2.Parent := Ctrl.WHChk.Parent;
3851                      Ctrl.WHChk.Check2.RadioStyle:=true;
3852                      Ctrl.WHChk.Check2.GroupIndex:=1;
3853                      Ctrl.WHChk.Check3 := TWHCheckBox.Create(AOwner);
3854                      Ctrl.WHChk.Check3.Parent := Ctrl.WHChk.Parent;
3855                      Ctrl.WHChk.Check3.RadioStyle:=true;
3856                      Ctrl.WHChk.Check3.GroupIndex:=1;
3857                      Ctrl.WHChk.Caption := 'NEM (No Evidence of Malignancy)';
3858                      Ctrl.WHChk.ShowHint := true;
3859                      Ctrl.WHChk.Hint := 'No Evidence of Malignancy';
3860                      Ctrl.WHChk.Width := TextWidthByFont(Ctrl.WHChk.Font.Handle, Ctrl.WHChk.Caption)+20;
3861                      Ctrl.WHChk.Height := TextHeightByFont(Ctrl.WHChk.Font.Handle, Ctrl.WHChk.Caption)+4;
3862                      Ctrl.WHChk.Top := Y + 5;
3863                      Ctrl.WHChk.Left := WrapLeft;
3864                      Ctrl.WHChk.OnClick := Prompt.PromptChange;
3865                      Ctrl.WHChk.Checked := (WHResultChk = 'N');
3866                      LineWidth := WrapLeft + Ctrl.WHChk.Width+5;
3867                      Ctrl.WHChk.Check2.Caption := 'Abnormal';
3868                      Ctrl.WHChk.Check2.Width := TextWidthByFont(Ctrl.WHChk.Check2.Font.Handle, Ctrl.WHChk.Check2.Caption) + 20;
3869                      Ctrl.WHChk.Check2.Height := TextHeightByFont(Ctrl.WHChk.check2.Font.Handle, Ctrl.WHChk.check2.Caption)+4;
3870                      if (LineWidth + Ctrl.WHChk.Check2.Width) > PWidth - 10 then
3871                      begin
3872                        LineWidth := WrapLeft;
3873                        Y := Ctrl.WHChk.Top + Ctrl.WHChk.Height;
3874                        Nextline(Y);
3875                      end;
3876                      Ctrl.WHChk.Check2.Top := Y + 5;
3877                      Ctrl.WHChk.Check2.Left := LineWidth;
3878                      Ctrl.WHChk.Check2.OnClick := Prompt.PromptChange;
3879                      Ctrl.WHChk.Check2.Checked := (WHResultChk = 'A');
3880                      LineWidth := LineWidth + Ctrl.WHChk.Check2.Width+5;
3881                      Ctrl.WHChk.Check3.Caption := 'Unsatisfactory for Diagnosis';
3882                      Ctrl.WHChk.Check3.Width := TextWidthByFont(Ctrl.WHChk.Check3.Font.Handle, Ctrl.WHChk.Check3.Caption)+20;
3883                      Ctrl.WHChk.Check3.Height := TextHeightByFont(Ctrl.WHChk.check3.Font.Handle, Ctrl.WHChk.check3.Caption)+4;
3884                      if (LineWidth + Ctrl.WHChk.Check3.Width) > PWidth - 10 then
3885                      begin
3886                        LineWidth := WrapLeft;
3887                        Y := Ctrl.WHChk.Check2.Top + Ctrl.WHChk.Check2.Height;
3888                        Nextline(Y);
3889                      end;
3890                      Ctrl.WHChk.Check3.Top := Y + 5;
3891                      Ctrl.WHChk.Check3.OnClick := Prompt.PromptChange;
3892                      Ctrl.WHChk.Check3.Checked := (WHResultChk = 'U');
3893                      Ctrl.WHChk.Check3.Left := LineWidth;
3894                      UpdateColorsFor508Compliance(Ctrl.WHChk);
3895                      UpdateColorsFor508Compliance(Ctrl.WHChk.Flbl);
3896                      UpdateColorsFor508Compliance(Ctrl.WHChk.Check2);
3897                      UpdateColorsFor508Compliance(Ctrl.WHChk.Check3);
3898                      ScreenReaderSupport(Ctrl.WHChk);
3899                      ScreenReaderSupport(Ctrl.WHChk.Check2);
3900                      ScreenReaderSupport(Ctrl.WHChk.Check3);
3901                      Y := Ctrl.WHChk.Check3.Top + Ctrl.WHChk.Check3.Height;
3902                      Nextline(Y);
3903                    end
3904                    else
3905                      DoLbl := FALSE;
3906                  end
3907                  else
3908                    DoLbl :=FALSE;
3909                end;
3910  
3911                ptWHNotPurp:
3912                begin
3913                  NextLine(Y);
3914                  Ctrl.WHChk := TWHCheckBox.Create(AOwner);
3915                  Ctrl.ctrl.Parent := AParent;
3916                  ProcessLabel(Prompt.Required, TRUE, Ctrl.WHChk.Parent, Ctrl.WHChk);
3917                  Ctrl.WHChk.Flbl := lblCtrl;
3918                  if lblCtrl is TWinControl then
3919                    TWinControl(lblCtrl).TabOrder := Ctrl.WHChk.TabOrder;
3920                  Ctrl.WHChk.Flbl.Top := Y + 7;
3921                  Ctrl.WHChk.Flbl.Left := NewLInePromptGap+30;
3922                  WrapLeft := Ctrl.WHChk.Flbl.Left;
3923  //                Ctrl.WHChk.Flbl.Width := TextWidthByFont(
3924  //                  TExposedComponent(Ctrl.WHChk.Flbl).Font.Handle,
3925  //                  TExposedComponent(Ctrl.WHChk.Flbl).Caption)+25;
3926  //                Ctrl.WHChk.Flbl.Height := TextHeightByFont(
3927  //                  TExposedComponent(Ctrl.WHChk.Flbl).Font.Handle,
3928  //                  TExposedComponent(Ctrl.WHChk.Flbl).Caption)+4;
3929                  LineWidth := WrapLeft + Ctrl.WHChk.Flbl.Width+10;
3930                  Ctrl.WHChk.Check2 := TWHCheckBox.Create(AOwner);
3931                  Ctrl.WHChk.Check2.Parent := Ctrl.WHChk.Parent;
3932                  Ctrl.WHChk.Check3 := TWHCheckBox.Create(AOwner);
3933                  Ctrl.WHChk.Check3.Parent := Ctrl.WHChk.Parent;
3934                  Ctrl.WHChk.ShowHint := true;
3935                  Ctrl.WHChk.Hint := 'Letter will print with next WH batch run';
3936                  Ctrl.WHChk.Caption := 'Letter';
3937                  Ctrl.WHChk.Width := TextWidthByFont(Ctrl.WHChk.Font.Handle, Ctrl.WHChk.Caption)+25;
3938                  Ctrl.WHChk.Height := TextHeightByFont(Ctrl.WHChk.Font.Handle, Ctrl.WHChk.Caption)+4;
3939                  if (LineWidth + Ctrl.WHChk.Width) > PWidth - 10 then
3940                  begin
3941                    LineWidth := WrapLeft;
3942                    Y := Ctrl.WHChk.Flbl.Top + Ctrl.WHChk.Flbl.Height;
3943                    Nextline(Y);
3944                  end;
3945                  Ctrl.WHChk.Top := Y + 7;
3946                  Ctrl.WHChk.Left := LineWidth;
3947                  Ctrl.WHChk.OnClick := Prompt.PromptChange;
3948                  Ctrl.WHChk.Checked := (Pos('L',WHResultNot)>0);
3949                  LineWidth := LineWidth + Ctrl.WHChk.Width+10;
3950                  Ctrl.WHChk.Check2.Caption := 'In-Person';
3951                  Ctrl.WHChk.Check2.Width := TextWidthByFont(Ctrl.WHChk.Check2.Font.Handle, Ctrl.WHChk.Check2.Caption) + 25;
3952                  Ctrl.WHChk.Check2.Height := TextHeightByFont(Ctrl.WHChk.check2.Font.Handle, Ctrl.WHChk.check2.Caption)+4;
3953                  if (LineWidth + Ctrl.WHChk.Check2.Width) > PWidth - 10 then
3954                  begin
3955                    LineWidth := WrapLeft;
3956                    Y := Ctrl.WHChk.Top + Ctrl.WHChk.Height;
3957                    Nextline(Y);
3958                  end;
3959                  Ctrl.WHChk.Check2.Top := Y + 7;
3960                  Ctrl.WHChk.Check2.Left := LineWidth;
3961                  Ctrl.WHChk.Check2.OnClick := Prompt.PromptChange;
3962                  Ctrl.WHChk.Check2.Checked := (Pos('I',WHResultNot)>0);
3963                  LineWidth := LineWidth + Ctrl.WHChk.Check2.Width+10;
3964                  Ctrl.WHChk.Check3.Caption := 'Phone Call';
3965                  Ctrl.WHChk.Check3.Width := TextWidthByFont(Ctrl.WHChk.Check3.Font.Handle, Ctrl.WHChk.Check3.Caption)+20;
3966                  Ctrl.WHChk.Check3.Height := TextHeightByFont(Ctrl.WHChk.check3.Font.Handle, Ctrl.WHChk.check3.Caption)+4;
3967                  if (LineWidth + Ctrl.WHChk.Check3.Width) > PWidth - 10 then
3968                  begin
3969                    LineWidth := WrapLeft;
3970                    Y := Ctrl.WHChk.Check2.Top + Ctrl.WHChk.Check2.Height;
3971                    Nextline(Y);
3972                  end;
3973                  Ctrl.WHChk.Check3.Top := Y + 7;
3974                  Ctrl.WHChk.Check3.OnClick := Prompt.PromptChange;
3975                  Ctrl.WHChk.Check3.Checked := (Pos('P',WHResultNot)>0);
3976                  Ctrl.WHChk.Check3.Left := LineWidth;
3977                  Y := Ctrl.WHChk.Check3.Top + Ctrl.WHChk.Check3.Height;
3978                  Nextline(Y);
3979                  Ctrl.WHChk.Fbutton := TCPRSDialogButton.Create(AOwner);
3980                  Ctrl.WHChk.FButton.Parent := Ctrl.WHChk.Parent;
3981                  Ctrl.WHChk.FButton.Enabled:=(Pos('L',WHResultNot)>0);
3982                  Ctrl.WHChk.FButton.Left := Ctrl.WHChk.Flbl.Left;
3983                  Ctrl.WHChk.FButton.Top := Y+7;
3984                  Ctrl.WHChk.FButton.OnClick := Prompt.ViewWHText;
3985                  Ctrl.WHChk.FButton.Caption := 'View WH Notification Letter';
3986                  Ctrl.WHChk.FButton.Width := TextWidthByFont(Ctrl.WHChk.FButton.Font.Handle, Ctrl.WHChk.FButton.Caption) + 13;
3987                  Ctrl.WHChk.FButton.Height := TextHeightByFont(Ctrl.WHChk.FButton.Font.Handle, Ctrl.WHChk.FButton.Caption) + 13;
3988                  UpdateColorsFor508Compliance(Ctrl.WHChk);
3989                  UpdateColorsFor508Compliance(Ctrl.WHChk.Flbl);
3990                  UpdateColorsFor508Compliance(Ctrl.WHChk.Check2);
3991                  UpdateColorsFor508Compliance(Ctrl.WHChk.Check3);
3992                  UpdateColorsFor508Compliance(Ctrl.WHChk.FButton);
3993                  ScreenReaderSupport(Ctrl.WHChk);
3994                  ScreenReaderSupport(Ctrl.WHChk.Check2);
3995                  ScreenReaderSupport(Ctrl.WHChk.Check3);
3996                  ScreenReaderSupport(Ctrl.WHChk.FButton);
3997                  LineWidth := Ctrl.WHChk.FButton.Left + Ctrl.WHChk.FButton.Width;
3998                  if piece(Prompt.FRec4,u,12)='1' then
3999                  begin
4000                    Ctrl.WHChk.FPrintNow :=TCPRSDialogCheckBox.Create(AOwner);
4001                    Ctrl.WHChk.FPrintNow.Parent := Ctrl.WHChk.Parent;
4002                    Ctrl.WHChk.FPrintNow.ShowHint := true;
4003                    Ctrl.WHChk.FPrintNow.Hint := 'Letter will print after "Finish" button is clicked';
4004                    Ctrl.WHChk.FPrintNow.Caption:='Print Now';
4005                    Ctrl.WHChk.FPrintNow.Width := TextWidthByFont(Ctrl.WHChk.FPrintNow.Font.Handle, Ctrl.WHChk.FPrintNow.Caption)+20;
4006                    Ctrl.WHChk.FPrintNow.Height := TextHeightByFont(Ctrl.WHChk.FPrintNow.Font.Handle, Ctrl.WHChk.FPrintNow.Caption)+4;
4007                    if (LineWidth + Ctrl.WHChk.FPrintNow.Width) > PWidth - 10 then
4008                    begin
4009                      LineWidth := WrapLeft;
4010                      Y := Ctrl.WHChk.FButton.Top + Ctrl.WHChk.FButton.Height;
4011                      Nextline(Y);
4012                    end;
4013                    Ctrl.WHChk.FPrintNow.Left := LineWidth + 15;
4014                    Ctrl.WHChk.FPrintNow.Top := Y + 7;
4015                    Ctrl.WHChk.FPrintNow.Enabled := (Pos('L',WHResultNot)>0);
4016                    Ctrl.WHChk.FPrintNow.Checked :=(WHPrintDevice<>'');
4017                    Ctrl.WHChk.FPrintNow.OnClick := Prompt.PromptChange;
4018                    UpdateColorsFor508Compliance(Ctrl.WHChk.FPrintNow);
4019                    MinX :=PWidth;
4020                    if (Ctrl.WHChk.FButton.Top + Ctrl.WHChk.FButton.Height) > (Ctrl.WHChk.FPrintNow.Top + Ctrl.WHChk.FPrintNow.Height) then
4021                      Y := Ctrl.WHChk.FButton.Top + Ctrl.WHChk.FButton.Height + 7
4022                    else
4023                      Y := Ctrl.WHChk.FPrintNow.Top + Ctrl.WHChk.FPrintNow.Height + 7;
4024                  ScreenReaderSupport(Ctrl.WHChk.FPrintNow);
4025                  end
4026                  else
4027                    Y := Ctrl.WHChk.FButton.Top + Ctrl.WHChk.FButton.Height + 7;
4028                  NextLine(Y);
4029                end;
4030  
4031              ptVisitDate:
4032                begin
4033                  Ctrl.dt := TCPRSDialogDateCombo.Create(AOwner);
4034                  Ctrl.ctrl.Parent := AParent;
4035                  Ctrl.dt.LongMonths := TRUE;
4036                  try
4037                    DefaultDate := Ctrl.dt.FMDate;
4038                    Ctrl.dt.FMDate := StrToFloat(Prompt.Value);
4039                  except
4040                    on EConvertError do
4041                      Ctrl.dt.FMDate := DefaultDate;
4042                    else
4043                      raise;
4044                  end;
4045                  Ctrl.dt.OnChange := Prompt.PromptChange;
4046                  UpdateColorsFor508Compliance(Ctrl.dt);
4047                  DoLbl := TRUE;
4048                  MinX := Ctrl.dt.Width;
4049                  //TextWidthByFont(Ctrl.dt.Font.Handle, 'May 22, 2000') + 26;
4050                end;
4051  
4052              ptPrimaryDiag, ptAdd2PL, ptContraindicated:
4053                begin
4054                  Ctrl.cb := TCPRSDialogCheckBox.Create(AOwner);
4055                  Ctrl.ctrl.Parent := AParent;
4056                  Ctrl.cb.Checked := (Prompt.Value = '1');
4057                  Ctrl.cb.Caption := Prompt.Caption;
4058                  if prompt.Required=false then DoLbl := true;
4059                  Ctrl.cb.AutoSize := False;
4060                  Ctrl.cb.OnEnter := ParentCBEnter;
4061                  Ctrl.cb.OnExit := ParentCBExit;
4062                  Ctrl.cb.Height := TORCheckBox(Ctrl.cb).Height + 5;
4063                  Ctrl.cb.Width := 17;
4064                  Ctrl.cb.OnClick := Prompt.PromptChange;
4065                  UpdateColorsFor508Compliance(Ctrl.cb);
4066                  MinX := Ctrl.cb.Width;
4067                end;
4068  
4069              else
4070              begin
4071                if(pt = ptSubComment) then
4072                begin
4073                  Ctrl.cb := TCPRSDialogCheckBox.Create(AOwner);
4074                  Ctrl.ctrl.Parent := AParent;
4075                  Ctrl.cb.Checked := (Prompt.Value = '1');
4076                  Ctrl.cb.Caption := Prompt.Caption;
4077                  Ctrl.cb.AutoSize := TRUE;
4078                  Ctrl.cb.OnClick := SubCommentChange;
4079                  Ctrl.cb.Tag := Integer(Prompt);
4080                  UpdateColorsFor508Compliance(Ctrl.cb);
4081                  MinX := Ctrl.cb.Width;
4082                end
4083                else
4084                if pt = ptVitalEntry then
4085                begin
4086                  vt := Prompt.VitalType;
4087                  if(vt = vtPain) then
4088                  begin
4089                    Ctrl.cbo := TCPRSDialogComboBox.Create(AOwner);
4090                    Ctrl.ctrl.Parent := AParent;
4091                    Ctrl.cbo.Style := orcsDropDown;
4092                    Ctrl.cbo.Pieces := '1,2';
4093                    Ctrl.cbo.OnKeyDown := Prompt.ComboBoxKeyDown;
4094                    InitPainCombo(Ctrl.cbo);
4095                    Ctrl.cbo.ListItemsOnly := TRUE;
4096                    Ctrl.cbo.SelectByID(Prompt.VitalValue);
4097                    Ctrl.cbo.OnChange := Prompt.PromptChange;
4098                    Ctrl.cbo.SelLength := 0;
4099                    MinX := TextWidthByFont(Ctrl.cbo.Font.Handle, Ctrl.cbo.DisplayText[0]) + 24;
4100                    MaxX := TextWidthByFont(Ctrl.cbo.Font.Handle, Ctrl.cbo.DisplayText[1]) + 24;
4101                    if(ElementChecked = Self) then
4102                    begin
4103                      AutoFocusControl := Ctrl.cbo;
4104                      ElementChecked := nil;
4105                    end;
4106                    UpdateColorsFor508Compliance(Ctrl.cbo);
4107                  end
4108                  else
4109                  begin
4110                    Ctrl.vedt := TVitalEdit.Create(AOwner);
4111                    Ctrl.ctrl.Parent := AParent;
4112                    MinX := TextWidthByFont(Ctrl.vedt.Font.Handle, '12345.67');
4113                    Ctrl.vedt.OnKeyPress := Prompt.EditKeyPress;
4114                    Ctrl.vedt.OnChange := Prompt.PromptChange;
4115                    Ctrl.vedt.OnExit := Prompt.VitalVerify;
4116                    UpdateColorsFor508Compliance(Ctrl.vedt);
4117                    if(vt in [vtTemp, vtHeight, vtWeight]) then
4118                    begin
4119                      HasVCombo := TRUE;
4120                      Ctrl.vedt.LinkedCombo := TVitalComboBox.Create(AOwner);
4121                      Ctrl.vedt.LinkedCombo.Parent := AParent;
4122                      Ctrl.vedt.LinkedCombo.OnChange := Prompt.PromptChange;
4123                      Ctrl.vedt.LinkedCombo.Tag := VitalControlTag(vt, TRUE);
4124                      Ctrl.vedt.LinkedCombo.OnExit := Prompt.VitalVerify;
4125                      Ctrl.vedt.LinkedCombo.LinkedEdit := Ctrl.vedt;
4126                      case vt of
4127                        vtTemp:
4128                          begin
4129                            Ctrl.vedt.LinkedCombo.Items.Add('F');
4130                            Ctrl.vedt.LinkedCombo.Items.Add('C');
4131                          end;
4132  
4133                        vtHeight:
4134                          begin
4135                            Ctrl.vedt.LinkedCombo.Items.Add('IN');
4136                            Ctrl.vedt.LinkedCombo.Items.Add('CM');
4137                          end;
4138  
4139                        vtWeight:
4140                          begin
4141                            Ctrl.vedt.LinkedCombo.Items.Add('LB');
4142                            Ctrl.vedt.LinkedCombo.Items.Add('KG');
4143                          end;
4144  
4145                      end;
4146                      Ctrl.vedt.LinkedCombo.SelectByID(Prompt.VitalUnitValue);
4147                      if(Ctrl.vedt.LinkedCombo.ItemIndex < 0) then
4148                        Ctrl.vedt.LinkedCombo.ItemIndex := 0;
4149                      Ctrl.vedt.LinkedCombo.Width := TextWidthByFont(Ctrl.vedt.Font.Handle,
4150                                                                      Ctrl.vedt.LinkedCombo.Items[1]) + 30;
4151                      Ctrl.vedt.LinkedCombo.SelLength := 0;
4152                      UpdateColorsFor508Compliance(Ctrl.vedt.LinkedCombo);
4153                      inc(MinX, Ctrl.vedt.LinkedCombo.Width);
4154                    end;
4155                    if(ElementChecked = Self) then
4156                    begin
4157                      AutoFocusControl := Ctrl.vedt;
4158                      ElementChecked := nil;
4159                    end;
4160                  end;
4161                  Ctrl.ctrl.Text := Prompt.VitalValue;
4162                  Ctrl.ctrl.Tag := VitalControlTag(vt);
4163                  DoLbl := TRUE;
4164                end
4165                else
4166                if pt = ptDataList then
4167                begin
4168                  Ctrl.cbo := TCPRSDialogComboBox.Create(AOwner);
4169                  Ctrl.ctrl.Parent := AParent;
4170                  Ctrl.cbo.Style := orcsDropDown;
4171                  Ctrl.cbo.Pieces := '12';
4172                  if ActChoicesSL = nil then
4173                     ActChoicesSL := TORStringList.Create;
4174                  if Self.Historical then
4175                    EncDt := DateTimeToFMDateTime(Date)
4176                  else
4177                    EncDt := RemForm.PCEObj.VisitDateTime;
4178                  if assigned(Prompt.FData.FChoicesActiveDates) then {csv active/inactive dates}
4179                   for m := 0 to (Prompt.FData.FChoices.Count - 1) do
4180                    begin
4181                      for n := 0 to (TStringList(Prompt.FData.FChoicesActiveDates[m]).Count - 1) do
4182                       begin
4183                         ActDt := StrToIntDef((Piece(TStringList(Prompt.FData.FChoicesActiveDates[m]).Strings[n], ':', 1)),0);
4184                         InActDt := StrToIntDef((Piece(TStringList(Prompt.FData.FChoicesActiveDates[m]).Strings[n], ':', 2)),9999999);
4185                         Piece12 := Piece(Piece(Prompt.FData.FChoices.Strings[m],U,12),':',1);
4186                         Prompt.FData.FChoices.SetStrPiece(m,12,Piece12);
4187                         if (EncDt >= ActDt) and (EncDt <= InActDt) then
4188                            ActChoicesSL.AddObject(Prompt.FData.FChoices[m], Prompt.FData.FChoices.Objects[m]);
4189                       end; {loop through the TStringList object in FChoicesActiveDates[m] object property}
4190                    end  {loop through FChoices/FChoicesActiveDates}
4191                  else
4192                    FastAssign(Prompt.FData.FChoices, ActChoicesSL);
4193                  FastAssign(ActChoicesSL, Ctrl.cbo.Items);
4194                  Ctrl.cbo.CheckBoxes := TRUE;
4195                  Ctrl.cbo.SelectByID(Prompt.Value);
4196                  Ctrl.cbo.OnCheckedText := FReminder.ComboBoxCheckedText;
4197                  Ctrl.cbo.OnResize := FReminder.ComboBoxResized;
4198                  Ctrl.cbo.CheckedString := Prompt.Value;
4199                  Ctrl.cbo.OnChange := Prompt.PromptChange;
4200                  Ctrl.cbo.ListItemsOnly := TRUE;
4201                  UpdateColorsFor508Compliance(Ctrl.cbo);
4202                  if(ElementChecked = Self) then
4203                  begin
4204                    AutoFocusControl := Ctrl.cbo;
4205                    ElementChecked := nil;
4206                  end;
4207                  DoLbl := TRUE;
4208                  if(Prompt.FData.FChoicesFont = Ctrl.cbo.Font.Handle) then
4209                  begin
4210                    MinX := Prompt.FData.FChoicesMin;
4211                    MaxX := Prompt.FData.FChoicesMax;
4212                  end
4213                  //agp ICD-10 suppress combobox and label if no values.
4214                  else if (Ctrl.cbo.Items.Count > 0) then
4215                  begin
4216                    GetComboBoxMinMax(Ctrl.cbo, MinX, MaxX);
4217                    inc(MaxX,18); // Adjust for checkboxes
4218                    MinX := MaxX;
4219                    Prompt.FData.FChoicesFont := Ctrl.cbo.Font.Handle;
4220                    Prompt.FData.FChoicesMin := MinX;
4221                    Prompt.FData.FChoicesMax := MaxX;
4222                  end
4223                  else
4224                  DoLbl := FALSE
4225                end   
4226                else
4227                if(pt = ptMHTest) or ((pt = ptGaf) and (MHDLLFound = true)) then
4228                begin
4229                  Ctrl.btn := TCPRSDialogButton.Create(AOwner);
4230                  Ctrl.ctrl.Parent := AParent;
4231                  Ctrl.btn.OnClick := Prompt.DoMHTest;
4232                  Ctrl.btn.Caption := Prompt.ForcedCaption;
4233                  if Piece(Prompt.FData.FRec3,U,13)='1' then
4234                  begin
4235                    Ctrl.btn.Caption := Ctrl.btn.Caption + ' *';
4236                    (Ctrl.btn as ICPRSDialogComponent).RequiredField := TRUE;
4237                  end;
4238                  MinX := TextWidthByFont(Ctrl.btn.Font.Handle, Ctrl.btn.Caption) + 13;
4239                  Ctrl.btn.Height := TextHeightByFont(Ctrl.btn.Font.Handle, Ctrl.btn.Caption) + 8;
4240                  DoLbl := TRUE;
4241                end
4242               else
4243                if ((pt = ptGAF)) and (MHDLLFound = false) then
4244                begin
4245                  Ctrl.edt := TCPRSDialogFieldEdit.Create(AOwner);
4246                  Ctrl.ctrl.Parent := AParent;
4247                  Ctrl.edt.Text := Prompt.Value;
4248                  ud := TUpDown.Create(AOwner);
4249                  ud.Parent := AParent;
4250                  ud.Associate := Ctrl.edt;
4251                  ud.Min := 0;
4252                  ud.Max := 100;
4253                  MinX := TextWidthByFont(Ctrl.edt.Font.Handle, IntToStr(ud.Max)) + 24 + Gap;
4254                  ud.Position := StrToIntDef(Prompt.Value, ud.Min);
4255                  Ctrl.edt.OnKeyPress := Prompt.EditKeyPress;
4256                  Ctrl.edt.OnChange := Prompt.PromptChange;
4257                  if(User.WebAccess and (GAFURL <> '')) then
4258                  begin
4259                    HelpBtn := TCPRSDialogButton.Create(AOwner);
4260                    HelpBtn.Parent := AParent;
4261                    HelpBtn.Caption := 'Reference Info';
4262                    HelpBtn.OnClick := Prompt.GAFHelp;
4263                    HelpBtn.Width := TextWidthByFont(HelpBtn.Font.Handle, HelpBtn.Caption) + 13;
4264                    HelpBtn.Height := Ctrl.edt.Height;
4265                    inc(MinX, HelpBtn.Width);
4266                  end;
4267                  DoLbl := TRUE;
4268                end
4269                else
4270                  Ctrl.ctrl := nil;
4271              end;
4272            end;
4273  
4274             if(DoLbl) and ((pt <> ptWHNotPurp) and (pt <> ptWHPapResult)) then
4275            //if(DoLbl) then
4276            begin
4277              Req := Prompt.Required;
4278              if (not Req) and (pt = ptGaf) and (MHDLLFound = false) then
4279                Req := (Piece(Prompt.FData.FRec3,U,13) = '1');
4280              ProcessLabel(Req, Prompt.FParent.Enabled, AParent, Ctrl.Ctrl);
4281              if assigned(lblCtrl) then
4282              begin
4283                inc(MinX, lblCtrl.Width + LblGap);
4284                inc(MaxX, lblCtrl.Width + LblGap);
4285              end
4286              else
4287                DoLbl := FALSE;
4288            end;
4289  
4290            if(MaxX < MinX) then
4291              MaxX := MinX;
4292  
4293            if((Prompt.SameLine) and ((LastX + MinX + Gap) < PWidth)) and
4294            ((pt <> ptWHNotPurp) and (pt <> ptWHPapResult)) then
4295            //if((Prompt.SameLine) and ((LastX + MinX + Gap) < PWidth)) then
4296            begin
4297              X := LastX;
4298            end
4299            else
4300            begin
4301              if(Shared) and (assigned(FChildren)) and (FChildren.Count > 0) then
4302                X := TRemDlgElement(FChildren[0]).TrueIndent
4303              else
4304              begin
4305                if(assigned(cb)) then
4306                  X := cb.Left + NewLinePromptGap
4307                else
4308                  X := pnl.Left + NewLinePromptGap;
4309              end;
4310              NextLine(Y);
4311            end;
4312            if(MaxX > (PWidth - X - Gap)) then
4313              MaxX := PWidth - X - Gap;
4314            if((DoLbl) or (assigned(Ctrl.Ctrl)))  and
4315            ((pt <> ptWHNotPurp) and (pt <> ptWHPapResult)) then
4316            //if((DoLbl) or (assigned(Ctrl.Ctrl))) then
4317            begin
4318              if DoLbl then
4319              begin
4320                lblCtrl.Left := X;
4321                lblCtrl.Top := Y;
4322                inc(X, lblCtrl.Width + LblGap);
4323                dec(MinX, lblCtrl.Width + LblGap);
4324                dec(MaxX, lblCtrl.Width + LblGap);
4325                SameLineCtrl.Add(lblCtrl);
4326              end;
4327              if(assigned(Ctrl.Ctrl)) then
4328              begin
4329                if ScreenReaderSystemActive then
4330                begin
4331                  if Supports(Ctrl.Ctrl, ICPRSDialogComponent) then
4332                    ScreenReaderSystem_CurrentComponent(Ctrl.Ctrl as ICPRSDialogComponent)
4333                  else
4334                    ScreenReaderSystem_Stop;
4335                end;
4336                Ctrl.Ctrl.Enabled := Prompt.FParent.Enabled;
4337                if not Ctrl.Ctrl.Enabled then
4338                  Ctrl.Ctrl.Font.Color := DisabledFontColor;
4339                Ctrl.Ctrl.Left := X;
4340                Ctrl.Ctrl.Top := Y;
4341                SameLineCtrl.Add(Ctrl.Ctrl);
4342                if(assigned(ud)) then
4343                begin
4344                  SameLineCtrl.Add(ud);
4345                  if(assigned(HelpBtn)) then
4346                  begin
4347                    SameLineCtrl.Add(HelpBtn);
4348                    Ctrl.Ctrl.Width := MinX - HelpBtn.Width - ud.Width;
4349                    HelpBtn.Left := X + Ctrl.Ctrl.Width + ud.Width + Gap;
4350                    HelpBtn.Top := Y;
4351                    HelpBtn.Enabled := Prompt.FParent.Enabled;
4352                  end
4353                  else
4354                    Ctrl.Ctrl.Width := MinX - ud.Width;
4355                  ud.Left := X + Ctrl.Ctrl.Width;
4356                  ud.Top := Y;
4357                  LastX := X + MinX + PromptGap;
4358                  ud.Enabled := Prompt.FParent.Enabled;
4359                end
4360                else
4361                if(HasVCombo) then
4362                begin
4363                  SameLineCtrl.Add(Ctrl.vedt.LinkedCombo);
4364                  Ctrl.Ctrl.Width := MinX - Ctrl.vedt.LinkedCombo.Width;
4365                  Ctrl.vedt.LinkedCombo.Left := X + Ctrl.Ctrl.Width;
4366                  Ctrl.vedt.LinkedCombo.Top := Y;
4367                  LastX := X + MinX + PromptGap;
4368                  Ctrl.vedt.LinkedCombo.Enabled := Prompt.FParent.Enabled;
4369                end
4370                else
4371                begin
4372                  Ctrl.Ctrl.Width := MaxX;
4373                  LastX := X + MaxX + PromptGap;
4374                end;
4375              end;
4376            end;
4377          end;
4378          if(assigned(ud)) then
4379            Prompt.FCurrentControl := ud
4380          else
4381            Prompt.FCurrentControl := Ctrl.Ctrl;
4382        end;
4383        NextLine(Y);
4384      finally
4385        SameLineCtrl.Free;
4386      end;
4387    end;
4388  
4389    procedure UpdatePrompts(EnablePanel: boolean; ClearCB: boolean);
4390    begin
4391      if EnablePanel then
4392      begin
4393        if not ScreenReaderSystemActive then
4394        begin
4395          pnl.TabStop := TRUE;     {tab through the panels instead of the checkboxes}
4396          pnl.OnEnter := FieldPanelEntered;
4397          pnl.OnExit := FieldPanelExited;
4398        end;
4399        if ClearCB then
4400          cb := nil;
4401      end;
4402  
4403      if (FChecked and assigned(FPrompts) and (FPrompts.Count > 0)) then
4404      begin
4405        AddPrompts(FALSE, BaseParent, ParentWidth, Y);
4406      end
4407      else
4408        inc(Y, pnl.Height);
4409    end;
4410    
4411  begin
4412    Result := nil;
4413    cb := nil;
4414    pnl := nil;
4415    AutoFocusControl := nil;
4416    X := TrueIndent;
4417    if(assigned(FPrompts)) then
4418    begin
4419      for i := 0 to FPrompts.Count-1 do
4420        TRemPrompt(FPrompts[i]).FCurrentControl := nil;
4421    end;
4422    if(ElemType = etDisplayOnly) then
4423    begin
4424      if(FText <> '') then
4425      begin
4426        inc(Y,Gap);
4427        pnl := GetPanel(EntryID, CRLFText(FText), ParentWidth - X - (Gap * 2), nil);
4428        pnl.Left := X;
4429        pnl.Top := Y;
4430        UpdatePrompts(ScreenReaderSystemActive, TRUE);
4431      end;
4432    end
4433    else
4434    begin
4435      inc(Y,Gap);
4436      cb := TCPRSDialogParentCheckBox.Create(AOwner);
4437      cb.Parent := BaseParent;
4438      cb.Left := X;
4439      cb.Top := Y;
4440      cb.Tag := Integer(Self);
4441      cb.WordWrap := TRUE;
4442      cb.AutoSize := TRUE;
4443      cb.Checked := FChecked;
4444      cb.Width := ParentWidth - X - Gap;
4445      if not ScreenReaderSystemActive then
4446        cb.Caption := CRLFText(FText);
4447      cb.AutoAdjustSize;
4448      cbSingleLine := cb.SingleLine;
4449  //    cb.AutoSize := FALSE;
4450      cb.WordWrap := FALSE;
4451      cb.Caption := ' ';
4452  //    cb.Width := 13;
4453  //    cb.Height := 17;
4454      if not ScreenReaderSystemActive then
4455        cb.TabStop := False;  {take checkboxes out of the tab order}
4456      pnl := GetPanel(EntryID, CRLFText(FText), ParentWidth - X - (Gap * 2) - IndentGap, cb);
4457      pnl.Left := X + IndentGap;
4458      pnl.Top := Y;
4459      cb.Associate := pnl;
4460      pnl.Tag := Integer(cb);   {So the panel can check the checkbox}
4461      cb.OnClick := cbClicked;
4462      cb.OnEnter := cbEntered;
4463      if ScreenReaderSystemActive then
4464        cb.OnExit := ParentCBExit;
4465  
4466      UpdateColorsFor508Compliance(cb);
4467      pnl.OnKeyPress := FieldPanelKeyPress;
4468      pnl.OnClick := FieldPanelOnClick;
4469      for i := 0 to pnl.ControlCount - 1 do
4470        if ((pnl.Controls[i] is TLabel) or (pnl.Controls[i] is TVA508StaticText)) and
4471           not (fsUnderline in TLabel(pnl.Controls[i]).Font.Style) then //If this isn't a hyperlink change then event handler
4472           TLabel(pnl.Controls[i]).OnClick := FieldPanelLabelOnClick;
4473  
4474      //cb.Enabled := Enabled;
4475      if(assigned(FParent) and (FParent.ChildrenRequired in [crOne, crNoneOrOne])) then
4476        cb.RadioStyle := TRUE;
4477  
4478      UpdatePrompts(TRUE, FALSE);
4479    end;
4480  
4481    if(ShowChildren) then
4482    begin
4483      gb := nil;
4484      if(Box) then
4485      begin
4486        gb := TGroupBox.Create(AOwner);
4487        gb.Parent := BaseParent;
4488        gb.Left := TrueIndent + (ChildrenIndent * IndentMult);
4489        gb.Top := Y;
4490        gb.Width := ParentWidth - gb.Left - Gap;
4491        PrntWidth := gb.Width - (Gap * 2);
4492        gb.Caption := BoxCaption;
4493  //      if ScreenReaderSystemActive then
4494  //      begin
4495  //        ScreenReaderSystem_AddText(gb.Caption + ',');
4496  //      end;
4497        gb.Enabled := EnableChildren;
4498        if(not EnableChildren) then
4499          gb.Font.Color := DisabledFontColor;
4500        UpdateColorsFor508Compliance(gb);
4501        prnt := gb;
4502        if(gb.Caption = '') then
4503          Y1 := gbTopIndent
4504        else
4505          Y1 := gbTopIndent2;
4506      end
4507      else
4508      begin
4509        prnt := BaseParent;
4510        Y1 := Y;
4511        PrntWidth := ParentWidth;
4512      end;
4513  
4514      for i := 0 to FChildren.Count-1 do
4515      begin
4516        ERes := TRemDlgElement(FChildren[i]).BuildControls(Y1, PrntWidth, prnt, AOwner);
4517        if(not assigned(Result)) then
4518          Result := ERes;
4519      end;
4520  
4521      if(FHasSharedPrompts) then
4522        AddPrompts(TRUE, prnt, PrntWidth, Y1);
4523  
4524      if(Box) then
4525      begin
4526        gb.Height := Y1 + (Gap * 3);
4527        inc(Y, Y1 + (Gap * 4));
4528      end
4529      else
4530        Y := Y1;
4531    end;
4532  
4533    SubCommentChange(nil);
4534  
4535    if(assigned(AutoFocusControl)) then
4536    begin
4537      if(AutoFocusControl is TORComboBox) and
4538        (TORComboBox(AutoFocusControl).CheckBoxes) and
4539        (pos('1',TORComboBox(AutoFocusControl).CheckedString) = 0) then
4540        Result := AutoFocusControl
4541      else
4542      if(TORExposedControl(AutoFocusControl).Text = '') then
4543        Result := AutoFocusControl
4544    end;
4545    if ScreenReaderSystemActive then
4546      ScreenReaderSystem_Stop;    
4547  end;