Update a document reference
put
/DocumentReference/{ID}
Updates documents.
Note:
- Only the body fields mentioned below are supported. Unsupported fields are ignored.
- All provided dates must have a time component.
- The following MIME types are supported:
application/pdf
text/plain
text/richtext
text/rtf
text/html
application/xml
application/xhtml+xml
- See the
content.attachment.contentType
body field below for further details.
Authorization Types
This operation supports the following authorization types:
Request
Supported Media Types
- application/fhir+json
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 DocumentReference resource.
-
accept(required): string
The media type to be requested. See what the resource's operation produces for what is supported.
-
content-type(required): string
Specifies the content type of the request entity body.
The body of the update operation.
Root Schema : DocumentReferenceUpdate
Type:
Show Source
object
-
authenticator:
object authenticator
Which person authenticates that this document is valid.
Note: If set, must be a practitioner reference with a valid Millennium ID. Only supported with system access. Cannot be populated for provider access.
Example:{ "authenticator": { "reference": "Practitioner/3332064" } }
-
author(required):
object author
Identifies who is responsible for adding the information to the document.
Note: Must contain only practitioner references with valid Millennium IDs. Optional for system access. For provider access, only a single author can be provided, and it must be the authorized provider.
Example:{ "author": [ { "reference": "Practitioner/3332064" } ] }
-
content(required):
object content
The document and format referenced.
Note: Must contain only one entry.
Example:{ "content": [ { "attachment": { "contentType": "application/xml;charset=utf-8", "data": "PGh0bWw+Cjx0aXRsZT4gVGVzdCBEb2N1bWVudCA8L3RpdGxlPgoKRG9jdW1lbnQgY29udGVudCEKCjwvaHRtbD4=", "title": "Height Weight Allergy Rule", "creation": "2020-07-29T21:02:04.000Z" } } ] }
-
context(required):
object context
The clinical context in which the document was prepared.
Example:{ "encounter": [ { "reference": "Encounter/97987761" } ], "period": { "start": "2020-01-01T00:00:00.000Z", "end": "2020-01-01T01:00:00.000Z" } }
-
docStatus(required):
string
The status of the underlying document.
Note: Allowed values for docStatus arefinal
,amended
, andentered-in-error
. If either status or docStatus are updated toentered-in-error
, the document is treated as a document that was entered in error, regardless of the values of the other fields.
Example:{ "docStatus": "amended" }
-
resourceType(required):
string
Allowed Values:
[ "DocumentReference" ]
The type of the FHIR resource. -
status(required):
string
The status of this document reference.
Note: Bothcurrent
andentered-in-error
are supported. If either status or docStatus are updated toentered-in-error
, the document is treated as a document that was entered in error, regardless of the values of the other fields.
Example:{ "status": "entered-in-error" }
-
subject(required):
object subject
Who the document is about.
Note: The patient has to match the original document.
Example:{ "subject": { "reference": "Patient/12457977" } }
-
type:
object type
Specifies the particular type of document referenced.
Note:- The type must include a LOINC or a proprietary coding but not both together.
- Multiple LOINC codings or a single proprietary coding can be provided.
- When providing a proprietary code system, use the following format where the code set is Millennium Code Set 72:
https://fhir.cerner.com/<your EHR source id>/codeSet/<code set>
- Example:
https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/72
{ "type": { "coding": [ { "system": "https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/72", "code": "2820507", "display": "Admission Note-Physician", "userSelected": true } ] } }
Nested Schema : authenticator
Type:
object
Which person authenticates that this document is valid.
Note: If set, must be a practitioner reference with a valid Millennium ID. Only supported with system access. Cannot be populated for provider access.
Example:
Show Source
Note: If set, must be a practitioner reference with a valid Millennium ID. Only supported with system access. Cannot be populated for provider access.
Example:
{
"authenticator": {
"reference": "Practitioner/3332064"
}
}
Nested Schema : content
Type:
object
The document and format referenced.
Note: Must contain only one entry.
Example:
Show Source
Note: Must contain only one entry.
Example:
{
"content": [
{
"attachment": {
"contentType": "application/xml;charset=utf-8",
"data": "PGh0bWw+Cjx0aXRsZT4gVGVzdCBEb2N1bWVudCA8L3RpdGxlPgoKRG9jdW1lbnQgY29udGVudCEKCjwvaHRtbD4=",
"title": "Height Weight Allergy Rule",
"creation": "2020-07-29T21:02:04.000Z"
}
}
]
}
-
content.attachment:
object content.attachment
The document or URL of the document with critical metadata to prove that the content has integrity.
Note:- Data and content type must be provided.
- Content type must include a supported MIME type and character set.
- The following values are supported:
- application/pdf
- text/rtf;charset=utf-8
- text/html;charset=utf-8
- application/xml;charset=utf-8
- application/xhtml+xml;charset=utf-8
- A time component must be provided with the creation date. The new date must not be earlier than the previous content.attachment.creation date.
{ "attachment": { "contentType": "application/xml;charset=utf-8", "data": "PGh0bWw+Cjx0aXRsZT4gVGVzdCBEb2N1bWVudCA8L3RpdGxlPgoKRG9jdW1lbnQgY29udGVudCEKCjwvaHRtbD4=", "title": "Height Weight Allergy Rule", "creation": "2020-07-29T21:02:04.000Z" } }
Nested Schema : context
Type:
object
The clinical context in which the document was prepared.
Example:
Show Source
Example:
{
"encounter": [
{
"reference": "Encounter/97987761"
}
],
"period": {
"start": "2020-01-01T00:00:00.000Z",
"end": "2020-01-01T01:00:00.000Z"
}
}
-
context.encounter:
object context.encounter
Describes the clinical encounter that the document content is associated with.
Note: The encounter has to match the original document encounter.
Example:{ "encounter": [ { "reference": "Encounter/97987761" } ] }
-
context.period:
object context.period
The time period over which the service that is described by the document was provided.
Note: The period.end field is required; the period.start field is optional. All dates require a time component.
Example:{ "period": { "start": "2020-01-01T00:00:00.000Z", "end": "2020-01-01T01:00:00.000Z" } }
Nested Schema : subject
Type:
object
Who the document is about.
Note: The patient has to match the original document.
Example:
Show Source
Note: The patient has to match the original document.
Example:
{
"subject": {
"reference": "Patient/12457977"
}
}
Nested Schema : type
Type:
object
Specifies the particular type of document referenced.
Note:
Show Source
Note:
- The type must include a LOINC or a proprietary coding but not both together.
- Multiple LOINC codings or a single proprietary coding can be provided.
- When providing a proprietary code system, use the following format where the code set is Millennium Code Set 72:
https://fhir.cerner.com/<your EHR source id>/codeSet/<code set>
- Example:
https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/72
{
"type": {
"coding": [
{
"system": "https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/72",
"code": "2820507",
"display": "Admission Note-Physician",
"userSelected": true
}
]
}
}
Nested Schema : content.attachment
Type:
object
The document or URL of the document with critical metadata to prove that the content has integrity.
Note:
Show Source
Note:
- Data and content type must be provided.
- Content type must include a supported MIME type and character set.
- The following values are supported:
- application/pdf
- text/rtf;charset=utf-8
- text/html;charset=utf-8
- application/xml;charset=utf-8
- application/xhtml+xml;charset=utf-8
- A time component must be provided with the creation date. The new date must not be earlier than the previous content.attachment.creation date.
{
"attachment": {
"contentType": "application/xml;charset=utf-8",
"data": "PGh0bWw+Cjx0aXRsZT4gVGVzdCBEb2N1bWVudCA8L3RpdGxlPgoKRG9jdW1lbnQgY29udGVudCEKCjwvaHRtbD4=",
"title": "Height Weight Allergy Rule",
"creation": "2020-07-29T21:02:04.000Z"
}
}
-
contentType(required):
string
Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes MIME type parameters such as charset where appropriate.
-
creation:
string
The date that the attachment was first created.
-
data(required):
string
The actual data of the attachment. A sequence of bytes that are base64 encoded.
-
title:
string
A label or set of text to display in place of the data.
Nested Schema : context.encounter
Type:
object
Describes the clinical encounter that the document content is associated with.
Note: The encounter has to match the original document encounter.
Example:
Show Source
Note: The encounter has to match the original document encounter.
Example:
{
"encounter": [
{
"reference": "Encounter/97987761"
}
]
}
Nested Schema : context.period
Type:
object
The time period over which the service that is described by the document was provided.
Note: The period.end field is required; the period.start field is optional. All dates require a time component.
Example:
Show Source
Note: The period.end field is required; the period.start field is optional. All dates require a time component.
Example:
{
"period": {
"start": "2020-01-01T00:00:00.000Z",
"end": "2020-01-01T01:00:00.000Z"
}
}
Response
Supported Media Types
- application/fhir+json
Default Response
Example Request:
PUT https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/DocumentReference/16885181
Amended Request Body:
{
'resourceType': 'DocumentReference',
'id': '201051629',
'status': 'current',
'docStatus': 'amended',
'type': {
'coding': [
{
'system': 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/72',
'code': '2820507',
'display': 'Admission Note-Physician',
'userSelected': true
}
]
},
'subject': {
'reference': 'Patient/12457977'
},
'author': [
{
'reference': 'Practitioner/3332064'
}
],
'authenticator': {
'reference': 'Practitioner/3332064'
},
'identifier': [
{
'system': 'https://fhir.cerner.com/ceuuid',
'value': 'CE87caf4b7-9397-4667-9897-702218017c9e-201051629-2022110410151000'
}
],
'content': [
'attachment': {
'contentType': 'application/xml;charset=utf-8',
'data': 'PGh08L3RpdGxlPgoKRG9jdW1lbnQgY29udGVudCEKCjwvaHRtbD4=',
'title': 'Height Weight Allergy Rule',
'creation': '2020-07-29T21:02:04.000Z'
}
],
'context': {
'encounter': [
{
'reference': 'Encounter/97987761'
}
],
'period': {
'start': '2020-01-01T00:00:00.000Z',
'end': '2020-01-01T01:00:00.000Z'
}
}
}
Note: When updating docStatus
or status
with entered-in-error
, the contents of the original document
are not updated. New document content is ignored. A 200
status code is still returned.
Cache-Control: no-cache
Content-Length: 0
Content-Type: application/json+fhir
Date: Fri, 04 Nov 2022 11:54:04 GMT
Etag: W/"2"
Last-Modified: Fri, 04 Nov 2022 11:54:04 GMT
Vary: Origin
opc-request-id: /11111111111111111111111111111111/11111111111111111111111111111111
X-Request-Id: 11111111-1111-1111-1111-111111111111
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.