Workflow or API calls:
POST call to /Observation
Background Information:
We are trying to send an Observation resource to our client's “build” (test) environment but getting a 422.
This is sample of how the body looks like with the placeholder on ids and values.
{
"resourceType": "Observation",
"category": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/observation-category",
"code": "laboratory",
"display": "Laboratory"
}
],
"text": "Laboratory"
}
],
"code": {
"coding": [
{
"system": "https://fhir.cerner.com/{ehr-source-id}/codeSet/72",
"code": {code} ,
"display": {display}
}
],
"text": {display}
},
"subject": {
"reference": "Patient/{patient-id}"
},
"encounter": {
"reference": "Encounter/{encounter-id}"
},
"effectiveDateTime": "2025-02-01T00:00:00Z",
"issued": "2025-02-01T01:30:00Z",
"valueString": {value_test},
"status": "final"
}
Expected Result:
Observation is created 201
Actual Result:
X-Request-Id :
/07036930B2E5AE15449BCC1CC292B396+h2xX_g8Na
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "invalid",
"details": {
"text": "Unprocessable entity"
}
}
]
}
Please help us understand what could be wrong with this request if you can see error logs via the request id.
Thanks,
Sheryl