<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="shr-entity-Group" />
  <text>
    <status value="generated" />
    <div xmlns="http://www.w3.org/1999/xhtml">
      <p>
        <b>SHR Group Profile</b>
      </p>
      <p>A set of entities (personnel, material, or places) to be considered together. May be a pool of like-type resources, a team, or combination of personnel, material and places.</p>
      <p>
        <b>SHR Mapping Summary</b>
      </p>
      <p>
        <pre>shr.entity.Group maps to Group:
  ActiveFlag maps to active
  Type maps to type
  Definitional maps to actual
  constrain code to 0..0
  Title maps to name
  MembershipCriterion maps to characteristic.value[x]
  MembershipCriterion.ObservationCode maps to characteristic.code
  MembershipCriterion.ExcludeFlag maps to characteristic.exclude
  MembershipCriterion.TimePeriod maps to characteristic.period
  Member.Patient maps to member.entity
  Member.Practitioner maps to member.entity
  Member.Device maps to member.entity
  Member.Medication maps to member.entity
  Member.Substance maps to member.entity
  Member.ParticipationPeriod maps to member.period
  Member.ActiveFlag maps to member.inactive // TODO this is an inverse TF mapping
  Count maps to quantity
</pre>
      </p>
    </div>
  </text>
  <url value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-entity-Group" />
  <identifier>
    <system value="http://standardhealthrecord.org" />
    <value value="shr.entity.Group" />
  </identifier>
  <version value="0.0.1" />
  <name value="SHR Group Profile" />
  <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="A set of entities (personnel, material, or places) to be considered together. May be a pool of like-type resources, a team, or combination of personnel, material and places." />
  <fhirVersion value="3.0.1" />
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/w5" />
    <name value="W5 Mapping" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Group" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Group" />
  <derivation value="constraint" />
  <differential>
    <element id="Group:shr-entity-Group">
      <path value="Group" />
      <short value="SHR Group Profile" />
      <definition value="A set of entities (personnel, material, or places) to be considered together. May be a pool of like-type resources, a team, or combination of personnel, material and places." />
    </element>
    <element id="Group:shr-entity-Group.extension:relatedencounter">
      <path value="Group.extension" />
      <sliceName value="relatedencounter" />
      <definition value="If content was generated during a patient encounter, related encounter is the encounter where the information was gained." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-base-RelatedEncounter-extension" />
      </type>
    </element>
    <element id="Group:shr-entity-Group.extension:author">
      <path value="Group.extension" />
      <sliceName value="author" />
      <definition value="The person or organization who created the entry and is responsible for (and may certify) the content." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-base-Author-extension" />
      </type>
    </element>
    <element id="Group:shr-entity-Group.extension:informant">
      <path value="Group.extension" />
      <sliceName value="informant" />
      <definition value="The person or entity that provided the information in the entry, as distinct from who created the entry, e.g. the subject (patient), medical professional, family member, device or software program." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-base-Informant-extension" />
      </type>
    </element>
    <element id="Group:shr-entity-Group.code">
      <path value="Group.code" />
      <min value="0" />
      <max value="0" />
    </element>
    <element id="Group:shr-entity-Group.characteristic">
      <path value="Group.characteristic" />
    </element>
    <element id="Group:shr-entity-Group.characteristic.value[x]">
      <path value="Group.characteristic.value[x]" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <type>
        <code value="boolean" />
      </type>
      <type>
        <code value="Quantity" />
        <profile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-Quantity" />
      </type>
      <type>
        <code value="Range" />
        <profile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-Range" />
      </type>
    </element>
    <element id="Group:shr-entity-Group.member">
      <path value="Group.member" />
    </element>
    <element id="Group:shr-entity-Group.member.entity">
      <path value="Group.member.entity" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-entity-Patient" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-entity-Practitioner" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-device-Device" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-entity-Medication" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-entity-Substance" />
      </type>
    </element>
  </differential>
</StructureDefinition>