Data Management with FHIR
0.1.0 - ci-build

Data Management with FHIR - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

## : Mapping Patient resource to Location OMOP Domain - JSON Representation

Draft as of 2025-10-23

Raw json | Download

    {
      "resourceType" : "StructureMap",
      "id" : "CoreFHIR2OMOPLocation",
      "text" : {
        "status" : "generated",
        "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Narratif généré : StructureMap CoreFHIR2OMOPLocation</b></p><a name=\"CoreFHIR2OMOPLocation\"> </a><a name=\"hcCoreFHIR2OMOPLocation\"> </a><pre class=\"fml\">\r\n<b>map</b><span style=\"color: navy\"> &quot;</span>https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreFHIR2OMOPLocation<span style=\"color: navy\">&quot; = &quot;</span>CoreFHIR2OMOPLocation<span style=\"color: navy\">&quot;\r\n\r\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">Mapping Patient resource to Location OMOP Domain</span>\r\n\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/R4/datatypes.html#Address\" title=\"Address\">http://hl7.org/fhir/StructureDefinition/Address</a><span style=\"color: navy\">&quot; </span><b>alias </b>Address <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureDefinition-OMOPLocation.html\" title=\"Location OMOP Table\">https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/OMOPLocation</a><span style=\"color: navy\">&quot; </span><b>alias </b>LocationTable <b>as </b><b>target</b>\r\n\r\n<b>group </b>Location<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>Address, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>LocationTable<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  src.line first<b> as </b><span style=\"color: maroon\">srcLine1</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.address_1 = <span style=\"color: maroon\">srcLine1</span> <i>&quot;setLineOne&quot;</i><span style=\"color: navy\">;</span>\r\n  src.line not_first<b> as </b><span style=\"color: maroon\">srcLine2</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.address_2 = <span style=\"color: maroon\">srcLine2</span> <i>&quot;setLineTwo&quot;</i><span style=\"color: navy\">;</span>\r\n  src.city<b> as </b><span style=\"color: maroon\">srcCity</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.city = <span style=\"color: maroon\">srcCity</span> <i>&quot;setCity&quot;</i><span style=\"color: navy\">;</span>\r\n  src.postalCode<b> as </b><span style=\"color: maroon\">srcZip</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.zip = <span style=\"color: maroon\">srcZip</span> <i>&quot;setZip&quot;</i><span style=\"color: navy\">;</span>\r\n  src.country<b> as </b><span style=\"color: maroon\">srcCountry</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.country_source_value = <span style=\"color: maroon\">srcCountry</span> <i>&quot;setCountry&quot;</i><span style=\"color: navy\">;</span>\r\n  src.text<b> as </b><span style=\"color: maroon\">srcText</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.location_source_value = <b>truncate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">srcText</span><span style=\"color: navy\">, </span><span style=\"color: blue\">50</span><span style=\"color: navy\">)</span> <i>&quot;setVerbatim&quot;</i><span style=\"color: navy\">;</span>\r\n  src.extension<b> as </b><span style=\"color: maroon\">geolocation</span><b> where </b>(url = 'http://hl7.org/fhir/StructureDefinition/geolocation')<b> then</b><span style=\"color: navy\"> {\r\n</span>    geolocation.extension<b> as </b><span style=\"color: maroon\">latitude</span><b> where </b>(url = 'latitude')<span style=\"color: navy\"><b> -&gt; </b></span>tgt.latitude = <span style=\"color: navy\">(</span>%latitude.value<span style=\"color: navy\">)</span> <i>&quot;setLatitude&quot;</i><span style=\"color: navy\">;</span>\r\n    geolocation.extension<b> as </b><span style=\"color: maroon\">longitude</span><b> where </b>(url = 'longitude')<span style=\"color: navy\"><b> -&gt; </b></span>tgt.longitude = <span style=\"color: navy\">(</span>%longitude.value<span style=\"color: navy\">)</span> <i>&quot;setLongitude&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;setGeolocation&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
      },
      "url" : "https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreFHIR2OMOPLocation",
      "version" : "0.1.0",
      "name" : "CoreFHIR2OMOPLocation",
      "title" : "Mapping Patient resource to Location OMOP Domain",
      "status" : "draft",
      "date" : "2025-10-23T20:49:03+00:00",
      "publisher" : "AP-HP",
      "contact" : [
        {
          "name" : "AP-HP",
          "telecom" : [
            {
              "system" : "url",
              "value" : "https://aphp.fr"
            }
          ]
        }
      ],
      "description" : "Mapping Patient resource to Location OMOP Domain",
      "jurisdiction" : [
        {
          "coding" : [
            {
              "system" : "urn:iso:std:iso:3166",
              "code" : "FR",
              "display" : "France"
            }
          ]
        }
      ],
      "structure" : [
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/Address",
          "mode" : "source",
          "alias" : "Address"
        },
        {
          "url" : "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/OMOPLocation",
          "mode" : "target",
          "alias" : "LocationTable"
        }
      ],
      "group" : [
        {
          "name" : "Location",
          "typeMode" : "none",
          "input" : [
            {
              "name" : "src",
              "type" : "Address",
              "mode" : "source"
            },
            {
              "name" : "tgt",
              "type" : "LocationTable",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "setLineOne",
              "source" : [
                {
                  "context" : "src",
                  "element" : "line",
                  "listMode" : "first",
                  "variable" : "srcLine1"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "address_1",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "srcLine1"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "setLineTwo",
              "source" : [
                {
                  "context" : "src",
                  "element" : "line",
                  "listMode" : "not_first",
                  "variable" : "srcLine2"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "address_2",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "srcLine2"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "setCity",
              "source" : [
                {
                  "context" : "src",
                  "element" : "city",
                  "variable" : "srcCity"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "city",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "srcCity"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "setZip",
              "source" : [
                {
                  "context" : "src",
                  "element" : "postalCode",
                  "variable" : "srcZip"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "zip",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "srcZip"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "setCountry",
              "source" : [
                {
                  "context" : "src",
                  "element" : "country",
                  "variable" : "srcCountry"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "country_source_value",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "srcCountry"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "setVerbatim",
              "source" : [
                {
                  "context" : "src",
                  "element" : "text",
                  "variable" : "srcText"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "location_source_value",
                  "transform" : "truncate",
                  "parameter" : [
                    {
                      "valueId" : "srcText"
                    },
                    {
                      "valueInteger" : 50
                    }
                  ]
                }
              ]
            },
            {
              "name" : "setGeolocation",
              "source" : [
                {
                  "context" : "src",
                  "element" : "extension",
                  "variable" : "geolocation",
                  "condition" : "(url = 'http://hl7.org/fhir/StructureDefinition/geolocation')"
                }
              ],
              "rule" : [
                {
                  "name" : "setLatitude",
                  "source" : [
                    {
                      "context" : "geolocation",
                      "element" : "extension",
                      "variable" : "latitude",
                      "condition" : "(url = 'latitude')"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgt",
                      "contextType" : "variable",
                      "element" : "latitude",
                      "transform" : "evaluate",
                      "parameter" : [
                        {
                          "valueString" : "%latitude.value"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "setLongitude",
                  "source" : [
                    {
                      "context" : "geolocation",
                      "element" : "extension",
                      "variable" : "longitude",
                      "condition" : "(url = 'longitude')"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgt",
                      "contextType" : "variable",
                      "element" : "longitude",
                      "transform" : "evaluate",
                      "parameter" : [
                        {
                          "valueString" : "%longitude.value"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }