# Goal _search

`POST /Goal/_search`

This resource includes one or more target outcomes for a patient over a defined period. 

The goal could be a desired outcome of a medical intervention or program or the target result after a period of recovery. A goal may be for preventing, mitigating, or recovering from a clinical condition (e.g., diabetes, cancer, heart attack) or recovering after a procedure (e.g., heart surgery).

You can review or retrieve goal details for a patient.

> **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](/fhir-api-actions) for realistic examples for particular use cases.

### \_search

Query for details about a patient's medical intervention goals. 

> **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](https://docs.redoxengine.com/permalink/23Q1Oku3NdxxvwYnQGJVrg) in our FHIR glossary.
>
> We add a `required` label only to query parameters _a FHIR server requires if you query it directly_. Remember that Redox <u>**data on demand**</u> isn’t a FHIR server, and your connection may not be either.
>
> _Query parameters vary between sites._ Work with your connection to find out which query parameters they require for a successful search.

###### Data on demand requirements

For data on demand searches, you must include this query parameter: 

- FHIR resource ID for `Patient` resource ([learn about FHIR references](https://docs.redoxengine.com/basics/redox-fhir-api/fhir-glossary/#reference) or [review HL7's docs on references](https://build.fhir.org/search.html#reference))

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `patient` | Array of string | No | The patient the goal is for |
| `patient.identifier` | Array of string | No | One or more external identifiers for the patient |
| `lifecycle-status` | Array of string | No | The status of the goal:		proposed \| planned \| accepted \| active \| on-hold \| completed \| cancelled \| entered-in-error \| rejected |
| `target-date` | Array of string | No | Date to reach goal on or before. |

## Request example

_Generated from the schema: the values are placeholders, not a real payload._

```bash
curl 'https://api.redoxengine.com/fhir/R4/{destinationSlug}/{environmentFlag}/Goal/_search' \
--request POST \
--header 'Authorization: Bearer $API_TOKEN' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'patient=string' \
--data-urlencode 'patient.identifier=string' \
--data-urlencode 'lifecycle-status=string' \
--data-urlencode 'target-date=string'
```

## Responses

### 200

Search results (Bundle)

Response to a Goal search operation

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `resourceType` | string | Yes | Identifies the type of the resource. Value: Bundle |
| `type` | string | Yes | Identifies this bundle as a response to a search. Value: searchset |
| `total` | number | Yes | The total number of matches |
| `entry` | Array of Goal or Other | No | A resource matching the search criteria or related to a matching resource |
| `entry[] (Goal).resource` | object | Yes | Describes the intended objective for a patient, group or organization |
| `entry[] (Goal).resource.resourceType` | string | Yes | Identifies the type of the resource. Value: Goal |
| `entry[] (Goal).resource.lifecycleStatus` | string | Yes | The state of the goal throughout its lifecycle. Possible values: (USCDI) proposed, planned, accepted, active, on-hold, completed, cancelled, entered-in-error, rejected |
| `entry[] (Goal).resource.description` | object | Yes | Human-readable and/or coded description of a specific desired objective of care, such as "control blood pressure" or "negotiate an obstacle course" or "dance with child at wedding". |
| `entry[] (Goal).resource.description.extension` | Array of OriginalText or Other | No | 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. |
| `entry[] (Goal).resource.description.extension[] (OriginalText).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. Value: http://hl7.org/fhir/StructureDefinition/originalText |
| `entry[] (Goal).resource.description.extension[] (OriginalText).valueString` | string | Yes | The original text Only one of `valueString`, `valueUrl` may be present. |
| `entry[] (Goal).resource.description.extension[] (OriginalText).valueUrl` | string | Yes | The original text Only one of `valueString`, `valueUrl` may be present. |
| `entry[] (Goal).resource.description.extension[] (Other)` | Boolean or String or CodeableConcept or Coding or HumanName or Reference | No |  |
| `entry[] (Goal).resource.description.extension[] (Other) (Boolean).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.description.extension[] (Other) (Boolean).valueBoolean` | boolean | No | A single value for the extension. |
| `entry[] (Goal).resource.description.extension[] (Other) (String).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.description.extension[] (Other) (String).valueString` | string | No | A single value for the extension. |
| `entry[] (Goal).resource.description.extension[] (Other) (CodeableConcept).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.description.extension[] (Other) (CodeableConcept).valueCodeableConcept` | object | No | A single value for the extension. |
| `entry[] (Goal).resource.description.extension[] (Other) (CodeableConcept).valueCodeableConcept.coding` | Array of object | No | A reference to a code defined by a terminology system. |
| `entry[] (Goal).resource.description.extension[] (Other) (CodeableConcept).valueCodeableConcept.coding[].system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (Goal).resource.description.extension[] (Other) (CodeableConcept).valueCodeableConcept.coding[].code` | string | No | 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). |
| `entry[] (Goal).resource.description.extension[] (Other) (CodeableConcept).valueCodeableConcept.text` | string | No | 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. |
| `entry[] (Goal).resource.description.extension[] (Other) (Coding).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.description.extension[] (Other) (Coding).valueCoding` | object | No | A single value for the extension. |
| `entry[] (Goal).resource.description.extension[] (Other) (Coding).valueCoding.system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (Goal).resource.description.extension[] (Other) (Coding).valueCoding.code` | string | No | 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). |
| `entry[] (Goal).resource.description.extension[] (Other) (HumanName).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.description.extension[] (Other) (HumanName).valueHumanName` | object | No | A single value for the extension. |
| `entry[] (Goal).resource.description.extension[] (Other) (HumanName).valueHumanName.use` | string | No | Identifies the purpose for this name. Possible values: usual, official, temp, nickname, anonymous, old, maiden |
| `entry[] (Goal).resource.description.extension[] (Other) (HumanName).valueHumanName.family` | string | No | The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father. |
| `entry[] (Goal).resource.description.extension[] (Other) (HumanName).valueHumanName.given` | Array of string | No | Given name. |
| `entry[] (Goal).resource.description.extension[] (Other) (Reference).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.description.extension[] (Other) (Reference).valueReference` | object | No | A single value for the extension. |
| `entry[] (Goal).resource.description.extension[] (Other) (Reference).valueReference.reference` | string | No | 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. |
| `entry[] (Goal).resource.description.coding` | Array of object | No | A reference to a code defined by a terminology system. |
| `entry[] (Goal).resource.description.coding[].system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (Goal).resource.description.coding[].code` | string | No | 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). |
| `entry[] (Goal).resource.description.text` | string | No | 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. |
| `entry[] (Goal).resource.subject` | object | Yes | Identifies the patient, group or organization for whom the goal is being established. Must be a resource of type `Patient`. |
| `entry[] (Goal).resource.subject.reference` | string | No | 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. |
| `entry[] (Goal).resource.id` | string | No | The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes. |
| `entry[] (Goal).resource.identifier` | Array of object | No | Business identifiers assigned to this goal by the performer or other systems which remain constant as the resource is updated and propagates from server to server. |
| `entry[] (Goal).resource.identifier[].extension` | Array of Boolean or String or CodeableConcept or Coding or HumanName or Reference | No | 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. |
| `entry[] (Goal).resource.identifier[].extension[] (Boolean).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.identifier[].extension[] (Boolean).valueBoolean` | boolean | No | A single value for the extension. |
| `entry[] (Goal).resource.identifier[].extension[] (String).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.identifier[].extension[] (String).valueString` | string | No | A single value for the extension. |
| `entry[] (Goal).resource.identifier[].extension[] (CodeableConcept).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.identifier[].extension[] (CodeableConcept).valueCodeableConcept` | object | No | A single value for the extension. |
| `entry[] (Goal).resource.identifier[].extension[] (CodeableConcept).valueCodeableConcept.coding` | Array of object | No | A reference to a code defined by a terminology system. |
| `entry[] (Goal).resource.identifier[].extension[] (CodeableConcept).valueCodeableConcept.coding[].system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (Goal).resource.identifier[].extension[] (CodeableConcept).valueCodeableConcept.coding[].code` | string | No | 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). |
| `entry[] (Goal).resource.identifier[].extension[] (CodeableConcept).valueCodeableConcept.text` | string | No | 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. |
| `entry[] (Goal).resource.identifier[].extension[] (Coding).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.identifier[].extension[] (Coding).valueCoding` | object | No | A single value for the extension. |
| `entry[] (Goal).resource.identifier[].extension[] (Coding).valueCoding.system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (Goal).resource.identifier[].extension[] (Coding).valueCoding.code` | string | No | 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). |
| `entry[] (Goal).resource.identifier[].extension[] (HumanName).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.identifier[].extension[] (HumanName).valueHumanName` | object | No | A single value for the extension. |
| `entry[] (Goal).resource.identifier[].extension[] (HumanName).valueHumanName.use` | string | No | Identifies the purpose for this name. Possible values: usual, official, temp, nickname, anonymous, old, maiden |
| `entry[] (Goal).resource.identifier[].extension[] (HumanName).valueHumanName.family` | string | No | The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father. |
| `entry[] (Goal).resource.identifier[].extension[] (HumanName).valueHumanName.given` | Array of string | No | Given name. |
| `entry[] (Goal).resource.identifier[].extension[] (Reference).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.identifier[].extension[] (Reference).valueReference` | object | No | A single value for the extension. |
| `entry[] (Goal).resource.identifier[].extension[] (Reference).valueReference.reference` | string | No | 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. |
| `entry[] (Goal).resource.identifier[].use` | string | No | The purpose of this identifier. Possible values: usual, official, temp, secondary, old (If known) |
| `entry[] (Goal).resource.identifier[].system` | string | No | Establishes the namespace for the value - that is, a URL that describes a set values that are unique. |
| `entry[] (Goal).resource.identifier[].value` | string | No | The portion of the identifier typically relevant to the user and which is unique within the context of the system. |
| `entry[] (Goal).resource.achievementStatus` | object | No | Describes the progression, or lack thereof, towards the goal against the target. |
| `entry[] (Goal).resource.achievementStatus.extension` | Array of OriginalText or Other | No | 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. |
| `entry[] (Goal).resource.achievementStatus.extension[] (OriginalText).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. Value: http://hl7.org/fhir/StructureDefinition/originalText |
| `entry[] (Goal).resource.achievementStatus.extension[] (OriginalText).valueString` | string | Yes | The original text Only one of `valueString`, `valueUrl` may be present. |
| `entry[] (Goal).resource.achievementStatus.extension[] (OriginalText).valueUrl` | string | Yes | The original text Only one of `valueString`, `valueUrl` may be present. |
| `entry[] (Goal).resource.achievementStatus.extension[] (Other)` | Boolean or String or CodeableConcept or Coding or HumanName or Reference | No |  |
| `entry[] (Goal).resource.achievementStatus.extension[] (Other) (Boolean).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.achievementStatus.extension[] (Other) (Boolean).valueBoolean` | boolean | No | A single value for the extension. |
| `entry[] (Goal).resource.achievementStatus.extension[] (Other) (String).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.achievementStatus.extension[] (Other) (String).valueString` | string | No | A single value for the extension. |
| `entry[] (Goal).resource.achievementStatus.extension[] (Other) (CodeableConcept).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.achievementStatus.extension[] (Other) (CodeableConcept).valueCodeableConcept` | object | No | A single value for the extension. |
| `entry[] (Goal).resource.achievementStatus.extension[] (Other) (CodeableConcept).valueCodeableConcept.coding` | Array of object | No | A reference to a code defined by a terminology system. |
| `entry[] (Goal).resource.achievementStatus.extension[] (Other) (CodeableConcept).valueCodeableConcept.coding[].system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (Goal).resource.achievementStatus.extension[] (Other) (CodeableConcept).valueCodeableConcept.coding[].code` | string | No | 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). |
| `entry[] (Goal).resource.achievementStatus.extension[] (Other) (CodeableConcept).valueCodeableConcept.text` | string | No | 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. |
| `entry[] (Goal).resource.achievementStatus.extension[] (Other) (Coding).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.achievementStatus.extension[] (Other) (Coding).valueCoding` | object | No | A single value for the extension. |
| `entry[] (Goal).resource.achievementStatus.extension[] (Other) (Coding).valueCoding.system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (Goal).resource.achievementStatus.extension[] (Other) (Coding).valueCoding.code` | string | No | 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). |
| `entry[] (Goal).resource.achievementStatus.extension[] (Other) (HumanName).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.achievementStatus.extension[] (Other) (HumanName).valueHumanName` | object | No | A single value for the extension. |
| `entry[] (Goal).resource.achievementStatus.extension[] (Other) (HumanName).valueHumanName.use` | string | No | Identifies the purpose for this name. Possible values: usual, official, temp, nickname, anonymous, old, maiden |
| `entry[] (Goal).resource.achievementStatus.extension[] (Other) (HumanName).valueHumanName.family` | string | No | The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father. |
| `entry[] (Goal).resource.achievementStatus.extension[] (Other) (HumanName).valueHumanName.given` | Array of string | No | Given name. |
| `entry[] (Goal).resource.achievementStatus.extension[] (Other) (Reference).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.achievementStatus.extension[] (Other) (Reference).valueReference` | object | No | A single value for the extension. |
| `entry[] (Goal).resource.achievementStatus.extension[] (Other) (Reference).valueReference.reference` | string | No | 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. |
| `entry[] (Goal).resource.achievementStatus.coding` | Array of object | No | A reference to a code defined by a terminology system. |
| `entry[] (Goal).resource.achievementStatus.coding[].system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (Goal).resource.achievementStatus.coding[].code` | string | No | 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). |
| `entry[] (Goal).resource.achievementStatus.text` | string | No | 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. |
| `entry[] (Goal).resource.priority` | object | No | Identifies the mutually agreed level of importance associated with reaching/sustaining the goal. |
| `entry[] (Goal).resource.priority.extension` | Array of OriginalText or Other | No | 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. |
| `entry[] (Goal).resource.priority.extension[] (OriginalText).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. Value: http://hl7.org/fhir/StructureDefinition/originalText |
| `entry[] (Goal).resource.priority.extension[] (OriginalText).valueString` | string | Yes | The original text Only one of `valueString`, `valueUrl` may be present. |
| `entry[] (Goal).resource.priority.extension[] (OriginalText).valueUrl` | string | Yes | The original text Only one of `valueString`, `valueUrl` may be present. |
| `entry[] (Goal).resource.priority.extension[] (Other)` | Boolean or String or CodeableConcept or Coding or HumanName or Reference | No |  |
| `entry[] (Goal).resource.priority.extension[] (Other) (Boolean).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.priority.extension[] (Other) (Boolean).valueBoolean` | boolean | No | A single value for the extension. |
| `entry[] (Goal).resource.priority.extension[] (Other) (String).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.priority.extension[] (Other) (String).valueString` | string | No | A single value for the extension. |
| `entry[] (Goal).resource.priority.extension[] (Other) (CodeableConcept).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.priority.extension[] (Other) (CodeableConcept).valueCodeableConcept` | object | No | A single value for the extension. |
| `entry[] (Goal).resource.priority.extension[] (Other) (CodeableConcept).valueCodeableConcept.coding` | Array of object | No | A reference to a code defined by a terminology system. |
| `entry[] (Goal).resource.priority.extension[] (Other) (CodeableConcept).valueCodeableConcept.coding[].system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (Goal).resource.priority.extension[] (Other) (CodeableConcept).valueCodeableConcept.coding[].code` | string | No | 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). |
| `entry[] (Goal).resource.priority.extension[] (Other) (CodeableConcept).valueCodeableConcept.text` | string | No | 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. |
| `entry[] (Goal).resource.priority.extension[] (Other) (Coding).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.priority.extension[] (Other) (Coding).valueCoding` | object | No | A single value for the extension. |
| `entry[] (Goal).resource.priority.extension[] (Other) (Coding).valueCoding.system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (Goal).resource.priority.extension[] (Other) (Coding).valueCoding.code` | string | No | 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). |
| `entry[] (Goal).resource.priority.extension[] (Other) (HumanName).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.priority.extension[] (Other) (HumanName).valueHumanName` | object | No | A single value for the extension. |
| `entry[] (Goal).resource.priority.extension[] (Other) (HumanName).valueHumanName.use` | string | No | Identifies the purpose for this name. Possible values: usual, official, temp, nickname, anonymous, old, maiden |
| `entry[] (Goal).resource.priority.extension[] (Other) (HumanName).valueHumanName.family` | string | No | The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father. |
| `entry[] (Goal).resource.priority.extension[] (Other) (HumanName).valueHumanName.given` | Array of string | No | Given name. |
| `entry[] (Goal).resource.priority.extension[] (Other) (Reference).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.priority.extension[] (Other) (Reference).valueReference` | object | No | A single value for the extension. |
| `entry[] (Goal).resource.priority.extension[] (Other) (Reference).valueReference.reference` | string | No | 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. |
| `entry[] (Goal).resource.priority.coding` | Array of object | No | A reference to a code defined by a terminology system. |
| `entry[] (Goal).resource.priority.coding[].system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (Goal).resource.priority.coding[].code` | string | No | 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). |
| `entry[] (Goal).resource.priority.text` | string | No | 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. |
| `entry[] (Goal).resource.target` | Array of object | No | Indicates what should be done by when. |
| `entry[] (Goal).resource.target[].measure` | object | No | The parameter whose value is being tracked, e.g. body weight, blood pressure, or hemoglobin A1c level. |
| `entry[] (Goal).resource.target[].measure.extension` | Array of OriginalText or Other | No | 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. |
| `entry[] (Goal).resource.target[].measure.extension[] (OriginalText).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. Value: http://hl7.org/fhir/StructureDefinition/originalText |
| `entry[] (Goal).resource.target[].measure.extension[] (OriginalText).valueString` | string | Yes | The original text Only one of `valueString`, `valueUrl` may be present. |
| `entry[] (Goal).resource.target[].measure.extension[] (OriginalText).valueUrl` | string | Yes | The original text Only one of `valueString`, `valueUrl` may be present. |
| `entry[] (Goal).resource.target[].measure.extension[] (Other)` | Boolean or String or CodeableConcept or Coding or HumanName or Reference | No |  |
| `entry[] (Goal).resource.target[].measure.extension[] (Other) (Boolean).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.target[].measure.extension[] (Other) (Boolean).valueBoolean` | boolean | No | A single value for the extension. |
| `entry[] (Goal).resource.target[].measure.extension[] (Other) (String).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.target[].measure.extension[] (Other) (String).valueString` | string | No | A single value for the extension. |
| `entry[] (Goal).resource.target[].measure.extension[] (Other) (CodeableConcept).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.target[].measure.extension[] (Other) (CodeableConcept).valueCodeableConcept` | object | No | A single value for the extension. |
| `entry[] (Goal).resource.target[].measure.extension[] (Other) (CodeableConcept).valueCodeableConcept.coding` | Array of object | No | A reference to a code defined by a terminology system. |
| `entry[] (Goal).resource.target[].measure.extension[] (Other) (CodeableConcept).valueCodeableConcept.coding[].system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (Goal).resource.target[].measure.extension[] (Other) (CodeableConcept).valueCodeableConcept.coding[].code` | string | No | 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). |
| `entry[] (Goal).resource.target[].measure.extension[] (Other) (CodeableConcept).valueCodeableConcept.text` | string | No | 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. |
| `entry[] (Goal).resource.target[].measure.extension[] (Other) (Coding).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.target[].measure.extension[] (Other) (Coding).valueCoding` | object | No | A single value for the extension. |
| `entry[] (Goal).resource.target[].measure.extension[] (Other) (Coding).valueCoding.system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (Goal).resource.target[].measure.extension[] (Other) (Coding).valueCoding.code` | string | No | 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). |
| `entry[] (Goal).resource.target[].measure.extension[] (Other) (HumanName).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.target[].measure.extension[] (Other) (HumanName).valueHumanName` | object | No | A single value for the extension. |
| `entry[] (Goal).resource.target[].measure.extension[] (Other) (HumanName).valueHumanName.use` | string | No | Identifies the purpose for this name. Possible values: usual, official, temp, nickname, anonymous, old, maiden |
| `entry[] (Goal).resource.target[].measure.extension[] (Other) (HumanName).valueHumanName.family` | string | No | The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father. |
| `entry[] (Goal).resource.target[].measure.extension[] (Other) (HumanName).valueHumanName.given` | Array of string | No | Given name. |
| `entry[] (Goal).resource.target[].measure.extension[] (Other) (Reference).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.target[].measure.extension[] (Other) (Reference).valueReference` | object | No | A single value for the extension. |
| `entry[] (Goal).resource.target[].measure.extension[] (Other) (Reference).valueReference.reference` | string | No | 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. |
| `entry[] (Goal).resource.target[].measure.coding` | Array of object | No | A reference to a code defined by a terminology system. |
| `entry[] (Goal).resource.target[].measure.coding[].system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (Goal).resource.target[].measure.coding[].code` | string | No | 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). |
| `entry[] (Goal).resource.target[].measure.text` | string | No | 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. |
| `entry[] (Goal).resource.target[].detailQuantity` | object | No | The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value. Only one of `detailQuantity`, `detailCodeableConcept`, `detailString` may be present. |
| `entry[] (Goal).resource.target[].detailQuantity.value` | number | No | The value of the measured amount. The value includes an implicit precision in the presentation of the value. |
| `entry[] (Goal).resource.target[].detailQuantity.system` | string | No | The identification of the system that provides the coded form of the unit. |
| `entry[] (Goal).resource.target[].detailQuantity.code` | string | No | A computer processable form of the unit in some unit representation system. |
| `entry[] (Goal).resource.target[].detailCodeableConcept` | object | No | The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value. Only one of `detailQuantity`, `detailCodeableConcept`, `detailString` may be present. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension` | Array of OriginalText or Other | No | 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. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (OriginalText).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. Value: http://hl7.org/fhir/StructureDefinition/originalText |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (OriginalText).valueString` | string | Yes | The original text Only one of `valueString`, `valueUrl` may be present. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (OriginalText).valueUrl` | string | Yes | The original text Only one of `valueString`, `valueUrl` may be present. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (Other)` | Boolean or String or CodeableConcept or Coding or HumanName or Reference | No |  |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (Other) (Boolean).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (Other) (Boolean).valueBoolean` | boolean | No | A single value for the extension. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (Other) (String).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (Other) (String).valueString` | string | No | A single value for the extension. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (Other) (CodeableConcept).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (Other) (CodeableConcept).valueCodeableConcept` | object | No | A single value for the extension. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (Other) (CodeableConcept).valueCodeableConcept.coding` | Array of object | No | A reference to a code defined by a terminology system. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (Other) (CodeableConcept).valueCodeableConcept.coding[].system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (Other) (CodeableConcept).valueCodeableConcept.coding[].code` | string | No | 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). |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (Other) (CodeableConcept).valueCodeableConcept.text` | string | No | 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. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (Other) (Coding).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (Other) (Coding).valueCoding` | object | No | A single value for the extension. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (Other) (Coding).valueCoding.system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (Other) (Coding).valueCoding.code` | string | No | 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). |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (Other) (HumanName).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (Other) (HumanName).valueHumanName` | object | No | A single value for the extension. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (Other) (HumanName).valueHumanName.use` | string | No | Identifies the purpose for this name. Possible values: usual, official, temp, nickname, anonymous, old, maiden |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (Other) (HumanName).valueHumanName.family` | string | No | The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (Other) (HumanName).valueHumanName.given` | Array of string | No | Given name. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (Other) (Reference).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (Other) (Reference).valueReference` | object | No | A single value for the extension. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.extension[] (Other) (Reference).valueReference.reference` | string | No | 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. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.coding` | Array of object | No | A reference to a code defined by a terminology system. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.coding[].system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (Goal).resource.target[].detailCodeableConcept.coding[].code` | string | No | 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). |
| `entry[] (Goal).resource.target[].detailCodeableConcept.text` | string | No | 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. |
| `entry[] (Goal).resource.target[].detailString` | string | No | The target value of the focus to be achieved to signify the fulfillment of the goal, e.g. 150 pounds, 7.0%. Either the high or low or both values of the range can be specified. When a low value is missing, it indicates that the goal is achieved at any focus value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any focus value at or above the low value. Only one of `detailQuantity`, `detailCodeableConcept`, `detailString` may be present. |
| `entry[] (Goal).resource.target[].dueDate` | string | No | Indicates either the date or the duration after start by which the goal should be met. |
| `entry[] (Goal).resource.statusDate` | string | No | Identifies when the current status.  I.e. When initially created, when achieved, when cancelled, etc. |
| `entry[] (Goal).resource.expressedBy` | object | No | Indicates whose goal this is - patient goal, practitioner goal, etc. Must reference one of the following types of resources: - `Patient` - `Practitioner` - `PractitionerRole` - `RelatedPerson` |
| `entry[] (Goal).resource.expressedBy.reference` | string | No | 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. |
| `entry[] (Goal).resource.startDate` | string | No | The date or event after which the goal should begin being pursued. |
| `entry[] (Goal).search` | object | Yes | Information about the search process that lead to the creation of this entry. |
| `entry[] (Goal).search.mode` | string | Yes | Identifies the Goal as matching the search parameters. Value: match |
| `entry[] (Other).search` | object | Yes | Information about the search process that lead to the creation of this entry. |
| `entry[] (Other).search.mode` | string | No | Why this entry is in the result set - whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process. Possible values: match, include, outcome - why this is in the result set |

