Data Model Libraries
    Preparing search index...

    QuestionnaireResponse Class

    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.

    To support structured, hierarchical reporting of data gathered using digital forms and other questionnaires.

    FHIR Specification

    • Short: A structured set of questions and their answers
    • Definition: 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.
    • Comment: The QuestionnaireResponse contains enough information about the questions asked and their organization that it can be interpreted somewhat independently from the Questionnaire it is based on. I.e. You don't need access to the Questionnaire in order to extract basic information from a QuestionnaireResponse.
    • FHIR Version: 5.0.0

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    Methods

    parse getIdentifier setIdentifier addIdentifier hasIdentifier getBasedOn setBasedOn addBasedOn hasBasedOn getPartOf setPartOf addPartOf hasPartOf getQuestionnaireElement setQuestionnaireElement hasQuestionnaireElement getQuestionnaire setQuestionnaire hasQuestionnaire getStatusEnumType setStatusEnumType hasStatusEnumType getStatusElement setStatusElement hasStatusElement getStatus setStatus hasStatus getSubject setSubject hasSubject getEncounter setEncounter hasEncounter getAuthoredElement setAuthoredElement hasAuthoredElement getAuthored setAuthored hasAuthored getAuthor setAuthor hasAuthor getSource setSource hasSource getItem setItem addItem hasItem fhirType isEmpty isRequiredFieldsEmpty copy toJSON getText setText hasText getContained setContained addContained hasContained getExtension setExtension hasExtension getExtensionByUrl addExtension removeExtension getModifierExtension setModifierExtension hasModifierExtension getModifierExtensionByUrl addModifierExtension removeModifierExtension resourceType getIdElement setIdElement hasIdElement getId setId hasId getMeta setMeta hasMeta getImplicitRulesElement setImplicitRulesElement hasImplicitRulesElement getImplicitRules setImplicitRules hasImplicitRules getLanguageElement setLanguageElement hasLanguageElement getLanguage setLanguage hasLanguage isResource isDataType isComplexDataType isPrimitive isBooleanPrimitive isStringPrimitive isNumberPrimitive isBigIntPrimitive isDateTimePrimitive copyValues initIdentifier initBasedOn initPartOf initItem

    Constructors

    Properties

    identifier?: Identifier[]

    QuestionnaireResponse.identifier Element

    FHIR Specification

    • Short: Business identifier for this set of answers
    • Definition: Business identifiers assigned to this questionnaire response by the performer and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server.
    • Comment: Note: This is a business identifier, not a resource identifier (see discussion).
    • Requirements: Allows identification of the questionnaire response as it is known by various participating systems and in a way that remains consistent across servers.
    • FHIR Type: Identifier
    • Cardinality: 0..*
    • isModifier: false
    • isSummary: true
    basedOn?: Reference[]

    QuestionnaireResponse.basedOn Element

    FHIR Specification

    • Short: Request fulfilled by this QuestionnaireResponse
    • Definition: A plan, proposal or order that is fulfilled in whole or in part by this questionnaire response. For example, a ServiceRequest seeking an intake assessment or a decision support recommendation to assess for post-partum depression.
    • Requirements: Supports traceability of responsibility for the questionnaire response and allows linkage of the response to the proposals/recommendations acted upon.
    • FHIR Type: Reference
    • Cardinality: 0..*
    • isModifier: false
    • isSummary: true
    partOf?: Reference[]

    QuestionnaireResponse.partOf Element

    FHIR Specification

    • Short: Part of referenced event
    • Definition: 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.
    • Comment: Not to be used to link an questionnaire response to an Encounter - use 'context' for that. Composition of questionnaire responses will be handled using the Assemble operation defined in the SDC IG. For relationships to referrals, and other types of requests, use basedOn.
    • FHIR Type: Reference
    • Cardinality: 0..*
    • isModifier: false
    • isSummary: true
    questionnaire: null | CanonicalType

    QuestionnaireResponse.questionnaire Element

    FHIR Specification

    • Short: Canonical URL of Questionnaire being answered
    • Definition: The Questionnaire that defines and organizes the questions for which answers are being provided.
    • Comment: If a QuestionnaireResponse references a Questionnaire that can be resolved, then the QuestionnaireResponse structure must be consistent with the Questionnaire (i.e. questions must be organized into the same groups, nested questions must still be nested, etc.). It is possible to have a QuestionnaireResponse whose 'questionnaire' element does not resolve. It is also possible for the questionnaire element to not have a value but only extensions (e.g. conveying the title or identifier for the questionnaire). This may happen for legacy data. If there is no formally defined Questionnaire, it is undefined what the 'correct' values for the linkId elements should be and it is possible that linkIds might be inconsistent for QuestionnaireResponses for the same form if captured by distinct systems.
    • Requirements: Needed to allow editing of the questionnaire response in a manner that enforces the constraints of the original form.
    • FHIR Type: canonical
    • Cardinality: 1..1
    • isModifier: false
    • isSummary: true
    questionnaireAnswersStatusEnum: QuestionnaireAnswersStatusEnum

    FHIR CodeSystem: QuestionnaireAnswersStatus

    status: null | EnumCodeType

    QuestionnaireResponse.status Element

    FHIR Specification

    • Short: in-progress | completed | amended | entered-in-error | stopped
    • Definition: The current state of the questionnaire response.
    • Comment: Unknown does not represent "other" - one of the defined statuses must apply. Unknown is used when the authoring system is not sure what the current status is.
    • Requirements: The information on Questionnaire resources may possibly be gathered during multiple sessions and altered after considered being finished.
    • FHIR Type: code
    • Cardinality: 1..1
    • isModifier: true
    • isModifierReason: This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid
    • isSummary: true

    CodeSystem Enumeration: QuestionnaireAnswersStatusEnum

    subject?: Reference

    QuestionnaireResponse.subject Element

    FHIR Specification

    • Short: The subject of the questions
    • Definition: 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.
    • Comment: If the Questionnaire declared a subjectType, the resource pointed to by this element must be an instance of one of the listed types.
    • Requirements: Links the questionnaire response to the Patient context. May also affect access control.
    • FHIR Type: Reference
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    encounter?: Reference

    QuestionnaireResponse.encounter Element

    FHIR Specification

    • Short: Encounter the questionnaire response is part of
    • Definition: The Encounter during which this questionnaire response was created or to which the creation of this record is tightly associated.
    • Comment: This will typically be the encounter the questionnaire response was created during, but some questionnaire responses may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter (e.g. pre-admission forms). A questionnaire that was initiated during an encounter but not fully completed during the encounter would still generally be associated with the encounter.
    • Requirements: Links the questionnaire response to the Encounter context. May also affect access control.
    • FHIR Type: Reference
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    authored?: DateTimeType

    QuestionnaireResponse.authored Element

    FHIR Specification

    • Short: Date the answers were gathered
    • Definition: The date and/or time that this questionnaire response was last modified by the user - e.g. changing answers or revising status.
    • Comment: May be different from the lastUpdateTime of the resource itself, because that reflects when the data was known to the server, not when the data was captured. This element is optional to allow for systems that might not know the value, however it SHOULD be populated if possible.
    • Requirements: Clinicians need to be able to check the date that the information in the questionnaire was collected, to derive the context of the answers.
    • FHIR Type: dateTime
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    author?: Reference

    QuestionnaireResponse.author Element

    FHIR Specification

    source?: Reference

    QuestionnaireResponse.source Element

    FHIR Specification

    QuestionnaireResponse.item Element

    FHIR Specification

    • Short: Groups and questions
    • Definition: A group or question item from the original questionnaire for which answers are provided.
    • Comment: Groups cannot have answers and therefore must nest directly within item. When dealing with questions, nesting must occur within each answer because some questions may have multiple answers (and the nesting occurs for each answer).\nWhen dealing with repeating items, each group repetition will be handled by a separate item. However, repeating questions are handled with a single question item and potentially multiple answers.
    • FHIR Type: BackboneElement
    • Cardinality: 0..*
    • isModifier: false
    • isSummary: false

    Methods

    • Parse the provided QuestionnaireResponse JSON to instantiate the QuestionnaireResponse data model.

      Parameters

      • sourceJson: Value

        JSON representing FHIR QuestionnaireResponse

      • OptionaloptSourceField: string

        Optional data source field (e.g. <complexTypeName>.<complexTypeFieldName>); defaults to QuestionnaireResponse

      Returns undefined | QuestionnaireResponse

      QuestionnaireResponse data model or undefined for QuestionnaireResponse

      JsonError if the provided JSON is not a valid JSON object

    • Assigns the provided value to the text property.

      Parameters

      Returns this

      this

    • Returns boolean

      true if the text property exists and has a value; false otherwise

    • Assigns the provided Resource array value to the contained property.

      Parameters

      • value: undefined | IResource[]

        the contained array value

      Returns this

      this

    • Returns boolean

      true if the contained property exists and has a value; false otherwise

    • Assigns the provided array of Extension values to the extension property.

      Parameters

      • extension: undefined | IExtension[]

        array of Extensions

      Returns this

      this

    • Determines if the extension property exists.

      Parameters

      • Optionalurl: string

        the url that identifies a specific Extension

      Returns boolean

      true if an Extension has the provided url; false otherwise

      If the url is provided, determines if an Extension having the provided url exists. If the url is not provided, determines if the extension property exists and has any values.

      AssertionError for invalid url

    • Adds the provided Extension to the extension property array.

      Parameters

      • extension: undefined | IExtension

        the Extension value to add to the extension property array

      Returns this

      this

    • Removes the Extension having the provided url from the extension property array.

      Parameters

      • url: string

        the url that identifies a specific Extension to remove

      Returns void

      AssertionError for invalid url

    • Determines if the modifierExtension property exists.

      Parameters

      • Optionalurl: string

        the url that identifies a specific Extension

      Returns boolean

      true if an Extension has the provided url

      If the url is provided, determines if an Extension having the provided url exists. If the url is not provided, determines if the modifierExtension property exists and has any values.

      AssertionError for invalid url

    • Assigns the provided PrimitiveType value to the id property.

      Parameters

      • element: undefined | IdType

        the id value

      Returns this

      this

    • Returns undefined | string

      the id property value as a primitive value

    • Assigns the provided primitive value to the id property.

      Parameters

      • value: undefined | string

        the id value

      Returns this

      this

      PrimitiveTypeError for invalid primitive types

    • Returns boolean

      true if the id property exists and has a value; false otherwise

    • Assigns the provided value to the meta property.

      Parameters

      • value: undefined | Meta

        the meta value

      Returns this

      this

    • Returns boolean

      true if the meta property exists and has a value; false otherwise

    • Assigns the provided primitive value to the implicitRules property.

      Parameters

      • value: undefined | string

        the implicitRules value

      Returns this

      this

      PrimitiveTypeError for invalid primitive types

    • Returns undefined | string

      the language property value as a primitive value

    • Assigns the provided primitive value to the language property.

      Parameters

      • value: undefined | string

        the language value

      Returns this

      this

      PrimitiveTypeError for invalid primitive types

    • Returns boolean

      true if the language property exists and has a value; false otherwise

    • Returns boolean

      true if the instance is a FHIR complex or primitive datatype; false otherwise