Function

TRemData.AddData

Module

uReminders

Last Modified

10/8/2014 2:49:30 PM

Visibility

Protected

Owner

TRemData

Declaration

function AddData(List: TStrings; Finishing: boolean): integer;

Calls Hierarchy


TRemData.AddData
 ├Add
 │ ├Code2DataType
 │ ├TRemDlgElement.Historical
 │ ├TRemPrompt.GetValue
 │ │ ├TRemDlgElement.Historical
 │ │ ├TPCEData.VisitDateTime
 │ │ │ └TPCEData.IsSecondaryVisit
 │ │ ├TRemPrompt.RemDataActive
 │ │ │ └TRemPrompt.CompareActiveDate
 │ │ └TRemPrompt.RemDataChoiceActive
 │ ├TPCEData.VisitDateTime...
 │ ├ValidateGAFDate
 │ │ ├TPatient.GetDateDied
 │ │ │ └DateOfDeath
 │ │ └FMToday
 │ │   └FMNow
 │ ├TPCEProviderList.PCEProvider
 │ │ ├Check
 │ │ │ └TPCEProviderList.IndexOfProvider
 │ │ └TPCEProviderList.PrimaryIEN
 │ │   └TPCEProviderList.GetPrimaryIdx
 │ ├AddPrompt
 │ │ ├TRemPrompt.PromptType
 │ │ │ └Code2PromptType
 │ │ ├TPCEProviderList.PCEProvider...
 │ │ ├TPCEData.VisitDateTime...
 │ │ ├TRemPrompt.VitalValue
 │ │ │ └TRemPrompt.GetValue...
 │ │ ├TRemPrompt.VitalType
 │ │ │ ├Code2VitalType
 │ │ │ └TRemData.InternalValue
 │ │ ├TRemPrompt.VitalUnitValue
 │ │ │ ├TRemPrompt.VitalType...
 │ │ │ └TRemPrompt.GetValue...
 │ │ ├ConvertVital
 │ │ ├FormatVitalForNote
 │ │ │ └ConvertVitalData
 │ │ ├TRemPrompt.GetValue...
 │ │ └TRemDlgElement.Historical
 │ └GetPCEDataText
 │   └GetDiagnosisText
 ├TRemDlgElement.Historical
 └TPCEData.VisitDateTime...

