Condition

An condition occurs when a person reacts to substances in the environment that are harmless to most people.

The condition model

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the condition.

  • Name
    object
    Type
    string
    Description

    Always 'condition'.

  • Name
    patient
    Type
    string
    Description

    Patient this condition is for.

  • Name
    source
    Type
    object
    Description
    Source of where this condition was originally recorded.
  • Name
    name
    Type
    string
    Description

    Name of the condition.

  • Name
    active
    Type
    boolean
    Description

    Whether the condition is active or not.

  • Name
    onset_date
    Type
    number
    Description

    Onset date of the condition.

  • Name
    end_date
    Type
    number
    Description

    Only applies if the 'active' is false. End date of the condition.

  • Name
    comment
    Type
    string
    Description

    Any comments associated with the condition.

  • Name
    created_by
    Type
    string
    Description

    Creator of the condition.

  • Name
    created_at
    Type
    number
    Description

    Timestamp (in ISO 8601 format) of when the condition was created.

  • Name
    last_updated_at
    Type
    number
    Description

    Timestamp (in ISO 8601 format) of when the condition was last updated.

Response

{
    "id": "cdtn_2UxtAULYUrX7GVsTKePy",
    "object": "condition",
    "patient": "user_Z1zXZKvqrpwxbznuW6lJ",

    "name": "Diabetes",
    "active": true,
    "onset_date": 1653798303000,
    "comment": "Condition has become worse recently.",

    "created_by": "user_xeDpGyt67wTor93qKtS7",
    "created_at": 1653798303000,
    "last_updated_at": 1653798303000
}


POST/v2/conditions

Create a condition

Creates a new condition.

Required attributes

  • Name
    patient
    Type
    string
    Description

    Patient this condition is for.

  • Name
    name
    Type
    string
    Description

    Name of the condition.

  • Name
    active
    Type
    boolean
    Description

    Whether the condition is active or not.

  • Name
    onset_date
    Type
    number
    Description

    Onset date of the condition.

  • Name
    end_date
    Type
    number
    Description

    Only applies if the 'active' is false. End date of the condition.

Optional attributes

  • Name
    comment
    Type
    string
    Description

    Any comments associated with the condition.

Response

{
    "id": "cdtn_2UxtAULYUrX7GVsTKePy",
    "object": "condition",
    "patient": "user_Z1zXZKvqrpwxbznuW6lJ",

    "name": "Diabetes",
    "active": true,
    "onset_date": 1653798303000,
    "comment": "A1C levels have been spiking lately.",

    "created_by": "user_xeDpGyt67wTor93qKtS7",
    "created_at": 1653798303000,
    "last_updated_at": 1653798303000
}


GET/v2/conditions/:id

Retrieve a condition

Retrieves the specified condition.

Response

{
   "id": "cdtn_2UxtAULYUrX7GVsTKePy",
   "object": "condition",
   "patient": "user_Z1zXZKvqrpwxbznuW6lJ",

   "name": "Diabetes",
   "active": true,
   "onset_date": 1653798303000,
   "comment": "A1C levels have been spiking lately.",

   "created_by": "user_xeDpGyt67wTor93qKtS7",
   "created_at": 1653798303000,
   "last_updated_at": 1653798303000
}


POST/v2/conditions/:id

Update a condition

Updates the specified condition object by setting the values of the parameters passed. Any other parameters not provided will not be modified.

Required attributes

    Optional attributes

    • Name
      name
      Type
      string
      Description

      Name of condition.

    • Name
      active
      Type
      boolean
      Description

      Whether the condition is active or not.

    • Name
      onset_date
      Type
      number
      Description

      Onset date of the condition.

    • Name
      end_date
      Type
      number
      Description

      Only applies if 'active' is false. End date of the condition.

    • Name
      comment
      Type
      string
      Description

      Any comments associated with the condition.

    Response

    {
        "id": "cdtn_2UxtAULYUrX7GVsTKePy",
        "object": "condition",
        "patient": "user_Z1zXZKvqrpwxbznuW6lJ",
    
        "name": "Diabates",
        "active": false,
        "onset_date": 1653798303000,
        "end_date": 1703798303000
        "comment": "Condition is now under control!",
    
        "created_by": "user_xeDpGyt67wTor93qKtS7",
        "created_at": 1653798303000,
        "last_updated_at": 1653798303000
    }
    

    GET/v2/conditions

    List all conditions

    Returns a list of all conditions.

    Response

    {
      "object": "list",
      "data": [
        {
            "id": "cdtn_2UxtAULYUrX7GVsTKePy",
            "object": "condition",
            "patient": "user_Z1zXZKvqrpwxbznuW6lJ",
    
            "name": "Diabates",
            "active": false,
            "onset_date": 1653798303000,
            "end_date": 1703798303000
            "comment": "Condition is now under control!",
    
            "created_by": "user_xeDpGyt67wTor93qKtS7",
            "created_at": 1653798303000,
            "last_updated_at": 1653798303000
        },
      ]
    }
    

    DELETE/v2/conditions/:id

    Delete a condition

    Deletes the specified condition.

    Required attributes

      Optional attributes

        Response

        {
            "id": "cdtn_2UxtAULYUrX7GVsTKePy",
            "object": "condition",
            "delete": true
        }