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.

    Possible values:
    allergyClass
    genericDrug
  • Name
    code
    Type
    string
    Description

    Code of allergy.

  • Name
    severity
    Type
    Description

    Severity of allergy.

    Possible values:
    mild
    moderate
    severe
  • Name
    reaction_type
    Type
    Description

    Reaction type of allergy.

    Possible values:
    allergy
    adverseReaction
  • 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 Unix epoch time in milliseconds) of when the allergy was created.

  • Name
    last_updated_at
    Type
    number
    Description

    Timestamp (in Unix epoch time in milliseconds) 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
}


POST/v1/allergies

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.

    Possible values:
    allergyClass
    genericDrug
  • Name
    code
    Type
    string
    Description

    Code of allergy.

  • Name
    severity
    Type
    Description

    Severity of allergy.

    Possible values:
    mild
    moderate
    severe
  • Name
    reaction_type
    Type
    Description

    Reaction type of allergy.

    Possible values:
    allergy
    adverseReaction
  • 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
}


GET/v1/allergies/:id

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
}


POST/v1/allergies/:id

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.

    Possible values:
    mild
    moderate
    severe
  • Name
    reaction_type
    Type
    Description

    Reaction type of allergy.

    Possible values:
    allergy
    adverseReaction
  • 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
}

GET/v1/allergies

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/v1/allergies/:id

Delete an allergy

Deletes the specifed allergy.

Required attributes

    Optional attributes

      Response

      {
          "id": "algy_2UxtAULYUrX7GVsTKePy",
          "object": "allergy",
          "delete": true
      }