Current Build
FHIR Infrastructure Work GroupMaturity Level: N/AStandards Status: Informative Compartments: Device, Encounter, Patient, Practitioner, RelatedPerson

This is a representation of the json schema for QuestionnaireResponse, which is just a part of the full JSON Schema.

{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "id": "http://hl7.org/fhir/json-schema/QuestionnaireResponse",
  "$ref": "#/definitions/QuestionnaireResponse",
  "description": "see http://hl7.org/fhir/json.html#schema for information about the FHIR Json Schemas",
  "definitions": {
    "QuestionnaireResponse": {
      "description": "A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.",
      "properties": {
        "resourceType": {
          "description": "This is a QuestionnaireResponse resource",
          "const": "QuestionnaireResponse"
        },
        "id": {
          "description": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
          "$ref": "id.schema.json#/definitions/id"
        },
        "meta": {
          "description": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
          "$ref": "Meta.schema.json#/definitions/Meta"
        },
        "implicitRules": {
          "description": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.",
          "$ref": "#/definitions/uri"
        },
        "_implicitRules": {
          "description": "Extensions for implicitRules",
          "$ref": "Element.schema.json#/definitions/Element"
        },
        "language": {
          "description": "The base language in which the resource is written.",
          "$ref": "#/definitions/code"
        },
        "_language": {
          "description": "Extensions for language",
          "$ref": "Element.schema.json#/definitions/Element"
        },
        "text": {
          "description": "A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
          "$ref": "Narrative.schema.json#/definitions/Narrative"
        },
        "contained": {
          "description": "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.",
          "items": {
            "$ref": "ResourceList.schema.json#/definitions/ResourceList"
          },
          "type": "array"
        },
        "extension": {
          "description": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
          "items": {
            "$ref": "Extension.schema.json#/definitions/Extension"
          },
          "type": "array"
        },
        "modifierExtension": {
          "description": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element\u0027s descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
          "items": {
            "$ref": "Extension.schema.json#/definitions/Extension"
          },
          "type": "array"
        },
        "identifier": {
          "description": "A business identifier assigned to a particular completed (or partially completed) questionnaire.",
          "$ref": "Identifier.schema.json#/definitions/Identifier"
        },
        "basedOn": {
          "description": "The order, proposal or plan that is fulfilled in whole or in part by this QuestionnaireResponse.  For example, a ServiceRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression.",
          "items": {
            "$ref": "Reference.schema.json#/definitions/Reference"
          },
          "type": "array"
        },
        "partOf": {
          "description": "A procedure or observation that this questionnaire was performed as part of the execution of.  For example, the surgery a checklist was executed as part of.",
          "items": {
            "$ref": "Reference.schema.json#/definitions/Reference"
          },
          "type": "array"
        },
        "questionnaire": {
          "description": "The Questionnaire that defines and organizes the questions for which answers are being provided.",
          "$ref": "canonical.schema.json#/definitions/canonical"
        },
        "status": {
          "description": "The position of the questionnaire response within its overall lifecycle.",
          "enum": [
            "in-progress",
            "completed",
            "amended",
            "entered-in-error",
            "stopped"
          ]
        },
        "_status": {
          "description": "Extensions for status",
          "$ref": "Element.schema.json#/definitions/Element"
        },
        "subject": {
          "description": "The subject of the questionnaire response.  This could be a patient, organization, practitioner, device, etc.  This is who/what the answers apply to, but is not necessarily the source of information.",
          "$ref": "Reference.schema.json#/definitions/Reference"
        },
        "encounter": {
          "description": "The Encounter during which this questionnaire response was created or to which the creation of this record is tightly associated.",
          "$ref": "Reference.schema.json#/definitions/Reference"
        },
        "authored": {
          "description": "The date and/or time that this set of answers were last changed.",
          "$ref": "#/definitions/dateTime"
        },
        "_authored": {
          "description": "Extensions for authored",
          "$ref": "Element.schema.json#/definitions/Element"
        },
        "author": {
          "description": "Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.",
          "$ref": "Reference.schema.json#/definitions/Reference"
        },
        "source": {
          "description": "The person who answered the questions about the subject.",
          "$ref": "Reference.schema.json#/definitions/Reference"
        },
        "item": {
          "description": "A group or question item from the original questionnaire for which answers are provided.",
          "items": {
            "$ref": "#/definitions/QuestionnaireResponse_Item"
          },
          "type": "array"
        }
      },
      "additionalProperties": false,
      "required": [
        "resourceType"
      ]
    },
    "QuestionnaireResponse_Item": {
      "description": "A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.",
      "properties": {
        "id": {
          "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
          "$ref": "string.schema.json#/definitions/string"
        },
        "extension": {
          "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
          "items": {
            "$ref": "Extension.schema.json#/definitions/Extension"
          },
          "type": "array"
        },
        "modifierExtension": {
          "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element\u0027s descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
          "items": {
            "$ref": "Extension.schema.json#/definitions/Extension"
          },
          "type": "array"
        },
        "linkId": {
          "description": "The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.",
          "$ref": "#/definitions/string"
        },
        "_linkId": {
          "description": "Extensions for linkId",
          "$ref": "Element.schema.json#/definitions/Element"
        },
        "definition": {
          "description": "A reference to an [[[ElementDefinition]]] that provides the details for the item.",
          "$ref": "#/definitions/uri"
        },
        "_definition": {
          "description": "Extensions for definition",
          "$ref": "Element.schema.json#/definitions/Element"
        },
        "text": {
          "description": "Text that is displayed above the contents of the group or as the text of the question being answered.",
          "$ref": "#/definitions/string"
        },
        "_text": {
          "description": "Extensions for text",
          "$ref": "Element.schema.json#/definitions/Element"
        },
        "answer": {
          "description": "The respondent\u0027s answer(s) to the question.",
          "items": {
            "$ref": "#/definitions/QuestionnaireResponse_Answer"
          },
          "type": "array"
        },
        "item": {
          "description": "Questions or sub-groups nested beneath a question or group.",
          "items": {
            "$ref": "#/definitions/QuestionnaireResponse_Item"
          },
          "type": "array"
        }
      },
      "additionalProperties": false
    },
    "QuestionnaireResponse_Answer": {
      "description": "A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.",
      "properties": {
        "id": {
          "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
          "$ref": "string.schema.json#/definitions/string"
        },
        "extension": {
          "description": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
          "items": {
            "$ref": "Extension.schema.json#/definitions/Extension"
          },
          "type": "array"
        },
        "modifierExtension": {
          "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element\u0027s descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
          "items": {
            "$ref": "Extension.schema.json#/definitions/Extension"
          },
          "type": "array"
        },
        "valueBoolean": {
          "description": "The answer (or one of the answers) provided by the respondent to the question.",
          "pattern": "^true|false$",
          "type": "boolean"
        },
        "_valueBoolean": {
          "description": "Extensions for valueBoolean",
          "$ref": "Element.schema.json#/definitions/Element"
        },
        "valueDecimal": {
          "description": "The answer (or one of the answers) provided by the respondent to the question.",
          "pattern": "^-?(0|[1-9][0-9]*)(\\.[0-9]+)?([eE][+-]?[0-9]+)?$",
          "type": "number"
        },
        "_valueDecimal": {
          "description": "Extensions for valueDecimal",
          "$ref": "Element.schema.json#/definitions/Element"
        },
        "valueInteger": {
          "description": "The answer (or one of the answers) provided by the respondent to the question.",
          "pattern": "^-?([0]|([1-9][0-9]*))$",
          "type": "number"
        },
        "_valueInteger": {
          "description": "Extensions for valueInteger",
          "$ref": "Element.schema.json#/definitions/Element"
        },
        "valueDate": {
          "description": "The answer (or one of the answers) provided by the respondent to the question.",
          "pattern": "^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?)?$",
          "type": "string"
        },
        "_valueDate": {
          "description": "Extensions for valueDate",
          "$ref": "Element.schema.json#/definitions/Element"
        },
        "valueDateTime": {
          "description": "The answer (or one of the answers) provided by the respondent to the question.",
          "pattern": "^([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?$",
          "type": "string"
        },
        "_valueDateTime": {
          "description": "Extensions for valueDateTime",
          "$ref": "Element.schema.json#/definitions/Element"
        },
        "valueTime": {
          "description": "The answer (or one of the answers) provided by the respondent to the question.",
          "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\\.[0-9]+)?$",
          "type": "string"
        },
        "_valueTime": {
          "description": "Extensions for valueTime",
          "$ref": "Element.schema.json#/definitions/Element"
        },
        "valueString": {
          "description": "The answer (or one of the answers) provided by the respondent to the question.",
          "pattern": "^[ \\r\\n\\t\\S]+$",
          "type": "string"
        },
        "_valueString": {
          "description": "Extensions for valueString",
          "$ref": "Element.schema.json#/definitions/Element"
        },
        "valueUri": {
          "description": "The answer (or one of the answers) provided by the respondent to the question.",
          "pattern": "^\\S*$",
          "type": "string"
        },
        "_valueUri": {
          "description": "Extensions for valueUri",
          "$ref": "Element.schema.json#/definitions/Element"
        },
        "valueAttachment": {
          "description": "The answer (or one of the answers) provided by the respondent to the question.",
          "$ref": "Attachment.schema.json#/definitions/Attachment"
        },
        "valueCoding": {
          "description": "The answer (or one of the answers) provided by the respondent to the question.",
          "$ref": "Coding.schema.json#/definitions/Coding"
        },
        "valueQuantity": {
          "description": "The answer (or one of the answers) provided by the respondent to the question.",
          "$ref": "Quantity.schema.json#/definitions/Quantity"
        },
        "valueReference": {
          "description": "The answer (or one of the answers) provided by the respondent to the question.",
          "$ref": "Reference.schema.json#/definitions/Reference"
        },
        "item": {
          "description": "Nested groups and/or questions found within this particular answer.",
          "items": {
            "$ref": "#/definitions/QuestionnaireResponse_Item"
          },
          "type": "array"
        }
      },
      "additionalProperties": false
    }
  }
}