FHIR to OMOP FHIR IG
0.1.0 - ci-build International flag

FHIR to OMOP FHIR IG, published by HL7 International / Biomedical Research and Regulation. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/fhir-omop-ig/ and changes regularly. See the Directory of published versions

StructureMap: Mapping Patient resource to Person OMOP Domain

Official URL: http://hl7.org/fhir/uv/omop/StructureMap/PersonMap Version: 0.1.0
Standards status: Draft Maturity Level: 1 Computable Name: PersonMap

MappingPatientresourcetoPersonOMOPDomain

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.id as id -> tgt.person_source_value = cast(id, 'string');
  src.gender as gender -> tgt.gender_source_value = cast(gender, 'string');
  src.birthDate as bdSrc ->  tgt.birth_datetime = bdSrc,  tgt.year_of_birth = evaluate(bdSrc, substring(0, 4)),  tgt.month_of_birth = evaluate(bdSrc, substring(5, 2)),  tgt.day_of_birth = evaluate(bdSrc, substring(8, 2));
}