FHIR © HL7.org  |  FHIRsmith 4.0.1  |  Server Home  |  XIG Home  |  XIG Stats  | 

FHIR IG analytics

Packagehl7.fhir.uv.omop
Resource TypeStructureMap
IdStructureMap-PersonMap.json
FHIR VersionR5
Sourcehttps://build.fhir.org/ig/HL7/fhir-omop-ig/StructureMap-PersonMap.html
URLhttp://hl7.org/fhir/uv/omop/StructureMap/PersonMap
Version1.0.0
Statusdraft
Date2026-04-02T22:51:15+00:00
NamePersonMap
TitleMapping Patient resource to Person OMOP Domain
Realmuv
Authorityhl7
DescriptionThis mapping maps FHIR Patient instances to OMOP Person Table objects.

Resources that use this resource

No resources found


Resources that this resource uses

No resources found


Narrative

Note: links and images are rebased to the (stated) source

Generated Narrative: StructureMap PersonMap

Language: en

/// url = 'http://hl7.org/fhir/uv/omop/StructureMap/PersonMap'
/// name = 'PersonMap'
/// title = 'Mapping Patient resource to Person OMOP Domain'
/// status = 'draft'

uses "http://hl7.org/fhir/StructureDefinition/Patient" alias Patient as source
uses "http://hl7.org/fhir/uv/omop/StructureDefinition/Person" alias PersonTable as target

group Person(source src : Patient, target tgt : PersonTable) {
  src.id as id ->  tgt.person_source_value = id,  tgt.person_id = '1'; // OMOP person ID would be a map from FHIR ID to an external key
  src.gender as gender ->  tgt.gender_concept_id = translate(gender, 'http://hl7.org/fhir/uv/omop/ConceptMap/GenderClass', 'code'),  tgt.gender_source_value = gender;
  src where (src.gender.empty()) ->  tgt.gender_concept_id = '0',  tgt.gender_source_value = 'unknown' "nogender";
  src.birthDate as bdSrc ->  tgt.birth_datetime = bdSrc,  tgt.year_of_birth = (src.birthDate.toString().substring(0, 4)),  tgt.month_of_birth = (src.birthDate.toString().substring(5, 2)),  tgt.day_of_birth = (src.birthDate.toString().substring(8, 2));
}


Source1

{
  "resourceType": "StructureMap",
  "id": "PersonMap",
  "language": "en",
  "text": {
    "status": "generated",
    "div": "<!-- snip (see above) -->"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode": "brr"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 1,
      "_valueInteger": {
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom",
            "valueCanonical": "http://hl7.org/fhir/uv/omop/ImplementationGuide/hl7.fhir.uv.omop"
          }
        ]
      }
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode": "informative",
      "_valueCode": {
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom",
            "valueCanonical": "http://hl7.org/fhir/uv/omop/ImplementationGuide/hl7.fhir.uv.omop"
          }
        ]
      }
    }
  ],
  "url": "http://hl7.org/fhir/uv/omop/StructureMap/PersonMap",
  "version": "1.0.0",
  "name": "PersonMap",
  "title": "Mapping Patient resource to Person OMOP Domain",
  "status": "draft",
  "date": "2026-04-02T22:51:15+00:00",
  "publisher": "HL7 International / Biomedical Research and Regulation",
  "contact": [
    {
      "name": "HL7 International / Biomedical Research and Regulation",
      "telecom": [
        {
          "system": "url",
          "value": "http://www.hl7.org/Special/committees/rcrim"
        }
      ]
    }
  ],
  "description": "This mapping maps FHIR Patient instances to OMOP Person Table objects.",
  "jurisdiction": [
    {
      "coding": [
        {
          "system": "http://unstats.un.org/unsd/methods/m49/m49.htm",
          "code": "001",
          "display": "World"
        }
      ]
    }
  ],
  "structure": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/Patient",
      "mode": "source",
      "alias": "Patient"
    },
    {
      "url": "http://hl7.org/fhir/uv/omop/StructureDefinition/Person",
      "mode": "target",
      "alias": "PersonTable"
    }
  ],
  "group": [
    {
      "name": "Person",
      "input": [
        {
          "name": "src",
          "type": "Patient",
          "mode": "source"
        },
        {
          "name": "tgt",
          "type": "PersonTable",
          "mode": "target"
        }
      ],
      "rule": [
        {
          "name": "id",
          "source": [
            {
              "context": "src",
              "element": "id",
              "variable": "id"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "person_source_value",
              "transform": "copy",
              "parameter": [
                {
                  "valueId": "id"
                }
              ]
            },
            {
              "context": "tgt",
              "element": "person_id",
              "transform": "copy",
              "parameter": [
                {
                  "valueString": "1"
                }
              ]
            }
          ],
          "documentation": "OMOP person ID would be a map from FHIR ID to an external key"
        },
        {
          "name": "gender",
          "source": [
            {
              "context": "src",
              "element": "gender",
              "variable": "gender"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "gender_concept_id",
              "transform": "translate",
              "parameter": [
                {
                  "valueId": "gender"
                },
                {
                  "valueString": "http://hl7.org/fhir/uv/omop/ConceptMap/GenderClass"
                },
                {
                  "valueString": "code"
                }
              ]
            },
            {
              "context": "tgt",
              "element": "gender_source_value",
              "transform": "copy",
              "parameter": [
                {
                  "valueId": "gender"
                }
              ]
            }
          ]
        },
        {
          "name": "nogender",
          "source": [
            {
              "context": "src",
              "condition": "(src.gender.empty())"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "gender_concept_id",
              "transform": "copy",
              "parameter": [
                {
                  "valueString": "0"
                }
              ]
            },
            {
              "context": "tgt",
              "element": "gender_source_value",
              "transform": "copy",
              "parameter": [
                {
                  "valueString": "unknown"
                }
              ]
            }
          ]
        },
        {
          "name": "birthDate",
          "source": [
            {
              "context": "src",
              "element": "birthDate",
              "variable": "bdSrc"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "birth_datetime",
              "transform": "copy",
              "parameter": [
                {
                  "valueId": "bdSrc"
                }
              ]
            },
            {
              "context": "tgt",
              "element": "year_of_birth",
              "transform": "evaluate",
              "parameter": [
                {
                  "valueString": "src.birthDate.toString().substring(0, 4)"
                }
              ]
            },
            {
              "context": "tgt",
              "element": "month_of_birth",
              "transform": "evaluate",
              "parameter": [
                {
                  "valueString": "src.birthDate.toString().substring(5, 2)"
                }
              ]
            },
            {
              "context": "tgt",
              "element": "day_of_birth",
              "transform": "evaluate",
              "parameter": [
                {
                  "valueString": "src.birthDate.toString().substring(8, 2)"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}