FHIR Chat · Codesystem versioning · hapi

Stream: hapi

Topic: Codesystem versioning


view this post on Zulip Signe Hejgaard Kristoffersen (Jun 30 2020 at 14:06):

When I create an instance of a ressource with an element of type Coding, specifying the system (which in my example is a CodeSystem.url) and version of the system, I experience an issue, if I have multiple versions of the CodeSystem. If the instance created uses a code in the CodeSystem in version A, but the newest version of the CodeSystem is version B, I get an error, even though the version is specified in the Coding.

In the error:

 {
    "severity": "error",
    "code": "processing",
    "diagnostics": "Unknown code {Coding.system}Coding.code for 'Coding.system#Coding.code'",
    "location": [
        "QuestionnaireResponse.item[0].answer[0].value.ofType(Coding)", "Line 1, Col 851"
    ]
}

it seems as the code is only validated against the most recent version of the CodeSystem, as the version is not mentioned in the diagnostics. Shouldn't the code be validated against the version of the CodeSystem which is specified in the Coding.version?

view this post on Zulip Grahame Grieve (Jun 30 2020 at 21:31):

@James Agnew this is a feature of the context - I use org.hl7.fhir.r5.context.CanonicalResourceManager<T> for this

view this post on Zulip Signe Hejgaard Kristoffersen (Jul 03 2020 at 07:26):

Is there anything we can do to avoid this error? Or is this something that should be fixed somewhere else?


Last updated: Apr 12 2022 at 19:14 UTC