FHIR Chat · Problem with resolution of FHIR- · questionnaire

Stream: questionnaire

Topic: Problem with resolution of FHIR-


view this post on Zulip Lloyd McKenzie (Dec 05 2021 at 17:12):

I'm reading through the resolution to FHIR#27937 and am struggling to understand what we were thinking. Changing 'Questionnaire' to 'QuestionnaireResponse' makes no sense - as this is a reference in a Questionnaire to a different Questionnaire that can be used to create the desired resource on the fly.

However, on looking at the extension in detail, there are other things that don't make sense:

  • the type is 'uri'. However, if we're wanting to point to a Questionnaire, the type should be 'canonical'
  • the description of the extension says that the reference can be "indirect via mapping if the Reference is to some other sort of resource", but I have no clue what that means. It would make no sense for a Questionnaire to point to a specific AllergyIntolerance or Procedure or something. The best I can presume is that the intention is to point to a profile and then somehow have the system generate a form based on the profile and populate the resulting response into an instance of the profiled resource. However, there's really no need to list the profile to use because we already have an extension on Questionnaire.item for questions of type Reference that indicates the desired resource type and possibly profile the referenced resource should comply with - so pointing to a profile with this extension would be redundant.

My proposal: re-open the current tracker item and reject it; create and approve a new tracker item to change the type to "canonical<Questionnaire>" and remove the language about indirect. Thoughts?

view this post on Zulip Brian Postlethwaite (Dec 06 2021 at 01:24):

I think uri to canonical<Questionnaire> is correct.
However I do get what the rest of the text is expecting.

view this post on Zulip Brian Postlethwaite (Dec 06 2021 at 01:27):

The Reference type being identified here is the one that the Quesitonnaire item (or element) contains.
The indirect part is if the resource type referenced by the item is not a QuestionnaireResponse, but an Observation reference, which then needs to be extracted to reference (from the Q that was linked)

view this post on Zulip Brian Postlethwaite (Dec 06 2021 at 01:28):

I think this is intended to cover use cases where you have a questionnaire to capture some other data, and can be turned into the target type, then linked (if they didn't already find one)

view this post on Zulip Lloyd McKenzie (Dec 06 2021 at 03:06):

I'm not following. If you're going to extract, the details of the extraction will be in the Questionnaire. And if you're going to extract, you MUST point to the Questionnaire - or there'll be no QuestionnaireResponse to extract from. I was fully expecting extraction to be necessary in all cases...

view this post on Zulip Brian Postlethwaite (Dec 06 2021 at 03:07):

Maybe examples will help.

view this post on Zulip Lloyd McKenzie (Dec 06 2021 at 03:31):

Was that an offer to share some? :)

view this post on Zulip Brian Postlethwaite (Dec 06 2021 at 03:32):

Yes. Just putting it together

view this post on Zulip Brian Postlethwaite (Dec 06 2021 at 03:37):

This is one with the 2 types of usage...

<Questionnaire xmlns="http://hl7.org/fhir">
  <id value="res-ref" />
  <url value="http://fhir.telstrahealth.com/demos/Questionnaire/res-ref" />
  <version value="1" />
  <title value="Resource Reference demo" />
  <status value="draft" />
  <date value="2015-05-22" />
  <publisher value="Telstra Health" />
  <item>
    <linkId value="EOS_APS_V01_root" />
    <text value="Test some resource references" />
    <type value="group" />
    <item>
      <extension url="http://hl7.org/fhir/StructureDefinition/questionnaire-referenceResource">
        <valueCode value="Observation" />
      </extension>
      <extension url="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-lookupQuestionnaire">
        <valueCanonical value="https://lforms-fhir.nlm.nih.gov/baseR4/Questionnaire/55418-8-x" />
      </extension>
      <linkId value="recentSpecificObservation" />
      <text value="Please select the most recent glucose observation" />
      <type value="reference" />
    </item>
    <item>
      <extension url="http://hl7.org/fhir/StructureDefinition/questionnaire-referenceResource">
        <valueCode value="QuestionnaireResponse" />
      </extension>
      <extension url="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-lookupQuestionnaire">
        <valueCanonical value="https://fhir.telstrahealth.com/fastforms/Questionnaire/hacc" />
      </extension>
      <linkId value="haccFunding" />
      <text value="Additional funding information" />
      <type value="reference" />
    </item>
  </item>
</Questionnaire>

view this post on Zulip Brian Postlethwaite (Dec 06 2021 at 03:39):

Note that the first item is after an Observation to reference, but the definition indicates that you can use the Questionniare to capture that data and extract to the obs...

view this post on Zulip Brian Postlethwaite (Dec 06 2021 at 03:40):

Also note that https://hl7.org/fhir/R4/extension-questionnaire-referencefilter.html can be used to filter down, however I'm not sure that the definition of that filter is adequate - should create a jira tracker to clarify that? i.e. handlebars syntax and what real values should be there...

view this post on Zulip Lloyd McKenzie (Dec 06 2021 at 04:05):

Ok. Then in all cases the reference is to a Questionnaire. The only special note that would be required is saying that the result is generally extracted to create the target resource, the only exception being if the target resource is a QuestionnaireResponse. (The existing wording definitely doesn't convey that, at least not to me...)

view this post on Zulip Brian Postlethwaite (Dec 06 2021 at 04:10):

The canonical is yes, but the text that was saying QuestionnaireResponse, was to the item.reference, not this extension - that's where the confusion slips in.

view this post on Zulip Brian Postlethwaite (Dec 06 2021 at 04:11):

And direct (being the type of the item.reference restiction is QuestionnaireResponse) and indirect (being that you need to convert from the QR to the target reference type)

view this post on Zulip Brian Postlethwaite (Dec 06 2021 at 04:11):

Does that sound like the intent of the tracker?

view this post on Zulip Lloyd McKenzie (Dec 06 2021 at 04:17):

Ok, I can work with that understanding.

view this post on Zulip Brian Postlethwaite (Dec 06 2021 at 04:23):

So still going to change from a uri/url extension to a canonical right?

view this post on Zulip Lloyd McKenzie (Dec 06 2021 at 04:35):

y

view this post on Zulip Paul Lynch (Dec 06 2021 at 14:37):

Brian Postlethwaite said:

Also note that https://hl7.org/fhir/R4/extension-questionnaire-referencefilter.html can be used to filter down, however I'm not sure that the definition of that filter is adequate - should create a jira tracker to clarify that? i.e. handlebars syntax and what real values should be there...

Please do. It is not at all clear how to use that extension.

view this post on Zulip Paul Lynch (Dec 06 2021 at 14:40):

So, if you have a item.reference to an Observation, and use the lookupQuestionnaire extension, is the assumption that the $extract on the Questionnaire would only result in a single Observation being extracted?

view this post on Zulip Lloyd McKenzie (Dec 06 2021 at 15:23):

That's certainly my assumption

view this post on Zulip Lloyd McKenzie (Dec 06 2021 at 15:23):

It's a Questionnaire specifically designed to result in an instance of the desired resource.


Last updated: Apr 12 2022 at 19:14 UTC