Procedure

TPCEData.SetVisitType

Module

uPCE

Last Modified

7/15/2014 3:26:36 PM

Comments

CPTcode^1^Category^Narrative

Visibility

Public

Owner

TPCEData

Declaration

procedure SetVisitType(Value: TPCEProc);     // CPTcode^1^Category^Narrative

Calls Hierarchy


TPCEData.SetVisitType
 ├TPCEItem.Match
 └TPCEProc.Assign
   └TPCEItem.Assign
     └TPCEItem.SetComment

Called-By Hierarchy


                  TPCEData.SetVisitType
   TfrmEncounterFrame.UpdateEncounter┘ 
        TfrmEncounterFrame.SendData┤   
TfrmEncounterFrame.FormCloseQuery┘ │   
  TfrmEncounterFrame.FormCloseQuery┘   

Calls

Name Declaration Comments
TPCEProc.Assign procedure Assign(Src: TPCEItem); override; -
TPCEItem.Match function Match(AnItem: TPCEItem): Boolean; -

Called-By

Name Declaration Comments
TfrmEncounterFrame.UpdateEncounter procedure UpdateEncounter(PCE: TPCEData); -


Source

2595  procedure TPCEData.SetVisitType(Value: TPCEProc);
2596  var
2597    VisitDelete: TPCEProc;
2598  begin
2599    if (not fVisitType.Match(Value)) or
2600    (fVisitType.Modifiers <> Value.Modifiers) then  {causes CPT delete/re-add}
2601    begin
2602      if fVisitType.Code <> '' then                // add old visit to procedures for deletion
2603      begin
2604        VisitDelete := TPCEProc.Create;
2605        VisitDelete.Assign(fVisitType);
2606        VisitDelete.FDelete := True;
2607        VisitDelete.FSend   := True;
2608        FProcedures.Add(VisitDelete);
2609      end;
2610      fVisitType.Assign(Value);
2611      fVisitType.Quantity := 1;
2612      fVisitType.FSend := True;
2613    end;
2614  end;