Function

MakeConsultListItem

Module

uConsults

Last Modified

7/15/2014 3:26:36 PM

Comments

============================================================================================
1016^Jun 04,98  ^(dc)^ COLONOSCOPY GASTROENTEROLOGY Proc^Consult #: 1016^15814^^P
1033^Jun 10,98  ^(c)^ GASTROENTEROLOGY Cons^Consult #: 1033^15881^^C
=============================================================================================
function call [GetConsultsList] returns the following string '^' pieces:
===============================================================
      1 -  Consult IEN
      2 -  Consult Date
      3 -  (Status)
      4 -  Consult/Procedure Display Text
      5 -  Consult #: ###
      6 -  Order IFN
      7 -  ''  (used for HasChildren in tree)
      8 -  Parent in tree
      9 -  'Consult', 'Procedure', or 'Clinical Procedure'
     10 -  Service Name
     11 -  FMDate of piece 2
     12 -  'C' or 'P' or 'M' or 'I' or 'R'
===============================================================

Scope

Interfaced

Declaration

function  MakeConsultListItem(InputString: string):string;

Called-By Hierarchy


                                                           MakeConsultListItem
                                                             GetConsultsList┤ 
                                                 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.DisplayPage┘   │     │ │   │ 
                            TfrmConsults.mnuActDisplaySF513Click┤     │ │   │ 
                              TfrmConsults.mnuActPrintSF513Click┤     │ │   │ 
                          TfrmConsults.mnuActDisplayDetailsClick┤     │ │   │ 
                                          TfrmConsults.FormClose┤     │ │   │ 
                     TfrmConsults.mnuActIdentifyAddlSignersClick┤     │ │   │ 
                         TfrmConsults.popNoteMemoAddlSignClick┘ │     │ │   │ 
                            TfrmConsults.ProcessNotifications...┤     │ │   │ 
                               TfrmConsults.mnuActNotePrintClick┤     │ │   │ 
                            TfrmConsults.popNoteMemoPrintClick┘ │     │ │   │ 
                                       TfrmConsults.StartNewEdit┤     │ │   │ 
                              TfrmConsults.mnuActCompleteClick┤ │     │ │   │ 
                            TfrmConsults.mnuActAddIDEntryClick┤ │     │ │   │ 
                          TfrmConsults.mnuActMakeAddendumClick┤ │     │ │   │ 
                              TfrmConsults.mnuActNoteEditClick┘ │     │ │   │ 
                            TfrmConsults.mnuActCompleteClick┘   │     │ │   │ 
                                TfrmConsults.tvCsltNotesDragDrop┤     │ │   │ 
                               TfrmConsults.tvCsltNotesStartDrag┤     │ │   │ 
                        TfrmConsults.mnuActAttachtoIDParentClick┤     │ │   │ 
                                 TfrmConsults.LstConsultsToPrint┘     │ │   │ 
                      TfrmFrame.mnuFilePrintSelectedItemsClick┘       │ │   │ 
                                 TfrmConsults.mnuActSignatureSaveClick┤ │   │ 
                                 TfrmConsults.mnuActSignatureSignClick┤ │   │ 
                                          TfrmConsults.SaveSignItem...┤ │   │ 
                                       TfrmConsults.mnuActConsultClick┤ │   │ 
                                              TfrmConsults.NotifyOrder┤ │   │ 
                                                TfrmFrame.UMNewOrder┘ │ │   │ 
                                               TfrmConsults.UMNewOrder┤ │   │ 
                                        TfrmConsults.ProcessMedResults┘ │   │ 
                                   TfrmConsults.mnuActAttachMedClick┤   │   │ 
                                   TfrmConsults.mnuActRemoveMedClick┘   │   │ 
                                    TfrmConsults.mnuActEditResubmitClick┤   │ 
                                     TfrmConsults.cmdEditResubmitClick┘ │   │ 
                                      TfrmConsults.LstConsultsToPrint...┘   │ 
                                                                 FindConsult┘ 
                                     TfrmConsults.popNoteMemoViewCsltClick┤   
                                     TfrmConsults.mnuActSignatureSaveClick┤   
                                     TfrmConsults.mnuActSignatureSignClick┤   
                                              TfrmConsults.SaveSignItem...┤   
                                           TfrmConsults.mnuActConsultClick┤   
                                      TfrmConsults.ProcessNotifications...┤   
                                        TfrmNotes.popNoteMemoViewCsltClick┘   

Called-By

Name Declaration Comments
FindConsult function FindConsult(ConsultIEN: integer): string ; -
GetConsultsList procedure GetConsultsList(Dest: TStrings; Early, Late: double; Service, Status: string; SortAscending: Boolean); -


Source

210   function MakeConsultListItem(InputString: string): string;
211   var
212     x: string;
213   begin
214     x := InputString;
215     if Piece(x, U, 6) = '' then SetPiece(x, U, 6, ' ');
216     if Piece(x, U, 9) <> '' then
217       case Piece(x, U, 9)[1] of
218         'C':  SetPiece(x, U, 10, 'Consult');
219         'P':  SetPiece(x, U, 10, 'Procedure');
220         'M':  SetPiece(x, U, 10, 'Procedure');  //'Clinical Procedure');
221         'I':  SetPiece(x, U, 10, 'Consult - Interfacility');
222         'R':  SetPiece(x, U, 10, 'Procedure - Interfacility');
223       end
224     else
225       begin
226         if Piece(x, U, 5) = 'Consult' then SetPiece(x, U, 10, 'Consult')
227         else SetPiece(x, U, 10, 'Procedure');
228       end;
229     x := Piece(x, U, 1) + U + FormatFMDateTime('mmm dd,yy', MakeFMDateTime(Piece(x, U, 2))) + '  ' + U + '(' + Piece(x, U, 3) + ')' + U + Piece(x, U, 6) + Piece(x, U, 7) + U +
230          'Consult #: ' + Piece(x, U, 1) + U + Piece(x, U, 8) + U + U + U + Piece(x, U, 10) + U + Piece(x, U, 4)+ U +
231          Piece(x, U, 2) + U + Piece(x, U, 9);
232     Result := x;
233   end;