FHIR CI-Build

This is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions

Conceptmap.shex

Responsible Owner: Terminology Infrastructure Work GroupStandards Status: InformativeCompartments: No defined compartments

Raw ShEx

ShEx statement for conceptmap

PREFIX fhir: <http://hl7.org/fhir/> 
PREFIX fhirvs: <http://hl7.org/fhir/ValueSet/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> 
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 

# ShEx Version 2.2
IMPORT <Uri.shex>
IMPORT <Code.shex>
IMPORT <Date.shex>
IMPORT <String.shex>
IMPORT <Coding.shex>
IMPORT <Period.shex>
IMPORT <Boolean.shex>
IMPORT <Integer.shex>
IMPORT <Decimal.shex>
IMPORT <DateTime.shex>
IMPORT <Markdown.shex>
IMPORT <ValueSet.shex>
IMPORT <Quantity.shex>
IMPORT <Canonical.shex>
IMPORT <Identifier.shex>
IMPORT <UsageContext.shex>
IMPORT <ContactDetail.shex>
IMPORT <DomainResource.shex>
IMPORT <CodeableConcept.shex>
IMPORT <RelatedArtifact.shex>
IMPORT <BackboneElement.shex>

start=@<ConceptMap> AND {fhir:nodeRole [fhir:treeRoot]}

# A map from one set of concepts to one or more other concepts
<ConceptMap> EXTENDS @<DomainResource> CLOSED {   
    a [fhir:ConceptMap]?;fhir:nodeRole [fhir:treeRoot]?;

    fhir:url @<Uri>?;                       # Canonical identifier for this 
                                            # concept map, represented as a URI 
                                            # (globally unique) 
    fhir:identifier @<OneOrMore_Identifier>?;  # Additional identifier for the 
                                            # concept map 
    fhir:version @<String>?;                # Business version of the concept map
    fhir:versionAlgorithm @<String>  OR 
    			@<Coding>  ?;  # How to compare versions
    fhir:name @<String>?;                   # Name for this concept map 
                                            # (computer friendly) 
    fhir:title @<String>?;                  # Name for this concept map (human 
                                            # friendly) 
    fhir:status @<Code> AND
    	{fhir:v @fhirvs:publication-status};  # draft | active | retired | unknown
    fhir:experimental @<Boolean>?;          # For testing only - never for real 
                                            # usage 
    fhir:date @<DateTime>?;                 # Date last changed
    fhir:publisher @<String>?;              # Name of the publisher/steward 
                                            # (organization or individual) 
    fhir:contact @<OneOrMore_ContactDetail>?;  # Contact details for the publisher
    fhir:description @<Markdown>?;          # Natural language description of 
                                            # the concept map 
    fhir:useContext @<OneOrMore_UsageContext>?;  # The context that the content is 
                                            # intended to support 
    fhir:jurisdiction @<OneOrMore_CodeableConcept>?;  # Jurisdiction of the authority that 
                                            # maintains the concept map (if 
                                            # applicable) 
    fhir:purpose @<Markdown>?;              # Why this concept map is defined
    fhir:copyright @<Markdown>?;            # Notice about intellectual property 
                                            # ownership, can include 
                                            # restrictions on use 
    fhir:copyrightLabel @<String>?;         # Copyright holder and year(s)
    fhir:approvalDate @<Date>?;             # When the ConceptMap was approved 
                                            # by publisher 
    fhir:lastReviewDate @<Date>?;           # When the ConceptMap was last 
                                            # reviewed by the publisher 
    fhir:effectivePeriod @<Period>?;        # When the ConceptMap is expected to 
                                            # be used 
    fhir:topic @<OneOrMore_CodeableConcept>?;  # E.g. Education, Treatment, 
                                            # Assessment, etc 
    fhir:author @<OneOrMore_ContactDetail>?;  # Who authored the ConceptMap
    fhir:editor @<OneOrMore_ContactDetail>?;  # Who edited the ConceptMap
    fhir:reviewer @<OneOrMore_ContactDetail>?;  # Who reviewed the ConceptMap
    fhir:endorser @<OneOrMore_ContactDetail>?;  # Who endorsed the ConceptMap
    fhir:relatedArtifact @<OneOrMore_RelatedArtifact>?;  # Additional documentation, 
                                            # citations, etc 
    fhir:property @<OneOrMore_ConceptMap.property>?;  # Additional properties of the 
                                            # mapping 
    fhir:additionalAttribute @<OneOrMore_ConceptMap.additionalAttribute>?;  # Definition of an additional 
                                            # attribute to act as a data source 
                                            # or target 
    fhir:sourceScope @<Uri>  OR 
    			(@<Canonical>  AND {fhir:l @<ValueSet> })  ?;  # The source value set that contains 
                                            # the concepts that are being mapped 
    fhir:targetScope @<Uri>  OR 
    			(@<Canonical>  AND {fhir:l @<ValueSet> })  ?;  # The target value set which 
                                            # provides context for the mappings 
    fhir:group @<OneOrMore_ConceptMap.group>?;  # Same source and target systems
}  

# Concept in target system for element
<ConceptMap.group.element.target> EXTENDS @<BackboneElement> CLOSED {   
    fhir:code @<Code>?;                     # Code that identifies the target 
                                            # element 
    fhir:display @<String>?;                # Display for the code
    fhir:valueSet @<Canonical>?;            # Identifies the set of target 
                                            # concepts 
    fhir:relationship @<Code> AND
    	{fhir:v @fhirvs:concept-map-relationship};  # related-to | equivalent | 
                                            # source-is-narrower-than-target | 
                                            # source-is-broader-than-target | 
                                            # not-related-to 
    fhir:comment @<String>?;                # Comments related to the mapping to 
                                            # the target element 
    fhir:property @<OneOrMore_ConceptMap.group.element.target.property>?;  # Property value for the source -> 
                                            # target mapping 
    fhir:dependsOn @<OneOrMore_ConceptMap.group.element.target.dependsOn>?;  # Other properties required for this 
                                            # mapping 
    fhir:product @<OneOrMore_ConceptMap.group.element.target.dependsOn>?;  # Other data elements that this 
                                            # mapping also produces 
}  

# Property value for the source -> target mapping
<ConceptMap.group.element.target.property> EXTENDS @<BackboneElement> CLOSED {   
    fhir:code @<Code>;                      # Reference to 
                                            # ConceptMap.property.code 
    fhir:value @<Coding>  OR 
    			@<String>  OR 
    			@<Integer>  OR 
    			@<Boolean>  OR 
    			@<DateTime>  OR 
    			@<Decimal>  OR 
    			@<Code>  ;  # Value of the property for this 
                                            # concept 
}  

# Same source and target systems
<ConceptMap.group> EXTENDS @<BackboneElement> CLOSED {   
    fhir:source @<Canonical>?;              # Source system where concepts to be 
                                            # mapped are defined 
    fhir:target @<Canonical>?;              # Target system that the concepts 
                                            # are to be mapped to 
    fhir:element @<OneOrMore_ConceptMap.group.element>;  # Mappings for a concept from the 
                                            # source set 
    fhir:unmapped @<ConceptMap.group.unmapped>?;  # What to do when there is no 
                                            # mapping target for the source 
                                            # concept and 
                                            # ConceptMap.group.element.noMap is 
                                            # not true 
}  

# Mappings for a concept from the source set
<ConceptMap.group.element> EXTENDS @<BackboneElement> CLOSED {   
    fhir:code @<Code>?;                     # Identifies element being mapped
    fhir:display @<String>?;                # Display for the code
    fhir:valueSet @<Canonical>?;            # Identifies the set of concepts 
                                            # being mapped 
    fhir:noMap @<Boolean>?;                 # No mapping to a target concept for 
                                            # this source concept 
    fhir:comment @<String>?;                # Comments related to the mapping of 
                                            # the source element 
    fhir:target @<OneOrMore_ConceptMap.group.element.target>?;  # Concept in target system for 
                                            # element 
}  

# Additional properties of the mapping
<ConceptMap.property> EXTENDS @<BackboneElement> CLOSED {   
    fhir:code @<Code>;                      # Identifies the property on the 
                                            # mappings, and when referred to in 
                                            # the $translate operation 
    fhir:uri @<Uri>?;                       # Formal identifier for the property
    fhir:description @<String>?;            # Why the property is defined, 
                                            # and/or what it conveys 
    fhir:type @<Code> AND
    	{fhir:v @fhirvs:conceptmap-property-type};  # Coding | string | integer | 
                                            # boolean | dateTime | decimal | 
                                            # code 
    fhir:system @<Canonical>?;              # The CodeSystem from which code 
                                            # values come 
}  

