<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="ca-on-eReferral-profile-QuestionnaireResponse" />
  <url value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-QuestionnaireResponse" />
  <version value="1.1.0" />
  <name value="EReferralQuestionnaireResponse" />
  <title value="QuestionnaireResponse" />
  <status value="draft" />
  <description value="QuestionnaireResponse resource is used to capture additional information, notes, record question/answers, etc. about the referral. This resource will be referrenced via ServiceRequest resource." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="QuestionnaireResponse" />
  <baseDefinition value="http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-QuestionnaireResponse" />
  <derivation value="constraint" />
  <differential>
    <element id="QuestionnaireResponse.meta">
      <path value="QuestionnaireResponse.meta" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="QuestionnaireResponse.meta.profile">
      <path value="QuestionnaireResponse.meta.profile" />
      <comment value="#### **_` FOR eREFERRAL USAGE: The meta.profile = http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-QuestionnaireResponse|1.1.0 `_**&#xD;&#xA;&#xD;&#xA;It is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time.  The list of profile URLs is a set." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="QuestionnaireResponse.identifier">
      <path value="QuestionnaireResponse.identifier" />
      <mustSupport value="false" />
    </element>
    <element id="QuestionnaireResponse.identifier.system">
      <path value="QuestionnaireResponse.identifier.system" />
      <min value="1" />
      <mustSupport value="false" />
    </element>
    <element id="QuestionnaireResponse.identifier.value">
      <path value="QuestionnaireResponse.identifier.value" />
      <min value="1" />
      <mustSupport value="false" />
    </element>
    <element id="QuestionnaireResponse.basedOn">
      <path value="QuestionnaireResponse.basedOn" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-ServiceRequest" />
      </type>
    </element>
    <element id="QuestionnaireResponse.partOf">
      <path value="QuestionnaireResponse.partOf" />
      <max value="1" />
    </element>
    <element id="QuestionnaireResponse.questionnaire">
      <path value="QuestionnaireResponse.questionnaire" />
      <mustSupport value="true" />
    </element>
    <element id="QuestionnaireResponse.subject">
      <path value="QuestionnaireResponse.subject" />
      <comment value="#### **_`FOR EREFERRAL USAGE: The subject of QuestionnaireResponse MUST be same as the subject in the ServiceRequest. `_**&#xD;&#xA;&#xD;&#xA;If the Questionnaire declared a subjectType, the resource pointed to by this element must be an instance of one of the listed types." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-Patient" />
      </type>
    </element>
    <element id="QuestionnaireResponse.author">
      <path value="QuestionnaireResponse.author" />
      <definition value="**Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the system.**" />
      <comment value="#### **_`FOR EREFERRAL USAGE: If blank, can assume that the author = ServiceRequest.requester. Note questionnaireResponse has a few uses: 1) for supplimentary information added when submitting a referral 2) for additional data sets (such as assessments) added AFTER the initial referral submission (e.g., by the provider). For case 1, if blank it can safely be assumed that the author = ServiceRequest.requester.`_**&#xD;&#xA;&#xD;&#xA;Mapping a subject's answers to multiple choice options and determining what to put in the textual answer is a matter of interpretation.  Authoring by device would indicate that some portion of the questionnaire had been auto-populated.&#xD;&#xA;&#xD;&#xA;If blank, can assume that the author = ServiceRequest.requester. Note questionnaireResponse has a few uses: 1) for supplimentary information added when submitting a referral 2) for additional data sets (such as assessments) added AFTER the initial referral submission (e.g., by the provider). For case 1, if blank it can safely be assumed that the author = ServiceRequest.requester." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ehealthontario.ca/fhir/StructureDefinition/ca-on-eReferral-profile-PractitionerRole" />
      </type>
    </element>
  </differential>
</StructureDefinition>