Stream: implementers
Topic: Validator Errors For Bundle With OperationOutcome
Brian Forbis (Apr 12 2021 at 23:18):
Hello,
I have tried running a searchset Bundle through the FHIR validator and have been running into issues around OperationOutcomes in the "entry.resource" section flagging some errors around not having a resource ID or resource fullURL. Are these fields required for OperationOutcome's? If so, what should go here if these are not persisted resources?
Bundle.entry[0]: Except for transactions and batches, each entry in a Bundle must have a fullUrl which is the identity of the resource in the entry on line 4.
Bundle.entry[0].resource.ofType(OperationOutcome): Resource requires an id, but none is present on line 6.
{
"resourceType": "Bundle",
"entry": [
{
"resource": {
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "code-invalid"
}
]
}
}
],
"total": 1,
"type": "searchset"
}
Brian Forbis (Apr 15 2021 at 20:38):
For clarity, the assumption here that fatal errors would return just an operation outcome, where as search warnings would return OperationOutcomes inside of the Bundle along side any applicable search results, if any exist.
Lloyd McKenzie (Apr 16 2021 at 16:29):
We don't have any exceptions around requirements for ids and URLs on OperationOutcomes vs. other resources in the Bundle, though it might be reasonable for us to do so. (Whether we can get away with doing that given that Bundle is normative, I'm not clear on). Feel free to submit a change request.
Brian Forbis (Apr 16 2021 at 16:41):
@Lloyd McKenzie where might I submit that request?
Lloyd McKenzie (Apr 16 2021 at 16:43):
Use the "propose a change" link at the bottom of any page in the spec. (There's a one-time registration required and someone will manually confirm you look like a real human, but after that, you should be able to submit requests at will.)
Nathan Loyer (Apr 21 2021 at 20:36):
@Lloyd McKenzie I don't see anything in the fhir spec that documents those two rules, that each entry in a bundle must have a resource.id and a fullUrl. Am I missing it? Do you have a link to docs that define those rules? the two fields are 0..1 in the spec so it seems to me that we shouldn't have to provide them
Jean Duteau (Apr 21 2021 at 20:44):
For fullURL, there is this stataement:
http://hl7.org/fhir/bundle.html#bundle-unique
Except for transactions and batches, each entry in a Bundle must have a fullUrl which is the identity of the resource in the entry.
I couldn't find anything around resource.id.
Lloyd McKenzie (Apr 21 2021 at 22:06):
The requirement around id depends on what you're doing - if you're submitting a batch or a transaction, the resource in the entry must match the rules for what you'd need if you were submitting the resource directly. So, for example, the language in "update" is "The request body SHALL be a Resource with an id element that has an identical value to the [id] in the URL". We probably don't actually need to say anything about id from the perspective of OperationOutcome though because there's no rules anywhere requiring it to have an id.
Last updated: Apr 12 2022 at 19:14 UTC