# What to do when there is no mapping target for the source concept and ConceptMap.group.element.noMap is not true
<ConceptMap.group.unmapped> EXTENDS @<BackboneElement> CLOSED {   
    fhir:mode @<Code> AND
    	{fhir:v @fhirvs:conceptmap-unmapped-mode};  # use-source-code | fixed | other-map
    fhir:code @<Code>?;                     # Fixed code when mode = fixed
    fhir:display @<String>?;                # Display for the code
    fhir:comment @<String>?;                # Comments related to the choice of 
                                            # how to handle unmapped elements 
    fhir:valueSet @<Canonical>?;            # Fixed code set when mode = fixed
    fhir:relationship @<Code> AND
    	{fhir:v @fhirvs:concept-map-relationship}?;  # related-to | equivalent | 
                                            # source-is-narrower-than-target | 
                                            # source-is-broader-than-target | 
                                            # not-related-to 
    fhir:otherMap @<Canonical>?;            # canonical reference to an 
                                            # additional ConceptMap to use for 
                                            # mapping if the source concept is 
                                            # unmapped 
}  

# Definition of an additional attribute to act as a data source or target
<ConceptMap.additionalAttribute> EXTENDS @<BackboneElement> CLOSED {   
    fhir:code @<Code>;                      # Identifies this additional 
                                            # attribute through this resource 
    fhir:uri @<Uri>?;                       # Formal identifier for the data 
                                            # element referred to in this 
                                            # attribute 
    fhir:description @<String>?;            # Why the additional attribute is 
                                            # defined, and/or what the data 
                                            # element it refers to is 
    fhir:type @<Code> AND
    	{fhir:v @fhirvs:conceptmap-attribute-type};  # code | Coding | string | boolean | 
                                            # Quantity 
}  

# Other properties required for this mapping
<ConceptMap.group.element.target.dependsOn> EXTENDS @<BackboneElement> CLOSED {   
    fhir:attribute @<Code>;                 # A reference to a mapping attribute 
                                            # defined in 
                                            # ConceptMap.additionalAttribute 
    fhir:value @<Code>  OR 
    			@<Coding>  OR 
    			@<String>  OR 
    			@<Boolean>  OR 
    			@<Quantity>  ?;  # Value of the referenced data 
                                            # element 
    fhir:valueSet @<Canonical>?;            # The mapping depends on a data 
                                            # element with a value from this 
                                            # value set 
}  

#---------------------- Cardinality Types (OneOrMore) -------------------
<OneOrMore_Identifier> CLOSED {
    rdf:first @<Identifier>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Identifier> 
}
<OneOrMore_ContactDetail> CLOSED {
    rdf:first @<ContactDetail>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ContactDetail> 
}
<OneOrMore_UsageContext> CLOSED {
    rdf:first @<UsageContext>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_UsageContext> 
}
<OneOrMore_CodeableConcept> CLOSED {
    rdf:first @<CodeableConcept>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_CodeableConcept> 
}
<OneOrMore_RelatedArtifact> CLOSED {
    rdf:first @<RelatedArtifact>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_RelatedArtifact> 
}
<OneOrMore_ConceptMap.property> CLOSED {
    rdf:first @<ConceptMap.property>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ConceptMap.property> 
}
<OneOrMore_ConceptMap.additionalAttribute> CLOSED {
    rdf:first @<ConceptMap.additionalAttribute>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ConceptMap.additionalAttribute> 
}
<OneOrMore_ConceptMap.group> CLOSED {
    rdf:first @<ConceptMap.group>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ConceptMap.group> 
}
<OneOrMore_ConceptMap.group.element.target.property> CLOSED {
    rdf:first @<ConceptMap.group.element.target.property>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ConceptMap.group.element.target.property> 
}
<OneOrMore_ConceptMap.group.element.target.dependsOn> CLOSED {
    rdf:first @<ConceptMap.group.element.target.dependsOn>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ConceptMap.group.element.target.dependsOn> 
}
<OneOrMore_ConceptMap.group.element> CLOSED {
    rdf:first @<ConceptMap.group.element>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ConceptMap.group.element> 
}
<OneOrMore_ConceptMap.group.element.target> CLOSED {
    rdf:first @<ConceptMap.group.element.target>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ConceptMap.group.element.target> 
}

#---------------------- Value Sets ------------------------

# The relationship between concepts.
fhirvs:concept-map-relationship ["related-to" "equivalent" "source-is-narrower-than-target" "source-is-broader-than-target" "not-related-to"]

# The type of a ConceptMap mapping attribute value.
fhirvs:conceptmap-attribute-type ["code" "Coding" "string" "boolean" "Quantity"]

# The type of a ConceptMap mapping property value.
fhirvs:conceptmap-property-type ["Coding" "string" "integer" "boolean" "dateTime" "decimal" "code"]

# Defines which action to take if there is no match in the group.
fhirvs:conceptmap-unmapped-mode ["use-source-code" "fixed" "other-map"]

# The lifecycle status of an artifact.
fhirvs:publication-status ["draft" "active" "retired" "unknown"]


Usage note: every effort has been made to ensure that the ShEx files are correct and useful, but they are not a normative part of the specification.