<?xml version="1.0" encoding="UTF-8"?>
<!-- 
 * #%L
 * org.hl7.fhir.r5
 * %%
 * Copyright (C) 2014 - 2019 Health Level 7
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */

/*
  Copyright (c) 2011+, HL7, Inc.
  All rights reserved.
  
  Redistribution and use in source and binary forms, with or without modification, 
  are permitted provided that the following conditions are met:
  
   * Redistributions of source code must retain the above copyright notice, this 
     list of conditions and the following disclaimer.
   * Redistributions in binary form must reproduce the above copyright notice, 
     this list of conditions and the following disclaimer in the documentation 
     and/or other materials provided with the distribution.
   * Neither the name of HL7 nor the names of its contributors may be used to 
     endorse or promote products derived from this software without specific 
     prior written permission.
  
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
  POSSIBILITY OF SUCH DAMAGE.
  

  Generated on Sat, Jun 13, 2026 16:03+0000 for FHIR v6.0.0-ballot4 

  Note: the schemas &amp; schematrons do not contain all of the rules about what makes resources
  valid. Implementers will still need to be familiar with the content of the specification and with
  any profiles that apply to the resources in order to make a conformant implementation.

-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://hl7.org/fhir" xmlns:xhtml="http://www.w3.org/1999/xhtml" targetNamespace="http://hl7.org/fhir" elementFormDefault="qualified" version="1.0">
  <xs:include schemaLocation="fhir-base.xsd"/>
  <xs:element name="ConceptMap" type="ConceptMap">
    <xs:annotation>
      <xs:documentation xml:lang="en">A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="ConceptMap">
    <xs:annotation>
      <xs:documentation xml:lang="en">A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.</xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="MetadataResource">
        <xs:sequence>
          <xs:element name="url" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this concept map is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the concept map is stored on different servers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">A formal identifier that is used to identify this concept map when it is represented in other formats, or referenced in a specification, model, design or an instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the concept map author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Indicates the mechanism used to compare versions to determine which ConceptMap is more current.</xs:documentation>
            </xs:annotation>
            <xs:element name="versionAlgorithmString" type="string"/>
            <xs:element name="versionAlgorithmCoding" type="Coding"/>
          </xs:choice>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A natural language name identifying the concept map. This name should be usable as an identifier for the module by machine processing applications such as code generation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="title" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short, descriptive, user-friendly title for the concept map.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of this concept map. Enables tracking the life-cycle of the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A Boolean value to indicate that this concept map is authored for testing purposes (or education/evaluation/marketing) and no version of this resource will ever be intended for genuine usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date  (and optionally time) when the concept map was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the concept map changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the organization or individual responsible for the release and ongoing maintenance of the concept map.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details to assist a user in finding and communicating with the publisher.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A free text natural language description of the concept map from a consumer's perspective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="useContext" minOccurs="0" maxOccurs="unbounded" type="UsageContext">
            <xs:annotation>
              <xs:documentation xml:lang="en">The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate concept map instances.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A legal or geographic region in which the authority that maintains the resource is operating.  In general, the jurisdiction is also found in the useContext.  The useContext may reference additional jurisdictions because the defining jurisdiction does not necessarily limit the jurisdictions of use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explanation of why this concept map is needed and why it has been designed as it has.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyright" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">A copyright statement relating to the concept map and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the concept map.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copyrightLabel" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are restricted. (e.g. 'All rights reserved', 'Some rights reserved').</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="approvalDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="lastReviewDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="effectivePeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period during which the ConceptMap content was or is planned to be in active use.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="topic" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Descriptions related to the content of the ConceptMap. Topics provide a high-level categorization as well as keywords for the ConceptMap that can be useful for filtering and searching.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="author" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individiual or organization primarily involved in the creation and maintenance of the ConceptMap.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="editor" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization primarily responsible for internal coherence of the ConceptMap.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewer" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization asserted by the publisher to be primarily responsible for review of some aspect of the ConceptMap.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="endorser" minOccurs="0" maxOccurs="unbounded" type="ContactDetail">
            <xs:annotation>
              <xs:documentation xml:lang="en">An individual or organization asserted by the publisher to be responsible for officially endorsing the ConceptMap for use in some setting.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relatedArtifact" minOccurs="0" maxOccurs="unbounded" type="RelatedArtifact">
            <xs:annotation>
              <xs:documentation xml:lang="en">Related artifacts such as additional documentation, justification, dependencies, bibliographic references, and predecessor and successor artifacts. If the type is `successor` or `predecessor`, the related resource must be a ConceptMap.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="property" type="ConceptMap.Property" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A property defines a slot through which additional information can be provided about a map from source -&gt; target.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="additionalAttribute" type="ConceptMap.AdditionalAttribute" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">An additionalAttribute defines an additional data element found in the source or target data model where the data will come from or be mapped to. Some mappings are based on data in addition to the source data element, where codes in multiple fields are combined to a single field (or vice versa).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifier for the source value set that contains the concepts that are being mapped and provides context for the mappings.  Limits the scope of the map to source codes (ConceptMap.group.element code or valueSet) that are members of this value set.</xs:documentation>
            </xs:annotation>
            <xs:element name="sourceScopeUri" type="uri"/>
            <xs:element name="sourceScopeCanonical" type="canonical"/>
          </xs:choice>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifier for the target value set that provides important context about how the mapping choices are made.  Limits the scope of the map to target codes (ConceptMap.group.element.target code or valueSet) that are members of this value set.</xs:documentation>
            </xs:annotation>
            <xs:element name="targetScopeUri" type="uri"/>
            <xs:element name="targetScopeCanonical" type="canonical"/>
          </xs:choice>
          <xs:element name="group" type="ConceptMap.Group" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A group of mappings that all have the same source and target system.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ConceptMap.Property">
    <xs:annotation>
      <xs:documentation xml:lang="en">A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that is used to identify the property. The code is used internally (in ConceptMap.group.element.target.property.code) and also in the $translate operation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="uri" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the formal meaning of the property.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A description of the property - why it is defined, and how its value might be used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="ConceptMapPropertyType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of the property value.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="system" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The CodeSystem that defines the codes from which values of type ```code``` in property values.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ConceptMap.AdditionalAttribute">
    <xs:annotation>
      <xs:documentation xml:lang="en">A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that is used to identify this additional data attribute. The code is used internally in ConceptMap.group.element.target.dependsOn.attribute and ConceptMap.group.element.target.product.attribute.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="uri" minOccurs="0" maxOccurs="1" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the formal definition of the source/target data element. For elements defined by the FHIR specification, or using a FHIR logical model, the correct format is {canonical-url}#{element-id}.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A description of the additional attribute and/or the data element it refers to - why it is defined, and how the value might be used in mappings, and a discussion of issues associated with the use of the data element.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="ConceptMapAttributeType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of the source data contained in this concept map for this data element.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ConceptMap.Group">
    <xs:annotation>
      <xs:documentation xml:lang="en">A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="source" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that identifies the source system where the concepts to be mapped are defined.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="target" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">An absolute URI that identifies the target system that the concepts will be mapped to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="element" type="ConceptMap.Element" minOccurs="1" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Mappings for an individual concept in the source to one or more concepts in the target.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unmapped" type="ConceptMap.Unmapped" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">What to do when there is no mapping to a target concept from the source concept and ConceptMap.group.element.noMap is not true. This provides the &quot;default&quot; to be applied when there is no target concept mapping specified or the expansion of ConceptMap.group.element.target.valueSet is empty.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ConceptMap.Element">
    <xs:annotation>
      <xs:documentation xml:lang="en">A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identity (code or path) or the element/item being mapped.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="display" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The display for the code. The display is only provided to help editors when editing the concept map.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="valueSet" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The set of concepts from the ConceptMap.group.source code system which are all being mapped to the target as part of this mapping rule.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="noMap" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">If noMap = true this indicates that no mapping to a target concept exists for this source concept.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comment" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comments related to the mapping of the source element, potentially including why there is no target.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="target" type="ConceptMap.Target" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A concept from the target value set that this concept maps to.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ConceptMap.Target">
    <xs:annotation>
      <xs:documentation xml:lang="en">A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identity (code or path) or the element/item that the map refers to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="display" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The display for the code. The display is only provided to help editors when editing the concept map.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="valueSet" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The set of concepts from the ConceptMap.group.target code system which are all being mapped to as part of this mapping rule. The effect of using this data element is the same as having multiple ConceptMap.group.element.target elements with one for each concept in the ConceptMap.group.element.target.valueSet value set.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relationship" minOccurs="1" maxOccurs="1" type="ConceptMapRelationship">
            <xs:annotation>
              <xs:documentation xml:lang="en">The relationship between the source and target concepts. The relationship is read from source to target (e.g. source-is-narrower-than-target).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comment" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comments related to the mapping to the target element.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="property" type="ConceptMap.Property1" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A property value for this source -&gt; target mapping.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="dependsOn" type="ConceptMap.DependsOn" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified data attribute can be resolved, and it has the specified value.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="product" type="ConceptMap.DependsOn" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Product is the output of a ConceptMap that provides additional values that go in other attributes / data elemnts of the target data.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ConceptMap.Property1">
    <xs:annotation>
      <xs:documentation xml:lang="en">A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to a mapping property defined in ConceptMap.property.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The value of this property. If the type chosen for this element is 'code', then the property SHALL be defined in a ConceptMap.property element and that ConceptMap.property element SHALL have a system element.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueCoding" type="Coding"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueDateTime" type="dateTime"/>
            <xs:element name="valueDecimal" type="decimal"/>
            <xs:element name="valueCode" type="code"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ConceptMap.DependsOn">
    <xs:annotation>
      <xs:documentation xml:lang="en">A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="attribute" minOccurs="1" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to the additional attribute that holds a value the map depends on.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Data element value that the map depends on / produces. If the data type is a code, that code SHALL come from the .group.source code system for .dependsOn.valueCode or from the .group.target code system for .product.valueCode.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueCode" type="code"/>
            <xs:element name="valueCoding" type="Coding"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueQuantity" type="Quantity"/>
          </xs:choice>
          <xs:element name="valueSet" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">This mapping applies if the data element value is a code from this value set.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ConceptMap.Unmapped">
    <xs:annotation>
      <xs:documentation xml:lang="en">A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="mode" minOccurs="1" maxOccurs="1" type="ConceptMapGroupUnmappedMode">
            <xs:annotation>
              <xs:documentation xml:lang="en">Defines which action to take if there is no match for the source concept in the target system designated for the group. One of 3 actions are possible: use the unmapped source code (this is useful when doing a mapping between versions, and only a few codes have changed), use a fixed code (a default code), or alternatively, a reference to a different concept map can be provided (by canonical URL).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">The fixed code to use when the mode = 'fixed'  - all unmapped codes are mapped to a single fixed code.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="display" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The display for the code. The display is only provided to help editors when editing the concept map.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comment" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Comments related to the choice of how to handle unmapped elements.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="valueSet" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The set of fixed codes to use when the mode = 'fixed'  - all unmapped codes are mapped to each of the fixed codes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relationship" minOccurs="0" maxOccurs="1" type="ConceptMapRelationship">
            <xs:annotation>
              <xs:documentation xml:lang="en">The default relationship value to apply between the source and target concepts when the source code is unmapped and the mode is 'fixed' or 'use-source-code'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="otherMap" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The canonical reference to an additional ConceptMap resource instance to use for mapping if this ConceptMap resource contains no matching mapping for the source concept.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ConceptMapPropertyTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="Coding">
        <xs:annotation>
          <xs:documentation xml:lang="en">Coding (external reference)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="string">
        <xs:annotation>
          <xs:documentation xml:lang="en">string</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="integer">
        <xs:annotation>
          <xs:documentation xml:lang="en">integer</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="boolean">
        <xs:annotation>
          <xs:documentation xml:lang="en">boolean</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="dateTime">
        <xs:annotation>
          <xs:documentation xml:lang="en">dateTime</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="decimal">
        <xs:annotation>
          <xs:documentation xml:lang="en">decimal</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="code">
        <xs:annotation>
          <xs:documentation xml:lang="en">code</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ConceptMapPropertyType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ConceptMapPropertyTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ConceptMapAttributeTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="code">
        <xs:annotation>
          <xs:documentation xml:lang="en">code</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Coding">
        <xs:annotation>
          <xs:documentation xml:lang="en">Coding</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="string">
        <xs:annotation>
          <xs:documentation xml:lang="en">string</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="boolean">
        <xs:annotation>
          <xs:documentation xml:lang="en">boolean</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Quantity">
        <xs:annotation>
          <xs:documentation xml:lang="en">Quantity</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ConceptMapAttributeType">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ConceptMapAttributeTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ConceptMapGroupUnmappedModeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="use-source-code">
        <xs:annotation>
          <xs:documentation xml:lang="en">Use Provided Source Code</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="fixed">
        <xs:annotation>
          <xs:documentation xml:lang="en">Fixed Code</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="other-map">
        <xs:annotation>
          <xs:documentation xml:lang="en">Other Map</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ConceptMapGroupUnmappedMode">
    <xs:annotation>
      <xs:documentation xml:lang="en"></xs:documentation>
      <xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="Element">
        <xs:attribute name="value" type="ConceptMapGroupUnmappedModeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:schema>
