# Mapping FHIR Patient resource to OMOP Death - Data Management with FHIR v0.1.0

* [**Table of Contents**](toc.md)
* [**Artifacts Summary**](artifacts.md)
* **Mapping FHIR Patient resource to OMOP Death**

## StructureMap: Mapping FHIR Patient resource to OMOP Death 

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

 
Mapping FHIR Patient resource to OMOP Death 

```

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

// Mapping FHIR Patient resource to OMOP Death

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

group Death(source src : Patient, target tgt : DeathTable) {
  src.deceased : dateTime as srcDeceased then {
    srcDeceased -> tgt.death_datetime = srcDeceased "setDeathDT";
    srcDeceased -> tgt.death_date = (%srcDeceased.toString().substring(0, 10)) "setDeathD";
  } "SetDeathDate";
}


```



## Resource Content

```json
{
  "resourceType" : "StructureMap",
  "id" : "CoreFHIR2OMOPDeath",
  "url" : "https://interop.aphp.fr/ig/fhir/dm/StructureMap/CoreFHIR2OMOPDeath",
  "version" : "0.1.0",
  "name" : "CoreFHIR2OMOPDeath",
  "title" : "Mapping FHIR Patient resource to OMOP Death",
  "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 FHIR Patient resource to OMOP Death",
  "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/OMOPDeath",
      "mode" : "target",
      "alias" : "DeathTable"
    }
  ],
  "group" : [
    {
      "name" : "Death",
      "typeMode" : "none",
      "input" : [
        {
          "name" : "src",
          "type" : "Patient",
          "mode" : "source"
        },
        {
          "name" : "tgt",
          "type" : "DeathTable",
          "mode" : "target"
        }
      ],
      "rule" : [
        {
          "name" : "SetDeathDate",
          "source" : [
            {
              "context" : "src",
              "type" : "dateTime",
              "element" : "deceased",
              "variable" : "srcDeceased"
            }
          ],
          "rule" : [
            {
              "name" : "setDeathDT",
              "source" : [
                {
                  "context" : "srcDeceased"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "death_datetime",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "srcDeceased"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "setDeathD",
              "source" : [
                {
                  "context" : "srcDeceased"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "death_date",
                  "transform" : "evaluate",
                  "parameter" : [
                    {
                      "valueString" : "%srcDeceased.toString().substring(0, 10)"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

```
