Update a medication statement
put
/MedicationStatement/{ID}
Updates a medication statement.
Note:
- Only medication statements without a reference to a medication order can be updated. When a medication statement is associated with a prescription or order, its status is updated when the order itself is completed or canceled.
- Only the body fields mentioned below are supported. Unsupported fields are ignored or result in errors.
- In addition to the common errors and operation outcomes, the following error may be returned:
Updating a medication statement without sending the
If-Match
header returns a412 (Precondition Failed)
status code.
Authorization Types
This operation supports the following authorization types:
- Provider
- System
Request
Supported Media Types
- application/json+fhir
Path Parameters
-
ID(required): string
The logical resource ID.
Header Parameters
-
Authorization(required): string
Contains the credentials to authenticate a consumer to the service. This should be the OAuth2 Bearer token.
-
If-Match(required): string
The current version of the MedicationStatement resource.
-
accept(required): string
The media type to be requested. See what the resource's operation produces for what is supported.
The body of the update operation.
Root Schema : MedicationStatementUpdate
Type:
object
A summary representation of the update (PUT) operation for a medication statement.
Show Source
-
id(required):
string
The logical ID of the resource to update.
Example:{ "id": "123412" }
-
medication[x](required):
Identifies the medication being administered.
Note: This value must be the current medication and cannot be modified.
Example:{ "medicationReference": { "reference": "#456235", "display": "Ibuprofen" } } { "medicationCodeableConcept": { "coding": [ { "system": "http://www.nlm.nih.gov/research/umls/rxnorm", "code": "2551", "display": "Ciprofloxacin", "userSelected": false } ], "text": "ciprofloxacin" } }
-
patient(required):
object patient
Who is or was taking the medication.
Example:{ "patient": { "reference": "Patient/5366327" } }
-
resourceType(required):
string
Allowed Values:
[ "MedicationStatement" ]
The type of the FHIR resource. -
status(required):
string
A code representing the patient or other source's judgment about the state of the medication that this statement is about.
Note:- When creating a medication statement, only the
active
status is supported. - When updating a medication statement, only the
completed
status is supported.
{ "status": "active" }
- When creating a medication statement, only the
Nested Schema : patient
Type:
object
Who is or was taking the medication.
Example:
Show Source
Example:
{
"patient": {
"reference": "Patient/5366327"
}
}
Response
Supported Media Types
- application/json+fhir
Default Response
Example Request:
PUT https://fhir-ehr-code.cerner.com/dstu2/ec2458f2-1e24-41c8-b71b-0e701af7583d/MedicationStatement/309799821
Example Request Body:
{
'resourceType': 'MedicationStatement',
'id': '309799821',
'status': 'completed',
'patient': {
'reference': 'Patient/12724067'
},
'medicationCodeableConcept': {
'coding': [
{
'system': 'http://www.nlm.nih.gov/research/umls/rxnorm',
'code': '82122',
'display': 'Levofloxacin',
'userSelected': false
}
],
'text': 'levoFLOXacin'
}
}
Example Response:
HTTP Status: 200 OK
Connection: Keep-Alive
Content-Encoding: gzip
Content-Length: 20
Content-Type: text/html; charset=UTF-8
Date: Wed, 13 Jan 2016 21:50:53 GMT
Keep-Alive: timeout=15, max=100
Last-Modified: Tue, 15 Dec 2015 19:13:20 GMT
access-control-allow-methods: DELETE, GET, POST, PUT, OPTIONS, HEAD
access-control-allow-origin: *
access-control-expose-headers: ETag, Content-Location, Location, X-Request-Id, WWW-Authenticate, Date
access-control-max-age: 0
cache-control: no-cache
etag: W/"1"
strict-transport-security: max-age=631152000
vary: Origin,User-Agent,Accept-Encoding
opc-request-id: /11111111111111111111111111111111/11111111111111111111111111111111
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-request-id: 11111111-1111-1111-1111-111111111111
x-xss-protection: 1; mode=block
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. -
If-Match: string
For Update or Patch versioning controls. Related to
Etag
. 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.