Class

TPCEData

Module

uPCE

Last Modified

7/15/2014 3:26:36 PM

Comments

Modified: 6/9/99
By: Robert Bott
Location: ISL
Purpose: Changed to allow capture of multiple providers.

Scope

Interfaced

Inherits from

TObject

Declaration


TPCEData = class
{class for data to be passed to and from broker}
private
  FUpdated:      boolean;
  FEncDateTime:  TFMDateTime;                    //encounter date & time
  FNoteDateTime: TFMDateTime;                    //Note date & time
  FEncLocation:  Integer;                        //encounter location
  FEncSvcCat:    Char;                           //
  FEncInpatient: Boolean;                        //Inpatient flag
  FEncUseCurr:   Boolean;                        //
  FSCChanged:    Boolean;                        //
  FSCRelated:    Integer;                        //service con. related?
  FAORelated:    Integer;                        //
  FIRRelated:    Integer;                        //
  FECRelated:    Integer;                        //
  FMSTRelated:   Integer;                        //
  FHNCRelated:   Integer;                        //
  FCVRelated:    Integer;                        //
  FSHADRelated:   Integer;                        //
  fVisitType:    TPCEProc;                       //
  FProviders:    TPCEProviderList;
  fDiagnoses:    TList;                          //pointer list for diagnosis
  FProcedures:   TList;                          //pointer list for Procedures
  FImmunizations: TList;                         //pointer list for Immunizations
  FSkinTests:     TList;                         //pointer list for skin tests
  FPatientEds:    TList;
  FHealthFactors: TList;
  fExams:         TList;
  FNoteTitle:    Integer;
  FNoteIEN:      Integer;
  FParent:       string;                         // Parent Visit for secondary encounters
  FHistoricalLocation: string;                   // Institution IEN^Name (if IEN=0 Piece 4 = outside location)
  FStandAlone: boolean;
  FStandAloneLoaded: boolean;
  FProblemAdded: Boolean;                         // Flag set when one or more Dx are added to PL

  function GetVisitString: string;
  function GetCPTRequired: Boolean;
  function getDocCount: Integer;
  function MatchItem(AList: TList; AnItem: TPCEItem): Integer;
  procedure MarkDeletions(PreList: TList; PostList: TStrings);
  procedure SetSCRelated(Value: Integer);
  procedure SetAORelated(Value: Integer);
  procedure SetIRRelated(Value: Integer);
  procedure SetECRelated(Value: Integer);
  procedure SetMSTRelated(Value: Integer);
  procedure SetHNCRelated(Value: Integer);
  procedure SetCVRelated(Value: Integer);
  procedure SetSHADRelated(Value: Integer);
  procedure SetEncUseCurr(Value: Boolean);
  function GetHasData: Boolean;
  procedure GetHasCPTList(AList: TStrings);
  procedure CopyPCEItems(Src: TList; Dest: TObject; ItemClass: TPCEItemClass);
