FHIR © HL7.org  |  Server Home  |  XIG Home  |  Server Source  |  FHIR  

FHIR IG Statistics: StructureMap/PersonMap

Packagehl7.fhir.uv.omop
TypeStructureMap
IdPersonMap
FHIR VersionR5
Sourcehttp://hl7.org/fhir/uv/omop/https://build.fhir.org/ig/HL7/fhir-omop-ig/StructureMap-PersonMap.html
URLhttp://hl7.org/fhir/uv/omop/StructureMap/PersonMap
Version1.0.0-ballot
Statusdraft
Date2025-07-22T19:48:02+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

/// 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.gender as gender ->  tgt.gender_concept_id = gender,  tgt.gender_source_value = cast(gender, 'string'); // src.id as id -> tgt.person_id = cast(id, "integer");
  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));
}


Source

{
  "resourceType": "StructureMap",
  "id": "PersonMap",
  "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-ballot",
  "name": "PersonMap",
  "title": "Mapping Patient resource to Person OMOP Domain",
  "status": "draft",
  "date": "2025-07-22T19:48:02+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": "gender",
          "source": [
            {
              "context": "src",
              "element": "gender",
              "variable": "gender"
            }
          ],
          "target": [
            {
              "context": "tgt",
              "element": "gender_concept_id",
              "transform": "copy",
              "parameter": [
                {
                  "valueId": "gender"
                }
              ]
            },
            {
              "context": "tgt",
              "element": "gender_source_value",
              "transform": "cast",
              "parameter": [
                {
                  "valueId": "gender"
                },
                {
                  "valueString": "string"
                }
              ]
            }
          ],
          "documentation": "src.id as id -> tgt.person_id = cast(id, \"integer\");"
        },
        {
          "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)"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}