# NutritionOrder _search

`POST /NutritionOrder/_search`

This resource contains a request to provide a diet, formula feeding, or nutritional supplement to a patient or resident.

Nutrition orders may include one or more of the following, depending on the organization and the patient’s care plan:

- <u>Oral diets</u>: Diet types, textures, or fluid consistencies for food taken by mouth (e.g., a sodium-restricted or pureed diet).
- <u>Oral nutritional supplements</u>: Products taken by mouth in addition to a diet (e.g., protein shakes).
- <u>Enteral formulas</u>: Formula feedings delivered through a tube, including administration rate, schedule, and any additives.

Nutrition orders may also contain a patient’s food allergies, intolerances, or food preferences (e.g., vegetarian or kosher) to help care teams prepare appropriate meals.

You can review or search for nutrition order details.

> **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 a patient's diet orders by patient, encounter, status, date, or diet type. 

> **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.

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `patient` | Array of string | No | The patient who the nutrition order is for |
| `patient.identifier` | Array of string | No | One or more external identifiers for the patient |
| `encounter` | Array of string | No | The encounter during which the nutrition order was placed |
| `encounter.identifier` | Array of string | No | Identifier(s) by which this encounter is known |
| `identifier` | Array of string | No | An identifier for the nutrition order |
| `status` | Array of string | No | The status of the nutrition order |
| `datetime` | Array of string | No | The date and time the nutrition order was requested |
| `provider` | Array of string | No | The provider who placed the nutrition order |
| `provider.identifier` | Array of string | No | One or more external identifiers for the practitioner |
| `oraldiet` | Array of string | No | The type of oral diet, such as a low sodium diet |
| `supplement` | Array of string | No | The type of nutritional supplement |
| `formula` | Array of string | No | The type of enteral or infant formula |
| `additive` | Array of string | No | The type of additive to add to the enteral formula |
| `instantiates-canonical` | Array of string | No | The protocol or definition that the nutrition order instantiates |

## Request example

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

```bash
curl 'https://api.redoxengine.com/fhir/R4/{destinationSlug}/{environmentFlag}/NutritionOrder/_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 'encounter=string' \
--data-urlencode 'encounter.identifier=string' \
--data-urlencode 'identifier=string' \
--data-urlencode 'status=string' \
--data-urlencode 'datetime=string' \
--data-urlencode 'provider=string' \
--data-urlencode 'provider.identifier=string' \
--data-urlencode 'oraldiet=string' \
--data-urlencode 'supplement=string' \
--data-urlencode 'formula=string' \
--data-urlencode 'additive=string' \
--data-urlencode 'instantiates-canonical=string'
```

## Responses

### 200

Search results (Bundle)

Response to a NutritionOrder 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 NutritionOrder or Other | No | A resource matching the search criteria or related to a matching resource |
| `entry[] (NutritionOrder).resource` | object | Yes | Search results for a search on the NutritionOrder resource. |
| `entry[] (NutritionOrder).resource.resourceType` | string | Yes | Identifies the type of the resource. Value: NutritionOrder |
| `entry[] (NutritionOrder).resource.status` | string | Yes | The workflow status of the nutrition order/request. Possible values: draft, active, on-hold, revoked, completed, entered-in-error, unknown |
| `entry[] (NutritionOrder).resource.intent` | string | Yes | Indicates the level of authority/intentionality associated with the nutrition order and where the request fits into the workflow chain. Possible values: proposal, plan, directive, order, original-order, reflex-order, filler-order, instance-order, option |
| `entry[] (NutritionOrder).resource.patient` | object | Yes | The patient who receives the diet. Must be a resource of type `Patient`. |
| `entry[] (NutritionOrder).resource.patient.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[] (NutritionOrder).resource.dateTime` | string | Yes | The date and time that this nutrition order was requested. |
| `entry[] (NutritionOrder).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[] (NutritionOrder).resource.oralDiet` | object | No | Diet given orally in contrast to enteral (tube) feeding. |
| `entry[] (NutritionOrder).resource.oralDiet.type` | Array of object | No | The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet. |
| `entry[] (NutritionOrder).resource.oralDiet.type[].coding` | Array of object | No | A reference to a code defined by a terminology system. |
| `entry[] (NutritionOrder).resource.oralDiet.type[].coding[].system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (NutritionOrder).resource.oralDiet.type[].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[] (NutritionOrder).resource.oralDiet.type[].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[] (NutritionOrder).resource.oralDiet.texture` | Array of object | No | Class that describes any texture modifications required for the patient to safely consume various types of solid foods. |
| `entry[] (NutritionOrder).resource.oralDiet.texture[].modifier` | object | No | Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed. |
| `entry[] (NutritionOrder).resource.oralDiet.texture[].modifier.coding` | Array of object | No | A reference to a code defined by a terminology system. |
| `entry[] (NutritionOrder).resource.oralDiet.texture[].modifier.coding[].system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (NutritionOrder).resource.oralDiet.texture[].modifier.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[] (NutritionOrder).resource.oralDiet.texture[].modifier.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[] (NutritionOrder).resource.oralDiet.instruction` | string | No | Free text or additional instructions or information pertaining to the oral diet. |
| `entry[] (NutritionOrder).resource.note` | Array of object | No | Comments made about the nutrition order by the requester, performer, subject, or other participants. |
| `entry[] (NutritionOrder).resource.note[].text` | string | Yes | The text of the annotation in markdown format. |
| `entry[] (NutritionOrder).search` | object | Yes | Information about the search process that lead to the creation of this entry. |
| `entry[] (NutritionOrder).search.mode` | string | Yes | Identifies the NutritionOrder 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": "NutritionOrder",
        "id": "RedoxNutritionOrderExampleLowSodium",
        "status": "active",
        "intent": "order",
        "patient": {
          "reference": "Patient/RedoxPatientExampleTimothy",
          "display": "Timothy Bixby"
        },
        "dateTime": "2026-11-03T14:35:00Z",
        "oralDiet": {
          "type": [
            {
              "coding": [
                {
                  "code": "386619000",
                  "system": "http://snomed.info/sct",
                  "display": "Low sodium diet"
                }
              ],
              "text": "Low sodium diet"
            }
          ],
          "instruction": "2 GRAM SODIUM DIET"
        },
        "note": [
          {
            "text": "Limit sodium to 2 grams per day."
          }
        ]
      },
      "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."
      }
    }
  ]
}
```
