FHIR Extensions Pack
5.1.0 - 5.1.0 (April 2024) International flag

This page is part of the FHIR Core Extensions Registry (v5.1.0: Release 5.1) based on FHIR (HL7® FHIR® Standard) v5.0.0. This is the current published version. For a full list of available versions, see the Directory of published versions

: FML Conversion for primitive datatypes: R4 to R5 - XML Representation

Page standards status: Trial-use Maturity Level: 1

Raw xml | Download



<StructureMap xmlns="http://hl7.org/fhir">
  <id value="Primitives4to5"/>
  <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/Primitives4to5'</span>
<span style="color: #cc00cc">/// <b>name</b> = </span><span style="color: blue">'Primitives4to5'</span>
<span style="color: #cc00cc">/// <b>title</b> = </span><span style="color: blue">'FML Conversion for primitive datatypes: R4 to R5'</span>
<span style="color: #cc00cc">/// <b>status</b> = </span><span style="color: blue">'draft'</span>

<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/datatypes.html#base64Binary" title="base64Binary">http://hl7.org/fhir/4.0/StructureDefinition/base64Binary</a><span style="color: navy">&quot; </span><b>alias </b>base64BinaryR4 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R5/datatypes.html#base64Binary" title="base64Binary">http://hl7.org/fhir/StructureDefinition/base64Binary</a><span style="color: navy">&quot; </span><b>alias </b>base64BinaryR5 <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/datatypes.html#boolean" title="boolean">http://hl7.org/fhir/4.0/StructureDefinition/boolean</a><span style="color: navy">&quot; </span><b>alias </b>booleanR4 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R5/datatypes.html#boolean" title="boolean">http://hl7.org/fhir/StructureDefinition/boolean</a><span style="color: navy">&quot; </span><b>alias </b>booleanR5 <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/datatypes.html#canonical" title="canonical">http://hl7.org/fhir/4.0/StructureDefinition/canonical</a><span style="color: navy">&quot; </span><b>alias </b>canonicalR4 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R5/datatypes.html#canonical" title="canonical">http://hl7.org/fhir/StructureDefinition/canonical</a><span style="color: navy">&quot; </span><b>alias </b>canonicalR5 <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/datatypes.html#code" title="code">http://hl7.org/fhir/4.0/StructureDefinition/code</a><span style="color: navy">&quot; </span><b>alias </b>codeR4 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R5/datatypes.html#code" title="code">http://hl7.org/fhir/StructureDefinition/code</a><span style="color: navy">&quot; </span><b>alias </b>codeR5 <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/datatypes.html#date" title="date">http://hl7.org/fhir/4.0/StructureDefinition/date</a><span style="color: navy">&quot; </span><b>alias </b>dateR4 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R5/datatypes.html#date" title="date">http://hl7.org/fhir/StructureDefinition/date</a><span style="color: navy">&quot; </span><b>alias </b>dateR5 <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/datatypes.html#dateTime" title="dateTime">http://hl7.org/fhir/4.0/StructureDefinition/dateTime</a><span style="color: navy">&quot; </span><b>alias </b>dateTimeR4 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R5/datatypes.html#dateTime" title="dateTime">http://hl7.org/fhir/StructureDefinition/dateTime</a><span style="color: navy">&quot; </span><b>alias </b>dateTimeR5 <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/datatypes.html#decimal" title="decimal">http://hl7.org/fhir/4.0/StructureDefinition/decimal</a><span style="color: navy">&quot; </span><b>alias </b>decimalR4 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R5/datatypes.html#decimal" title="decimal">http://hl7.org/fhir/StructureDefinition/decimal</a><span style="color: navy">&quot; </span><b>alias </b>decimalR5 <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/datatypes.html#id" title="id">http://hl7.org/fhir/4.0/StructureDefinition/id</a><span style="color: navy">&quot; </span><b>alias </b>idR4 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R5/datatypes.html#id" title="id">http://hl7.org/fhir/StructureDefinition/id</a><span style="color: navy">&quot; </span><b>alias </b>idR5 <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/datatypes.html#instant" title="instant">http://hl7.org/fhir/4.0/StructureDefinition/instant</a><span style="color: navy">&quot; </span><b>alias </b>instantR4 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R5/datatypes.html#instant" title="instant">http://hl7.org/fhir/StructureDefinition/instant</a><span style="color: navy">&quot; </span><b>alias </b>instantR5 <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/datatypes.html#integer" title="integer">http://hl7.org/fhir/4.0/StructureDefinition/integer</a><span style="color: navy">&quot; </span><b>alias </b>integerR4 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R5/datatypes.html#integer" title="integer">http://hl7.org/fhir/StructureDefinition/integer</a><span style="color: navy">&quot; </span><b>alias </b>integerR5 <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R5/datatypes.html#integer64" title="integer64">http://hl7.org/fhir/StructureDefinition/integer64</a><span style="color: navy">&quot; </span><b>alias </b>integer64R5 <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/datatypes.html#markdown" title="markdown">http://hl7.org/fhir/4.0/StructureDefinition/markdown</a><span style="color: navy">&quot; </span><b>alias </b>markdownR4 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R5/datatypes.html#markdown" title="markdown">http://hl7.org/fhir/StructureDefinition/markdown</a><span style="color: navy">&quot; </span><b>alias </b>markdownR5 <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/datatypes.html#oid" title="oid">http://hl7.org/fhir/4.0/StructureDefinition/oid</a><span style="color: navy">&quot; </span><b>alias </b>oidR4 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R5/datatypes.html#oid" title="oid">http://hl7.org/fhir/StructureDefinition/oid</a><span style="color: navy">&quot; </span><b>alias </b>oidR5 <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/datatypes.html#positiveInt" title="positiveInt">http://hl7.org/fhir/4.0/StructureDefinition/positiveInt</a><span style="color: navy">&quot; </span><b>alias </b>positiveIntR4 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R5/datatypes.html#positiveInt" title="positiveInt">http://hl7.org/fhir/StructureDefinition/positiveInt</a><span style="color: navy">&quot; </span><b>alias </b>positiveIntR5 <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/datatypes.html#string" title="string">http://hl7.org/fhir/4.0/StructureDefinition/string</a><span style="color: navy">&quot; </span><b>alias </b>stringR4 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R5/datatypes.html#string" title="string">http://hl7.org/fhir/StructureDefinition/string</a><span style="color: navy">&quot; </span><b>alias </b>stringR5 <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/datatypes.html#time" title="time">http://hl7.org/fhir/4.0/StructureDefinition/time</a><span style="color: navy">&quot; </span><b>alias </b>timeR4 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R5/datatypes.html#time" title="time">http://hl7.org/fhir/StructureDefinition/time</a><span style="color: navy">&quot; </span><b>alias </b>timeR5 <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/datatypes.html#unsignedInt" title="unsignedInt">http://hl7.org/fhir/4.0/StructureDefinition/unsignedInt</a><span style="color: navy">&quot; </span><b>alias </b>unsignedIntR4 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R5/datatypes.html#unsignedInt" title="unsignedInt">http://hl7.org/fhir/StructureDefinition/unsignedInt</a><span style="color: navy">&quot; </span><b>alias </b>unsignedIntR5 <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/datatypes.html#uri" title="uri">http://hl7.org/fhir/4.0/StructureDefinition/uri</a><span style="color: navy">&quot; </span><b>alias </b>uriR4 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R5/datatypes.html#uri" title="uri">http://hl7.org/fhir/StructureDefinition/uri</a><span style="color: navy">&quot; </span><b>alias </b>uriR5 <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/datatypes.html#url" title="url">http://hl7.org/fhir/4.0/StructureDefinition/url</a><span style="color: navy">&quot; </span><b>alias </b>urlR4 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R5/datatypes.html#url" title="url">http://hl7.org/fhir/StructureDefinition/url</a><span style="color: navy">&quot; </span><b>alias </b>urlR5 <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/datatypes.html#uuid" title="uuid">http://hl7.org/fhir/4.0/StructureDefinition/uuid</a><span style="color: navy">&quot; </span><b>alias </b>uuidR4 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R5/datatypes.html#uuid" title="uuid">http://hl7.org/fhir/StructureDefinition/uuid</a><span style="color: navy">&quot; </span><b>alias </b>uuidR5 <b>as </b><b>target</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/narrative.html#xhtml" title="xhtml">http://hl7.org/fhir/4.0/StructureDefinition/xhtml</a><span style="color: navy">&quot; </span><b>alias </b>xhtmlR4 <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R5/narrative.html#xhtml" title="xhtml">http://hl7.org/fhir/StructureDefinition/xhtml</a><span style="color: navy">&quot; </span><b>alias </b>xhtmlR5 <b>as </b><b>target</b>

<b>imports</b><span style="color: navy"> &quot;</span><a href="StructureMap-Element4to5.html" title="FML Conversion for Element: R4 to R5">http://hl7.org/fhir/StructureMap/Element4to5</a><span style="color: navy">&quot;
</span>
<b>group </b>base64Binary<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>base64BinaryR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>base64BinaryR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;base64BinaryValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>boolean<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>booleanR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>booleanR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;booleanValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>canonical<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>canonicalR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>canonicalR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;canonicalValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>canonical2uri<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>canonicalR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>uriR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;types&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;canonical2uriValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>code<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>codeR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>codeR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;codeValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>code2id<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>codeR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>idR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;types&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;code2idValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>code2string<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>codeR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>stringR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;types&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;code2stringValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>code2uri<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>codeR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>uriR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;types&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;code2uriValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>date<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>dateR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>dateR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;dateValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>date2dateTime<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>dateR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>dateTimeR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;types&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;date2dateTimeValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>dateTime<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>dateTimeR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>dateTimeR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;dateTimeValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>dateTime2date<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>dateTimeR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>dateR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;types&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;dateTime2dateValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>decimal<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>decimalR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>decimalR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;decimalValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>id<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>idR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>idR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;idValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>id2code<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>idR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>codeR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;types&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;id2codeValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>id2string<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>idR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>stringR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;types&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;id2stringValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>instant<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>instantR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>instantR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;instantValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>integer<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>integerR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>integerR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;integerValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>integer2integer64<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>integerR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>integer64R5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;types&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;integer2integer64Value&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>markdown<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>markdownR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>markdownR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;markdownValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>markdown2string<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>markdownR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>stringR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;markdown2stringValue&quot;</i><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">todo: deal with markdown escaping issues</span>
<span style="color: navy">}

