Hi Team,
I am attempting to update an existing DocumentReference in Cerner Millennium (R4) using a PUT request. I am following the documented workflow:
GET the existing DocumentReference
- Capture the ETag value from the response header → e.g.,
W/"15"
- Perform a PUT request to the same DocumentReference endpoint
- Include
If-Match: W/"15" in the request headers
- Send the FULL DocumentReference resource back with only the necessary fields modified
However, I’m consistently receiving the following error response from the server:
400 - OperationOutcome
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "invalid",
"details": {
"text": "Invalid request"
}
}
]
}
Request URL
PUT /r4/{ehr_id}/DocumentReference/208866460
Headers
Headers
Content-Type: application/fhir+json
Accept: application/fhir+json
Authorization: Bearer <valid token with document.write scope>
If-Match: W/"15"
Payload (PUT Request Body)
{
"resourceType": "DocumentReference",
"id": "208866460",
"meta": {
"versionId": "15",
"lastUpdated": "2025-10-15T12:06:01.000Z"
},
"status": "current",
"docStatus": "final",
"type": {
"coding": [
{
"system": "http://loinc.org",
"code": "59284-0",
"display": "Consent Document"
}
],
"text": "Consent Forms"
},
"subject": {
"reference": "Patient/12769853"
},
"author": [
{
"reference": "Practitioner/3332061"
}
],
"content": [
{
"attachment": {
"contentType": "application/pdf;charset=UTF-8",
"data": "JVBERi0xLjUKJcTl8uXrp/Og0MTGCjEgMCBvYmoKPDwvVHlwZSAvQ2F0YWxvZwovUGFnZXMgMiAwIFI+PgplbmRvYmoK",
"title": "Updated Consent Form",
"creation": "2025-10-28T00:00:00Z"
}
}
],
"context": {
"period": {
"start": "2033-07-08T14:06:02Z",
"end": "2034-07-08T14:06:02Z"
}
}
}
What I Need Clarification On
- Is there any additional field required in the PUT payload for DocumentReference updates?
- Does Cerner require Binary upload update separately before the DocumentReference update?
- Are there any restrictions on modifying existing content.attachment.data for previously indexed documents?
- Is this DocumentReference resource locked / non-modifiable due to workflow status?
'x-request-id': '/1E1A53E4C4DE8AAC84FC4FAD732D1E20+D5fD_WOvn',
'opc-request-id': '/1E1A53E4C4DE8AAC84FC4FAD732D1E20/70CD587F71402C1AA11FE599389AFD83',