Task _search

post/Task/_search
Page View

This resource represents a task or request for an action to be performed in healthcare workflows. Each task entry contains the task description, status, priority, assigned party, and relevant dates.

You can review or retrieve task information with FHIR® passthrough.

Supported fields and schema examples

We support any valid FHIR® field. However, we only display fields we’ve defined in our schema, which are usually based on what’s included in the U.S. Core profile. We recommend relying on U.S. Core requirements.

Our schema examples show the shape and possibility of each FHIR® resource; they aren’t code for real-time API calls. We don’t currently recommend copying and pasting these schema examples for your API calls. Consider reviewing FHIR® API actions for realistic examples for particular use cases.

_search

Query for tasks by patient, assigned party, or status.

Flexible FHIR queries, different query parameters

FHIR® queries are a flexible option with parameters to refine your search. The response returns a bundle of resources, known as a searchset bundle type. Learn about bundles and bundle types in our FHIR® glossary.

We only note which query parameters are required if you’re querying a FHIR® server directly. Remember that Redox (i.e., data on demand) isn’t a FHIR® server, and your connection may not be either.

Query parameters will vary between sites. Work with your connection to find out which query parameters they require for a successful search.

Request parameters and payload

cURL request example

bash
1
curl 'https://api.redoxengine.com/fhir/R4/{destinationSlug}/{environmentFlag}/Task/_search' \
2
--request POST \
3
--header 'Authorization: Bearer $API_TOKEN' \
4
--header 'Content-Type: application/x-www-form-urlencoded' \
5
--data-urlencode 'patient=string' \
6
--data-urlencode 'patient.identifier=string' \
7
--data-urlencode 'identifier=string' \
8
--data-urlencode 'status=string' \
9
--data-urlencode 'code=string' \
10
--data-urlencode 'encounter=string' \
11
--data-urlencode 'encounter.identifier=string' \
12
--data-urlencode 'owner=string' \
13
--data-urlencode 'authored-on=string'

Request Body Schema

  • patient
    Array of string

    Search by patient the task is being performed for.

  • patient.identifier
    Array of string

    One or more external identifiers for the patient

  • identifier
    Array of string

    Search for a task instance by its business identifier

  • status
    Array of string

    draft | requested | received | accepted | rejected | ready | cancelled | in-progress | on-hold | failed | completed | entered-in-error

  • code
    Array of string

    Search by task code

  • encounter
    Array of string

    Search by encounter

  • encounter.identifier
    Array of string

    Identifier(s) by which this encounter is known

  • owner
    Array of string

    Search by task owner

  • authored-on
    Array of string

    Search by creation date

Response fields and example

