{
  "resourceType": "Questionnaire",
  "status": "active",
  "item": [
    {
      "linkId": "gad7",
      "text": "GAD-7 Anxiety Screening",
      "type": "group",
      "item": [
        {
          "linkId": "gad7-intro",
          "text": "Over the last 2 weeks, how often have you been bothered by the following problems?",
          "type": "display"
        },
        {
          "linkId": "gad7-q1",
          "code": [
            {
              "system": "http://loinc.org",
              "code": "69725-0"
            }
          ],
          "text": "Feeling nervous, anxious or on edge",
          "type": "choice",
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://hl7.org/fhir/questionnaire-item-control",
                    "code": "radio-button"
                  }
                ]
              }
            }
          ],
          "required": true,
          "answerOption": [
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 0
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6568-5",
                "display": "Not at all"
              }
            },
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 1
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6569-3",
                "display": "Several days"
              }
            },
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 2
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6570-1",
                "display": "More than half the days"
              }
            },
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 3
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6571-9",
                "display": "Nearly every day"
              }
            }
          ]
        },
        {
          "linkId": "gad7-q2",
          "code": [
            {
              "system": "http://loinc.org",
              "code": "68509-9"
            }
          ],
          "text": "Not being able to stop or control worrying",
          "type": "choice",
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://hl7.org/fhir/questionnaire-item-control",
                    "code": "radio-button"
                  }
                ]
              }
            }
          ],
          "required": true,
          "answerOption": [
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 0
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6568-5",
                "display": "Not at all"
              }
            },
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 1
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6569-3",
                "display": "Several days"
              }
            },
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 2
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6570-1",
                "display": "More than half the days"
              }
            },
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 3
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6571-9",
                "display": "Nearly every day"
              }
            }
          ]
        },
        {
          "linkId": "gad7-q3",
          "code": [
            {
              "system": "http://loinc.org",
              "code": "69733-4"
            }
          ],
          "text": "Worrying too much about different things",
          "type": "choice",
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://hl7.org/fhir/questionnaire-item-control",
                    "code": "radio-button"
                  }
                ]
              }
            }
          ],
          "required": true,
          "answerOption": [
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 0
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6568-5",
                "display": "Not at all"
              }
            },
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 1
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6569-3",
                "display": "Several days"
              }
            },
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 2
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6570-1",
                "display": "More than half the days"
              }
            },
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 3
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6571-9",
                "display": "Nearly every day"
              }
            }
          ]
        },
        {
          "linkId": "gad7-q4",
          "code": [
            {
              "system": "http://loinc.org",
              "code": "69734-2"
            }
          ],
          "text": "Trouble relaxing",
          "type": "choice",
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://hl7.org/fhir/questionnaire-item-control",
                    "code": "radio-button"
                  }
                ]
              }
            }
          ],
          "required": true,
          "answerOption": [
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 0
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6568-5",
                "display": "Not at all"
              }
            },
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 1
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6569-3",
                "display": "Several days"
              }
            },
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 2
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6570-1",
                "display": "More than half the days"
              }
            },
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 3
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6571-9",
                "display": "Nearly every day"
              }
            }
          ]
        },
        {
          "linkId": "gad7-q5",
          "code": [
            {
              "system": "http://loinc.org",
              "code": "69735-9"
            }
          ],
          "text": "Being so restless that it is hard to sit still",
          "type": "choice",
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://hl7.org/fhir/questionnaire-item-control",
                    "code": "radio-button"
                  }
                ]
              }
            }
          ],
          "required": true,
          "answerOption": [
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 0
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6568-5",
                "display": "Not at all"
              }
            },
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 1
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6569-3",
                "display": "Several days"
              }
            },
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 2
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6570-1",
                "display": "More than half the days"
              }
            },
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 3
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6571-9",
                "display": "Nearly every day"
              }
            }
          ]
        },
        {
          "linkId": "gad7-q6",
          "code": [
            {
              "system": "http://loinc.org",
              "code": "69689-8"
            }
          ],
          "text": "Becoming easily annoyed or irritable",
          "type": "choice",
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://hl7.org/fhir/questionnaire-item-control",
                    "code": "radio-button"
                  }
                ]
              }
            }
          ],
          "required": true,
          "answerOption": [
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 0
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6568-5",
                "display": "Not at all"
              }
            },
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 1
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6569-3",
                "display": "Several days"
              }
            },
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 2
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6570-1",
                "display": "More than half the days"
              }
            },
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 3
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6571-9",
                "display": "Nearly every day"
              }
            }
          ]
        },
        {
          "linkId": "gad7-q7",
          "code": [
            {
              "system": "http://loinc.org",
              "code": "69736-7"
            }
          ],
          "text": "Feeling afraid as if something awful might happen",
          "type": "choice",
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://hl7.org/fhir/questionnaire-item-control",
                    "code": "radio-button"
                  }
                ]
              }
            }
          ],
          "required": true,
          "answerOption": [
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 0
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6568-5",
                "display": "Not at all"
              }
            },
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 1
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6569-3",
                "display": "Several days"
              }
            },
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 2
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6570-1",
                "display": "More than half the days"
              }
            },
            {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/ordinalValue",
                  "valueDecimal": 3
                }
              ],
              "valueCoding": {
                "system": "http://loinc.org",
                "code": "LA6571-9",
                "display": "Nearly every day"
              }
            }
          ]
        },
        {
          "linkId": "gad7-total",
          "code": [
            {
              "system": "http://loinc.org",
              "code": "70274-6"
            }
          ],
          "text": "GAD-7 total score",
          "type": "decimal",
          "readOnly": true,
          "extension": [
            {
              "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression",
              "valueExpression": {
                "language": "text/fhirpath",
                "expression": "iif(%resource.repeat(item).where(linkId in ('gad7-q1' | 'gad7-q2' | 'gad7-q3' | 'gad7-q4' | 'gad7-q5' | 'gad7-q6' | 'gad7-q7')).answer.valueCoding.extension('http://hl7.org/fhir/StructureDefinition/ordinalValue').valueDecimal.count() = 7, %resource.repeat(item).where(linkId in ('gad7-q1' | 'gad7-q2' | 'gad7-q3' | 'gad7-q4' | 'gad7-q5' | 'gad7-q6' | 'gad7-q7')).answer.valueCoding.extension('http://hl7.org/fhir/StructureDefinition/ordinalValue').valueDecimal.sum(), {})"
              }
            }
          ]
        },
        {
          "linkId": "gad7-severity",
          "text": "Anxiety severity",
          "type": "string",
          "readOnly": true,
          "extension": [
            {
              "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression",
              "valueExpression": {
                "language": "text/fhirpath",
                "expression": "iif(%resource.repeat(item).where(linkId='gad7-total').answer.valueDecimal.exists(), iif(%resource.repeat(item).where(linkId='gad7-total').answer.valueDecimal < 5, 'Minimal anxiety', iif(%resource.repeat(item).where(linkId='gad7-total').answer.valueDecimal < 10, 'Mild anxiety', iif(%resource.repeat(item).where(linkId='gad7-total').answer.valueDecimal < 15, 'Moderate anxiety', 'Severe anxiety'))), {})"
              }
            }
          ]
        }
      ]
    }
  ]
}
