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
source
- Type
- object
- Description
- Source of where this allergy was originally recorded.
- Name
name
- Type
- string
- Description
Name of the allergy.
- Name
code_type
- Type
- Description
Type of allergy.
allergyClass
genericDrug
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
adverseReaction
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
- number
- Description
Onset date 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
- number
- Description
Timestamp (in ISO 8601 format) of when the allergy was created.
- Name
last_updated_at
- Type
- number
- 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": "genericDrug",
"code": "d00015",
"severity": "mild",
"reaction_type": "allergy",
"reaction": "Rash",
"active": true,
"onset_date": 1653798303000,
"comment": "Allergy has become worse recently.",
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
}
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.
allergyClass
genericDrug
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
adverseReaction
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
- number
- Description
Onset date of the allergy.
- Name
created_by
- Type
- string
- Description
Creator 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": "genericDrug",
"code": "d00015",
"severity": "mild",
"reaction_type": "allergy",
"reaction": "Rash",
"active": true,
"onset_date": 1653798303000,
"comment": "Allergy has become worse recently.",
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
}
Retrieve an allergy
Retrieves the specified allergy.
Response
{
"id": "algy_2UxtAULYUrX7GVsTKePy",
"object": "allergy",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"name": "Ibuprofen",
"code_type": "genericDrug",
"code": "d00015",
"severity": "mild",
"reaction_type": "allergy",
"reaction": "Rash",
"active": true,
"onset_date": 1653798303000,
"comment": "Allergy has become worse recently.",
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
}
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
- Name
updated_by
- Type
- string
- Description
Updates to the allergy made by.
Optional attributes
- Name
severity
- Type
- Description
Severity of allergy.
mild
moderate
severe
Possible values:- Name
reaction_type
- Type
- Description
Reaction type of allergy.
allergy
adverseReaction
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
- number
- Description
Onset date 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": "genericDrug",
"code": "d00015",
"severity": "moderate",
"reaction_type": "allergy",
"reaction": "Rash",
"active": true,
"onset_date": 1653798303000,
"comment": "Allergy has become worse recently.",
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
}
List all allergies
Returns a list of all allergies.
Response
{
"object": "list",
"data": [
{
"id": "algy_2UxtAULYUrX7GVsTKePy",
"object": "allergy",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"name": "Ibuprofen",
"code_type": "genericDrug",
"code": "d00015",
"severity": "mild",
"reaction_type": "allergy",
"reaction": "Rash",
"active": true,
"onset_date": 1653798303000,
"comment": "Allergy has become worse recently.",
"created_by": "user_xeDpGyt67wTor93qKtS7",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
},
]
}
Delete an allergy
Deletes the specified allergy.
Required attributes
Optional attributes
Response
{
"id": "algy_2UxtAULYUrX7GVsTKePy",
"object": "allergy",
"delete": true
}