Skip to Main Content

R4 APIs (Millennium)

Announcement

For information related to the Oracle Partner Network (OPN) Industry Healthcare Track please visit our OPN Industry Healthcare Program page.

For specific questions related to Oracle Partner Network (OPN), please contact Partner Assistance.

Millennium FHIR and non-FHIR API Specifications and Supporting Documents can be found HERE on docs.oracle.com
Soarian FHIR API Specifications and Supporting Documents can be found HERE on docs.oracle.com.

422 Unprocessable Entity while creating DocumentReference in Cerner FHIR API

Rohit Singh3 days ago

Description:
I’m trying to create a DocumentReference resource using the Cerner R4 FHIR endpoint:
POST https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/DocumentReference
However, I keep receiving a 422 Unprocessable Entity error, and I’m not sure what is causing it.

Request Body:
{
"resourceType": "DocumentReference",
"status": "current",
"type": {
"coding": [
{
"system": "http://loinc.org",
"code": "11488-4",
"display": "Consult Note Generic"
}
]
},
"subject": {
"reference": "Patient/12742399"
},
"author": [
{
"reference": "Practitioner/12769364"
}
],
"date": "2025-10-30T00:00:00Z",
"context": {
"encounter": [
{
"reference": "Encounter/97955594"
}
],
"period": {
"start": "2025-10-30T00:00:00Z",
"end": "2025-10-30T01:00:00Z"
}
},
"content": [
{
"attachment": {
"contentType": "text/plain;charset=UTF-8",
"data": "SGVsbG8gV29ybGQh",
"title": "Test Note"
}
}
]
}

Response:

{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "invalid",
"details": {
"text": "Unprocessable entity"
}
}
]
}

What I’ve Checked So Far:

  • The Patient, Practitioner, and Encounter IDs are valid and retrievable using the FHIR read APIs.
  • The DocumentReference resource type supports create and update interactions as per the /metadata response.
  • The access token includes the required system/DocumentReference.write scope
  • The attachment includes a valid Base64 encoded string (SGVsbG8gV29ybGQh) and a contentType with a charset specified.

Question:
Can someone help me understand what could be causing the 422 Unprocessable Entity error? Is there a specific field or value in the payload that Cerner’s FHIR API rejects when creating a DocumentReference?

This post has been answered by Albert-Attila Keresztesi-Oracle on Nov 3 2025
Jump to Answer
Comments
Post Details
Added 3 days ago
4 comments
26 views