Uploaded image for project: 'FHIR Specification Feedback'
  1. FHIR Specification Feedback
  2. FHIR-33335

Clarify guidance on how "repeats" works in QuestionnaireResponse

    XMLWordPrintableJSON

Details

    • Icon: Change Request Change Request
    • Resolution: Persuasive with Modification
    • Icon: Medium Medium
    • FHIR Core (FHIR)
    • R4
    • FHIR Infrastructure
    • Questionnaire
      QuestionnaireResponse
    • Hide

      We will:

      • for now, ensure there is clearer wording in the SDC specification and will pre-adopt the invariant on the SDC QuestionnaireResponse profile
      • We will also update the base QuestionnaireResponse profile in R5, including updating the description of repeats, adding the invariant and making explicit "when repeats=true for a group, it'll be represented with multiple items with the same linkId in the QuestionnaireResponse.  For a question, it'll be represented by a single item with that linkId with multiple answers."
      Show
      We will: for now, ensure there is clearer wording in the SDC specification and will pre-adopt the invariant on the SDC QuestionnaireResponse profile We will also update the base QuestionnaireResponse profile in R5, including updating the description of repeats, adding the invariant and making explicit "when repeats=true for a group, it'll be represented with multiple items with the same linkId in the QuestionnaireResponse.  For a question, it'll be represented by a single item with that linkId with multiple answers."
    • Paul Lynch/Brian Postlethwaite: 6-0-0
    • Clarification
    • Non-substantive
    • R5

    Description

      1. Add a constraint to QuestionnaireResponse like "qrs-2": "Repeated answers are combined in the answers array of a single item".

      (QuestionnaireResponse | repeat(answer|item))
      .select(
        item.where(answer.value.exists())
        .linkId.isDistinct())
      {{.allTrue()}}

      2. http://build.fhir.org/questionnaire-definitions.html#Questionnaire.item.repeats states 

      > An indication, if true, that the item may occur multiple times in the response, collecting multiple answers for questions or multiple sets of answers for groups.

      but per https://chat.fhir.org/#narrow/stream/179255-questionnaire/topic/Repeating.20answers.20to.20a.20top-level.20question/near/251593867, an question-type item will not repeat QuestionnaireResponse when multiple answers are provided.

      This text should be updated to say something like: "An indication, if true, that a QuestionnaireResponse for this item may include multiple answers associated with a single instance of this item (for question-type items) or multiple repetitions of the item (for group-type items)"

      Overall, the guidance for how repeated answers should surface (as sibling items, or as sibling answers within an item) should be made explicit, if we have expectations here. Ideally we'd formulate fhirpath constraints documenting when sibling items would (and would not) be allowed to have the same linkId, to prevent mistakes.

      Attachments

        Activity

          People

            lloyd Lloyd McKenzie
            jmandel Josh Mandel
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: