Guide d'implémentation du GT Standards et Interopérabilité pour les EDS
0.1.0 - ci-build France flag

Guide d'implémentation du GT Standards et Interopérabilité pour les EDS - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

: FHIR EDS Patient to Tables CDM OMOP - JSON Representation

Draft as of 2024-10-08

Raw json | Download

{
  "resourceType" : "StructureMap",
  "id" : "Patient",
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: StructureMap Patient</b></p><a name=\"Patient\"> </a><a name=\"hcPatient\"> </a><a name=\"Patient-fr-FR\"> </a><pre class=\"fml\">\r\n<b>map</b><span style=\"color: navy\"> &quot;</span>https://interop.esante.gouv.fr/ig/fhir/eds/StructureMap/Patient<span style=\"color: navy\">&quot; = &quot;</span>Patient<span style=\"color: navy\">&quot;\r\n\r\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">Cette ressource présente les spécifications de l''alignement entre la ressource `Patient` vers les tables correspodantes du CDM OMOP.</span>\r\n\r\n<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>alias </b>Patient <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureDefinition-LogicalBundle.html\" title=\"LogicalBundle\">https://interop.esante.gouv.fr/ig/fhir/eds/StructureDefinition/LogicalBundle</a><span style=\"color: navy\">&quot; </span><b>alias </b>LogicalBundle <b>as </b><b>target</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureDefinition-OMOPPerson.html\" title=\"Person OMOP Table\">https://interop.esante.gouv.fr/ig/fhir/eds/StructureDefinition/OMOPPerson</a><span style=\"color: navy\">&quot; </span><b>alias </b>PersonTable <b>as </b><b>target</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureDefinition-OMOPLocation.html\" title=\"Location OMOP Table\">https://interop.esante.gouv.fr/ig/fhir/eds/StructureDefinition/OMOPLocation</a><span style=\"color: navy\">&quot; </span><b>alias </b>LocationTable <b>as </b><b>target</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureDefinition-OMOPDeath.html\" title=\"Death OMOP Table\">https://interop.esante.gouv.fr/ig/fhir/eds/StructureDefinition/OMOPDeath</a><span style=\"color: navy\">&quot; </span><b>alias </b>DeathTable <b>as </b><b>target</b>\r\n\r\n<b>imports</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureMap-Person.html\" title=\"Mapping Patient resource to Person OMOP Domain\">https://interop.esante.gouv.fr/ig/fhir/eds/StructureMap/Person</a><span style=\"color: navy\">&quot;\r\n</span><b>imports</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureMap-Location.html\" title=\"Mapping Patient resource to Location OMOP Domain\">https://interop.esante.gouv.fr/ig/fhir/eds/StructureMap/Location</a><span style=\"color: navy\">&quot;\r\n</span><b>imports</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureMap-Death.html\" title=\"Mapping Patient resource to Death OMOP Domain\">https://interop.esante.gouv.fr/ig/fhir/eds/StructureMap/Death</a><span style=\"color: navy\">&quot;\r\n</span>\r\n<b>group </b>Patient<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>Patient, <b>target</b> <span style=\"color: maroon\">tgtBundle</span><span style=\"color: navy\"> : </span>LogicalBundle<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  src<span style=\"color: navy\"><b> -&gt; </b></span>tgtBundle.id = <b>uuid</b><span style=\"color: navy\">(</span><span style=\"color: navy\">)</span> <i>&quot;setId&quot;</i><span style=\"color: navy\">;</span>\r\n  src<span style=\"color: navy\"><b> -&gt; </b></span>tgtBundle.type = <span style=\"color: blue\">'transaction'</span> <i>&quot;setType&quot;</i><span style=\"color: navy\">;</span>\r\n  src<span style=\"color: navy\"><b> -&gt; </b></span>tgtBundle.entry<b> as </b><span style=\"color: maroon\">newEntry</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    src<span style=\"color: navy\"><b> -&gt; </b></span>newEntry.person = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'PersonTable'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">newPerson</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      src<b> then </b>Person<span style=\"color: navy\">(</span><span style=\"color: maroon\">src</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">newPerson</span><span style=\"color: navy\">)</span> <i>&quot;transformPerson&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;createPerson&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;newEntryPerson&quot;</i><span style=\"color: navy\">;</span>\r\n  src.address<b> as </b><span style=\"color: maroon\">srcAddress</span><b> where </b>(use = 'home') and period.end.empty()<span style=\"color: navy\"><b> -&gt; </b></span>tgtBundle.entry<b> as </b><span style=\"color: maroon\">newEntry</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    srcAddress<span style=\"color: navy\"><b> -&gt; </b></span>newEntry.location = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'LocationTable'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">newLocation</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      srcAddress<b> then </b>Location<span style=\"color: navy\">(</span><span style=\"color: maroon\">srcAddress</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">newLocation</span><span style=\"color: navy\">)</span> <i>&quot;transformLocation&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;createLocation&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;newEntryLocation&quot;</i><span style=\"color: navy\">;</span>\r\n  src<b> where </b>deceased.is(System.DateTime) or deceased.is(System.Boolean)<span style=\"color: navy\"><b> -&gt; </b></span>tgtBundle.entry<b> as </b><span style=\"color: maroon\">newEntry</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    src<span style=\"color: navy\"><b> -&gt; </b></span>newEntry.death = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'DeathTable'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">newDeath</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      src<b> then </b>Death<span style=\"color: navy\">(</span><span style=\"color: maroon\">src</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">newDeath</span><span style=\"color: navy\">)</span> <i>&quot;transformDeath&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;createDeath&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;newEntryDeath&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
  },
  "url" : "https://interop.esante.gouv.fr/ig/fhir/eds/StructureMap/Patient",
  "version" : "0.1.0",
  "name" : "Patient",
  "title" : "Cette ressource présente les spécifications de l''alignement entre la ressource `Patient` vers les tables correspodantes du CDM OMOP.",
  "status" : "draft",
  "date" : "2024-10-08T09:22:03+00:00",
  "publisher" : "ANS",
  "contact" : [
    {
      "name" : "ANS",
      "telecom" : [
        {
          "system" : "url",
          "value" : "https://esante.gouv.fr"
        }
      ]
    }
  ],
  "description" : "Cette ressource présente les spécifications de l''alignement entre la ressource `Patient` vers les tables correspodantes du CDM OMOP.",
  "jurisdiction" : [
    {
      "coding" : [
        {
          "system" : "urn:iso:std:iso:3166",
          "code" : "FR",
          "display" : "France"
        }
      ]
    }
  ],
  "structure" : [
    {
      "url" : "http://hl7.org/fhir/StructureDefinition/Patient",
      "mode" : "source",
      "alias" : "Patient"
    },
    {
      "url" : "https://interop.esante.gouv.fr/ig/fhir/eds/StructureDefinition/LogicalBundle",
      "mode" : "target",
      "alias" : "LogicalBundle"
    },
    {
      "url" : "https://interop.esante.gouv.fr/ig/fhir/eds/StructureDefinition/OMOPPerson",
      "mode" : "target",
      "alias" : "PersonTable"
    },
    {
      "url" : "https://interop.esante.gouv.fr/ig/fhir/eds/StructureDefinition/OMOPLocation",
      "mode" : "target",
      "alias" : "LocationTable"
    },
    {
      "url" : "https://interop.esante.gouv.fr/ig/fhir/eds/StructureDefinition/OMOPDeath",
      "mode" : "target",
      "alias" : "DeathTable"
    }
  ],
  "import" : [
    🔗 "https://interop.esante.gouv.fr/ig/fhir/eds/StructureMap/Person"🔗 ,
    "https://interop.esante.gouv.fr/ig/fhir/eds/StructureMap/Location"🔗 ,
    "https://interop.esante.gouv.fr/ig/fhir/eds/StructureMap/Death"
  ],
  "group" : [
    {
      "name" : "Patient",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "src",
          "type" : "Patient",
          "mode" : "source"
        },
        {
          "name" : "tgtBundle",
          "type" : "LogicalBundle",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "setId",
          "source" : [
            {
              "context" : "src"
            }
          ],
          "target" : [
            {
              "context" : "tgtBundle",
              "contextType" : "variable",
              "element" : "id",
              "transform" : "uuid"
            }
          ]
        },
        {
          "name" : "setType",
          "source" : [
            {
              "context" : "src"
            }
          ],
          "target" : [
            {
              "context" : "tgtBundle",
              "contextType" : "variable",
              "element" : "type",
              "transform" : "copy",
              "parameter" : [
                {
                  "valueString" : "transaction"
                }
              ]
            }
          ]
        },
        {
          "name" : "newEntryPerson",
          "source" : [
            {
              "context" : "src"
            }
          ],
          "target" : [
            {
              "context" : "tgtBundle",
              "contextType" : "variable",
              "element" : "entry",
              "variable" : "newEntry"
            }
          ],
          "rule" : [
            {
              "name" : "createPerson",
              "source" : [
                {
                  "context" : "src"
                }
              ],
              "target" : [
                {
                  "context" : "newEntry",
                  "contextType" : "variable",
                  "element" : "person",
                  "variable" : "newPerson",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "PersonTable"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "transformPerson",
                  "source" : [
                    {
                      "context" : "src"
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "Person",
                      "variable" : [
                        "src",
                        "newPerson"
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "newEntryLocation",
          "source" : [
            {
              "context" : "src",
              "element" : "address",
              "variable" : "srcAddress",
              "condition" : "(use = 'home') and period.end.empty()"
            }
          ],
          "target" : [
            {
              "context" : "tgtBundle",
              "contextType" : "variable",
              "element" : "entry",
              "variable" : "newEntry"
            }
          ],
          "rule" : [
            {
              "name" : "createLocation",
              "source" : [
                {
                  "context" : "srcAddress"
                }
              ],
              "target" : [
                {
                  "context" : "newEntry",
                  "contextType" : "variable",
                  "element" : "location",
                  "variable" : "newLocation",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "LocationTable"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "transformLocation",
                  "source" : [
                    {
                      "context" : "srcAddress"
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "Location",
                      "variable" : [
                        "srcAddress",
                        "newLocation"
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "newEntryDeath",
          "source" : [
            {
              "context" : "src",
              "condition" : "deceased.is(System.DateTime) or deceased.is(System.Boolean)"
            }
          ],
          "target" : [
            {
              "context" : "tgtBundle",
              "contextType" : "variable",
              "element" : "entry",
              "variable" : "newEntry"
            }
          ],
          "rule" : [
            {
              "name" : "createDeath",
              "source" : [
                {
                  "context" : "src"
                }
              ],
              "target" : [
                {
                  "context" : "newEntry",
                  "contextType" : "variable",
                  "element" : "death",
                  "variable" : "newDeath",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "DeathTable"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "transformDeath",
                  "source" : [
                    {
                      "context" : "src"
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "Death",
                      "variable" : [
                        "src",
                        "newDeath"
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}