Stream: questionnaire
Topic: Referring to Questionnaire without a canonical?
Jean Duteau (Nov 10 2020 at 17:56):
I have a system that records the QuestionnaireResponses and I want to record the link to the Questionnaire using the Questionnaire's Identifier instead of a canonical (that is how it is recorded in the Database). Is there some way other than using an extension to do this? (I suppose I'm asking if there is someway to convert an Identifier into a canonical?). Why is this element only a canonical and not also a Reference(Questionnaire)?
Lloyd McKenzie (Nov 10 2020 at 17:58):
It's canonical because the expectation is that it will be resolved the same as other canonicals - could be on your server, one of your favorite registries, some central registry, or worst case by resolving the URL. As well, the URL might specify a business version. Reference doesn't know how to handle any of that. It can't do business version and has to point to a specific resource on a specific server.
Lloyd McKenzie (Nov 10 2020 at 17:58):
If you wanted to use identifier instead, you'd have to use an extension. Whether you can convert from identifier to canonical depends on the conventions of whoever authored the questionnaire. There's no formal expectation that would work.
Jean Duteau (Nov 10 2020 at 18:00):
I understand the use of canonical, but I was wondering why we didn't also include a Reference which would allow for logical references to the Questionnaire.
Lloyd McKenzie (Nov 10 2020 at 19:33):
The same reason we don't allow Reference anywhere else we have canonical (e.g. elements pointing to value sets, value sets, types pointing to profiles, etc. We don't want the references to be server-specific.
Brian Postlethwaite (Nov 11 2020 at 09:51):
Can't we put the explicit full url to the questionnaire in there?
Lloyd McKenzie (Nov 11 2020 at 14:06):
Canonical needs to correspond to Questionnaire.url. It's fine (and good) if that url resolves to the Questionnaire but it's not required
Brian Postlethwaite (Nov 11 2020 at 18:52):
That's what I was suggesting, so the QuestionnaireResponse.Questionnaire can contain the full URL to the Questionnaire, which I think is what Jean was asking for?)
Jean Duteau (Nov 11 2020 at 19:31):
No, unfortunately my Questionnaires aren't referenceable by a URL. They have an identifier so I was going to use a logical reference to identify the questionnaire. Our system is using FHIR as an exchange format but we not as the actual exchange so we don't have URLs. I've gone to using an extension to share the Questionnaire identifier, but it still seems strange that we only allow a Canonical and not a Reference.
Brian Postlethwaite (Nov 11 2020 at 21:17):
the URL doesn't need to resolve, so you can define a canonical based on your identifier can't you?
Brian Postlethwaite (Nov 11 2020 at 21:18):
http://example.org/Questionnaire/1234
(where 1234 is your identifier, and the other stuff you can make up that would match to like a system namespace)
Ken Sinn (Jan 12 2021 at 04:01):
We are running into a similar issue, though from a different perspective.
We are referencing Questionnaires in our QuestionnaireResponse.questionnaire by the canonical URL with the appropriate canonical version.
The canonical version of the electronic Questionnaire (e.g. v 1.3.0) does not map directly to the business identifier of the physical form, e.g. MyForm-20210111v1.pdf
As such, we need a way for QuestionnaireResponse.questionnaire to indicate both the canonical of the electronic form (which works fine) as well as a secondary identifier for the Questionnaire. While in theory, the Questionnaire's canonical URI should be resolvable to determine the identifier, we are using the canonicals as unique identifiers and Questionnaire will not be resolvable. It also saves the QuestionnaireResponse recipient an extra hop/call to determine what the original paper form identifier was.
SDC currently prescribe use of QuestionnaireResponse.questionnaire.display. Is there any reason we shouldn't use QuestionnaireResponse.questionnaire.identifier to convey the business identifier for the questionnaire? Does it necessarily need to be an extension on QuestionnaireResponse.questionnaire?
Lloyd McKenzie (Jan 12 2021 at 04:19):
QuestionnaireResponse.questionnaire.display is an extension. If were to add 'identifier' that would also have to be an extension as the canonical type is a simple data type with just a value. You could submit a change request for us to add it, but my leaning would be to make it optional, not mustSupport, as systems should always use canonicals rather than business identifiers.
Ken Sinn (Jan 12 2021 at 04:37):
I imagine this may also help @Jean Duteau's issue, and may be a common use case. Happy to use an extension for now and make the change request, so at least there is a consistent way to identify a business ID for a referenced questionnaire without having to go to the source (if available).
Brian Postlethwaite (Jan 12 2021 at 10:10):
You need the source for most things anyway, so don't know what you're gaining here. Can't validate without it, can't render without it. Can't extract without it...
Lloyd McKenzie (Jan 12 2021 at 16:55):
You should be able to render without it - the QuestionnaireResponse contains question text and answer, which is good enough for 'simple' rendering of a completed form. However, you can't complete a form without retrieving the Questionnaire.
Last updated: Apr 12 2022 at 19:14 UTC