Release 4 R5 Final QA

This page is part of the FHIR Specification (v4.0.1: R4 (v5.0.0-draft-final: Final QA Preview for R5 - Mixed Normative and STU see ballot notes ) in it's permanent home (it will always be available at this URL). ). The current version which supercedes this version is 5.0.0 . For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R2

Content Examples Detailed Descriptions Mappings Profiles & Extensions R3 Conversions 2.38 Resource QuestionnaireResponse - Content

Example StructureDefinition/Product (JSON)

Compartments : Device , Encounter , Patient , Practitioner , RelatedPerson
FHIR Infrastructure Work Group Maturity Level : 3   Trial Use N/A Security Category Standards Status : Patient Informative
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. 2.38.1 Scope and Usage QuestionnaireResponse provides a complete or partial list of answers to a set of questions filled when responding to a questionnaire. The questions may be included directly or by reference to a Questionnaire resource that defines the questions as well as the constraints on the allowed answers. In some cases, both formal rules for editing the questionnaire (via link to Questionnaire ) as well as sufficient local information to allow rendering of the questionnaire may be provided. Each time a questionnaire is completed for a different subject or at a different time, a distinct QuestionnaireResponse is generated, though it may be possible for a previously entered set of answers to be edited or updated. Questionnaire responses cover the need to communicate data originating from forms used in medical history examinations, research questionnaires and sometimes full clinical specialty records. In many systems this data is collected using user-defined screens and forms. Questionnaire responses record specifics about data capture - exactly what questions were asked, in what order, what answers were given, etc. Each of these questions is part of the Questionnaire, and as such the Questionnaire is a separately identifiable Resource, whereas the individual questions are not. Examples of Questionnaires include: Past medical history (PMH) Family diseases Social history Research questionnaires and Case report forms (CRFs) Quality and evaluation forms Patient intake form (e.g. clipboard) Insurance claim form QuestionnaireResponse resources can be validated against their corresponding Questionnaire to verify that required groups and questions are answered and that answers fit constraints in terms of cardinality, data type, etc. 2.38.2 Boundaries and Relationships The QuestionnaireResponse resource captures the responses to a questionnaire, while Questionnaire represents the definition of the questionnaire form, including what questions are asked, how they're organized and the constraints on the allowed answers. While Observation , with its nested relatedObservation structure, can create complex hierarchies of questions and answers, the focus is different. First, Observation is used primarily for capturing data elements that are "true" observations - lab measurements, vital signs, social assessments, etc., while QuestionnaireResponse can be used to capture any types of data, including data that would typically map to other resources ( Procedure , Patient , MedicationStatement , etc.). Second, the focus of QuestionnaireResponse includes the specific phrasing and organization of the questions. All data must be explicitly captured as a question. With Observation , the focus is only on the meaning of the answer, not what question was asked (assuming a question was even asked at all). Additional information such as normal ranges, interpretation, date, etc., may also be captured. This resource is referenced by ClinicalImpression , Consent , Contract , DeviceUseStatement , FamilyMemberHistory and Observation 2.38.3 Resource Content

Structure Name Flags Card. Type Description & Constraints QuestionnaireResponse TU DomainResource A structured set of questions and their answers Elements defined in Ancestors: id , meta , implicitRules , language , text , contained , extension , modifierExtension identifier Σ 0..1 Identifier Unique id for this set of answers basedOn Σ 0..* Reference ( CarePlan | ServiceRequest ) Request fulfilled by this QuestionnaireResponse partOf Σ 0..* Reference ( Observation | Procedure ) Part of this action questionnaire Σ 0..1 canonical ( Questionnaire ) Form being answered status ?! Σ 1..1 code in-progress | completed | amended | entered-in-error | stopped QuestionnaireResponseStatus ( Required ) subject Σ 0..1 Reference ( Any ) The subject of the questions encounter Σ 0..1 Reference ( Encounter ) Encounter created as part of authored Σ 0..1 dateTime Date the answers were gathered author Σ 0..1 Reference ( Device | Practitioner | PractitionerRole | Patient | RelatedPerson | Organization ) Person who received and recorded the answers source Σ 0..1 Reference ( Patient | Practitioner | PractitionerRole | RelatedPerson ) The person who answered the questions item I 0..* BackboneElement Groups and questions + Rule: Nested item can't be beneath both item and answer linkId 1..1 string Pointer to specific item from Questionnaire definition 0..1 uri ElementDefinition - details for the item text 0..1 string Name for group or question text answer 0..* BackboneElement The response(s) to the question value[x] 0..1 Single-valued answer to the question Questionnaire Answer Codes ( Example ) valueBoolean boolean valueDecimal decimal valueInteger integer valueDate date valueDateTime dateTime valueTime time valueString string valueUri uri valueAttachment Attachment valueCoding Coding valueQuantity Quantity valueReference Reference ( Any ) item 0..* see item Nested groups and questions item 0..* see item Nested questionnaire response items Documentation for this format UML Diagram ( Legend ) QuestionnaireResponse ( DomainResource ) A business identifier assigned to a particular completed (or partially completed) questionnaire identifier : Identifier [0..1] 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 basedOn : Reference [0..*] « CarePlan | ServiceRequest » 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 partOf : Reference [0..*] « Observation | Procedure » The Questionnaire that defines and organizes the questions for which answers are being provided questionnaire : canonical [0..1] « Questionnaire » The position of the questionnaire response within its overall lifecycle (this element modifies the meaning of other elements) status : code [1..1] « Lifecycle status of the questionnaire response. (Strength=Required) QuestionnaireResponseStatus ! » 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 subject : Reference [0..1] « Any » The Encounter during which this questionnaire response was created or to which the creation of this record is tightly associated encounter : Reference [0..1] « Encounter » The date and/or time that this set of answers were last changed authored : dateTime [0..1] Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system author : Reference [0..1] « Device | Practitioner | PractitionerRole | Patient | RelatedPerson | Organization » The person who answered the questions about the subject source : Reference [0..1] « Patient | Practitioner | PractitionerRole | RelatedPerson » Item The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource linkId : string [1..1] A reference to an [[[ElementDefinition]]] that provides the details for the item definition : uri [0..1] Text that is displayed above the contents of the group or as the text of the question being answered text : string [0..1] Answer The answer (or one of the answers) provided by the respondent to the question value[x] : Type [0..1] « boolean | decimal | integer | date | dateTime | time | string | uri | Attachment | Coding | Quantity | Reference ( Any ); Code indicating the response provided for a question. (Strength=Example) QuestionnaireAnswerCodes ?? » Nested groups and/or questions found within this particular answer item [0..*] The respondent's answer(s) to the question answer [0..*] Questions or sub-groups nested beneath a question or group item [0..*] A group or question item from the original questionnaire for which answers are provided item [0..*] XML Template < <!-- from --> <!-- from --> <</identifier> <</basedOn> <</partOf> <</questionnaire> < <</subject> <</encounter> < <| </author> <</source> < < < < < <| </value[x]> <</item> </answer> <</item> </item> </QuestionnaireResponse> JSON Template { "resourceType" : "", // from // from " " " " " " " " "| " " " " " " ">, ">, ">, ">", ">", ">", ">", ">", " }, " }, " }, " }, " }], " }] } Turtle Template @prefix fhir: <http://hl7.org/fhir/> . [ a fhir:; fhir:nodeRole fhir:treeRoot; # if this is the parser root # from # from fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: # . One of these 12 fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir:) ] fhir: ], ...; fhir: ], ...; ] Changes since R3 QuestionnaireResponse QuestionnaireResponse.basedOn Type Reference: Added Target Type ServiceRequest Type Reference: Removed Target Types ReferralRequest, ProcedureRequest QuestionnaireResponse.partOf Renamed from parent to partOf QuestionnaireResponse.questionnaire Type changed from Reference(Questionnaire) to canonical(Questionnaire) QuestionnaireResponse.status Change value set from http://hl7.org/fhir/ValueSet/questionnaire-answers-status to http://hl7.org/fhir/ValueSet/questionnaire-answers-status|4.0.1 QuestionnaireResponse.encounter Added Element QuestionnaireResponse.author Type Reference: Added Target Types PractitionerRole, Organization QuestionnaireResponse.source Type Reference: Added Target Type PractitionerRole QuestionnaireResponse.context deleted QuestionnaireResponse.item.subject deleted See the Full Difference for further information This analysis is available as XML or Raw JSON . See R3 <--> R4 Conversion Maps (status = 5 tests that all execute ok. 1 fail round-trip testing and 5 r3 resources are invalid (0 errors). ) Structure Name Flags Card. Type Description & Constraints QuestionnaireResponse TU DomainResource A structured set of questions and their answers Elements defined in Ancestors: id , meta , implicitRules , language , text , contained , extension , modifierExtension identifier Σ 0..1 Identifier Unique id for this set of answers basedOn Σ 0..* Reference ( CarePlan | ServiceRequest ) Request fulfilled by this QuestionnaireResponse partOf Σ 0..* Reference ( Observation | Procedure ) Part of this action questionnaire Σ 0..1 canonical form ( Questionnaire ) Form being answered status ?! Σ 1..1 code in-progress | completed | amended | entered-in-error | stopped QuestionnaireResponseStatus ( Required ) subject Σ 0..1 Reference ( Any ) The subject of the questions encounter Σ 0..1 Reference ( Encounter ) Encounter created as part of authored Σ 0..1 dateTime Date the answers were gathered author Σ 0..1 Reference ( Device | Practitioner | PractitionerRole | Patient | RelatedPerson | Organization ) Person who received and recorded the answers source Σ 0..1 Reference ( Patient | Practitioner | PractitionerRole | RelatedPerson ) The person who answered the questions item I 0..* BackboneElement Groups and questions + Rule: Nested item can't be beneath both item and answer linkId 1..1 string Pointer to specific item from Questionnaire definition 0..1 uri ElementDefinition - details for the item text 0..1 string Name for group or question text answer 0..* BackboneElement The response(s) to the question value[x] 0..1 Single-valued answer to the question Questionnaire Answer Codes ( Example ) valueBoolean boolean valueDecimal decimal valueInteger integer valueDate date valueDateTime dateTime valueTime time valueString string valueUri uri valueAttachment Attachment valueCoding Coding valueQuantity Quantity valueReference Reference ( Any ) item 0..* see item Nested groups and questions item 0..* also see item Nested questionnaire response items Documentation for this format UML Diagram ( Legend ) QuestionnaireResponse ( DomainResource JSON Format Specification ) A business identifier assigned to a particular completed (or partially completed) questionnaire identifier : Identifier [0..1] 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 basedOn : Reference [0..*] « CarePlan | ServiceRequest » 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 partOf : Reference [0..*] « Observation | Procedure » The Questionnaire that defines and organizes the questions for which answers are being provided questionnaire : canonical [0..1] « Questionnaire » The position of the questionnaire response within its overall lifecycle (this element modifies the meaning of other elements) status : code [1..1] « Lifecycle status of the questionnaire response. (Strength=Required) QuestionnaireResponseStatus ! » 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 subject : Reference [0..1] « Any » The Encounter during which this questionnaire response was created or to which the creation of this record is tightly associated encounter : Reference [0..1] « Encounter » The date and/or time that this set of answers were last changed authored : dateTime [0..1] Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system author : Reference [0..1] « Device | Practitioner | PractitionerRole | Patient | RelatedPerson | Organization » The person who answered the questions about the subject source : Reference [0..1] « Patient | Practitioner | PractitionerRole | RelatedPerson » Item The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource linkId : string [1..1] A reference to an [[[ElementDefinition]]] that provides the details for the item definition : uri [0..1] Text that is displayed above the contents of the group or as the text of the question being answered text : string [0..1] Answer The answer (or one of the answers) provided by the respondent to the question value[x] : Type [0..1] « boolean | decimal | integer | date | dateTime | time | string | uri | Attachment | Coding | Quantity | Reference ( Any ); Code indicating the response provided for a question. (Strength=Example) QuestionnaireAnswerCodes ?? » Nested groups and/or questions found within this particular answer item [0..*] The respondent's answer(s) to the question answer [0..*] Questions or sub-groups nested beneath a question or group item [0..*] A group or question item from the original questionnaire for which answers are provided item [0..*] XML Template

< <!-- from --> <!-- from --> <</identifier> <</basedOn> <</partOf> <</questionnaire> < <</subject> <</encounter> < <| </author> <</source> < < < < < <| </value[x]> <</item> </answer> <</item> </item> </QuestionnaireResponse>

JSON Template Logical Model Product

{ "resourceType" : "", // from // from " " " " " " " " "| " " " " " " ">, ">, ">, ">", ">", ">", ">", ">", " }, " }, " }, " }, " }], " }]
{
  "resourceType" : "StructureDefinition",
  "id" : "Product",
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">to do</div>"
  },
  "extension" : [{
    "url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
    "valueCode" : "informative"
  }],
  "url" : "http://hl7.org/fhir/StructureDefinition/Product",
  "version" : "5.0.0-draft-final",
  "name" : "Product",
  "title" : "product",
  "status" : "draft",
  "experimental" : false,
  "date" : "2023-03-01T23:03:57+11:00",
  "publisher" : "Health Level Seven International fhir",
  "contact" : [{
    "telecom" : [{
      "system" : "url",
      "value" : "http://hl7.org/fhir"
    }]
  }],
  "description" : "Logical Model: A pattern to be followed by resources that represent a product used in healthcare, for clinical or operational purposes.",
  "jurisdiction" : [{
    "coding" : [{
      "system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
      "code" : "001",
      "display" : "World"
    }]
  }],
  "fhirVersion" : "5.0.0-draft-final",
  "mapping" : [{
    "identity" : "rim",
    "uri" : "http://hl7.org/v3",
    "name" : "RIM Mapping"
  },
  {
    "identity" : "v2",
    "uri" : "http://hl7.org/v2",
    "name" : "HL7 V2 Mapping"
  },
  {
    "identity" : "w5",
    "uri" : "http://hl7.org/fhir/fivews",
    "name" : "FiveWs Pattern Mapping"
  }],
  "kind" : "logical",
  "abstract" : false,
  "type" : "Product",
  "baseDefinition" : "http://hl7.org/fhir/StructureDefinition/Base",
  "snapshot" : {
    "element" : [{
      "id" : "Product",
      "path" : "Product",
      "short" : "Product Pattern",
      "definition" : "A pattern to be followed by resources that represent a product used in healthcare, for clinical or operational purposes.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Product",
        "min" : 0,
        "max" : "*"
      },
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "Act[moodCode=EVN]"
      }]
    },
    {
      "id" : "Product.status",
      "path" : "Product.status",
      "short" : "active | inactive | entered-in-error",
      "definition" : "The current state of the product.",
      "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.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "Product.status",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "code"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "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,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/build/StructureDefinition/binding-definition",
          "valueString" : "Codes identifying the lifecycle stage of a product."
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "ProductStatus"
        }],
        "strength" : "required",
        "description" : "Codes identifying the lifecycle stage of a product.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/product-status|5.0.0-draft-final"
      },
      "mapping" : [{
        "identity" : "v2",
        "map" : "Varies by domain"
      },
      {
        "identity" : "rim",
        "map" : ".status"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.status"
      }]
    },
    {
      "id" : "Product.category",
      "path" : "Product.category",
      "short" : "A category or class of the product",
      "definition" : "A category of the product. For example drug class, or device type. A product can have one or several categories. The categories can be from an official / regulatory source, or internal categorization or classification schemes. Categories are useful in search and retrieval of products, or can be used for determining authorizations, e.g. who can order which kinds of products.",
      "alias" : ["class"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Product.category",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "v2",
        "map" : "Varies by domain"
      },
      {
        "identity" : "rim",
        "map" : ".code"
      }]
    },
    {
      "id" : "Product.code",
      "path" : "Product.code",
      "short" : "A code designating a specific type of product",
      "definition" : "The code assigned to the product, for example a catalog number, Device DI, Drug Code or other. Can be an internally assigned or an official product code such as the manufacturer-assigned code. There may be different codes for a product, having different levels of granularity. For example \"0123456789\" corresponding to \"CompuHyper GlobalMed, UltraImplantable 2.25 x 8 mm\".",
      "alias" : ["type"],
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Product.code",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "v2",
        "map" : "Varies by domain"
      },
      {
        "identity" : "rim",
        "map" : ".code"
      }]
    },
    {
      "id" : "Product.manufacturer",
      "path" : "Product.manufacturer",
      "short" : "Manufacturer, representative or officially responsible for the product",
      "definition" : "The organisation (manufacturer, representative or legal authorization holder) that is responsible for the device.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Product.manufacturer",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Organization"]
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "v2",
        "map" : "Varies by domain"
      }]
    },
    {
      "id" : "Product.instance",
      "path" : "Product.instance",
      "short" : "One or several physical instances or occurrences of the product",
      "definition" : "Conveys instance-level information about this product item. One or several physical, countable instances or occurrences of the product.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Product.instance",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Element"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "Product.instance.quantity",
      "path" : "Product.instance.quantity",
      "short" : "The amount of items",
      "definition" : "For products that represent a particular quantity of a substance or type of item, indicates how 'much' of the product (by weight, volume, count, etc.) is represented by this resource instance.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Product.instance.quantity",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Quantity",
        "profile" : ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"]
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "Product.instance.identifier",
      "path" : "Product.instance.identifier",
      "short" : "The identifier for the physical instance, typically a serial number",
      "definition" : "The identifier for the physical instance, typically a serial number.",
      "alias" : ["serialNumber"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Product.instance.identifier",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Identifier"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "Product.instance.lotNumber",
      "path" : "Product.instance.lotNumber",
      "short" : "The identification of the batch or lot of the product",
      "definition" : "The identification of the batch or lot of the product.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Product.instance.lotNumber",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "Product.instance.expiry",
      "path" : "Product.instance.expiry",
      "short" : "The expiry date or date and time for the product",
      "definition" : "The time after which the product is no longer expected to be in proper condition, or its use is not advised or not allowed.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Product.instance.expiry",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "dateTime"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "isSummary" : false
    },
    {
      "id" : "Product.instance.subject",
      "path" : "Product.instance.subject",
      "short" : "Individual the product is associated with, or which has used the product",
      "definition" : "Individual the product is associated with, or which has used the product.",
      "comment" : "[For resources that aren't patient-specific, the set of allowed resources may be extended to include other things.  Group should generally be retained unless there's certainty this resource won't be used for veterinary, research or public health settings where Group may be necessary (e.g. this cage of rats/crate of chickens, group of people in a 5 mile radious of the incident, etc.)].",
      "requirements" : "Links the product to the Patient context.",
      "alias" : ["patient"],
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Product.instance.subject",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Patient",
        "http://hl7.org/fhir/StructureDefinition/Group"]
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "v2",
        "map" : "PAT in proximity to EVN segment"
      },
      {
        "identity" : "rim",
        "map" : ".participation[typeCode=SBJ].role"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.subject"
      }]
    },
    {
      "id" : "Product.note",
      "path" : "Product.note",
      "short" : "Comments made about the product",
      "definition" : "Comments made about the product.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "Product.note",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Annotation"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "source" : "http://hl7.org/fhir/StructureDefinition/Element"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "v2",
        "map" : "NTE"
      }]
    }]
  }

}
Turtle Template @prefix fhir: <http://hl7.org/fhir/> . [ a fhir:; fhir:nodeRole fhir:treeRoot; # if this is the parser root # from # from fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: fhir: # . One of these 12 fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir: ] fhir:) ] fhir: ], ...; fhir: ], ...; ]

