Create a document reference
post
/DocumentReference
Creates new 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
Header Parameters
-
Authorization(required): string
Contains the credentials to authenticate a consumer to the service. The credentials should be the OAuth2 Bearer Token.
-
accept(required): string
The media type to be requested. See what the resource's operation produces for what is supported.
The body of the create operation.
Root Schema : DocumentReferenceCreate
Type:
object
A summary representation of the create (POST) operation for a document reference.
Show Source
-
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):
array content
The document and format referenced.
Note: Must contain only one entry.
Example:{ "content": [ { "attachment": { "contentType": "text/xml;charset=utf-8", "data": "PGh0bWw+Cjx0aXRsZT4gVGVzdCBEb2N1bWVudCA8L3RpdGxlPgoKRG9jdW1lbnQgY29udGVudCEKCjwvaHRtbD4=", "title": "Height Weight Allergy Rule", "creation": "2020-07-29T21:02:04.000Z" } } ] }
-
context(required):
array 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: Onlyfinal
is supported for provider access.final
andamended
are supported for system access.
Example:{ "docStatus": "final" }
-
resourceType(required):
string
Allowed Values:
[ "DocumentReference" ]
The type of the FHIR resource. -
status(required):
string
The status of this document reference.
Note: Onlycurrent
is supported.
Example:{ "status": "current" }
-
subject(required):
object subject
Who the document is about.
Note: Only patient references are supported.
Example:{ "subject": { "reference": "Patient/12457977" } }
-
type(required):
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 } ], 'text': 'Admission Note Physician' } }
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:
array
The document and format referenced.
Note: Must contain only one entry.
Example:
Show Source
Note: Must contain only one entry.
Example:
{
"content": [
{
"attachment": {
"contentType": "text/xml;charset=utf-8",
"data": "PGh0bWw+Cjx0aXRsZT4gVGVzdCBEb2N1bWVudCA8L3RpdGxlPgoKRG9jdW1lbnQgY29udGVudCEKCjwvaHRtbD4=",
"title": "Height Weight Allergy Rule",
"creation": "2020-07-29T21:02:04.000Z"
}
}
]
}
Nested Schema : context
Type:
array
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"
}
}
Nested Schema : subject
Type:
object
Who the document is about.
Note: Only patient references are supported.
Example:
Show Source
Note: Only patient references are supported.
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
}
],
'text': 'Admission Note Physician'
}
}
Nested Schema : items
Type:
Show Source
object
-
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.
Example:{ "attachment": { "contentType": "application/xml;charset=utf-8", "data": "PGh0bWw+Cjx0aXRsZT4gVGVzdCBEb2N1bWVudCA8L3RpdGxlPgoKRG9jdW1lbnQgY29udGVudCEKCjwvaHRtbD4=", "title": "Height Weight Allergy Rule", "creation": "2020-07-29T21:02:04.000Z" } }
-
content.attachment.contentType:
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.
Note:- Must be provided.
- Content type must include a supported MIME type and character set.
- The following values are supported:
- application/pdf
- text/plain;charset=utf-8
- text/richtext;charset=utf-8
- text/rtf;charset=utf-8
- text/html;charset=utf-8
- application/xml;charset=utf-8
- application/xhtml+xml;charset=utf-8
{ "contentType": "application/xml;charset=utf-8" }
-
content.attachment.creation:
string
The date that the attachment was first created.
Note: A time component must be provided with the date.
Example:{ "creation": "2020-07-29T21:02:04.000Z" }
-
content.attachment.data:
string
The actual data of the attachment. A sequence of bytes that are base64 encoded.
Note: See the Common Issues section for more information.
Example:{ "data": "PGh0bWw+Cjx0aXRsZT4gVGVzdCBEb2N1bWVudCA8L3RpdGxlPgoKRG9jdW1lbnQgY29udGVudCEKCjwvaHRtbD4=" }
-
content.attachment.title:
object content.attachment.title
A label or set of text to display in place of the data.
Example:{ "title": "Height Weight Allergy Rule", }
Nested Schema : content.attachment
Type:
object
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.
Example:
Show Source
Note: Data and content type must be provided.
Example:
{
"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 : content.attachment.title
Type:
object
A label or set of text to display in place of the data.
Example:
Show Source
Example:
{
"title": "Height Weight Allergy Rule",
}
-
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 : items
Type:
Show Source
object
-
context.encounter:
object context.encounter
Describes the clinical encounter that the document content is associated with.
Note: Only a single encounter reference is supported.
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 : context.encounter
Type:
object
Describes the clinical encounter that the document content is associated with.
Note: Only a single encounter reference is supported.
Example:
Show Source
Note: Only a single encounter reference is supported.
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/json+fhir
Default Response
Example Request:
POST https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/DocumentReference
Example Request Body:
{
"resourceType": 'DocumentReference',
"status": 'current',
"docStatus": 'final',
"type": {
"coding": [
{
"system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/72',
"code": '2820507',
"display": 'Admission Note Physician',
"userSelected": true
}
],
"text": 'Admission Note Physician'
},
"subject": {
"reference": 'Patient/12457977'
},
"author": [
{
"reference": 'Practitioner/3332064'
}
],
"authenticator": {
"reference": 'Practitioner/3332064'
},
"content": [
{
"attachment": {
"contentType": 'application/xml;charset=utf-8',
"data": 'PGh0bWw+Cjx0aXRsZT4gVGVzdCBEb2N1bWVudCA8L3RpdGxlPgoKRG9jdW1lbnQgY29udGVudCEKCjwvaHRtbD4=',
"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'
}
}
}
Example Response:
Cache-Control: no-cache
Content-Length: 0
Content-Type: text/html
Date: Fri, 04 Nov 2022 10:15:11 GMT
Etag: W/"1"
Location: https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/DocumentReference/201051629
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.