Called-By Hierarchy


                                                                    TRemData.AddData
                                                            TRemDlgElement.AddData┘ 
                                                         TReminderDialog.AddData┤   
                                                               GetReminderData┤ │   
                                                               GetReminderData┘ │   
                                                           TRemDlgElement.Add2PN┤   
                                                                     CheckItem┤ │   
                                                             ChildrenChecked┤ │ │   
                                                              CheckItem...┘ │ │ │   
                                                  TReminderDialog.Processing┘ │ │   
                                                  TfrmRemDlg.btnClearClick┤   │ │   
                                                        TfrmRemDlg.KillAll┤   │ │   
                                               TfrmRemDlg.FormCloseQuery┤ │   │ │   
                                               TfrmRemDlg.btnCancelClick┘ │   │ │   
                                          TfrmNotes.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┘   │   │   │ │   
                                           TfrmNotes.mnuActDeleteClick┘   │   │ │   
                                            TfrmNotes.SaveEditedNote┘     │   │ │   
                                         TfrmNotes.SaveCurrentNote┘       │   │ │   
                                 TfrmNotes.AllowContextChange...┤         │   │ │   
                                       TfrmNotes.LstNotesToPrint┤         │   │ │   
                      TfrmFrame.mnuFilePrintSelectedItemsClick┘ │         │   │ │   
                                          TfrmNotes.RequestPrint┤         │   │ │   
                                   TfrmFrame.mnuFilePrintClick┘ │         │   │ │   
                                          TfrmNotes.mnuViewClick┤         │   │ │   
                                      TfrmNotes.SetViewContext┤ │         │   │ │   
                                       TfrmNotes.DisplayPage┤ │ │         │   │ │   
                       TfrmNotes.mnuViewReturntoDefaultClick┘ │ │         │   │ │   
                           TfrmNotes.mnuViewSaveAsDefaultClick┘ │         │   │ │   
                                          TfrmNotes.StartNewEdit┤         │   │ │   
                                      TfrmNotes.mnuActNewClick┤ │         │   │ │   
                                   TfrmNotes.cmdNewNoteClick┘ │ │         │   │ │   
                               TfrmNotes.mnuActAddIDEntryClick┤ │         │   │ │   
                                   TfrmNotes.mnuActAddendClick┤ │         │   │ │   
                                     TfrmNotes.mnuActEditClick┘ │         │   │ │   
                         TfrmNotes.mnuActDetachFromIDParentClick┤         │   │ │   
                                  TfrmNotes.mnuActDeleteClick...┤         │   │ │   
                                       TfrmNotes.mnuActSaveClick┤         │   │ │   
                                       TfrmNotes.mnuActSignClick┤         │   │ │   
                                          TfrmNotes.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┘               │         │   │ │   
                                             TfrmNotes.FormClose┤         │   │ │   
                        TfrmNotes.mnuActIdentifyAddlSignersClick┤         │   │ │   
                            TfrmNotes.popNoteMemoAddlSignClick┘ │         │   │ │   
                                  TfrmNotes.ProcessNotifications┤         │   │ │   
                                         TfrmNotes.DisplayPage┘ │         │   │ │   
                                     TfrmNotes.SetViewContext...┤         │   │ │   
                                       TfrmNotes.tvNotesDragDrop┤         │   │ │   
                           TfrmNotes.mnuActAttachtoIDParentClick┘         │   │ │   
                                                 TfrmRemDlg.btnFinishClick┤   │ │   
                                                    ProcessingChangeString┤   │ │   
                                                       ClearReminderData┤ │   │ │   
                                                TfrmFrame.ClearPatient┘ │ │   │ │   
                                              TfrmFrame.SetupPatient┘   │ │   │ │   
                                         UpdatePatientInfoForAlert┤     │ │   │ │   
                                   TfrmFrame.mnuFileNextClick...┘ │     │ │   │ │   
                                     TfrmFrame.mnuFileOpenClick...┤     │ │   │ │   
                                  TfrmFrame.AllowCCOWContextChange┤     │ │   │ │   
                                   TfrmFrame.mnuFileNextClick...┤ │     │ │   │ │   
                                   TfrmFrame.mnuFileOpenClick...┤ │     │ │   │ │   
                          TfrmFrame.mnuFileResumeContextSetClick┘ │     │ │   │ │   
                                       TfrmFrame.UpdateCCOWContext┤     │ │   │ │   
                                   TfrmFrame.mnuFileOpenClick...┤ │     │ │   │ │   
                              TfrmFrame.ctxContextorCommitted...┤ │     │ │   │ │   
                          TfrmFrame.mnuFileResumeContextGetClick┘ │     │ │   │ │   
                            TfrmFrame.mnuFileResumeContextSetClick┘     │ │   │ │   
                                               RemindersInProcessChanged┘ │   │ │   
                                                   InitReminderObjects┘   │   │ │   
                                           uReminders.initialization┘     │   │ │   
                                                         BuildReminderTree┤   │ │   
                                            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...┘ │     │ │ │   │ │     │ │   │ │   
                    TfrmConsults.SetViewContext...┤     │ │ │   │ │     │ │   │ │   
                      TfrmConsults.mnuViewClick...┤     │ │ │   │ │     │ │   │ │   
        TfrmConsults.mnuActDetachFromIDParentClick┤     │ │ │   │ │     │ │   │ │   
             TfrmConsults.mnuActNoteDeleteClick...┤     │ │ │   │ │     │ │   │ │   
             TfrmConsults.mnuActSignatureSaveClick┤     │ │ │   │ │     │ │   │ │   
             TfrmConsults.mnuActSignatureSignClick┤     │ │ │   │ │     │ │   │ │   
                         TfrmConsults.SaveSignItem┤     │ │ │   │ │     │ │   │ │   
                        TfrmReview.cmdOKClick...┘ │     │ │ │   │ │     │ │   │ │   
                   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┘   │     │ │   │ │   
                                                  ViewRemDlg┤     │     │ │   │ │   
                                        ViewReminderDialog┤ │     │     │ │   │ │   
                          TfrmDrawers.tvRemindersMouseUp┤ │ │     │     │ │   │ │   
                       TfrmDrawers.RemindersChanged...┘ │ │ │     │     │ │   │ │   
                          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┘             │     │ │   │ │   
                                            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.mnuActAddIDEntryClick┘ │ │       │ │   │ │   
                                      TfrmNotes.InsertAddendum┤ │       │ │   │ │   
                                 TfrmNotes.mnuActAddendClick┘ │ │       │ │   │ │   
                                         TfrmNotes.LoadForEdit┤ │       │ │   │ │   
                                   TfrmNotes.mnuActEditClick┘ │ │       │ │   │ │   
                                   TfrmNotes.SaveEditedNote...┤ │       │ │   │ │   
                                     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...┘         │ │   │ │   
                                       TfrmReminderTree.RemindersChanged┘ │   │ │   
                                           TfrmReminderTree.FormCreate┤   │   │ │   
                                          TfrmReminderTree.FormDestroy┘   │   │ │   
                                            TReminderDialog.FinishProblems┘   │ │   
                                              TfrmRemDlg.ProcessReminder┤     │ │   
                                                 ViewRemDlgFromForm...┤ │     │ │   
                                              TfrmRemDlg.btnClearClick┤ │     │ │   
                                 TfrmRemDlg.ProcessReminderFromNodeStr┘ │     │ │   
                                             TfrmRemDlg.btnNextClick┤   │     │ │   
                                             TfrmRemDlg.btnBackClick┘   │     │ │   
                                               TfrmRemDlg.btnFinishClick┘     │ │   
                                                        TRemDlgElement.AddText┘ │   
                                                     TReminderDialog.AddText┤   │   
                                                     TfrmRemDlg.UpdateText┤ │   │   
                                           TfrmRemDlg.ProcessReminder...┤ │ │   │   
                                                TfrmRemDlg.BuildControls┤ │ │   │   
                                         TfrmRemDlg.ProcessReminder...┤ │ │ │   │   
                                                TfrmRemDlg.UMResyncRem┤ │ │ │   │   
                                            TfrmRemDlg.ProcessTemplate┤ │ │ │   │   
                                               ViewRemDlgFromForm...┘ │ │ │ │   │   
                                                TfrmRemDlg.SetFontSize┘ │ │ │   │   
                                               ViewRemDlgFromForm...┤   │ │ │   │   
                                             TfrmFrame.ChangeFont...┘   │ │ │   │   
                                                TfrmRemDlg.btnVisitClick┤ │ │   │   
                                           TfrmRemDlg.ProcessTemplate...┘ │ │   │   
                                                 TfrmRemDlg.btnFinishClick┤ │   │   
                                         TReminderDialog.FinishProblems...┘ │   │   
                                                                   ..(rec)..┘   │   
                                                                       ..(rec)..┘   

