0.1.0 - Costa Rica flag

Guía de Implementación de Homologación Regional (PH4H) de Costa Rica - Versión en desarrollo (v0.1.0): borrador de trabajo de la Iniciativa HL7® Costa Rica, que puede cambiar sin aviso.

:

Page standards status: Draft

Raw xml | Download


<StructureMap xmlns="http://hl7.org/fhir">
  <id value="CROrganizationToLACOrganization"/>
  <language value="en"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: StructureMap CROrganizationToLACOrganization</b></p><a name="CROrganizationToLACOrganization"> </a><a name="hcCROrganizationToLACOrganization"> </a><pre class="fml">
<b>map</b><span style="color: navy"> &quot;</span>https://hl7.or.cr/fhir/ph4h/StructureMap/CROrganizationToLACOrganization<span style="color: navy">&quot; = &quot;</span>CROrganizationToLACOrganization<span style="color: navy">&quot;

</span><b>uses</b><span style="color: navy"> &quot;</span>http://hl7.org/fhir/5.0/StructureDefinition/Organization<span style="color: navy">&quot; </span><b>alias </b>Organization <b>as </b><b>source</b>
<b>uses</b><span style="color: navy"> &quot;</span>http://hl7.org/fhir/4.0/StructureDefinition/Organization<span style="color: navy">&quot; </span><b>alias </b>OrganizationR4 <b>as </b><b>target</b>

<b>imports</b><span style="color: navy"> &quot;</span><a href="StructureMap-CRComun.html" title="CRComun">https://hl7.or.cr/fhir/ph4h/StructureMap/CRComun</a><span style="color: navy">&quot;
</span>
<b>group </b>CROrganizationToLACOrganization<span style="color: navy">(</span><b>source</b> <span style="color: maroon">src</span><span style="color: navy"> : </span>Organization, <b>target</b> <span style="color: maroon">tgt</span><span style="color: navy"> : </span>OrganizationR4<span style="color: navy">)</span><span style="color: navy"> {
</span>  src.id<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.id = <span style="color: maroon">v</span><span style="color: navy">;</span>
  src<span style="color: navy"><b> -&gt; </b></span>tgt.meta<b> as </b><span style="color: maroon">m</span><b> then</b><span style="color: navy"> {
</span>    src<span style="color: navy"><b> -&gt; </b></span>m.profile = <span style="color: blue">'http://racsel.org/StructureDefinition/LACOrganization'</span> <i>&quot;perfil&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;meta&quot;</i><span style="color: navy">;</span>
  src.identifier<b> as </b><span style="color: maroon">id</span><b> where </b><span style="color: navy">(</span>use = 'official'<span style="color: navy">)</span><span style="color: navy"><b> -&gt; </b></span>tgt.identifier<b> as </b><span style="color: maroon">ti</span><b> then </b>Identificador<span style="color: navy">(</span><span style="color: maroon">id</span><span style="color: navy">, </span><span style="color: maroon">ti</span><span style="color: navy">)</span> <i>&quot;identificador&quot;</i><span style="color: navy">;</span>
  src.active<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.active = <span style="color: maroon">v</span> <i>&quot;activa&quot;</i><span style="color: navy">;</span>
  src.type<b> as </b><span style="color: maroon">t</span><span style="color: navy"><b> -&gt; </b></span>tgt.type<b> as </b><span style="color: maroon">tt</span><b> then </b>Concepto<span style="color: navy">(</span><span style="color: maroon">t</span><span style="color: navy">, </span><span style="color: maroon">tt</span><span style="color: navy">)</span> <i>&quot;tipo&quot;</i><span style="color: navy">;</span>
  src.name<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.name = <span style="color: maroon">v</span> <i>&quot;nombre&quot;</i><span style="color: navy">;</span>
  src.alias<b> as </b><span style="color: maroon">v</span><span style="color: navy"><b> -&gt; </b></span>tgt.alias = <span style="color: maroon">v</span><span style="color: navy">;</span>
  src.contact<b> as </b><span style="color: maroon">c</span><b> where </b><span style="color: navy">(</span>purpose.exists().not()<span style="color: navy">)</span><b> then</b><span style="color: navy"> {
</span>    c.telecom<b> as </b><span style="color: maroon">t</span><span style="color: navy"><b> -&gt; </b></span>tgt.telecom<b> as </b><span style="color: maroon">tt</span><b> then </b>Telecom<span style="color: navy">(</span><span style="color: maroon">t</span><span style="color: navy">, </span><span style="color: maroon">tt</span><span style="color: navy">)</span><span style="color: navy">;</span>
    c.address<b> as </b><span style="color: maroon">a</span><span style="color: navy"><b> -&gt; </b></span>tgt.address<b> as </b><span style="color: maroon">ta</span><b> then </b>Direccion<span style="color: navy">(</span><span style="color: maroon">a</span><span style="color: navy">, </span><span style="color: maroon">ta</span><span style="color: navy">)</span> <i>&quot;direccion&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">}</span> <i>&quot;contactoGeneral&quot;</i><span style="color: navy">;</span>
  src.partOf<b> as </b><span style="color: maroon">p</span><span style="color: navy"><b> -&gt; </b></span>tgt.partOf<b> as </b><span style="color: maroon">tp</span><b> then </b>Referencia<span style="color: navy">(</span><span style="color: maroon">p</span><span style="color: navy">, </span><span style="color: maroon">tp</span><span style="color: navy">)</span> <i>&quot;superior&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span></pre></div>
  </text>
  <url
       value="https://hl7.or.cr/fhir/ph4h/StructureMap/CROrganizationToLACOrganization"/>
  <version value="0.1.0"/>
  <name value="CROrganizationToLACOrganization"/>
  <status value="draft"/>
  <date value="2026-09-30T16:04:28-06:00"/>
  <publisher value="HL7 Costa Rica"/>
  <contact>
    <name value="HL7 Costa Rica"/>
    <telecom>
      <system value="url"/>
      <value value="https://hl7.or.cr"/>
    </telecom>
  </contact>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="CR"/>
      <display value="Costa Rica"/>
    </coding>
  </jurisdiction>
  <structure>
    <url value="http://hl7.org/fhir/5.0/StructureDefinition/Organization"/>
    <mode value="source"/>
    <alias value="Organization"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/4.0/StructureDefinition/Organization"/>
    <mode value="target"/>
    <alias value="OrganizationR4"/>
  </structure>
  <import value="https://hl7.or.cr/fhir/ph4h/StructureMap/CRComun"/>
  <group>
    <name value="CROrganizationToLACOrganization"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <type value="Organization"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="tgt"/>
      <type value="OrganizationR4"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id"/>
      <source>
        <context value="src"/>
        <element value="id"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="id"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="meta"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="meta"/>
        <variable value="m"/>
      </target>
      <rule>
        <name value="perfil"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="m"/>
          <contextType value="variable"/>
          <element value="profile"/>
          <transform value="copy"/>
          <parameter>
            <valueString
                         value="http://racsel.org/StructureDefinition/LACOrganization"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="identificador"/>
      <source>
        <context value="src"/>
        <element value="identifier"/>
        <variable value="id"/>
        <condition value="use = 'official'"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="identifier"/>
        <variable value="ti"/>
      </target>
      <dependent>
        <name value="Identificador"/>
        <variable value="id"/>
        <variable value="ti"/>
      </dependent>
    </rule>
    <rule>
      <name value="activa"/>
      <source>
        <context value="src"/>
        <element value="active"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="active"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="tipo"/>
      <source>
        <context value="src"/>
        <element value="type"/>
        <variable value="t"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="type"/>
        <variable value="tt"/>
      </target>
      <dependent>
        <name value="Concepto"/>
        <variable value="t"/>
        <variable value="tt"/>
      </dependent>
    </rule>
    <rule>
      <name value="nombre"/>
      <source>
        <context value="src"/>
        <element value="name"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="name"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="alias"/>
      <source>
        <context value="src"/>
        <element value="alias"/>
        <variable value="v"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="alias"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="v"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="contactoGeneral"/>
      <source>
        <context value="src"/>
        <element value="contact"/>
        <variable value="c"/>
        <condition value="purpose.exists().not()"/>
      </source>
      <rule>
        <name value="telecom"/>
        <source>
          <context value="c"/>
          <element value="telecom"/>
          <variable value="t"/>
        </source>
        <target>
          <context value="tgt"/>
          <contextType value="variable"/>
          <element value="telecom"/>
          <variable value="tt"/>
        </target>
        <dependent>
          <name value="Telecom"/>
          <variable value="t"/>
          <variable value="tt"/>
        </dependent>
      </rule>
      <rule>
        <name value="direccion"/>
        <source>
          <context value="c"/>
          <element value="address"/>
          <variable value="a"/>
        </source>
        <target>
          <context value="tgt"/>
          <contextType value="variable"/>
          <element value="address"/>
          <variable value="ta"/>
        </target>
        <dependent>
          <name value="Direccion"/>
          <variable value="a"/>
          <variable value="ta"/>
        </dependent>
      </rule>
    </rule>
    <rule>
      <name value="superior"/>
      <source>
        <context value="src"/>
        <element value="partOf"/>
        <variable value="p"/>
      </source>
      <target>
        <context value="tgt"/>
        <contextType value="variable"/>
        <element value="partOf"/>
        <variable value="tp"/>
      </target>
      <dependent>
        <name value="Referencia"/>
        <variable value="p"/>
        <variable value="tp"/>
      </dependent>
    </rule>
  </group>
</StructureMap>