Allergy
An allergy occurs when a person reacts to substances in the environment that are harmless to most people.
The allergy model
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the allergy.
- Name
object
- Type
- string
- Description
Always 'allergy'.
- Name
patient
- Type
- string
- Description
Patient this allergy is for.
- Name
name
- Type
- string
- Description
Name of the allergy.
- Name
code_type
- Type
- Description
Type of allergy.
allergy_class
generic_drug
Possible values:- Name
code
- Type
- string
- Description
Code of allergy.
- Name
severity
- Type
- Description
Severity of allergy.
mild
moderate
severe
Possible values:- Name
reaction_type
- Type
- Description
Reaction type of allergy.
allergy
adverse_reaction
Possible values:- Name
reaction
- Type
- string
- Description
Reaction of allergy.
- Name
active
- Type
- boolean
- Description
Whether the allergy is active or not.
- Name
onset_date
- Type
- string
- Description
Onset date (in ISO 8601 format) of the allergy.
- Name
comment
- Type
- string
- Description
Any comments associated with the allergy.
- Name
created_by
- Type
- string
- Description
Creator of the allergy.
- Name
created_at
- Type
- date-time
- Description
Timestamp (in ISO 8601 format) of when the allergy was created.
- Name
last_updated_at
- Type
- date-time
- Description
Timestamp (in ISO 8601 format) of when the allergy was last updated.
Response
{
"id": "algy_2UxtAULYUrX7GVsTKePy",
"object": "allergy",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"name": "Ibuprofen",
"code_type": "generic_drug",
"code": "d00015",
"severity": "mild",
"reaction_type": "allergy",
"reaction": "Rash",
"active": true,
"onset_date": "2024-07-07",
"comment": "Allergy has become worse recently.",
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": "2024-07-07T00:52:02.504Z",
"last_updated_at": "2024-07-07T00:52:02.504Z"
}
Create an allergy
Creates a new allergy.
Required attributes
- Name
patient
- Type
- string
- Description
Patient this allergy is for.
- Name
name
- Type
- string
- Description
Name of the allergy.
- Name
code_type
- Type
- Description
Type of allergy.
allergy_class
generic_drug
Possible values:- Name
code
- Type
- string
- Description
Code of allergy.
- Name
severity
- Type
- Description
Severity of allergy.
mild
moderate
severe
Possible values:- Name
reaction_type
- Type
- Description
Reaction type of allergy.
allergy
adverse_reaction
Possible values:- Name
reaction
- Type
- string
- Description
Reaction of allergy.
- Name
active
- Type
- boolean
- Description
Whether the allergy is active or not.
- Name
onset_date
- Type
- string
- Description
Onset date (in ISO 8601 format) of the allergy.
Optional attributes
- Name
comment
- Type
- string
- Description
Any comments associated with the allergy.
Response
{
"id": "algy_2UxtAULYUrX7GVsTKePy",
"object": "allergy",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"name": "Ibuprofen",
"code_type": "generic_drug",
"code": "d00015",
"severity": "mild",
"reaction_type": "allergy",
"reaction": "Rash",
"active": true,
"onset_date": "2024-07-07",
"comment": "Allergy has become worse recently.",
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": "2024-07-07T00:52:02.504Z",
"last_updated_at": "2024-07-07T00:52:02.504Z"
}
Retrieve an allergy
Retrieves the specified allergy.
Response
{
"id": "algy_2UxtAULYUrX7GVsTKePy",
"object": "allergy",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"name": "Ibuprofen",
"code_type": "generic_drug",
"code": "d00015",
"severity": "mild",
"reaction_type": "allergy",
"reaction": "Rash",
"active": true,
"onset_date": "2024-07-07",
"comment": "Allergy has become worse recently.",
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": "2024-07-07T00:52:02.504Z",
"last_updated_at": "2024-07-07T00:52:02.504Z"
}
Update an allergy
Updates the specified allergy object by setting the values of the parameters passed. Any other parameters not provided will not be modified.
Required attributes
Optional attributes
- Name
severity
- Type
- Description
Severity of allergy.
mild
moderate
severe
Possible values:- Name
reaction_type
- Type
- Description
Reaction type of allergy.
allergy
adverse_reaction
Possible values:- Name
reaction
- Type
- string
- Description
Reaction of allergy.
- Name
active
- Type
- boolean
- Description
Whether the allergy is active or not.
- Name
onset_date
- Type
- string
- Description
Onset date (in ISO 8601 format) of the allergy.
- Name
comment
- Type
- string
- Description
Any comments associated with the allergy.
Response
{
"id": "algy_2UxtAULYUrX7GVsTKePy",
"object": "allergy",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"name": "Ibuprofen",
"code_type": "generic_drug",
"code": "d00015",
"severity": "mild",
"reaction_type": "allergy",
"reaction": "Rash",
"active": true,
"onset_date": "2024-07-07",
"comment": "Allergy has become worse recently.",
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": "2024-07-07T00:52:02.504Z",
"last_updated_at": "2024-07-07T00:52:02.504Z"
}
List all allergies
Returns a list of all allergies.
Optional query parameters
- Name
patient
- Type
- string
- Description
Patient ID to filter by.
Request
curl https://{{base_subdomain}}.avonhealth.com/v2/allergies?patient=user_Z1zXZKvqrpwxbznuW6lJ \
-H "Authorization: Bearer {{token}}" \
-H "x-jwt: {{jwt}}"
Response
{
"object": "list",
"data": [
{
"id": "algy_2UxtAULYUrX7GVsTKePy",
"object": "allergy",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"name": "Ibuprofen",
"code_type": "generic_drug",
"code": "d00015",
"severity": "mild",
"reaction_type": "allergy",
"reaction": "Rash",
"active": true,
"onset_date": "2024-07-07",
"comment": "Allergy has become worse recently.",
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": "2024-07-07T00:52:02.504Z",
"last_updated_at": "2024-07-07T00:52:02.504Z"
},
]
}
Delete an allergy
Deletes the specified allergy.
Required attributes
Optional attributes
Response
{
"id": "algy_2UxtAULYUrX7GVsTKePy",
"object": "allergy",
"delete": true
}