_Generated from the schema: the values are placeholders, not a real payload._

```json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 0,
  "entry": [
    {
      "resource": {
        "resourceType": "Goal",
        "id": "RedoxGoalExample",
        "identifier": [
          {
            "system": "urn:oid:1.2.840.114350.1.13.12345.1.7.4.737179",
            "value": "657120987"
          }
        ],
        "lifecycleStatus": "completed",
        "achievementStatus": {
          "text": "On track"
        },
        "priority": {
          "text": "High priority",
          "coding": [
            {
              "code": "394849002",
              "system": "http://snomed.info/sct"
            }
          ]
        },
        "description": {
          "text": "Oxygen saturation in Arterial blood by Pulse oximetry",
          "coding": [
            {
              "code": "59408-5",
              "system": "http://loinc.org"
            }
          ]
        },
        "subject": {
          "reference": "Patient/RedoxPatientExampleTimothy"
        },
        "startDate": "2013-09-02",
        "target": [
          {
            "measure": {
              "text": "Oxygen saturation in Arterial blood by Pulse oximetry",
              "coding": [
                {
                  "code": "59408-5",
                  "system": "http://loinc.org"
                }
              ]
            },
            "detailQuantity": {
              "value": 92,
              "unit": "%"
            },
            "dueDate": "2013-09-02"
          }
        ],
        "statusDate": "2012-12-31"
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}
```

