Patient

This Resource covers data about patients. Its attributes provide very restricted demographic information. This includes an Identifier (unique for each patient), given name, family name, birth date, gender, contact details (Phone) and managing organization

Mandatory elements in the profile:

  • Identifier.system - Personal identification code.
  • Identifier.value - unique identifier for each patient in the system
  • name.given
  • name.family

Note : The size limit of the patient id is 64 characters max length


Overview

The below overview shows the elements of the resource, data type and the cardinality of each. Further details like "Binding"/"Fixed values"/"contraints" etc can be found on clicking on each element.

Canonical URL - http://roche.com/fhir/rdc/StructureDefinition/patient-v2

idΣ0..1id
metaΣ0..1Meta
implicitRulesΣ ?!0..1uri
language0..1codeBinding
textI0..1Narrative
contained0..*Resource
extensionI0..*Extension
modifierExtension?! I0..*Extension
id0..1string
extensionI0..*Extension
useΣ ?!0..1codeBinding
typeΣ0..0CodeableConceptBinding
systemΣ1..1uri
valueΣ1..1string
periodΣ I0..0Period
assignerΣ I0..0Reference(Organization)
activeΣ ?!0..1boolean
id0..1string
extensionI0..*Extension
useΣ ?!0..1codeBinding
textΣ0..0string
familyΣ I1..1string
givenΣ I1..*string
prefixΣ0..0string
suffixΣ0..0string
periodΣ I0..0Period
id0..1string
extensionI0..*Extension
systemΣ I0..1codeBinding
valueΣ0..1string
useΣ ?!0..1codeBinding
rankΣ0..0positiveInt
periodΣ I0..0Period
genderΣ0..1codeBinding
birthDateΣ0..1date
addressΣ0..0Address
maritalStatus0..0CodeableConceptBinding
photoI0..0Attachment
generalPractitionerI0..0Reference(Organization | Practitioner)
managingOrganizationΣ I0..1Reference(Organization)

Details

The below section shows a detailed view of the resource

Patient
DefinitionDemographics and other administrative information about an individual or animal receiving care or other health-related services.
Cardinality0...*
AliasSubjectOfCare Client Resident
Invariants
  • dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources
    contained.contained.empty()
  • dom-1: If the resource is contained in another resource, it SHALL NOT contain any narrative
    contained.text.empty()
  • dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated
    contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
  • dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource
    contained.where(('#'+id in %resource.descendants().reference).not()).empty()
Mappings
  • rim: Entity. Role, or Act
  • rim: Patient[classCode=PAT]
  • cda: ClinicalDocument.recordTarget.patientRole
  • w5: administrative.individual
Patient.id
DefinitionThe logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
Cardinality0...1
Typeid
SummaryTrue
Comments

The only time that a resource does not have an id is when it is being submitted to the server using a create operation.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
Patient.meta
DefinitionThe metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.
Cardinality0...1
TypeMeta
SummaryTrue
Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • rim: N/A
Patient.implicitRules
DefinitionA reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.
Cardinality0...1
Typeuri
ModifierTrue
SummaryTrue
Comments

Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element.

This element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
Patient.language
DefinitionThe base language in which the resource is written.
Cardinality0...1
Typecode
Binding
A human language.
Common Languages (extensible)
Comments

Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
Patient.text
DefinitionA human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.
Cardinality0...1
TypeNarrative
Aliasnarrative, html, xhtml, display
Comments

Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied). This may be necessary for data from legacy systems where information is captured as a "text blob" or where text is additionally entered raw or narrated and encoded in formation is added later.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • rim: N/A
  • rim: Act.text?
Patient.contained
DefinitionThese resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.
Cardinality0...*
TypeResource
Aliasinline resources, anonymous resources, contained resources
Comments

This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.

Mappings
  • rim: Entity. Role, or Act
  • rim: N/A
Patient.extension
DefinitionMay be used to represent additional information that is not part of the basic definition of the resource. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Cardinality0...*
TypeExtension
Aliasextensions, user content
Comments

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.

SlicingUnordered, Open, by url(Value)
Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: n/a
  • rim: N/A
Patient.modifierExtension
DefinitionMay be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.
Cardinality0...*
TypeExtension
ModifierTrue
Aliasextensions, user content
Comments

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.

SlicingUnordered, Open, by url(Value)
Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: n/a
  • rim: N/A
Patient.identifier
DefinitionAn identifier for this patient.
Cardinality1...1
TypeIdentifier
SummaryTrue
Requirements

Patients are almost always assigned specific numerical identifiers.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: CX / EI (occasionally, more often EI maps to a resource id or a URL)
  • rim: II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs. Also maps to Role[classCode=IDENT]
  • servd: Identifier
  • v2: PID-3
  • rim: id
  • cda: .id
  • w5: id
Patient.identifier.id
Definitionunique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality0...1
Typestring
Comments

Note that FHIR strings may not exceed 1MB in size

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
Patient.identifier.extension
DefinitionMay be used to represent additional information that is not part of the basic definition of the element. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Cardinality0...*
TypeExtension
Aliasextensions, user content
Comments

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.

SlicingUnordered, Open, by url(Value)
Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: n/a
  • rim: N/A
Patient.identifier.use
DefinitionThe purpose of this identifier.
Cardinality0...1
Typecode
Binding
Identifies the purpose for this identifier, if known .
IdentifierUse (required)
ModifierTrue
SummaryTrue
Requirements

Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers.

Comments

This is labeled as "Is Modifier" because applications should not mistake a temporary id for a permanent one. Applications can assume that an identifier is permanent unless it explicitly says that it is temporary.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: N/A
  • rim: Role.code or implied by context
Patient.identifier.type
DefinitionA coded type for the identifier that can be used to determine which identifier to use for a specific purpose.
Cardinality0...0
TypeCodeableConcept
Binding
A coded type for an identifier that can be used to determine which identifier to use for a specific purpose.
Identifier Type Codes (extensible)
SummaryTrue
Requirements

Allows users to make use of identifiers when the identifier system is not known.

Comments

This element deals only with general categories of identifiers. It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage.

Where the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: CE/CNE/CWE
  • rim: CD
  • orim: fhir:CodeableConcept rdfs:subClassOf dt:CD
  • v2: CX.5
  • rim: Role.code or implied by context
Patient.identifier.system
DefinitionEstablishes the namespace for the value - that is, a URL that describes a set values that are unique.
Cardinality1...1
Typeuri
SummaryTrue
Requirements

There are many sets of identifiers. To perform matching of two identifiers, we need to know what set we're dealing with. The system identifies a particular set of unique identifiers.

Comments

see http://en.wikipedia.org/wiki/Uniform_resource_identifier

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Examples
General

http://www.acme.com/identifiers/patient


Mappings
  • rim: n/a
  • v2: CX.4 / EI-2-4
  • rim: II.root or Role.id.root
  • servd: ./IdentifierType
Patient.identifier.value
DefinitionThe portion of the identifier typically relevant to the user and which is unique within the context of the system.
Cardinality1...1
Typestring
SummaryTrue
Comments

If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986. The value's primary purpose is computational mapping. As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.) A value formatted for human display can be conveyed using the Rendered Value extension.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Examples
General

123456


Mappings
  • rim: n/a
  • v2: CX.1 / EI.1
  • rim: II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)
  • servd: ./Value
Patient.identifier.period
DefinitionTime period during which identifier is/was valid for use.
Cardinality0...0
TypePeriod
SummaryTrue
Comments

This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. "the patient was an inpatient of the hospital for this time range") or one value from the range applies (e.g. "give to the patient between these two times"). If duration is required, specify the type as Interval|Duration.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • per-1: If present, start SHALL have a lower value than end
    start.empty() or end.empty() or (start <= end)
Mappings
  • rim: n/a
  • v2: DR
  • rim: IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]
  • v2: CX.7 + CX.8
  • rim: Role.effectiveTime or implied by context
  • servd: ./StartDate and ./EndDate
Patient.identifier.assigner
DefinitionOrganization that issued/manages the identifier.
Cardinality0...0
TypeReference(Organization)
SummaryTrue
Comments

The Identifier.assigner may omit the .reference element and only contain a .display element reflecting the name or other textual information about the assigning organization.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • ref-1: SHALL have a contained resource if a local reference is provided
    reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))
Mappings
  • rim: n/a
  • rim: The target of a resource reference is a RIM entry point (Act, Role, or Entity)
  • v2: CX.4 / (CX.4,CX.9,CX.10)
  • rim: II.assigningAuthorityName but note that this is an improper use by the definition of the field. Also Role.scoper
  • servd: ./IdentifierIssuingAuthority
Patient.active
DefinitionWhether this patient record is in active use.
Cardinality0...1
Typeboolean
ModifierTrue
SummaryTrue
Requirements

Need to be able to mark a patient record as not to be used because it was created in error.

Comments

Default is true. If a record is inactive, and linked to an active record, then future patient/record updates should occur on the other patient

This element is labeled as a modifier because when the patient record is marked as not active it is not expected to be used/referenced without being changed back to active.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • rim: statusCode
  • cda: n/a
  • w5: status
Patient.name
DefinitionA name associated with the individual.
Cardinality1...*
TypeHumanName
SummaryTrue
Requirements

Need to be able to track the patient by multiple names. Examples are your official name and a partner name.

Comments

A patient may have multiple names with different uses or applicable periods. For animals, the name is a "HumanName" in the sense that is assigned and used by humans and has the same patterns.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: XPN
  • rim: EN (actually, PN)
  • servd: ProviderName
  • v2: PID-5, PID-9
  • rim: name
  • cda: .patient.name
Patient.name.id
Definitionunique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality0...1
Typestring
Comments

Note that FHIR strings may not exceed 1MB in size

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
Patient.name.extension
DefinitionMay be used to represent additional information that is not part of the basic definition of the element. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Cardinality0...*
TypeExtension
Aliasextensions, user content
Comments

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.

SlicingUnordered, Open, by url(Value)
Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: n/a
  • rim: N/A
Patient.name.use
DefinitionIdentifies the purpose for this name.
Cardinality0...1
Typecode
Binding
The use of a human name
NameUse (required)
ModifierTrue
SummaryTrue
Requirements

Allows the appropriate name for a particular context of use to be selected from among a set of names.

Comments

This is labeled as "Is Modifier" because applications should not mistake a temporary or old name etc.for a current/permanent one. Applications can assume that a name is current unless it explicitly says that it is temporary or old.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: XPN.7, but often indicated by which field contains the name
  • rim: unique(./use)
  • servd: ./NamePurpose
Patient.name.text
DefinitionA full text representation of the name.
Cardinality0...0
Typestring
SummaryTrue
Requirements

A renderable, unencoded form.

Comments

Can provide both a text representation and structured parts.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: implied by XPN.11
  • rim: ./formatted
Patient.name.family
DefinitionThe part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.
Cardinality1...1
Typestring
SummaryTrue
Aliassurname
Comments

Family Name may be decomposed into specific parts using extensions (de, nl, es related cultures).

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • pat-regx-1: Patient family name should match the following regular expression: matches("^[a-z-A-Z0-9\\s\\.\\-\\'à-üА-яÆÐƎƏƐƔIJŊŒẞÞǷȜæðǝəɛɣijŋœĸſßþƿȝĄƁÇĐƊĘĦĮƘŁØƠŞȘŢȚŦŲƯY̨ƳąɓçđɗęħįƙłøơşșţțŧųưyƴÁÀÂÄǍĂĀÃÅǺǼǢĆĊĈČĎḌÉÈĖÊËĚĔĒẸĠĜǦĞĢáàâäǎăāãåǻǽǣćċĉčďḍéèėêëěĕēẹġĝǧğģĤḤIÍÌİÎÏǏĬĪĨỊĴĶĹĻĽĿʼNŃ̈ŇÑŅÔÖǑŎŌÕŐỌǾĥḥıíìiîïǐĭīĩịĵķĺļľŀʼnńnňñņóòôöǒŏōõőọǿŔŘŖŚŜŠṢŤṬÛÜǓŬŪŨŰŮỤẂẀŴẄÝỲŶŸȲỸŹŻŽẒŕřŗśŝšṣťṭúùûüǔŭūũűůụẃẁŵẅýỳŷÿȳỹźżžẓЁёÓÚÙÒ]*$")
    matches("^[a-z-A-Z0-9\\s\\.\\-\\'à-üА-яÆÐƎƏƐƔIJŊŒẞÞǷȜæðǝəɛɣijŋœĸſßþƿȝĄƁÇĐƊĘĦĮƘŁØƠŞȘŢȚŦŲƯY̨ƳąɓçđɗęħįƙłøơşșţțŧųưyƴÁÀÂÄǍĂĀÃÅǺǼǢĆĊĈČĎḌÉÈĖÊËĚĔĒẸĠĜǦĞĢáàâäǎăāãåǻǽǣćċĉčďḍéèėêëěĕēẹġĝǧğģĤḤIÍÌİÎÏǏĬĪĨỊĴĶĹĻĽĿʼNŃ̈ŇÑŅÔÖǑŎŌÕŐỌǾĥḥıíìiîïǐĭīĩịĵķĺļľŀʼnńnňñņóòôöǒŏōõőọǿŔŘŖŚŜŠṢŤṬÛÜǓŬŪŨŰŮỤẂẀŴẄÝỲŶŸȲỸŹŻŽẒŕřŗśŝšṣťṭúùûüǔŭūũűůụẃẁŵẅýỳŷÿȳỹźżžẓЁёÓÚÙÒ]*$")
Mappings
  • rim: n/a
  • v2: XPN.1/FN.1
  • rim: ./part[partType = FAM]
  • servd: ./FamilyName
Patient.name.given
DefinitionGiven name.
Cardinality1...*
Typestring
SummaryTrue
Aliasfirst name, middle name
Comments

If only initials are recorded, they may be used in place of the full name. Not called "first name" since given names do not always come first.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • pat-regx-2: Patient given name should match the following regular expression: matches("^[a-z-A-Z0-9\\s\\.\\-\\'à-üА-яÆÐƎƏƐƔIJŊŒẞÞǷȜæðǝəɛɣijŋœĸſßþƿȝĄƁÇĐƊĘĦĮƘŁØƠŞȘŢȚŦŲƯY̨ƳąɓçđɗęħįƙłøơşșţțŧųưyƴÁÀÂÄǍĂĀÃÅǺǼǢĆĊĈČĎḌÉÈĖÊËĚĔĒẸĠĜǦĞĢáàâäǎăāãåǻǽǣćċĉčďḍéèėêëěĕēẹġĝǧğģĤḤIÍÌİÎÏǏĬĪĨỊĴĶĹĻĽĿʼNŃ̈ŇÑŅÔÖǑŎŌÕŐỌǾĥḥıíìiîïǐĭīĩịĵķĺļľŀʼnńnňñņóòôöǒŏōõőọǿŔŘŖŚŜŠṢŤṬÛÜǓŬŪŨŰŮỤẂẀŴẄÝỲŶŸȲỸŹŻŽẒŕřŗśŝšṣťṭúùûüǔŭūũűůụẃẁŵẅýỳŷÿȳỹźżžẓЁёÓÚÙÒ]*$")
    matches("^[a-z-A-Z0-9\\s\\.\\-\\'à-üА-яÆÐƎƏƐƔIJŊŒẞÞǷȜæðǝəɛɣijŋœĸſßþƿȝĄƁÇĐƊĘĦĮƘŁØƠŞȘŢȚŦŲƯY̨ƳąɓçđɗęħįƙłøơşșţțŧųưyƴÁÀÂÄǍĂĀÃÅǺǼǢĆĊĈČĎḌÉÈĖÊËĚĔĒẸĠĜǦĞĢáàâäǎăāãåǻǽǣćċĉčďḍéèėêëěĕēẹġĝǧğģĤḤIÍÌİÎÏǏĬĪĨỊĴĶĹĻĽĿʼNŃ̈ŇÑŅÔÖǑŎŌÕŐỌǾĥḥıíìiîïǐĭīĩịĵķĺļľŀʼnńnňñņóòôöǒŏōõőọǿŔŘŖŚŜŠṢŤṬÛÜǓŬŪŨŰŮỤẂẀŴẄÝỲŶŸȲỸŹŻŽẒŕřŗśŝšṣťṭúùûüǔŭūũűůụẃẁŵẅýỳŷÿȳỹźżžẓЁёÓÚÙÒ]*$")
Mappings
  • rim: n/a
  • v2: XPN.2 + XPN.3
  • rim: ./part[partType = GIV]
  • servd: ./GivenNames
Patient.name.prefix
DefinitionPart of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.
Cardinality0...0
Typestring
SummaryTrue
Comments

Note that FHIR strings may not exceed 1MB in size

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: XPN.5
  • rim: ./part[partType = PFX]
  • servd: ./TitleCode
Patient.name.suffix
DefinitionPart of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.
Cardinality0...0
Typestring
SummaryTrue
Comments

Note that FHIR strings may not exceed 1MB in size

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: XPN/4
  • rim: ./part[partType = SFX]
Patient.name.period
DefinitionIndicates the period of time when this name was valid for the named person.
Cardinality0...0
TypePeriod
SummaryTrue
Requirements

Allows names to be placed in historical context.

Comments

This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. "the patient was an inpatient of the hospital for this time range") or one value from the range applies (e.g. "give to the patient between these two times"). If duration is required, specify the type as Interval|Duration.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • per-1: If present, start SHALL have a lower value than end
    start.empty() or end.empty() or (start <= end)
Mappings
  • rim: n/a
  • v2: DR
  • rim: IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]
  • v2: XPN.13 + XPN.14
  • rim: ./usablePeriod[type="IVL<TS>"]
  • servd: ./StartDate and ./EndDate
Patient.telecom
DefinitionA contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.
Cardinality0...*
TypeContactPoint
SummaryTrue
Requirements

People have (primary) ways to contact them in some way such as phone, email.

Comments

A Patient may have multiple ways to be contacted with different uses or applicable periods. May need to have options for contacting the person urgently and also to help with identification. The address may not go directly to the individual, but may reach another party that is able to proxy for the patient (i.e. home phone, or pet owner's phone).

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • cpt-2: A system is required if a value is provided.
    value.empty() or system.exists()
Mappings
  • rim: n/a
  • v2: XTN
  • rim: TEL
  • servd: ContactPoint
  • v2: PID-13, PID-14, PID-40
  • rim: telecom
  • cda: .telecom
Patient.telecom.id
Definitionunique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality0...1
Typestring
Comments

Note that FHIR strings may not exceed 1MB in size

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
Patient.telecom.extension
DefinitionMay be used to represent additional information that is not part of the basic definition of the element. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Cardinality0...*
TypeExtension
Aliasextensions, user content
Comments

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.

SlicingUnordered, Open, by url(Value)
Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: n/a
  • rim: N/A
Patient.telecom.system
DefinitionTelecommunications form for contact point - what communications system is required to make use of the contact.
Cardinality0...1
Typecode
Binding
Telecommunications form for contact point
ContactPointSystem (required)
SummaryTrue
Comments

Note that FHIR strings may not exceed 1MB in size

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: XTN.3
  • rim: ./scheme
  • servd: ./ContactPointType
Patient.telecom.value
DefinitionThe actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).
Cardinality0...1
Typestring
SummaryTrue
Requirements

Need to support legacy numbers that are not in a tightly controlled format.

Comments

Additional text data such as phone extension numbers, or notes about use of the contact are sometimes included in the value.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: XTN.1 (or XTN.12)
  • rim: ./url
  • servd: ./Value
Patient.telecom.use
DefinitionIdentifies the purpose for the contact point.
Cardinality0...1
Typecode
Binding
Use of contact point
ContactPointUse (required)
ModifierTrue
SummaryTrue
Requirements

Need to track the way a person uses this contact, so a user can choose which is appropriate for their purpose.

Comments

This is labeled as "Is Modifier" because applications should not mistake a temporary or old contact etc.for a current/permanent one. Applications can assume that a contact is current unless it explicitly says that it is temporary or old.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: XTN.2 - but often indicated by field
  • rim: unique(./use)
  • servd: ./ContactPointPurpose
Patient.telecom.rank
DefinitionSpecifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.
Cardinality0...0
TypepositiveInt
SummaryTrue
Comments

Note that rank does not necessarily follow the order in which the contacts are represented in the instance.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: n/a
Patient.telecom.period
DefinitionTime period when the contact point was/is in use.
Cardinality0...0
TypePeriod
SummaryTrue
Comments

This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. "the patient was an inpatient of the hospital for this time range") or one value from the range applies (e.g. "give to the patient between these two times"). If duration is required, specify the type as Interval|Duration.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • per-1: If present, start SHALL have a lower value than end
    start.empty() or end.empty() or (start <= end)
Mappings
  • rim: n/a
  • v2: DR
  • rim: IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]
  • v2: N/A
  • rim: ./usablePeriod[type="IVL<TS>"]
  • servd: ./StartDate and ./EndDate
Patient.gender
DefinitionAdministrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.
Cardinality0...1
Typecode
Binding
The gender of a person used for administrative purposes.
AdministrativeGender (required)
SummaryTrue
Requirements

Needed for identification of the individual, in combination with (at least) name and birth date. Gender of individual drives many clinical processes.

Comments

The gender may not match the biological sex as determined by genetics, or the individual's preferred identification. Note that for both humans and particularly animals, there are other legitimate possibilities than M and F, though the vast majority of systems and contexts only support M and F. Systems providing decision support or enforcing business rules should ideally do this on the basis of Observations dealing with the specific gender aspect of interest (anatomical, chromosonal, social, etc.) However, because these observations are infrequently recorded, defaulting to the administrative gender is common practice. Where such defaulting occurs, rule enforcement should allow for the variation between administrative and biological, chromosonal and other gender aspects. For example, an alert about a hysterectomy on a male should be handled as a warning or overrideable error, not a "hard" error.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: PID-8
  • rim: player[classCode=PSN|ANM and determinerCode=INSTANCE]/administrativeGender
  • cda: .patient.administrativeGenderCode
Patient.birthDate
DefinitionThe date of birth for the individual.
Cardinality0...1
Typedate
SummaryTrue
Requirements

Age of the individual drives many clinical processes.

Comments

At least an estimated year should be provided as a guess if the real DOB is unknown There is a standard extension "patient-birthTime" available that should be used where Time is required (such as in maternaty/infant care systems).

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: PID-7
  • rim: player[classCode=PSN|ANM and determinerCode=INSTANCE]/birthTime
  • cda: .patient.birthTime
  • loinc: 21112-8
Patient.deceased[x]
DefinitionIndicates if the individual is deceased or not.
Cardinality0...0
Typeboolean, dateTime
ModifierTrue
SummaryTrue
Requirements

The fact that a patient is deceased influences the clinical process. Also, in human communication and relation management it is necessary to know whether the person is alive.

Comments

If there's no value in the instance it means there is no statement on whether or not the individual is deceased. Most systems will interpret the absence of a value as a sign of the person being alive.

This element is labeled as a modifier because once a patient is marked as deceased, the actions that are appropriate to perform on the patient may be significantly different.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: PID-30 (bool) and PID-29 (datetime)
  • rim: player[classCode=PSN|ANM and determinerCode=INSTANCE]/deceasedInd, player[classCode=PSN|ANM and determinerCode=INSTANCE]/deceasedTime
  • cda: n/a
Patient.address
DefinitionAddresses for the individual.
Cardinality0...0
TypeAddress
SummaryTrue
Requirements

May need to keep track of patient addresses for contacting, billing or reporting requirements and also to help with identification.

Comments

Patient may have multiple addresses with different uses or applicable periods.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: XAD
  • rim: AD
  • servd: Address
  • v2: PID-11
  • rim: addr
  • cda: .addr
Patient.maritalStatus
DefinitionThis field contains a patient's most recent marital (civil) status.
Cardinality0...0
TypeCodeableConcept
Binding
The domestic partnership status of a person.
Marital Status Codes (extensible)
Requirements

Most, if not all systems capture it.

Comments

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.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: CE/CNE/CWE
  • rim: CD
  • orim: fhir:CodeableConcept rdfs:subClassOf dt:CD
  • v2: PID-16
  • rim: player[classCode=PSN]/maritalStatusCode
  • cda: .patient.maritalStatusCode
