FHIR Chat · Unresolved references in POST transaction bundle · conformance

Stream: conformance

Topic: Unresolved references in POST transaction bundle


view this post on Zulip Morten Ernebjerg (Aug 11 2021 at 07:01):

I came across a transaction bundle that contains a single POST request for a Condition resource which

  1. has no fullUrl assigned, and
  2. contains a relative reference (Patient/1234)

My question is whether this is allowed (or whether it is up to the validator implementer). The .NET and Java validators disagree on this, the former issuing only a warning for the Bundle, the latter two errors (see below for example).

The spec says that "For transactions and batches, entries MAY not have fullURLs when the entry.request.method = POST" (here). However, the rules for reference resolution in a Bundle imply that if the fullUrl of a resource is missing, the resolution of a relative reference fails and the reference "has no defined meaning within this specification". However, I have not been able to find a statement on whether this renders the resource invalid or not (or whether that classification is left up to the implementer). Even if it is a free choice, it seems to be something the validators should ideally align on.

A simple example is the resource below. The .NET validator https://simplifier.net/validate gives only a warning about not being able to resolve the reference in subject, but the Java CLI validator (version 5.4.9) gives two errors:

*FAILURE*: 2 errors, 0 warnings, 0 notes
  Error @ Bundle.entry[0].resource.ofType(Condition).subject : Relative Reference appears inside Bundle whose entry is missing a fullUrl
  Error @ Bundle.entry[0] (line 4, col16) : Bundle entry missing fullUrl

Example Bundle:

{
    "resourceType": "Bundle",
    "type": "transaction",
    "entry": [{
        "resource": {
            "resourceType": "Condition",
            "subject": {
                "reference": "Patient/1234"
            }
        },
        "request": {
            "method": "POST",
            "url": "Condition"
        }
    }]
}

view this post on Zulip Ewout Kramer (Aug 11 2021 at 07:21):

The Java validator might well be right - this part of the validation in the .NET engine has been written during the STU3 timeframe, and I know we've made some changes to the spec since. I am interested to know the outcome - if necessary we will update the .NET validator to align better with the Java one.

view this post on Zulip Vassil Peytchev (Aug 12 2021 at 05:40):

The rules for reference resolution in Bundle have been further clarified for R5, but I don't know if the changes have made it yet to https://build.fhir.org


Last updated: Apr 12 2022 at 19:14 UTC