Example payload generated from schema
1
{
2
"resourceType": "Bundle",
3
"type": "searchset",
4
"total": 1,
5
"entry": [
6
{
7
"resource": {
8
"resourceType": "Task",
9
"id": "RedoxTaskExample",
10
"status": "requested",
11
"intent": "order",
12
"priority": "routine",
13
"code": {
14
"coding": [
15
{
16
"code": "229059009",
17
"system": "http://snomed.info/sct"
18
}
19
],
20
"text": "Community resource referral"
21
},
22
"description": "Refer patient to community transportation resource",
23
"for": {
24
"reference": "Patient/RedoxPatientExampleTimothy"
25
},
26
"encounter": {
27
"reference": "Encounter/RedoxEncounterExample"
28
},
29
"authoredOn": "2021-12-17T20:33:22.422Z",
30
"lastModified": "2021-12-18T09:00:00.000Z",
31
"requester": {
32
"reference": "Practitioner/RedoxPractitionerExamplePat"
33
}
34
},
35
"search": {
36
"mode": "match"
37
}
38
}
39
]
40
}

    Response to a Task search operation

  • resourceType
    required, string

    Identifies the type of the resource

    Value: Bundle
  • type
    required, string

    Identifies this bundle as a response to a search

    Value: searchset
  • total
    required, number

    The total number of matches

  • entry
    Array of Task or Other

    A resource matching the search criteria or related to a matching resource

    • resource
      required, object

      A task to be performed for or on behalf of a patient.

      • resourceType
        required, string

        Identifies the type of the resource

        Value: Task
      • status
        required, string

        The current status of the task.

        Possible Values: draft, requested, received, accepted, rejected, ready, cancelled, in-progress, on-hold, failed, completed, entered-in-error
      • intent
        required, string

        Indicates the "level" of actionability associated with the Task, i.e. i+R[9]Cs this a proposed task, a planned task, an actionable task, etc.

        Possible Values: unknown, proposal, plan, order, original-order, reflex-order, filler-order, instance-order, option
      • id
        string

        The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.

      • identifier
        Array of object

        The business identifier for this task.

        • extension
          Array of Boolean, String, CodeableConcept, Coding

          May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

          • url
            required, string

            Source of the definition for the extension code - a logical name or a URL.

          • valueBoolean
            boolean

            A single value for the extension.

        • use
          string

          The purpose of this identifier.

          Possible Values: usual, official, temp, secondary, old (If known)
        • system
          string

          Establishes the namespace for the value - that is, a URL that describes a set values that are unique.

        • value
          string

          The portion of the identifier typically relevant to the user and which is unique within the context of the system.

      • businessStatus
        object

        Contains business-specific nuances of the business state.

        • coding
          Array of object

          A reference to a code defined by a terminology system.

          • system
            string

            The identification of the code system that defines the meaning of the symbol in the code.

          • code
            string

            A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).

        • text
          string

          A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.

      • priority
        string

        Indicates how quickly the Task should be addressed with respect to other requests.

        Possible Values: routine, urgent, asap, stat
      • code
        object

        A name or code (or both) briefly describing what the task involves.

        • coding
          Array of object

          A reference to a code defined by a terminology system.

          • system
            string

            The identification of the code system that defines the meaning of the symbol in the code.

          • code
            string

            A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).

        • text
          string

          A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.

      • description
        string

        A free-text description of what is to be performed.

      • focus
        object

        The request being actioned or the resource being manipulated by this task.

        Must be a resource of type Resource.

        • reference
          string

          A reference to another resource. This is typically either a relative reference which includes the resource type and ID, or an internal reference which starts with # and refers to a contained resource.

      • for
        object

        The entity who benefits from the performance of the service specified in the task (e.g., the patient).

        Must be a resource of type Patient.

        • reference
          string

          A reference to another resource. This is typically either a relative reference which includes the resource type and ID, or an internal reference which starts with # and refers to a contained resource.

      • encounter
        object

        The healthcare event (e.g. a patient and healthcare provider interaction) during which this task was created.

        Must be a resource of type Encounter.

        • reference
          string

          A reference to another resource. This is typically either a relative reference which includes the resource type and ID, or an internal reference which starts with # and refers to a contained resource.

      • authoredOn
        string

        The date and time this task was created.

      • lastModified
        string

        The date and time of last modification to this task.

      • requester
        object

        The creator of the task.

        Must reference one of the following types of resources:

        • Practitioner
        • Organization
        • reference
          string

          A reference to another resource. This is typically either a relative reference which includes the resource type and ID, or an internal reference which starts with # and refers to a contained resource.

      • owner
        object

        Individual organization or Device currently responsible for task execution.

        Must reference one of the following types of resources:

        • Practitioner
        • Organization
        • reference
          string

          A reference to another resource. This is typically either a relative reference which includes the resource type and ID, or an internal reference which starts with # and refers to a contained resource.

      • reasonCode
        object

        A description or code indicating why this task needs to be performed.

        • coding
          Array of object

          A reference to a code defined by a terminology system.

          • system
            string

            The identification of the code system that defines the meaning of the symbol in the code.

          • code
            string

            A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).

        • text
          string

          A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.

      • note
        Array of object

        Free-text information captured about the task as it progresses.

        • text
          required, string

          The text of the annotation in markdown format.

    • search
      required, object

      Information about the search process that lead to the creation of this entry.

      • mode
        required, string

        Identifies the Task as matching the search parameters

        Value: match

FHIR® is a registered trademark of Health Level Seven International (HL7) and is used with the permission of HL7. Use of this trademark does not constitute an endorsement of products/services by HL7®.