Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support optionExclusive extension in questionnaires #1281

Closed
jingtang10 opened this issue Apr 6, 2022 · 4 comments · Fixed by #1284
Closed

Support optionExclusive extension in questionnaires #1281

jingtang10 opened this issue Apr 6, 2022 · 4 comments · Fixed by #1284
Assignees
Labels
effort:xsmall Extra small effort - 1 day P1 High priority issue

Comments

@jingtang10
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
See
http://hl7.org/fhir/R4/extension-questionnaire-optionexclusive.html

and http://build.fhir.org/ig/HL7/sdc/behavior.html#choice-restriction

Basically if an answer option has this extension, selecting this answer option means other answer options need to be deselected.

Describe the solution you'd like
This needs to be implemented in the checkbox group first. and all other widgets that support repeated answers.

Describe alternatives you've considered
NA

Additional context
NA

Would you like to work on the issue?
no thanks

@jingtang10 jingtang10 added P1 High priority issue effort:xsmall Extra small effort - 1 day labels Apr 6, 2022
@santosh-pingle
Copy link
Collaborator

I am working on implementation.

@jingtang10
Copy link
Collaborator Author

@soura-b fyi

@santosh-pingle
Copy link
Collaborator

As per discussion with @jingtang10 @fredhersch in android fhir sdk developers call
If you reselect an option, then clear the optionExclusive selection

@santosh-pingle
Copy link
Collaborator

questionnaire json with optionExclusive extension for example purpose only.

{
  "title": "Multiple choice",
  "status": "active",
  "version": "0.0.1",
  "resourceType": "Questionnaire",
  "item": [
    {
      "linkId": "1.0.0",
      "text": "Do you have any of the following symptoms?",
      "type": "choice",
      "repeats": true,
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/questionnaire-item-control",
                "code": "check-box",
                "display": "Checkbox"
              }
            ],
            "text": "Checkbox"
          }
        }
      ],
      "answerOption": [
        {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-optionExclusive",
              "valueBoolean": true
            }
          ],
          "valueCoding": {
            "code": "code_1",
            "display": "Missed period",
            "system": "http://snomed.info/sct"
          }
        },
        {
          "valueCoding": {
            "code": "code_2",
            "display": "Tender, swollen breasts",
            "system": "http://snomed.info/sct"
          }
        },
        {
          "valueCoding": {
            "code": "code_3",
            "display": "Nausea",
            "system": "http://snomed.info/sct"
          }
        },
        {
          "valueCoding": {
            "code": "code_4",
            "display": "Vomiting",
            "system": "http://snomed.info/sct"
          }
        },
        {
          "valueCoding": {
            "code": "code_5",
            "display": "Increased urination",
            "system": "http://snomed.info/sct"
          }
        },
        {
          "valueCoding": {
            "code": "code_6",
            "display": "Fatigue",
            "system": "http://snomed.info/sct"
          }
        }
      ],
      "item": [
        {
          "linkId": "1-select-one",
          "text": "Check all that apply",
          "type": "display"
        }
      ]
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort:xsmall Extra small effort - 1 day P1 High priority issue
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants