Create a medication request
post
/MedicationRequest
Creates an individual medication request.
Note: Only the body fields mentioned below are supported. Unsupported fields are ignored or can result in errors.
Authorization Types
This operation supports the following authorization types:
Request
Supported Media Types
- application/fhir+json
Header Parameters
-
accept(required): string
The media type to be requested. See what the resource's operation produces for what is supported.
-
authorization(required): string
Contains the credentials to authenticate a consumer to the service. This should be the OAuth2 Bearer Token.
The body of the create operation.
Root Schema : MedicationRequestCreate
Type:
object
A summary representation of the create (POST) operation for a medication request.
Show Source
-
dispenseRequest:
object dispenseRequest
The medication supply authorization.
-
doNotPerform:
boolean
Indicates whether the provider is asking for the medication request not to occur.
Note: If provided, must be set tofalse
.
Example:{ "doNotPerform": false }
-
dosageInstruction:
string
Indicates how the medication is to be used by the patient.
Note: Can only be provided once. -
dosageInstruction.additionalInstruction:
string
The supplemental instruction or warnings to the patient.
Note: If provided, can only be provided once. Onlytext
is supported.
Example:{ "dosageInstruction": [ { "additionalInstruction": [ { "text": "Take with food." } ] } ] }
-
dosageInstruction.asNeeded[x]:
Indicates whether the medication is only taken when needed or the preconditions for taking the medication.
Note: When providing theasNeededCodeableConcept
field, and thecoding
field is provided,system
andcode
must be provided together.
Example:{ "dosageInstruction": [ { "asNeededBoolean": true } ] }
{ "dosageInstruction": [ { "asNeededCodeableConcept": { "coding": [ { "system": "http://snomed.info/sct", "code": "25064002" } ], "text": "For headaches" } } ] }
-
dosageInstruction.doseAndRate:
string
How the drug should enter the body.
Note: Can only be provided once. -
dosageInstruction.doseAndRate.dose[x]:
The amount of medication per dose.
Note: Must be of typeSimpleQuantity
. Must contain thesystem
andcode
fields if either are provided.
Example:{ "dosageInstruction": [ { "doseAndRate": [ { "doseQuantity": { "value": 5, "unit": "tabs", "system": "http://unitsofmeasure.org", "code": "tbl" } } ] } ] }
-
dosageInstruction.route:
object dosageInstruction.route
The route or physiological path of administration of a therapeutic agent into or onto the body of a subject.
Note:- If provided, only the
coding
field is supported. - When the
coding
field is provided,system
andcode
must be provided together.
{ "dosageInstruction": [ { "route": { "coding": [ { "system": "http://snomed.info/sct", "code": "41974700" } ] } } ] }
- If provided, only the
-
dosageInstruction.site:
object dosageInstruction.site
The anatomic site where the medication first enters the body.
Note:- If provided, only the
coding
field is supported. - When the
coding
field is provided,system
andcode
must be provided together.
{ "dosageInstruction": [ { "site": { "coding": [ { "system": "http://snomed.info/sct", "code": "368208006" } ] } } ] }
- If provided, only the
-
dosageInstruction.text:
string
The free-text dosage instructions.
Example:{ "dosageInstruction": [ { "text": "5 mL, Oral, Daily." } ] }
-
dosageInstruction.timing:
string
When the medication should be administered.
-
dosageInstruction.timing.code:
object dosageInstruction.timing.code
Code for a known or defined timing pattern.
Note:- If provided, only the
coding
field is supported. - When the
coding
field is provided,system
andcode
must be provided together.
{ "dosageInstruction": [ { "timing": { "code": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation", "code": "BID" } ] } } } ] }
- If provided, only the
-
dosageInstruction.timing.repeat:
string
When the event is to occur.
-
dosageInstruction.timing.repeat.bounds[x]:
The outer bounds for start and end limits of the timing schedule.
Example:{ "dosageInstruction": [ { "timing": { "repeat": { "boundsPeriod": { "start": "2020-03-03T20:07:53Z", "end": "2021-03-03T20:07:53Z" } } } } ] }
-
dosageInstruction.timing.repeat.count:
string
The number of times to repeat.
Example:{ "dosageInstruction": [ { "timing": { "repeat": { "count": 1 } } } ] }
-
dosageInstruction.timing.repeat.duration:
string
How long when it happens.
Note: If provided,durationUnit
must be provided.
Example:{ "dosageInstruction": [ { "timing": { "repeat": { "duration": 1, "durationUnit": "d" } } } ] }
-
dosageInstruction.timing.repeat.durationUnit:
string
The units of time for the duration.
Note: If provided,duration
must be provided.
Example:{ "dosageInstruction": [ { "timing": { "repeat": { "duration": 5, "durationUnit": "h" } } } ] }
-
encounter:
object encounter
The
encounter
that this medication request was created for or associated with.
Example:{ "encounter": { "reference": "Encounter/1621910" } }
-
intent(required):
string
Whether the request is a proposal, plan, or an original order.
Note:- When creating a medication request, the intent must be
order
orplan
. - When read back, the created medication request always has an intent of
order
orplan
. The reported field can be used to determine if a medication is an authorization or a medication reported by a patient. Medication requests with intents oforder
andplan
are supported in accordance with the changes to the US Core Profile.
{ "intent": "order" }
- When creating a medication request, the intent must be
-
medication[x](required):
A code that defines the medication
Note: Must be of type CodeableConcept. Eithertext
, or onecoding
with asystem
andcode
must be provided.
Example:{ "medicationCodeableConcept": { "coding": [ { "system": "http://www.nlm.nih.gov/research/umls/rxnorm", "code": "352362" } ], "text": "Acetaminophen" } }
-
note:
object note
Information about the medication request.
Example:{ "note": [ { "authorString": "Leslie Knope", "time": "2020-03-03T20:07:53Z", "text": "Patient has had medication in past." } ] }
-
reported[x](required):
Indicates if this record was captured as a secondary
reported
record rather than as an original primary source-of-truth record.
Note: Must be of type boolean and must be set totrue
.
Example:{ "reportedBoolean": true }
-
resourceType(required):
string
Allowed Values:
[ "MedicationRequest" ]
The type of the FHIR resource. -
status(required):
string
The current state of the medication request.
Note: When creating a new medication request, the status must beactive
.
Example:{ "status": "active" }
-
subject(required):
A link to a resource representing the person or set of individuals to whom the medication will be given.
Note: Must be aPatient
reference.
Example:{ "subject": { "reference": "Patient/12742400" } }
Nested Schema : dispenseRequest
Type:
object
The medication supply authorization.
Show Source
-
dispenseRequest.numberOfRepeatsAllowed:
string
The number of refills authorized.
Example:{ "dispenseRequest": { "numberOfRepeatsAllowed": 5 } }
-
dispenseRequest.quantity:
object dispenseRequest.quantity
The amount of medication to supply per dispense.
Note:- Must contain the
system
andcode
fields if either are provided. - The
unit
field is not supported.
{ "dispenseRequest": { "quantity": { "value": 12, "system": "http://unitsofmeasure.org", "code": "tbl" } } }
- Must contain the
-
substitution:
object substitution
Any restrictions on medication substitution.
Nested Schema : dosageInstruction.route
Type:
object
The route or physiological path of administration of a therapeutic agent into or onto the body of a subject.
Note:
Show Source
Note:
- If provided, only the
coding
field is supported. - When the
coding
field is provided,system
andcode
must be provided together.
{
"dosageInstruction": [
{
"route": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "41974700"
}
]
}
}
]
}
Nested Schema : dosageInstruction.site
Type:
object
The anatomic site where the medication first enters the body.
Note:
Show Source
Note:
- If provided, only the
coding
field is supported. - When the
coding
field is provided,system
andcode
must be provided together.
{
"dosageInstruction": [
{
"site": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "368208006"
}
]
}
}
]
}
Nested Schema : dosageInstruction.timing.code
Type:
object
Code for a known or defined timing pattern.
Note:
Show Source
Note:
- If provided, only the
coding
field is supported. - When the
coding
field is provided,system
andcode
must be provided together.
{
"dosageInstruction": [
{
"timing": {
"code": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation",
"code": "BID"
}
]
}
}
}
]
}
Nested Schema : encounter
Type:
object
The
Example:
Show Source
encounter
that this medication request was created for or associated with.Example:
{
"encounter": {
"reference": "Encounter/1621910"
}
}
Nested Schema : note
Type:
object
Information about the medication request.
Example:
Show Source
Example:
{
"note": [
{
"authorString": "Leslie Knope",
"time": "2020-03-03T20:07:53Z",
"text": "Patient has had medication in past."
}
]
}
Nested Schema : dispenseRequest.quantity
Type:
object
The amount of medication to supply per dispense.
Note:
Show Source
Note:
- Must contain the
system
andcode
fields if either are provided. - The
unit
field is not supported.
{
"dispenseRequest": {
"quantity": {
"value": 12,
"system": "http://unitsofmeasure.org",
"code": "tbl"
}
}
}
Nested Schema : substitution
Type:
object
Any restrictions on medication substitution.
Show Source
-
substitution.allowed[x]:
Whether substitution is allowed.
Note: Only a type ofboolean
is supported.
Example:{ "substitution": { "allowedBoolean": true } }
Response
Supported Media Types
- application/fhir+json
Default Response
Example Request:
POST https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/MedicationRequest
Example Request Body:
{
'resourceType': 'MedicationRequest',
'status': 'active',
'intent': 'order',
'doNotPerform': false,
'reportedBoolean': true,
'medicationCodeableConcept': {
'coding': [
{
'system': 'http://www.nlm.nih.gov/research/umls/rxnorm',
'code': '352362'
}
],
'text': 'Acetaminophen'
},
'subject': {
'reference': 'Patient/12742400'
},
'encounter': {
'reference': 'Encounter/97953530'
},
'note': [
{
'authorString': 'Leslie Knope',
'time': '2020-03-03T20:07:53Z',
'text': 'Patient has had medication in past.'
}
],
'dosageInstruction': [
{
'text': '5 mL, Oral, Daily.',
'additionalInstruction': [
{
'text': 'Take with food.'
}
],
'timing': {
'repeat': {
'boundsPeriod': {
'start': '2020-02-25T23:19:10Z',
'end': '2021-02-27T23:19:10Z'
},
'count': 1,
'duration': 1.0,
'durationUnit': 'd'
},
'code': {
'coding': [
{
'system': 'http://terminology.hl7.org/CodeSystem/v3-GTSAbbreviation',
'code': 'BID'
}
]
}
},
'asNeededBoolean': true,
'site': {
'coding': [
{
'system': 'http://snomed.info/sct',
'code': '368208006'
}
]
},
'route': {
'coding': [
{
'system': 'http://snomed.info/sct',
'code': '41974700'
}
]
},
'doseAndRate': [
{
'doseQuantity': {
'value': 23.0,
'unit': 'tabs',
'system': 'http://unitsofmeasure.org',
'code': 'tbl'
}
}
]
}
],
'dispenseRequest': {
'numberOfRepeatsAllowed': 5,
'quantity': {
'value': 10.0,
'system': 'http://unitsofmeasure.org',
'code': 'tbl'
}
},
'substitution': {
'allowedBoolean': true
}
}
```
Example Response:
Cache-Control: no-cache
Content-Length: 0
Content-Type: application/fhir+json
Date: Wed, 27 Mar 2019 15:59:33 GMT
Etag: W/"0"
Last-Modified: Wed, 27 Mar 2019 15:59:30 GMT
Location: https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/MedicationRequest/4595905
Vary: Origin
X-Request-Id: 11111111-1111-1111-1111-111111111111
opc-request-id: /11111111111111111111111111111111/11111111111111111111111111111111
The ETag
response header indicates the current If-Match
version to use on a subsequent update.
Headers
-
Etag: string
For Update or Patch versioning controls. Related to
If-Match
. When a resource performs an operation that creates or updates a record, anEtag
value is returned as a header. This same value should be included in request headers as anIf-Match
for any subsequent update to that record. -
X-Request-Id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
X-Request-Id
, if present. -
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
opc-Request-Id
, if present.