FHIR Chat · candidateExpression extension and choiceColumn extension wi · questionnaire

Stream: questionnaire

Topic: candidateExpression extension and choiceColumn extension wi


view this post on Zulip Diane (Oct 22 2021 at 17:43):

I am trying to adapt the example at https://build.fhir.org/ig/HL7/sdc/examples.html#using-candidateexpression to my questionnaire.

My data will be in repeating groups.

Link ID 5 Parent for the repeating group
Link ID 5.1 Last Name Smith
Link ID 5.2 First Name John
Link ID 5.3 Clinic Name City Hospital
Link ID 5.4 Clinic City Tampa
Link ID 5.5 Clinic State FL

Link ID 5 Parent for the repeating group
Link ID 5.1 Last Name Moseley
Link ID 5.2 First Name Henry
Link ID 5.3 Clinic Name City Hospital
Link ID 5.4 Clinic City Miami
Link ID 5.5 Clinic State FL

etc.

I will use fhirpath to put the entire set of repeating groups into a variable called sites

"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-candidateExpression",
"valueExpression": {
"description": "sites for the user to select from",
"language": "text/fhirpath",
"name": "sites",
"expression": "%QuestionnaireResponse.descendants().where(linkId = '5')"
}
},

I understand that I need one extension per column. So, my extension for the first column is:

   "extension": [
            {
              "url": "path",
              "valueString": "%sites.where(linkId = '5.1')"
            },
            {
              "url": "label",
              "valueString": "LAST NAME"
            },
            {
              "url": "width",
              "valueQuantity": {
                "value": 20,
                "system": "http://unitsofmeasure.org",
                "code": "%"
              }
            },
            {
              "url": "forDisplay",
              "valueBoolean": true
            }
          ],
          "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-choiceColumn"
        },
  1. Am I supposed to put something different in the "url" element? Or are "path", "forDisplay" and "label" the correct list of values?

When I look at the definitions in the spec https://hl7.org/fhir/uv/sdc/2019may/extension-sdc-questionnaire-choiceColumn-definitions.html#Extension.extension:path for the choiceColumn extension, under "url", I am not seeing options for values such as "path", "forDisplay" and "label".

  1. Do I also need a "path" element to show "The element to display within the column" per the spec at https://hl7.org/fhir/uv/sdc/2019may/extension-sdc-questionnaire-choiceColumn-definitions.html#Extension.extension:path?

  2. For LHC Forms, what url do I use for the candidateExpression extension? The example uses "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-candidateExpression" but that leads to a broken link. Is there a new URL that LHC Forms uses?

  3. For LHC Forms, what url do I use for the choiceColumns extension? The example uses "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-choiceColumn" but that also leads to a broken link. Is there a new URL that LHC Forms uses?

  4. When the user selects a row, "what" do I get back in LHC Forms as the answer? Will it be some sort of object like ["Smith", "John", "City Hospital", "Tampa", "FL"] that I could access with a syntax like ...answer.value[0] for the last name?

view this post on Zulip Paul Lynch (Oct 22 2021 at 17:50):

LHC-Forms does not yet support either choiceColumn or candidateExpression. choiceColumn is something important to us and would likely be something we would implement early next year, time permitting, but candidateExpression was pretty far down the list. Recently I added some documentation for which parts of R4 and SDC have support in LHC-Forms. See https://github.com/lhncbc/lforms/blob/master/r4-support.md and https://github.com/lhncbc/lforms/blob/master/sdc-support.md.

view this post on Zulip Diane (Oct 22 2021 at 18:36):

Thank you for the reply. The documentation about what parts of R4 and SDC have support in LHC-Forms is really helpful.


Last updated: Apr 12 2022 at 19:14 UTC