Patient.multipleBirth[x]
DefinitionIndicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer).
Cardinality0...0
Typeboolean, integer
Requirements

For disambiguation of multiple-birth children, especially relevant where the care provider doesn't meet the patient, such as labs.

Comments

Where the valueInteger is provided, the number is the birth number in the sequence. E.g. The middle birth in tripplets would be valueInteger=2 and the third born would have valueInteger=3 If a bool value was provided for this tripplets examle, then all 3 patient records would have valueBool=true (the ordering is not indicated).

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: PID-24 (bool), PID-25 (integer)
  • rim: player[classCode=PSN|ANM and determinerCode=INSTANCE]/multipleBirthInd, player[classCode=PSN|ANM and determinerCode=INSTANCE]/multipleBirthOrderNumber
  • cda: n/a
Patient.photo
DefinitionImage of the patient.
Cardinality0...0
TypeAttachment
Requirements

Many EHR systems have the capability to capture an image of the patient. Fits with newer social media usage too.

Comments

When providing a summary view (for example with Observation.value[x]) Attachment should be represented with a brief display text such as "Attachment".

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • att-1: It the Attachment has data, it SHALL have a contentType
    data.empty() or contentType.exists()
Mappings
  • rim: n/a
  • v2: ED/RP
  • rim: ED
  • v2: OBX-5 - needs a profile
  • rim: player[classCode=PSN|ANM and determinerCode=INSTANCE]/desc
  • cda: n/a
Patient.contact
DefinitionA contact party (e.g. guardian, partner, friend) for the patient.
Cardinality0...0
TypeBackboneElement
Requirements

Need to track people you can contact about the patient.

Comments

Contact covers all kinds of contact parties: family members, business contacts, guardians, caregivers. Not applicable to register pedigree and family ties beyond use of having contact.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • pat-1: SHALL at least contain a contact's details or a reference to an organization
    name.exists() or telecom.exists() or address.exists() or organization.exists()
Mappings
  • rim: n/a
  • rim: player[classCode=PSN|ANM and determinerCode=INSTANCE]/scopedRole[classCode=CON]
  • cda: n/a
Patient.contact.id
Definitionunique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality0...1
Typestring
Comments

Note that FHIR strings may not exceed 1MB in size

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
Patient.contact.extension
DefinitionMay be used to represent additional information that is not part of the basic definition of the element. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Cardinality0...*
TypeExtension
Aliasextensions, user content
Comments

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.

SlicingUnordered, Open, by url(Value)
Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: n/a
  • rim: N/A
Patient.contact.modifierExtension
DefinitionMay be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.
Cardinality0...*
TypeExtension
ModifierTrue
SummaryTrue
Aliasextensions, user content, modifiers
Comments

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.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: n/a
  • rim: N/A
Patient.contact.relationship
DefinitionThe nature of the relationship between the patient and the contact person.
Cardinality0...*
TypeCodeableConcept
Binding
The nature of the relationship between a patient and a contact person for that patient.
v2 Contact Role (extensible)
Requirements

Used to determine which contact person is the most relevant to approach, depending on circumstances.

Comments

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.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: CE/CNE/CWE
  • rim: CD
  • orim: fhir:CodeableConcept rdfs:subClassOf dt:CD
  • v2: NK1-7, NK1-3
  • rim: code
  • cda: n/a
Patient.contact.name
DefinitionA name associated with the contact person.
Cardinality0...1
TypeHumanName
Requirements

Contact persons need to be identified by name, but it is uncommon to need details about multiple other names for that contact person.

Comments

Names may be changed, or repudiated, or people may have different names in different contexts. Names may be divided into parts of different type that have variable significance depending on context, though the division into parts does not always matter. With personal names, the different parts may or may not be imbued with some implicit meaning; various cultures associate different importance with the name parts and the degree to which systems must care about name parts around the world varies widely.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: XPN
  • rim: EN (actually, PN)
  • servd: ProviderName
  • v2: NK1-2
  • rim: name
  • cda: n/a
Patient.contact.telecom
DefinitionA contact detail for the person, e.g. a telephone number or an email address.
Cardinality0...*
TypeContactPoint
Requirements

People have (primary) ways to contact them in some way such as phone, email.

Comments

Contact may have multiple ways to be contacted with different uses or applicable periods. May need to have options for contacting the person urgently, and also to help with identification.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • cpt-2: A system is required if a value is provided.
    value.empty() or system.exists()
Mappings
  • rim: n/a
  • v2: XTN
  • rim: TEL
  • servd: ContactPoint
  • v2: NK1-5, NK1-6, NK1-40
  • rim: telecom
  • cda: n/a
Patient.contact.address
DefinitionAddress for the contact person.
Cardinality0...1
TypeAddress
Requirements

Need to keep track where the contact person can be contacted per postal mail or visited.

Comments

Note: address is for postal addresses, not physical locations.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: XAD
  • rim: AD
  • servd: Address
  • v2: NK1-4
  • rim: addr
  • cda: n/a
Patient.contact.gender
DefinitionAdministrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.
Cardinality0...1
Typecode
Binding
The gender of a person used for administrative purposes.
AdministrativeGender (required)
Requirements

Needed to address the person correctly.

Comments

Note that FHIR strings may not exceed 1MB in size

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: NK1-15
  • rim: player[classCode=PSN|ANM and determinerCode=INSTANCE]/administrativeGender
  • cda: n/a
Patient.contact.organization
DefinitionOrganization on behalf of which the contact is acting or for which the contact is working.
Cardinality0...1
TypeReference(Organization)
Requirements

For guardians or business related contacts, the organization is relevant.

Comments

References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • ref-1: SHALL have a contained resource if a local reference is provided
    reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))
Mappings
  • rim: n/a
  • rim: The target of a resource reference is a RIM entry point (Act, Role, or Entity)
  • v2: NK1-13, NK1-30, NK1-31, NK1-32, NK1-41
  • rim: scoper
  • cda: n/a
Patient.contact.period
DefinitionThe period during which this contact person or organization is valid to be contacted relating to this patient.
Cardinality0...1
TypePeriod
Comments

This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. "the patient was an inpatient of the hospital for this time range") or one value from the range applies (e.g. "give to the patient between these two times"). If duration is required, specify the type as Interval|Duration.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • per-1: If present, start SHALL have a lower value than end
    start.empty() or end.empty() or (start <= end)
Mappings
  • rim: n/a
  • v2: DR
  • rim: IVL<TS>[lowClosed="true" and highClosed="true"] or URG<TS>[lowClosed="true" and highClosed="true"]
  • rim: effectiveTime
  • cda: n/a
Patient.animal
DefinitionThis patient is known to be an animal.
Cardinality0...0
TypeBackboneElement
ModifierTrue
SummaryTrue
Requirements

Many clinical systems are extended to care for animal patients as well as human.

Comments

The animal element is labeled "Is Modifier" since patients may be non-human. Systems SHALL either handle patient details appropriately (e.g. inform users patient is not human) or reject declared animal records. The absense of the animal element does not imply that the patient is a human. If a system requires such a positive assertion that the patient is human, an extension will be required. (Do not use a species of homo-sapiens in animal species, as this would incorrectly infer that the patient is an animal).

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • rim: player[classCode=ANM]
  • cda: n/a
Patient.animal.id
Definitionunique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality0...1
Typestring
Comments

Note that FHIR strings may not exceed 1MB in size

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
Patient.animal.extension
DefinitionMay be used to represent additional information that is not part of the basic definition of the element. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Cardinality0...*
TypeExtension
Aliasextensions, user content
Comments

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.

SlicingUnordered, Open, by url(Value)
Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: n/a
  • rim: N/A
Patient.animal.modifierExtension
DefinitionMay be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.
Cardinality0...*
TypeExtension
ModifierTrue
SummaryTrue
Aliasextensions, user content, modifiers
Comments

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.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: n/a
  • rim: N/A
Patient.animal.species
DefinitionIdentifies the high level taxonomic categorization of the kind of animal.
Cardinality1...1
TypeCodeableConcept
Binding
The species of an animal.
AnimalSpecies (example)
SummaryTrue
Requirements

Need to know what kind of animal.

Comments

If the patient is non-human, at least a species SHALL be specified. Species SHALL be a widely recognised taxonomic classification. It may or may not be Linnaean taxonomy and may or may not be at the level of species. If the level is finer than species--such as a breed code--the code system used SHALL allow inference of the species. (The common example is that the word "Hereford" does not allow inference of the species Bos taurus, because there is a Hereford pig breed, but the SNOMED CT code for "Hereford Cattle Breed" does.).

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: CE/CNE/CWE
  • rim: CD
  • orim: fhir:CodeableConcept rdfs:subClassOf dt:CD
  • v2: PID-35
  • rim: code
  • cda: n/a
Patient.animal.breed
DefinitionIdentifies the detailed categorization of the kind of animal.
Cardinality0...1
TypeCodeableConcept
Binding
The breed of an animal.
AnimalBreeds (example)
SummaryTrue
Requirements

May need to know the specific kind within the species.

Comments

Breed MAY be used to provide further taxonomic or non-taxonomic classification. It may involve local or proprietary designation--such as commercial strain--and/or additional information such as production type.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: CE/CNE/CWE
  • rim: CD
  • orim: fhir:CodeableConcept rdfs:subClassOf dt:CD
  • v2: PID-37
  • rim: playedRole[classCode=GEN]/scoper[classCode=ANM, determinerCode=KIND]/code
  • cda: n/a
Patient.animal.genderStatus
DefinitionIndicates the current state of the animal's reproductive organs.
Cardinality0...1
TypeCodeableConcept
Binding
The state of the animal's reproductive organs.
GenderStatus (example)
SummaryTrue
Requirements

Gender status can affect housing and animal behavior.

Comments

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.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: CE/CNE/CWE
  • rim: CD
  • orim: fhir:CodeableConcept rdfs:subClassOf dt:CD
  • v2: N/A
  • rim: genderStatusCode
  • cda: n/a
Patient.communication
DefinitionLanguages which may be used to communicate with the patient about his or her health.
Cardinality0...0
TypeBackboneElement
Requirements

If a patient does not speak the local language, interpreters may be required, so languages spoken and proficiency is an important things to keep track of both for patient and other persons of interest.

Comments

If no language is specified, this implies that the default local language is spoken. If you need to convey proficiency for multiple modes then you need multiple Patient.Communication associations. For animals, language is not a relevant field, and should be absent from the instance. If the Patient does not speak the default local language, then the Interpreter Required Standard can be used to explicitly declare that an interpreter is required.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • rim: LanguageCommunication
  • cda: patient.languageCommunication
Patient.communication.id
Definitionunique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality0...1
Typestring
Comments

Note that FHIR strings may not exceed 1MB in size

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
Patient.communication.extension
DefinitionMay be used to represent additional information that is not part of the basic definition of the element. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Cardinality0...*
TypeExtension
Aliasextensions, user content
Comments

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.

SlicingUnordered, Open, by url(Value)
Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: n/a
  • rim: N/A
Patient.communication.modifierExtension
DefinitionMay be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.
Cardinality0...*
TypeExtension
ModifierTrue
SummaryTrue
Aliasextensions, user content, modifiers
Comments

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.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: n/a
  • rim: N/A
Patient.communication.language
DefinitionThe ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. "en" for English, or "en-US" for American English versus "en-EN" for England English.
Cardinality1...1
TypeCodeableConcept
Binding
A human language.
Common Languages (extensible)
Requirements

Most systems in multilingual countries will want to convey language. Not all systems actually need the regional dialect.

Comments

The structure aa-BB with this exact casing is one the most widely used notations for locale. However not all systems actually code this but instead have it as free text. Hence CodeableConcept instead of code as the data type.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: CE/CNE/CWE
  • rim: CD
  • orim: fhir:CodeableConcept rdfs:subClassOf dt:CD
  • v2: PID-15, LAN-2
  • rim: player[classCode=PSN|ANM and determinerCode=INSTANCE]/languageCommunication/code
  • cda: .languageCode
Patient.communication.preferred
DefinitionIndicates whether or not the patient prefers this language (over other languages he masters up a certain level).
Cardinality0...1
Typeboolean
Requirements

People that master multiple languages up to certain level may prefer one or more, i.e. feel more confident in communicating in a particular language making other languages sort of a fall back method.

Comments

This language is specifically identified for communicating healthcare information.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • v2: PID-15
  • rim: preferenceInd
  • cda: .preferenceInd
Patient.generalPractitioner
DefinitionPatient's nominated care provider.
Cardinality0...0
TypeReference(Organization | Practitioner)
AliascareProvider
Comments

This may be the primary care provider (in a GP context), or it may be a patient nominated care manager in a community/disablity setting, or even organization that will provide people to perform the care provider roles.

It is not to be used to record Care Teams, these should be in a CareTeam resource that may be linked to the CarePlan or EpisodeOfCare resources.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • ref-1: SHALL have a contained resource if a local reference is provided
    reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))
Mappings
  • rim: n/a
  • rim: The target of a resource reference is a RIM entry point (Act, Role, or Entity)
  • v2: PD1-4
  • rim: subjectOf.CareEvent.performer.AssignedEntity
  • cda: n/a
Patient.managingOrganization
DefinitionOrganization that is the custodian of the patient record.
Cardinality0...1
TypeReference(Organization)
SummaryTrue
Requirements

Need to know who recognizes this patient record, manages and updates it.

Comments

There is only one managing organization for a specific patient record. Other organizations will have their own Patient record, and may use the Link property to join the records together (or a Person resource which can include confidence ratings for the association).

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • ref-1: SHALL have a contained resource if a local reference is provided
    reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))
Mappings
  • rim: n/a
  • rim: The target of a resource reference is a RIM entry point (Act, Role, or Entity)
  • rim: scoper
  • cda: .providerOrganization
Patient.link
DefinitionLink to another patient resource that concerns the same actual patient.
Cardinality0...0
TypeBackboneElement
ModifierTrue
SummaryTrue
Requirements

There are multiple usecases:

  • Duplicate patient records due to the clerical errors associated with the difficulties of identifying humans consistently, and * Distribution of patient information across multiple servers.
Comments

There is no assumption that linked patient records have mutual links.

This element is labelled as a modifier because it may not be the main Patient resource, and the referenced patient should be used instead of this Patient record. This is when the link.type value is 'replaced-by'.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • rim: outboundLink
  • cda: n/a
Patient.link.id
Definitionunique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
Cardinality0...1
Typestring
Comments

Note that FHIR strings may not exceed 1MB in size

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
Patient.link.extension
DefinitionMay be used to represent additional information that is not part of the basic definition of the element. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
Cardinality0...*
TypeExtension
Aliasextensions, user content
Comments

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.

SlicingUnordered, Open, by url(Value)
Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: n/a
  • rim: N/A
Patient.link.modifierExtension
DefinitionMay be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.
Cardinality0...*
TypeExtension
ModifierTrue
SummaryTrue
Aliasextensions, user content, modifiers
Comments

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.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • ext-1: Must have either extensions or value[x], not both
    extension.exists() != value.exists()
Mappings
  • rim: n/a
  • rim: N/A
Patient.link.other
DefinitionThe other patient resource that the link refers to.
Cardinality1...1
TypeReference(Patient | RelatedPerson)
SummaryTrue
Comments

Referencing a RelatedPerson here removes the need to use a Person record to associate a Patient and RelatedPerson as the same individual.

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
  • ref-1: SHALL have a contained resource if a local reference is provided
    reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))
Mappings
  • rim: n/a
  • rim: The target of a resource reference is a RIM entry point (Act, Role, or Entity)
  • v2: PID-3, MRG-1
  • rim: id
  • cda: n/a
Patient.link.type
DefinitionThe type of link between this patient resource and another patient resource.
Cardinality1...1
Typecode
Binding
The type of link between this patient resource and another patient resource.
LinkType (required)
SummaryTrue
Comments

Note that FHIR strings may not exceed 1MB in size

Invariants
  • ele-1: All FHIR elements must have a @value or children
    hasValue() | (children().count() > id.count())
Mappings
  • rim: n/a
  • rim: typeCode
  • cda: n/a

Table

The below section shows a table view of the resource

Patient0..*
Patient.idid0..1
Patient.metaMeta0..1
Patient.implicitRulesuri0..1
Patient.languagecode0..1
Patient.textNarrative0..1
Patient.containedResource0..*
Patient.extensionExtension0..*
Patient.modifierExtensionExtension0..*
Patient.identifierIdentifier1..1
Patient.identifier.idstring0..1
Patient.identifier.extensionExtension0..*
Patient.identifier.usecode0..1
Patient.identifier.typeCodeableConcept0..0
Patient.identifier.systemuri1..1
Patient.identifier.valuestring1..1
Patient.identifier.periodPeriod0..0
Patient.identifier.assignerReference(Organization)0..0
Patient.activeboolean0..1
Patient.nameHumanName1..*
Patient.name.idstring0..1
Patient.name.extensionExtension0..*
Patient.name.usecode0..1
Patient.name.textstring0..0
Patient.name.familystring1..1
Patient.name.givenstring1..*
Patient.name.prefixstring0..0
Patient.name.suffixstring0..0
Patient.name.periodPeriod0..0
Patient.telecomContactPoint0..*
Patient.telecom.idstring0..1
Patient.telecom.extensionExtension0..*
Patient.telecom.systemcode0..1
Patient.telecom.valuestring0..1
Patient.telecom.usecode0..1
Patient.telecom.rankpositiveInt0..0
Patient.telecom.periodPeriod0..0
Patient.gendercode0..1
Patient.birthDatedate0..1
Patient.deceased[x]boolean, dateTime0..0
Patient.addressAddress0..0
Patient.maritalStatusCodeableConcept0..0
Patient.multipleBirth[x]boolean, integer0..0
Patient.photoAttachment0..0
Patient.contactBackboneElement0..0
Patient.contact.idstring0..1
Patient.contact.extensionExtension0..*
Patient.contact.modifierExtensionExtension0..*
Patient.contact.relationshipCodeableConcept0..*
Patient.contact.nameHumanName0..1
Patient.contact.telecomContactPoint0..*
Patient.contact.addressAddress0..1
Patient.contact.gendercode0..1
Patient.contact.organizationReference(Organization)0..1
Patient.contact.periodPeriod0..1
Patient.animalBackboneElement0..0
Patient.animal.idstring0..1
Patient.animal.extensionExtension0..*
Patient.animal.modifierExtensionExtension0..*
Patient.animal.speciesCodeableConcept1..1
Patient.animal.breedCodeableConcept0..1
Patient.animal.genderStatusCodeableConcept0..1
Patient.communicationBackboneElement0..0
Patient.communication.idstring0..1
Patient.communication.extensionExtension0..*
Patient.communication.modifierExtensionExtension0..*
Patient.communication.languageCodeableConcept1..1
Patient.communication.preferredboolean0..1
Patient.generalPractitionerReference(Organization | Practitioner)0..0
Patient.managingOrganizationReference(Organization)0..1
Patient.linkBackboneElement0..0
Patient.link.idstring0..1
Patient.link.extensionExtension0..*
Patient.link.modifierExtensionExtension0..*
Patient.link.otherReference(Patient | RelatedPerson)1..1
Patient.link.typecode1..1

XML

The below section has the structure definition in XML format

