FHIR bundle condition request failed with "Element with min. cardinality 1 cannot be null"

Murugan Ramakrishnan 1 Reputation point
2022-02-15T10:41:19.103+00:00

In Bundle, we don't have patient id to reference condition resource. but we are getting "Condition.Subject" mandatory error.

Request

{
"resourceType": "Bundle",
"type": "batch",
"entry": [
{
"resource": {
"resourceType": "Condition",
"identifier": [
{
"use": "official",
"type": {
"coding": [
{
"system": "http://abbott.com/fhirmapping/Identifier#conditionIdentifier",
"code": "MRN",
"display": "3740269927200_E78.534"
}
]
},
"system": "http://abbott.com/fhirmapping/Identifier#conditionIdentifier",
"value": "3740269927200_E78.534"
}
],
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "E78.5",
"display": "Disorders of lipoprotein metabolism and other lipidemias"
}
]
}
},
"request": {
"method": "PUT",
"url": "Condition?identifier=3740269927200_E78.534"
}
}
]
}

Response:

{
"resourceType": "Bundle",
"type": "batch-response",
"entry": [
{
"response": {
"status": "400",
"outcome": {
"resourceType": "OperationOutcome",
"id": "f50176ce6a331743af39f054ab665382",
"issue": [
{
"severity": "error",
"code": "invalid",
"diagnostics": "Element with min. cardinality 1 cannot be null",
"location": [
"Condition.Subject"
]
},
{
"severity": "error",
"code": "invalid",
"diagnostics": "Element with min. cardinality 1 cannot be null",
"location": [
"Condition.Subject"
]
}
]
}
}
}
]
}

Azure Health Data Services
Azure Health Data Services
An Azure offering that provides a suite of purpose-built technologies for protected health information in the cloud.
161 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.