Changes since Release 3 QuestionnaireResponse QuestionnaireResponse.basedOn Type Reference: Added Target Type ServiceRequest Type Reference: Removed Target Types ReferralRequest, ProcedureRequest QuestionnaireResponse.partOf Renamed from parent to partOf QuestionnaireResponse.questionnaire Type changed from Reference(Questionnaire) to canonical(Questionnaire) QuestionnaireResponse.status Change value set from http://hl7.org/fhir/ValueSet/questionnaire-answers-status Usage note: every effort has been made to http://hl7.org/fhir/ValueSet/questionnaire-answers-status|4.0.1 QuestionnaireResponse.encounter Added Element QuestionnaireResponse.author Type Reference: Added Target Types PractitionerRole, Organization QuestionnaireResponse.source Type Reference: Added Target Type PractitionerRole QuestionnaireResponse.context deleted QuestionnaireResponse.item.subject deleted See the Full Difference for further information This analysis is available as XML or JSON . See R3 <--> R4 Conversion Maps (status = 5 tests ensure that all execute ok. 1 fail round-trip testing and 5 r3 resources are invalid (0 errors). )   See the Profiles & Extensions and the alternate definitions: Master Definition XML + JSON , XML Schema / Schematron + JSON Schema , ShEx (for Turtle ) + see the extensions & the dependency analysis 2.38.3.1 Terminology Bindings Path Definition Type Reference QuestionnaireResponse.status Lifecycle status of the questionnaire response. Required QuestionnaireResponseStatus QuestionnaireResponse.item.answer.value[x] Code indicating the response provided for a question. Example QuestionnaireAnswerCodes 2.38.3.2 Constraints id Level Location Description Expression qrs-1 Rule QuestionnaireResponse.item Nested item can't be beneath both item and answer (answer.exists() and item.exists()).not() 2.38.4 Notes QuestionnaireResponses can be authored by clinicians, patients, or patients' relatives (or even owners in the case of animals). Clinicians may author questionnaire responses, where the answers examples are provided by others on behalf of the patient. Additionally, information gathered on behalf of a patient may be about the patient's relatives (e.g. in family anamnesis). Therefore, QuestionnaireResponse makes a distinction between the author, the subject and the source of information. The QuestionnaireResponse's encounter element can be used to link to the encounter when the questionnaire response was authored. This can be relevant since the encounter gives context to the answers and can be used to relate information in the QuestionnaireResponse to orders and observations that were done during the same Encounter. The QuestionnaireResponse's language element can be used to indicte the language in which the patient completed the survey/questionnaire The order of questions within groups, groups within groups and groups within questions is relevant and must be retained for display and capture. The hierarchy items within the Questionnaire SHALL mirror the hierarchy of the corresponding Questionnaire (if any). For use of QuestionnaireResponse.item.definition, see notes on Questionnaire Because of the lack of explicit support for Questionnaires in HL7 v3 , CDA Documents frequently used named sections with Observations to model questionnaires. Such use cases should now utilize the QuestionnaireResponse resource instead. Refer to additional guidance provided in the Questionnaire resource dealing with the design of questionnaires. 2.38.4.1 Links to Questionnaire A QuestionnaireResponse may be stand-alone or may point to the definition of the questions in Questionnaire . If the QuestionnaireResponse refers to a Questionnaire: 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. The linkage between the questions correct and groups in the two resources is established using the linkId element When a QuestionnaireResponse references a Questionnaire, all the items in the questionnaire SHOULD be included in the QuestionnaireResponse if useful, but they are relevant to the interpretation of the answers, including items of type = display . This might also include items that were >not enabled when the Questionnaire was answered, though of course these will not have answers 2.38.4.2 Security QuestionnaireResponse resources can have answers with values of type Attachment. These attachments will typically be selected by the user answering the questionnaire and this selection may be done in an uncontrolled environment. Systems should ensure that the attachment is of the desired type and should take precautions before rendering or executing any attached content. 2.38.4.3 Access Control For most resources, the type of information that can be conveyed in the resource is determined by the resource, and the key attributes that determine the sensitivity level of the information are also known; e.g., drug, observation type, clinical trial randomization status, etc. However, for QuestionnaireResponse, the sensitivity of an instance is dependent on what type of Questionnaire it is associated with. And the data elements that determine that sensitivity could be the answers to any of the questions. This makes automatically enforcing access control rules more challenging. Designers should take these challenges into account and may need to place stricter access controls around QuestionnaireResponse to ensure that access to information is not granted improperly. 2.38.5 Search Parameters Search parameters for this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services. Name Type Description Expression In Common author reference The author of the questionnaire response QuestionnaireResponse.author ( Practitioner , Organization , Device , Patient , PractitionerRole , RelatedPerson ) authored date When the questionnaire response was last changed QuestionnaireResponse.authored based-on reference Plan/proposal/order fulfilled by this questionnaire response QuestionnaireResponse.basedOn ( CarePlan , ServiceRequest ) encounter reference Encounter associated with the questionnaire response QuestionnaireResponse.encounter ( Encounter ) identifier token The unique identifier for the questionnaire response QuestionnaireResponse.identifier part-of reference Procedure or observation this questionnaire response was performed as a normative part of QuestionnaireResponse.partOf ( Observation , Procedure ) patient reference The patient that is the subject of the questionnaire response QuestionnaireResponse.subject.where(resolve() is Patient) ( Patient ) questionnaire reference The questionnaire the answers are provided for QuestionnaireResponse.questionnaire ( Questionnaire ) source reference The individual providing the information reflected in the questionnaire respose QuestionnaireResponse.source ( Practitioner , Patient , PractitionerRole , RelatedPerson ) status token The status of the questionnaire response QuestionnaireResponse.status subject reference The subject of the questionnaire response QuestionnaireResponse.subject (Any) specification.