### 400

Request could not be processed or failed validation

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `resourceType` | string | Yes | Identifies the type of the resource. Value: OperationOutcome |
| `issue` | Array of object | Yes | A structured respresentation of the error that occurred |
| `issue[].severity` | string | Yes | Generally `error` or `fatal` Possible values: fatal, error, warning, information |
| `issue[].code` | string | Yes | A FHIR category code that describes the general type of issue. See http://hl7.org/fhir/ValueSet/issue-type for details |
| `issue[].id` | string | No | If the error occurs in the RedoxEngine, this corresponds to an Error record in the organization. |
| `issue[].details` | object | No | Additional details about the error. This may be a text description of the error or a system code that identifies the error. |
| `issue[].details.coding` | Array of object | No | A more granular FHIR code for the specific error. Typically from http://hl7.org/fhir/ValueSet/operation-outcome |
| `issue[].details.coding[].system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `issue[].details.coding[].code` | string | No | 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). |
| `issue[].details.text` | string | No | A human-readable interpretation of the issue code |
| `issue[].diagnostics` | string | No | Additional diagnostic information about the issue. |

```json
{
  "resourceType": "OperationOutcome",
  "issue": [
    {
      "severity": "fatal",
      "code": "invalid",
      "details": {
        "coding": [
          {
            "code": "MSG_BAD_SYNTAX",
            "system": "http://terminology.hl7.org/CodeSystem/operation-outcome"
          }
        ],
        "text": "Invalid content found in request body."
      }
    }
  ]
}
```

### 401

Authorization is required

Same fields as 400.

```json
{
  "resourceType": "OperationOutcome",
  "issue": [
    {
      "severity": "fatal",
      "code": "unknown",
      "details": {
        "coding": [
          {
            "code": "MSG_AUTH_REQUIRED",
            "system": "http://terminology.hl7.org/CodeSystem/operation-outcome"
          }
        ],
        "text": "Invalid authorization token"
      }
    }
  ]
}
```

### 500

Internal server error

Same fields as 400.

```json
{
  "resourceType": "OperationOutcome",
  "issue": [
    {
      "severity": "fatal",
      "code": "processing",
      "details": {
        "coding": [
          {
            "code": "MSG_RESOURCE_ID_FAIL",
            "system": "http://terminology.hl7.org/CodeSystem/operation-outcome"
          }
        ],
        "text": "Unable to allocate resource id."
      }
    }
  ]
}
```

### 503

Service unavailable

Same fields as 400.

```json
{
  "resourceType": "OperationOutcome",
  "issue": [
    {
      "severity": "fatal",
      "code": "transient",
      "details": {
        "text": "System is unable to process this message at this time."
      }
    }
  ]
}
```
