FHIR Extensions Pack
5.1.0-ballot1 - Ballot for Release 5.1.0 International flag

This page is part of the FHIR Core Extensions Registry (v5.1.0-ballot: Releases Ballot 4) based on FHIR (HL7® FHIR® Standard) v5.0.0. The current version which supersedes this version is 1.0.0. For a full list of available versions, see the Directory of published versions

: FML Conversion for AuditEvent: R5 to R4 - XML Representation

Page standards status: Trial-use Maturity Level: 1

Raw xml | Download



<StructureMap xmlns="http://hl7.org/fhir">
  <id value="AuditEvent5to4"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><pre class="fml">
<span style="color: #cc00cc">/// <b>url</b> = </span><span style="color: blue">'http://hl7.org/fhir/StructureMap/AuditEvent5to4'</span>
<span style="color: #cc00cc">/// <b>name</b> = </span><span style="color: blue">'AuditEvent5to4'</span>
<span style="color: #cc00cc">/// <b>title</b> = </span><span style="color: blue">'FML Conversion for AuditEvent: R5 to R4'</span>
<span style="color: #cc00cc">/// <b>status</b> = </span><span style="color: blue">'active'</span>

<b>conceptmap</b><span style="color: navy"> &quot;</span>AuditEventAction<span style="color: navy">&quot; {
</span><b>  prefix </b>s<span style="color: navy"> = &quot;</span><a href="http://hl7.org/fhir/R5/codesystem-audit-event-action.html" title="Audit Event Action">http://hl7.org/fhir/audit-event-action</a><span style="color: navy">&quot;
</span><b>  prefix </b>t<span style="color: navy"> = &quot;</span><a href="http://hl7.org/fhir/R4/codesystem-audit-event-action.html" title="AuditEventAction">http://hl7.org/fhir/4.0/audit-event-action</a><span style="color: navy">&quot;
</span>
  s<span style="color: navy">:</span>C <b>-</b> t<span style="color: navy">:</span>C
  s<span style="color: navy">:</span>R <b>-</b> t<span style="color: navy">:</span>R
  s<span style="color: navy">:</span>U <b>-</b> t<span style="color: navy">:</span>U
  s<span style="color: navy">:</span>D <b>-</b> t<span style="color: navy">:</span>D
  s<span style="color: navy">:</span>E <b>-</b> t<span style="color: navy">:</span>E
<span style="color: navy">}

</span><b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R5/auditevent.html" title="AuditEvent">http://hl7.org/fhir/StructureDefinition/AuditEvent</a><span style="color: navy">&quot; </span><b>alias </b>AuditEventR5 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/auditevent.html" title="AuditEvent">http://hl7.org/fhir/4.0/StructureDefinition/AuditEvent</a><span style="color: navy">&quot; </span><b>alias </b>AuditEventR4 <b>as </b><b>target</b>

<b>imports</b><span style="color: navy"> &quot;</span>http://hl7.org/fhir/StructureMap/*5to4<span style="color: navy">&quot;
</span>
<b>group </b>AuditEvent<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>AuditEventR5, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>AuditEventR4<span style="color: navy">)</span><b> extends </b>DomainResource<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.category<span style="color: navy"><b> -&gt; </b></span>tgt.type<span style="color: navy">;</span>
  src.code<span style="color: navy"><b> -&gt; </b></span>tgt.subtype<span style="color: navy">;</span>
  src.action<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.action = <b>translate</b><span style="color: navy">(</span><span style="color: maroon">v</span><span style="color: navy">, </span><span style="color: blue">'#AuditEventAction'</span><span style="color: navy">, </span><span style="color: blue">'code'</span><span style="color: navy">)</span><span style="color: navy">;</span>
  src.recorded<span style="color: navy"><b> -&gt; </b></span>tgt.recorded<span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">src.severity as v -&gt; tgt.severity = translate(v, '#AuditEventSeverity', 'code');</span>
  src.outcome<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>tgt.outcome<b> as </b><span style="color: maroon">t</span><b> then </b>AuditEventOutcome<span style="color: navy">(</span><span style="color: maroon">s</span><span style="color: navy">, </span><span style="color: maroon">t</span><span style="color: navy">)</span><span style="color: navy">;</span>
  src.outcome<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>tgt.outcomeDesc<b> as </b><span style="color: maroon">t</span><b> then </b>AuditEventOutcomeDesc<span style="color: navy">(</span><span style="color: maroon">s</span><span style="color: navy">, </span><span style="color: maroon">t</span><span style="color: navy">)</span><span style="color: navy">;</span>
  src.agent<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>tgt.agent<b> as </b><span style="color: maroon">t</span><b> then </b>AuditEventAgent<span style="color: navy">(</span><span style="color: maroon">s</span><span style="color: navy">, </span><span style="color: maroon">t</span><span style="color: navy">)</span><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">src.authorization -&gt; tgt.authorization;</span>
  src.source<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>tgt.source<b> as </b><span style="color: maroon">t</span><b> then </b>AuditEventSource<span style="color: navy">(</span><span style="color: maroon">s</span><span style="color: navy">, </span><span style="color: maroon">t</span><span style="color: navy">)</span><span style="color: navy">;</span>
  src.entity<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>tgt.entity<b> as </b><span style="color: maroon">t</span><b> then </b>AuditEventEntity<span style="color: navy">(</span><span style="color: maroon">s</span><span style="color: navy">, </span><span style="color: maroon">t</span><span style="color: navy">)</span><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>AuditEventOutcome<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span>, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy">)</span><b> extends </b>BackboneElement<span style="color: navy"> {
</span>  src.code<b> as </b><span style="color: maroon">s</span><b> where </b>code = 'success'<span style="color: navy"><b> -&gt; </b></span>tgt = <span style="color: blue">'0'</span><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">src.code -&gt; tgt.code;</span>
  src.code<b> as </b><span style="color: maroon">s</span><b> where </b>code = 'information'<span style="color: navy"><b> -&gt; </b></span>tgt = <span style="color: blue">'0'</span><span style="color: navy">;</span>
  src.code<b> as </b><span style="color: maroon">s</span><b> where </b>code = 'warning'<span style="color: navy"><b> -&gt; </b></span>tgt = <span style="color: blue">'4'</span><span style="color: navy">;</span>
  src.code<b> as </b><span style="color: maroon">s</span><b> where </b>code = 'error'<span style="color: navy"><b> -&gt; </b></span>tgt = <span style="color: blue">'8'</span><span style="color: navy">;</span>
  src.code<b> as </b><span style="color: maroon">s</span><b> where </b>code = 'fatal'<span style="color: navy"><b> -&gt; </b></span>tgt = <span style="color: blue">'12'</span><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>AuditEventOutcomeDesc<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span>, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy">)</span><b> extends </b>BackboneElement<span style="color: navy"> {
</span>  src.code<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>tgt = <span style="color: maroon">s.display</span><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>AuditEventAgent<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span>, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy">)</span><b> extends </b>BackboneElement<span style="color: navy"> {
</span>  src.type<span style="color: navy"><b> -&gt; </b></span>tgt.type<span style="color: navy">;</span>
  src.role<span style="color: navy"><b> -&gt; </b></span>tgt.role<span style="color: navy">;</span>
  src.who<span style="color: navy"><b> -&gt; </b></span>tgt.who<span style="color: navy">;</span>
  src.requestor<span style="color: navy"><b> -&gt; </b></span>tgt.requestor<span style="color: navy">;</span>
  src.location<span style="color: navy"><b> -&gt; </b></span>tgt.location<span style="color: navy">;</span>
  src.policy<span style="color: navy"><b> -&gt; </b></span>tgt.policy<span style="color: navy">;</span>
  src.network<span style="color: navy"> : </span>Reference<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span> tgt.network<b> as </b><span style="color: maroon">t</span><span style="color: navy">, </span> t.address = <span style="color: maroon">v.display</span><span style="color: navy">;</span>
  src.network<span style="color: navy"> : </span>uri<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span> tgt.network<b> as </b><span style="color: maroon">t</span><span style="color: navy">, </span> t.address = <span style="color: maroon">v</span><span style="color: navy">;</span>
  src.network<span style="color: navy"> : </span>string<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span> tgt.network<b> as </b><span style="color: maroon">t</span><span style="color: navy">, </span> t.address = <span style="color: maroon">v</span><span style="color: navy">;</span>
  src.authorization<span style="color: navy"><b> -&gt; </b></span>tgt.purposeOfUse<span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>AuditEventSource<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span>, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy">)</span><b> extends </b>BackboneElement<span style="color: navy"> {
</span>  src.site<span style="color: navy"> : </span>Reference<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span><span style="color: maroon">tgt</span><b> then</b><span style="color: navy"> {
</span>    s.display<span style="color: navy"><b> -&gt; </b></span>tgt.site<span style="color: navy">;</span>
  <span style="color: navy">}</span><span style="color: navy">;</span>
  src.observer<span style="color: navy"><b> -&gt; </b></span>tgt.observer<span style="color: navy">;</span>
  src.type<span style="color: navy"><b> -&gt; </b></span>tgt.type<span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>AuditEventEntity<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span>, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy">)</span><b> extends </b>BackboneElement<span style="color: navy"> {
</span>  src.what<span style="color: navy"><b> -&gt; </b></span>tgt.what<span style="color: navy">;</span>
  src.role<span style="color: navy"><b> -&gt; </b></span>tgt.role<span style="color: navy">;</span>
  src.securityLabel<span style="color: navy"><b> -&gt; </b></span>tgt.securityLabel<span style="color: navy">;</span>
  src.query<span style="color: navy"><b> -&gt; </b></span>tgt.query<span style="color: navy">;</span>
  src.detail<b> as </b><span style="color: maroon">s</span><span style="color: navy"><b> -&gt; </b></span>tgt.detail<b> as </b><span style="color: maroon">t</span><b> then </b>AuditEventEntityDetail<span style="color: navy">(</span><span style="color: maroon">s</span><span style="color: navy">, </span><span style="color: maroon">t</span><span style="color: navy">)</span><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>AuditEventEntityDetail<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span>, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy">)</span><b> extends </b>BackboneElement<span style="color: navy"> {
</span>  src.type<span style="color: navy"><b> -&gt; </b></span>tgt.type<span style="color: navy">;</span>
  src.value<span style="color: navy"> : </span>Quantity<span style="color: navy"><b> -&gt; </b></span>tgt.value<span style="color: navy">;</span>
  src.value<span style="color: navy"> : </span>CodeableConcept<span style="color: navy"><b> -&gt; </b></span>tgt.value<span style="color: navy">;</span>
  src.value<span style="color: navy"> : </span>string<span style="color: navy"><b> -&gt; </b></span>tgt.value<span style="color: navy">;</span>
  src.value<span style="color: navy"> : </span>boolean<span style="color: navy"><b> -&gt; </b></span>tgt.value<span style="color: navy">;</span>
  src.value<span style="color: navy"> : </span>integer<span style="color: navy"><b> -&gt; </b></span>tgt.value<span style="color: navy">;</span>
  src.value<span style="color: navy"> : </span>Range<span style="color: navy"><b> -&gt; </b></span>tgt.value<span style="color: navy">;</span>
  src.value<span style="color: navy"> : </span>Ratio<span style="color: navy"><b> -&gt; </b></span>tgt.value<span style="color: navy">;</span>
  src.value<span style="color: navy"> : </span>time<span style="color: navy"><b> -&gt; </b></span>tgt.value<span style="color: navy">;</span>
  src.value<span style="color: navy"> : </span>dateTime<span style="color: navy"><b> -&gt; </b></span>tgt.value<span style="color: navy">;</span>
  src.value<span style="color: navy"> : </span>Period<span style="color: navy"><b> -&gt; </b></span>tgt.value<span style="color: navy">;</span>
  src.value<span style="color: navy"> : </span>base64Binary<span style="color: navy"><b> -&gt; </b></span>tgt.value<span style="color: navy">;</span>
