Procedure

TfrmProcedures.lbxSectionClickCheck

Module

fProcedure

Last Modified

7/15/2014 3:26:36 PM

Visibility

Public/Published

Owner

TfrmProcedures

Declaration

procedure lbxSectionClickCheck(Sender: TObject; Index: Integer);

Calls Hierarchy


TfrmProcedures.lbxSectionClickCheck
 ├TfrmPCEBaseMain.Sync2Grid
 │ └TfrmPCEBaseMain.GetCat
 ├UpdateModifierList
 │ └ModifierList
 │   ├TPCEData.VisitDateTime
 │   │ └TPCEData.IsSecondaryVisit
 │   └MixedCaseModifier
 ├TfrmPCEBaseMain.GetCat
 ├TPCEProviderList.PCEProvider
 │ ├Check
 │ │ └TPCEProviderList.IndexOfProvider
 │ └TPCEProviderList.PrimaryIEN
 │   └TPCEProviderList.GetPrimaryIdx
 └TfrmPCEBaseMain.GridChanged
   ├TfrmPCEBaseMain.BeginUpdate
   ├TfrmPCEBaseGrid.SaveGridSelected
   ├TPCEItem.ItemStr
   ├TfrmPCEBaseGrid.RestoreGridSelected
   ├TfrmPCEBaseGrid.SyncGridData
   │ ├TfrmPCEBaseGrid.SaveGridSelected
   │ ├TfrmPCEBaseGrid.RestoreGridSelected
   │ └TfrmPCEBaseGrid.SyncGridHeader
   ├TfrmPCEBaseMain.EndUpdate
   └TfrmPCEBaseMain.UpdateControls
     ├TfrmPCEBaseMain.NotUpdating
     ├TfrmPCEBaseMain.BeginUpdate
     ├TfrmPCEBaseGrid.GetGridIndex
     └TfrmPCEBaseMain.EndUpdate

Calls

Name Declaration Comments
TfrmPCEBaseMain.GetCat function GetCat: string; -
TfrmPCEBaseMain.GridChanged procedure GridChanged; virtual; -
TPCEProviderList.PCEProvider function PCEProvider: Int64; -
TfrmPCEBaseMain.Sync2Grid procedure Sync2Grid; -
UpdateModifierList function UpdateModifierList(Dest: TStrings; Index: integer): string; -


Source

449   procedure TfrmProcedures.lbxSectionClickCheck(Sender: TObject;
450     Index: Integer);
451   var
452     i: integer;
453   begin
454     if FCheckingCode then exit;
455     FCheckingCode := TRUE;
456     try
457       inherited;
458       Sync2Grid;
459       lbxSection.Selected[Index] := True;
460       if(lbxSection.ItemIndex >= 0) and (lbxSection.ItemIndex = Index) and
461         (lbxSection.Checked[Index]) then
462       begin
463         UpdateModifierList(lbxSection.Items, Index); // CQ#16439
464         lbxSection.Checked[Index] := TRUE;    
465         for i := 0 to lbGrid.Items.Count-1 do
466         begin
467           if(lbGrid.Selected[i]) then
468           with TPCEProc(lbGrid.Items.Objects[i]) do
469           begin
470             if(Category = GetCat) and
471               (Pieces(lbxSection.Items[Index], U, 1, 2) = Code + U + Narrative) then
472             begin
473               { TODO -oRich V. -cEncounters : v21/22 - Added this block to default provider for procedures.}
474               if Provider = 0 then Provider := uProviders.PCEProvider;
475               { uPCE.TPCEProviderList.PCEProvider function sorts this out automatically:                            }
476               {   1.  Current CPRS encounter provider, if present and has active person class as of encounter date. }
477               {   2.  Current user, if has active person class as of encounter date.                                }
478               {   3.  Primary provider for the visit, if defined.                                                   }
479               {   4.  No default.                                                                                   }
480               Modifiers := Piece(lbxSection.Items[lbxSection.ItemIndex], U, 4);
481               GridChanged;
482               lbxSection.Selected[Index] := True; // CQ#15493
483               exit;
484             end;
485           end;
486         end;
487       end;
488     finally
489       FCheckingCode := FALSE;
490     end;
491   end;