{
  "resourceType": "StructureDefinition",
  "id": "questionnaire-optionRestriction",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode": "fhir"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 1
    }
  ],
  "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-optionRestriction",
  "version": "4.6.0",
  "name": "QuestionnaireOptionRestriction",
  "title": "Questionnaire option restriction",
  "status": "draft",
  "date": "2013-07-04",
  "publisher": "HL7",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://www.hl7.org"
        }
      ]
    }
  ],
  "description": "Allows disabling certain questionnaire options for the containing item based on evaluating expressions.",
  "fhirVersion": "4.6.0",
  "kind": "complex-type",
  "abstract": false,
  "context": [
    {
      "type": "element",
      "expression": "Questionnaire.item"
    }
  ],
  "contextInvariant": [
    "answerValueset or answerOption"
  ],
  "type": "Extension",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Extension",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Extension",
        "path": "Extension",
        "short": "Constraint",
        "definition": "Allows disabling certain questionnaire options for the containing item based on evaluating expressions.",
        "min": 0,
        "max": "*"
      },
      {
        "id": "Extension.extension:option",
        "path": "Extension.extension",
        "sliceName": "option",
        "short": "Option to exclude",
        "definition": "Indicates one or more options that should be disabled if the specified expression evaluates to true",
        "comment": "Options listed are expected to correspond to either answerOption values or Codings found in the answerValueset expansion.  Systems SHOULD treat non-matching answerOptions and MAY treat non-matching answerValueset Codings as an error.",
        "min": 1,
        "max": "*",
        "type": [
          {
            "code": "Extension"
          }
        ]
      },
      {
        "id": "Extension.extension:option.extension",
        "path": "Extension.extension.extension",
        "max": "0"
      },
      {
        "id": "Extension.extension:option.url",
        "path": "Extension.extension.url",
        "type": [
          {
            "code": "uri"
          }
        ],
        "fixedUri": "option"
      },
      {
        "id": "Extension.extension:option.value[x]",
        "path": "Extension.extension.value[x]",
        "min": 1,
        "type": [
          {
            "code": "integer"
          },
          {
            "code": "date"
          },
          {
            "code": "time"
          },
          {
            "code": "string"
          },
          {
            "code": "Coding"
          },
          {
            "code": "Reference"
          }
        ]
      },
      {
        "id": "Extension.extension:expression",
        "path": "Extension.extension",
        "sliceName": "expression",
        "short": "Expression to trigger exclusion",
        "definition": "The expression to evaluate.  If the evaluation results in true, then the specified options will be suppressed.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension"
          }
        ]
      },
      {
        "id": "Extension.extension:expression.extension",
        "path": "Extension.extension.extension",
        "max": "0"
      },
      {
        "id": "Extension.extension:requirements.url",
        "path": "Extension.extension.url",
        "type": [
          {
            "code": "uri"
          }
        ],
        "fixedUri": "requirements"
      },
      {
        "id": "Extension.extension:expression.value[x]",
        "path": "Extension.extension.value[x]",
        "min": 1,
        "type": [
          {
            "code": "Expression"
          }
        ]
      },
      {
        "id": "Extension.url",
        "path": "Extension.url",
        "type": [
          {
            "code": "uri"
          }
        ],
        "fixedUri": "http://hl7.org/fhir/StructureDefinition/questionnaire-optionRestriction"
      }
    ]
  }
}