Task

A task is a piece of work that needs to be done

The task model

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the task.

  • Name
    object
    Type
    string
    Description

    Always 'task'.

  • Name
    name
    Type
    string
    Description

    Name of the task.

  • Name
    description
    Type
    string
    Description

    Description of the task.

  • Name
    patient
    Type
    string
    Description

    Patient the task is about.

  • Name
    assigned_to
    Type
    string
    Description

    User the task is assigned to.

  • Name
    link_to
    Type
    object
    Description
    Object this task is linked to.
  • Name
    tags
    Type
    array of objects
    Description
    List of tags associated with this task.
  • Name
    share_with_patient
    Type
    string
    Description

    Whether the task is shared with the patient.

  • Name
    priority
    Type
    string
    Description

    Priority of the task. Can be 'low', 'medium', or 'high'.

  • Name
    due_date
    Type
    date-time
    Description

    Timestamp (in ISO 8601 format) of when the task is due.

  • Name
    status_history
    Type
    array of objects
    Description
    Status history of the task.
  • Name
    created_by
    Type
    string
    Description

    Creator of the task.

  • Name
    created_at
    Type
    date-time
    Description

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

  • Name
    last_updated_at
    Type
    date-time
    Description

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

Response

{
    "id": "task_zRX1SV0oK7vQ5f0j8Vjk",
    "object": "task",
    "name": "Order X-ray",
    "description": "Order an X-ray for patient's left knee.",
    "patient": "user_Z1zXZKvqrpwxbznuW6lJ",
    "assigned_to": "user_IsW3SoxZQxW0agHKyP2V",
    "link_to": {
        "object": "care_plan",
        "id": "cpln_2UxtAULYUrX7GVsTKePy"
    },
    "tags": [{
        "id": "tag_2UxtAULYUrX7GVsTKePy",
        "name": "Imaging Order"
    }],
    "share_with_patient": true,
    "priority": "high",
    "due_date": "2024-04-10T13:20:21.724Z",
    "status_history": [{
        "status": "in_progress",
        "changed_by": "user_xeDpGyt67wTor93qKtS7",
        "changed_at": "2024-04-10T13:20:21.724Z"
    }],
    "created_by": "user_xeDpGyt67wTor93qKtS7",
    "created_at": "2024-04-10T13:20:21.724Z",
    "last_updated_at": "2024-04-10T13:20:21.724Z"
}


POST/v2/tasks

Create a task

Creates a new task.