Calls

Name Declaration Comments
Add procedure Add(Str: string; Root: TRemPCERoot); -
TRemDlgElement.Historical function Historical: boolean; -
TPCEData.VisitDateTime function VisitDateTime: TFMDateTime; -

Called-By

Name Declaration Comments
TRemDlgElement.AddData function AddData(Lst: TStrings; Finishing: boolean; AHistorical: boolean = FALSE): integer; -


Source

5204  function TRemData.AddData(List: TStrings; Finishing: boolean): integer;
5205  var
5206    i, j, k: integer;
5207    PCECat: TPCEDataCat;
5208    Primary: boolean;
5209    ActDt, InActDt: Double;
5210    EncDt: TFMDateTime;
5211  
5212    procedure AddPrompt(Prompt: TRemPrompt; dt: TRemDataType; var x: string);
5213    var
5214      pt: TRemPromptType;
5215      pnum: integer;
5216      Pdt: TRemDataType;
5217      v: TVitalType;
5218      rte, unt, txt: string;
5219      UIEN: Int64;
5220  
5221    begin
5222      pnum := -1;
5223      pt := Prompt.PromptType;
5224      if(pt = ptSubComment) or (pt = ptUnknown) then exit;
5225      if(pt = ptMST) then
5226      begin
5227        if (PCECat in MSTDataTypes) then
5228        begin
5229          UIEN := FParent.FReminder.PCEDataObj.Providers.PCEProvider;
5230          if UIEN <= 0 then
5231            UIEN := User.DUZ;
5232          SetPiece(x, U, pnumMST, Prompt.GetValue + ';' + // MST Code
5233                                    FloatToStr(RemForm.PCEObj.VisitDateTime) + ';' +
5234                                    IntToStr(UIEN) + ';' + //
5235                                    Prompt.FMiscText); // IEN of Exam, if any
5236        end;
5237      end
5238      else
5239      if(PCECat = pdcVital) then
5240      begin
5241        if(pt = ptVitalEntry) then
5242        begin
5243          rte := Prompt.VitalValue;
5244          if(rte <> '') then
5245          begin
5246            v := Prompt.VitalType;
5247            unt := Prompt.VitalUnitValue;
5248            ConvertVital(v, rte, unt);
5249            //txt := U + VitalCodes[v] + U + rte + U + FloatToStr(RemForm.PCEObj.VisitDateTime);  AGP Change 26.1 commented out
5250            txt := U + VitalCodes[v] + U + rte + U + '0'; //AGP Change 26.1 Use for Vital date/time
5251            if(not Finishing) then
5252              txt := Char(ord('A')+ord(v)) + FormatVitalForNote(txt);  // Add vital sort char
5253            List.AddObject(Char(ord('A')+ord(PCECat)) + txt, Self);
5254          end;
5255        end
5256        else
5257          exit;
5258      end
5259      else
5260      if(PCECat = pdcMH) then
5261      begin
5262        if(pt = ptMHTest) or (pt = ptGAF) then
5263          x := x + U + Prompt.GetValue
5264        else
5265          exit;
5266      end
5267      else
5268      if(pt <> ptDataList) and (ord(pt) >= ord(low(TRemPromptType))) then
5269      begin
5270        Pdt := RemPromptTypes[pt];
5271        if (Pdt = dt) or (Pdt = dtAll) or
5272           ((Pdt = dtHistorical) and assigned(Prompt.FParent) and
5273             Prompt.FParent.Historical) then
5274          pnum := FinishPromptPieceNum[pt];
5275        if(pnum > 0) then
5276        begin
5277          if(pt = ptPrimaryDiag) then
5278            SetPiece(x, U, pnum, BoolChar[Primary])
5279          else
5280            SetPiece(x, U, pnum, Prompt.GetValue);
5281        end;
5282      end;
5283    end;
5284  
5285    procedure Add(Str: string; Root: TRemPCERoot);
5286    var
5287      i, Qty: integer;
5288      Value, IsGAF, txt, x, Code, Nar, Cat: string;
5289      Skip: boolean;
5290      Prompt: TRemPrompt;
5291      dt: TRemDataType;
5292      TestDate: TFMDateTime;
5293      i1,i2: integer;
5294  
5295    begin
5296      x := '';
5297      dt := Code2DataType(Piece(Str, U, r3Type));
5298      PCECat := RemData2PCECat[dt];
5299      Code := Piece(Str, U, r3Code);
5300      if(Code = '') then
5301        Code := Piece(Str, U, r3Code2);
5302      Nar := Piece(Str, U, r3Nar);
5303      Cat := Piece(Str, U, r3Cat);
5304  
5305      Primary := FALSE;
5306      if(assigned(FParent) and assigned(FParent.FPrompts) and (PCECat = pdcDiag)) then
5307      begin
5308        if(FParent.Historical) then
5309        begin
5310          for i := 0 to FParent.FPrompts.Count-1 do
5311          begin
5312            Prompt := TRemPrompt(FParent.FPrompts[i]);
5313            if(Prompt.PromptType = ptPrimaryDiag) then
5314            begin
5315              Primary := (Prompt.GetValue = BOOLCHAR[TRUE]);
5316              break;
5317            end;
5318          end;
5319        end
5320        else
5321          Primary := (Root = PrimaryDiagRoot);
5322      end;
5323  
5324      Skip := FALSE;
5325      if (PCECat = pdcMH) then
5326      begin
5327        IsGAF := Piece(FRec3, U, r3GAF);
5328        Value := FChoicePrompt.GetValue;
5329        if(Value = '') or ((IsGAF = '1') and (Value = '0')) then
5330          Skip := TRUE;
5331      end;
5332  
5333      if Finishing or (PCECat = pdcVital) then
5334      begin
5335        if(dt = dtOrder) then
5336          x := U + Piece(Str,U,6) + U + Piece(Str,U,11) + U + Nar
5337        else
5338        begin
5339          if (PCECat = pdcMH) then
5340          begin
5341            if(Skip) then
5342              x := ''
5343            else
5344            begin
5345              TestDate := Trunc(FParent.FReminder.PCEDataObj.VisitDateTime);
5346              if(IsGAF = '1') then
5347                ValidateGAFDate(TestDate);
5348              x := U + Nar + U + IsGAF + U + FloatToStr(TestDate) + U +
5349                   IntToSTr(FParent.FReminder.PCEDataObj.Providers.PCEProvider);
5350            end;
5351          end
5352          else
5353          if (PCECat <> pdcVital) then
5354          begin
5355            x := Piece(Str, U, 6);
5356            SetPiece(x, U, pnumCode, Code);
5357            SetPiece(x, U, pnumCategory, Cat);
5358            SetPiece(x, U, pnumNarrative, Nar);
5359          end;
5360          if(assigned(FParent)) then
5361          begin
5362            if(assigned(FParent.FPrompts)) then
5363            begin
5364              for i := 0 to FParent.FPrompts.Count-1 do
5365              begin
5366                Prompt := TRemPrompt(FParent.FPrompts[i]);
5367                if(not Prompt.FIsShared) then
5368                  AddPrompt(Prompt, dt, x);
5369              end;
5370            end;
5371            if(assigned(FParent.FParent) and FParent.FParent.FHasSharedPrompts) then
5372            begin
5373              for i := 0 to FParent.FParent.FPrompts.Count-1 do
5374              begin
5375                Prompt := TRemPrompt(FParent.FParent.FPrompts[i]);
5376                if(Prompt.FIsShared) and (Prompt.FSharedChildren.IndexOf(FParent) >= 0) then
5377                  AddPrompt(Prompt, dt, x);
5378              end;
5379            end;
5380          end;
5381        end;
5382        if(x <> '') then
5383          List.AddObject(Char(ord('A')+ord(PCECat)) + x, Self);
5384      end
5385      else
5386      begin
5387        Qty := 1;
5388        if(assigned(FParent) and assigned(FParent.FPrompts)) then
5389        begin
5390          if(PCECat = pdcProc) then
5391          begin
5392            for i := 0 to FParent.FPrompts.Count-1 do
5393            begin
5394              Prompt := TRemPrompt(FParent.FPrompts[i]);
5395              if(Prompt.PromptType = ptQuantity) then
5396              begin
5397                Qty := StrToIntDef(Prompt.GetValue, 1);
5398                if(Qty < 1) then Qty := 1;
5399                break;
5400              end;
5401            end;
5402          end;
5403        end;
5404        if (not Skip) then
5405        begin
5406          txt := Char(ord('A')+ord(PCECat)) +
5407                         GetPCEDataText(PCECat, Code, Cat, Nar, Primary, Qty);
5408          if(assigned(FParent) and FParent.Historical) then
5409            txt := txt + ' (Historical)';
5410          List.AddObject(txt, Self);
5411          inc(Result);
5412        end;
5413        if assigned(FParent) and assigned(FParent.FMSTPrompt) then
5414        begin
5415          txt := FParent.FMSTPrompt.Value;
5416          if txt <> '' then
5417          begin
5418            if FParent.FMSTPrompt.FMiscText = '' then
5419            begin
5420              i1 := 0;
5421              i2 := 2;
5422            end
5423            else
5424            begin
5425              i1 := 3;
5426              i2 := 4;
5427            end;
5428            for i := i1 to i2 do
5429              if txt = MSTDescTxt[i,1] then
5430              begin
5431                List.AddObject(Char( ord('A') + ord(pdcMST)) + MSTDescTxt[i,0], Self);
5432                break;
5433              end;
5434          end;
5435        end;
5436      end;
5437    end;
5438  
5439  begin
5440    Result := 0;
5441    if(assigned(FChoicePrompt)) and (assigned(FChoices)) then
5442    begin
5443      If not assigned(FChoicesActiveDates) then
5444        begin
5445          for i := 0 to FChoices.Count - 1 do
5446          begin
5447            if (copy(FChoicePrompt.GetValue, i+1, 1) = '1') then
5448              Add(FChoices[i], TRemPCERoot(FChoices.Objects[i]))
5449          end
5450        end
5451      else  {if there are active dates for each choice then check them}
5452        begin
5453          If Self.FParent.Historical then
5454            EncDt := DateTimeToFMDateTime(Date)
5455          else
5456            EncDt := RemForm.PCEObj.VisitDateTime;
5457          k := 0;
5458          for i := 0 to FChoices.Count - 1 do
5459          begin
5460            for j := 0 to (TStringList(Self.FChoicesActiveDates[i]).Count - 1) do
5461            begin
5462              ActDt := StrToIntDef((Piece(TStringList(Self.FChoicesActiveDates[i]).Strings[j], ':', 1)),0);
5463              InActDt := StrToIntDef((Piece(TStringList(Self.FChoicesActiveDates[i]).Strings[j], ':', 2)),9999999);
5464              if (EncDt >= ActDt) and (EncDt <= InActDt) then
5465              begin
5466                if(copy(FChoicePrompt.GetValue, k+1,1) = '1') then
5467                  Add(FChoices[i], TRemPCERoot(FChoices.Objects[i]));
5468                inc(k);
5469              end; {Active date check}
5470            end; {FChoicesActiveDates.Items[i] loop}
5471          end; {FChoices loop}
5472        end {FChoicesActiveDates check}
5473    end {FChoicePrompt and FChoices check}
5474    else
5475      Add(FRec3, FPCERoot); {Active dates for this are checked in TRemDlgElement.AddData}
5476  end;