<StructureDefinition xmlns="http://hl7.org/fhir">
    <id value="b02d8df3-3866-44bf-9c35-89619bd6d629" />
    <url value="http://roche.com/fhir/rdc/StructureDefinition/patient-v2" />
    <name value="patient-v2" />
    <status value="active" />
    <description value="This Patient profile is currently used for EMR integration" />
    <fhirVersion value="3.0.2" />
    <mapping>
        <identity value="rim" />
        <uri value="http://hl7.org/v3" />
        <name value="RIM Mapping" />
    </mapping>
    <mapping>
        <identity value="cda" />
        <uri value="http://hl7.org/v3/cda" />
        <name value="CDA (R2)" />
    </mapping>
    <mapping>
        <identity value="w5" />
        <uri value="http://hl7.org/fhir/w5" />
        <name value="W5 Mapping" />
    </mapping>
    <mapping>
        <identity value="v2" />
        <uri value="http://hl7.org/v2" />
        <name value="HL7 v2 Mapping" />
    </mapping>
    <mapping>
        <identity value="loinc" />
        <uri value="http://loinc.org" />
        <name value="LOINC code for the element" />
    </mapping>
    <kind value="resource" />
    <abstract value="false" />
    <type value="Patient" />
    <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient" />
    <derivation value="constraint" />
    <snapshot>
        <element id="Patient">
            <path value="Patient" />
            <short value="Information about an individual or animal receiving health care services" />
            <definition value="Demographics and other administrative information about an individual or animal receiving care or other health-related services." />
            <alias value="SubjectOfCare Client Resident" />
            <min value="0" />
            <max value="*" />
            <base>
                <path value="Resource" />
                <min value="0" />
                <max value="*" />
            </base>
            <constraint>
                <key value="dom-2" />
                <severity value="error" />
                <human value="If the resource is contained in another resource, it SHALL NOT contain nested Resources" />
                <expression value="contained.contained.empty()" />
                <xpath value="not(parent::f:contained and f:contained)" />
            </constraint>
            <constraint>
                <key value="dom-1" />
                <severity value="error" />
                <human value="If the resource is contained in another resource, it SHALL NOT contain any narrative" />
                <expression value="contained.text.empty()" />
                <xpath value="not(parent::f:contained and f:text)" />
            </constraint>
            <constraint>
                <key value="dom-4" />
                <severity value="error" />
                <human value="If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated" />
                <expression value="contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()" />
                <xpath value="not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))" />
            </constraint>
            <constraint>
                <key value="dom-3" />
                <severity value="error" />
                <human value="If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource" />
                <expression value="contained.where((&#39;#&#39;+id in %resource.descendants().reference).not()).empty()" />
                <xpath value="not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat(&#39;#&#39;, $id))]))" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="Entity. Role, or Act" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="Patient[classCode=PAT]" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value="ClinicalDocument.recordTarget.patientRole" />
            </mapping>
            <mapping>
                <identity value="w5" />
                <map value="administrative.individual" />
            </mapping>
        </element>
        <element id="Patient.id">
            <path value="Patient.id" />
            <short value="Logical id of this artifact" />
            <definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." />
            <comment value="The only time that a resource does not have an id is when it is being submitted to the server using a create operation." />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Resource.id" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="id" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.meta">
            <path value="Patient.meta" />
            <short value="Metadata about the resource" />
            <definition value="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource." />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Resource.meta" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="Meta" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="N/A" />
            </mapping>
        </element>
        <element id="Patient.implicitRules">
            <path value="Patient.implicitRules" />
            <short value="A set of rules under which this content was created" />
            <definition value="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content." />
            <comment value="Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it&#39;s meaning or interpretation." />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Resource.implicitRules" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="uri" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isModifier value="true" />
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.language">
            <path value="Patient.language" />
            <short value="Language of the resource content" />
            <definition value="The base language in which the resource is written." />
            <comment value="Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute)." />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Resource.language" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="code" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <binding>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet">
                    <valueReference>
                        <reference value="http://hl7.org/fhir/ValueSet/all-languages" />
                    </valueReference>
                </extension>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
                    <valueString value="Language" />
                </extension>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
                    <valueBoolean value="true" />
                </extension>
                <strength value="extensible" />
                <description value="A human language." />
                <valueSetReference>
                    <reference value="http://hl7.org/fhir/ValueSet/languages" />
                </valueSetReference>
            </binding>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.text">
            <path value="Patient.text" />
            <short value="Text summary of the resource, for human interpretation" />
            <definition value="A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety." />
            <comment value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a &quot;text blob&quot; or where text is additionally entered raw or narrated and encoded in formation is added later." />
            <alias value="narrative" />
            <alias value="html" />
            <alias value="xhtml" />
            <alias value="display" />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="DomainResource.text" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="Narrative" />
            </type>
            <condition value="ele-1" />
            <condition value="dom-1" />
            <constraint>
                <key value="ele-1" />
                <severity value="error" />
                <human value="All FHIR elements must have a @value or children" />
                <expression value="hasValue() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="N/A" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="Act.text?" />
            </mapping>
        </element>
        <element id="Patient.contained">
            <path value="Patient.contained" />
            <short value="Contained, inline Resources" />
            <definition value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope." />
            <comment value="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again." />
            <alias value="inline resources" />
            <alias value="anonymous resources" />
            <alias value="contained resources" />
            <min value="0" />
            <max value="*" />
            <base>
                <path value="DomainResource.contained" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="Resource" />
            </type>
            <mapping>
                <identity value="rim" />
                <map value="Entity. Role, or Act" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="N/A" />
            </mapping>
        </element>
        <element id="Patient.extension">
            <path value="Patient.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 resource. In order 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 is allowed to 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="DomainResource.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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </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(.), &#39;value&#39;)])" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="N/A" />
            </mapping>
        </element>
        <element id="Patient.modifierExtension">
            <path value="Patient.modifierExtension" />
            <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="Extensions that cannot be ignored" />
            <definition value="May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions." />
            <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="DomainResource.modifierExtension" />
                <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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </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(.), &#39;value&#39;)])" />
            </constraint>
            <isModifier value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="N/A" />
            </mapping>
        </element>
        <element id="Patient.identifier">
            <path value="Patient.identifier" />
            <short value="An identifier for this patient" />
            <definition value="An identifier for this patient." />
            <requirements value="Patients are almost always assigned specific numerical identifiers." />
            <min value="1" />
            <max value="1" />
            <base>
                <path value="Patient.identifier" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="Identifier" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]" />
            </mapping>
            <mapping>
                <identity value="servd" />
                <map value="Identifier" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="PID-3" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="id" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value=".id" />
            </mapping>
            <mapping>
                <identity value="w5" />
                <map value="id" />
            </mapping>
        </element>
        <element id="Patient.identifier.id">
            <path value="Patient.identifier.id" />
            <representation value="xmlAttr" />
            <short value="xml:id (or equivalent in JSON)" />
            <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
            <comment value="Note that FHIR strings may not exceed 1MB in size" />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Element.id" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="string" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.identifier.extension">
            <path value="Patient.identifier.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. In order 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 is allowed to 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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </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(.), &#39;value&#39;)])" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="N/A" />
            </mapping>
        </element>
        <element id="Patient.identifier.use">
            <path value="Patient.identifier.use" />
            <short value="usual | official | temp | secondary (If known)" />
            <definition value="The purpose of this identifier." />
            <comment value="This is labeled as &quot;Is Modifier&quot; because applications should not mistake a temporary id for a permanent one. Applications can assume that an identifier is permanent unless it explicitly says that it is temporary." />
            <requirements value="Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers." />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Identifier.use" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="code" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isModifier value="true" />
            <isSummary value="true" />
            <binding>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
                    <valueString value="IdentifierUse" />
                </extension>
                <strength value="required" />
                <description value="Identifies the purpose for this identifier, if known ." />
                <valueSetReference>
                    <reference value="http://hl7.org/fhir/ValueSet/identifier-use" />
                </valueSetReference>
            </binding>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="N/A" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="Role.code or implied by context" />
            </mapping>
        </element>
        <element id="Patient.identifier.type">
            <path value="Patient.identifier.type" />
            <short value="Description of identifier" />
            <definition value="A coded type for the identifier that can be used to determine which identifier to use for a specific purpose." />
            <comment value="This element deals only with general categories of identifiers.  It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage. \n\nWhere the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type." />
            <requirements value="Allows users to make use of identifiers when the identifier system is not known." />
            <min value="0" />
            <max value="0" />
            <base>
                <path value="Identifier.type" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isSummary value="true" />
            <binding>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
                    <valueString value="IdentifierType" />
                </extension>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
                    <valueBoolean value="true" />
                </extension>
                <strength value="extensible" />
                <description value="A coded type for an identifier that can be used to determine which identifier to use for a specific purpose." />
                <valueSetReference>
                    <reference value="http://hl7.org/fhir/ValueSet/identifier-type" />
                </valueSetReference>
            </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="v2" />
                <map value="CX.5" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="Role.code or implied by context" />
            </mapping>
        </element>
        <element id="Patient.identifier.system">
            <path value="Patient.identifier.system" />
            <short value="The namespace for the identifier value" />
            <definition value="Establishes the namespace for the value - that is, a URL that describes a set values that are unique." />
            <comment value="see http://en.wikipedia.org/wiki/Uniform_resource_identifier" />
            <requirements value="There are many sets  of identifiers.  To perform matching of two identifiers, we need to know what set we&#39;re dealing with. The system identifies a particular set of unique identifiers." />
            <min value="1" />
            <max value="1" />
            <base>
                <path value="Identifier.system" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="uri" />
            </type>
            <example>
                <label value="General" />
                <valueUri value="http://www.acme.com/identifiers/patient" />
            </example>
            <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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="CX.4 / EI-2-4" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="II.root or Role.id.root" />
            </mapping>
            <mapping>
                <identity value="servd" />
                <map value="./IdentifierType" />
            </mapping>
        </element>
        <element id="Patient.identifier.value">
            <path value="Patient.identifier.value" />
            <short value="The value that is unique" />
            <definition value="The portion of the identifier typically relevant to the user and which is unique within the context of the system." />
            <comment value="If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986.  The value&#39;s primary purpose is computational mapping.  As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.)  A value formatted for human display can be conveyed using the [Rendered Value extension](extension-rendered-value.html)." />
            <min value="1" />
            <max value="1" />
            <base>
                <path value="Identifier.value" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="string" />
            </type>
            <example>
                <label value="General" />
                <valueString value="123456" />
            </example>
            <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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="CX.1 / EI.1" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)" />
            </mapping>
            <mapping>
                <identity value="servd" />
                <map value="./Value" />
            </mapping>
        </element>
        <element id="Patient.identifier.period">
            <path value="Patient.identifier.period" />
            <short value="Time period when id is/was valid for use" />
            <definition value="Time period during which identifier is/was valid for use." />
            <comment value="This is not a duration - that&#39;s a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. &quot;the patient was an inpatient of the hospital for this time range&quot;) or one value from the range applies (e.g. &quot;give to the patient between these two times&quot;). If duration is required, specify the type as Interval|Duration." />
            <min value="0" />
            <max value="0" />
            <base>
                <path value="Identifier.period" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="Period" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <constraint>
                <key value="per-1" />
                <severity value="error" />
                <human value="If present, start SHALL have a lower value than end" />
                <expression value="start.empty() or end.empty() or (start &lt;= end)" />
                <xpath value="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="DR" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="IVL&lt;TS&gt;[lowClosed=&quot;true&quot; and highClosed=&quot;true&quot;] or URG&lt;TS&gt;[lowClosed=&quot;true&quot; and highClosed=&quot;true&quot;]" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="CX.7 + CX.8" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="Role.effectiveTime or implied by context" />
            </mapping>
            <mapping>
                <identity value="servd" />
                <map value="./StartDate and ./EndDate" />
            </mapping>
        </element>
        <element id="Patient.identifier.assigner">
            <path value="Patient.identifier.assigner" />
            <short value="Organization that issued id (may be just text)" />
            <definition value="Organization that issued/manages the identifier." />
            <comment value="The Identifier.assigner may omit the .reference element and only contain a .display element reflecting the name or other textual information about the assigning organization." />
            <min value="0" />
            <max value="0" />
            <base>
                <path value="Identifier.assigner" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="Reference" />
                <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <constraint>
                <key value="ref-1" />
                <severity value="error" />
                <human value="SHALL have a contained resource if a local reference is provided" />
                <expression value="reference.startsWith(&#39;#&#39;).not() or (reference.substring(1).trace(&#39;url&#39;) in %resource.contained.id.trace(&#39;ids&#39;))" />
                <xpath value="not(starts-with(f:reference/@value, &#39;#&#39;)) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, &#39;#&#39;)]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, &#39;#&#39;)])" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="CX.4 / (CX.4,CX.9,CX.10)" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="II.assigningAuthorityName but note that this is an improper use by the definition of the field.  Also Role.scoper" />
            </mapping>
            <mapping>
                <identity value="servd" />
                <map value="./IdentifierIssuingAuthority" />
            </mapping>
        </element>
        <element id="Patient.active">
            <path value="Patient.active" />
            <short value="Whether this patient&#39;s record is in active use" />
            <definition value="Whether this patient record is in active use." />
            <comment value="Default is true. If a record is inactive, and linked to an active record, then future patient/record updates should occur on the other patient\n\nThis element is labeled as a modifier because when the patient record is marked as not active it is not expected to be used/referenced without being changed back to active." />
            <requirements value="Need to be able to mark a patient record as not to be used because it was created in error." />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Patient.active" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="boolean" />
            </type>
            <defaultValueBoolean value="true" />
            <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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isModifier value="true" />
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="statusCode" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="w5" />
                <map value="status" />
            </mapping>
        </element>
        <element id="Patient.name">
            <path value="Patient.name" />
            <short value="A name associated with the patient" />
            <definition value="A name associated with the individual." />
            <comment value="A patient may have multiple names with different uses or applicable periods. For animals, the name is a &quot;HumanName&quot; in the sense that is assigned and used by humans and has the same patterns." />
            <requirements value="Need to be able to track the patient by multiple names. Examples are your official name and a partner name." />
            <min value="1" />
            <max value="*" />
            <base>
                <path value="Patient.name" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="HumanName" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="XPN" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="EN (actually, PN)" />
            </mapping>
            <mapping>
                <identity value="servd" />
                <map value="ProviderName" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="PID-5, PID-9" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="name" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value=".patient.name" />
            </mapping>
        </element>
        <element id="Patient.name.id">
            <path value="Patient.name.id" />
            <representation value="xmlAttr" />
            <short value="xml:id (or equivalent in JSON)" />
            <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
            <comment value="Note that FHIR strings may not exceed 1MB in size" />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Element.id" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="string" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.name.extension">
            <path value="Patient.name.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. In order 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 is allowed to 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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </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(.), &#39;value&#39;)])" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="N/A" />
            </mapping>
        </element>
        <element id="Patient.name.use">
            <path value="Patient.name.use" />
            <short value="usual | official | temp | nickname | anonymous | old | maiden" />
            <definition value="Identifies the purpose for this name." />
            <comment value="This is labeled as &quot;Is Modifier&quot; because applications should not mistake a temporary or old name etc.for a current/permanent one. Applications can assume that a name is current unless it explicitly says that it is temporary or old." />
            <requirements value="Allows the appropriate name for a particular context of use to be selected from among a set of names." />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="HumanName.use" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="code" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isModifier value="true" />
            <isSummary value="true" />
            <binding>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
                    <valueString value="NameUse" />
                </extension>
                <strength value="required" />
                <description value="The use of a human name" />
                <valueSetReference>
                    <reference value="http://hl7.org/fhir/ValueSet/name-use" />
                </valueSetReference>
            </binding>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="XPN.7, but often indicated by which field contains the name" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="unique(./use)" />
            </mapping>
            <mapping>
                <identity value="servd" />
                <map value="./NamePurpose" />
            </mapping>
        </element>
        <element id="Patient.name.text">
            <path value="Patient.name.text" />
            <short value="Text representation of the full name" />
            <definition value="A full text representation of the name." />
            <comment value="Can provide both a text representation and structured parts." />
            <requirements value="A renderable, unencoded form." />
            <min value="0" />
            <max value="0" />
            <base>
                <path value="HumanName.text" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="string" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="implied by XPN.11" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="./formatted" />
            </mapping>
        </element>
        <element id="Patient.name.family">
            <path value="Patient.name.family" />
            <short value="Family name (often called &#39;Surname&#39;)" />
            <definition value="The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father." />
            <comment value="Family Name may be decomposed into specific parts using extensions (de, nl, es related cultures)." />
            <alias value="surname" />
            <min value="1" />
            <max value="1" />
            <base>
                <path value="HumanName.family" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="string" />
            </type>
            <maxLength value="100" />
            <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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <constraint>
                <key value="pat-regx-1" />
                <severity value="error" />
                <human value="Patient family name should match the following regular expression: matches(&quot;^[a-z-A-Z0-9\\s\\.\\-\\&#39;&#224;-&#252;А-я&#198;&#208;ƎƏƐƔIJŊŒẞ&#222;ǷȜ&#230;&#240;ǝəɛɣijŋœĸſ&#223;&#254;ƿȝĄƁ&#199;ĐƊĘĦĮƘŁ&#216;ƠŞȘŢȚŦŲƯY̨Ƴąɓ&#231;đɗęħįƙł&#248;ơşșţțŧųưyƴ&#193;&#192;&#194;&#196;ǍĂĀ&#195;&#197;ǺǼǢĆĊĈČĎḌ&#201;&#200;Ė&#202;&#203;ĚĔĒẸĠĜǦĞĢ&#225;&#224;&#226;&#228;ǎăā&#227;&#229;ǻǽǣćċĉčďḍ&#233;&#232;ė&#234;&#235;ěĕēẹġĝǧğģĤḤI&#205;&#204;İ&#206;&#207;ǏĬĪĨỊĴĶĹĻĽĿʼNŃ̈Ň&#209;Ņ&#212;&#214;ǑŎŌ&#213;ŐỌǾĥḥı&#237;&#236;i&#238;&#239;ǐĭīĩịĵķĺļľŀʼnńnň&#241;ņ&#243;&#242;&#244;&#246;ǒŏō&#245;őọǿŔŘŖŚŜŠṢŤṬ&#219;&#220;ǓŬŪŨŰŮỤẂẀŴẄ&#221;ỲŶŸȲỸŹŻŽẒŕřŗśŝšṣťṭ&#250;&#249;&#251;&#252;ǔŭūũűůụẃẁŵẅ&#253;ỳŷ&#255;ȳỹźżžẓЁё&#211;&#218;&#217;&#210;]*$&quot;)" />
                <expression value="matches(&quot;^[a-z-A-Z0-9\\s\\.\\-\\&#39;&#224;-&#252;А-я&#198;&#208;ƎƏƐƔIJŊŒẞ&#222;ǷȜ&#230;&#240;ǝəɛɣijŋœĸſ&#223;&#254;ƿȝĄƁ&#199;ĐƊĘĦĮƘŁ&#216;ƠŞȘŢȚŦŲƯY̨Ƴąɓ&#231;đɗęħįƙł&#248;ơşșţțŧųưyƴ&#193;&#192;&#194;&#196;ǍĂĀ&#195;&#197;ǺǼǢĆĊĈČĎḌ&#201;&#200;Ė&#202;&#203;ĚĔĒẸĠĜǦĞĢ&#225;&#224;&#226;&#228;ǎăā&#227;&#229;ǻǽǣćċĉčďḍ&#233;&#232;ė&#234;&#235;ěĕēẹġĝǧğģĤḤI&#205;&#204;İ&#206;&#207;ǏĬĪĨỊĴĶĹĻĽĿʼNŃ̈Ň&#209;Ņ&#212;&#214;ǑŎŌ&#213;ŐỌǾĥḥı&#237;&#236;i&#238;&#239;ǐĭīĩịĵķĺļľŀʼnńnň&#241;ņ&#243;&#242;&#244;&#246;ǒŏō&#245;őọǿŔŘŖŚŜŠṢŤṬ&#219;&#220;ǓŬŪŨŰŮỤẂẀŴẄ&#221;ỲŶŸȲỸŹŻŽẒŕřŗśŝšṣťṭ&#250;&#249;&#251;&#252;ǔŭūũűůụẃẁŵẅ&#253;ỳŷ&#255;ȳỹźżžẓЁё&#211;&#218;&#217;&#210;]*$&quot;)" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="XPN.1/FN.1" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="./part[partType = FAM]" />
            </mapping>
            <mapping>
                <identity value="servd" />
                <map value="./FamilyName" />
            </mapping>
        </element>
        <element id="Patient.name.given">
            <path value="Patient.name.given" />
            <short value="Given names (not always &#39;first&#39;). Includes middle names" />
            <definition value="Given name." />
            <comment value="If only initials are recorded, they may be used in place of the full name.  Not called &quot;first name&quot; since given names do not always come first." />
            <alias value="first name" />
            <alias value="middle name" />
            <min value="1" />
            <max value="*" />
            <base>
                <path value="HumanName.given" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="string" />
            </type>
            <orderMeaning value="Given Names appear in the correct order for presenting the name" />
            <maxLength value="100" />
            <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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <constraint>
                <key value="pat-regx-2" />
                <severity value="error" />
                <human value="Patient given name should match the following regular expression: matches(&quot;^[a-z-A-Z0-9\\s\\.\\-\\&#39;&#224;-&#252;А-я&#198;&#208;ƎƏƐƔIJŊŒẞ&#222;ǷȜ&#230;&#240;ǝəɛɣijŋœĸſ&#223;&#254;ƿȝĄƁ&#199;ĐƊĘĦĮƘŁ&#216;ƠŞȘŢȚŦŲƯY̨Ƴąɓ&#231;đɗęħįƙł&#248;ơşșţțŧųưyƴ&#193;&#192;&#194;&#196;ǍĂĀ&#195;&#197;ǺǼǢĆĊĈČĎḌ&#201;&#200;Ė&#202;&#203;ĚĔĒẸĠĜǦĞĢ&#225;&#224;&#226;&#228;ǎăā&#227;&#229;ǻǽǣćċĉčďḍ&#233;&#232;ė&#234;&#235;ěĕēẹġĝǧğģĤḤI&#205;&#204;İ&#206;&#207;ǏĬĪĨỊĴĶĹĻĽĿʼNŃ̈Ň&#209;Ņ&#212;&#214;ǑŎŌ&#213;ŐỌǾĥḥı&#237;&#236;i&#238;&#239;ǐĭīĩịĵķĺļľŀʼnńnň&#241;ņ&#243;&#242;&#244;&#246;ǒŏō&#245;őọǿŔŘŖŚŜŠṢŤṬ&#219;&#220;ǓŬŪŨŰŮỤẂẀŴẄ&#221;ỲŶŸȲỸŹŻŽẒŕřŗśŝšṣťṭ&#250;&#249;&#251;&#252;ǔŭūũűůụẃẁŵẅ&#253;ỳŷ&#255;ȳỹźżžẓЁё&#211;&#218;&#217;&#210;]*$&quot;)" />
                <expression value="matches(&quot;^[a-z-A-Z0-9\\s\\.\\-\\&#39;&#224;-&#252;А-я&#198;&#208;ƎƏƐƔIJŊŒẞ&#222;ǷȜ&#230;&#240;ǝəɛɣijŋœĸſ&#223;&#254;ƿȝĄƁ&#199;ĐƊĘĦĮƘŁ&#216;ƠŞȘŢȚŦŲƯY̨Ƴąɓ&#231;đɗęħįƙł&#248;ơşșţțŧųưyƴ&#193;&#192;&#194;&#196;ǍĂĀ&#195;&#197;ǺǼǢĆĊĈČĎḌ&#201;&#200;Ė&#202;&#203;ĚĔĒẸĠĜǦĞĢ&#225;&#224;&#226;&#228;ǎăā&#227;&#229;ǻǽǣćċĉčďḍ&#233;&#232;ė&#234;&#235;ěĕēẹġĝǧğģĤḤI&#205;&#204;İ&#206;&#207;ǏĬĪĨỊĴĶĹĻĽĿʼNŃ̈Ň&#209;Ņ&#212;&#214;ǑŎŌ&#213;ŐỌǾĥḥı&#237;&#236;i&#238;&#239;ǐĭīĩịĵķĺļľŀʼnńnň&#241;ņ&#243;&#242;&#244;&#246;ǒŏō&#245;őọǿŔŘŖŚŜŠṢŤṬ&#219;&#220;ǓŬŪŨŰŮỤẂẀŴẄ&#221;ỲŶŸȲỸŹŻŽẒŕřŗśŝšṣťṭ&#250;&#249;&#251;&#252;ǔŭūũűůụẃẁŵẅ&#253;ỳŷ&#255;ȳỹźżžẓЁё&#211;&#218;&#217;&#210;]*$&quot;)" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="XPN.2 + XPN.3" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="./part[partType = GIV]" />
            </mapping>
            <mapping>
                <identity value="servd" />
                <map value="./GivenNames" />
            </mapping>
        </element>
        <element id="Patient.name.prefix">
            <path value="Patient.name.prefix" />
            <short value="Parts that come before the name" />
            <definition value="Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name." />
            <comment value="Note that FHIR strings may not exceed 1MB in size" />
            <min value="0" />
            <max value="0" />
            <base>
                <path value="HumanName.prefix" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="string" />
            </type>
            <orderMeaning value="Prefixes appear in the correct order for presenting the name" />
            <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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="XPN.5" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="./part[partType = PFX]" />
            </mapping>
            <mapping>
                <identity value="servd" />
                <map value="./TitleCode" />
            </mapping>
        </element>
        <element id="Patient.name.suffix">
            <path value="Patient.name.suffix" />
            <short value="Parts that come after the name" />
            <definition value="Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name." />
            <comment value="Note that FHIR strings may not exceed 1MB in size" />
            <min value="0" />
            <max value="0" />
            <base>
                <path value="HumanName.suffix" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="string" />
            </type>
            <orderMeaning value="Suffixes appear in the correct order for presenting the name" />
            <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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="XPN/4" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="./part[partType = SFX]" />
            </mapping>
        </element>
        <element id="Patient.name.period">
            <path value="Patient.name.period" />
            <short value="Time period when name was/is in use" />
            <definition value="Indicates the period of time when this name was valid for the named person." />
            <comment value="This is not a duration - that&#39;s a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. &quot;the patient was an inpatient of the hospital for this time range&quot;) or one value from the range applies (e.g. &quot;give to the patient between these two times&quot;). If duration is required, specify the type as Interval|Duration." />
            <requirements value="Allows names to be placed in historical context." />
            <min value="0" />
            <max value="0" />
            <base>
                <path value="HumanName.period" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="Period" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <constraint>
                <key value="per-1" />
                <severity value="error" />
                <human value="If present, start SHALL have a lower value than end" />
                <expression value="start.empty() or end.empty() or (start &lt;= end)" />
                <xpath value="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="DR" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="IVL&lt;TS&gt;[lowClosed=&quot;true&quot; and highClosed=&quot;true&quot;] or URG&lt;TS&gt;[lowClosed=&quot;true&quot; and highClosed=&quot;true&quot;]" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="XPN.13 + XPN.14" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="./usablePeriod[type=&quot;IVL&lt;TS&gt;&quot;]" />
            </mapping>
            <mapping>
                <identity value="servd" />
                <map value="./StartDate and ./EndDate" />
            </mapping>
        </element>
        <element id="Patient.telecom">
            <path value="Patient.telecom" />
            <short value="A contact detail for the individual" />
            <definition value="A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted." />
            <comment value="A Patient may have multiple ways to be contacted with different uses or applicable periods.  May need to have options for contacting the person urgently and also to help with identification. The address may not go directly to the individual, but may reach another party that is able to proxy for the patient (i.e. home phone, or pet owner&#39;s phone)." />
            <requirements value="People have (primary) ways to contact them in some way such as phone, email." />
            <min value="0" />
            <max value="*" />
            <base>
                <path value="Patient.telecom" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="ContactPoint" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <constraint>
                <key value="cpt-2" />
                <severity value="error" />
                <human value="A system is required if a value is provided." />
                <expression value="value.empty() or system.exists()" />
                <xpath value="not(exists(f:value)) or exists(f:system)" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="XTN" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="TEL" />
            </mapping>
            <mapping>
                <identity value="servd" />
                <map value="ContactPoint" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="PID-13, PID-14, PID-40" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="telecom" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value=".telecom" />
            </mapping>
        </element>
        <element id="Patient.telecom.id">
            <path value="Patient.telecom.id" />
            <representation value="xmlAttr" />
            <short value="xml:id (or equivalent in JSON)" />
            <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
            <comment value="Note that FHIR strings may not exceed 1MB in size" />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Element.id" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="string" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.telecom.extension">
            <path value="Patient.telecom.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. In order 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 is allowed to 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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </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(.), &#39;value&#39;)])" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="N/A" />
            </mapping>
        </element>
        <element id="Patient.telecom.system">
            <path value="Patient.telecom.system" />
            <short value="phone | fax | email | pager | url | sms | other" />
            <definition value="Telecommunications form for contact point - what communications system is required to make use of the contact." />
            <comment value="Note that FHIR strings may not exceed 1MB in size" />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="ContactPoint.system" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="code" />
            </type>
            <condition value="ele-1" />
            <condition value="cpt-2" />
            <constraint>
                <key value="ele-1" />
                <severity value="error" />
                <human value="All FHIR elements must have a @value or children" />
                <expression value="hasValue() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isSummary value="true" />
            <binding>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
                    <valueString value="ContactPointSystem" />
                </extension>
                <strength value="required" />
                <description value="Telecommunications form for contact point" />
                <valueSetReference>
                    <reference value="http://hl7.org/fhir/ValueSet/contact-point-system" />
                </valueSetReference>
            </binding>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="XTN.3" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="./scheme" />
            </mapping>
            <mapping>
                <identity value="servd" />
                <map value="./ContactPointType" />
            </mapping>
        </element>
        <element id="Patient.telecom.value">
            <path value="Patient.telecom.value" />
            <short value="The actual contact point details" />
            <definition value="The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address)." />
            <comment value="Additional text data such as phone extension numbers, or notes about use of the contact are sometimes included in the value." />
            <requirements value="Need to support legacy numbers that are not in a tightly controlled format." />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="ContactPoint.value" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="string" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="XTN.1 (or XTN.12)" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="./url" />
            </mapping>
            <mapping>
                <identity value="servd" />
                <map value="./Value" />
            </mapping>
        </element>
        <element id="Patient.telecom.use">
            <path value="Patient.telecom.use" />
            <short value="home | work | temp | old | mobile - purpose of this contact point" />
            <definition value="Identifies the purpose for the contact point." />
            <comment value="This is labeled as &quot;Is Modifier&quot; because applications should not mistake a temporary or old contact etc.for a current/permanent one. Applications can assume that a contact is current unless it explicitly says that it is temporary or old." />
            <requirements value="Need to track the way a person uses this contact, so a user can choose which is appropriate for their purpose." />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="ContactPoint.use" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="code" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isModifier value="true" />
            <isSummary value="true" />
            <binding>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
                    <valueString value="ContactPointUse" />
                </extension>
                <strength value="required" />
                <description value="Use of contact point" />
                <valueSetReference>
                    <reference value="http://hl7.org/fhir/ValueSet/contact-point-use" />
                </valueSetReference>
            </binding>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="XTN.2 - but often indicated by field" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="unique(./use)" />
            </mapping>
            <mapping>
                <identity value="servd" />
                <map value="./ContactPointPurpose" />
            </mapping>
        </element>
        <element id="Patient.telecom.rank">
            <path value="Patient.telecom.rank" />
            <short value="Specify preferred order of use (1 = highest)" />
            <definition value="Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values." />
            <comment value="Note that rank does not necessarily follow the order in which the contacts are represented in the instance." />
            <min value="0" />
            <max value="0" />
            <base>
                <path value="ContactPoint.rank" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="positiveInt" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.telecom.period">
            <path value="Patient.telecom.period" />
            <short value="Time period when the contact point was/is in use" />
            <definition value="Time period when the contact point was/is in use." />
            <comment value="This is not a duration - that&#39;s a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. &quot;the patient was an inpatient of the hospital for this time range&quot;) or one value from the range applies (e.g. &quot;give to the patient between these two times&quot;). If duration is required, specify the type as Interval|Duration." />
            <min value="0" />
            <max value="0" />
            <base>
                <path value="ContactPoint.period" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="Period" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <constraint>
                <key value="per-1" />
                <severity value="error" />
                <human value="If present, start SHALL have a lower value than end" />
                <expression value="start.empty() or end.empty() or (start &lt;= end)" />
                <xpath value="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="DR" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="IVL&lt;TS&gt;[lowClosed=&quot;true&quot; and highClosed=&quot;true&quot;] or URG&lt;TS&gt;[lowClosed=&quot;true&quot; and highClosed=&quot;true&quot;]" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="N/A" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="./usablePeriod[type=&quot;IVL&lt;TS&gt;&quot;]" />
            </mapping>
            <mapping>
                <identity value="servd" />
                <map value="./StartDate and ./EndDate" />
            </mapping>
        </element>
        <element id="Patient.gender">
            <path value="Patient.gender" />
            <short value="male | female | other | unknown" />
            <definition value="Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes." />
            <comment value="The gender may not match the biological sex as determined by genetics, or the individual&#39;s preferred identification. Note that for both humans and particularly animals, there are other legitimate possibilities than M and F, though the vast majority of systems and contexts only support M and F.  Systems providing decision support or enforcing business rules should ideally do this on the basis of Observations dealing with the specific gender aspect of interest (anatomical, chromosonal, social, etc.)  However, because these observations are infrequently recorded, defaulting to the administrative gender is common practice.  Where such defaulting occurs, rule enforcement should allow for the variation between administrative and biological, chromosonal and other gender aspects.  For example, an alert about a hysterectomy on a male should be handled as a warning or overrideable error, not a &quot;hard&quot; error." />
            <requirements value="Needed for identification of the individual, in combination with (at least) name and birth date. Gender of individual drives many clinical processes." />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Patient.gender" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="code" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isSummary value="true" />
            <binding>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
                    <valueString value="AdministrativeGender" />
                </extension>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
                    <valueBoolean value="true" />
                </extension>
                <strength value="required" />
                <description value="The gender of a person used for administrative purposes." />
                <valueSetReference>
                    <reference value="http://hl7.org/fhir/ValueSet/administrative-gender" />
                </valueSetReference>
            </binding>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="PID-8" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="player[classCode=PSN|ANM and determinerCode=INSTANCE]/administrativeGender" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value=".patient.administrativeGenderCode" />
            </mapping>
        </element>
        <element id="Patient.birthDate">
            <path value="Patient.birthDate" />
            <short value="The date of birth for the individual" />
            <definition value="The date of birth for the individual." />
            <comment value="At least an estimated year should be provided as a guess if the real DOB is unknown  There is a standard extension &quot;patient-birthTime&quot; available that should be used where Time is required (such as in maternaty/infant care systems)." />
            <requirements value="Age of the individual drives many clinical processes." />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Patient.birthDate" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="date" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="PID-7" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="player[classCode=PSN|ANM and determinerCode=INSTANCE]/birthTime" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value=".patient.birthTime" />
            </mapping>
            <mapping>
                <identity value="loinc" />
                <map value="21112-8" />
            </mapping>
        </element>
        <element id="Patient.deceased[x]">
            <path value="Patient.deceased[x]" />
            <short value="Indicates if the individual is deceased or not" />
            <definition value="Indicates if the individual is deceased or not." />
            <comment value="If there&#39;s no value in the instance it means there is no statement on whether or not the individual is deceased. Most systems will interpret the absence of a value as a sign of the person being alive.\n\nThis element is labeled as a modifier because once a patient is marked as deceased, the actions that are appropriate to perform on the patient may be significantly different." />
            <requirements value="The fact that a patient is deceased influences the clinical process. Also, in human communication and relation management it is necessary to know whether the person is alive." />
            <min value="0" />
            <max value="0" />
            <base>
                <path value="Patient.deceased[x]" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="boolean" />
            </type>
            <type>
                <code value="dateTime" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isModifier value="true" />
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="PID-30  (bool) and PID-29 (datetime)" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="player[classCode=PSN|ANM and determinerCode=INSTANCE]/deceasedInd, player[classCode=PSN|ANM and determinerCode=INSTANCE]/deceasedTime" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.address">
            <path value="Patient.address" />
            <short value="Addresses for the individual" />
            <definition value="Addresses for the individual." />
            <comment value="Patient may have multiple addresses with different uses or applicable periods." />
            <requirements value="May need to keep track of patient addresses for contacting, billing or reporting requirements and also to help with identification." />
            <min value="0" />
            <max value="0" />
            <base>
                <path value="Patient.address" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="Address" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="XAD" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="AD" />
            </mapping>
            <mapping>
                <identity value="servd" />
                <map value="Address" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="PID-11" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="addr" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value=".addr" />
            </mapping>
        </element>
        <element id="Patient.maritalStatus">
            <path value="Patient.maritalStatus" />
            <short value="Marital (civil) status of a patient" />
            <definition value="This field contains a patient&#39;s most recent marital (civil) status." />
            <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." />
            <requirements value="Most, if not all systems capture it." />
            <min value="0" />
            <max value="0" />
            <base>
                <path value="Patient.maritalStatus" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <binding>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
                    <valueString value="MaritalStatus" />
                </extension>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
                    <valueBoolean value="true" />
                </extension>
                <strength value="extensible" />
                <description value="The domestic partnership status of a person." />
                <valueSetReference>
                    <reference value="http://hl7.org/fhir/ValueSet/marital-status" />
                </valueSetReference>
            </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="v2" />
                <map value="PID-16" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="player[classCode=PSN]/maritalStatusCode" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value=".patient.maritalStatusCode" />
            </mapping>
        </element>
        <element id="Patient.multipleBirth[x]">
            <path value="Patient.multipleBirth[x]" />
            <short value="Whether patient is part of a multiple birth" />
            <definition value="Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer)." />
            <comment value="Where the valueInteger is provided, the number is the birth number in the sequence.\nE.g. The middle birth in tripplets would be valueInteger=2 and the third born would have valueInteger=3\nIf a bool value was provided for this tripplets examle, then all 3 patient records would have valueBool=true (the ordering is not indicated)." />
            <requirements value="For disambiguation of multiple-birth children, especially relevant where the care provider doesn&#39;t meet the patient, such as labs." />
            <min value="0" />
            <max value="0" />
            <base>
                <path value="Patient.multipleBirth[x]" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="boolean" />
            </type>
            <type>
                <code value="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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="PID-24 (bool), PID-25 (integer)" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="player[classCode=PSN|ANM and determinerCode=INSTANCE]/multipleBirthInd,  player[classCode=PSN|ANM and determinerCode=INSTANCE]/multipleBirthOrderNumber" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.photo">
            <path value="Patient.photo" />
            <short value="Image of the patient" />
            <definition value="Image of the patient." />
            <comment value="When providing a summary view (for example with Observation.value[x]) Attachment should be represented with a brief display text such as &quot;Attachment&quot;." />
            <requirements value="Many EHR systems have the capability to capture an image of the patient. Fits with newer social media usage too." />
            <min value="0" />
            <max value="0" />
            <base>
                <path value="Patient.photo" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="Attachment" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <constraint>
                <key value="att-1" />
                <severity value="error" />
                <human value="It the Attachment has data, it SHALL have a contentType" />
                <expression value="data.empty() or contentType.exists()" />
                <xpath value="not(exists(f:data)) or exists(f:contentType)" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="ED/RP" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="ED" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="OBX-5 - needs a profile" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="player[classCode=PSN|ANM and determinerCode=INSTANCE]/desc" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.contact">
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
                <valueString value="Contact" />
            </extension>
            <path value="Patient.contact" />
            <short value="A contact party (e.g. guardian, partner, friend) for the patient" />
            <definition value="A contact party (e.g. guardian, partner, friend) for the patient." />
            <comment value="Contact covers all kinds of contact parties: family members, business contacts, guardians, caregivers. Not applicable to register pedigree and family ties beyond use of having contact." />
            <requirements value="Need to track people you can contact about the patient." />
            <min value="0" />
            <max value="0" />
            <base>
                <path value="Patient.contact" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="BackboneElement" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <constraint>
                <key value="pat-1" />
                <severity value="error" />
                <human value="SHALL at least contain a contact&#39;s details or a reference to an organization" />
                <expression value="name.exists() or telecom.exists() or address.exists() or organization.exists()" />
                <xpath value="exists(f:name) or exists(f:telecom) or exists(f:address) or exists(f:organization)" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="player[classCode=PSN|ANM and determinerCode=INSTANCE]/scopedRole[classCode=CON]" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.contact.id">
            <path value="Patient.contact.id" />
            <representation value="xmlAttr" />
            <short value="xml:id (or equivalent in JSON)" />
            <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
            <comment value="Note that FHIR strings may not exceed 1MB in size" />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Element.id" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="string" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.contact.extension">
            <path value="Patient.contact.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. In order 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 is allowed to 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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </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(.), &#39;value&#39;)])" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="N/A" />
            </mapping>
        </element>
        <element id="Patient.contact.modifierExtension">
            <path value="Patient.contact.modifierExtension" />
            <short value="Extensions that cannot be ignored" />
            <definition value="May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions." />
            <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" />
            <alias value="modifiers" />
            <min value="0" />
            <max value="*" />
            <base>
                <path value="BackboneElement.modifierExtension" />
                <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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </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(.), &#39;value&#39;)])" />
            </constraint>
            <isModifier value="true" />
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="N/A" />
            </mapping>
        </element>
        <element id="Patient.contact.relationship">
            <path value="Patient.contact.relationship" />
            <short value="The kind of relationship" />
            <definition value="The nature of the relationship between the patient and the contact person." />
            <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." />
            <requirements value="Used to determine which contact person is the most relevant to approach, depending on circumstances." />
            <min value="0" />
            <max value="*" />
            <base>
                <path value="Patient.contact.relationship" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <binding>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
                    <valueString value="ContactRelationship" />
                </extension>
                <strength value="extensible" />
                <description value="The nature of the relationship between a patient and a contact person for that patient." />
                <valueSetReference>
                    <reference value="http://hl7.org/fhir/ValueSet/v2-0131" />
                </valueSetReference>
            </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="v2" />
                <map value="NK1-7, NK1-3" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="code" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.contact.name">
            <path value="Patient.contact.name" />
            <short value="A name associated with the contact person" />
            <definition value="A name associated with the contact person." />
            <comment value="Names may be changed, or repudiated, or people may have different names in different contexts. Names may be divided into parts of different type that have variable significance depending on context, though the division into parts does not always matter. With personal names, the different parts may or may not be imbued with some implicit meaning; various cultures associate different importance with the name parts and the degree to which systems must care about name parts around the world varies widely." />
            <requirements value="Contact persons need to be identified by name, but it is uncommon to need details about multiple other names for that contact person." />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Patient.contact.name" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="HumanName" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="XPN" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="EN (actually, PN)" />
            </mapping>
            <mapping>
                <identity value="servd" />
                <map value="ProviderName" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="NK1-2" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="name" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.contact.telecom">
            <path value="Patient.contact.telecom" />
            <short value="A contact detail for the person" />
            <definition value="A contact detail for the person, e.g. a telephone number or an email address." />
            <comment value="Contact may have multiple ways to be contacted with different uses or applicable periods.  May need to have options for contacting the person urgently, and also to help with identification." />
            <requirements value="People have (primary) ways to contact them in some way such as phone, email." />
            <min value="0" />
            <max value="*" />
            <base>
                <path value="Patient.contact.telecom" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="ContactPoint" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <constraint>
                <key value="cpt-2" />
                <severity value="error" />
                <human value="A system is required if a value is provided." />
                <expression value="value.empty() or system.exists()" />
                <xpath value="not(exists(f:value)) or exists(f:system)" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="XTN" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="TEL" />
            </mapping>
            <mapping>
                <identity value="servd" />
                <map value="ContactPoint" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="NK1-5, NK1-6, NK1-40" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="telecom" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.contact.address">
            <path value="Patient.contact.address" />
            <short value="Address for the contact person" />
            <definition value="Address for the contact person." />
            <comment value="Note: address is for postal addresses, not physical locations." />
            <requirements value="Need to keep track where the contact person can be contacted per postal mail or visited." />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Patient.contact.address" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="Address" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="XAD" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="AD" />
            </mapping>
            <mapping>
                <identity value="servd" />
                <map value="Address" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="NK1-4" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="addr" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.contact.gender">
            <path value="Patient.contact.gender" />
            <short value="male | female | other | unknown" />
            <definition value="Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes." />
            <comment value="Note that FHIR strings may not exceed 1MB in size" />
            <requirements value="Needed to address the person correctly." />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Patient.contact.gender" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="code" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <binding>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
                    <valueString value="AdministrativeGender" />
                </extension>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
                    <valueBoolean value="true" />
                </extension>
                <strength value="required" />
                <description value="The gender of a person used for administrative purposes." />
                <valueSetReference>
                    <reference value="http://hl7.org/fhir/ValueSet/administrative-gender" />
                </valueSetReference>
            </binding>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="NK1-15" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="player[classCode=PSN|ANM and determinerCode=INSTANCE]/administrativeGender" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.contact.organization">
            <path value="Patient.contact.organization" />
            <short value="Organization that is associated with the contact" />
            <definition value="Organization on behalf of which the contact is acting or for which the contact is working." />
            <comment value="References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." />
            <requirements value="For guardians or business related contacts, the organization is relevant." />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Patient.contact.organization" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="Reference" />
                <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
            </type>
            <condition value="ele-1" />
            <condition value="pat-1" />
            <constraint>
                <key value="ele-1" />
                <severity value="error" />
                <human value="All FHIR elements must have a @value or children" />
                <expression value="hasValue() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <constraint>
                <key value="ref-1" />
                <severity value="error" />
                <human value="SHALL have a contained resource if a local reference is provided" />
                <expression value="reference.startsWith(&#39;#&#39;).not() or (reference.substring(1).trace(&#39;url&#39;) in %resource.contained.id.trace(&#39;ids&#39;))" />
                <xpath value="not(starts-with(f:reference/@value, &#39;#&#39;)) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, &#39;#&#39;)]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, &#39;#&#39;)])" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="NK1-13, NK1-30, NK1-31, NK1-32, NK1-41" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="scoper" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.contact.period">
            <path value="Patient.contact.period" />
            <short value="The period during which this contact person or organization is valid to be contacted relating to this patient" />
            <definition value="The period during which this contact person or organization is valid to be contacted relating to this patient." />
            <comment value="This is not a duration - that&#39;s a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. &quot;the patient was an inpatient of the hospital for this time range&quot;) or one value from the range applies (e.g. &quot;give to the patient between these two times&quot;). If duration is required, specify the type as Interval|Duration." />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Patient.contact.period" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="Period" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <constraint>
                <key value="per-1" />
                <severity value="error" />
                <human value="If present, start SHALL have a lower value than end" />
                <expression value="start.empty() or end.empty() or (start &lt;= end)" />
                <xpath value="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="DR" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="IVL&lt;TS&gt;[lowClosed=&quot;true&quot; and highClosed=&quot;true&quot;] or URG&lt;TS&gt;[lowClosed=&quot;true&quot; and highClosed=&quot;true&quot;]" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="effectiveTime" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.animal">
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name">
                <valueString value="Animal" />
            </extension>
            <path value="Patient.animal" />
            <short value="This patient is known to be an animal (non-human)" />
            <definition value="This patient is known to be an animal." />
            <comment value="The animal element is labeled &quot;Is Modifier&quot; since patients may be non-human. Systems SHALL either handle patient details appropriately (e.g. inform users patient is not human) or reject declared animal records.   The absense of the animal element does not imply that the patient is a human. If a system requires such a positive assertion that the patient is human, an extension will be required.  (Do not use a species of homo-sapiens in animal species, as this would incorrectly infer that the patient is an animal)." />
            <requirements value="Many clinical systems are extended to care for animal patients as well as human." />
            <min value="0" />
            <max value="0" />
            <base>
                <path value="Patient.animal" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="BackboneElement" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isModifier value="true" />
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="player[classCode=ANM]" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.animal.id">
            <path value="Patient.animal.id" />
            <representation value="xmlAttr" />
            <short value="xml:id (or equivalent in JSON)" />
            <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
            <comment value="Note that FHIR strings may not exceed 1MB in size" />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Element.id" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="string" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.animal.extension">
            <path value="Patient.animal.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. In order 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 is allowed to 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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </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(.), &#39;value&#39;)])" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="N/A" />
            </mapping>
        </element>
        <element id="Patient.animal.modifierExtension">
            <path value="Patient.animal.modifierExtension" />
            <short value="Extensions that cannot be ignored" />
            <definition value="May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions." />
            <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" />
            <alias value="modifiers" />
            <min value="0" />
            <max value="*" />
            <base>
                <path value="BackboneElement.modifierExtension" />
                <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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </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(.), &#39;value&#39;)])" />
            </constraint>
            <isModifier value="true" />
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="N/A" />
            </mapping>
        </element>
        <element id="Patient.animal.species">
            <path value="Patient.animal.species" />
            <short value="E.g. Dog, Cow" />
            <definition value="Identifies the high level taxonomic categorization of the kind of animal." />
            <comment value="If the patient is non-human, at least a species SHALL be specified. Species SHALL be a widely recognised taxonomic classification.  It may or may not be Linnaean taxonomy and may or may not be at the level of species. If the level is finer than species--such as a breed code--the code system used SHALL allow inference of the species.  (The common example is that the word &quot;Hereford&quot; does not allow inference of the species Bos taurus, because there is a Hereford pig breed, but the SNOMED CT code for &quot;Hereford Cattle Breed&quot; does.)." />
            <requirements value="Need to know what kind of animal." />
            <min value="1" />
            <max value="1" />
            <base>
                <path value="Patient.animal.species" />
                <min value="1" />
                <max value="1" />
            </base>
            <type>
                <code value="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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isSummary value="true" />
            <binding>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
                    <valueString value="AnimalSpecies" />
                </extension>
                <strength value="example" />
                <description value="The species of an animal." />
                <valueSetReference>
                    <reference value="http://hl7.org/fhir/ValueSet/animal-species" />
                </valueSetReference>
            </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="v2" />
                <map value="PID-35" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="code" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.animal.breed">
            <path value="Patient.animal.breed" />
            <short value="E.g. Poodle, Angus" />
            <definition value="Identifies the detailed categorization of the kind of animal." />
            <comment value="Breed MAY be used to provide further taxonomic or non-taxonomic classification.  It may involve local or proprietary designation--such as commercial strain--and/or additional information such as production type." />
            <requirements value="May need to know the specific kind within the species." />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Patient.animal.breed" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isSummary value="true" />
            <binding>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
                    <valueString value="AnimalBreed" />
                </extension>
                <strength value="example" />
                <description value="The breed of an animal." />
                <valueSetReference>
                    <reference value="http://hl7.org/fhir/ValueSet/animal-breeds" />
                </valueSetReference>
            </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="v2" />
                <map value="PID-37" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="playedRole[classCode=GEN]/scoper[classCode=ANM, determinerCode=KIND]/code" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.animal.genderStatus">
            <path value="Patient.animal.genderStatus" />
            <short value="E.g. Neutered, Intact" />
            <definition value="Indicates the current state of the animal&#39;s reproductive organs." />
            <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." />
            <requirements value="Gender status can affect housing and animal behavior." />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Patient.animal.genderStatus" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isSummary value="true" />
            <binding>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
                    <valueString value="AnimalGenderStatus" />
                </extension>
                <strength value="example" />
                <description value="The state of the animal&#39;s reproductive organs." />
                <valueSetReference>
                    <reference value="http://hl7.org/fhir/ValueSet/animal-genderstatus" />
                </valueSetReference>
            </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="v2" />
                <map value="N/A" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="genderStatusCode" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.communication">
            <path value="Patient.communication" />
            <short value="A list of Languages which may be used to communicate with the patient about his or her health" />
            <definition value="Languages which may be used to communicate with the patient about his or her health." />
            <comment value="If no language is specified, this *implies* that the default local language is spoken.  If you need to convey proficiency for multiple modes then you need multiple Patient.Communication associations.   For animals, language is not a relevant field, and should be absent from the instance. If the Patient does not speak the default local language, then the Interpreter Required Standard can be used to explicitly declare that an interpreter is required." />
            <requirements value="If a patient does not speak the local language, interpreters may be required, so languages spoken and proficiency is an important things to keep track of both for patient and other persons of interest." />
            <min value="0" />
            <max value="0" />
            <base>
                <path value="Patient.communication" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="BackboneElement" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="LanguageCommunication" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value="patient.languageCommunication" />
            </mapping>
        </element>
        <element id="Patient.communication.id">
            <path value="Patient.communication.id" />
            <representation value="xmlAttr" />
            <short value="xml:id (or equivalent in JSON)" />
            <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
            <comment value="Note that FHIR strings may not exceed 1MB in size" />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Element.id" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="string" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.communication.extension">
            <path value="Patient.communication.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. In order 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 is allowed to 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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </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(.), &#39;value&#39;)])" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="N/A" />
            </mapping>
        </element>
        <element id="Patient.communication.modifierExtension">
            <path value="Patient.communication.modifierExtension" />
            <short value="Extensions that cannot be ignored" />
            <definition value="May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions." />
            <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" />
            <alias value="modifiers" />
            <min value="0" />
            <max value="*" />
            <base>
                <path value="BackboneElement.modifierExtension" />
                <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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </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(.), &#39;value&#39;)])" />
            </constraint>
            <isModifier value="true" />
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="N/A" />
            </mapping>
        </element>
        <element id="Patient.communication.language">
            <path value="Patient.communication.language" />
            <short value="The language which can be used to communicate with the patient about his or her health" />
            <definition value="The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. &quot;en&quot; for English, or &quot;en-US&quot; for American English versus &quot;en-EN&quot; for England English." />
            <comment value="The structure aa-BB with this exact casing is one the most widely used notations for locale. However not all systems actually code this but instead have it as free text. Hence CodeableConcept instead of code as the data type." />
            <requirements value="Most systems in multilingual countries will want to convey language. Not all systems actually need the regional dialect." />
            <min value="1" />
            <max value="1" />
            <base>
                <path value="Patient.communication.language" />
                <min value="1" />
                <max value="1" />
            </base>
            <type>
                <code value="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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <binding>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet">
                    <valueReference>
                        <reference value="http://hl7.org/fhir/ValueSet/all-languages" />
                    </valueReference>
                </extension>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
                    <valueString value="Language" />
                </extension>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
                    <valueBoolean value="true" />
                </extension>
                <strength value="extensible" />
                <description value="A human language." />
                <valueSetReference>
                    <reference value="http://hl7.org/fhir/ValueSet/languages" />
                </valueSetReference>
            </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="v2" />
                <map value="PID-15, LAN-2" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="player[classCode=PSN|ANM and determinerCode=INSTANCE]/languageCommunication/code" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value=".languageCode" />
            </mapping>
        </element>
        <element id="Patient.communication.preferred">
            <path value="Patient.communication.preferred" />
            <short value="Language preference indicator" />
            <definition value="Indicates whether or not the patient prefers this language (over other languages he masters up a certain level)." />
            <comment value="This language is specifically identified for communicating healthcare information." />
            <requirements value="People that master multiple languages up to certain level may prefer one or more, i.e. feel more confident in communicating in a particular language making other languages sort of a fall back method." />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Patient.communication.preferred" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="boolean" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="PID-15" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="preferenceInd" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value=".preferenceInd" />
            </mapping>
        </element>
        <element id="Patient.generalPractitioner">
            <path value="Patient.generalPractitioner" />
            <short value="Patient&#39;s nominated primary care provider" />
            <definition value="Patient&#39;s nominated care provider." />
            <comment value="This may be the primary care provider (in a GP context), or it may be a patient nominated care manager in a community/disablity setting, or even organization that will provide people to perform the care provider roles.\n\nIt is not to be used to record Care Teams, these should be in a CareTeam resource that may be linked to the CarePlan or EpisodeOfCare resources." />
            <alias value="careProvider" />
            <min value="0" />
            <max value="0" />
            <base>
                <path value="Patient.generalPractitioner" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="Reference" />
                <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
            </type>
            <type>
                <code value="Reference" />
                <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <constraint>
                <key value="ref-1" />
                <severity value="error" />
                <human value="SHALL have a contained resource if a local reference is provided" />
                <expression value="reference.startsWith(&#39;#&#39;).not() or (reference.substring(1).trace(&#39;url&#39;) in %resource.contained.id.trace(&#39;ids&#39;))" />
                <xpath value="not(starts-with(f:reference/@value, &#39;#&#39;)) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, &#39;#&#39;)]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, &#39;#&#39;)])" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="PD1-4" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="subjectOf.CareEvent.performer.AssignedEntity" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.managingOrganization">
            <path value="Patient.managingOrganization" />
            <short value="Organization that is the custodian of the patient record" />
            <definition value="Organization that is the custodian of the patient record." />
            <comment value="There is only one managing organization for a specific patient record. Other organizations will have their own Patient record, and may use the Link property to join the records together (or a Person resource which can include confidence ratings for the association)." />
            <requirements value="Need to know who recognizes this patient record, manages and updates it." />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Patient.managingOrganization" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="Reference" />
                <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <constraint>
                <key value="ref-1" />
                <severity value="error" />
                <human value="SHALL have a contained resource if a local reference is provided" />
                <expression value="reference.startsWith(&#39;#&#39;).not() or (reference.substring(1).trace(&#39;url&#39;) in %resource.contained.id.trace(&#39;ids&#39;))" />
                <xpath value="not(starts-with(f:reference/@value, &#39;#&#39;)) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, &#39;#&#39;)]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, &#39;#&#39;)])" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="scoper" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value=".providerOrganization" />
            </mapping>
        </element>
        <element id="Patient.link">
            <path value="Patient.link" />
            <short value="Link to another patient resource that concerns the same actual person" />
            <definition value="Link to another patient resource that concerns the same actual patient." />
            <comment value="There is no assumption that linked patient records have mutual links. \n\nThis element is labelled as a modifier because it may not be the main Patient resource, and the referenced patient should be used instead of this Patient record. This is when the link.type value is &#39;replaced-by&#39;." />
            <requirements value="There are multiple usecases: \n\n* Duplicate patient records due to the clerical errors associated with the difficulties of identifying humans consistently, and * Distribution of patient information across multiple servers." />
            <min value="0" />
            <max value="0" />
            <base>
                <path value="Patient.link" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="BackboneElement" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isModifier value="true" />
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="outboundLink" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.link.id">
            <path value="Patient.link.id" />
            <representation value="xmlAttr" />
            <short value="xml:id (or equivalent in JSON)" />
            <definition value="unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
            <comment value="Note that FHIR strings may not exceed 1MB in size" />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Element.id" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="string" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.link.extension">
            <path value="Patient.link.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. In order 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 is allowed to 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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </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(.), &#39;value&#39;)])" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="N/A" />
            </mapping>
        </element>
        <element id="Patient.link.modifierExtension">
            <path value="Patient.link.modifierExtension" />
            <short value="Extensions that cannot be ignored" />
            <definition value="May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions." />
            <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" />
            <alias value="modifiers" />
            <min value="0" />
            <max value="*" />
            <base>
                <path value="BackboneElement.modifierExtension" />
                <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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </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(.), &#39;value&#39;)])" />
            </constraint>
            <isModifier value="true" />
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="N/A" />
            </mapping>
        </element>
        <element id="Patient.link.other">
            <path value="Patient.link.other" />
            <short value="The other patient or related person resource that the link refers to" />
            <definition value="The other patient resource that the link refers to." />
            <comment value="Referencing a RelatedPerson here removes the need to use a Person record to associate a Patient and RelatedPerson as the same individual." />
            <min value="1" />
            <max value="1" />
            <base>
                <path value="Patient.link.other" />
                <min value="1" />
                <max value="1" />
            </base>
            <type>
                <code value="Reference" />
                <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
            </type>
            <type>
                <code value="Reference" />
                <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <constraint>
                <key value="ref-1" />
                <severity value="error" />
                <human value="SHALL have a contained resource if a local reference is provided" />
                <expression value="reference.startsWith(&#39;#&#39;).not() or (reference.substring(1).trace(&#39;url&#39;) in %resource.contained.id.trace(&#39;ids&#39;))" />
                <xpath value="not(starts-with(f:reference/@value, &#39;#&#39;)) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, &#39;#&#39;)]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, &#39;#&#39;)])" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="PID-3, MRG-1" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="id" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="Patient.link.type">
            <path value="Patient.link.type" />
            <short value="replaced-by | replaces | refer | seealso - type of link" />
            <definition value="The type of link between this patient resource and another patient resource." />
            <comment value="Note that FHIR strings may not exceed 1MB in size" />
            <min value="1" />
            <max value="1" />
            <base>
                <path value="Patient.link.type" />
                <min value="1" />
                <max value="1" />
            </base>
            <type>
                <code value="code" />
            </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() | (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
            </constraint>
            <isSummary value="true" />
            <binding>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
                    <valueString value="LinkType" />
                </extension>
                <strength value="required" />
                <description value="The type of link between this patient resource and another patient resource." />
                <valueSetReference>
                    <reference value="http://hl7.org/fhir/ValueSet/link-type" />
                </valueSetReference>
            </binding>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="typeCode" />
            </mapping>
            <mapping>
                <identity value="cda" />
                <map value="n/a" />
            </mapping>
        </element>
    </snapshot>
    <differential>
        <element id="Patient.identifier">
            <path value="Patient.identifier" />
            <min value="1" />
            <max value="1" />
        </element>
        <element id="Patient.identifier.type">
            <path value="Patient.identifier.type" />
            <max value="0" />
        </element>
        <element id="Patient.identifier.system">
            <path value="Patient.identifier.system" />
            <min value="1" />
        </element>
        <element id="Patient.identifier.value">
            <path value="Patient.identifier.value" />
            <min value="1" />
        </element>
        <element id="Patient.identifier.period">
            <path value="Patient.identifier.period" />
            <max value="0" />
        </element>
        <element id="Patient.identifier.assigner">
            <path value="Patient.identifier.assigner" />
            <max value="0" />
        </element>
        <element id="Patient.name">
            <path value="Patient.name" />
            <min value="1" />
        </element>
        <element id="Patient.name.text">
            <path value="Patient.name.text" />
            <max value="0" />
        </element>
        <element id="Patient.name.family">
            <path value="Patient.name.family" />
            <min value="1" />
            <maxLength value="100" />
            <constraint>
                <key value="pat-regx-1" />
                <severity value="error" />
                <human value="Patient family name should match the following regular expression: matches(&quot;^[a-z-A-Z0-9\\s\\.\\-\\&#39;&#224;-&#252;А-я&#198;&#208;ƎƏƐƔIJŊŒẞ&#222;ǷȜ&#230;&#240;ǝəɛɣijŋœĸſ&#223;&#254;ƿȝĄƁ&#199;ĐƊĘĦĮƘŁ&#216;ƠŞȘŢȚŦŲƯY̨Ƴąɓ&#231;đɗęħįƙł&#248;ơşșţțŧųưyƴ&#193;&#192;&#194;&#196;ǍĂĀ&#195;&#197;ǺǼǢĆĊĈČĎḌ&#201;&#200;Ė&#202;&#203;ĚĔĒẸĠĜǦĞĢ&#225;&#224;&#226;&#228;ǎăā&#227;&#229;ǻǽǣćċĉčďḍ&#233;&#232;ė&#234;&#235;ěĕēẹġĝǧğģĤḤI&#205;&#204;İ&#206;&#207;ǏĬĪĨỊĴĶĹĻĽĿʼNŃ̈Ň&#209;Ņ&#212;&#214;ǑŎŌ&#213;ŐỌǾĥḥı&#237;&#236;i&#238;&#239;ǐĭīĩịĵķĺļľŀʼnńnň&#241;ņ&#243;&#242;&#244;&#246;ǒŏō&#245;őọǿŔŘŖŚŜŠṢŤṬ&#219;&#220;ǓŬŪŨŰŮỤẂẀŴẄ&#221;ỲŶŸȲỸŹŻŽẒŕřŗśŝšṣťṭ&#250;&#249;&#251;&#252;ǔŭūũűůụẃẁŵẅ&#253;ỳŷ&#255;ȳỹźżžẓЁё&#211;&#218;&#217;&#210;]*$&quot;)" />
                <expression value="matches(&quot;^[a-z-A-Z0-9\\s\\.\\-\\&#39;&#224;-&#252;А-я&#198;&#208;ƎƏƐƔIJŊŒẞ&#222;ǷȜ&#230;&#240;ǝəɛɣijŋœĸſ&#223;&#254;ƿȝĄƁ&#199;ĐƊĘĦĮƘŁ&#216;ƠŞȘŢȚŦŲƯY̨Ƴąɓ&#231;đɗęħįƙł&#248;ơşșţțŧųưyƴ&#193;&#192;&#194;&#196;ǍĂĀ&#195;&#197;ǺǼǢĆĊĈČĎḌ&#201;&#200;Ė&#202;&#203;ĚĔĒẸĠĜǦĞĢ&#225;&#224;&#226;&#228;ǎăā&#227;&#229;ǻǽǣćċĉčďḍ&#233;&#232;ė&#234;&#235;ěĕēẹġĝǧğģĤḤI&#205;&#204;İ&#206;&#207;ǏĬĪĨỊĴĶĹĻĽĿʼNŃ̈Ň&#209;Ņ&#212;&#214;ǑŎŌ&#213;ŐỌǾĥḥı&#237;&#236;i&#238;&#239;ǐĭīĩịĵķĺļľŀʼnńnň&#241;ņ&#243;&#242;&#244;&#246;ǒŏō&#245;őọǿŔŘŖŚŜŠṢŤṬ&#219;&#220;ǓŬŪŨŰŮỤẂẀŴẄ&#221;ỲŶŸȲỸŹŻŽẒŕřŗśŝšṣťṭ&#250;&#249;&#251;&#252;ǔŭūũűůụẃẁŵẅ&#253;ỳŷ&#255;ȳỹźżžẓЁё&#211;&#218;&#217;&#210;]*$&quot;)" />
            </constraint>
        </element>
        <element id="Patient.name.given">
            <path value="Patient.name.given" />
            <min value="1" />
            <maxLength value="100" />
            <constraint>
                <key value="pat-regx-2" />
                <severity value="error" />
                <human value="Patient given name should match the following regular expression: matches(&quot;^[a-z-A-Z0-9\\s\\.\\-\\&#39;&#224;-&#252;А-я&#198;&#208;ƎƏƐƔIJŊŒẞ&#222;ǷȜ&#230;&#240;ǝəɛɣijŋœĸſ&#223;&#254;ƿȝĄƁ&#199;ĐƊĘĦĮƘŁ&#216;ƠŞȘŢȚŦŲƯY̨Ƴąɓ&#231;đɗęħįƙł&#248;ơşșţțŧųưyƴ&#193;&#192;&#194;&#196;ǍĂĀ&#195;&#197;ǺǼǢĆĊĈČĎḌ&#201;&#200;Ė&#202;&#203;ĚĔĒẸĠĜǦĞĢ&#225;&#224;&#226;&#228;ǎăā&#227;&#229;ǻǽǣćċĉčďḍ&#233;&#232;ė&#234;&#235;ěĕēẹġĝǧğģĤḤI&#205;&#204;İ&#206;&#207;ǏĬĪĨỊĴĶĹĻĽĿʼNŃ̈Ň&#209;Ņ&#212;&#214;ǑŎŌ&#213;ŐỌǾĥḥı&#237;&#236;i&#238;&#239;ǐĭīĩịĵķĺļľŀʼnńnň&#241;ņ&#243;&#242;&#244;&#246;ǒŏō&#245;őọǿŔŘŖŚŜŠṢŤṬ&#219;&#220;ǓŬŪŨŰŮỤẂẀŴẄ&#221;ỲŶŸȲỸŹŻŽẒŕřŗśŝšṣťṭ&#250;&#249;&#251;&#252;ǔŭūũűůụẃẁŵẅ&#253;ỳŷ&#255;ȳỹźżžẓЁё&#211;&#218;&#217;&#210;]*$&quot;)" />
                <expression value="matches(&quot;^[a-z-A-Z0-9\\s\\.\\-\\&#39;&#224;-&#252;А-я&#198;&#208;ƎƏƐƔIJŊŒẞ&#222;ǷȜ&#230;&#240;ǝəɛɣijŋœĸſ&#223;&#254;ƿȝĄƁ&#199;ĐƊĘĦĮƘŁ&#216;ƠŞȘŢȚŦŲƯY̨Ƴąɓ&#231;đɗęħįƙł&#248;ơşșţțŧųưyƴ&#193;&#192;&#194;&#196;ǍĂĀ&#195;&#197;ǺǼǢĆĊĈČĎḌ&#201;&#200;Ė&#202;&#203;ĚĔĒẸĠĜǦĞĢ&#225;&#224;&#226;&#228;ǎăā&#227;&#229;ǻǽǣćċĉčďḍ&#233;&#232;ė&#234;&#235;ěĕēẹġĝǧğģĤḤI&#205;&#204;İ&#206;&#207;ǏĬĪĨỊĴĶĹĻĽĿʼNŃ̈Ň&#209;Ņ&#212;&#214;ǑŎŌ&#213;ŐỌǾĥḥı&#237;&#236;i&#238;&#239;ǐĭīĩịĵķĺļľŀʼnńnň&#241;ņ&#243;&#242;&#244;&#246;ǒŏō&#245;őọǿŔŘŖŚŜŠṢŤṬ&#219;&#220;ǓŬŪŨŰŮỤẂẀŴẄ&#221;ỲŶŸȲỸŹŻŽẒŕřŗśŝšṣťṭ&#250;&#249;&#251;&#252;ǔŭūũűůụẃẁŵẅ&#253;ỳŷ&#255;ȳỹźżžẓЁё&#211;&#218;&#217;&#210;]*$&quot;)" />
            </constraint>
        </element>
        <element id="Patient.name.prefix">
            <path value="Patient.name.prefix" />
            <max value="0" />
        </element>
        <element id="Patient.name.suffix">
            <path value="Patient.name.suffix" />
            <max value="0" />
        </element>
        <element id="Patient.name.period">
            <path value="Patient.name.period" />
            <max value="0" />
        </element>
        <element id="Patient.telecom.rank">
            <path value="Patient.telecom.rank" />
            <max value="0" />
        </element>
        <element id="Patient.telecom.period">
            <path value="Patient.telecom.period" />
            <max value="0" />
        </element>
        <element id="Patient.deceased[x]">
            <path value="Patient.deceased[x]" />
            <max value="0" />
        </element>
        <element id="Patient.address">
            <path value="Patient.address" />
            <max value="0" />
        </element>
        <element id="Patient.maritalStatus">
            <path value="Patient.maritalStatus" />
            <max value="0" />
        </element>
        <element id="Patient.multipleBirth[x]">
            <path value="Patient.multipleBirth[x]" />
            <max value="0" />
        </element>
        <element id="Patient.photo">
            <path value="Patient.photo" />
            <max value="0" />
        </element>
        <element id="Patient.contact">
            <path value="Patient.contact" />
            <max value="0" />
        </element>
        <element id="Patient.animal">
            <path value="Patient.animal" />
            <max value="0" />
        </element>
        <element id="Patient.communication">
            <path value="Patient.communication" />
            <max value="0" />
        </element>
        <element id="Patient.generalPractitioner">
            <path value="Patient.generalPractitioner" />
            <max value="0" />
        </element>
        <element id="Patient.link">
            <path value="Patient.link" />
            <max value="0" />
        </element>
    </differential>
</StructureDefinition>

JSON

The below section has the structure definition in JSON format

{
    "resourceType": "StructureDefinition",
    "id": "b02d8df3-3866-44bf-9c35-89619bd6d629",
    "url": "http://roche.com/fhir/rdc/StructureDefinition/patient-v2",
    "name": "patient-v2",
    "status": "active",
    "description": "This Patient profile is currently used for EMR integration",
    "fhirVersion": "3.0.2",
    "mapping":  [
        {
            "identity": "rim",
            "uri": "http://hl7.org/v3",
            "name": "RIM Mapping"
        },
        {
            "identity": "cda",
            "uri": "http://hl7.org/v3/cda",
            "name": "CDA (R2)"
        },
        {
            "identity": "w5",
            "uri": "http://hl7.org/fhir/w5",
            "name": "W5 Mapping"
        },
        {
            "identity": "v2",
            "uri": "http://hl7.org/v2",
            "name": "HL7 v2 Mapping"
        },
        {
            "identity": "loinc",
            "uri": "http://loinc.org",
            "name": "LOINC code for the element"
        }
    ],
    "kind": "resource",
    "abstract": false,
    "type": "Patient",
    "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
    "derivation": "constraint",
    "snapshot": {
        "element":  [
            {
                "id": "Patient",
                "path": "Patient",
                "short": "Information about an individual or animal receiving health care services",
                "definition": "Demographics and other administrative information about an individual or animal receiving care or other health-related services.",
                "alias":  [
                    "SubjectOfCare Client Resident"
                ],
                "min": 0,
                "max": "*",
                "base": {
                    "path": "Resource",
                    "min": 0,
                    "max": "*"
                },
                "constraint":  [
                    {
                        "key": "dom-2",
                        "severity": "error",
                        "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                        "expression": "contained.contained.empty()",
                        "xpath": "not(parent::f:contained and f:contained)"
                    },
                    {
                        "key": "dom-1",
                        "severity": "error",
                        "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                        "expression": "contained.text.empty()",
                        "xpath": "not(parent::f:contained and f:text)"
                    },
                    {
                        "key": "dom-4",
                        "severity": "error",
                        "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                        "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                        "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))"
                    },
                    {
                        "key": "dom-3",
                        "severity": "error",
                        "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                        "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                        "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "Entity. Role, or Act"
                    },
                    {
                        "identity": "rim",
                        "map": "Patient[classCode=PAT]"
                    },
                    {
                        "identity": "cda",
                        "map": "ClinicalDocument.recordTarget.patientRole"
                    },
                    {
                        "identity": "w5",
                        "map": "administrative.individual"
                    }
                ]
            },
            {
                "id": "Patient.id",
                "path": "Patient.id",
                "short": "Logical id of this artifact",
                "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
                "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Resource.id",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "id"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.meta",
                "path": "Patient.meta",
                "short": "Metadata about the resource",
                "definition": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Resource.meta",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "Meta"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "N/A"
                    }
                ]
            },
            {
                "id": "Patient.implicitRules",
                "path": "Patient.implicitRules",
                "short": "A set of rules under which this content was created",
                "definition": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.",
                "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Resource.implicitRules",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "uri"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isModifier": true,
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.language",
                "path": "Patient.language",
                "short": "Language of the resource content",
                "definition": "The base language in which the resource is written.",
                "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Resource.language",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "code"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "binding": {
                    "extension":  [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                            "valueReference": {
                                "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                            }
                        },
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                            "valueString": "Language"
                        },
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                            "valueBoolean": true
                        }
                    ],
                    "strength": "extensible",
                    "description": "A human language.",
                    "valueSetReference": {
                        "reference": "http://hl7.org/fhir/ValueSet/languages"
                    }
                },
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.text",
                "path": "Patient.text",
                "short": "Text summary of the resource, for human interpretation",
                "definition": "A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
                "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
                "alias":  [
                    "narrative",
                    "html",
                    "xhtml",
                    "display"
                ],
                "min": 0,
                "max": "1",
                "base": {
                    "path": "DomainResource.text",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "Narrative"
                    }
                ],
                "condition":  [
                    "ele-1",
                    "dom-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "N/A"
                    },
                    {
                        "identity": "rim",
                        "map": "Act.text?"
                    }
                ]
            },
            {
                "id": "Patient.contained",
                "path": "Patient.contained",
                "short": "Contained, inline Resources",
                "definition": "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.",
                "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
                "alias":  [
                    "inline resources",
                    "anonymous resources",
                    "contained resources"
                ],
                "min": 0,
                "max": "*",
                "base": {
                    "path": "DomainResource.contained",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Resource"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "Entity. Role, or Act"
                    },
                    {
                        "identity": "rim",
                        "map": "N/A"
                    }
                ]
            },
            {
                "id": "Patient.extension",
                "path": "Patient.extension",
                "slicing": {
                    "discriminator":  [
                        {
                            "type": "value",
                            "path": "url"
                        }
                    ],
                    "description": "Extensions are always sliced by (at least) url",
                    "rules": "open"
                },
                "short": "Additional Content defined by implementations",
                "definition": "May be used to represent additional information that is not part of the basic definition of the resource. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                "comment": "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":  [
                    "extensions",
                    "user content"
                ],
                "min": 0,
                "max": "*",
                "base": {
                    "path": "DomainResource.extension",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Extension"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "ext-1",
                        "severity": "error",
                        "human": "Must have either extensions or value[x], not both",
                        "expression": "extension.exists() != value.exists()",
                        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "N/A"
                    }
                ]
            },
            {
                "id": "Patient.modifierExtension",
                "path": "Patient.modifierExtension",
                "slicing": {
                    "discriminator":  [
                        {
                            "type": "value",
                            "path": "url"
                        }
                    ],
                    "description": "Extensions are always sliced by (at least) url",
                    "rules": "open"
                },
                "short": "Extensions that cannot be ignored",
                "definition": "May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
                "comment": "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":  [
                    "extensions",
                    "user content"
                ],
                "min": 0,
                "max": "*",
                "base": {
                    "path": "DomainResource.modifierExtension",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Extension"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "ext-1",
                        "severity": "error",
                        "human": "Must have either extensions or value[x], not both",
                        "expression": "extension.exists() != value.exists()",
                        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"
                    }
                ],
                "isModifier": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "N/A"
                    }
                ]
            },
            {
                "id": "Patient.identifier",
                "path": "Patient.identifier",
                "short": "An identifier for this patient",
                "definition": "An identifier for this patient.",
                "requirements": "Patients are almost always assigned specific numerical identifiers.",
                "min": 1,
                "max": "1",
                "base": {
                    "path": "Patient.identifier",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Identifier"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)"
                    },
                    {
                        "identity": "rim",
                        "map": "II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]"
                    },
                    {
                        "identity": "servd",
                        "map": "Identifier"
                    },
                    {
                        "identity": "v2",
                        "map": "PID-3"
                    },
                    {
                        "identity": "rim",
                        "map": "id"
                    },
                    {
                        "identity": "cda",
                        "map": ".id"
                    },
                    {
                        "identity": "w5",
                        "map": "id"
                    }
                ]
            },
            {
                "id": "Patient.identifier.id",
                "path": "Patient.identifier.id",
                "representation":  [
                    "xmlAttr"
                ],
                "short": "xml:id (or equivalent in JSON)",
                "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                "comment": "Note that FHIR strings may not exceed 1MB in size",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Element.id",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "string"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.identifier.extension",
                "path": "Patient.identifier.extension",
                "slicing": {
                    "discriminator":  [
                        {
                            "type": "value",
                            "path": "url"
                        }
                    ],
                    "description": "Extensions are always sliced by (at least) url",
                    "rules": "open"
                },
                "short": "Additional Content defined by implementations",
                "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                "comment": "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":  [
                    "extensions",
                    "user content"
                ],
                "min": 0,
                "max": "*",
                "base": {
                    "path": "Element.extension",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Extension"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "ext-1",
                        "severity": "error",
                        "human": "Must have either extensions or value[x], not both",
                        "expression": "extension.exists() != value.exists()",
                        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "N/A"
                    }
                ]
            },
            {
                "id": "Patient.identifier.use",
                "path": "Patient.identifier.use",
                "short": "usual | official | temp | secondary (If known)",
                "definition": "The purpose of this identifier.",
                "comment": "This is labeled as \"Is Modifier\" because applications should not mistake a temporary id for a permanent one. Applications can assume that an identifier is permanent unless it explicitly says that it is temporary.",
                "requirements": "Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers.",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Identifier.use",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "code"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isModifier": true,
                "isSummary": true,
                "binding": {
                    "extension":  [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                            "valueString": "IdentifierUse"
                        }
                    ],
                    "strength": "required",
                    "description": "Identifies the purpose for this identifier, if known .",
                    "valueSetReference": {
                        "reference": "http://hl7.org/fhir/ValueSet/identifier-use"
                    }
                },
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "N/A"
                    },
                    {
                        "identity": "rim",
                        "map": "Role.code or implied by context"
                    }
                ]
            },
            {
                "id": "Patient.identifier.type",
                "path": "Patient.identifier.type",
                "short": "Description of identifier",
                "definition": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.",
                "comment": "This element deals only with general categories of identifiers.  It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage. \n\nWhere the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type.",
                "requirements": "Allows users to make use of identifiers when the identifier system is not known.",
                "min": 0,
                "max": "0",
                "base": {
                    "path": "Identifier.type",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "CodeableConcept"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isSummary": true,
                "binding": {
                    "extension":  [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                            "valueString": "IdentifierType"
                        },
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                            "valueBoolean": true
                        }
                    ],
                    "strength": "extensible",
                    "description": "A coded type for an identifier that can be used to determine which identifier to use for a specific purpose.",
                    "valueSetReference": {
                        "reference": "http://hl7.org/fhir/ValueSet/identifier-type"
                    }
                },
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "CE/CNE/CWE"
                    },
                    {
                        "identity": "rim",
                        "map": "CD"
                    },
                    {
                        "identity": "orim",
                        "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD"
                    },
                    {
                        "identity": "v2",
                        "map": "CX.5"
                    },
                    {
                        "identity": "rim",
                        "map": "Role.code or implied by context"
                    }
                ]
            },
            {
                "id": "Patient.identifier.system",
                "path": "Patient.identifier.system",
                "short": "The namespace for the identifier value",
                "definition": "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.",
                "comment": "see http://en.wikipedia.org/wiki/Uniform_resource_identifier",
                "requirements": "There are many sets  of identifiers.  To perform matching of two identifiers, we need to know what set we're dealing with. The system identifies a particular set of unique identifiers.",
                "min": 1,
                "max": "1",
                "base": {
                    "path": "Identifier.system",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "uri"
                    }
                ],
                "example":  [
                    {
                        "label": "General",
                        "valueUri": "http://www.acme.com/identifiers/patient"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "CX.4 / EI-2-4"
                    },
                    {
                        "identity": "rim",
                        "map": "II.root or Role.id.root"
                    },
                    {
                        "identity": "servd",
                        "map": "./IdentifierType"
                    }
                ]
            },
            {
                "id": "Patient.identifier.value",
                "path": "Patient.identifier.value",
                "short": "The value that is unique",
                "definition": "The portion of the identifier typically relevant to the user and which is unique within the context of the system.",
                "comment": "If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986.  The value's primary purpose is computational mapping.  As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.)  A value formatted for human display can be conveyed using the [Rendered Value extension](extension-rendered-value.html).",
                "min": 1,
                "max": "1",
                "base": {
                    "path": "Identifier.value",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "string"
                    }
                ],
                "example":  [
                    {
                        "label": "General",
                        "valueString": "123456"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "CX.1 / EI.1"
                    },
                    {
                        "identity": "rim",
                        "map": "II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)"
                    },
                    {
                        "identity": "servd",
                        "map": "./Value"
                    }
                ]
            },
            {
                "id": "Patient.identifier.period",
                "path": "Patient.identifier.period",
                "short": "Time period when id is/was valid for use",
                "definition": "Time period during which identifier is/was valid for use.",
                "comment": "This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. \"the patient was an inpatient of the hospital for this time range\") or one value from the range applies (e.g. \"give to the patient between these two times\"). If duration is required, specify the type as Interval|Duration.",
                "min": 0,
                "max": "0",
                "base": {
                    "path": "Identifier.period",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "Period"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "per-1",
                        "severity": "error",
                        "human": "If present, start SHALL have a lower value than end",
                        "expression": "start.empty() or end.empty() or (start <= end)",
                        "xpath": "not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "DR"
                    },
                    {
                        "identity": "rim",
                        "map": "IVL<TS>[lowClosed=\"true\" and highClosed=\"true\"] or URG<TS>[lowClosed=\"true\" and highClosed=\"true\"]"
                    },
                    {
                        "identity": "v2",
                        "map": "CX.7 + CX.8"
                    },
                    {
                        "identity": "rim",
                        "map": "Role.effectiveTime or implied by context"
                    },
                    {
                        "identity": "servd",
                        "map": "./StartDate and ./EndDate"
                    }
                ]
            },
            {
                "id": "Patient.identifier.assigner",
                "path": "Patient.identifier.assigner",
                "short": "Organization that issued id (may be just text)",
                "definition": "Organization that issued/manages the identifier.",
                "comment": "The Identifier.assigner may omit the .reference element and only contain a .display element reflecting the name or other textual information about the assigning organization.",
                "min": 0,
                "max": "0",
                "base": {
                    "path": "Identifier.assigner",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "Reference",
                        "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "ref-1",
                        "severity": "error",
                        "human": "SHALL have a contained resource if a local reference is provided",
                        "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))",
                        "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)"
                    },
                    {
                        "identity": "v2",
                        "map": "CX.4 / (CX.4,CX.9,CX.10)"
                    },
                    {
                        "identity": "rim",
                        "map": "II.assigningAuthorityName but note that this is an improper use by the definition of the field.  Also Role.scoper"
                    },
                    {
                        "identity": "servd",
                        "map": "./IdentifierIssuingAuthority"
                    }
                ]
            },
            {
                "id": "Patient.active",
                "path": "Patient.active",
                "short": "Whether this patient's record is in active use",
                "definition": "Whether this patient record is in active use.",
                "comment": "Default is true. If a record is inactive, and linked to an active record, then future patient/record updates should occur on the other patient\n\nThis element is labeled as a modifier because when the patient record is marked as not active it is not expected to be used/referenced without being changed back to active.",
                "requirements": "Need to be able to mark a patient record as not to be used because it was created in error.",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Patient.active",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "boolean"
                    }
                ],
                "defaultValueBoolean": true,
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isModifier": true,
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "statusCode"
                    },
                    {
                        "identity": "cda",
                        "map": "n/a"
                    },
                    {
                        "identity": "w5",
                        "map": "status"
                    }
                ]
            },
            {
                "id": "Patient.name",
                "path": "Patient.name",
                "short": "A name associated with the patient",
                "definition": "A name associated with the individual.",
                "comment": "A patient may have multiple names with different uses or applicable periods. For animals, the name is a \"HumanName\" in the sense that is assigned and used by humans and has the same patterns.",
                "requirements": "Need to be able to track the patient by multiple names. Examples are your official name and a partner name.",
                "min": 1,
                "max": "*",
                "base": {
                    "path": "Patient.name",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "HumanName"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "XPN"
                    },
                    {
                        "identity": "rim",
                        "map": "EN (actually, PN)"
                    },
                    {
                        "identity": "servd",
                        "map": "ProviderName"
                    },
                    {
                        "identity": "v2",
                        "map": "PID-5, PID-9"
                    },
                    {
                        "identity": "rim",
                        "map": "name"
                    },
                    {
                        "identity": "cda",
                        "map": ".patient.name"
                    }
                ]
            },
            {
                "id": "Patient.name.id",
                "path": "Patient.name.id",
                "representation":  [
                    "xmlAttr"
                ],
                "short": "xml:id (or equivalent in JSON)",
                "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                "comment": "Note that FHIR strings may not exceed 1MB in size",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Element.id",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "string"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.name.extension",
                "path": "Patient.name.extension",
                "slicing": {
                    "discriminator":  [
                        {
                            "type": "value",
                            "path": "url"
                        }
                    ],
                    "description": "Extensions are always sliced by (at least) url",
                    "rules": "open"
                },
                "short": "Additional Content defined by implementations",
                "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                "comment": "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":  [
                    "extensions",
                    "user content"
                ],
                "min": 0,
                "max": "*",
                "base": {
                    "path": "Element.extension",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Extension"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "ext-1",
                        "severity": "error",
                        "human": "Must have either extensions or value[x], not both",
                        "expression": "extension.exists() != value.exists()",
                        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "N/A"
                    }
                ]
            },
            {
                "id": "Patient.name.use",
                "path": "Patient.name.use",
                "short": "usual | official | temp | nickname | anonymous | old | maiden",
                "definition": "Identifies the purpose for this name.",
                "comment": "This is labeled as \"Is Modifier\" because applications should not mistake a temporary or old name etc.for a current/permanent one. Applications can assume that a name is current unless it explicitly says that it is temporary or old.",
                "requirements": "Allows the appropriate name for a particular context of use to be selected from among a set of names.",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "HumanName.use",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "code"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isModifier": true,
                "isSummary": true,
                "binding": {
                    "extension":  [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                            "valueString": "NameUse"
                        }
                    ],
                    "strength": "required",
                    "description": "The use of a human name",
                    "valueSetReference": {
                        "reference": "http://hl7.org/fhir/ValueSet/name-use"
                    }
                },
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "XPN.7, but often indicated by which field contains the name"
                    },
                    {
                        "identity": "rim",
                        "map": "unique(./use)"
                    },
                    {
                        "identity": "servd",
                        "map": "./NamePurpose"
                    }
                ]
            },
            {
                "id": "Patient.name.text",
                "path": "Patient.name.text",
                "short": "Text representation of the full name",
                "definition": "A full text representation of the name.",
                "comment": "Can provide both a text representation and structured parts.",
                "requirements": "A renderable, unencoded form.",
                "min": 0,
                "max": "0",
                "base": {
                    "path": "HumanName.text",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "string"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "implied by XPN.11"
                    },
                    {
                        "identity": "rim",
                        "map": "./formatted"
                    }
                ]
            },
            {
                "id": "Patient.name.family",
                "path": "Patient.name.family",
                "short": "Family name (often called 'Surname')",
                "definition": "The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.",
                "comment": "Family Name may be decomposed into specific parts using extensions (de, nl, es related cultures).",
                "alias":  [
                    "surname"
                ],
                "min": 1,
                "max": "1",
                "base": {
                    "path": "HumanName.family",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "string"
                    }
                ],
                "maxLength": 100,
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "pat-regx-1",
                        "severity": "error",
                        "human": "Patient family name should match the following regular expression: matches(\"^[a-z-A-Z0-9\\\\s\\\\.\\\\-\\\\'à-üА-яÆÐƎƏƐƔIJŊŒẞÞǷȜæðǝəɛɣijŋœĸſßþƿȝĄƁÇĐƊĘĦĮƘŁØƠŞȘŢȚŦŲƯY̨ƳąɓçđɗęħįƙłøơşșţțŧųưyƴÁÀÂÄǍĂĀÃÅǺǼǢĆĊĈČĎḌÉÈĖÊËĚĔĒẸĠĜǦĞĢáàâäǎăāãåǻǽǣćċĉčďḍéèėêëěĕēẹġĝǧğģĤḤIÍÌİÎÏǏĬĪĨỊĴĶĹĻĽĿʼNŃ̈ŇÑŅÔÖǑŎŌÕŐỌǾĥḥıíìiîïǐĭīĩịĵķĺļľŀʼnńnňñņóòôöǒŏōõőọǿŔŘŖŚŜŠṢŤṬÛÜǓŬŪŨŰŮỤẂẀŴẄÝỲŶŸȲỸŹŻŽẒŕřŗśŝšṣťṭúùûüǔŭūũűůụẃẁŵẅýỳŷÿȳỹźżžẓЁёÓÚÙÒ]*$\")",
                        "expression": "matches(\"^[a-z-A-Z0-9\\\\s\\\\.\\\\-\\\\'à-üА-яÆÐƎƏƐƔIJŊŒẞÞǷȜæðǝəɛɣijŋœĸſßþƿȝĄƁÇĐƊĘĦĮƘŁØƠŞȘŢȚŦŲƯY̨ƳąɓçđɗęħįƙłøơşșţțŧųưyƴÁÀÂÄǍĂĀÃÅǺǼǢĆĊĈČĎḌÉÈĖÊËĚĔĒẸĠĜǦĞĢáàâäǎăāãåǻǽǣćċĉčďḍéèėêëěĕēẹġĝǧğģĤḤIÍÌİÎÏǏĬĪĨỊĴĶĹĻĽĿʼNŃ̈ŇÑŅÔÖǑŎŌÕŐỌǾĥḥıíìiîïǐĭīĩịĵķĺļľŀʼnńnňñņóòôöǒŏōõőọǿŔŘŖŚŜŠṢŤṬÛÜǓŬŪŨŰŮỤẂẀŴẄÝỲŶŸȲỸŹŻŽẒŕřŗśŝšṣťṭúùûüǔŭūũűůụẃẁŵẅýỳŷÿȳỹźżžẓЁёÓÚÙÒ]*$\")"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "XPN.1/FN.1"
                    },
                    {
                        "identity": "rim",
                        "map": "./part[partType = FAM]"
                    },
                    {
                        "identity": "servd",
                        "map": "./FamilyName"
                    }
                ]
            },
            {
                "id": "Patient.name.given",
                "path": "Patient.name.given",
                "short": "Given names (not always 'first'). Includes middle names",
                "definition": "Given name.",
                "comment": "If only initials are recorded, they may be used in place of the full name.  Not called \"first name\" since given names do not always come first.",
                "alias":  [
                    "first name",
                    "middle name"
                ],
                "min": 1,
                "max": "*",
                "base": {
                    "path": "HumanName.given",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "string"
                    }
                ],
                "orderMeaning": "Given Names appear in the correct order for presenting the name",
                "maxLength": 100,
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "pat-regx-2",
                        "severity": "error",
                        "human": "Patient given name should match the following regular expression: matches(\"^[a-z-A-Z0-9\\\\s\\\\.\\\\-\\\\'à-üА-яÆÐƎƏƐƔIJŊŒẞÞǷȜæðǝəɛɣijŋœĸſßþƿȝĄƁÇĐƊĘĦĮƘŁØƠŞȘŢȚŦŲƯY̨ƳąɓçđɗęħįƙłøơşșţțŧųưyƴÁÀÂÄǍĂĀÃÅǺǼǢĆĊĈČĎḌÉÈĖÊËĚĔĒẸĠĜǦĞĢáàâäǎăāãåǻǽǣćċĉčďḍéèėêëěĕēẹġĝǧğģĤḤIÍÌİÎÏǏĬĪĨỊĴĶĹĻĽĿʼNŃ̈ŇÑŅÔÖǑŎŌÕŐỌǾĥḥıíìiîïǐĭīĩịĵķĺļľŀʼnńnňñņóòôöǒŏōõőọǿŔŘŖŚŜŠṢŤṬÛÜǓŬŪŨŰŮỤẂẀŴẄÝỲŶŸȲỸŹŻŽẒŕřŗśŝšṣťṭúùûüǔŭūũűůụẃẁŵẅýỳŷÿȳỹźżžẓЁёÓÚÙÒ]*$\")",
                        "expression": "matches(\"^[a-z-A-Z0-9\\\\s\\\\.\\\\-\\\\'à-üА-яÆÐƎƏƐƔIJŊŒẞÞǷȜæðǝəɛɣijŋœĸſßþƿȝĄƁÇĐƊĘĦĮƘŁØƠŞȘŢȚŦŲƯY̨ƳąɓçđɗęħįƙłøơşșţțŧųưyƴÁÀÂÄǍĂĀÃÅǺǼǢĆĊĈČĎḌÉÈĖÊËĚĔĒẸĠĜǦĞĢáàâäǎăāãåǻǽǣćċĉčďḍéèėêëěĕēẹġĝǧğģĤḤIÍÌİÎÏǏĬĪĨỊĴĶĹĻĽĿʼNŃ̈ŇÑŅÔÖǑŎŌÕŐỌǾĥḥıíìiîïǐĭīĩịĵķĺļľŀʼnńnňñņóòôöǒŏōõőọǿŔŘŖŚŜŠṢŤṬÛÜǓŬŪŨŰŮỤẂẀŴẄÝỲŶŸȲỸŹŻŽẒŕřŗśŝšṣťṭúùûüǔŭūũűůụẃẁŵẅýỳŷÿȳỹźżžẓЁёÓÚÙÒ]*$\")"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "XPN.2 + XPN.3"
                    },
                    {
                        "identity": "rim",
                        "map": "./part[partType = GIV]"
                    },
                    {
                        "identity": "servd",
                        "map": "./GivenNames"
                    }
                ]
            },
            {
                "id": "Patient.name.prefix",
                "path": "Patient.name.prefix",
                "short": "Parts that come before the name",
                "definition": "Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name.",
                "comment": "Note that FHIR strings may not exceed 1MB in size",
                "min": 0,
                "max": "0",
                "base": {
                    "path": "HumanName.prefix",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "string"
                    }
                ],
                "orderMeaning": "Prefixes appear in the correct order for presenting the name",
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "XPN.5"
                    },
                    {
                        "identity": "rim",
                        "map": "./part[partType = PFX]"
                    },
                    {
                        "identity": "servd",
                        "map": "./TitleCode"
                    }
                ]
            },
            {
                "id": "Patient.name.suffix",
                "path": "Patient.name.suffix",
                "short": "Parts that come after the name",
                "definition": "Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name.",
                "comment": "Note that FHIR strings may not exceed 1MB in size",
                "min": 0,
                "max": "0",
                "base": {
                    "path": "HumanName.suffix",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "string"
                    }
                ],
                "orderMeaning": "Suffixes appear in the correct order for presenting the name",
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "XPN/4"
                    },
                    {
                        "identity": "rim",
                        "map": "./part[partType = SFX]"
                    }
                ]
            },
            {
                "id": "Patient.name.period",
                "path": "Patient.name.period",
                "short": "Time period when name was/is in use",
                "definition": "Indicates the period of time when this name was valid for the named person.",
                "comment": "This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. \"the patient was an inpatient of the hospital for this time range\") or one value from the range applies (e.g. \"give to the patient between these two times\"). If duration is required, specify the type as Interval|Duration.",
                "requirements": "Allows names to be placed in historical context.",
                "min": 0,
                "max": "0",
                "base": {
                    "path": "HumanName.period",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "Period"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "per-1",
                        "severity": "error",
                        "human": "If present, start SHALL have a lower value than end",
                        "expression": "start.empty() or end.empty() or (start <= end)",
                        "xpath": "not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "DR"
                    },
                    {
                        "identity": "rim",
                        "map": "IVL<TS>[lowClosed=\"true\" and highClosed=\"true\"] or URG<TS>[lowClosed=\"true\" and highClosed=\"true\"]"
                    },
                    {
                        "identity": "v2",
                        "map": "XPN.13 + XPN.14"
                    },
                    {
                        "identity": "rim",
                        "map": "./usablePeriod[type=\"IVL<TS>\"]"
                    },
                    {
                        "identity": "servd",
                        "map": "./StartDate and ./EndDate"
                    }
                ]
            },
            {
                "id": "Patient.telecom",
                "path": "Patient.telecom",
                "short": "A contact detail for the individual",
                "definition": "A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.",
                "comment": "A Patient may have multiple ways to be contacted with different uses or applicable periods.  May need to have options for contacting the person urgently and also to help with identification. The address may not go directly to the individual, but may reach another party that is able to proxy for the patient (i.e. home phone, or pet owner's phone).",
                "requirements": "People have (primary) ways to contact them in some way such as phone, email.",
                "min": 0,
                "max": "*",
                "base": {
                    "path": "Patient.telecom",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "ContactPoint"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "cpt-2",
                        "severity": "error",
                        "human": "A system is required if a value is provided.",
                        "expression": "value.empty() or system.exists()",
                        "xpath": "not(exists(f:value)) or exists(f:system)"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "XTN"
                    },
                    {
                        "identity": "rim",
                        "map": "TEL"
                    },
                    {
                        "identity": "servd",
                        "map": "ContactPoint"
                    },
                    {
                        "identity": "v2",
                        "map": "PID-13, PID-14, PID-40"
                    },
                    {
                        "identity": "rim",
                        "map": "telecom"
                    },
                    {
                        "identity": "cda",
                        "map": ".telecom"
                    }
                ]
            },
            {
                "id": "Patient.telecom.id",
                "path": "Patient.telecom.id",
                "representation":  [
                    "xmlAttr"
                ],
                "short": "xml:id (or equivalent in JSON)",
                "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                "comment": "Note that FHIR strings may not exceed 1MB in size",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Element.id",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "string"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.telecom.extension",
                "path": "Patient.telecom.extension",
                "slicing": {
                    "discriminator":  [
                        {
                            "type": "value",
                            "path": "url"
                        }
                    ],
                    "description": "Extensions are always sliced by (at least) url",
                    "rules": "open"
                },
                "short": "Additional Content defined by implementations",
                "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                "comment": "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":  [
                    "extensions",
                    "user content"
                ],
                "min": 0,
                "max": "*",
                "base": {
                    "path": "Element.extension",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Extension"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "ext-1",
                        "severity": "error",
                        "human": "Must have either extensions or value[x], not both",
                        "expression": "extension.exists() != value.exists()",
                        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "N/A"
                    }
                ]
            },
            {
                "id": "Patient.telecom.system",
                "path": "Patient.telecom.system",
                "short": "phone | fax | email | pager | url | sms | other",
                "definition": "Telecommunications form for contact point - what communications system is required to make use of the contact.",
                "comment": "Note that FHIR strings may not exceed 1MB in size",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "ContactPoint.system",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "code"
                    }
                ],
                "condition":  [
                    "ele-1",
                    "cpt-2"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isSummary": true,
                "binding": {
                    "extension":  [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                            "valueString": "ContactPointSystem"
                        }
                    ],
                    "strength": "required",
                    "description": "Telecommunications form for contact point",
                    "valueSetReference": {
                        "reference": "http://hl7.org/fhir/ValueSet/contact-point-system"
                    }
                },
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "XTN.3"
                    },
                    {
                        "identity": "rim",
                        "map": "./scheme"
                    },
                    {
                        "identity": "servd",
                        "map": "./ContactPointType"
                    }
                ]
            },
            {
                "id": "Patient.telecom.value",
                "path": "Patient.telecom.value",
                "short": "The actual contact point details",
                "definition": "The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).",
                "comment": "Additional text data such as phone extension numbers, or notes about use of the contact are sometimes included in the value.",
                "requirements": "Need to support legacy numbers that are not in a tightly controlled format.",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "ContactPoint.value",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "string"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "XTN.1 (or XTN.12)"
                    },
                    {
                        "identity": "rim",
                        "map": "./url"
                    },
                    {
                        "identity": "servd",
                        "map": "./Value"
                    }
                ]
            },
            {
                "id": "Patient.telecom.use",
                "path": "Patient.telecom.use",
                "short": "home | work | temp | old | mobile - purpose of this contact point",
                "definition": "Identifies the purpose for the contact point.",
                "comment": "This is labeled as \"Is Modifier\" because applications should not mistake a temporary or old contact etc.for a current/permanent one. Applications can assume that a contact is current unless it explicitly says that it is temporary or old.",
                "requirements": "Need to track the way a person uses this contact, so a user can choose which is appropriate for their purpose.",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "ContactPoint.use",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "code"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isModifier": true,
                "isSummary": true,
                "binding": {
                    "extension":  [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                            "valueString": "ContactPointUse"
                        }
                    ],
                    "strength": "required",
                    "description": "Use of contact point",
                    "valueSetReference": {
                        "reference": "http://hl7.org/fhir/ValueSet/contact-point-use"
                    }
                },
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "XTN.2 - but often indicated by field"
                    },
                    {
                        "identity": "rim",
                        "map": "unique(./use)"
                    },
                    {
                        "identity": "servd",
                        "map": "./ContactPointPurpose"
                    }
                ]
            },
            {
                "id": "Patient.telecom.rank",
                "path": "Patient.telecom.rank",
                "short": "Specify preferred order of use (1 = highest)",
                "definition": "Specifies a preferred order in which to use a set of contacts. Contacts are ranked with lower values coming before higher values.",
                "comment": "Note that rank does not necessarily follow the order in which the contacts are represented in the instance.",
                "min": 0,
                "max": "0",
                "base": {
                    "path": "ContactPoint.rank",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "positiveInt"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.telecom.period",
                "path": "Patient.telecom.period",
                "short": "Time period when the contact point was/is in use",
                "definition": "Time period when the contact point was/is in use.",
                "comment": "This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. \"the patient was an inpatient of the hospital for this time range\") or one value from the range applies (e.g. \"give to the patient between these two times\"). If duration is required, specify the type as Interval|Duration.",
                "min": 0,
                "max": "0",
                "base": {
                    "path": "ContactPoint.period",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "Period"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "per-1",
                        "severity": "error",
                        "human": "If present, start SHALL have a lower value than end",
                        "expression": "start.empty() or end.empty() or (start <= end)",
                        "xpath": "not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "DR"
                    },
                    {
                        "identity": "rim",
                        "map": "IVL<TS>[lowClosed=\"true\" and highClosed=\"true\"] or URG<TS>[lowClosed=\"true\" and highClosed=\"true\"]"
                    },
                    {
                        "identity": "v2",
                        "map": "N/A"
                    },
                    {
                        "identity": "rim",
                        "map": "./usablePeriod[type=\"IVL<TS>\"]"
                    },
                    {
                        "identity": "servd",
                        "map": "./StartDate and ./EndDate"
                    }
                ]
            },
            {
                "id": "Patient.gender",
                "path": "Patient.gender",
                "short": "male | female | other | unknown",
                "definition": "Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes.",
                "comment": "The gender may not match the biological sex as determined by genetics, or the individual's preferred identification. Note that for both humans and particularly animals, there are other legitimate possibilities than M and F, though the vast majority of systems and contexts only support M and F.  Systems providing decision support or enforcing business rules should ideally do this on the basis of Observations dealing with the specific gender aspect of interest (anatomical, chromosonal, social, etc.)  However, because these observations are infrequently recorded, defaulting to the administrative gender is common practice.  Where such defaulting occurs, rule enforcement should allow for the variation between administrative and biological, chromosonal and other gender aspects.  For example, an alert about a hysterectomy on a male should be handled as a warning or overrideable error, not a \"hard\" error.",
                "requirements": "Needed for identification of the individual, in combination with (at least) name and birth date. Gender of individual drives many clinical processes.",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Patient.gender",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "code"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isSummary": true,
                "binding": {
                    "extension":  [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                            "valueString": "AdministrativeGender"
                        },
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                            "valueBoolean": true
                        }
                    ],
                    "strength": "required",
                    "description": "The gender of a person used for administrative purposes.",
                    "valueSetReference": {
                        "reference": "http://hl7.org/fhir/ValueSet/administrative-gender"
                    }
                },
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "PID-8"
                    },
                    {
                        "identity": "rim",
                        "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/administrativeGender"
                    },
                    {
                        "identity": "cda",
                        "map": ".patient.administrativeGenderCode"
                    }
                ]
            },
            {
                "id": "Patient.birthDate",
                "path": "Patient.birthDate",
                "short": "The date of birth for the individual",
                "definition": "The date of birth for the individual.",
                "comment": "At least an estimated year should be provided as a guess if the real DOB is unknown  There is a standard extension \"patient-birthTime\" available that should be used where Time is required (such as in maternaty/infant care systems).",
                "requirements": "Age of the individual drives many clinical processes.",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Patient.birthDate",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "date"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "PID-7"
                    },
                    {
                        "identity": "rim",
                        "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/birthTime"
                    },
                    {
                        "identity": "cda",
                        "map": ".patient.birthTime"
                    },
                    {
                        "identity": "loinc",
                        "map": "21112-8"
                    }
                ]
            },
            {
                "id": "Patient.deceased[x]",
                "path": "Patient.deceased[x]",
                "short": "Indicates if the individual is deceased or not",
                "definition": "Indicates if the individual is deceased or not.",
                "comment": "If there's no value in the instance it means there is no statement on whether or not the individual is deceased. Most systems will interpret the absence of a value as a sign of the person being alive.\n\nThis element is labeled as a modifier because once a patient is marked as deceased, the actions that are appropriate to perform on the patient may be significantly different.",
                "requirements": "The fact that a patient is deceased influences the clinical process. Also, in human communication and relation management it is necessary to know whether the person is alive.",
                "min": 0,
                "max": "0",
                "base": {
                    "path": "Patient.deceased[x]",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "boolean"
                    },
                    {
                        "code": "dateTime"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isModifier": true,
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "PID-30  (bool) and PID-29 (datetime)"
                    },
                    {
                        "identity": "rim",
                        "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/deceasedInd, player[classCode=PSN|ANM and determinerCode=INSTANCE]/deceasedTime"
                    },
                    {
                        "identity": "cda",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.address",
                "path": "Patient.address",
                "short": "Addresses for the individual",
                "definition": "Addresses for the individual.",
                "comment": "Patient may have multiple addresses with different uses or applicable periods.",
                "requirements": "May need to keep track of patient addresses for contacting, billing or reporting requirements and also to help with identification.",
                "min": 0,
                "max": "0",
                "base": {
                    "path": "Patient.address",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Address"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "XAD"
                    },
                    {
                        "identity": "rim",
                        "map": "AD"
                    },
                    {
                        "identity": "servd",
                        "map": "Address"
                    },
                    {
                        "identity": "v2",
                        "map": "PID-11"
                    },
                    {
                        "identity": "rim",
                        "map": "addr"
                    },
                    {
                        "identity": "cda",
                        "map": ".addr"
                    }
                ]
            },
            {
                "id": "Patient.maritalStatus",
                "path": "Patient.maritalStatus",
                "short": "Marital (civil) status of a patient",
                "definition": "This field contains a patient's most recent marital (civil) status.",
                "comment": "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.",
                "requirements": "Most, if not all systems capture it.",
                "min": 0,
                "max": "0",
                "base": {
                    "path": "Patient.maritalStatus",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "CodeableConcept"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "binding": {
                    "extension":  [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                            "valueString": "MaritalStatus"
                        },
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                            "valueBoolean": true
                        }
                    ],
                    "strength": "extensible",
                    "description": "The domestic partnership status of a person.",
                    "valueSetReference": {
                        "reference": "http://hl7.org/fhir/ValueSet/marital-status"
                    }
                },
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "CE/CNE/CWE"
                    },
                    {
                        "identity": "rim",
                        "map": "CD"
                    },
                    {
                        "identity": "orim",
                        "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD"
                    },
                    {
                        "identity": "v2",
                        "map": "PID-16"
                    },
                    {
                        "identity": "rim",
                        "map": "player[classCode=PSN]/maritalStatusCode"
                    },
                    {
                        "identity": "cda",
                        "map": ".patient.maritalStatusCode"
                    }
                ]
            },
            {
                "id": "Patient.multipleBirth[x]",
                "path": "Patient.multipleBirth[x]",
                "short": "Whether patient is part of a multiple birth",
                "definition": "Indicates whether the patient is part of a multiple (bool) or indicates the actual birth order (integer).",
                "comment": "Where the valueInteger is provided, the number is the birth number in the sequence.\nE.g. The middle birth in tripplets would be valueInteger=2 and the third born would have valueInteger=3\nIf a bool value was provided for this tripplets examle, then all 3 patient records would have valueBool=true (the ordering is not indicated).",
                "requirements": "For disambiguation of multiple-birth children, especially relevant where the care provider doesn't meet the patient, such as labs.",
                "min": 0,
                "max": "0",
                "base": {
                    "path": "Patient.multipleBirth[x]",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "boolean"
                    },
                    {
                        "code": "integer"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "PID-24 (bool), PID-25 (integer)"
                    },
                    {
                        "identity": "rim",
                        "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/multipleBirthInd,  player[classCode=PSN|ANM and determinerCode=INSTANCE]/multipleBirthOrderNumber"
                    },
                    {
                        "identity": "cda",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.photo",
                "path": "Patient.photo",
                "short": "Image of the patient",
                "definition": "Image of the patient.",
                "comment": "When providing a summary view (for example with Observation.value[x]) Attachment should be represented with a brief display text such as \"Attachment\".",
                "requirements": "Many EHR systems have the capability to capture an image of the patient. Fits with newer social media usage too.",
                "min": 0,
                "max": "0",
                "base": {
                    "path": "Patient.photo",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Attachment"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "att-1",
                        "severity": "error",
                        "human": "It the Attachment has data, it SHALL have a contentType",
                        "expression": "data.empty() or contentType.exists()",
                        "xpath": "not(exists(f:data)) or exists(f:contentType)"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "ED/RP"
                    },
                    {
                        "identity": "rim",
                        "map": "ED"
                    },
                    {
                        "identity": "v2",
                        "map": "OBX-5 - needs a profile"
                    },
                    {
                        "identity": "rim",
                        "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/desc"
                    },
                    {
                        "identity": "cda",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.contact",
                "extension":  [
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
                        "valueString": "Contact"
                    }
                ],
                "path": "Patient.contact",
                "short": "A contact party (e.g. guardian, partner, friend) for the patient",
                "definition": "A contact party (e.g. guardian, partner, friend) for the patient.",
                "comment": "Contact covers all kinds of contact parties: family members, business contacts, guardians, caregivers. Not applicable to register pedigree and family ties beyond use of having contact.",
                "requirements": "Need to track people you can contact about the patient.",
                "min": 0,
                "max": "0",
                "base": {
                    "path": "Patient.contact",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "BackboneElement"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "pat-1",
                        "severity": "error",
                        "human": "SHALL at least contain a contact's details or a reference to an organization",
                        "expression": "name.exists() or telecom.exists() or address.exists() or organization.exists()",
                        "xpath": "exists(f:name) or exists(f:telecom) or exists(f:address) or exists(f:organization)"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/scopedRole[classCode=CON]"
                    },
                    {
                        "identity": "cda",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.contact.id",
                "path": "Patient.contact.id",
                "representation":  [
                    "xmlAttr"
                ],
                "short": "xml:id (or equivalent in JSON)",
                "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                "comment": "Note that FHIR strings may not exceed 1MB in size",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Element.id",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "string"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.contact.extension",
                "path": "Patient.contact.extension",
                "slicing": {
                    "discriminator":  [
                        {
                            "type": "value",
                            "path": "url"
                        }
                    ],
                    "description": "Extensions are always sliced by (at least) url",
                    "rules": "open"
                },
                "short": "Additional Content defined by implementations",
                "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                "comment": "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":  [
                    "extensions",
                    "user content"
                ],
                "min": 0,
                "max": "*",
                "base": {
                    "path": "Element.extension",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Extension"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "ext-1",
                        "severity": "error",
                        "human": "Must have either extensions or value[x], not both",
                        "expression": "extension.exists() != value.exists()",
                        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "N/A"
                    }
                ]
            },
            {
                "id": "Patient.contact.modifierExtension",
                "path": "Patient.contact.modifierExtension",
                "short": "Extensions that cannot be ignored",
                "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
                "comment": "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":  [
                    "extensions",
                    "user content",
                    "modifiers"
                ],
                "min": 0,
                "max": "*",
                "base": {
                    "path": "BackboneElement.modifierExtension",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Extension"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "ext-1",
                        "severity": "error",
                        "human": "Must have either extensions or value[x], not both",
                        "expression": "extension.exists() != value.exists()",
                        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"
                    }
                ],
                "isModifier": true,
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "N/A"
                    }
                ]
            },
            {
                "id": "Patient.contact.relationship",
                "path": "Patient.contact.relationship",
                "short": "The kind of relationship",
                "definition": "The nature of the relationship between the patient and the contact person.",
                "comment": "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.",
                "requirements": "Used to determine which contact person is the most relevant to approach, depending on circumstances.",
                "min": 0,
                "max": "*",
                "base": {
                    "path": "Patient.contact.relationship",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "CodeableConcept"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "binding": {
                    "extension":  [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                            "valueString": "ContactRelationship"
                        }
                    ],
                    "strength": "extensible",
                    "description": "The nature of the relationship between a patient and a contact person for that patient.",
                    "valueSetReference": {
                        "reference": "http://hl7.org/fhir/ValueSet/v2-0131"
                    }
                },
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "CE/CNE/CWE"
                    },
                    {
                        "identity": "rim",
                        "map": "CD"
                    },
                    {
                        "identity": "orim",
                        "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD"
                    },
                    {
                        "identity": "v2",
                        "map": "NK1-7, NK1-3"
                    },
                    {
                        "identity": "rim",
                        "map": "code"
                    },
                    {
                        "identity": "cda",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.contact.name",
                "path": "Patient.contact.name",
                "short": "A name associated with the contact person",
                "definition": "A name associated with the contact person.",
                "comment": "Names may be changed, or repudiated, or people may have different names in different contexts. Names may be divided into parts of different type that have variable significance depending on context, though the division into parts does not always matter. With personal names, the different parts may or may not be imbued with some implicit meaning; various cultures associate different importance with the name parts and the degree to which systems must care about name parts around the world varies widely.",
                "requirements": "Contact persons need to be identified by name, but it is uncommon to need details about multiple other names for that contact person.",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Patient.contact.name",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "HumanName"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "XPN"
                    },
                    {
                        "identity": "rim",
                        "map": "EN (actually, PN)"
                    },
                    {
                        "identity": "servd",
                        "map": "ProviderName"
                    },
                    {
                        "identity": "v2",
                        "map": "NK1-2"
                    },
                    {
                        "identity": "rim",
                        "map": "name"
                    },
                    {
                        "identity": "cda",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.contact.telecom",
                "path": "Patient.contact.telecom",
                "short": "A contact detail for the person",
                "definition": "A contact detail for the person, e.g. a telephone number or an email address.",
                "comment": "Contact may have multiple ways to be contacted with different uses or applicable periods.  May need to have options for contacting the person urgently, and also to help with identification.",
                "requirements": "People have (primary) ways to contact them in some way such as phone, email.",
                "min": 0,
                "max": "*",
                "base": {
                    "path": "Patient.contact.telecom",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "ContactPoint"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "cpt-2",
                        "severity": "error",
                        "human": "A system is required if a value is provided.",
                        "expression": "value.empty() or system.exists()",
                        "xpath": "not(exists(f:value)) or exists(f:system)"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "XTN"
                    },
                    {
                        "identity": "rim",
                        "map": "TEL"
                    },
                    {
                        "identity": "servd",
                        "map": "ContactPoint"
                    },
                    {
                        "identity": "v2",
                        "map": "NK1-5, NK1-6, NK1-40"
                    },
                    {
                        "identity": "rim",
                        "map": "telecom"
                    },
                    {
                        "identity": "cda",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.contact.address",
                "path": "Patient.contact.address",
                "short": "Address for the contact person",
                "definition": "Address for the contact person.",
                "comment": "Note: address is for postal addresses, not physical locations.",
                "requirements": "Need to keep track where the contact person can be contacted per postal mail or visited.",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Patient.contact.address",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "Address"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "XAD"
                    },
                    {
                        "identity": "rim",
                        "map": "AD"
                    },
                    {
                        "identity": "servd",
                        "map": "Address"
                    },
                    {
                        "identity": "v2",
                        "map": "NK1-4"
                    },
                    {
                        "identity": "rim",
                        "map": "addr"
                    },
                    {
                        "identity": "cda",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.contact.gender",
                "path": "Patient.contact.gender",
                "short": "male | female | other | unknown",
                "definition": "Administrative Gender - the gender that the contact person is considered to have for administration and record keeping purposes.",
                "comment": "Note that FHIR strings may not exceed 1MB in size",
                "requirements": "Needed to address the person correctly.",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Patient.contact.gender",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "code"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "binding": {
                    "extension":  [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                            "valueString": "AdministrativeGender"
                        },
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                            "valueBoolean": true
                        }
                    ],
                    "strength": "required",
                    "description": "The gender of a person used for administrative purposes.",
                    "valueSetReference": {
                        "reference": "http://hl7.org/fhir/ValueSet/administrative-gender"
                    }
                },
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "NK1-15"
                    },
                    {
                        "identity": "rim",
                        "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/administrativeGender"
                    },
                    {
                        "identity": "cda",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.contact.organization",
                "path": "Patient.contact.organization",
                "short": "Organization that is associated with the contact",
                "definition": "Organization on behalf of which the contact is acting or for which the contact is working.",
                "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.",
                "requirements": "For guardians or business related contacts, the organization is relevant.",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Patient.contact.organization",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "Reference",
                        "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
                    }
                ],
                "condition":  [
                    "ele-1",
                    "pat-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "ref-1",
                        "severity": "error",
                        "human": "SHALL have a contained resource if a local reference is provided",
                        "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))",
                        "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)"
                    },
                    {
                        "identity": "v2",
                        "map": "NK1-13, NK1-30, NK1-31, NK1-32, NK1-41"
                    },
                    {
                        "identity": "rim",
                        "map": "scoper"
                    },
                    {
                        "identity": "cda",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.contact.period",
                "path": "Patient.contact.period",
                "short": "The period during which this contact person or organization is valid to be contacted relating to this patient",
                "definition": "The period during which this contact person or organization is valid to be contacted relating to this patient.",
                "comment": "This is not a duration - that's a measure of time (a separate type), but a duration that occurs at a fixed value of time. A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. \"the patient was an inpatient of the hospital for this time range\") or one value from the range applies (e.g. \"give to the patient between these two times\"). If duration is required, specify the type as Interval|Duration.",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Patient.contact.period",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "Period"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "per-1",
                        "severity": "error",
                        "human": "If present, start SHALL have a lower value than end",
                        "expression": "start.empty() or end.empty() or (start <= end)",
                        "xpath": "not(exists(f:start)) or not(exists(f:end)) or (f:start/@value <= f:end/@value)"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "DR"
                    },
                    {
                        "identity": "rim",
                        "map": "IVL<TS>[lowClosed=\"true\" and highClosed=\"true\"] or URG<TS>[lowClosed=\"true\" and highClosed=\"true\"]"
                    },
                    {
                        "identity": "rim",
                        "map": "effectiveTime"
                    },
                    {
                        "identity": "cda",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.animal",
                "extension":  [
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
                        "valueString": "Animal"
                    }
                ],
                "path": "Patient.animal",
                "short": "This patient is known to be an animal (non-human)",
                "definition": "This patient is known to be an animal.",
                "comment": "The animal element is labeled \"Is Modifier\" since patients may be non-human. Systems SHALL either handle patient details appropriately (e.g. inform users patient is not human) or reject declared animal records.   The absense of the animal element does not imply that the patient is a human. If a system requires such a positive assertion that the patient is human, an extension will be required.  (Do not use a species of homo-sapiens in animal species, as this would incorrectly infer that the patient is an animal).",
                "requirements": "Many clinical systems are extended to care for animal patients as well as human.",
                "min": 0,
                "max": "0",
                "base": {
                    "path": "Patient.animal",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "BackboneElement"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isModifier": true,
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "player[classCode=ANM]"
                    },
                    {
                        "identity": "cda",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.animal.id",
                "path": "Patient.animal.id",
                "representation":  [
                    "xmlAttr"
                ],
                "short": "xml:id (or equivalent in JSON)",
                "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                "comment": "Note that FHIR strings may not exceed 1MB in size",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Element.id",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "string"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.animal.extension",
                "path": "Patient.animal.extension",
                "slicing": {
                    "discriminator":  [
                        {
                            "type": "value",
                            "path": "url"
                        }
                    ],
                    "description": "Extensions are always sliced by (at least) url",
                    "rules": "open"
                },
                "short": "Additional Content defined by implementations",
                "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                "comment": "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":  [
                    "extensions",
                    "user content"
                ],
                "min": 0,
                "max": "*",
                "base": {
                    "path": "Element.extension",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Extension"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "ext-1",
                        "severity": "error",
                        "human": "Must have either extensions or value[x], not both",
                        "expression": "extension.exists() != value.exists()",
                        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "N/A"
                    }
                ]
            },
            {
                "id": "Patient.animal.modifierExtension",
                "path": "Patient.animal.modifierExtension",
                "short": "Extensions that cannot be ignored",
                "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
                "comment": "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":  [
                    "extensions",
                    "user content",
                    "modifiers"
                ],
                "min": 0,
                "max": "*",
                "base": {
                    "path": "BackboneElement.modifierExtension",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Extension"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "ext-1",
                        "severity": "error",
                        "human": "Must have either extensions or value[x], not both",
                        "expression": "extension.exists() != value.exists()",
                        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"
                    }
                ],
                "isModifier": true,
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "N/A"
                    }
                ]
            },
            {
                "id": "Patient.animal.species",
                "path": "Patient.animal.species",
                "short": "E.g. Dog, Cow",
                "definition": "Identifies the high level taxonomic categorization of the kind of animal.",
                "comment": "If the patient is non-human, at least a species SHALL be specified. Species SHALL be a widely recognised taxonomic classification.  It may or may not be Linnaean taxonomy and may or may not be at the level of species. If the level is finer than species--such as a breed code--the code system used SHALL allow inference of the species.  (The common example is that the word \"Hereford\" does not allow inference of the species Bos taurus, because there is a Hereford pig breed, but the SNOMED CT code for \"Hereford Cattle Breed\" does.).",
                "requirements": "Need to know what kind of animal.",
                "min": 1,
                "max": "1",
                "base": {
                    "path": "Patient.animal.species",
                    "min": 1,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "CodeableConcept"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isSummary": true,
                "binding": {
                    "extension":  [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                            "valueString": "AnimalSpecies"
                        }
                    ],
                    "strength": "example",
                    "description": "The species of an animal.",
                    "valueSetReference": {
                        "reference": "http://hl7.org/fhir/ValueSet/animal-species"
                    }
                },
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "CE/CNE/CWE"
                    },
                    {
                        "identity": "rim",
                        "map": "CD"
                    },
                    {
                        "identity": "orim",
                        "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD"
                    },
                    {
                        "identity": "v2",
                        "map": "PID-35"
                    },
                    {
                        "identity": "rim",
                        "map": "code"
                    },
                    {
                        "identity": "cda",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.animal.breed",
                "path": "Patient.animal.breed",
                "short": "E.g. Poodle, Angus",
                "definition": "Identifies the detailed categorization of the kind of animal.",
                "comment": "Breed MAY be used to provide further taxonomic or non-taxonomic classification.  It may involve local or proprietary designation--such as commercial strain--and/or additional information such as production type.",
                "requirements": "May need to know the specific kind within the species.",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Patient.animal.breed",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "CodeableConcept"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isSummary": true,
                "binding": {
                    "extension":  [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                            "valueString": "AnimalBreed"
                        }
                    ],
                    "strength": "example",
                    "description": "The breed of an animal.",
                    "valueSetReference": {
                        "reference": "http://hl7.org/fhir/ValueSet/animal-breeds"
                    }
                },
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "CE/CNE/CWE"
                    },
                    {
                        "identity": "rim",
                        "map": "CD"
                    },
                    {
                        "identity": "orim",
                        "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD"
                    },
                    {
                        "identity": "v2",
                        "map": "PID-37"
                    },
                    {
                        "identity": "rim",
                        "map": "playedRole[classCode=GEN]/scoper[classCode=ANM, determinerCode=KIND]/code"
                    },
                    {
                        "identity": "cda",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.animal.genderStatus",
                "path": "Patient.animal.genderStatus",
                "short": "E.g. Neutered, Intact",
                "definition": "Indicates the current state of the animal's reproductive organs.",
                "comment": "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.",
                "requirements": "Gender status can affect housing and animal behavior.",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Patient.animal.genderStatus",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "CodeableConcept"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isSummary": true,
                "binding": {
                    "extension":  [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                            "valueString": "AnimalGenderStatus"
                        }
                    ],
                    "strength": "example",
                    "description": "The state of the animal's reproductive organs.",
                    "valueSetReference": {
                        "reference": "http://hl7.org/fhir/ValueSet/animal-genderstatus"
                    }
                },
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "CE/CNE/CWE"
                    },
                    {
                        "identity": "rim",
                        "map": "CD"
                    },
                    {
                        "identity": "orim",
                        "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD"
                    },
                    {
                        "identity": "v2",
                        "map": "N/A"
                    },
                    {
                        "identity": "rim",
                        "map": "genderStatusCode"
                    },
                    {
                        "identity": "cda",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.communication",
                "path": "Patient.communication",
                "short": "A list of Languages which may be used to communicate with the patient about his or her health",
                "definition": "Languages which may be used to communicate with the patient about his or her health.",
                "comment": "If no language is specified, this *implies* that the default local language is spoken.  If you need to convey proficiency for multiple modes then you need multiple Patient.Communication associations.   For animals, language is not a relevant field, and should be absent from the instance. If the Patient does not speak the default local language, then the Interpreter Required Standard can be used to explicitly declare that an interpreter is required.",
                "requirements": "If a patient does not speak the local language, interpreters may be required, so languages spoken and proficiency is an important things to keep track of both for patient and other persons of interest.",
                "min": 0,
                "max": "0",
                "base": {
                    "path": "Patient.communication",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "BackboneElement"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "LanguageCommunication"
                    },
                    {
                        "identity": "cda",
                        "map": "patient.languageCommunication"
                    }
                ]
            },
            {
                "id": "Patient.communication.id",
                "path": "Patient.communication.id",
                "representation":  [
                    "xmlAttr"
                ],
                "short": "xml:id (or equivalent in JSON)",
                "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                "comment": "Note that FHIR strings may not exceed 1MB in size",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Element.id",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "string"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.communication.extension",
                "path": "Patient.communication.extension",
                "slicing": {
                    "discriminator":  [
                        {
                            "type": "value",
                            "path": "url"
                        }
                    ],
                    "description": "Extensions are always sliced by (at least) url",
                    "rules": "open"
                },
                "short": "Additional Content defined by implementations",
                "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                "comment": "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":  [
                    "extensions",
                    "user content"
                ],
                "min": 0,
                "max": "*",
                "base": {
                    "path": "Element.extension",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Extension"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "ext-1",
                        "severity": "error",
                        "human": "Must have either extensions or value[x], not both",
                        "expression": "extension.exists() != value.exists()",
                        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "N/A"
                    }
                ]
            },
            {
                "id": "Patient.communication.modifierExtension",
                "path": "Patient.communication.modifierExtension",
                "short": "Extensions that cannot be ignored",
                "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
                "comment": "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":  [
                    "extensions",
                    "user content",
                    "modifiers"
                ],
                "min": 0,
                "max": "*",
                "base": {
                    "path": "BackboneElement.modifierExtension",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Extension"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "ext-1",
                        "severity": "error",
                        "human": "Must have either extensions or value[x], not both",
                        "expression": "extension.exists() != value.exists()",
                        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"
                    }
                ],
                "isModifier": true,
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "N/A"
                    }
                ]
            },
            {
                "id": "Patient.communication.language",
                "path": "Patient.communication.language",
                "short": "The language which can be used to communicate with the patient about his or her health",
                "definition": "The ISO-639-1 alpha 2 code in lower case for the language, optionally followed by a hyphen and the ISO-3166-1 alpha 2 code for the region in upper case; e.g. \"en\" for English, or \"en-US\" for American English versus \"en-EN\" for England English.",
                "comment": "The structure aa-BB with this exact casing is one the most widely used notations for locale. However not all systems actually code this but instead have it as free text. Hence CodeableConcept instead of code as the data type.",
                "requirements": "Most systems in multilingual countries will want to convey language. Not all systems actually need the regional dialect.",
                "min": 1,
                "max": "1",
                "base": {
                    "path": "Patient.communication.language",
                    "min": 1,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "CodeableConcept"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "binding": {
                    "extension":  [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                            "valueReference": {
                                "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                            }
                        },
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                            "valueString": "Language"
                        },
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                            "valueBoolean": true
                        }
                    ],
                    "strength": "extensible",
                    "description": "A human language.",
                    "valueSetReference": {
                        "reference": "http://hl7.org/fhir/ValueSet/languages"
                    }
                },
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "CE/CNE/CWE"
                    },
                    {
                        "identity": "rim",
                        "map": "CD"
                    },
                    {
                        "identity": "orim",
                        "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD"
                    },
                    {
                        "identity": "v2",
                        "map": "PID-15, LAN-2"
                    },
                    {
                        "identity": "rim",
                        "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/languageCommunication/code"
                    },
                    {
                        "identity": "cda",
                        "map": ".languageCode"
                    }
                ]
            },
            {
                "id": "Patient.communication.preferred",
                "path": "Patient.communication.preferred",
                "short": "Language preference indicator",
                "definition": "Indicates whether or not the patient prefers this language (over other languages he masters up a certain level).",
                "comment": "This language is specifically identified for communicating healthcare information.",
                "requirements": "People that master multiple languages up to certain level may prefer one or more, i.e. feel more confident in communicating in a particular language making other languages sort of a fall back method.",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Patient.communication.preferred",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "boolean"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "PID-15"
                    },
                    {
                        "identity": "rim",
                        "map": "preferenceInd"
                    },
                    {
                        "identity": "cda",
                        "map": ".preferenceInd"
                    }
                ]
            },
            {
                "id": "Patient.generalPractitioner",
                "path": "Patient.generalPractitioner",
                "short": "Patient's nominated primary care provider",
                "definition": "Patient's nominated care provider.",
                "comment": "This may be the primary care provider (in a GP context), or it may be a patient nominated care manager in a community/disablity setting, or even organization that will provide people to perform the care provider roles.\n\nIt is not to be used to record Care Teams, these should be in a CareTeam resource that may be linked to the CarePlan or EpisodeOfCare resources.",
                "alias":  [
                    "careProvider"
                ],
                "min": 0,
                "max": "0",
                "base": {
                    "path": "Patient.generalPractitioner",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Reference",
                        "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
                    },
                    {
                        "code": "Reference",
                        "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "ref-1",
                        "severity": "error",
                        "human": "SHALL have a contained resource if a local reference is provided",
                        "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))",
                        "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)"
                    },
                    {
                        "identity": "v2",
                        "map": "PD1-4"
                    },
                    {
                        "identity": "rim",
                        "map": "subjectOf.CareEvent.performer.AssignedEntity"
                    },
                    {
                        "identity": "cda",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.managingOrganization",
                "path": "Patient.managingOrganization",
                "short": "Organization that is the custodian of the patient record",
                "definition": "Organization that is the custodian of the patient record.",
                "comment": "There is only one managing organization for a specific patient record. Other organizations will have their own Patient record, and may use the Link property to join the records together (or a Person resource which can include confidence ratings for the association).",
                "requirements": "Need to know who recognizes this patient record, manages and updates it.",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Patient.managingOrganization",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "Reference",
                        "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "ref-1",
                        "severity": "error",
                        "human": "SHALL have a contained resource if a local reference is provided",
                        "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))",
                        "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)"
                    },
                    {
                        "identity": "rim",
                        "map": "scoper"
                    },
                    {
                        "identity": "cda",
                        "map": ".providerOrganization"
                    }
                ]
            },
            {
                "id": "Patient.link",
                "path": "Patient.link",
                "short": "Link to another patient resource that concerns the same actual person",
                "definition": "Link to another patient resource that concerns the same actual patient.",
                "comment": "There is no assumption that linked patient records have mutual links. \n\nThis element is labelled as a modifier because it may not be the main Patient resource, and the referenced patient should be used instead of this Patient record. This is when the link.type value is 'replaced-by'.",
                "requirements": "There are multiple usecases: \n\n* Duplicate patient records due to the clerical errors associated with the difficulties of identifying humans consistently, and * Distribution of patient information across multiple servers.",
                "min": 0,
                "max": "0",
                "base": {
                    "path": "Patient.link",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "BackboneElement"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isModifier": true,
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "outboundLink"
                    },
                    {
                        "identity": "cda",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.link.id",
                "path": "Patient.link.id",
                "representation":  [
                    "xmlAttr"
                ],
                "short": "xml:id (or equivalent in JSON)",
                "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
                "comment": "Note that FHIR strings may not exceed 1MB in size",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Element.id",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "string"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.link.extension",
                "path": "Patient.link.extension",
                "slicing": {
                    "discriminator":  [
                        {
                            "type": "value",
                            "path": "url"
                        }
                    ],
                    "description": "Extensions are always sliced by (at least) url",
                    "rules": "open"
                },
                "short": "Additional Content defined by implementations",
                "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                "comment": "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":  [
                    "extensions",
                    "user content"
                ],
                "min": 0,
                "max": "*",
                "base": {
                    "path": "Element.extension",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Extension"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "ext-1",
                        "severity": "error",
                        "human": "Must have either extensions or value[x], not both",
                        "expression": "extension.exists() != value.exists()",
                        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "N/A"
                    }
                ]
            },
            {
                "id": "Patient.link.modifierExtension",
                "path": "Patient.link.modifierExtension",
                "short": "Extensions that cannot be ignored",
                "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
                "comment": "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":  [
                    "extensions",
                    "user content",
                    "modifiers"
                ],
                "min": 0,
                "max": "*",
                "base": {
                    "path": "BackboneElement.modifierExtension",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Extension"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "ext-1",
                        "severity": "error",
                        "human": "Must have either extensions or value[x], not both",
                        "expression": "extension.exists() != value.exists()",
                        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"
                    }
                ],
                "isModifier": true,
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "N/A"
                    }
                ]
            },
            {
                "id": "Patient.link.other",
                "path": "Patient.link.other",
                "short": "The other patient or related person resource that the link refers to",
                "definition": "The other patient resource that the link refers to.",
                "comment": "Referencing a RelatedPerson here removes the need to use a Person record to associate a Patient and RelatedPerson as the same individual.",
                "min": 1,
                "max": "1",
                "base": {
                    "path": "Patient.link.other",
                    "min": 1,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "Reference",
                        "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
                    },
                    {
                        "code": "Reference",
                        "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    },
                    {
                        "key": "ref-1",
                        "severity": "error",
                        "human": "SHALL have a contained resource if a local reference is provided",
                        "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))",
                        "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)"
                    },
                    {
                        "identity": "v2",
                        "map": "PID-3, MRG-1"
                    },
                    {
                        "identity": "rim",
                        "map": "id"
                    },
                    {
                        "identity": "cda",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "Patient.link.type",
                "path": "Patient.link.type",
                "short": "replaced-by | replaces | refer | seealso - type of link",
                "definition": "The type of link between this patient resource and another patient resource.",
                "comment": "Note that FHIR strings may not exceed 1MB in size",
                "min": 1,
                "max": "1",
                "base": {
                    "path": "Patient.link.type",
                    "min": 1,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "code"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() | (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div"
                    }
                ],
                "isSummary": true,
                "binding": {
                    "extension":  [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                            "valueString": "LinkType"
                        }
                    ],
                    "strength": "required",
                    "description": "The type of link between this patient resource and another patient resource.",
                    "valueSetReference": {
                        "reference": "http://hl7.org/fhir/ValueSet/link-type"
                    }
                },
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "typeCode"
                    },
                    {
                        "identity": "cda",
                        "map": "n/a"
                    }
                ]
            }
        ]
    },
    "differential": {
        "element":  [
            {
                "id": "Patient.identifier",
                "path": "Patient.identifier",
                "min": 1,
                "max": "1"
            },
            {
                "id": "Patient.identifier.type",
                "path": "Patient.identifier.type",
                "max": "0"
            },
            {
                "id": "Patient.identifier.system",
                "path": "Patient.identifier.system",
                "min": 1
            },
            {
                "id": "Patient.identifier.value",
                "path": "Patient.identifier.value",
                "min": 1
            },
            {
                "id": "Patient.identifier.period",
                "path": "Patient.identifier.period",
                "max": "0"
            },
            {
                "id": "Patient.identifier.assigner",
                "path": "Patient.identifier.assigner",
                "max": "0"
            },
            {
                "id": "Patient.name",
                "path": "Patient.name",
                "min": 1
            },
            {
                "id": "Patient.name.text",
                "path": "Patient.name.text",
                "max": "0"
            },
            {
                "id": "Patient.name.family",
                "path": "Patient.name.family",
                "min": 1,
                "maxLength": 100,
                "constraint":  [
                    {
                        "key": "pat-regx-1",
                        "severity": "error",
                        "human": "Patient family name should match the following regular expression: matches(\"^[a-z-A-Z0-9\\\\s\\\\.\\\\-\\\\'à-üА-яÆÐƎƏƐƔIJŊŒẞÞǷȜæðǝəɛɣijŋœĸſßþƿȝĄƁÇĐƊĘĦĮƘŁØƠŞȘŢȚŦŲƯY̨ƳąɓçđɗęħįƙłøơşșţțŧųưyƴÁÀÂÄǍĂĀÃÅǺǼǢĆĊĈČĎḌÉÈĖÊËĚĔĒẸĠĜǦĞĢáàâäǎăāãåǻǽǣćċĉčďḍéèėêëěĕēẹġĝǧğģĤḤIÍÌİÎÏǏĬĪĨỊĴĶĹĻĽĿʼNŃ̈ŇÑŅÔÖǑŎŌÕŐỌǾĥḥıíìiîïǐĭīĩịĵķĺļľŀʼnńnňñņóòôöǒŏōõőọǿŔŘŖŚŜŠṢŤṬÛÜǓŬŪŨŰŮỤẂẀŴẄÝỲŶŸȲỸŹŻŽẒŕřŗśŝšṣťṭúùûüǔŭūũűůụẃẁŵẅýỳŷÿȳỹźżžẓЁёÓÚÙÒ]*$\")",
                        "expression": "matches(\"^[a-z-A-Z0-9\\\\s\\\\.\\\\-\\\\'à-üА-яÆÐƎƏƐƔIJŊŒẞÞǷȜæðǝəɛɣijŋœĸſßþƿȝĄƁÇĐƊĘĦĮƘŁØƠŞȘŢȚŦŲƯY̨ƳąɓçđɗęħįƙłøơşșţțŧųưyƴÁÀÂÄǍĂĀÃÅǺǼǢĆĊĈČĎḌÉÈĖÊËĚĔĒẸĠĜǦĞĢáàâäǎăāãåǻǽǣćċĉčďḍéèėêëěĕēẹġĝǧğģĤḤIÍÌİÎÏǏĬĪĨỊĴĶĹĻĽĿʼNŃ̈ŇÑŅÔÖǑŎŌÕŐỌǾĥḥıíìiîïǐĭīĩịĵķĺļľŀʼnńnňñņóòôöǒŏōõőọǿŔŘŖŚŜŠṢŤṬÛÜǓŬŪŨŰŮỤẂẀŴẄÝỲŶŸȲỸŹŻŽẒŕřŗśŝšṣťṭúùûüǔŭūũűůụẃẁŵẅýỳŷÿȳỹźżžẓЁёÓÚÙÒ]*$\")"
                    }
                ]
            },
            {
                "id": "Patient.name.given",
                "path": "Patient.name.given",
                "min": 1,
                "maxLength": 100,
                "constraint":  [
                    {
                        "key": "pat-regx-2",
                        "severity": "error",
                        "human": "Patient given name should match the following regular expression: matches(\"^[a-z-A-Z0-9\\\\s\\\\.\\\\-\\\\'à-üА-яÆÐƎƏƐƔIJŊŒẞÞǷȜæðǝəɛɣijŋœĸſßþƿȝĄƁÇĐƊĘĦĮƘŁØƠŞȘŢȚŦŲƯY̨ƳąɓçđɗęħįƙłøơşșţțŧųưyƴÁÀÂÄǍĂĀÃÅǺǼǢĆĊĈČĎḌÉÈĖÊËĚĔĒẸĠĜǦĞĢáàâäǎăāãåǻǽǣćċĉčďḍéèėêëěĕēẹġĝǧğģĤḤIÍÌİÎÏǏĬĪĨỊĴĶĹĻĽĿʼNŃ̈ŇÑŅÔÖǑŎŌÕŐỌǾĥḥıíìiîïǐĭīĩịĵķĺļľŀʼnńnňñņóòôöǒŏōõőọǿŔŘŖŚŜŠṢŤṬÛÜǓŬŪŨŰŮỤẂẀŴẄÝỲŶŸȲỸŹŻŽẒŕřŗśŝšṣťṭúùûüǔŭūũűůụẃẁŵẅýỳŷÿȳỹźżžẓЁёÓÚÙÒ]*$\")",
                        "expression": "matches(\"^[a-z-A-Z0-9\\\\s\\\\.\\\\-\\\\'à-üА-яÆÐƎƏƐƔIJŊŒẞÞǷȜæðǝəɛɣijŋœĸſßþƿȝĄƁÇĐƊĘĦĮƘŁØƠŞȘŢȚŦŲƯY̨ƳąɓçđɗęħįƙłøơşșţțŧųưyƴÁÀÂÄǍĂĀÃÅǺǼǢĆĊĈČĎḌÉÈĖÊËĚĔĒẸĠĜǦĞĢáàâäǎăāãåǻǽǣćċĉčďḍéèėêëěĕēẹġĝǧğģĤḤIÍÌİÎÏǏĬĪĨỊĴĶĹĻĽĿʼNŃ̈ŇÑŅÔÖǑŎŌÕŐỌǾĥḥıíìiîïǐĭīĩịĵķĺļľŀʼnńnňñņóòôöǒŏōõőọǿŔŘŖŚŜŠṢŤṬÛÜǓŬŪŨŰŮỤẂẀŴẄÝỲŶŸȲỸŹŻŽẒŕřŗśŝšṣťṭúùûüǔŭūũűůụẃẁŵẅýỳŷÿȳỹźżžẓЁёÓÚÙÒ]*$\")"
                    }
                ]
            },
            {
                "id": "Patient.name.prefix",
                "path": "Patient.name.prefix",
                "max": "0"
            },
            {
                "id": "Patient.name.suffix",
                "path": "Patient.name.suffix",
                "max": "0"
            },
            {
                "id": "Patient.name.period",
                "path": "Patient.name.period",
                "max": "0"
            },
            {
                "id": "Patient.telecom.rank",
                "path": "Patient.telecom.rank",
                "max": "0"
            },
            {
                "id": "Patient.telecom.period",
                "path": "Patient.telecom.period",
                "max": "0"
            },
            {
                "id": "Patient.deceased[x]",
                "path": "Patient.deceased[x]",
                "max": "0"
            },
            {
                "id": "Patient.address",
                "path": "Patient.address",
                "max": "0"
            },
            {
                "id": "Patient.maritalStatus",
                "path": "Patient.maritalStatus",
                "max": "0"
            },
            {
                "id": "Patient.multipleBirth[x]",
                "path": "Patient.multipleBirth[x]",
                "max": "0"
            },
            {
                "id": "Patient.photo",
                "path": "Patient.photo",
                "max": "0"
            },
            {
                "id": "Patient.contact",
                "path": "Patient.contact",
                "max": "0"
            },
            {
                "id": "Patient.animal",
                "path": "Patient.animal",
                "max": "0"
            },
            {
                "id": "Patient.communication",
                "path": "Patient.communication",
                "max": "0"
            },
            {
                "id": "Patient.generalPractitioner",
                "path": "Patient.generalPractitioner",
                "max": "0"
            },
            {
                "id": "Patient.link",
                "path": "Patient.link",
                "max": "0"
            }
        ]
    }
}

