Caregiver

A caregiver is a user (e.g. spouse, child, parent, friend) that is providing care to a patient.

The caregiver model

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the caregiver.

  • Name
    object
    Type
    string
    Description

    Always 'patient'.

  • Name
    first_name
    Type
    string
    Description

    Caregiver's first name.

  • Name
    middle_name
    Type
    string
    Description

    Caregiver's middle name.

  • Name
    last_name
    Type
    string
    Description

    Caregiver's last name.

  • Name
    preferred_name
    Type
    string
    Description

    Caregiver's preferred name.

  • Name
    caregiver_only
    Type
    boolean
    Description

    Whether the caregiver is only a caregiver in the system, not a patient receiving care themselves. (Asually set to true)

  • Name
    dependents
    Type
    array of strings
    Description

    Patients that the caregiver is providing care to.

  • Name
    email
    Type
    string
    Description

    Caregiver's email address.

  • Name
    phone
    Type
    string
    Description

    Caregiver's phone number.

  • Name
    timezone
    Type
    string
    Description

    Caregiver's timezone.

  • Name
    status_history
    Type
    array of objects
    Description
    Status history of the caregiver.
  • Name
    custom_data
    Type
    array of objects
    Description
    Custom field and values added to the caregiver object..
  • Name
    created_by
    Type
    string
    Description

    Creator of the caregiver.

  • Name
    created_at
    Type
    date-time
    Description

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

  • Name
    last_updated_at
    Type
    date-time
    Description

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

Response

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

    "first_name": "Lila",
    "middle_name": "",
    "last_name": "Chen",
    "preferred_name": "Lila",

    "email": "lila@demo.com",
    "phone": "(408)872-5892",

    "caregiver_only": true,
    "dependents": [
        "user_X90XZKvqrpwxbznuW6lJ"
    ],
    "timezone": "America/New_York",
    "status_history": [{
        "status": "active",
        "changed_by": "user_Z1zXZKvqrpwxbznuW6lJ",
        "changed_at": "2024-04-03T04:12:01.781Z"
    }],
    "custom_data": [{
        "id": "cdta_ZR6ioEDFTnKLFn62okn",
        "key": "cfld_FZR6ioEDTkHKn62oknLF",
        "value": "Routine Care"
    }],
    "created_by": "user_Z1zXZKvqrpwxbznuW6lJ",
    "created_at": "2024-04-10T13:20:21.724Z",
    "last_updated_at": "2024-04-10T13:20:21.724Z"
}


POST/v2/patients

Create a caregiver

Creates a new caregiver.

Required attributes

  • Name
    first_name
    Type
    string
    Description

    Caregiver's first name.

  • Name
    last_name
    Type
    string
    Description

    Caregiver's last name.

  • Name
    gender
    Type
    string
    Description

    Caregiver's gender. Can be 'Female,' 'Male,' or any custom entry.

  • Name
    email
    Type
    string
    Description

    Caregiver's email address.

  • Name
    phone
    Type
    string
    Description

    Caregiver's phone number.

  • Name
    timezone
    Type
    string
    Description

    Caregiver's timezone.

  • Name
    caregiver_only
    Type
    boolean
    Description

    If the caregiver is only a caregiver in the system, not a patient receiving care themselves.

  • Name
    dependents
    Type
    array of strings
    Description

    Patients that the caregiver is providing care to.

  • Name
    custom_data
    Type
    array of objects
    Description

    Custom field and values added to the caregiver object. Some fields may be required while others as optional.

Optional attributes

  • Name
    password
    Type
    string
    Description

    Sets the user's login password. If no value is provided, a password will be automatically generated.

  • Name
    middle_name
    Type
    string
    Description

    Caregiver's middle name.

  • Name
    preferred_name
    Type
    string
    Description

    Caregiver's preferred name.

  • Name
    status
    Type
    string
    Description

    Status of the patient. By default, this is set to 'active'.

    Possible values:
    prospective
    pending
    active
    discharged

Response

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


    "first_name": "Lila",
    "middle_name": "",
    "last_name": "Chen",
    "preferred_name": "Lila",

    "email": "lila@demo.com",
    "phone": "(408)872-5892",

    "caregiver_only": true,
    "dependents": [
        "user_X90XZKvqrpwxbznuW6lJ"
    ],
    "timezone": "America/New_York",
    "status_history": [{
        "status": "active",
        "changed_by": "user_Z1zXZKvqrpwxbznuW6lJ",
        "changed_at": "2024-04-03T04:12:01.781Z"
    }],
    "custom_data": [{
        "id": "cdta_ZR6ioEDFTnKLFn62okn",
        "key": "cfld_FZR6ioEDTkHKn62oknLF",
        "value": "Routine Care"
    }],
    "created_by": "user_Z1zXZKvqrpwxbznuW6lJ",
    "created_at": "2024-04-10T13:20:21.724Z",
    "last_updated_at": "2024-04-10T13:20:21.724Z"
}


GET/v2/patients/:id

Retrieve a caregiver

Retrieves the specified caregiver.