public
  constructor Create;
  destructor Destroy; override;
  procedure Clear;
  procedure CopyPCEData(Dest: TPCEData);
  function Empty: boolean;
  procedure PCEForNote(NoteIEN: Integer; EditObj: TPCEData);(* overload;
  procedure PCEForNote(NoteIEN: Integer; EditObj: TPCEData; DCSummAdmitString: string); overload;*)
  procedure Save;
  procedure CopyDiagnoses(Dest: TStrings);     // ICDcode^P|S^Category^Narrative^P|S Text
  procedure CopyProcedures(Dest: TStrings);    // CPTcode^Qty^Category^Narrative^Qty Text
  procedure CopyImmunizations(Dest: TStrings); //
  procedure CopySkinTests(Dest: TStrings);     //
  procedure CopyPatientEds(Dest: TStrings);
  procedure CopyHealthFactors(Dest: TStrings);
  procedure CopyExams(Dest: TStrings);

  procedure SetDiagnoses(Src: TStrings; FromForm: boolean = TRUE);       // ICDcode^P|S^Category^Narrative^P|S Text
  procedure SetExams(Src: TStrings; FromForm: boolean = TRUE);
  Procedure SetHealthFactors(Src: TStrings; FromForm: boolean = TRUE);
  procedure SetImmunizations(Src: TStrings; FromForm: boolean = TRUE);   // IMMcode^
  Procedure SetPatientEds(Src: TStrings; FromForm: boolean = TRUE);
  procedure SetSkinTests(Src: TStrings; FromForm: boolean = TRUE);        //
  procedure SetProcedures(Src: TStrings; FromForm: boolean = TRUE);      // CPTcode^Qty^Category^Narrative^Qty Text

  procedure SetVisitType(Value: TPCEProc);     // CPTcode^1^Category^Narrative
  function StrDiagnoses: string;               // Diagnoses: ...
  function StrImmunizations: string;           // Immunizzations: ...
  function StrProcedures: string;              // Procedures: ...
  function StrSkinTests: string;
  function StrPatientEds: string;
  function StrHealthFactors: string;
  function StrExams: string;
  function StrVisitType(const ASCRelated, AAORelated, AIRRelated, AECRelated,
                              AMSTRelated, AHNCRelated, ACVRelated, ASHADRelated: Integer): string; overload;
  function StrVisitType: string; overload;
  function StandAlone: boolean;
  procedure AddStrData(List: TStrings);
  procedure AddVitalData(Data, List: TStrings);

  function NeededPCEData: tRequiredPCEDataTypes;
  function OK2SignNote: boolean;

  function PersonClassDate: TFMDateTime;
  function VisitDateTime: TFMDateTime;
  function IsSecondaryVisit: boolean;
  function NeedProviderInfo: boolean;

  property HasData:      Boolean  read GetHasData;
  property CPTRequired:  Boolean  read GetCPTRequired;
  property ProblemAdded: Boolean  read FProblemAdded;
  property Inpatient:    Boolean  read FEncInpatient;
  property UseEncounter: Boolean  read FEncUseCurr  write SetEncUseCurr;
  property SCRelated:    Integer  read FSCRelated   write SetSCRelated;
  property AORelated:    Integer  read FAORelated   write SetAORelated;
  property IRRelated:    Integer  read FIRRelated   write SetIRRelated;
  property ECRelated:    Integer  read FECRelated   write SetECRelated;
  property MSTRelated:   Integer  read FMSTRelated  write SetMSTRelated;
  property HNCRelated:   Integer  read FHNCRelated  write SetHNCRelated;
  property CVRelated:    Integer  read FCVRelated  write SetCVRelated;
  property SHADRelated:   Integer  read FSHADRelated write SetSHADRelated;
  property VisitType:    TPCEProc read fVisitType   write SetVisitType;
  property VisitString:  string   read GetVisitString;
  property VisitCategory:char     read FEncSvcCat   write FEncSvcCat;
  property DateTime:     TFMDateTime read FEncDateTime write FEncDateTime;
  property NoteDateTime: TFMDateTime read FNoteDateTime write FNoteDateTime;
  property Location:     Integer  Read FencLocation;
  property NoteTitle:    Integer read FNoteTitle write FNoteTitle;
  property NoteIEN:      Integer read FNoteIEN write FNoteIEN;
  property DocCOunt:     Integer read getDocCount;
  property Providers:    TPCEProviderList read FProviders;
  property Parent:       string read FParent write FParent;
  property HistoricalLocation: string read FHistoricalLocation write FHistoricalLocation;
  property Updated: boolean read FUpdated write FUpdated;
end;

Class Hierarchy


TObject
 └TPCEData

Class Fields

Name Type Scope Comments
FAORelated Integer Private -
FCVRelated Integer Private -
FDiagnoses TList Private Pointer list for diagnosis
FECRelated Integer Private -
FEncDateTime TFMDateTime Private Encounter date & time
FEncInpatient Boolean Private Inpatient flag
FEncLocation Integer Private Encounter location
FEncSvcCat Char Private -
FEncUseCurr Boolean Private -
fExams TList Private -
FHealthFactors TList Private -
FHistoricalLocation UnicodeString Private Institution IEN^Name (if IEN=0 Piece 4 = outside location)
FHNCRelated Integer Private -
FImmunizations TList Private Pointer list for Immunizations
FIRRelated Integer Private -
FMSTRelated Integer Private -
FNoteDateTime TFMDateTime Private Note date & time
FNoteIEN Integer Private -
FNoteTitle Integer Private -
FParent UnicodeString Private Parent Visit for secondary encounters
FPatientEds TList Private -
FProblemAdded Boolean Private Flag set when one or more Dx are added to PL
FProcedures TList Private Pointer list for Procedures
FProviders TPCEProviderList Private -
FSCChanged Boolean Private -
FSCRelated Integer Private Service con. related?
FSHADRelated Integer Private -
FSkinTests TList Private Pointer list for skin tests
FStandAlone Boolean Private -
FStandAloneLoaded Boolean Private -
FUpdated Boolean Private -
FVisitType TPCEProc Private -

Properties

Name Type Scope Comments
AORelated Integer Public -
CPTRequired Boolean Public -
CVRelated Integer Public -
DateTime TFMDateTime Public -
DocCOunt Integer Public -
ECRelated Integer Public -
HasData Boolean Public -
HistoricalLocation UnicodeString Public -
HNCRelated Integer Public -
Inpatient Boolean Public -
IRRelated Integer Public -
Location Integer Public -
MSTRelated Integer Public -
NoteDateTime TFMDateTime Public -
NoteIEN Integer Public -
NoteTitle Integer Public -
Parent UnicodeString Public -
ProblemAdded Boolean Public -
Providers TPCEProviderList Public -
SCRelated Integer Public -
SHADRelated Integer Public -
Updated Boolean Public -
UseEncounter Boolean Public -
VisitCategory Char Public -
VisitString UnicodeString Public -
VisitType TPCEProc Public -