Example

Below is an example JSON for Patient example with Type-1 diabetes condition

{
    "resourceType": "Bundle",
    "id": "99b4cdb5-1f5d-4cff-8199-84e7b56ee679",
    "type": "message",
    "entry":  [
        {
            "resource": {
                "resourceType": "MessageHeader",
                "id": "88a37162-3d7c-41c3-89ab-6e25fd68ba00",
                "event": {
                    "code": "new-bundle",
                    "system": "http://roche.com/fhir/rdc/message-type",
                    "display": "New bundle generated"
                },
                "source": {
                    "endpoint": "<Organization OID>",
                    "software": "EMR middleware",
                    "version": "1.0.0"
                },
                "timestamp": "2020-03-27T12:21:39.471Z",
                "meta": {
                    "profile":  [
                        "http://roche.com/fhir/rdc/StructureDefinition/message-header"
                    ]
                }
            }
        },
        {
            "resource": {
                "id": "abdca832-a616-454b-b5c7-f1ed1fb45d4e",
                "resourceType": "Patient",
                "meta": {
                    "profile":  [
                        "http://roche.com/fhir/rdc/StructureDefinition/patient-v2"
                    ]
                },
                "identifier":  [
                    {
                        "system": "urn:oid:1.3.6.1.4.1.56221.1.3.2.3",
                        "value": "AAAA1234567890"
                    }
                ],
                "active": "true",
                "name":  [
                    {
                        "family": "Pérez Fuster",
                        "given":  [
                            "Manolo"
                        ]
                    }
                ],
                "telecom":  [
                    {
                        "system": "phone",
                        "use": "home",
                        "value": "123456789"
                    }
                ],
                "gender": "male",
                "birthDate": "1975-06-16",
                "managingOrganization": {
                    "identifier": {
                        "system": "urn:oid:1.3.6.1.4.1.56221.1.1",
                        "value": "2.16.724.4.2"
                    }
                }
            }
        },
        {
            "resource": {
                "resourceType": "Condition",
                "id": "abdca832-a616-454b-b5c7-f1ed1fb4ght",
                "meta": {
                    "profile":  [
                        "http://roche.com/fhir/rdc/StructureDefinition/condition"
                    ]
                },
                "clinicalStatus": "active",
                "code": {
                    "coding":  [
                        {
                            "system": "http://snomed.info/sct",
                            "code": "46635009",
                            "display": "Diabetes mellitus type 1 (disorder)"
                        }
                    ]
                },
                "subject": {
                    "reference": "Patient/abdca832-a616-454b-b5c7-f1ed1fb45d4e"
                }
            }
        }
    ]
}