</span><b>group </b>oid<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>oidR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>oidR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;oidValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>positiveInt<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>positiveIntR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>positiveIntR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;positiveIntValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>string<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>stringR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>stringR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;stringValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>string2markdown<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>stringR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>markdownR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;types&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;string2markdownValue&quot;</i><span style="color: navy">;</span> <span style="color: navy">// </span><span style="color: green">todo: deal with markdown escaping issues</span>
<span style="color: navy">}

</span><b>group </b>string2id<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>stringR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>idR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;types&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;string2idValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>string2code<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>stringR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>codeR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;types&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;string2codeValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>string2integer64<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>stringR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>integer64R5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;types&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;string2integer64Value&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>time<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>timeR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>timeR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;timeValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>unsignedInt<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>unsignedIntR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>unsignedIntR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;unsignedIntValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>unsignedInt2integer64<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>unsignedIntR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>integer64R5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;unsignedInt2integer64Value&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>uri<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>uriR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>uriR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;uriValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>uri2canonical<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>uriR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>canonicalR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;types&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;uri2canonicalValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>uri2code<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>uriR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>codeR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;types&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;uri2codeValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>url<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>urlR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>urlR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;urlValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>uuid<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>uuidR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>uuidR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;uuidValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span><b>group </b>xhtml<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>xhtmlR4, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>xhtmlR5<span style="color: navy">)</span><b> extends </b>Element<b> &lt;&lt;type+&gt;&gt;</b><span style="color: navy"> {
</span>  src.value<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.value = <span style="color: maroon">v</span> <i>&quot;xhtmlValue&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span></pre></div>
  </text>
  <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/Primitives4to5"/>
  <version value="5.1.0"/>
  <name value="Primitives4to5"/>
  <title value="FML Conversion for primitive datatypes: R4 to R5"/>
  <status value="draft"/>
  <date value="2024-04-27T18:54:50+10: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="FMLConversionforprimitivedatatypesR4toR5"/>
  <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/4.0/StructureDefinition/base64Binary"/>
    <mode value="source"/>
    <alias value="base64BinaryR4"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/base64Binary"/>
    <mode value="target"/>
    <alias value="base64BinaryR5"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/4.0/StructureDefinition/boolean"/>
    <mode value="source"/>
    <alias value="booleanR4"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/boolean"/>
    <mode value="target"/>
    <alias value="booleanR5"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/4.0/StructureDefinition/canonical"/>
    <mode value="source"/>
    <alias value="canonicalR4"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/canonical"/>
    <mode value="target"/>
    <alias value="canonicalR5"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/4.0/StructureDefinition/code"/>
    <mode value="source"/>
    <alias value="codeR4"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/code"/>
    <mode value="target"/>
    <alias value="codeR5"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/4.0/StructureDefinition/date"/>
    <mode value="source"/>
    <alias value="dateR4"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/date"/>
    <mode value="target"/>
    <alias value="dateR5"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/4.0/StructureDefinition/dateTime"/>
    <mode value="source"/>
    <alias value="dateTimeR4"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/dateTime"/>
    <mode value="target"/>
    <alias value="dateTimeR5"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/4.0/StructureDefinition/decimal"/>
    <mode value="source"/>
    <alias value="decimalR4"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/decimal"/>
    <mode value="target"/>
    <alias value="decimalR5"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/4.0/StructureDefinition/id"/>
    <mode value="source"/>
    <alias value="idR4"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/id"/>
    <mode value="target"/>
    <alias value="idR5"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/4.0/StructureDefinition/instant"/>
    <mode value="source"/>
    <alias value="instantR4"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/instant"/>
    <mode value="target"/>
    <alias value="instantR5"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/4.0/StructureDefinition/integer"/>
    <mode value="source"/>
    <alias value="integerR4"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/integer"/>
    <mode value="target"/>
    <alias value="integerR5"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/integer64"/>
    <mode value="target"/>
    <alias value="integer64R5"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/4.0/StructureDefinition/markdown"/>
    <mode value="source"/>
    <alias value="markdownR4"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/markdown"/>
    <mode value="target"/>
    <alias value="markdownR5"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/4.0/StructureDefinition/oid"/>
    <mode value="source"/>
    <alias value="oidR4"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/oid"/>
    <mode value="target"/>
    <alias value="oidR5"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/4.0/StructureDefinition/positiveInt"/>
    <mode value="source"/>
    <alias value="positiveIntR4"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/positiveInt"/>
    <mode value="target"/>
    <alias value="positiveIntR5"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/4.0/StructureDefinition/string"/>
    <mode value="source"/>
    <alias value="stringR4"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/string"/>
    <mode value="target"/>
    <alias value="stringR5"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/4.0/StructureDefinition/time"/>
    <mode value="source"/>
    <alias value="timeR4"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/time"/>
    <mode value="target"/>
    <alias value="timeR5"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/4.0/StructureDefinition/unsignedInt"/>
    <mode value="source"/>
    <alias value="unsignedIntR4"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/unsignedInt"/>
    <mode value="target"/>
    <alias value="unsignedIntR5"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/4.0/StructureDefinition/uri"/>
    <mode value="source"/>
    <alias value="uriR4"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/uri"/>
    <mode value="target"/>
    <alias value="uriR5"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/4.0/StructureDefinition/url"/>
    <mode value="source"/>
    <alias value="urlR4"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/url"/>
    <mode value="target"/>
    <alias value="urlR5"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/4.0/StructureDefinition/uuid"/>
    <mode value="source"/>
    <alias value="uuidR4"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/uuid"/>
    <mode value="target"/>
    <alias value="uuidR5"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/4.0/StructureDefinition/xhtml"/>
    <mode value="source"/>
    <alias value="xhtmlR4"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/xhtml"/>
    <mode value="target"/>
    <alias value="xhtmlR5"/>
  </structure>
  <import value="http://hl7.org/fhir/StructureMap/Element4to5"/>
  <group>
    <name value="base64Binary"/>
    <extends value="Element"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="base64BinaryR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="base64BinaryR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="base64BinaryValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="boolean"/>
    <extends value="Element"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="booleanR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="booleanR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="booleanValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="canonical"/>
    <extends value="Element"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="canonicalR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="canonicalR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="canonicalValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="canonical2uri"/>
    <extends value="Element"/>
    <typeMode value="types"/>
    <input>
      <name value="src"/>
      <type value="canonicalR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="uriR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="canonical2uriValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="code"/>
    <extends value="Element"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="codeR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="codeR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="codeValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="code2id"/>
    <extends value="Element"/>
    <typeMode value="types"/>
    <input>
      <name value="src"/>
      <type value="codeR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="idR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="code2idValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="code2string"/>
    <extends value="Element"/>
    <typeMode value="types"/>
    <input>
      <name value="src"/>
      <type value="codeR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="stringR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="code2stringValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="code2uri"/>
    <extends value="Element"/>
    <typeMode value="types"/>
    <input>
      <name value="src"/>
      <type value="codeR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="uriR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="code2uriValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="date"/>
    <extends value="Element"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="dateR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="dateR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="dateValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="date2dateTime"/>
    <extends value="Element"/>
    <typeMode value="types"/>
    <input>
      <name value="src"/>
      <type value="dateR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="dateTimeR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="date2dateTimeValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="dateTime"/>
    <extends value="Element"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="dateTimeR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="dateTimeR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="dateTimeValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="dateTime2date"/>
    <extends value="Element"/>
    <typeMode value="types"/>
    <input>
      <name value="src"/>
      <type value="dateTimeR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="dateR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="dateTime2dateValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="decimal"/>
    <extends value="Element"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="decimalR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="decimalR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="decimalValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="id"/>
    <extends value="Element"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="idR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="idR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="idValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="id2code"/>
    <extends value="Element"/>
    <typeMode value="types"/>
    <input>
      <name value="src"/>
      <type value="idR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="codeR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id2codeValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="id2string"/>
    <extends value="Element"/>
    <typeMode value="types"/>
    <input>
      <name value="src"/>
      <type value="idR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="stringR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id2stringValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="instant"/>
    <extends value="Element"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="instantR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="instantR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="instantValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="integer"/>
    <extends value="Element"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="integerR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="integerR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="integerValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="integer2integer64"/>
    <extends value="Element"/>
    <typeMode value="types"/>
    <input>
      <name value="src"/>
      <type value="integerR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="integer64R5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="integer2integer64Value"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="markdown"/>
    <extends value="Element"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="markdownR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="markdownR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="markdownValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="markdown2string"/>
    <extends value="Element"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="markdownR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="stringR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="markdown2stringValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
      <documentation value="todo: deal with markdown escaping issues"/>
    </rule>
  </group>
  <group>
    <name value="oid"/>
    <extends value="Element"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="oidR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="oidR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="oidValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="positiveInt"/>
    <extends value="Element"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="positiveIntR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="positiveIntR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="positiveIntValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="string"/>
    <extends value="Element"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="stringR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="stringR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="stringValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="string2markdown"/>
    <extends value="Element"/>
    <typeMode value="types"/>
    <input>
      <name value="src"/>
      <type value="stringR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="markdownR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="string2markdownValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
      <documentation value="todo: deal with markdown escaping issues"/>
    </rule>
  </group>
  <group>
    <name value="string2id"/>
    <extends value="Element"/>
    <typeMode value="types"/>
    <input>
      <name value="src"/>
      <type value="stringR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="idR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="string2idValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="string2code"/>
    <extends value="Element"/>
    <typeMode value="types"/>
    <input>
      <name value="src"/>
      <type value="stringR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="codeR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="string2codeValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="string2integer64"/>
    <extends value="Element"/>
    <typeMode value="types"/>
    <input>
      <name value="src"/>
      <type value="stringR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="integer64R5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="string2integer64Value"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="time"/>
    <extends value="Element"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="timeR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="timeR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="timeValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="unsignedInt"/>
    <extends value="Element"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="unsignedIntR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="unsignedIntR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="unsignedIntValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="unsignedInt2integer64"/>
    <extends value="Element"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="unsignedIntR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="integer64R5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="unsignedInt2integer64Value"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="uri"/>
    <extends value="Element"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="uriR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="uriR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="uriValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="uri2canonical"/>
    <extends value="Element"/>
    <typeMode value="types"/>
    <input>
      <name value="src"/>
      <type value="uriR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="canonicalR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="uri2canonicalValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="uri2code"/>
    <extends value="Element"/>
    <typeMode value="types"/>
    <input>
      <name value="src"/>
      <type value="uriR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="codeR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="uri2codeValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="url"/>
    <extends value="Element"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="urlR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="urlR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="urlValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="uuid"/>
    <extends value="Element"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="uuidR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="uuidR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="uuidValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="xhtml"/>
    <extends value="Element"/>
    <typeMode value="type-and-types"/>
    <input>
      <name value="src"/>
      <type value="xhtmlR4"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="xhtmlR5"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="xhtmlValue"/>
      <source>
        <context value="src"/>
        <element value="value"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <element value="value"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
  </group>
</StructureMap>