<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="shr-core-Annotation" />
  <text>
    <status value="generated" />
    <div xmlns="http://www.w3.org/1999/xhtml">
      <p>
        <b>SHR Annotation Profile</b>
      </p>
      <p>An added or follow-up note, often after the fact, that contains metadata about who made the statement and when.</p>
      <p>
        <b>SHR Mapping Summary</b>
      </p>
      <p>
        <pre>shr.core.Annotation maps to Annotation:
  string maps to text
  Author maps to author[x]
  OccurrenceTime maps to time
</pre>
      </p>
    </div>
  </text>
  <url value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-Annotation" />
  <identifier>
    <system value="http://standardhealthrecord.org" />
    <value value="shr.core.Annotation" />
  </identifier>
  <version value="0.0.1" />
  <name value="SHR Annotation 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="An added or follow-up note, often after the fact, that contains metadata about who made the statement and when." />
  <fhirVersion value="3.0.1" />
  <mapping>
    <identity value="v2" />
    <uri value="http://hl7.org/v2" />
    <name value="HL7 v2 Mapping" />
  </mapping>
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <kind value="complex-type" />
  <abstract value="false" />
  <type value="Annotation" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Annotation" />
  <derivation value="constraint" />
  <snapshot>
    <element id="Annotation:shr-core-Annotation">
      <path value="Annotation" />
      <short value="SHR Annotation Profile" />
      <definition value="An added or follow-up note, often after the fact, that contains metadata about who made the statement and when." />
      <comment value="For systems that do not have structured annotations, they can simply communicate a single annotation with no author or time.  This element may need to be included in narrative because of the potential for modifying information.  *Annotations SHOULD NOT* be used to communicate &quot;modifying&quot; information that could be computable. (This is a SHOULD because enforcing user behavior is nearly impossible)." />
      <min value="0" />
      <max value="*" />
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() | (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="Element" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="N/A" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="Act" />
      </mapping>
    </element>
    <element id="Annotation:shr-core-Annotation.id">
      <path value="Annotation.id" />
      <representation value="xmlAttr" />
      <short value="xml:id (or equivalent in JSON)" />
      <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Element.id" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Annotation:shr-core-Annotation.extension">
      <path value="Annotation.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <description value="Extensions are always sliced by (at least) url" />
        <rules value="open" />
      </slicing>
      <short value="Additional Content defined by implementations" />
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." />
      <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." />
      <alias value="extensions" />
      <alias value="user content" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Element.extension" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Extension" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Annotation:shr-core-Annotation.author[x]">
      <path value="Annotation.author[x]" />
      <short value="Individual responsible for the annotation" />
      <definition value="The individual responsible for making the annotation." />
      <min value="1" />
      <max value="1" />
      <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-RelatedPerson" />
      </type>
      <type>
        <code value="string" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="N/A" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="Act.participant[typeCode=AUT].role" />
      </mapping>
    </element>
    <element id="Annotation:shr-core-Annotation.time">
      <path value="Annotation.time" />
      <short value="When the annotation was made" />
      <definition value="Indicates when this particular annotation was made." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="N/A" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="Act.effectiveTime" />
      </mapping>
    </element>
    <element id="Annotation:shr-core-Annotation.text">
      <path value="Annotation.text" />
      <short value="The annotation  - text content" />
      <definition value="The text of the annotation." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <mapping>
        <identity value="v2" />
        <map value="N/A" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="Act.text" />
      </mapping>
    </element>
  </snapshot>
  <differential>
    <element id="Annotation:shr-core-Annotation">
      <path value="Annotation" />
      <short value="SHR Annotation Profile" />
      <definition value="An added or follow-up note, often after the fact, that contains metadata about who made the statement and when." />
    </element>
    <element id="Annotation:shr-core-Annotation.author[x]">
      <path value="Annotation.author[x]" />
      <min value="1" />
      <max value="1" />
      <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-RelatedPerson" />
      </type>
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="Annotation:shr-core-Annotation.time">
      <path value="Annotation.time" />
      <min value="1" />
      <max value="1" />
    </element>
  </differential>
</StructureDefinition>