Last Updated: 7/22/2025 8:42:49 PM

Intergy Version: 22.00.00.00

PersonAllergyHistory

Table Definition  Parent Tables  Child Tables

Table Definition

Description: The table records the history of changes to patient allergies.

Field Datatype Default Null Option Comment
PersonID INTEGER ?   MANDATORY FK - Person Table.
AllergyCode CHARACTER(8)   MANDATORY FK - AllergyTable.
HistoryCount INTEGER   MANDATORY This is a programmatically generated sequence that keeps tracks of the number of updates made to an allergy.
PracticeID INTEGER ?   OPTIONAL FK - Practice Table.
EncounterSID INTEGER ?   OPTIONAL FK - Encounter Table.
OnsetDateString CHAR(8)   OPTIONAL This is not a date field. It is a 'fuzzy' date field. It will be in the form of 'CCYYMMDD'. The 'DD' and the 'MM' portions are allowed to be zero.
OtherReactionDesc CHARACTER(25)   OPTIONAL User-entered reaction notes regarding allergy.
AllergyStatus CHARACTER(1)   OPTIONAL Possible values: A - Active, I - Inactive, R - Resolved, V - Void
ReviewedDate DATE   OPTIONAL Date the allergy was reviewed on.
ActionCode CHAR(1)   MANDATORY Action taken on the allergy. Supported by LookupType AllergyAction Possible values are: N - New, E - Edited, R - Reviewed, S - Resolved, V - Voided, D - Deactivated
Comment CHAR(5000)   OPTIONAL Free text that describes the Allergy and/or Action on the Allergy.
EnteredBy INTEGER ?   OPTIONAL User who is creating this history record.
EnteredOnStamp CHARACTER(14)   OPTIONAL Date-time stamp when this record was created.
TimeStamp CHARACTER(14)   OPTIONAL System generated date/time stamp record was last written.
LastUser INTEGER ?   OPTIONAL User ID of user that last wrote the record.
CreateStamp CHARACTER(14)   OPTIONAL System generated date/time stamp record was created.
CreateUser INTEGER ?   OPTIONAL User ID of user that created the record.
Type CHARACTER(1) Alpha_-_A   OPTIONAL Record type. If the record type is 'T', then the AllergyCode should be of type 'DS'. Possible Values: 'A' - Allergy 'T' - Intolerance
ResolvedClinicalDate CHARACTER(20)   OPTIONAL User entered date when the allergy was resolved for the patient. This is not a date field. It is a 'fuzzy' date field. It will be in the form of 'CCYYMMDD'. The 'DD' and the 'MM' portions are allowed to be zero.
RxNormCode CHAR(10)   OPTIONAL The RxNorm Code - Used when importing allergy data from an Exchange Document. In the case of Drug Ingredient Allergies, this field can also be changed by the user.
OnsetTime INTEGER 0   OPTIONAL User entered onset time of allergy in seconds starting from midnight
ResolvedClinicalTime INTEGER ?   OPTIONAL User entered time when the allergy was resolved for the patient in seconds from midnight
OnsetDateTimeUTC DATETIME-TZ   OPTIONAL This is a denormalized field based off the OnsetDate/OnsetDateString and OnsetTime. This field contains the Date, Time and timezone offset. If the OnsetTime is null then the OnsetTime will be set to midnight.
ResolvedDateTimeUTC DATETIME-TZ   OPTIONAL This is a denormalized field based off the ResolvedClinicalDate and ResolvedClinicalTime. This field contains the Date, Time and timezone offset. If the ResolvedClinicalTime is null then the ResolvedClinicalTime will be set to midnight.
EnteredOnStampUTC DATETIME-TZ   OPTIONAL This is a denormalized field based off EnteredOnStamp. This field contains the Date, Time and timezone offset.

Parent Tables
Parent TableJoin PhraseWhen deleting parent record...
PersonAllergy PersonAllergyHistory.PersonID = PersonAllergy.PersonID and
PersonAllergyHistory.AllergyCode = PersonAllergy.AllergyCode
CASCADE if PersonAllergyHistory exists
Encounter PersonAllergyHistory.EncounterSID = Encounter.EncounterSID SET NULL if PersonAllergyHistory exists
Practice PersonAllergyHistory.PracticeID = Practice.PracticeID SET NULL if PersonAllergyHistory exists

Child Tables
Child TableJoin PhraseWhen deleting PersonAllergyHistory record...
PersonAllergyReactionHist PersonAllergyReactionHist.PersonID = PersonAllergyHistory.PersonID and
PersonAllergyReactionHist.AllergyCode = PersonAllergyHistory.AllergyCode and
PersonAllergyReactionHist.HistoryCount = PersonAllergyHistory.HistoryCount
CASCADE if PersonAllergyReactionHist exists