Function

UpdateVisitTypeModifierList

Module

rPCE

Last Modified

10/7/2014 12:48:38 PM

Scope

Interfaced

Declaration

function UpdateVisitTypeModifierList(Dest: TStrings; Index: integer): string;

Calls Hierarchy


UpdateVisitTypeModifierList
 └ModifierList
   ├TPCEData.VisitDateTime
   │ └TPCEData.IsSecondaryVisit
   └MixedCaseModifier

Called-By Hierarchy


                                                           UpdateVisitTypeModifierList
                                                        TfrmVisitType.CheckModifiers┘ 
                                                       TfrmVisitType.ShowModifiers┘   
                                                    TfrmVisitType.lbxVisitsClick┘     
                                            TfrmVisitType.lstVTypeSectionClick┘       
                                             TfrmEncounterFrame.SectionClick┤         
                                                                  InitList┘ │         
                                         TfrmEncounterFrame.SynchPCEData┘   │         
                                                             UpdatePCE┘     │         
                                                TPCEData.OK2SignNote┤       │         
                                                         IsOK2Sign┘ │       │         
                                      TfrmDCSumm.mnuActSignClick┤   │       │         
                                         TfrmDCSumm.SaveSignItem┤   │       │         
                                         TfrmReview.cmdOKClick┘ │   │       │         
                                               ReviewChanges┘   │   │       │         
                           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┘ │     │   │       │         
                                  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.mnuActSignatureSignClick┤   │       │         
                                       TfrmConsults.SaveSignItem┤   │       │         
                                      TfrmReview.cmdOKClick...┘ │   │       │         
                                     TfrmSurgery.mnuActSignClick┤   │       │         
                                        TfrmSurgery.SaveSignItem┤   │       │         
                                      TfrmReview.cmdOKClick...┘ │   │       │         
                                       TfrmNotes.mnuActSignClick┤   │       │         
                                          TfrmNotes.SaveSignItem┘   │       │         
                                      TfrmReview.cmdOKClick...┘     │       │         
                                              TfrmDCSumm.cmdPCEClick┤       │         
                                            TfrmConsults.cmdPCEClick┤       │         
                                                      EditPCEData...┤       │         
                                             TfrmSurgery.cmdPCEClick┤       │         
                                              UpdateEncounterInfo...┘       │         
                                                    TfrmVisitType.MatchVType┘         
                                        TfrmEncounterFrame.SynchPCEData...┘           

Calls

Name Declaration Comments
ModifierList function ModifierList(CPTCode: string): string; -

Called-By

Name Declaration Comments
TfrmVisitType.CheckModifiers procedure CheckModifiers; -


Source

847   function UpdateVisitTypeModifierList(Dest: TStrings; Index: integer): string;
848   var
849     i, idx, LastIdx: integer;
850     Tmp, OKMods, Code: string;
851     OK: boolean;
852   
853   begin
854     if(Piece(Dest[Index], U, 7) = '1') then
855       Result := Piece(Dest[Index],U,6)
856     else
857     begin
858       Tmp := Piece(Dest[Index], U, 6);
859       Result := '';
860       OKMods := ModifierList(Piece(Dest[Index], U, 1))+U;
861       i := 1;
862       repeat
863         Code := Piece(Tmp,';',i);
864         if(Code <> '') then
865         begin
866           LastIdx := -1;
867           OK := FALSE;
868           repeat
869             idx := uModifiers.IndexOfPiece(Code, U, 3, LastIdx);
870             if(idx > 0) then
871             begin
872               if(pos(U + IntToStr(idx) + U, OKMods)>0) then
873               begin
874                 Result := Result + piece(uModifiers[idx],U,1) + ';';
875                 OK := TRUE;
876               end
877               else
878                 LastIdx := Idx;
879             end;
880           until(idx < 0) or OK;
881           inc(i);
882         end
883       until(Code = '');
884       Tmp := Dest[Index];
885       SetPiece(Tmp,U,6,Result);
886       SetPiece(Tmp,U,7,'1');
887       Dest[Index] := Tmp;
888       idx := StrToIntDef(piece(Tmp,U,8),-1);
889       if(idx >= 0) then
890       begin
891         Tmp := uProcedures[idx];
892         SetPiece(Tmp,U,12,Result);
893         SetPiece(Tmp,U,13,'1');
894         uProcedures[idx] := Tmp;
895       end;
896     end;
897   end;