Procedure

TfrmPCEBaseMain.CheckOffEntries

Module

fPCEBaseMain

Last Modified

8/5/2014 10:18:06 AM

Comments

TODO -oRich V. -cCode Set Versioning : Uncomment these lines to prevent acceptance of existing inactive DX codes.

Visibility

Protected

Owner

TfrmPCEBaseMain

Declaration

procedure CheckOffEntries;

Calls Hierarchy


TfrmPCEBaseMain.CheckOffEntries
 └TfrmPCEBaseMain.GetCat

Called-By Hierarchy


                                               TfrmPCEBaseMain.CheckOffEntries
                                              TfrmPCEBaseMain.lbSectionClick┘ 
                                                   TfrmPCEBaseMain.InitTab┘   
                                         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...┘         

Calls

Name Declaration Comments
TfrmPCEBaseMain.GetCat function GetCat: string; -

Called-By

Name Declaration Comments
TfrmPCEBaseMain.lbSectionClick procedure lbSectionClick(Sender: TObject); -


Source

351   procedure TfrmPCEBaseMain.CheckOffEntries;
352   { TODO -oRich V. -cCode Set Versioning : Uncomment these lines to prevent acceptance of existing inactive DX codes. }
353   const
354     TX_INACTIVE_CODE1 = 'The diagnosis of "';
355     TX_INACTIVE_ICD_CODE = '" entered for this encounter contains an inactive ICD code of "';
356     TX_INACTIVE_SCT_CODE = '" entered for this encounter contains an inactive SNOMED CT code';
357     TX_INACTIVE_CODE3 = ' as of the encounter date, and will be removed.' + #13#10#13#10 +
358                             'Please select another diagnosis.';
359     TC_INACTIVE_CODE = 'Diagnosis Contains Inactive Code';
360   var
361     i, j: Integer;
362     CurCategory, SCode, SNarr: string;
363     APCEItem: TPCEItem;
364   begin
365     FUpdatingGrid := TRUE;
366     try
367       if(lbSection.Items.Count < 1) then exit;
368       CurCategory := GetCat;
369       for i := lbGrid.Items.Count - 1 downto 0 do
370       begin
371         APCEItem := TPCEItem(lbGrid.Items.Objects[i]);
372         if APCEItem.Category = CurCategory then
373         begin
374   //        CodeNarr := APCEItem.Code + U + APCEItem.Narrative;
375           for j := 0 to lbxSection.Items.Count - 1 do
376           begin
377             SCode := Piece(lbxSection.Items[j], U, 1);
378             SNarr := Piece(lbxSection.Items[j], U, 2);
379             if (Pos(APCEItem.Code, SCode) > 0) and (Pos(SNarr, APCEItem.Narrative) > 0) then
380   //          if (Pos(APCEItem.Code, SCode) > 0) then
381             begin
382               if (CurCategory = 'Problem List Items') and ((Pos('#', Piece(lbxSection.Items[j], U, 4)) > 0) or
383                  (Pos('$', Piece(lbxSection.Items[j], U, 4)) > 0)) then
384               begin
385                 if (Pos('#', Piece(lbxSection.Items[j], U, 4)) > 0) then
386                   InfoBox(TX_INACTIVE_CODE1 + APCEItem.Narrative + TX_INACTIVE_ICD_CODE +
387                        APCEItem.Code + TX_INACTIVE_CODE3, TC_INACTIVE_CODE, MB_ICONWARNING or MB_OK)
388                 else if (Pos('$', Piece(lbxSection.Items[j], U, 4)) > 0) then
389                   InfoBox(TX_INACTIVE_CODE1 + APCEItem.Narrative + TX_INACTIVE_SCT_CODE +
390                        TX_INACTIVE_CODE3, TC_INACTIVE_CODE, MB_ICONWARNING or MB_OK);
391                 lbxSection.Checked[j] := False;
392                 APCEItem.Free;
393                 lbGrid.Items.Delete(i);
394               end
395               else
396                 lbxSection.Checked[j] := True;
397             end;
398           end;
399         end;
400       end;
401     finally
402       FUpdatingGrid := FALSE;
403     end;
404   end;