Response

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

   "first_name": "Lila",
   "middle_name": "",
   "last_name": "Chen",
   "preferred_name": "Lila",

   "email": "lila@demo.com",
   "phone": "(408)872-5892",

   "caregiver_only": true,
   "dependents": [
       "user_X90XZKvqrpwxbznuW6lJ"
   ],
   "timezone": "America/New_York",
   "status_history": [{
       "status": "active",
       "changed_by": "user_Z1zXZKvqrpwxbznuW6lJ",
       "changed_at": "2024-04-03T04:12:01.781Z"
   }],
   "custom_data": [{
       "id": "cdta_ZR6ioEDFTnKLFn62okn",
       "key": "cfld_FZR6ioEDTkHKn62oknLF",
       "value": "Routine Care"
   }],
   "created_by": "user_Z1zXZKvqrpwxbznuW6lJ",
   "created_at": "2024-04-10T13:20:21.724Z",
   "last_updated_at": "2024-04-10T13:20:21.724Z"
}


POST/v2/patients/:id

Update a caregiver

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

Required attributes

    Optional attributes

    • Name
      first_name
      Type
      string
      Description

      Caregiver's first name.

    • Name
      middle_name
      Type
      string
      Description

      Caregiver's middle name.

    • Name
      last_name
      Type
      string
      Description

      Caregiver's last name.

    • Name
      preferred_name
      Type
      string
      Description

      Caregiver's preferred name.

    • Name
      email
      Type
      string
      Description

      Caregiver's email address.

    • Name
      phone
      Type
      string
      Description

      Caregiver's phone number.

    • Name
      status_history
      Type
      array of objects
      Description
      Status history of the patient.
    • Name
      custom_data
      Type
      array of objects
      Description
      Custom field and values added to the caregiver object.

    Response

    {
        "id": "user_Z1zXZKvqrpwxbznuW6lJ",
        "object": "patient",
    
        "first_name": "Lila",
        "middle_name": "",
        "last_name": "Chen",
        "preferred_name": "Lila",
    
        "email": "lila@demo.com",
        "phone": "(408)872-5892",
    
        "caregiver_only": true,
        "dependents": [
            "user_X90XZKvqrpwxbznuW6lJ"
        ],
        "timezone": "America/New_York",
        "status_history": [{
            "status": "active",
            "changed_by": "user_Z1zXZKvqrpwxbznuW6lJ",
            "changed_at": "2024-04-03T04:12:01.781Z"
        }],
        "custom_data": [{
            "id": "cdta_ZR6ioEDFTnKLFn62okn",
            "key": "cfld_FZR6ioEDTkHKn62oknLF",
            "value": "Routine Care"
        }],
        "created_by": "user_Z1zXZKvqrpwxbznuW6lJ",
        "created_at": "2024-04-10T13:20:21.724Z",
        "last_updated_at": "2024-04-10T13:20:21.724Z"
    }
    

    GET/v2/patients

    List all caregivers

    Returns a list of all caregivers. Pass attributes to filter the list of caregivers based on that criteria.

    Required query parameters

    • Name
      caregiver_only
      Type
      boolean
      Description

      Pass in true to only return caregivers.

    Optional query parameters

    • Name
      limit
      Type
      number
      Description

      Number of caregivers to return.

    • Name
      offset
      Type
      number
      Description

      Number of caregivers to skip.

    • Name
      mrn
      Type
      string
      Description

      MRN to filter by.

    • Name
      email
      Type
      string
      Description

      Email address to filter by.

    • Name
      status
      Type
      string
      Description

      Status to filter by.

    Request

    GET
    /v2/patients
    curl https://{{base_subdomain}}.avonhealth.com/v2/patients?mrn=8942726&email=lila%40demo.com&medical_centers=mctr_XbvBirnEb1Mli1OLwqnM&status=active \
      -H "Authorization: Bearer {{token}}" \
      -H "x-jwt: {{jwt}}"
    

    Response

    {
      "object": "list",
      "data": [{
        "id": "user_Z1zXZKvqrpwxbznuW6lJ",
        "object": "patient",
    
        "first_name": "Lila",
        "middle_name": "",
        "last_name": "Chen",
        "preferred_name": "Lila",
    
        "email": "lila@demo.com",
        "phone": "(408)872-5892",
    
        "caregiver_only": true,
        "dependents": [
            "user_X90XZKvqrpwxbznuW6lJ"
        ],
        "timezone": "America/New_York",
        "status_history": [{
            "status": "active",
            "changed_by": "user_Z1zXZKvqrpwxbznuW6lJ",
            "changed_at": "2024-04-03T04:12:01.781Z"
        }],
        "custom_data": [{
            "id": "cdta_ZR6ioEDFTnKLFn62okn",
            "key": "cfld_FZR6ioEDTkHKn62oknLF",
            "value": "Routine Care"
        }],
        "created_by": "user_Z1zXZKvqrpwxbznuW6lJ",
        "created_at": "2024-04-10T13:20:21.724Z",
        "last_updated_at": "2024-04-10T13:20:21.724Z"
      }]
    }