Condition

A condition is an active or inactive diagnosis that the patient has.

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
    name
    Type
    string
    Description

    ICD codes of the condition.

  • Name
    active
    Type
    boolean
    Description

    Whether the condition is active or not.

  • Name
    onset_date
    Type
    date
    Description

    Onset date (in ISO 8601 format) of the condition.

  • Name
    end_date
    Type
    date
    Description

    Only applies if the 'active' is false. End date (in ISO 8601 format) 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
    date-time
    Description

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

  • Name
    last_updated_at
    Type
    date-time
    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": "2022-04-28",
    "comment": "Condition has become worse recently.",

    "created_by": "user_xeDpGyt67wTor93qKtS7",
    "created_at": "2022-05-28T00:00:00Z",,
    "last_updated_at": "2022-05-28T00:00:00Z",
}


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
    date
    Description

    Onset date (in ISO 8601 format) of the condition.

  • Name
    end_date
    Type
    date
    Description

    Only applies if the 'active' is false. End date (in ISO 8601 format) 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": "2022-04-28",
    "comment": "Condition has become worse recently.",

    "created_by": "user_xeDpGyt67wTor93qKtS7",
    "created_at": "2022-05-28T00:00:00Z",,
    "last_updated_at": "2022-05-28T00:00:00Z",
}


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": "2022-04-28",
   "comment": "Condition has become worse recently.",

   "created_by": "user_xeDpGyt67wTor93qKtS7",
   "created_at": "2022-05-28T00:00:00Z",,
   "last_updated_at": "2022-05-28T00:00:00Z",
}


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
      date
      Description

      Onset date (in ISO 8601 format) of the condition.

    • Name
      end_date
      Type
      date
      Description

      Only applies if the 'active' is false. End date (in ISO 8601 format) of the condition.

    • Name
      comment
      Type
      string
      Description

      Any comments associated with the condition.

    Response

    {
        "id": "cdtn_2UxtAULYUrX7GVsTKePy",
        "object": "condition",
        "patient": "user_Z1zXZKvqrpwxbznuW6lJ",
    
        "name": "Diabetes",
        "active": false,
        "onset_date": "2022-04-28",
        "end_date": "2022-05-28",
        "comment": "Condition has become worse recently.",
    
        "created_by": "user_xeDpGyt67wTor93qKtS7",
        "created_at": "2022-05-28T00:00:00Z",,
        "last_updated_at": "2022-05-28T00:00:00Z",
    }
    

    GET/v2/conditions

    List all conditions

    Returns a list of all conditions.

    Optional query parameters

    • Name
      patient
      Type
      string
      Description

      Patient ID to filter by.

    Request

    GET
    /v2/conditions
    curl https://{{base_subdomain}}.avonhealth.com/v2/conditions?patient=user_Z1zXZKvqrpwxbznuW6lJ \
      -H "Authorization: Bearer {{token}}" \
      -H "x-jwt: {{jwt}}"
    

    Response

    {
      "object": "list",
      "data": [
        {
            "id": "cdtn_2UxtAULYUrX7GVsTKePy",
            "object": "condition",
            "patient": "user_Z1zXZKvqrpwxbznuW6lJ",
    
            "name": "Diabetes",
            "active": false,
            "onset_date": "2022-04-28",
            "end_date": "2022-05-28",
            "comment": "Condition has become worse recently.",
    
            "created_by": "user_xeDpGyt67wTor93qKtS7",
            "created_at": "2022-05-28T00:00:00Z",,
            "last_updated_at": "2022-05-28T00:00:00Z",
        },
      ]
    }
    

    DELETE/v2/conditions/:id

    Delete a condition

    Deletes the specified condition.

    Required attributes

      Optional attributes

        Response

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