<span style="color: navy">}

</span></pre></div>
  </text>
  <contained>
    <ConceptMap>
      <id value="AuditEventAction"/>
      <status value="active"/>
      <group>
        <source value="http://hl7.org/fhir/audit-event-action"/>
        <target value="http://hl7.org/fhir/4.0/audit-event-action"/>
        <element>
          <code value="C"/>
          <target>
            <code value="C"/>
            <relationship value="related-to"/>
          </target>
        </element>
        <element>
          <code value="R"/>
          <target>
            <code value="R"/>
            <relationship value="related-to"/>
          </target>
        </element>
        <element>
          <code value="U"/>
          <target>
            <code value="U"/>
            <relationship value="related-to"/>
          </target>
        </element>
        <element>
          <code value="D"/>
          <target>
            <code value="D"/>
            <relationship value="related-to"/>
          </target>
        </element>
        <element>
          <code value="E"/>
          <target>
            <code value="E"/>
            <relationship value="related-to"/>
          </target>
        </element>
      </group>
    </ConceptMap>
  </contained>
  <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="http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom">
        <valueCanonical
                        value="http://hl7.org/fhir/extensions/ImplementationGuide/hl7.fhir.uv.extensions"/>
      </extension>
    </valueInteger>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
    <valueCode value="trial-use">
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom">
        <valueCanonical
                        value="http://hl7.org/fhir/extensions/ImplementationGuide/hl7.fhir.uv.extensions"/>
      </extension>
    </valueCode>
  </extension>
  <url value="http://hl7.org/fhir/StructureMap/AuditEvent5to4"/>
  <version value="5.1.0-ballot1"/>
  <name value="AuditEvent5to4"/>
  <title value="FML Conversion for AuditEvent: R5 to R4"/>
  <status value="active"/>
  <date value="2023-12-19T08:40:03+11:00"/>
  <publisher value="HL7 International / FHIR Infrastructure"/>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="http://www.hl7.org/Special/committees/fiwg"/>
    </telecom>
  </contact>
  <description value="FMLConversionforAuditEventR5toR4"/>
  <jurisdiction>
    <coding>
      <system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
      <code value="001"/>
    </coding>
  </jurisdiction>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/AuditEvent"/>
    <mode value="source"/>
    <alias value="AuditEventR5"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/4.0/StructureDefinition/AuditEvent"/>
    <mode value="target"/>
    <alias value="AuditEventR4"/>
  </structure>
  <import value="http://hl7.org/fhir/StructureMap/*5to4"/>
  <group>
    <name value="AuditEvent"/>
    <extends value="DomainResource"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="AuditEventR5"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="AuditEventR4"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="category"/>
      <source>
        <context value="src"/>
        <element value="category"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="type"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="code"/>
      <source>
        <context value="src"/>
        <element value="code"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="subtype"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="action"/>
      <source>
        <context value="src"/>
        <element value="action"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="action"/>
        <transform value="translate"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
        <parameter>
          <valueString value="#AuditEventAction"/>
        </parameter>
        <parameter>
          <valueString value="code"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="recorded"/>
      <source>
        <context value="src"/>
        <element value="recorded"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="recorded"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
      <documentation
                     value="src.severity as v -&gt; tgt.severity = translate(v, '#AuditEventSeverity', 'code');"/>
    </rule>
    <rule>
      <name value="outcome"/>
      <source>
        <context value="src"/>
        <element value="outcome"/>
        <variable value="s"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="outcome"/>
        <variable value="t"/>
      </target>
      <dependent>
        <name value="AuditEventOutcome"/>
        <parameter>
          <valueId value="s"/>
        </parameter>
        <parameter>
          <valueId value="t"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="outcome"/>
      <source>
        <context value="src"/>
        <element value="outcome"/>
        <variable value="s"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="outcomeDesc"/>
        <variable value="t"/>
      </target>
      <dependent>
        <name value="AuditEventOutcomeDesc"/>
        <parameter>
          <valueId value="s"/>
        </parameter>
        <parameter>
          <valueId value="t"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="agent"/>
      <source>
        <context value="src"/>
        <element value="agent"/>
        <variable value="s"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="agent"/>
        <variable value="t"/>
      </target>
      <dependent>
        <name value="AuditEventAgent"/>
        <parameter>
          <valueId value="s"/>
        </parameter>
        <parameter>
          <valueId value="t"/>
        </parameter>
      </dependent>
      <documentation value="src.authorization -&gt; tgt.authorization;"/>
    </rule>
    <rule>
      <name value="source"/>
      <source>
        <context value="src"/>
        <element value="source"/>
        <variable value="s"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="source"/>
        <variable value="t"/>
      </target>
      <dependent>
        <name value="AuditEventSource"/>
        <parameter>
          <valueId value="s"/>
        </parameter>
        <parameter>
          <valueId value="t"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="entity"/>
      <source>
        <context value="src"/>
        <element value="entity"/>
        <variable value="s"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="entity"/>
        <variable value="t"/>
      </target>
      <dependent>
        <name value="AuditEventEntity"/>
        <parameter>
          <valueId value="s"/>
        </parameter>
        <parameter>
          <valueId value="t"/>
        </parameter>
      </dependent>
    </rule>
  </group>
  <group>
    <name value="AuditEventOutcome"/>
    <extends value="BackboneElement"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="code"/>
      <source>
        <context value="src"/>
        <element value="code"/>
        <variable value="s"/>
        <condition value="code = 'success'"/>
      </source>
      <target>
        <context value="tgt"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="0"/>
        </parameter>
      </target>
      <documentation value="src.code -&gt; tgt.code;"/>
    </rule>
    <rule>
      <name value="code"/>
      <source>
        <context value="src"/>
        <element value="code"/>
        <variable value="s"/>
        <condition value="code = 'information'"/>
      </source>
      <target>
        <context value="tgt"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="0"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="code"/>
      <source>
        <context value="src"/>
        <element value="code"/>
        <variable value="s"/>
        <condition value="code = 'warning'"/>
      </source>
      <target>
        <context value="tgt"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="4"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="code"/>
      <source>
        <context value="src"/>
        <element value="code"/>
        <variable value="s"/>
        <condition value="code = 'error'"/>
      </source>
      <target>
        <context value="tgt"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="8"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="code"/>
      <source>
        <context value="src"/>
        <element value="code"/>
        <variable value="s"/>
        <condition value="code = 'fatal'"/>
      </source>
      <target>
        <context value="tgt"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="12"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="AuditEventOutcomeDesc"/>
    <extends value="BackboneElement"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="code"/>
      <source>
        <context value="src"/>
        <element value="code"/>
        <variable value="s"/>
      </source>
      <target>
        <context value="tgt"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="s.display"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="AuditEventAgent"/>
    <extends value="BackboneElement"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="type"/>
      <source>
        <context value="src"/>
        <element value="type"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="type"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="role"/>
      <source>
        <context value="src"/>
        <element value="role"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="role"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="who"/>
      <source>
        <context value="src"/>
        <element value="who"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="who"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="requestor"/>
      <source>
        <context value="src"/>
        <element value="requestor"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="requestor"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="location"/>
      <source>
        <context value="src"/>
        <element value="location"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="location"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="policy"/>
      <source>
        <context value="src"/>
        <element value="policy"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="policy"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="networkReference"/>
      <source>
        <context value="src"/>
        <type value="Reference"/>
        <element value="network"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="network"/>
        <variable value="t"/>
      </target>
      <target>
        <context value="t"/>
        <element value="address"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v.display"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="networkUri"/>
      <source>
        <context value="src"/>
        <type value="uri"/>
        <element value="network"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="network"/>
        <variable value="t"/>
      </target>
      <target>
        <context value="t"/>
        <element value="address"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="networkString"/>
      <source>
        <context value="src"/>
        <type value="string"/>
        <element value="network"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="network"/>
        <variable value="t"/>
      </target>
      <target>
        <context value="t"/>
        <element value="address"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="authorization"/>
      <source>
        <context value="src"/>
        <element value="authorization"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="purposeOfUse"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
  </group>
  <group>
    <name value="AuditEventSource"/>
    <extends value="BackboneElement"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="siteReference"/>
      <source>
        <context value="src"/>
        <type value="Reference"/>
        <element value="site"/>
        <variable value="s"/>
      </source>
      <target>
        <transform value="copy"/>
        <parameter>
          <valueId value="tgt"/>
        </parameter>
      </target>
      <rule>
        <name value="display"/>
        <source>
          <context value="s"/>
          <element value="display"/>
          <variable value="vvv"/>
        </source>
        <target>
          <context value="tgt"/>
          <element value="site"/>
          <variable value="vvv"/>
          <transform value="create"/>
        </target>
        <dependent>
          <name value="DefaultMappingGroupAnonymousAlias"/>
          <parameter>
            <valueId value="vvv"/>
          </parameter>
          <parameter>
            <valueId value="vvv"/>
          </parameter>
        </dependent>
      </rule>
    </rule>
    <rule>
      <name value="observer"/>
      <source>
        <context value="src"/>
        <element value="observer"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="observer"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="type"/>
      <source>
        <context value="src"/>
        <element value="type"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="type"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
  </group>
  <group>
    <name value="AuditEventEntity"/>
    <extends value="BackboneElement"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="what"/>
      <source>
        <context value="src"/>
        <element value="what"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="what"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="role"/>
      <source>
        <context value="src"/>
        <element value="role"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="role"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="securityLabel"/>
      <source>
        <context value="src"/>
        <element value="securityLabel"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="securityLabel"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="query"/>
      <source>
        <context value="src"/>
        <element value="query"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="query"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="detail"/>
      <source>
        <context value="src"/>
        <element value="detail"/>
        <variable value="s"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="detail"/>
        <variable value="t"/>
      </target>
      <dependent>
        <name value="AuditEventEntityDetail"/>
        <parameter>
          <valueId value="s"/>
        </parameter>
        <parameter>
          <valueId value="t"/>
        </parameter>
      </dependent>
    </rule>
  </group>
  <group>
    <name value="AuditEventEntityDetail"/>
    <extends value="BackboneElement"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="type"/>
      <source>
        <context value="src"/>
        <element value="type"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="type"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="valueQuantity"/>
      <source>
        <context value="src"/>
        <type value="Quantity"/>
        <element value="value"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="valueCodeableConcept"/>
      <source>
        <context value="src"/>
        <type value="CodeableConcept"/>
        <element value="value"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="valueString"/>
      <source>
        <context value="src"/>
        <type value="string"/>
        <element value="value"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="valueBoolean"/>
      <source>
        <context value="src"/>
        <type value="boolean"/>
        <element value="value"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="valueInteger"/>
      <source>
        <context value="src"/>
        <type value="integer"/>
        <element value="value"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="valueRange"/>
      <source>
        <context value="src"/>
        <type value="Range"/>
        <element value="value"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="valueRatio"/>
      <source>
        <context value="src"/>
        <type value="Ratio"/>
        <element value="value"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="valueTime"/>
      <source>
        <context value="src"/>
        <type value="time"/>
        <element value="value"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="valueDateTime"/>
      <source>
        <context value="src"/>
        <type value="dateTime"/>
        <element value="value"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="valuePeriod"/>
      <source>
        <context value="src"/>
        <type value="Period"/>
        <element value="value"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
    <rule>
      <name value="valueBase64Binary"/>
      <source>
        <context value="src"/>
        <type value="base64Binary"/>
        <element value="value"/>
        <variable value="vvv"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <variable value="vvv"/>
        <transform value="create"/>
      </target>
      <dependent>
        <name value="DefaultMappingGroupAnonymousAlias"/>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
        <parameter>
          <valueId value="vvv"/>
        </parameter>
      </dependent>
    </rule>
  </group>
</StructureMap>