Procedure

TPCEData.MarkDeletions

Module

uPCE

Last Modified

7/15/2014 3:26:36 PM

Comments

Mark items that need deleted

Visibility

Private

Owner

TPCEData

Declaration

procedure MarkDeletions(PreList: TList; PostList: TStrings);

Calls Hierarchy


TPCEData.MarkDeletions
 ├TPCEItem.Match
 └TPCEItem.MatchProvider

Called-By Hierarchy


                   TPCEData.MarkDeletions
                  TPCEData.SetDiagnoses┤ 
                                  Add┤ │ 
          TfrmRemDlg.btnFinishClick┘ │ │ 
   TfrmEncounterFrame.UpdateEncounter┘ │ 
        TfrmEncounterFrame.SendData┤   │ 
TfrmEncounterFrame.FormCloseQuery┘ │   │ 
  TfrmEncounterFrame.FormCloseQuery┘   │ 
                 TPCEData.SetProcedures┤ 
                               Add...┤ │ 
TfrmEncounterFrame.UpdateEncounter...┘ │ 
              TPCEData.SetImmunizations┤ 
                               Add...┤ │ 
TfrmEncounterFrame.UpdateEncounter...┘ │ 
                  TPCEData.SetSkinTests┤ 
                               Add...┤ │ 
TfrmEncounterFrame.UpdateEncounter...┘ │ 
                 TPCEData.SetPatientEds┤ 
                               Add...┤ │ 
TfrmEncounterFrame.UpdateEncounter...┘ │ 
              TPCEData.SetHealthFactors┤ 
                               Add...┤ │ 
TfrmEncounterFrame.UpdateEncounter...┘ │ 
                      TPCEData.SetExams┘ 
                               Add...┤   
TfrmEncounterFrame.UpdateEncounter...┘   

Calls

Name Declaration Comments
TPCEItem.Match function Match(AnItem: TPCEItem): Boolean; -
TPCEItem.MatchProvider function MatchProvider(AnItem: TPCEItem):Boolean; -

Called-By

Name Declaration Comments
TPCEData.SetDiagnoses procedure SetDiagnoses(Src: TStrings; FromForm: boolean = TRUE); -
TPCEData.SetExams procedure SetExams(Src: TStrings; FromForm: boolean = TRUE); -
TPCEData.SetHealthFactors Procedure SetHealthFactors(Src: TStrings; FromForm: boolean = TRUE); -
TPCEData.SetImmunizations procedure SetImmunizations(Src: TStrings; FromForm: boolean = TRUE); -
TPCEData.SetPatientEds Procedure SetPatientEds(Src: TStrings; FromForm: boolean = TRUE); -
TPCEData.SetProcedures procedure SetProcedures(Src: TStrings; FromForm: boolean = TRUE); -
TPCEData.SetSkinTests procedure SetSkinTests(Src: TStrings; FromForm: boolean = TRUE); -


Source

2279  procedure TPCEData.MarkDeletions(PreList: TList; PostList: TStrings);
2280  {mark items that need deleted}
2281  var
2282    i, j: Integer;
2283    MatchFound: Boolean;
2284    PreItem, PostItem: TPCEItem;
2285  begin
2286    with PreList do for i := 0 to Count - 1 do
2287    begin
2288      PreItem := TPCEItem(Items[i]);
2289      MatchFound := False;
2290      with PostList do for j := 0 to Count - 1 do
2291      begin
2292        PostItem := TPCEItem(Objects[j]);
2293        if (PreItem.Match(PostItem) and (PreItem.MatchProvider(PostItem))) then MatchFound := True;
2294      end;
2295      if not MatchFound then
2296      begin
2297        PreItem.FDelete := True;
2298        PreItem.FSend   := True;
2299      end;
2300    end;
2301  end;