Stream: implementers
Topic: Questionnaire
Grahame Grieve (Mar 15 2016 at 09:19):
Lloyd, while we were in Orlando, we talked about reorganising the way choice values work, so you could specify a choice of values of any kind, not just code. Is that going to happen for Montreal?
Brian Postlethwaite (Mar 15 2016 at 09:49):
A change was made to be able to have choice with a local set of options, and not require the use of ValueSet, but I assume this is something else?
Grahame Grieve (Mar 15 2016 at 09:50):
yeah we agreed that it would make sense to allow you to pick from a choice of e.g. quantities, not just coded values
Brian Postlethwaite (Mar 15 2016 at 09:52):
ok, so option would be able to be Coding or Quantity (maybe others)
Brian Postlethwaite (Mar 15 2016 at 09:53):
Now that I think about that, I would definitely use that.
Brian Postlethwaite (Mar 15 2016 at 09:53):
could then have options with valueString results (or even ValueBoolean).
Grahame Grieve (Mar 15 2016 at 09:54):
yes. that was our discussion. I think it's solid. Just wanted to make sure it hasn't been forgotten
Brian Postlethwaite (Mar 15 2016 at 09:55):
Would it be able to mix for the one question?
Grahame Grieve (Mar 15 2016 at 09:55):
mix types? please no
Brian Postlethwaite (Mar 15 2016 at 09:55):
which is what can happen if you have an open-choice type selected anyway,
Brian Postlethwaite (Mar 15 2016 at 09:55):
With that type the Answer could be either a valueCoding, or valueString
Brian Postlethwaite (Mar 15 2016 at 09:56):
Having trouble considering other cases though.
Grahame Grieve (Mar 15 2016 at 10:01):
what dosage do you choose? system only allows a few dosages
Brian Postlethwaite (Mar 15 2016 at 10:06):
that's cool, I meant examples where mixing types for a single question could be useful.
Brian Postlethwaite (Mar 15 2016 at 10:06):
I know there are heaps of examples for using other types than code/string...
Lloyd McKenzie (Mar 15 2016 at 12:22):
@Grahame Grieve It hasn't been forgotten. We've been waiting for Denise to join one of the SDC calls to discuss. Hope to approve it there in the next couple of weeks, then take it to PC to approve
Jon Zammit (Mar 16 2016 at 15:10):
@Lloyd McKenzie I was wondering if we could revisit the topic of Questionnaire.item.required defaulting to false and whether this is appropriate. I am under the impression that generally speaking, questions on forms are required. I understand there may be a technical reason for setting the default to false?
Mat Coolidge (Mar 16 2016 at 15:20):
In our implementations of questionnaires (patient entered), none of the questions are required.
Mat Coolidge (Mar 16 2016 at 15:21):
We do require groupings of questions to be answered for actions to take place, like scoring, but we always allow patients to skip questions they dont understand or want to answer.
Jon Zammit (Mar 16 2016 at 15:25):
Thanks @Mat Coolidge . Good to know. I was speaking about the clinical forms I am familiar with in the pathology and radiology space, which are not patient entered. In your case, I believe you could set required = true at the group level and the nested content would inherit the setting.
Grahame Grieve (Mar 16 2016 at 20:46):
we would be extremely reluctant to default something to true. I cannot imagine what circumstance would bring us to that. And I don't think questions should default to required
Brian Postlethwaite (Mar 16 2016 at 23:35):
I too think that the defaulting of required to true would be misleading. That should be very explicit to the renderers.
Lloyd McKenzie (Mar 16 2016 at 23:58):
General convention used most places (and supported in most development languages) is that uninitiated booleans have a value of "false". And defaults should generally be what shows up automatically in an uninitiated value.
Jon Zammit (Mar 21 2016 at 17:20):
@Brian Postlethwaite sorry I'm not seeing what's misleading about it?
Grahame Grieve (Mar 21 2016 at 20:11):
pure technical issue - defaulting integer to anything other than 0 and boolean to anything other than false is technically misleading.
Grahame Grieve (Mar 21 2016 at 20:11):
some implementation environments don't even track the difference between null and 0 or false
Jon Zammit (Mar 22 2016 at 11:42):
Thank you all for your feedback. This is helpful.
Mat Coolidge (Mar 22 2016 at 19:23):
Anyone know of any open source tools for rendering questionnaires?
Grahame Grieve (Mar 22 2016 at 19:25):
there's a transform in the xml tools reference implementation
Jon Zammit (Mar 22 2016 at 19:30):
Has it been updated recently? I tried on March 8 and it didn't seem to render much if any of the content in our most recent questionnaire instance. I had better luck when I tested this in the Spring of 2015.
Grahame Grieve (Mar 22 2016 at 19:32):
possibly not, actually. @Lloyd McKenzie can comment further
Lloyd McKenzie (Mar 22 2016 at 21:06):
It's been updated to the point where it runs, but I'm actively working on it right now to make it more capable/not as ugly.
Brian Postlethwaite (Mar 23 2016 at 00:21):
You can use our renderer to test your questionnaires (and report issues to us)
http://smartq.azurewebsites.net/Home/Survey?SuppressNav=true&questionnaireId=http://sqlonfhir-dstu2.azurewebsites.net/fhir/Questionnaire/demo-scoring
Then just replace the QuestionnaireID with your own
This is a complete javascript implementation (and only DSTU2 at present)
Brian Postlethwaite (Mar 23 2016 at 00:21):
Will have an updated version for the May connectathon compatible with the May release
Chris Grenz (Apr 13 2016 at 19:05):
@Lloyd McKenzie Is there a current extension to indicate the element in a resource that should be populated by a question/item? I.e., if I have an item that asks for patient gender, how do I link that to Patient.gender?
Chris Grenz (Apr 13 2016 at 19:07):
More generally, is there a preferred way to reference an element of a resource? For example, if I want to create a Provenance with a target of a particular element of a resource (something like: target/reference = "Patient/1/_history/2#gender" which I realize isn't ok...)?
Chris Grenz (Apr 13 2016 at 19:08):
And one more wrinkle...can I reference a named slice (Patient/1/_history/2#maritalStatus.SNOMED if I slice the coding for SNOMED)?
Lloyd McKenzie (Apr 14 2016 at 00:14):
@Chris Grenz Right now, the answer is "no" - at least not directly. There's an extension for Questionnaire.item that lets you point to a DataElement instance. The DataElement instance can in turn have a mapping. SDC currently constrains the list of mapping options to SPARQL, SQL and XQuery. However, there's some possibility we'll extend that to include CQL (ideally once they've got a mime type). That would give you access to FluentPath. I don't know that FluentPath lets you reference a slice though. Doing so would require knowledge of a specific profile.
PatientCare has agreed to add an extension that allows you to specify a mapping directly within a Questionnaire (as well as to include a pointer to a StructureMap which could contain such mappings). My expectation is that SDC will constrain both to the same mapping languages as we use within DataElement. If you're not being SDC-conformant, you're free to use any language you like, so long as it has a mime type.
Chris Grenz (Apr 14 2016 at 16:47):
Is there anywhere else that we're creating a reference to an element of a resource instance?
Mat Coolidge (Apr 14 2016 at 17:56):
Do you meean the linkId?
Brian Postlethwaite (Apr 15 2016 at 04:27):
@Chris Grenz we have a custom implementation of populate and extensions that does exactly what you are referring to.
We put an extension on the group/question level that indicates a fhir query to run.
Then on the question, you put a fluentpath expression to indicate what to pull out of the results of that query.
Has worked really good for us so far.
Brett Esler (Apr 15 2016 at 05:15):
@Chris Grenz I've been working with @Brian Postlethwaite implementing $populate with these Questionnaire embedded search and select extensions against multiple FHIR EHR implementations i'm running - very simple to understand; but need some reliance and assurance of profiles in use to make it effective... this is a good candidate for some shared code implementing a naive population routine for example against the dotnet C# models and fluentpath implementation.
Chris Grenz (Apr 15 2016 at 14:19):
@Brian Postlethwaite @Brett Esler Thanks for the insight. One of my concerns with fluentpath as I understand it is that it doesn't have any capability to consider a particular profile when navigating. So, if my profile has sliced Patient.identifier with slices for SSN and MRN, I can't use that definition in a fluentpath expression. This is of course good in some sense since I'm not dependent on profiles for navigation, but it's a barrier to adoption of the FHIR metamodel as a reflection of our clinical data model. That's outside our discussion here mostly, but I was hoping to be able to:
Chris Grenz (Apr 15 2016 at 14:19):
(deleted)
Chris Grenz (Apr 15 2016 at 14:23):
(neglecting proper syntax)
Chris Grenz (Apr 15 2016 at 14:23):
reference: "Patient/123" profile: "http://example.com/my.profile" elementId: "Patient.MRN"
Chris Grenz (Apr 15 2016 at 14:26):
vs.
Chris Grenz (Apr 15 2016 at 14:26):
reference: "Patient/123" expression: "identifier.where(use = 'usual' and system = 'http://example.com/my.id.system')
Lloyd McKenzie (Apr 15 2016 at 21:51):
We will in OrderSet/Protocol (linking activities). I can't think of anywhere else off the top of my head
Brian Postlethwaite (Apr 16 2016 at 01:07):
That second syntax is what the resource would look like. The profile is just used to describe it for validation, it doesn't change the wire format of the content.
So the expression you have second is correct from the fluent path perspective, and what I would expect to see.
Lloyd McKenzie (Apr 17 2016 at 14:32):
We will in OrderSet/Protocol (linking activities). I can't think of anywhere else off the top of my head
Grahame Grieve (Apr 17 2016 at 20:58):
why not
Patient.slice("MRN").value
Lloyd McKenzie (Apr 17 2016 at 22:58):
How is the profile the slice is based on asserted?
Grahame Grieve (Apr 17 2016 at 22:59):
well, from my point of view, it could be explicit or implicit. though it would have to be asserted somehow
Lloyd McKenzie (Apr 17 2016 at 22:59):
I'm nervous about implicit
Grahame Grieve (Apr 17 2016 at 22:59):
why?
Lloyd McKenzie (Apr 17 2016 at 23:00):
Because it's easy for implicit links to get lost when you pass things around.
Grahame Grieve (Apr 17 2016 at 23:09):
ummm, I think you're thinking about it wrong there. the link is between the profile and the expression, not necessarily the instance
Grahame Grieve (Apr 17 2016 at 23:09):
it's about how you host it
Lloyd McKenzie (Apr 18 2016 at 01:15):
But the expression is in an instance. And I'm nervous if there isn't a standard place to find the profile
Grahame Grieve (Apr 18 2016 at 03:57):
how do you know that the expression is in an instance?
Grahame Grieve (Apr 18 2016 at 03:58):
you're jumping to conclusions - we're just talking about a language feature, and you're trying to make rules based on assumptions about deployment
Lloyd McKenzie (Apr 18 2016 at 04:04):
Well, in this thread, we're talking about Questionnaire, so at least in this particular space, there'll be an instance. I understand the solution may be different for CQL and other uses. But I'm hoping that at least when we're planning to use this within a FHIR instance, there'll have to be an explicit reference to the profile.
Chris Grenz (Apr 18 2016 at 14:59):
@Brian Postlethwaite I'm concerned about
The profile is just used to describe it for validation, it doesn't change the wire format of the content.
as that's not at all how we're viewing profiles. They are also a perspective by which to view a resource. They may also be a way to describe a selection (query) in a defined way that is congruent with the other uses. Agree with @Grahame Grieve line of thought here...
Bryn Rhodes (Apr 18 2016 at 19:40):
So there is tooling that Claude is working on that supports generating profile-based interfaces that sit on top of the HAPI objects and make the objects "look" like the profile, so you can just access MRN directly in this case. CQL and FluentPath should be able to take advantage of that interface, but it would need to be part of the setup somehow.
Bryn Rhodes (Apr 18 2016 at 19:40):
As I understand it it's Java-specific now, but can be generalized to other clients as well.
Brian Postlethwaite (Apr 18 2016 at 20:23):
Correct me if I'm wrong @Chris Grenz , your use of the profiles doesnt change the wire format, it just filters some content out doesn't it?
Grahame Grieve (Apr 18 2016 at 20:34):
Bryn, I'll think about that. that's actually an implicit transform from the profile to a matching logical model, and you can use fluent path against the logical model
Grahame Grieve (Apr 18 2016 at 20:35):
but profiles are slippier than types because more than one can apply, and you might choose which to use in different places in your application.
Chris Grenz (Apr 19 2016 at 20:02):
Hi Brian - depends on how you use the profile. We can use a profile to:
- Validate a resource
- Search for a resource (that would validate)
- Secure a resource (grant CRUD rights to different profiles)
- "Trim" the resource to allowed or requested elements
- Govern the merging of a patch onto an existing resource
- Create a "profiled" version of the resource where the wire format of the resource reflects the profile (makes "homeAddress", a slice of Patient.address a first class element.
Chris Grenz (Apr 19 2016 at 20:03):
@Brian Postlethwaite
Chris Grenz (Apr 19 2016 at 20:05):
We're creating an enterprise ontology of profiles that align with business concept models and we don't want to lose the business distinctions as we build on those profiles. So, when we define a type (based off Identifier) for our MRN and slice the Patient.identifier accordingly, we'd like to maintain that abstraction as we refer to MRN elsewhere.
Grahame Grieve (Apr 19 2016 at 20:11):
that's what ElementDefinition.mapping is for - that kind of usage
Chris Grenz (Apr 19 2016 at 20:16):
@Grahame Grieve Related to questionnaire, if I want an item to populate a Patient MRN, the definition of which is in a profile, how would I use mapping to refer to that? I was thinking something like http://example.com/My-Patient-Profile#MRN
but looking for a better idea
Brian Postlethwaite (Apr 19 2016 at 21:50):
In our implementation, we don't use the profiled syntax in the fluentpath expression for the extract, we just use the explicit definition from the base resource. Then the processor doesn't need to know about the profile in order to use it (as it likely won't be from our fhir server)
Chris Grenz (Apr 20 2016 at 01:05):
@Brian Postlethwaite Agree that would be preferable in many cases, but not all. I'm thinking of proposing the following as related to this situation and others:
Defining (and requiring) elementdefinition.id as a combination of path + name as here:
<element id="code.SNOMED.code"> <path value="Observation.code.coding.code" /> <name value="SNOMED.code" /> ... snip ... </element>
This would give every element in a profile (including inherited ones such as those within a complex type) a unique id referencable using the anchor notation (http://example.com/fhir/StructureDefinition/my-observation-profile#code.SNOMED.code
). This would also work just fine with "vanilla" resources (http://hl7.org/fhir/StructureDefinition/Patient#identifier
).
I can see the benefit of fluentpath expressions here, but there's some tension between the two approaches. Profiles are firmly in place to describe the structure of a resource including naming specializations of existing elements. It seems to me that we shouldn't be promoting an alternate syntax/method for this. A questionnaire may certainly have dependencies to comprehension (including profiles for the questionnaire itself or referenced resources)...this doesn't seem a special case.
Brian Postlethwaite (Apr 20 2016 at 01:09):
In my case when auto-populating Questionnaires from FHIR resources, there is not always a 1.1 mapping, and in many forms you'll find things like Dr's Name (not as individual fields) and these can't be handled using element definitions, so the fluentpath expression is the only real way to do this cleanly.
Brian Postlethwaite (Apr 20 2016 at 01:10):
As for taking content FROM the Questionnaire and populate resources, wouldn't suggest the fluentpath approach (maybe)
Chris Grenz (Apr 20 2016 at 01:10):
Yes, that's my use case...from the Questionnaire to the resource.
Brian Postlethwaite (Apr 20 2016 at 01:10):
Its a very different process to extract into and out of the questionnaire form
Brian Postlethwaite (Apr 20 2016 at 01:10):
Then I think we are in agreement here then.
Brian Postlethwaite (Apr 20 2016 at 01:11):
Still have the cases to deal with where we want to extract the "Dr John Smith" single field into the resource.
Chris Grenz (Apr 20 2016 at 01:11):
Does fluentpath support string construction (concatenation of fields)?
Brian Postlethwaite (Apr 20 2016 at 01:12):
Sure does.
Chris Grenz (Apr 20 2016 at 01:12):
I might be back a few versions...
Brian Postlethwaite (Apr 20 2016 at 01:12):
Practitioner.name.given.item(0) + ' ' + Practitioner.name.family.item(0)
Brian Postlethwaite (Apr 20 2016 at 01:13):
Just happened to have this one handy ;)
Chris Grenz (Apr 20 2016 at 01:13):
Fair enough...best solution might be to add the ability to reference a particular profile in fluentpath as @Grahame Grieve mentioned above..
Chris Grenz (Apr 20 2016 at 01:13):
That way the profiles are accessible if desired for resource->questionnaire.
Brian Postlethwaite (Apr 20 2016 at 01:14):
My problem with doing this is that requires all systems that want to populate to then have the profile (which may not be in there server)
Chris Grenz (Apr 20 2016 at 01:14):
Right...that would need to be considered by the implementer.
Brian Postlethwaite (Apr 20 2016 at 01:14):
Our use cases are that the central referral forms are auto-populated using smartonfhir from any other fhir server.
Chris Grenz (Apr 20 2016 at 01:15):
If your business case requires a resource of a particular profile as a pre-requisite, then it would be acceptable.
Chris Grenz (Apr 20 2016 at 01:15):
Sure. Our use cases are much more specific to our enterprise.
Brian Postlethwaite (Apr 20 2016 at 01:16):
Which is the extracting content from the questionnaire response into your system, and that makes sense to me how you're describing it.
Brian Postlethwaite (Apr 20 2016 at 01:16):
(and from our discussions in Orlando too)
Mat Coolidge (May 05 2016 at 19:21):
can I use this extension http://hl7.org/fhir/DSTU2/extension-questionnaire-enablewhen.html for some with an OR statement
Mat Coolidge (May 05 2016 at 19:21):
like this questions answer is 1 or 2
Mat Coolidge (May 05 2016 at 19:47):
could I add a comparision operatior extension to each?
Lloyd McKenzie (May 05 2016 at 19:53):
The behavior is that multiple occurrences of the extension are treated as "or". If you want to get into more complex logic (1=a and 2=c) or (1=b and 2=d), then we're going to be looking at FluentPath/CQL. (Note that enableWhen is moving into core as part of STU 3 and there will also be a standard extension for embedding FluentPath for more complex behaviors.)
Brian Postlethwaite (May 05 2016 at 20:34):
:) Can't wait!
Brian Postlethwaite (May 05 2016 at 20:35):
Looking forward to showing off the validation using fluentpath...
Mat Coolidge (May 06 2016 at 18:18):
We are reworking our patient entered data application to be 100% fhir
Mat Coolidge (May 06 2016 at 18:18):
pretty excited!
Brian Postlethwaite (Jul 25 2016 at 06:24):
Can anyone explain what the purpose of the extension http://hl7.org/fhir/StructureDefinition/questionnaire-fhirType
is over the item.type
property?
Lloyd McKenzie (Jul 25 2016 at 06:26):
Extension Grahame uses to capture the FHIR data type (e.g. Address) associated with a question or group. He uses it when he's generating Questionnaires from profiles to help parse the data back into the proper resource from the QuestionnaireResponse.
Lloyd McKenzie (Jul 25 2016 at 06:27):
(At least that's my recollection.)
Brian Postlethwaite (Jul 25 2016 at 11:51):
Thanks Lloyd
Torbjörn Dahlin (Feb 28 2017 at 08:59):
Hi!
Torbjörn Dahlin (Feb 28 2017 at 09:02):
Is it possible to get in contact with the group working on Questionnaire? We are looking at different options for a national wide initiative in this area in Sweden and even if the maturity level is low on this resource it could still be a viable option (these kind of projects move slowly).
Grahame Grieve (Feb 28 2017 at 10:51):
we're all here....
Torbjörn Dahlin (Feb 28 2017 at 10:56):
Not like working with ISO-standardization then :)
Our rather vague question is if there are any planned major changes we should be aware of in the near future. In the build there was a comment about aligning the resource with definition workflow? (we understand that the maturity level is low and that we should expect that a future release might not look anything like the current DSTU or build-version.
Lloyd McKenzie (Feb 28 2017 at 16:10):
Alignment with workflow hasn't happened for this resource. It sort of got missed in the transition in ownership between work groups. It's unlikely this will be fixed prior to the STU 3 release publication, though I suppose there's a chance. The main changes will be adding some additional relationships and renaming or refactoring a couple of existing relationships. No changes expected that shouldn't be straightforward to map.
Marco de Luca (Mar 01 2017 at 08:23):
I am doing some research about the ”Questionnaire/QuestionnaireResponse” and are looking for some examples including the:
- Questionnaire core extensions
- Element extensions
- Structured Data Capture Questionnaire profile
Also if there is a test server available on internet containing some Questionnaire templates would be most valuable!
Patrick Werner (Mar 01 2017 at 15:25):
@Marco de Luca on this page: https://medical-data-models.org 10.000 medical forms are collected and downloadable as FHIR (DSTU2) Resources
Marco de Luca (Mar 01 2017 at 15:32):
@Patrick Werner Great, thanks! Will the site allow me to look at the REST resource (JSON/XML format)?
Patrick Werner (Mar 01 2017 at 15:36):
it allows you to download the Questionnaire resource in JSON or XML . If you like to play with Questionnaires via a true FHIR REST Interface just use the public testservers. e.g. https://fhirtest.uhn.ca/baseDstu2/Questionnaire, or STU3: https://fhirtest.uhn.ca/baseDstu3/Questionnaire
Patrick Werner (Mar 01 2017 at 15:36):
we also have some Questionnaires on our Server in Heilbronn: https://fhir.gecko.hs-heilbronn.de/baseDstu2/Questionnaire
Marco de Luca (Mar 01 2017 at 15:58):
@Patrick Werner Perfect!
Brian Postlethwaite (Mar 01 2017 at 22:15):
We have a DSTU2 questionnaire test facilty at http://smartq.azurewebsites.net
which you can try out questionnaires, and if you want to try questionnaires on other servers, just change the URL in your browser, it also supports QuestionnaireResponses.
Viswam Devireddy (Mar 06 2017 at 21:42):
Hi, We are implemeting a health portal where the users can login and complete the Health Surveys (like PHQ9, GAD7) etc. There will be a 3'rd party system which will allow us to redirect the users to their portal to fill the surveys, we are expecting the HL7 QuestionnnaireResponse XML/JSON resource to be sent back by the 3'rd party system and upon recieving this we need to store the response in the DB. Currently I'm analyzing on how to store the surveys in the DB and which DB (Sql Vs NoSql DB) is preferred. If you have any suggestions, please let me know. Thanks..
Lloyd McKenzie (Mar 06 2017 at 22:12):
There are lots of FHIR production systems with each approach. Each approach has different trade-offs in terms of what types of queries they can perform efficiently and complexity of managing serialization/deserialization. There's not a single "right" answer that's driven by what resource you're storing.
Marco de Luca (Mar 09 2017 at 10:29):
Anyone have developed a "simple" JS testclient like AngularJS that supports Questionnaire to share :)
Chessler (Mar 22 2017 at 16:52):
Hello, I am attempting to implement a module which transforms our Questionnaire data to the FHIR standard and I have a few questions about the conditionality of appearance of questions within a questionnaire.
Situation right now:
A question has one or more conditions defined as: [answer] [operator] [conditional value] (e.g. 10 > 20) - meaning anything above 20 would be valid.
How would one use FHIR 3.0's "enableWhen" for such scenario's? Or even more specific if there's a range of integers that would be valid, like 20-40? Would I have to define 20 entries in "enableWhen"? I cannot find properly documented information about this.
Please excuse me if my question is trivial or this is not the correct place to ask. I'm very new to the "FHIR community"..
Lloyd McKenzie (Mar 22 2017 at 17:05):
@Chessler There's an extension defined by CQIF that allows you to use FHIRPath to define the rules: http://hl7.org/fhir/StructureDefinition/cqif-condition
Lloyd McKenzie (Mar 22 2017 at 17:06):
It was supposed to get moved under enableWhen, but I guess that didn't happen. As well, there are some context variables that would need to be defined for some expressions to better let you "find" the question of interest.
Lloyd McKenzie (Mar 22 2017 at 17:06):
Other than that, you could also look at having extensions on Questionnaire.item.enableWhen
Chessler (Mar 22 2017 at 17:10):
@Lloyd McKenzie I guess i'll have to dive into extensions. Thank you for helping me on my way!
Bryn Rhodes (Mar 23 2017 at 01:16):
@Lloyd McKenzie, you can use the more generic http://hl7.org/fhir/cqif/extension-cqif-cqlexpression.html or http://hl7.org/fhir/cqif/extension-cqif-fhirpathexpression.html extensions to provide logic for enableWhen.
Bryn Rhodes (Mar 23 2017 at 01:16):
Those extensions can be used on any element.
Lloyd McKenzie (Mar 23 2017 at 03:29):
Thanks Bryn.
Lloyd McKenzie (Mar 23 2017 at 03:30):
Out of curiousity, what's the need for cqif-condition given the existence of the other?
Marco de Luca (Mar 31 2017 at 13:02):
Hi,
looking for examples of the new STU3 Questionnaire format. Code examples or a id reference on the http://fhirtest.uhn.ca/baseDstu3/Questionnaire would be most appreciated!
Thanks!
Lloyd McKenzie (Mar 31 2017 at 15:28):
There are several examples in the spec itself - you can post them to the HAPI server if they haven't already been loaded
Michael van der Zel (May 24 2017 at 10:41):
Who knows what fhir test server implements the $questionnaire operation? Thanks.
Sunanda Veeraganti (May 24 2017 at 11:34):
there are some server urls shared previously. if this is what you are looking for DSTU2 : https://fhirtest.uhn.ca/baseDstu2/Questionnaire
STU3: https://fhirtest.uhn.ca/baseDstu3/Questionnaire
https://fhir.gecko.hs-heilbronn.de/baseDstu2/Questionnaire
DSTU2 :http://smartq.azurewebsites.net
Brian Postlethwaite (May 24 2017 at 20:43):
$questionnaire operation?
(nothing here http://hl7.org/fhir/questionnaire-operations.html)
Grahame Grieve (May 26 2017 at 21:17):
my server does as a custom extension while we try it out. It's not decided whether to add it to the spec or not.
Grahame Grieve (May 26 2017 at 21:18):
the $questionnaire operation builds a questionnaire from a profile
Michael van der Zel (May 26 2017 at 23:20):
@Brian Postlethwaite It's here: https://www.hl7.org/fhir/structuredefinition-operations.html
Michael Lawley (Jun 02 2017 at 11:24):
ah, interesting, I always wondered why Questionnaire was not an extension of StructureDefinition, because then you could see the QuestionnaireResponse as a "real" instance, but I guess there's some advantages to the indirection as long as the promise of the OpenIssue about converting QuestionnaireResponses is resolved :)
@Grahame Grieve does your server implement this using the mapping language?
Lloyd McKenzie (Jun 02 2017 at 14:57):
Mappings of QuestionnaireResponses would have to be specific to each individual Questionnaire
Grahame Grieve (Jun 02 2017 at 21:37):
no it doesn't use the mapping language - the implementation long precedes the concept of the mapping language
Karol Siwek (Jun 30 2017 at 09:35):
Hi, We're implementing bunch of calculators on our side, we'll use Glasgow Coma Score as one of them. The examples you've provided are very usefull, we really appriciate it, but we're not sure how to store the total score of GCS (as this is the most important result). we'd like to use QuestionnaireResponse but there seems to be no proper field for such result. We're thinking about creating a custom extension, or putting this information somewhere into meta, what do you think?
second issue is that, we'd like to have some forms with multiple choice and some with a single choice. In DSTU1 there was a proper extension for that: https://hl7.org/fhir/DSTU1/questionnaire-extensions.html "answerFormat", but now we're not sure how to do that. Should we use "questionnaire-minOccurs" and "questionnaire-maxOccurs" for that? how to use extension for objects in array as it is in Questionaire
Grahame Grieve (Jun 30 2017 at 13:00):
@Lloyd McKenzie I think this is for you
Lloyd McKenzie (Jun 30 2017 at 14:44):
The overall score could be represented as valueInteger or valueCodeableConcept. (The latter could use the iso21090-CO-value extension to convey the numeric value.) To indicate whether a question can only have a single answer or multiple answers, use item.repeats.
Karol Siwek (Jul 03 2017 at 07:49):
(deleted)
Karol Siwek (Jul 03 2017 at 07:49):
thank you :)
Alex Goel (Jul 04 2017 at 15:10):
@Lloyd McKenzie We've done the multiple choice and single choice that @Karol Siwek describes with "questionnaire-minOccurs" and "questionnaire-maxOccurs" should we also be using item.repeats?
Lloyd McKenzie (Jul 04 2017 at 15:29):
Yes. The minOccurs and maxOccurs extensions let you set specific count limits, but not everyone will recognize those. Questionnaire.item.repeats is something pretty much everyone should recognize.
Alex Goel (Jul 04 2017 at 15:36):
thanks!
Frank Oemig (Sep 06 2017 at 16:44):
hello, I am trying to use the Questionnaire resource to represent some questionnaires that are used in Germany for QA. How can I enforce that the at least one of two items are populated with data? How to use "quarters of a year", eg. the 3rd quarter of 2017? Is it best to use a regex on a string? How to represent complex rules to verify the consistency of data? It appears to me that enableWhen is not sufficient? thank you
Eric Haas (Sep 06 2017 at 17:25):
invariants will enforce that either A and/or B element are present. For quarters have you considered codes?
Lloyd McKenzie (Sep 06 2017 at 18:34):
In a questionnaire, you can capture invariants using https://www.hl7.org/fhir/cqif/cqif-questionnaire-definitions.html#Questionnaire.item.extension:condition. However, there are some kinks that need to be worked out around how to navigate the Questionnaire model using FHIRPath. @Bryn Rhodes, have we made any progress on this?
Lloyd McKenzie (Sep 06 2017 at 18:34):
If not, perhaps you and I should take some time to chat about it at the WGM?
Bryn Rhodes (Sep 06 2017 at 18:38):
Yes, that would be a good topic, I've not made any forward progress there, just because it's not been at the top of the list.
Frank Oemig (Sep 06 2017 at 19:25):
discussing some solutions in San Diego would be great. It would be good to have some examples demonstrating some of these features. What we are trying to do is to model the whole QA process, starting with the definition of questionnaires, aggregation into sets of questionnaires for a certain topic, definition of fields (items) with the possibility of reuse (ie. define once and use in multiple questionnaires eg. asking certain questions), complex rules (eg. validation that in a list of values (eg. repeating a diagnosis field) to ensure that at least one value is part of a specific value set, or all values, or none, complex cross references, calculation of values, adding additional information to help initializing the values (eg. using code), and transformation into different output formats (logical models?). We have identified a lot of stuff that could improve what we have. Our believe is that the QA process details (ue to the complex German healthcare system) may introduce new aspects - I hope. So, thanks, having some discussions would be good....
Brian Postlethwaite (Sep 06 2017 at 21:08):
I would love to be a part of these discussions, as we've implemented this already (using a different extension, and working great - although currently DSTU2 only, but porting it right now)
Bryn Rhodes (Sep 07 2017 at 04:47):
I'm in San Diego through Wednesday afternoon, we have some examples of the use of logic as part of a Questionnaire, specifically a depression instrument that calculates a score based on responses.
Marco de Luca (Sep 07 2017 at 06:06):
Hello
I am looking for a Questionnaire template editor (like a form designer). I am investigating a solution for a web-based editor(like AngularJS) that supports the Questionnaire resource and the “common” extensions.
Frank Oemig (Sep 07 2017 at 07:42):
Brian, is it possible to post a snippet showing that?
Frank Oemig (Sep 07 2017 at 07:49):
Bryn, same question for you: Could please post a snippet showing the calculation? thx
Stoyan Halkaliev (Sep 07 2017 at 10:27):
Hi Marco, we have an internal Questionnaire Editor / FormDesigner. It is not web based (Delphi EXE using the reference library), but does most of the work. I will polish it a little and will post as freeware next week. If you want you can send me some example questionnaires so I can test them before release.
Grahame Grieve (Sep 08 2017 at 03:21):
I've been meaning to get around to writing a surveymonkey --> questionnaire translator. The survey monkey form builder can do most of the common stuff
Brian Postlethwaite (Sep 09 2017 at 19:07):
our old DSTU2 questionnaire editor can be found here: http://smartq.azurewebsites.net
Brian Postlethwaite (Sep 09 2017 at 19:08):
We are working on a REACT based version of this too, but not complete yet.
Christiaan Knaap (Sep 11 2017 at 18:54):
@Grahame Grieve :shouldn't someone else be able to do surveymonkey -> questionnaire? Or do you just like to do it yourself?
Grahame Grieve (Sep 11 2017 at 19:25):
I'm always happy if someone else wants to do something. And if someone does, there'll (usually) be no reason for me to do it. But I can't tell anyone to do anything
Lloyd McKenzie (Sep 11 2017 at 20:41):
Volunteers are welcome :)
Grahame Grieve (Nov 21 2017 at 06:11):
I't not clear to me how I would insert a 'click here for x' link in a Questionnaire
Grahame Grieve (Nov 21 2017 at 06:11):
or a video or a picture
Grahame Grieve (Nov 21 2017 at 06:14):
and what about making a field required?
Grahame Grieve (Nov 21 2017 at 06:17):
and enableWhen on a calculated value
Lloyd McKenzie (Nov 21 2017 at 16:04):
There's an extension to provide an XHTML rendered text for an item - it could contain a hyperlink or image references. Making a field required would be Questionnaire.item.required. For the last, I've been talking with @Bryn Rhodes on and off about an extension that allows using FHIRPath in enableWhen as an extension. We need to figure out how to properly embed context and allow navigation within the Questionnaire data model though.
Bryn Rhodes (Nov 21 2017 at 17:40):
@Lloyd McKenzie , @Brian Postlethwaite has some great extensions here as well, and has worked out details for at least one approach to establishing context and supporting navgiation. I'd love to see consistent use of all those across SDC, Clinical Reasoning, and the core Questionnaire.
Brian Postlethwaite (Nov 21 2017 at 22:17):
Thanks for the ref here Bryn, I've even documented the custom validation on simplifier
https://simplifier.net/sqlonfhir-stu3/Questionnaire-validation-expression
Although I can't see on there where the context is applied. It is intended to be able to be used at the top level or at any item level. Then this is the context that is applied.
See this example which shows the expression used in both contexts.
http://sqlonfhir-stu3.azurewebsites.net/fhir/Questionnaire/test-option
This approach could also be applied to the enableWhen, would be happy to draft a proposal on simplifier.
Lloyd McKenzie (Nov 21 2017 at 22:51):
My question is whether we should have a Questionnaire-specific extension or whether the notion of "Expression" might be appropriate on any simple data type.
Brian Postlethwaite (Nov 21 2017 at 22:53):
Still need a purpose for the expression, and as with my validation expression, there is other data that is required there too. (expect likely in other cases too)
For the EnableWhen expression, I would also want to include a set of locations (linkIds) that should be change detected, reducing the potential calculations required.
Brian Postlethwaite (Nov 21 2017 at 22:54):
The other one I would like is a score question that evaluates an expression from other questions to get an answer (hopefully in real time) e.g. BMI calculated value on form. (which would then be copied into the appropriate observation of course)
Bryn Rhodes (Nov 21 2017 at 22:56):
@Lloyd McKenzie, clinical reasoning defines an extension that can be used to define an expression on any data type.
Bryn Rhodes (Nov 21 2017 at 22:57):
But there are some ambiguities with evaluation that need to be clarified, a lot of the same issues as @Brian Postlethwaite has resolved with the Questionnaire extensions.
Lloyd McKenzie (Nov 21 2017 at 23:02):
Tackling those is definitely one of my objectives for the new SDC project.
Jose Costa Teixeira (Nov 22 2017 at 06:02):
@Bryn Rhodes some time ago I asked how to convey "here's the logic / criteria you should use to populate a list" and you pointed to CQL (i think in activityDefinition). Is this discussion overlapping it?
Alex Goel (Nov 22 2017 at 16:17):
Tackling those is definitely one of my objectives for the new SDC project.
Hi Lloyd! I'd like to participate in this new project. When/Where can I find more details?
Lloyd McKenzie (Nov 22 2017 at 18:20):
Hi Alex, right now we're in the initial stages. The project proposal will be considered on the FHIR Infrastructure call next Monday. After that, it'll go to a number of other work groups for consideration. Then it'll go to the steering division and FHIR management group and the technical steering committee. So in all likelihood, the project won't actually kick off until January. I'll send out a notice here as soon as we have scheduled times for calls
Bryn Rhodes (Nov 22 2017 at 19:37):
@Jose Costa Teixeira, this discussion only overlaps with that in that they both use an expression language. For the criteria to populate a list, there are potentially lots of ways to do that, you could specify the criteria with an expression extension in a Group, or you could specify it in a Library and reference it from a Measure, and there are others, it depends on the use case.
Jose Costa Teixeira (Nov 22 2017 at 19:49):
Thanks @Bryn Rhodes
Dan Whitfield (Jan 16 2018 at 23:56):
Some question text within a Questionnaire may require emphasis (for example, the question text may need to emphasise that the question is regarding the left or right arm/leg). The question text field has the type 'string', so shouldn't (I assume) contain markdown (if it should, then it would be of the 'markdown' type as per the STU3 Questionnaire.description field).
This leaves me with the thought that an extension would be the best way to provide a markdown 'version' of the question text, whilst still providing the original (non-formatted) text in the Questionnaire.quesiton.text field. Although, I couldn't seem to find an extension that had been defined which would suit this purpose.
Can anyone suggest an extension, or another approach?
Lloyd McKenzie (Jan 17 2018 at 05:09):
There's an extension :) It's actually a generic extension that can be used anywhere we have string - so if you wanted the title of your care plan to include italics, you could (if the rendering system recognized the extension). http://hl7.org/fhir/StructureDefinition/rendering-xhtml
Lloyd McKenzie (Jan 17 2018 at 05:10):
Support for this extension is included as part of the Structured Data Capture profile of Questionnaire - you may find a number of other extensions of interest there too.
Brian Postlethwaite (Jan 17 2018 at 11:12):
That is for xhtml, not markdown. Is that what we're looking for?
Lloyd McKenzie (Jan 17 2018 at 16:17):
Ah, sorry. I don't think we have one for markdown yet, but we could certainly add an equivalent.
Ben Spencer (Jan 17 2018 at 16:46):
http://hl7.org/fhir/extension-rendering-markdown.html ?
Dan Whitfield (Jan 17 2018 at 19:47):
Am I right in saying that http://hl7.org/fhir/extension-rendering-markdown.html is STU3 and not available in DSTU2?
Brian Postlethwaite (Jan 17 2018 at 20:41):
As an extension, can use it in any version of FHIR. Just that other's may not be looking for it yet (as they may not in STU3 either - or R4)
Lloyd McKenzie (Jan 18 2018 at 05:20):
Sorry for misleading. Didn't realize we had that too.
Dan Whitfield (Jan 30 2018 at 00:48):
Is there a way to model calculations in a DSTU2 FHIR Questionnaire, for example, a BMI calculation. But modelling the calculation in such a way that a disconnected client (offline) could still have users filling out a questionnaire and (in the BMI example) changing the height/weight and the BMI question being automatically calculated and updated by the client still?
It looks like in STU3 this would be modelled using Library resources, however, the Library resource is not available in DSTU2 (afaik). I am under the assumption that this kind of calculation can only be modelled with extensions currently?
Lloyd McKenzie (Jan 30 2018 at 02:05):
Even in R3 and R4, calculations would be an extension capability. The expectation is that we'll use CQL (or perhaps a subset of it) for this purpose.
Brian Postlethwaite (Jan 30 2018 at 21:54):
Not FHIRPATH?
Lloyd McKenzie (Jan 30 2018 at 22:01):
FHIRPath doesn't support the use of variables and I think we're going to need those
Lloyd McKenzie (Jan 30 2018 at 22:02):
(CQL includes FHIRPath)
Brian Postlethwaite (Jan 30 2018 at 22:02):
ok, ta
Michael Christensen (Feb 13 2018 at 15:18):
@Bryn Rhodes Do you have an example of using the http://hl7.org/fhir/cqif/extension-cqif-fhirpathexpression.html to provide logic for enableWhen? I fail to understand if it's an extension on the answer[x] part of enableWhen or something else.
Bryn Rhodes (Feb 16 2018 at 17:55):
Hi @Michael Christensen, I'm not aware of an example explicitly for that purpose, though it would be a good one to include if you'd like to submit a tracker. But based on how the extension is applied, you'd put it on one of the answer elements. In order to use it at a higher level than that (like on the enableWhen element itself), the consumer would have to know to look for it there and use the logic to determine the "enableWhen" value.
Ana Kostadinovska (Apr 18 2018 at 08:17):
Hello, I have two questions on the FHIR Questionnaire resource:
1. How to specify the lower and upper boundaries for the expected question response? For example, the value of the answer should be of type 'INT' between '0' and '24'?
2. I would like to be able to create more complex precondition structures. If I create multiple enableWhen elements, the item will be enabled when the condition for any of the repetitions is true. I.e. treat "enableWhen"s as being joined by an "or" clause. How can I concatenate or nest multiple conditions using different logical groupers like and, nor, nand, etc.?
Eric Haas (Apr 18 2018 at 13:23):
Q has min and max extensions see the docs
Lloyd McKenzie (Apr 18 2018 at 14:50):
In R4 as part of Structured Data Capture, we're working on an extension that will allow the use of FHIRPath (or perhaps full CQL) to specify enableWhen conditions - that will provide you with nested ands and ors as well as a bunch of other things.
Lloyd McKenzie (Apr 18 2018 at 14:50):
But for R3, you can't do it without a custom extension
Ana Kostadinovska (Apr 19 2018 at 14:13):
Thanks! minValue and maxValue will serve the purpose. And I am curious to see the new extension for specifying enableWhen conditions.
Ana Kostadinovska (Apr 30 2018 at 15:43):
I have one more related question. For specifying a starting point of a value scale I can use the minValue extension, for specifying the end of the scale I can use the maxValue extension, but how can I specify the step size ? For example, the expected value should be between 0 (minValue = 0) and 100 (maxValue = 100) with step size 2 (hence permitted values are 0,2,4,6,...100).
Lloyd McKenzie (Apr 30 2018 at 15:59):
Sounds like a new extension - one that sounds reasonable as part of the international spec. Can you submit a change request?
Ana Kostadinovska (May 01 2018 at 09:39):
(deleted)
Ana Kostadinovska (May 01 2018 at 09:40):
(deleted)
Ana Kostadinovska (May 01 2018 at 09:41):
Thanks. Sure, I will do. I should submit the change request here http://hl7.org/fhir/questionnaire-profiles.html ?
Lloyd McKenzie (May 01 2018 at 13:07):
To submit a change request, just click on the "propose a change" link at the bottom of any page in the FHIR spec. At this point, it doesn't manage where you initiate the change from.
Ana Kostadinovska (May 01 2018 at 13:54):
I thought it makes difference where I submit "propose a change". Thanks!
Lloyd McKenzie (May 01 2018 at 15:25):
Eventually we hope to be able to have a "propose a change" link on each section that's "smart" and automatically populates the artifact/page/link. But we're not there yet and can't get there until we move to JIRA, which should be happening in the next month or so.
Brian Postlethwaite (May 03 2018 at 21:54):
Is this so that you can use a "slider" style control for the user input?
Lloyd McKenzie (May 03 2018 at 22:00):
@Ana Kostadinovska We raised some questions on GF#16114 on today's SDC call. If you can respond to them, that'd be great.
Ana Kostadinovska (May 07 2018 at 11:53):
Thanks for letting me know, I just posted a reply.
Glory Kim (Sep 18 2019 at 01:34):
The que-7 rule for enableWhen states: 'If the operator is 'exists', the value must be a boolean operator = 'exists' implies (answer is Boolean)'. Are we to interpret this as...
{ operator: exists, answerBoolean: true} the meaning is - "enable this question if there is an answer to question X (whether answer is T or F is irrelevant)" { operator: exists, answerBoolean: false} the meaning is - "enable this question if there is NO answer to question X"
Brian Postlethwaite (Sep 18 2019 at 02:19):
That sounds correct.
Paul Lynch (Sep 18 2019 at 19:09):
@Linda Schwartz It sounds right to me, assuming that when you wrote "(whether answer is T or F is irrelevant)" you are talking about the user's answer to a boolean question. (As you probably understand, enableWhen can be used on items whose type is not boolean.)
anubhav (Jun 10 2021 at 20:37):
I need help regarding a questionnaire. The Question type is quantity and therefore the min value should possibly also be a quantity but this is probably not in spec https://www.hl7.org/fhir/extension-minvalue.html. Also decimal, date, DateTime, Time, integer is a subtype of quantity http://hl7.org/fhir/R4/datatypes.html#Quantity but the minValue associate here is of integer type only. Link to Questionnaire https://openhie.github.io/covid-ig/Questionnaire-WhoCrQuestionnaireCovid19Surveillance.json Is this a valid questionnaire?
Eric Haas (Jun 10 2021 at 22:11):
I would avoid quantity if you can and use decimal and specify the units.
Lloyd McKenzie (Jun 11 2021 at 03:32):
minValue with Quantity gets messy. If you set the minValue to 5cm and someone sends you 40mm, are systems supposed to detect that's invalid? That's the reason for not setting the min. If you have a fixed unit - thus making the logic easy, you don't really need the Quantity data type and can (and should) just use 'decimal' - even if you're populating from or extracting to Quantity. (There's an extension where you can store what the unit is to use for population/extraction purposes.)
anubhav (Jun 11 2021 at 06:56):
Thanks @Eric Haas @Lloyd McKenzie for quick response.
Jessica Pettersson (Jun 11 2021 at 07:44):
Hello! We have a multiple choice list, but we only want to allow an answer on a specific answerOption ONE time. Is there some way we can do this in the profile?
Lloyd McKenzie (Jun 11 2021 at 14:32):
@Jessica Pettersson That's a common enough pattern that we should probably include an example in the SDC implementation guide of exactly how to do that. Can you submit a change request?
At the moment, the mechanism would be to use the constraint extension
Brian Postlethwaite (Jun 12 2021 at 06:54):
I actually don't know what it would mean to pick it twice.
Our renderer gives you radios by default in that case, unless list size is too big.
Brian Postlethwaite (Jun 12 2021 at 06:54):
Anyone come up with a use case that says that's OK?
Jessica Pettersson (Jun 14 2021 at 13:00):
Hi! Another question: if there is a need to invalidate a note from an external system, is there a good extension for this purpose? What about this one? https://simplifier.net/simplifier.core.r4.extensions/statusreason
Lloyd McKenzie (Jun 25 2021 at 22:12):
What do you mean by "invalidate a note"?
Last updated: Apr 12 2022 at 19:14 UTC