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
Body ()
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
    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
    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
    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
    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"
      }
    }
  • The status of the underlying document.
    Note: Only final is supported for provider access. final and amended are supported for system access.
    Example:
    {
      "docStatus": "final"
    }
  • Allowed Values: [ "DocumentReference" ]
    The type of the FHIR resource.
  • The status of this document reference.
    Note: Only current is supported.
    Example:
    {
      "status": "current"
    }
  • subject
    Who the document is about.
    Note: Only patient references are supported.
    Example:
    {
      "subject": {
        "reference": "Patient/12457977"
      }
    }
  • 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.
    Example:
    {
      "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:
{
  "authenticator": {
    "reference": "Practitioner/3332064"
  }
}
Show Source
Nested Schema : author
Type: object
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"
    }
  ]
}
Show Source
Nested Schema : content
Type: array
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"
       }
     }
   ]
}
Show Source
Nested Schema : context
Type: array
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"
  }
}
Show Source
Nested Schema : subject
Type: object
Who the document is about.
Note: Only patient references are supported.
Example:
{
  "subject": {
    "reference": "Patient/12457977"
  }
}
Show Source
Nested Schema : type
Type: object
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.
Example:
{
  "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'
  }
}
Show Source
Nested Schema : items
Type: object
Show Source
  • 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"
          }
    }
  • 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
    Example:
    {
      "contentType": "application/xml;charset=utf-8"
    } 
  • 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"
    }
  • 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
    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:
{
  "attachment": {
        "contentType": "application/xml;charset=utf-8",
        "data": "PGh0bWw+Cjx0aXRsZT4gVGVzdCBEb2N1bWVudCA8L3RpdGxlPgoKRG9jdW1lbnQgY29udGVudCEKCjwvaHRtbD4=",
        "title": "Height Weight Allergy Rule",
        "creation": "2020-07-29T21:02:04.000Z"
      }
}
Show Source
  • 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.
  • The date that the attachment was first created.
  • The actual data of the attachment. A sequence of bytes that are base64 encoded.
  • 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:
{
  "title": "Height Weight Allergy Rule",
}
Show Source
  • 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.
  • The date that the attachment was first created.
  • The actual data of the attachment. A sequence of bytes that are base64 encoded.
  • A label or set of text to display in place of the data.
Nested Schema : items
Type: object
Show Source
  • 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
    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:
{
  "encounter": [
    {
      "reference": "Encounter/97987761"
    }
  ]
}
Show Source
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:
{
  "period": {
    "start": "2020-01-01T00:00:00.000Z",
    "end": "2020-01-01T01:00:00.000Z"
  }
}
Show Source
Nested Schema : coding
Type: array
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top

Response

Supported Media Types

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
  • For Update or Patch versioning controls. Related to If-Match. When a resource performs an operation that creates or updates a record, an Etag value is returned as a header. This same value should be included in request headers as an If-Match for any subsequent update to that record.
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the X-Request-Id, if present.
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the opc-Request-Id, if present.
Back to Top