Constructors

Name Declaration Scope Comments
Create constructor Create; Public TPCEData methods -------------------------------------------------------------------------

Destructors

Name Declaration Scope Comments
Destroy destructor Destroy; override; Public -

Methods

Name Declaration Scope Comments
AddStrData procedure AddStrData(List: TStrings); Public -
AddVitalData procedure AddVitalData(Data, List: TStrings); Public -
Clear procedure Clear; Public -
CopyDiagnoses procedure CopyDiagnoses(Dest: TStrings); Public ICDcode^P|S^Category^Narrative^P|S Text
CopyExams procedure CopyExams(Dest: TStrings); Public -
CopyHealthFactors procedure CopyHealthFactors(Dest: TStrings); Public -
CopyImmunizations procedure CopyImmunizations(Dest: TStrings); Public -
CopyPatientEds procedure CopyPatientEds(Dest: TStrings); Public -
CopyPCEData procedure CopyPCEData(Dest: TPCEData); Public -
CopyPCEItems procedure CopyPCEItems(Src: TList; Dest: TObject; ItemClass: TPCEItemClass); Private -
CopyProcedures procedure CopyProcedures(Dest: TStrings); Public CPTcode^Qty^Category^Narrative^Qty Text
CopySkinTests procedure CopySkinTests(Dest: TStrings); Public -
Empty function Empty: boolean; Public -
GetCPTRequired function GetCPTRequired: Boolean; Private -
getDocCount function getDocCount: Integer; Private -
GetHasCPTList procedure GetHasCPTList(AList: TStrings); Private -
GetHasData function GetHasData: Boolean; Private -
GetVisitString function GetVisitString: string; Private -
IsSecondaryVisit function IsSecondaryVisit: boolean; Public -
MarkDeletions procedure MarkDeletions(PreList: TList; PostList: TStrings); Private Mark items that need deleted
MatchItem function MatchItem(AList: TList; AnItem: TPCEItem): Integer; Private Return index in AList of matching item
NeededPCEData function NeededPCEData: tRequiredPCEDataTypes; Public -
NeedProviderInfo function NeedProviderInfo: boolean; Public -
OK2SignNote function OK2SignNote: boolean; Public -
PCEForNote procedure PCEForNote(NoteIEN: Integer; EditObj: TPCEData);(* overload; Public
Overload;
    procedure PCEForNote(NoteIEN: Integer; EditObj: TPCEData; DCSummAdmitString: string); overload;
const
  NULL_STR = '';
begin
  PCEForNote(NoteIEN, EditObj, NULL_STR);
end;

procedure TPCEData.PCEForNote(NoteIEN: Integer; EditObj: TPCEData; DCSummAdmitString: string);






  AProvider:     TPCEProvider;  {6/9/99}
PersonClassDate function PersonClassDate: TFMDateTime; Public -
Save procedure Save; Public
Procedure TPCEData.Save;
modified: 6/17/98
By: Robert Bott
Location: ISL
Purpose: Add Comments to PCE Items.

 pass the changes to the encounter to DATA2PCE,
  Pieces: Subscript^Code^Qualifier^Category^Narrative^Delete 

 into two strings, the second being for the comment.
SetAORelated procedure SetAORelated(Value: Integer); Private -
SetCVRelated procedure SetCVRelated(Value: Integer); Private -
SetDiagnoses procedure SetDiagnoses(Src: TStrings; FromForm: boolean = TRUE); Public
ICDcode^P|S^Category^Narrative^P|S Text
load diagnoses for this encounter into TPCEDiag records, assumes all diagnoses for the
  encounter will be listed in Src and marks those that are not in Src for deletion
SetECRelated procedure SetECRelated(Value: Integer); Private -
SetEncUseCurr procedure SetEncUseCurr(Value: Boolean); Private -
SetExams procedure SetExams(Src: TStrings; FromForm: boolean = TRUE); Public -
SetHealthFactors Procedure SetHealthFactors(Src: TStrings; FromForm: boolean = TRUE); Public -
SetHNCRelated procedure SetHNCRelated(Value: Integer); Private -
SetImmunizations procedure SetImmunizations(Src: TStrings; FromForm: boolean = TRUE); Public
IMMcode^
load Immunizations for this encounter into TPCEImm records, assumes all Immunizations for the
  encounter will be listed in Src and marks those that are not in Src for deletion
SetIRRelated procedure SetIRRelated(Value: Integer); Private -
SetMSTRelated procedure SetMSTRelated(Value: Integer); Private -
SetPatientEds Procedure SetPatientEds(Src: TStrings; FromForm: boolean = TRUE); Public -
SetProcedures procedure SetProcedures(Src: TStrings; FromForm: boolean = TRUE); Public
CPTcode^Qty^Category^Narrative^Qty Text
load Procedures for this encounter into TPCEProc records, assumes all Procedures for the
  encounter will be listed in Src and marks those that are not in Src for deletion
SetSCRelated procedure SetSCRelated(Value: Integer); Private -
SetSHADRelated procedure SetSHADRelated(Value: Integer); Private -
SetSkinTests procedure SetSkinTests(Src: TStrings; FromForm: boolean = TRUE); Public
Load SkinTests for this encounter into TPCESkin records, assumes all SkinTests for the
  encounter will be listed in Src and marks those that are not in Src for deletion
SetVisitType procedure SetVisitType(Value: TPCEProc); Public CPTcode^1^Category^Narrative
StandAlone function StandAlone: boolean; Public -
StrDiagnoses function StrDiagnoses: string; Public
Diagnoses: ...
returns the list of diagnoses for this encounter as a single comma delimited string
StrExams function StrExams: string; Public -
StrHealthFactors function StrHealthFactors: string; Public -
StrImmunizations function StrImmunizations: string; Public
Immunizzations: ...
returns the list of Immunizations for this encounter as a single comma delimited string
StrPatientEds function StrPatientEds: string; Public -
StrProcedures function StrProcedures: string; Public
Procedures: ...
returns the list of procedures for this encounter as a single comma delimited string
StrSkinTests function StrSkinTests: string; Public Returns the list of Immunizations for this encounter as a single comma delimited string
StrVisitType function StrVisitType: string; overload; Public Returns as a string the type of encounter (according to CPT) & related contitions treated
StrVisitType function StrVisitType(const ASCRelated, AAORelated, AIRRelated, AECRelated, AMSTRelated, AHNCRelated, ACVRelated, ASHADRelated: Integer): string; overload; Public Returns as a string the type of encounter (according to CPT) & related contitions treated
VisitDateTime function VisitDateTime: TFMDateTime; Public -

Referenced By (64)

Module (line) Referrer Type
fConsults (546) uPCEEdit Read
fConsults (2072) - Read
fConsults (4869) - Read
fConsults (4870) - Read
fDCSumm (382) uPCEEdit Read
fDCSumm (1752) - Read
fDCSumm (3268) - Read
fDCSumm (3269) - Read
fEncounterFrame (103) UpdateEncounter Read
fEncounterFrame (118) uEncPCEData Read
fEncounterFrame (122) UpdatePCE Read
fEncounterFrame (376) - Read
fEncounterFrame (631) - Read
fEncounterFrame (644) - Read
fEncounterFrame (710) - Read
fNotes (410) uPCEEdit Read
fNotes (1408) - Read
fNotes (1442) - Read
fNotes (2250) - Read
fNotes (3918) - Read
fNotes (3919) - Read
fPCEEdit (24) EditPCEData Read
fPCEEdit (40) uPCETemp Read
fPCEEdit (41) uPCETempOld Read
fPCEEdit (44) - Read
fPCEEdit (112) - Read
fPCEEdit (126) - Read
fPCEProvider (24) TfrmPCEProvider Read
fPCEProvider (32) NoPrimaryPCEProvider Read
fPCEProvider (47) - Read
fReminderDialog (1085) - Read
fReminderDialog (1384) - Read
fSurgery (347) uPCEEdit Read
fSurgery (1231) - Read
fSurgery (1770) - Read
fSurgery (2698) - Read
fSurgery (2699) - Read
mVisitRelated (39) GetRelated Read
mVisitRelated (43) InitRelated Read
mVisitRelated (150) - Read
mVisitRelated (191) - Read
uPCE (261) CopyPCEData Read
uPCE (263) PCEForNote Read
uPCE (340) MissingProviderInfo Read
uPCE (341) IsOK2Sign Read
uPCE (342) FutureEncounter Read
uPCE (343) CanEditPCE Read
uPCE (349) SetDefaultProvider Read
uPCE (351) GetVitalsFromDate Read
uPCE (352) GetVitalsFromNote Read
uPCE (467) - Read
uPCE (480) - Read
uPCE (482) - Read
uPCE (496) - Read
uPCE (506) - Read
uPCE (511) - Read
uPCE (802) - Read
uPCE (880) - Read
uPCE (892) - Read
uPCE (1766) - Read
uPCE (2884) - Read
uReminders (19) TReminderDialog Read
uReminders (49) TReminderDialog Read
uReminders (290) - Read