# Cette ressource présente les spécifications de l''alignement entre la ressource `Patient` vers les tables correspodantes du CDM OMOP. - Data Management with FHIR v0.1.0

* [**Table of Contents**](toc.md)
* [**Artifacts Summary**](artifacts.md)
* **Cette ressource présente les spécifications de l''alignement entre la ressource `Patient` vers les tables correspodantes du CDM OMOP.**

## StructureMap: Cette ressource présente les spécifications de l''alignement entre la ressource `Patient` vers les tables correspodantes du CDM OMOP. 

| | |
| :--- | :--- |
| *Official URL*:https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreFHIRPatient2OMOP | *Version*:0.1.0 |
| Draft as of 2025-10-23 | *Computable Name*:CoreFHIRPatient2OMOP |

 
Cette ressource présente les spécifications de l''alignement entre la ressource`Patient`vers les tables correspodantes du CDM OMOP. 

```

map "https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreFHIRPatient2OMOP" = "CoreFHIRPatient2OMOP"

// Cette ressource présente les spécifications de l''alignement entre la ressource `Patient` vers les tables correspodantes du CDM OMOP.

uses "http://hl7.org/fhir/StructureDefinition/Patient" alias Patient as source
uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/LogicalBundle" alias LogicalBundle as target
uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/OMOPPerson" alias PersonTable as target
uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/OMOPLocation" alias LocationTable as target
uses "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/OMOPDeath" alias DeathTable as target

imports "https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreFHIR2OMOPPerson"
imports "https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreFHIR2OMOPLocation"
imports "https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreFHIR2OMOPDeath"

group Patient(source src : Patient, target tgtBundle : LogicalBundle) <<types>> {
  src -> tgtBundle.entry as newEntry then {
    src -> newEntry.person = create('PersonTable') as newPerson then {
      src then Person(src, newPerson) "transformPerson";
    } "createPerson";
    src.address as srcAddress where (use = 'home') and period.end.empty() -> newEntry.location = create('LocationTable') as newLocation then {
      srcAddress then Location(srcAddress, newLocation) "transformLocation";
    } "createLocation";
    src where deceased.is(System.DateTime) or deceased.is(System.Boolean) -> newEntry.death = create('DeathTable') as newDeath then {
      src then Death(src, newDeath) "transformDeath";
    } "createDeath";
  } "newEntry";
}


```



## Resource Content

```json
{
  "resourceType" : "StructureMap",
  "id" : "CoreFHIRPatient2OMOP",
  "url" : "https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreFHIRPatient2OMOP",
  "version" : "0.1.0",
  "name" : "CoreFHIRPatient2OMOP",
  "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" : "2025-10-23T20:49:03+00:00",
  "publisher" : "AP-HP",
  "contact" : [
    {
      "name" : "AP-HP",
      "telecom" : [
        {
          "system" : "url",
          "value" : "https://aphp.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.aphp.fr/ig/fhir/dm/StructureDefinition/LogicalBundle",
      "mode" : "target",
      "alias" : "LogicalBundle"
    },
    {
      "url" : "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/OMOPPerson",
      "mode" : "target",
      "alias" : "PersonTable"
    },
    {
      "url" : "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/OMOPLocation",
      "mode" : "target",
      "alias" : "LocationTable"
    },
    {
      "url" : "https://interop.aphp.fr/ig/fhir/dm/StructureDefinition/OMOPDeath",
      "mode" : "target",
      "alias" : "DeathTable"
    }
  ],
  "import" : [
    "https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreFHIR2OMOPPerson",
    "https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreFHIR2OMOPLocation",
    "https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreFHIR2OMOPDeath"
  ],
  "group" : [
    {
      "name" : "Patient",
      "typeMode" : "types",
      "input" : [
        {
          "name" : "src",
          "type" : "Patient",
          "mode" : "source"
        },
        {
          "name" : "tgtBundle",
          "type" : "LogicalBundle",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "newEntry",
          "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" : "createLocation",
              "source" : [
                {
                  "context" : "src",
                  "element" : "address",
                  "variable" : "srcAddress",
                  "condition" : "(use = 'home') and period.end.empty()"
                }
              ],
              "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" : "createDeath",
              "source" : [
                {
                  "context" : "src",
                  "condition" : "deceased.is(System.DateTime) or deceased.is(System.Boolean)"
                }
              ],
              "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"]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

```
