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
Path Parameters
Header Parameters
Body ()
The body of the update operation.
Root Schema : DocumentReferenceUpdate
Type: object
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": "application/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: Allowed values for docStatus are final, amended, and entered-in-error. If either status or docStatus are updated to entered-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"
    }
  • Allowed Values: [ "DocumentReference" ]
    The type of the FHIR resource.
  • The status of this document reference.
    Note: Both current and entered-in-error are supported. If either status or docStatus are updated to entered-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
    Who the document is about.
    Note: The patient has to match the original document.
    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
          }
        ]
      }
    }
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: object
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"
       }
     }
   ]
}
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.
    • 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.
    Example:
    {
      "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:
{
  "encounter": [
     {
       "reference": "Encounter/97987761"
     }
   ],
  "period": {
    "start": "2020-01-01T00:00:00.000Z",
    "end": "2020-01-01T01:00:00.000Z"
  }
}
Show Source
  • 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
    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:
{
  "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
      }
    ]
  }
}
Show Source
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.
  • 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.
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 : 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:
{
  "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:
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.

Example Response:
  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
  • 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