FHIR Chat · Questionnaire definition mapping to logical model · questionnaire

Stream: questionnaire

Topic: Questionnaire definition mapping to logical model


view this post on Zulip Elliot Silver (Oct 19 2020 at 05:25):

I have a questionnaire that includes, among other questions, a choice item bound to a valueset, and a text item for "other, please specify". I also have a logical model that contains the definitions for the various questions. It seems to me that the representation for these two questions in the logical model should be a CodeableConcept, with the choice item defined by the CodeableConcept.coding and the "other" text defined by CodeableConcept.text. However, it doesn't appear to be possible for a definition to go further than the logical model's path element and "into" attributes of the datatype.
How are others handling this limitation? Am I approaching this wrong?

view this post on Zulip Elliot Silver (Oct 19 2020 at 05:30):

Similarly, I want to define another questionnaire item "end date" as mapping to the end date of a logical model item which is a Period.

view this post on Zulip Lloyd McKenzie (Oct 19 2020 at 14:10):

When you say "it doesn't appear to be possible", where are you running into issues? For the second, presumably you'd map to Period.end?

view this post on Zulip Elliot Silver (Oct 19 2020 at 20:06):

In my fsh logical model, I have:

* differential.element[74].id = "DataDictionary.outcome.patientCourse.status"
* differential.element[74].path = "DataDictionary.outcome.patientCourse.status"
* differential.element[74].short = "Patient status (outcome)"
* differential.element[74].definition = "Patient status (outcome)"
* differential.element[74].type.code = #CodeableConcept
...

Then, in my Questionnaire, I have:

* item[7].item[5].linkId  = "outcome_patcourse_status"
* item[7].item[5].text    = "Health Outcome:"
* item[7].item[5].type    = #choice
* item[7].item[5].answerValueSet = Canonical(ValueSetPatientOutcome)
* item[7].item[5].definition    = "http://www.example.com/fhir/cr/StructureDefinition/DataDictionary#DataDictionary.outcome.patientCourse.status"

* item[7].item[6].linkId  = "outcome_patcourse_status_other"
* item[7].item[6].text    = "If other, please explain:"
* item[7].item[6].type    = #string
* item[7].item[6].enableWhen[0].question  = "outcome_patcourse_status"
* item[7].item[6].enableWhen[0].operator  = #=
* item[7].item[6].enableWhen[0].answerCoding = CodeSystemPatientOutcome#OTHER
* item[7].item[6].definition    = "http://www.example.com/fhir/cr/StructureDefinition/DataDictionary#DataDictionary.outcome.patientCourse.status"

Is there a way to say that the first questionnaire item is defined by the status.coding, while the second questionnaire item is defined by status.text? Tacking ".coding" and ".text" onto the end of the definition urls gives IG publisher errors (link cannot be resolved).

view this post on Zulip Lloyd McKenzie (Oct 19 2020 at 22:31):

@Grahame Grieve @Brian Postlethwaite

view this post on Zulip Brian Postlethwaite (Oct 19 2020 at 22:39):

Yes, I would be adding that on the end.

view this post on Zulip Brian Postlethwaite (Oct 19 2020 at 22:40):

I believe that walking into properties of the datatype is perfectly fine. Otherwise you wouldn't be able to use any complex datatypes like contact or identifier with definitions.

view this post on Zulip Elliot Silver (Oct 19 2020 at 22:42):

Yeah, that's kinda what I thought. So, am I expressing it wrong, or is this a publisher error?

view this post on Zulip Brian Postlethwaite (Oct 19 2020 at 22:44):

Here's an example (not real) that does it
https://sqlonfhir-r4.azurewebsites.net/fhir/Questionnaire/prac-ext-demo

view this post on Zulip Brian Postlethwaite (Oct 19 2020 at 22:44):

Haven't tried putting one of them into the publisher.

view this post on Zulip Brian Postlethwaite (Oct 19 2020 at 22:46):

And this is the profile that was "referenced" by the definitions
https://sqlonfhir-r4.azurewebsites.net/fhir/StructureDefinition/hcxdir-practitioner

view this post on Zulip Elliot Silver (Oct 19 2020 at 22:46):

Hmm, is that the same though? I'm referencing something inside a logical model, not a resource or profile definition. I wonder if it matters what kind of StructureDefinition is used?

view this post on Zulip Brian Postlethwaite (Oct 19 2020 at 22:47):

I'd be suggesting it should be the same...

view this post on Zulip Elliot Silver (Oct 19 2020 at 22:47):

I would have thought so.

view this post on Zulip Brian Postlethwaite (Oct 19 2020 at 22:47):

Your direct question I think is can you walk into paths from a datatype that are not in the snapshot (or definition) - when referencing an element in a structure definition.

view this post on Zulip Elliot Silver (Nov 09 2020 at 00:12):

I'm still getting this and have no idea how to troubleshoot. It doesn't make sense to me.


Last updated: Apr 12 2022 at 19:14 UTC