<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="LogicalModel-OMOP-Person" />
  <meta>
    <versionId value="6" />
    <lastUpdated value="2022-06-20T08:53:17.4700841+00:00" />
  </meta>
  <url value="https://fhir.ohdsi.org/LogicalModel/OMOPPerson" />
  <name value="LogicalModelOMOPPerson" />
  <title value="LogicalModel OMOP Person" />
  <status value="draft" />
  <date value="2022-06-20T15:18:48.5858112+00:00" />
  <description value="This table serves as the central identity management for all Persons in the database. It contains records that uniquely identify each person or patient, and some demographic information." />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="OMOP-CDM-v5.3.1" />
    <uri value="https://ohdsi.github.io/CommonDataModel/cdm531.html" />
    <name value="OMOP Common Data Model v5.3.1" />
  </mapping>
  <mapping>
    <identity value="OMOP-CDM-v6.0" />
    <uri value="https://ohdsi.github.io/CommonDataModel/cdm60.html" />
  </mapping>
  <kind value="logical" />
  <abstract value="false" />
  <type value="https://fhir.ohdsi.org/LogicalModels/OMOPPerson" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Element" />
  <derivation value="specialization" />
  <snapshot>
    <element id="OMOPPerson">
      <path value="OMOPPerson" />
      <short value="Base for all elements" />
      <definition value="This table serves as the central identity management for all Persons in the database. It contains records that uniquely identify each person or patient, and some demographic information." />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="OMOPPerson" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Element" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="OMOP-CDM-v5.3.1" />
        <map value="Person" />
      </mapping>
    </element>
    <element id="OMOPPerson.id">
      <path value="OMOPPerson.id" />
      <representation value="xmlAttr" />
      <short value="Unique id for inter-element referencing" />
      <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Element.id" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
          <valueUrl value="string" />
        </extension>
        <code value="http://hl7.org/fhirpath/System.String" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="OMOPPerson.extension">
      <path value="OMOPPerson.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <description value="Extensions are always sliced by (at least) url" />
        <rules value="open" />
      </slicing>
      <short value="Additional content defined by implementations" />
      <definition value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." />
      <comment value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." />
      <alias value="extensions" />
      <alias value="user content" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Element.extension" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Extension" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <constraint>
        <key value="ext-1" />
        <severity value="error" />
        <human value="Must have either extensions or value[x], not both" />
        <expression value="extension.exists() != value.exists()" />
        <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="OMOPPerson.person_id">
      <path value="OMOPPerson.person_id" />
      <short value="Primitive Type integer" />
      <definition value="It is assumed that every person with a different unique identifier is in fact a different person and should be treated independently.&#xD;&#xA;&#xD;&#xA;Any person linkage that needs to occur to uniquely identify Persons ought to be done prior to writing this table. This identifier can be the original id from the source data provided if it is an integer, otherwise it can be an autogenerated number." />
      <comment value="32 bit number; for values larger than this, use decimal" />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="OMOPPerson.person_id" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="integer" />
        <profile value="http://hl7.org/fhir/StructureDefinition/integer" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="OMOP-CDM-v5.3.1" />
        <map value="Person.person_id" />
      </mapping>
    </element>
    <element id="OMOPPerson.gender_concept_id">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="OMOPPerson.gender_concept_id" />
      <short value="Concept - reference to a terminology or just  text" />
      <definition value="This field is meant to capture the biological sex at birth of the Person. This field should not be used to study gender identity issues." />
      <comment value="Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination." />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="OMOPPerson.gender_concept_id" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/StructureDefinition/CodeableConcept" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <binding>
        <strength value="required" />
        <valueSet value="https://fhir.ohdsi.org/ValueSet/OMOPGender" />
      </binding>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="CE/CNE/CWE" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="CD" />
      </mapping>
      <mapping>
        <identity value="orim" />
        <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" />
      </mapping>
      <mapping>
        <identity value="OMOP-CDM-v5.3.1" />
        <map value="Person.gender_concept_id" />
      </mapping>
    </element>
    <element id="OMOPPerson.year_of_birth">
      <path value="OMOPPerson.year_of_birth" />
      <short value="Primitive Type integer" />
      <definition value="Compute age using year_of_birth.&#xD;&#xA;&#xD;&#xA;For data sources with date of birth, the year should be extracted. For data sources where the year of birth is not available, the approximate year of birth could be derived based on age group categorization, if available." />
      <comment value="32 bit number; for values larger than this, use decimal" />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="OMOPPerson.year_of_birth" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="integer" />
        <profile value="http://hl7.org/fhir/StructureDefinition/integer" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="OMOP-CDM-v5.3.1" />
        <map value="Person.year_of_birth" />
      </mapping>
    </element>
  </snapshot>
  <differential>
    <element id="OMOPPerson">
      <path value="OMOPPerson" />
      <definition value="This table serves as the central identity management for all Persons in the database. It contains records that uniquely identify each person or patient, and some demographic information." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Element" />
      </type>
      <mapping>
        <identity value="OMOP-CDM-v5.3.1" />
        <map value="Person" />
      </mapping>
    </element>
    <element id="OMOPPerson.person_id">
      <path value="OMOPPerson.person_id" />
      <definition value="It is assumed that every person with a different unique identifier is in fact a different person and should be treated independently.&#xD;&#xA;&#xD;&#xA;Any person linkage that needs to occur to uniquely identify Persons ought to be done prior to writing this table. This identifier can be the original id from the source data provided if it is an integer, otherwise it can be an autogenerated number." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="integer" />
        <profile value="http://hl7.org/fhir/StructureDefinition/integer" />
      </type>
      <mapping>
        <identity value="OMOP-CDM-v5.3.1" />
        <map value="Person.person_id" />
      </mapping>
    </element>
    <element id="OMOPPerson.gender_concept_id">
      <path value="OMOPPerson.gender_concept_id" />
      <definition value="This field is meant to capture the biological sex at birth of the Person. This field should not be used to study gender identity issues." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/StructureDefinition/CodeableConcept" />
      </type>
      <binding>
        <strength value="required" />
        <valueSet value="https://fhir.ohdsi.org/ValueSet/OMOPGender" />
      </binding>
      <mapping>
        <identity value="OMOP-CDM-v5.3.1" />
        <map value="Person.gender_concept_id" />
      </mapping>
    </element>
    <element id="OMOPPerson.year_of_birth">
      <path value="OMOPPerson.year_of_birth" />
      <definition value="Compute age using year_of_birth.&#xD;&#xA;&#xD;&#xA;For data sources with date of birth, the year should be extracted. For data sources where the year of birth is not available, the approximate year of birth could be derived based on age group categorization, if available." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="integer" />
        <profile value="http://hl7.org/fhir/StructureDefinition/integer" />
      </type>
      <mapping>
        <identity value="OMOP-CDM-v5.3.1" />
        <map value="Person.year_of_birth" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>