National Patient System FHIR
1.0.0 - ci-build International flag

National Patient System FHIR, published by Your Organization. This guide is not an authorized publication; it is the continuous build for version 1.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/tteddyblOak/FHIR-Teddy/ and changes regularly. See the Directory of published versions

: Map National Patient Question to an Observation - XML Representation

Draft as of 2025-09-19

Raw xml | Download


<StructureMap xmlns="http://hl7.org/fhir">
  <id value="NationalPatientToFHIRR4Patient"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: StructureMap NationalPatientToFHIRR4Patient</b></p><a name="NationalPatientToFHIRR4Patient"> </a><a name="hcNationalPatientToFHIRR4Patient"> </a><pre class="fml">
<b>map</b><span style="color: navy"> &quot;</span>http://moh.bw.org/fhir/StructureMap/NationalPatientToFHIRR4Patient<span style="color: navy">&quot; = &quot;</span>NationalPatientToFHIRR4Patient<span style="color: navy">&quot;

</span><b>uses</b><span style="color: navy"> &quot;</span>http://moh.bw.org/fhir/StructureDefinition/NationalPatientToFHIRR4Patient<span style="color: navy">&quot; </span><b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span><a href="http://hl7.org/fhir/R4/patient.html" title="Patient">http://hl7.org/fhir/StructureDefinition/Patient</a><span style="color: navy">&quot; </span><b>as </b><b>target</b>

<b>group </b>NationalPatientToFHIRR4Patient<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>NationalPatientLogicalModel, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>Patient<span style="color: navy">)</span><span style="color: navy"> {
</span>  src.name<b> as </b><span style="color: maroon">srcName</span><span style="color: navy"><b> -&gt; </b></span>tgt.name<b> as </b><span style="color: maroon">pName</span><b> then</b><span style="color: navy"> {
</span>    srcName<span style="color: navy"><b> -&gt; </b></span>pName.text = <span style="color: maroon">srcName</span> <i>&quot;SetPatientFullName&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span><span style="color: navy">;</span>
<span style="color: navy">}

</span></pre></div>
  </text>
  <url
       value="http://moh.bw.org/fhir/StructureMap/NationalPatientToFHIRR4Patient"/>
  <version value="1.0.0"/>
  <name value="NationalPatientToFHIRR4Patient"/>
  <status value="draft"/>
  <date value="2025-09-19T09:50:45+00:00"/>
  <publisher value="Your Organization"/>
  <contact>
    <name value="Your Organization"/>
    <telecom>
      <system value="url"/>
      <value value="https://organization.url/"/>
    </telecom>
    <telecom>
      <system value="email"/>
      <value value="info@someorg.org"/>
    </telecom>
  </contact>
  <contact>
    <name value="Richard Langford"/>
    <telecom>
      <system value="email"/>
      <value value="richard.langford@jembi.org"/>
      <use value="work"/>
    </telecom>
  </contact>
  <jurisdiction>
    <coding>
      <system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
      <code value="001"/>
      <display value="World"/>
    </coding>
  </jurisdiction>
  <structure>
    <url
         value="http://moh.bw.org/fhir/StructureDefinition/NationalPatientToFHIRR4Patient"/>
    <mode value="source"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Patient"/>
    <mode value="target"/>
  </structure>
  <group>
    <name value="NationalPatientToFHIRR4Patient"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <type value="NationalPatientLogicalModel"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="Patient"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="name"/>
      <source>
        <context value="src"/>
        <element value="name"/>
        <variable value="srcName"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="name"/>
        <variable value="pName"/>
      </target>
      <rule>
        <name value="SetPatientFullName"/>
        <source>
          <context value="srcName"/>
        </source>
        <target>
          <context value="pName"/>
          <contextType value="variable"/>
          <element value="text"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="srcName"/>
          </parameter>
        </target>
      </rule>
    </rule>
  </group>
</StructureMap>