<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="shr-core-OnBehalfOf-extension" />
  <text>
    <status value="generated" />
    <div xmlns="http://www.w3.org/1999/xhtml">
      <p>
        <b>SHR OnBehalfOf Extension</b>
      </p>
      <p>The party represented by the actual participant.</p>
    </div>
  </text>
  <url value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-OnBehalfOf-extension" />
  <identifier>
    <system value="http://standardhealthrecord.org" />
    <value value="shr.core.OnBehalfOf" />
  </identifier>
  <version value="0.0.1" />
  <name value="SHR OnBehalfOf Extension" />
  <title value="SHR OnBehalfOf Extension" />
  <status value="draft" />
  <date value="2017-12-20" />
  <publisher value="The MITRE Corporation: Standard Health Record Collaborative" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://standardhealthrecord.org" />
    </telecom>
  </contact>
  <description value="The party represented by the actual participant." />
  <fhirVersion value="3.0.1" />
  <kind value="complex-type" />
  <abstract value="false" />
  <contextType value="resource" />
  <context value="*" />
  <type value="Extension" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension" />
  <derivation value="constraint" />
  <differential>
    <element id="Extension:onbehalfof">
      <path value="Extension" />
      <short value="SHR OnBehalfOf Extension" />
      <definition value="The party represented by the actual participant." />
      <min value="0" />
      <max value="*" />
      <constraint>
        <key value="choice-1" />
        <severity value="error" />
        <human value="shr-core-OnBehalfOf-extension SHALL have either extension('uri') or extension('party')" />
        <expression value="( extension('uri').url | extension('party').url ).distinct().count() == 1" />
      </constraint>
    </element>
    <element id="Extension:onbehalfof.extension:uri">
      <path value="Extension.extension" />
      <sliceName value="uri" />
      <definition value="The party represented by the actual participant." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://standardhealthrecord.org/fhir/StructureDefinition/primitive-uri-extension" />
      </type>
    </element>
    <element id="Extension:onbehalfof.extension:party">
      <path value="Extension.extension" />
      <sliceName value="party" />
      <definition value="A person, organization, or object that be involved in a healthcare activity. A party has a separate and distinct existence, and objective or conceptual reality. Includes information, physical objects, and roles." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-entity-Party-extension" />
      </type>
    </element>
    <element id="Extension:onbehalfof.url">
      <path value="Extension.url" />
      <type>
        <code value="uri" />
      </type>
      <fixedUri value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-OnBehalfOf-extension" />
    </element>
    <element id="Extension:onbehalfof.value[x]">
      <path value="Extension.value[x]" />
      <min value="0" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>