# MedicationStatement _search

`POST /MedicationStatement/_search`

This resource contains one or more statements about a medication that a patient has taken, is currently taking, or may take in the future. A patient, related person, or clinician may make the statement(s).

The difference between this and `MedicationAdministration` is that `MedicationStatement` contains informal statements rather than official administration details, such as dosage or date/time of administration. The information likely isn’t as specific, since the statement might come from a patient’s account or a list that a related person may maintain for the patient.

You can review or retrieve a list of medication statements 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 a list of medication statements given by or on behalf of a patient. 

> **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 who is consuming the medication |
| `category` | Array of string | No | The categorization of the Medication Statement |
| `effective` | Array of string | No | The Date when patient was taking (or not taking) the medication |

## Request example

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

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

## Responses

### 200

Search results (Bundle)

Response to a MedicationStatement 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 MedicationStatement or Other | No | A resource matching the search criteria or related to a matching resource |
| `entry[] (MedicationStatement).resource` | object | Yes | A record of a medication that is being consumed by a patient |
| `entry[] (MedicationStatement).resource.resourceType` | string | Yes | Identifies the type of the resource. Value: MedicationStatement |
| `entry[] (MedicationStatement).resource.status` | string | Yes | A code representing the patient or other source's judgment about the state of the medication used that this statement is about.  Generally, this will be active or completed. Possible values: active, completed, entered-in-error, intended, stopped, on-hold, unknown, not-taken |
| `entry[] (MedicationStatement).resource.subject` | object | Yes | The patient who is/was taking the medication Must be a resource of type `Patient`. |
| `entry[] (MedicationStatement).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[] (MedicationStatement).resource.medicationCodeableConcept` | object | Yes | Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications. Only one of `medicationCodeableConcept`, `medicationReference` may be present. |
| `entry[] (MedicationStatement).resource.medicationCodeableConcept.coding` | Array of object | No | A reference to a code defined by a terminology system. |
| `entry[] (MedicationStatement).resource.medicationCodeableConcept.coding[].system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (MedicationStatement).resource.medicationCodeableConcept.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[] (MedicationStatement).resource.medicationCodeableConcept.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[] (MedicationStatement).resource.medicationReference` | object | Yes | Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications. Only one of `medicationCodeableConcept`, `medicationReference` may be present. Must be a resource of type `Medication`. |
| `entry[] (MedicationStatement).resource.medicationReference.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[] (MedicationStatement).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[] (MedicationStatement).resource.identifier` | Array of object | No | Identifiers associated with this Medication Statement that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server. |
| `entry[] (MedicationStatement).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[] (MedicationStatement).resource.identifier[].extension[] (Boolean).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.identifier[].extension[] (Boolean).valueBoolean` | boolean | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.identifier[].extension[] (String).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.identifier[].extension[] (String).valueString` | string | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.identifier[].extension[] (CodeableConcept).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.identifier[].extension[] (CodeableConcept).valueCodeableConcept` | object | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.identifier[].extension[] (CodeableConcept).valueCodeableConcept.coding` | Array of object | No | A reference to a code defined by a terminology system. |
| `entry[] (MedicationStatement).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[] (MedicationStatement).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[] (MedicationStatement).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[] (MedicationStatement).resource.identifier[].extension[] (Coding).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.identifier[].extension[] (Coding).valueCoding` | object | No | A single value for the extension. |
| `entry[] (MedicationStatement).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[] (MedicationStatement).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[] (MedicationStatement).resource.identifier[].extension[] (HumanName).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.identifier[].extension[] (HumanName).valueHumanName` | object | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.identifier[].extension[] (HumanName).valueHumanName.use` | string | No | Identifies the purpose for this name. Possible values: usual, official, temp, nickname, anonymous, old, maiden |
| `entry[] (MedicationStatement).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[] (MedicationStatement).resource.identifier[].extension[] (HumanName).valueHumanName.given` | Array of string | No | Given name. |
| `entry[] (MedicationStatement).resource.identifier[].extension[] (Reference).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.identifier[].extension[] (Reference).valueReference` | object | No | A single value for the extension. |
| `entry[] (MedicationStatement).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[] (MedicationStatement).resource.identifier[].use` | string | No | The purpose of this identifier. Possible values: usual, official, temp, secondary, old (If known) |
| `entry[] (MedicationStatement).resource.identifier[].system` | string | No | Establishes the namespace for the value - that is, a URL that describes a set values that are unique. |
| `entry[] (MedicationStatement).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[] (MedicationStatement).resource.category` | object | No | Indicates where the medication is expected to be consumed or administered. |
| `entry[] (MedicationStatement).resource.category.coding` | Array of object | No | A reference to a code defined by a terminology system. |
| `entry[] (MedicationStatement).resource.category.coding[].system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (MedicationStatement).resource.category.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[] (MedicationStatement).resource.category.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[] (MedicationStatement).resource.context` | object | No | The encounter or episode of care that establishes the context for this MedicationStatement. Must be a resource of type `Encounter`. |
| `entry[] (MedicationStatement).resource.context.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[] (MedicationStatement).resource.informationSource` | object | No | The person or organization that provided the information about the taking of this medication. Note: Use derivedFrom when a MedicationStatement is derived from other resources, e.g. Claim or MedicationRequest. Must reference one of the following types of resources: - `Patient` - `Practitioner` - `PractitionerRole` - `RelatedPerson` - `Organization` |
| `entry[] (MedicationStatement).resource.informationSource.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[] (MedicationStatement).resource.reasonCode` | Array of object | No | A reason for why the medication is being/was taken. |
| `entry[] (MedicationStatement).resource.reasonCode[].coding` | Array of object | No | A reference to a code defined by a terminology system. |
| `entry[] (MedicationStatement).resource.reasonCode[].coding[].system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (MedicationStatement).resource.reasonCode[].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[] (MedicationStatement).resource.reasonCode[].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[] (MedicationStatement).resource.dosage` | Array of object | No | Indicates how the medication is/was or should be taken by the patient. |
| `entry[] (MedicationStatement).resource.dosage[].text` | string | No | Free text dosage instructions e.g. SIG. |
| `entry[] (MedicationStatement).resource.dosage[].timing` | object | No | When medication should be administered. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat` | object | No | A set of rules that describe when the event is scheduled. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat.frequency` | number | No | The number of times to repeat the action within the specified period. If frequencyMax is present, this element indicates the lower bound of the allowed range of the frequency. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat.frequencyMax` | number | No | If present, indicates that the frequency is a range - so to repeat between [frequency] and [frequencyMax] times within the period or period range. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat.period` | number | No | Indicates the duration of time over which repetitions are to occur; e.g. to express "3 times per day", 3 would be the frequency and "1 day" would be the period. If periodMax is present, this element indicates the lower bound of the allowed range of the period length. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._period` | object | No | This element contains extensions for `period`. Depending on the extensions present it could be used in place of `period` or contain additional information about `period`. See the `extension` element for more details on the possible extensions being sent. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._period.extension` | Array of OriginalText or Other | No | May be used to represent additional information that is not part of the basic definition of the resource. 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[] (MedicationStatement).resource.dosage[].timing.repeat._period.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[] (MedicationStatement).resource.dosage[].timing.repeat._period.extension[] (OriginalText).valueString` | string | Yes | The original text Only one of `valueString`, `valueUrl` may be present. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._period.extension[] (OriginalText).valueUrl` | string | Yes | The original text Only one of `valueString`, `valueUrl` may be present. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._period.extension[] (Other)` | Boolean or String or CodeableConcept or Coding or HumanName or Reference | No |  |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._period.extension[] (Other) (Boolean).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._period.extension[] (Other) (Boolean).valueBoolean` | boolean | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._period.extension[] (Other) (String).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._period.extension[] (Other) (String).valueString` | string | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._period.extension[] (Other) (CodeableConcept).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._period.extension[] (Other) (CodeableConcept).valueCodeableConcept` | object | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._period.extension[] (Other) (CodeableConcept).valueCodeableConcept.coding` | Array of object | No | A reference to a code defined by a terminology system. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._period.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[] (MedicationStatement).resource.dosage[].timing.repeat._period.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[] (MedicationStatement).resource.dosage[].timing.repeat._period.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[] (MedicationStatement).resource.dosage[].timing.repeat._period.extension[] (Other) (Coding).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._period.extension[] (Other) (Coding).valueCoding` | object | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._period.extension[] (Other) (Coding).valueCoding.system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._period.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[] (MedicationStatement).resource.dosage[].timing.repeat._period.extension[] (Other) (HumanName).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._period.extension[] (Other) (HumanName).valueHumanName` | object | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._period.extension[] (Other) (HumanName).valueHumanName.use` | string | No | Identifies the purpose for this name. Possible values: usual, official, temp, nickname, anonymous, old, maiden |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._period.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[] (MedicationStatement).resource.dosage[].timing.repeat._period.extension[] (Other) (HumanName).valueHumanName.given` | Array of string | No | Given name. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._period.extension[] (Other) (Reference).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._period.extension[] (Other) (Reference).valueReference` | object | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._period.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[] (MedicationStatement).resource.dosage[].timing.repeat.periodMax` | number | No | If present, indicates that the period is a range from [period] to [periodMax], allowing expressing concepts such as "do this once every 3-5 days. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax` | object | No | This element contains extensions for `periodMax`. Depending on the extensions present it could be used in place of `periodMax` or contain additional information about `periodMax`. See the `extension` element for more details on the possible extensions being sent. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.extension` | Array of OriginalText or Other | No | May be used to represent additional information that is not part of the basic definition of the resource. 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[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.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[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.extension[] (OriginalText).valueString` | string | Yes | The original text Only one of `valueString`, `valueUrl` may be present. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.extension[] (OriginalText).valueUrl` | string | Yes | The original text Only one of `valueString`, `valueUrl` may be present. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.extension[] (Other)` | Boolean or String or CodeableConcept or Coding or HumanName or Reference | No |  |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.extension[] (Other) (Boolean).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.extension[] (Other) (Boolean).valueBoolean` | boolean | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.extension[] (Other) (String).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.extension[] (Other) (String).valueString` | string | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.extension[] (Other) (CodeableConcept).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.extension[] (Other) (CodeableConcept).valueCodeableConcept` | object | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.extension[] (Other) (CodeableConcept).valueCodeableConcept.coding` | Array of object | No | A reference to a code defined by a terminology system. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.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[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.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[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.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[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.extension[] (Other) (Coding).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.extension[] (Other) (Coding).valueCoding` | object | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.extension[] (Other) (Coding).valueCoding.system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.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[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.extension[] (Other) (HumanName).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.extension[] (Other) (HumanName).valueHumanName` | object | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.extension[] (Other) (HumanName).valueHumanName.use` | string | No | Identifies the purpose for this name. Possible values: usual, official, temp, nickname, anonymous, old, maiden |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.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[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.extension[] (Other) (HumanName).valueHumanName.given` | Array of string | No | Given name. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.extension[] (Other) (Reference).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.extension[] (Other) (Reference).valueReference` | object | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodMax.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[] (MedicationStatement).resource.dosage[].timing.repeat.periodUnit` | string | No | The units of time for the period in UCUM units. Possible values: s, min, h, d, wk, mo, a - unit of time (UCUM) |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit` | object | No | This element contains extensions for `periodUnit`. Depending on the extensions present it could be used in place of `periodUnit` or contain additional information about `periodUnit`. See the `extension` element for more details on the possible extensions being sent. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.extension` | Array of OriginalText or Other | No | May be used to represent additional information that is not part of the basic definition of the resource. 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[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.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[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.extension[] (OriginalText).valueString` | string | Yes | The original text Only one of `valueString`, `valueUrl` may be present. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.extension[] (OriginalText).valueUrl` | string | Yes | The original text Only one of `valueString`, `valueUrl` may be present. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.extension[] (Other)` | Boolean or String or CodeableConcept or Coding or HumanName or Reference | No |  |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.extension[] (Other) (Boolean).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.extension[] (Other) (Boolean).valueBoolean` | boolean | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.extension[] (Other) (String).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.extension[] (Other) (String).valueString` | string | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.extension[] (Other) (CodeableConcept).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.extension[] (Other) (CodeableConcept).valueCodeableConcept` | object | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.extension[] (Other) (CodeableConcept).valueCodeableConcept.coding` | Array of object | No | A reference to a code defined by a terminology system. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.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[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.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[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.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[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.extension[] (Other) (Coding).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.extension[] (Other) (Coding).valueCoding` | object | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.extension[] (Other) (Coding).valueCoding.system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.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[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.extension[] (Other) (HumanName).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.extension[] (Other) (HumanName).valueHumanName` | object | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.extension[] (Other) (HumanName).valueHumanName.use` | string | No | Identifies the purpose for this name. Possible values: usual, official, temp, nickname, anonymous, old, maiden |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.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[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.extension[] (Other) (HumanName).valueHumanName.given` | Array of string | No | Given name. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.extension[] (Other) (Reference).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.extension[] (Other) (Reference).valueReference` | object | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._periodUnit.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[] (MedicationStatement).resource.dosage[].timing.repeat.when` | Array of string | No | An approximate time period during the day, potentially linked to an event of daily living that indicates when the action should occur. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._when` | object | No | This element contains extensions for `when`. Depending on the extensions present it could be used in place of `when` or contain additional information about `when`. See the `extension` element for more details on the possible extensions being sent. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._when.extension` | Array of OriginalText or Other | No | May be used to represent additional information that is not part of the basic definition of the resource. 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[] (MedicationStatement).resource.dosage[].timing.repeat._when.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[] (MedicationStatement).resource.dosage[].timing.repeat._when.extension[] (OriginalText).valueString` | string | Yes | The original text Only one of `valueString`, `valueUrl` may be present. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._when.extension[] (OriginalText).valueUrl` | string | Yes | The original text Only one of `valueString`, `valueUrl` may be present. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._when.extension[] (Other)` | Boolean or String or CodeableConcept or Coding or HumanName or Reference | No |  |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._when.extension[] (Other) (Boolean).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._when.extension[] (Other) (Boolean).valueBoolean` | boolean | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._when.extension[] (Other) (String).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._when.extension[] (Other) (String).valueString` | string | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._when.extension[] (Other) (CodeableConcept).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._when.extension[] (Other) (CodeableConcept).valueCodeableConcept` | object | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._when.extension[] (Other) (CodeableConcept).valueCodeableConcept.coding` | Array of object | No | A reference to a code defined by a terminology system. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._when.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[] (MedicationStatement).resource.dosage[].timing.repeat._when.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[] (MedicationStatement).resource.dosage[].timing.repeat._when.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[] (MedicationStatement).resource.dosage[].timing.repeat._when.extension[] (Other) (Coding).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._when.extension[] (Other) (Coding).valueCoding` | object | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._when.extension[] (Other) (Coding).valueCoding.system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._when.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[] (MedicationStatement).resource.dosage[].timing.repeat._when.extension[] (Other) (HumanName).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._when.extension[] (Other) (HumanName).valueHumanName` | object | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._when.extension[] (Other) (HumanName).valueHumanName.use` | string | No | Identifies the purpose for this name. Possible values: usual, official, temp, nickname, anonymous, old, maiden |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._when.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[] (MedicationStatement).resource.dosage[].timing.repeat._when.extension[] (Other) (HumanName).valueHumanName.given` | Array of string | No | Given name. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._when.extension[] (Other) (Reference).url` | string | Yes | Source of the definition for the extension code - a logical name or a URL. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._when.extension[] (Other) (Reference).valueReference` | object | No | A single value for the extension. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat._when.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[] (MedicationStatement).resource.dosage[].timing.repeat.boundsPeriod` | object | No | Either a duration for the length of the timing schedule, a range of possible length, or outer bounds for start and/or end limits of the timing schedule. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat.boundsPeriod.start` | string | No | The start of the period. The boundary is inclusive. |
| `entry[] (MedicationStatement).resource.dosage[].timing.repeat.boundsPeriod.end` | string | No | The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time. |
| `entry[] (MedicationStatement).resource.dosage[].route` | object | No | How drug should enter body. |
| `entry[] (MedicationStatement).resource.dosage[].route.coding` | Array of object | No | A reference to a code defined by a terminology system. |
| `entry[] (MedicationStatement).resource.dosage[].route.coding[].system` | string | No | The identification of the code system that defines the meaning of the symbol in the code. |
| `entry[] (MedicationStatement).resource.dosage[].route.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[] (MedicationStatement).resource.dosage[].route.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[] (MedicationStatement).resource.effectiveDateTime` | string | No | The date/time or interval when the medication is/was/will be taken Only one of `effectiveDateTime`, `effectivePeriod` may be present. |
| `entry[] (MedicationStatement).resource.effectivePeriod` | object | No | The date/time or interval when the medication is/was/will be taken Only one of `effectiveDateTime`, `effectivePeriod` may be present. |
| `entry[] (MedicationStatement).resource.effectivePeriod.start` | string | No | The start of the period. The boundary is inclusive. |
| `entry[] (MedicationStatement).resource.effectivePeriod.end` | string | No | The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time. |
| `entry[] (MedicationStatement).search` | object | Yes | Information about the search process that lead to the creation of this entry. |
| `entry[] (MedicationStatement).search.mode` | string | Yes | Identifies the MedicationStatement 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": "MedicationStatement",
        "id": "RedoxMedicationStatementCodeExample",
        "identifier": [
          {
            "system": "urn:oid:1.2.840.114350.1.13.12345.1.7.2.798268",
            "value": "587232495"
          }
        ],
        "status": "active",
        "subject": {
          "reference": "Patient/RedoxPatientExampleTimothy"
        },
        "effectivePeriod": {
          "start": "2013-11-11T05:00:00.000Z"
        },
        "medicationCodeableConcept": {
          "coding": [
            {
              "code": "104894",
              "system": "http://www.nlm.nih.gov/research/umls/rxnorm"
            },
            {
              "code": "0378-7732-93",
              "system": "http://hl7.org/fhir/sid/ndc"
            },
            {
              "code": "64695",
              "system": "urn:oid:2.16.840.1.113883.6.253"
            },
            {
              "code": "50250065007220",
              "system": "urn:oid:2.16.840.1.113883.6.68"
            },
            {
              "code": "64695",
              "system": "urn:oid:2.16.840.1.113883.6.162"
            }
          ],
          "text": "Ondansetron 4 Mg Po Tbdp"
        },
        "reasonCode": [
          {
            "coding": [
              {
                "code": "422587007",
                "system": "http://snomed.info/sct"
              }
            ],
            "text": "Nausea"
          }
        ],
        "dosage": [
          {
            "text": "one tablet every morning",
            "asNeededBoolean": false,
            "route": {
              "coding": [
                {
                  "code": "C38288",
                  "system": "urn:oid:2.16.840.1.113883.3.26.1.1",
                  "display": "Oral"
                }
              ]
            },
            "doseAndRate": [
              {
                "doseQuantity": {
                  "value": 4,
                  "unit": "mg"
                }
              }
            ],
            "timing": {
              "repeat": {
                "when": [
                  "MORN"
                ],
                "boundsPeriod": {
                  "start": "2013-11-11T05:00:00.000Z"
                }
              }
            }
          }
        ]
      },
      "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."
      }
    }
  ]
}
```
