FHIR bundle condition request failed with "Element with min. cardinality 1 cannot be null"
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"
]
}
]
}
}
}
]
}