Required attributes

    Optional attributes

    • Name
      name
      Type
      string
      Description

      Name of the task.

    • Name
      description
      Type
      string
      Description

      Description of the task.

    • Name
      patient
      Type
      string
      Description

      Patient the task is about.

    • Name
      assigned_to
      Type
      string
      Description

      User the task is assigned to.

    • Name
      link_to
      Type
      object
      Description
      Object this task is linked to.
    • Name
      tags
      Type
      array of objects
      Description
      List of tags associated with this task.
    • Name
      share_with_patient
      Type
      string
      Description

      Whether the task is shared with the patient.

    • Name
      priority
      Type
      string
      Description

      Priority of the task. Can be 'low', 'medium', or 'high'.

    • Name
      due_date
      Type
      date-time
      Description

      Timestamp (in ISO 8601 format) of when the task is due.

    • Name
      status
      Type
      string
      Description

      Status of the task. Can be 'in_progress' or 'complete'.

    Response

    {
        "id": "task_zRX1SV0oK7vQ5f0j8Vjk",
        "object": "task",
        "name": "Order X-ray",
        "description": "Order an X-ray for patient's left knee.",
        "patient": "user_Z1zXZKvqrpwxbznuW6lJ",
        "assigned_to": "user_IsW3SoxZQxW0agHKyP2V",
        "link_to": {
            "object": "care_plan",
            "id": "cpln_2UxtAULYUrX7GVsTKePy"
        },
        "tags": [{
            "id": "tag_2UxtAULYUrX7GVsTKePy",
            "name": "Imaging Order"
        }],
        "share_with_patient": true,
        "priority": "high",
        "due_date": "2024-04-10T13:20:21.724Z",
        "status_history": [{
            "status": "in_progress",
            "changed_by": "user_xeDpGyt67wTor93qKtS7",
            "changed_at": "2024-04-10T13:20:21.724Z"
        }],
        "created_by": "user_xeDpGyt67wTor93qKtS7",
        "created_at": "2024-04-10T13:20:21.724Z",
        "last_updated_at": "2024-04-10T13:20:21.724Z"
    }
    
    

    GET/v2/tasks/:id

    Retrieve a task

    Retrieves the specified task.

    Response

    
    {
       "id": "task_zRX1SV0oK7vQ5f0j8Vjk",
       "object": "task",
       "name": "Order X-ray",
       "description": "Order an X-ray for patient's left knee.",
       "patient": "user_Z1zXZKvqrpwxbznuW6lJ",
       "assigned_to": "user_IsW3SoxZQxW0agHKyP2V",
       "link_to": {
           "object": "care_plan",
           "id": "cpln_2UxtAULYUrX7GVsTKePy"
       },
       "tags": [{
           "id": "tag_2UxtAULYUrX7GVsTKePy",
           "name": "Imaging Order"
       }],
       "share_with_patient": true,
       "priority": "high",
       "due_date": "2024-04-10T13:20:21.724Z",
       "status_history": [{
           "status": "in_progress",
           "changed_by": "user_xeDpGyt67wTor93qKtS7",
           "changed_at": "2024-04-10T13:20:21.724Z"
       }],
       "created_by": "user_xeDpGyt67wTor93qKtS7",
       "created_at": "2024-04-10T13:20:21.724Z",
       "last_updated_at": "2024-04-10T13:20:21.724Z"
    }
    
    

    POST/v2/tasks/:id

    Update a task

    Updates the specified task 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 the task.

      • Name
        description
        Type
        string
        Description

        Description of the task.

      • Name
        patient
        Type
        string
        Description

        Patient the task is about.

      • Name
        assigned_to
        Type
        string
        Description

        User the task is assigned to.

      • Name
        link_to
        Type
        object
        Description
        Object this task is linked to.
      • Name
        tags
        Type
        array of objects
        Description
        List of tags associated with this task.
      • Name
        share_with_patient
        Type
        string
        Description

        Whether the task is shared with the patient.

      • Name
        priority
        Type
        string
        Description

        Priority of the task. Can be 'low', 'medium', or 'high'.

      • Name
        due_date
        Type
        date-time
        Description

        Timestamp (in ISO 8601 format) of when the task is due.

      • Name
        status
        Type
        string
        Description

        Status of the task. Can be 'in_progress' or 'complete'.

      Response

      
      {
          "id": "task_zRX1SV0oK7vQ5f0j8Vjk",
          "object": "task",
          "name": "Order X-ray",
          "description": "Order an X-ray for patient's left knee.",
          "patient": "user_Z1zXZKvqrpwxbznuW6lJ",
          "assigned_to": "user_IsW3SoxZQxW0agHKyP2V",
          "link_to": {
              "object": "care_plan",
              "id": "cpln_2UxtAULYUrX7GVsTKePy"
          },
          "tags": [{
              "id": "tag_2UxtAULYUrX7GVsTKePy",
              "name": "Imaging Order"
          }],
          "share_with_patient": true,
          "priority": "high",
          "due_date": "2024-04-10T13:20:21.724Z",
          "status_history": [{
              "status": "in_progress",
              "changed_by": "user_xeDpGyt67wTor93qKtS7",
              "changed_at": "2024-04-10T13:20:21.724Z"
          }],
          "created_by": "user_xeDpGyt67wTor93qKtS7",
          "created_at": "2024-04-10T13:20:21.724Z",
          "last_updated_at": "2024-04-10T13:20:21.724Z"
      }
      
      

      GET/v2/tasks

      List all tasks

      Returns a list of all tasks.

      Response

      {
        "object": "list",
        "data": [{
          "id": "task_zRX1SV0oK7vQ5f0j8Vjk",
          "object": "task",
          "name": "Order X-ray",
          "description": "Order an X-ray for patient's left knee.",
          "patient": "user_Z1zXZKvqrpwxbznuW6lJ",
          "assigned_to": "user_IsW3SoxZQxW0agHKyP2V",
          "link_to": {
              "object": "care_plan",
              "id": "cpln_2UxtAULYUrX7GVsTKePy"
          },
          "tags": [{
              "id": "tag_2UxtAULYUrX7GVsTKePy",
              "name": "Imaging Order"
          }],
          "share_with_patient": true,
          "priority": "high",
          "due_date": "2024-04-10T13:20:21.724Z",
          "status_history": [{
              "status": "in_progress",
              "changed_by": "user_xeDpGyt67wTor93qKtS7",
              "changed_at": "2024-04-10T13:20:21.724Z"
          }],
          "created_by": "user_xeDpGyt67wTor93qKtS7",
          "created_at": "2024-04-10T13:20:21.724Z",
          "last_updated_at": "2024-04-10T13:20:21.724Z"
      }]
      }
      

      DELETE/v2/tasks/:id

      Delete a task

      Deletes the specified task.

      Required attributes

        Optional attributes

          Response

          {
              "id": "task_zRX1SV0oK7vQ5f0j8Vjk",
              "object": "task",
              "delete": true
          }