<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="workflow-researchStudy" />
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
    <valueCode value="fhir" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
    <valueInteger value="1" />
  </extension>
  <url value="http://hl7.org/fhir/StructureDefinition/workflow-researchStudy" />
  <version value="4.0.0" />
  <name value="researchStudy" />
  <title value="Associated Study" />
  <status value="draft" />
  <date value="2017-12-06" />
  <publisher value="Health Level Seven, Inc. - FHIR WG" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://hl7.org/special/committees/fwg" />
    </telecom>
  </contact>
  <description value="Indicates that this event is relevant to the specified research study(ies)." />
  <fhirVersion value="4.0.0" />
  <mapping>
    <identity value="workflow" />
    <uri value="http://hl7.org/fhir/workflow" />
    <name value="Workflow Pattern" />
  </mapping>
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <kind value="complex-type" />
  <abstract value="false" />
  <context>
    <type value="element" />
    <expression value="Composition" />
  </context>
  <context>
    <type value="element" />
    <expression value="Consent" />
  </context>
  <context>
    <type value="element" />
    <expression value="DeviceUseStatement" />
  </context>
  <context>
    <type value="element" />
    <expression value="DiagnosticReport" />
  </context>
  <context>
    <type value="element" />
    <expression value="Encounter" />
  </context>
  <context>
    <type value="element" />
    <expression value="FamilyMemberHistory" />
  </context>
  <context>
    <type value="element" />
    <expression value="Immunization" />
  </context>
  <context>
    <type value="element" />
    <expression value="Media" />
  </context>
  <context>
    <type value="element" />
    <expression value="MedicationAdministration" />
  </context>
  <context>
    <type value="element" />
    <expression value="MedicationDispense" />
  </context>
  <context>
    <type value="element" />
    <expression value="MedicationStatement" />
  </context>
  <context>
    <type value="element" />
    <expression value="Observation" />
  </context>
  <context>
    <type value="element" />
    <expression value="Procedure" />
  </context>
  <context>
    <type value="element" />
    <expression value="QuestionnaireResponse" />
  </context>
  <context>
    <type value="element" />
    <expression value="RiskAssessment" />
  </context>
  <context>
    <type value="element" />
    <expression value="SupplyDelivery" />
  </context>
  <context>
    <type value="element" />
    <expression value="Task" />
  </context>
  <type value="Extension" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension" />
  <derivation value="constraint" />
  <differential>
    <element id="Extension">
      <path value="Extension" />
      <short value="Associated research study" />
      <definition value="Indicates that this event is relevant to the specified research study(ies)." />
      <comment value="This relevance might mean that the even occurred as part of the study protocol, but can also include events that occurred outside the study but still have relevance (e.g. adverse events, co-occurring medications, unexpected Observations, etc.)." />
      <min value="0" />
      <max value="*" />
      <mapping>
        <identity value="workflow" />
        <map value="Event.researchStudy" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".outboundRelationship[typeCode=PERT].target[classCode=CLNTRL, moodCode=EVN]" />
      </mapping>
    </element>
    <element id="Extension.extension">
      <path value="Extension.extension" />
      <max value="0" />
    </element>
    <element id="Extension.url">
      <path value="Extension.url" />
      <type>
        <code value="uri" />
      </type>
      <fixedUri value="http://hl7.org/fhir/StructureDefinition/workflow-researchStudy" />
    </element>
    <element id="Extension.valueReference">
      <path value="Extension.valueReference" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/ResearchStudy" />
      </type>
    </element>
  </differential>
</StructureDefinition>