FHIR Chat · Validation of canonical + version · hapi

Stream: hapi

Topic: Validation of canonical + version


view this post on Zulip Signe Hejgaard Kristoffersen (Jun 15 2020 at 14:16):

Hello,
When validating a QuestionnaireResponse with a canonical reference to a version specific Questionnaire, the validation gives the following response:

{
    "severity": "warning",
    "code": "processing",
    "diagnostics": "The questionnaire \"http://hl7.org/fhir/us/sirb/Questionnaire/sirb-recruitment-questionnaire|0.1.0\" could not be resolved, so no validation can be performed against the base questionnaire",
    "location": [ "Parameters.parameter[0].resource.ofType(Parameters).parameter[0].resource.ofType(QuestionnaireResponse)", "Line 16, Col 109" ]
  }

The canonical reference looks like this:
"questionnaire": "http://hl7.org/fhir/us/sirb/Questionnaire/sirb-recruitment-questionnaire|0.1.0",

It seems to work just fine, if I remove the |{version}. Is this validation not supported in HAPI? From https://www.hl7.org/fhir/references.html#canonical I assume that the canonical reference is stated correctly.

view this post on Zulip Grahame Grieve (Jun 15 2020 at 16:49):

should be. can you give me both questionnaire and questionnaireResponse samples so i can test?

view this post on Zulip Signe Hejgaard Kristoffersen (Jun 16 2020 at 07:47):

@Grahame Grieve I have been using this (http://hapi.fhir.org/baseR4/Questionnaire/1167196/_history/1) as the Questionnaire, and this QuestionnaireResponse:

{
  "resourceType": "QuestionnaireResponse",
  "id": "220293",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2019-12-05T10:40:10.257+00:00",
    "source": "#8VT59CPwUir1ahuR"
  },
  "text": {
    "status": "generated",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n      <pre>\n            Comorbidity? YES\n              Cardial Comorbidity? YES\n                Angina? YES\n                MI? NO\n              Vascular Comorbidity?\n                (no answers)\n              ...\n            Histopathology\n              Abdominal\n                pT category: 1a\n              ...\n          </pre>\n    </div>"
  },
  "identifier": {
    "system": "http://acme.com/lab/reports",
    "value": "5234342"
  },
  "basedOn": [ {
    "reference": "CarePlan/220209"
  } ],
  "partOf": [ {
    "reference": "Procedure/220213"
  } ],
  "questionnaire": "http://hl7.org/fhir/us/sirb/Questionnaire/sirb-recruitment-questionnaire|0.1.0",
  "status": "entered-in-error",
  "subject": {
    "reference": "Patient/220224",
    "display": "Peter James Chalmers"
  },
  "encounter": {
    "reference": "Encounter/220211"
  },
  "authored": "2014-12-11T04:44:16Z",
  "author": {
    "reference": "Patient/220224"
  },
  "source": {
    "reference": "Practitioner/220207"
  },
  "item": [ {
    "linkId": "1.1",
    "answer": [ {
      "valueCoding": {
        "code": "LA6560-2",
        "display": "Confused"
      }
    } ]
  } ]
}

The same warning occurs if I try to do a canonical reference to a specific version of a ValueSet in Questionnaire.item.answerValueSet.

view this post on Zulip Grahame Grieve (Jun 16 2020 at 17:25):

@James Agnew / @Mark Iantorno this works fine in the validator itself, but apparently fails in HAPI - I presume this is because the HAPI context cannot resolve http://hl7.org/fhir/us/sirb/Questionnaire/sirb-recruitment-questionnaire|0.1.0 where as the validator's context does

view this post on Zulip Mark Iantorno (Jun 16 2020 at 17:26):

I'll take a look into it now

view this post on Zulip Mark Iantorno (Jun 17 2020 at 14:07):

Just as an update, I'm dedicating my morning to this. I am having build issues with HAPI though, that I am working to resolve

view this post on Zulip Mark Iantorno (Jun 17 2020 at 15:08):

@Grahame Grieve @Signe Hejgaard Kristoffersen what -ig are you passing in to the validator when you run this?

view this post on Zulip Signe Hejgaard Kristoffersen (Jun 18 2020 at 09:45):

@Mark Iantorno I get the warning when using the validator in the CRUD operations at hapi.fhir.org with the QuestionnaireResponse I pasted above.

view this post on Zulip Mark Iantorno (Jun 18 2020 at 14:03):

@Grahame Grieve What was the command you ran in the CLI to get this to work locally?

view this post on Zulip Mark Iantorno (Jun 18 2020 at 14:03):

You had to reference an IG, no?

view this post on Zulip Mark Iantorno (Jun 18 2020 at 14:23):

I just talked to James about this, and he let me know that versioned canonical references are not currently supported by HAPI, but it is on the development roadmap, and should be part of the August release.

view this post on Zulip Grahame Grieve (Jun 18 2020 at 16:56):

ok great thanks

view this post on Zulip Patrick Werner (Jul 03 2020 at 12:57):

Mark Iantorno said:

I just talked to James about this, and he let me know that versioned canonical references are not currently supported by HAPI, but it is on the development roadmap, and should be part of the August release.

great news! Thanks. Currently hapi can't validate the german base profiles because we are using versioned canonical links.


Last updated: Apr 12 2022 at 19:14 UTC