<?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 Wed, Jun 24, 2026 21:24+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="SubstanceDefinition" type="SubstanceDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="SubstanceDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</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="DomainResource">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifier by which this substance is known.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="version" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A business level edition or revision identifier.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Status of substance within the catalogue e.g. active, retired.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="classification" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A high level categorization, e.g. polymer or nucleic acid, or food, chemical, biological, or a lower level such as the general types of polymer (linear or branch chain) or type of impurity (process related or contaminant).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="domain" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The applicable usage of the substance, as an example human or veterinary.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="grade" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The quality standard, established benchmark, to which substance complies (e.g. USP/NF, Ph. Eur, JP, BP, Company Standard).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Textual description of the substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Textual comment about the substance's catalogue or registry record.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="manufacturer" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The entity that creates, makes, produces or fabricates the substance. This is a set of potential manufacturers but is not necessarily comprehensive.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supplier" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">An entity that is the source for the substance. It may be different from the manufacturer. Supplier is synonymous to a distributor.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="moiety" type="SubstanceDefinition.Moiety" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Moiety, for structural modifications.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="characterization" type="SubstanceDefinition.Characterization" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">General specifications for this substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="property" type="SubstanceDefinition.Property" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">General specifications for this substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="molecularWeight" type="SubstanceDefinition.MolecularWeight" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The average mass of a molecule of a compound compared to 1/12 the mass of carbon 12 and calculated as the sum of the atomic weights of the constituent atoms.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="structure" type="SubstanceDefinition.Structure" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Structural information.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" type="SubstanceDefinition.Code" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Codes associated with the substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" type="SubstanceDefinition.Name" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Names applicable to this substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="relationship" type="SubstanceDefinition.Relationship" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A link between this substance and another, with details of the relationship.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sourceMaterial" type="SubstanceDefinition.SourceMaterial" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Material or taxonomic/anatomical source for the substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="nucleicAcid" type="SubstanceDefinition.NucleicAcid" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Data items specific to nucleic acids.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="polymer" type="SubstanceDefinition.Polymer" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Data items specific to polymers.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="protein" type="SubstanceDefinition.Protein" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Data items specific to proteins.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Moiety">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="role" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Role that the moiety is playing.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifier by which this moiety substance is known.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Textual name for this moiety substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="stereochemistry" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Stereochemistry type.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="opticalActivity" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Optical activity type.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="molecularFormula" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Molecular formula for this moiety of this substance, typically using the Hill system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Quantitative value for this moiety.</xs:documentation>
            </xs:annotation>
            <xs:element name="amountQuantity" type="Quantity"/>
            <xs:element name="amountString" type="string"/>
          </xs:choice>
          <xs:element name="measurementType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The measurement type of the quantitative value. In capturing the actual relative amounts of substances or molecular fragments it may be necessary to indicate whether the amount refers to, for example, a mole ratio or weight ratio.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Characterization">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="technique" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The method used to elucidate the characterization of the drug substance. Example: HPLC.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="form" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the nature of the chemical entity and explains, for instance, whether this is a base or a salt form.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">The description or justification in support of the interpretation of the data file.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="file" minOccurs="0" maxOccurs="unbounded" type="Attachment">
            <xs:annotation>
              <xs:documentation xml:lang="en">The data produced by the analytical instrument or a pictorial representation of that data. Examples: a JCAMP, JDX, or ADX file, or a chromatogram or spectrum analysis.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Property">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code expressing the type of property.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A value for the property.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueDate" type="date"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueAttachment" type="Attachment"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.MolecularWeight">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="method" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The method by which the molecular weight was determined.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type of molecular weight such as exact, average (also known as. number average), weight average.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="1" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">Used to capture quantitative values for a variety of elements. If only limits are given, the arithmetic mean would be the average. If only a single definite value for a given element is given, it would be captured in this field.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Structure">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="stereochemistry" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Stereochemistry type.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="opticalActivity" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Optical activity type.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="molecularFormula" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">An expression which states the number and type of atoms present in a molecule of a substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="molecularFormulaByMoiety" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specified per moiety according to the Hill system, i.e. first C, then H, then alphabetical, each moiety separated by a dot.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="molecularWeight" type="SubstanceDefinition.MolecularWeight" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The molecular weight or weight range (for proteins, polymers or nucleic acids).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="technique" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The method used to elucidate the structure of the drug substance. Examples: X-ray, NMR, Peptide mapping, Ligand binding assay.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sourceDocument" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The source of information about the structure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="representation" type="SubstanceDefinition.Representation" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A depiction of the structure of the substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Representation">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind of structural representation (e.g. full, partial).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="representation" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The structural representation as a text string in a standard format.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="format" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The format of the representation e.g. InChI, SMILES, MOLFILE, CDX, SDF, PDB, mmCIF. The logical content type rather than the physical file format of a document.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="document" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">An attached file with the structural representation e.g. a molecular structure graphic of the substance, a JCAMP or AnIML file.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Code">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The specific code.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Status of the code assignment, for example 'provisional', 'approved'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date at which the code status was changed as part of the terminology maintenance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="note" minOccurs="0" maxOccurs="unbounded" type="Annotation">
            <xs:annotation>
              <xs:documentation xml:lang="en">Any comment can be provided in this field, if necessary.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="source" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Supporting literature.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Name">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="name" minOccurs="1" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual name.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Name type, for example 'systematic',  'scientific, 'brand'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the name, for example 'current', 'proposed'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preferred" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">If this is the preferred name for this substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="language" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Human language that the name is written in.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="domain" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The use context of this name for example if there is a different name a drug active ingredient as opposed to a food colour additive.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="jurisdiction" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The jurisdiction where this name applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="synonym" type="SubstanceDefinition.Name" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A synonym of this particular name, by which the substance is also known.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="translation" type="SubstanceDefinition.Name" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A translation for this name into another human language.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="official" type="SubstanceDefinition.Official" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Details of the official nature of this name.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="source" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Supporting literature.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Official">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="authority" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Which authority uses this official name.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the official name, for example 'draft', 'active', 'retired'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">Date of the official name change.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Relationship">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A pointer to another substance, as a resource or just a representational code.</xs:documentation>
            </xs:annotation>
            <xs:element name="substanceDefinitionReference" type="Reference"/>
            <xs:element name="substanceDefinitionCodeableConcept" type="CodeableConcept"/>
          </xs:choice>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">For example &quot;salt to parent&quot;, &quot;active moiety&quot;, &quot;starting material&quot;, &quot;polymorph&quot;, &quot;impurity of&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="isDefining" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">For example where an enzyme strongly bonds with a particular substance, this is a defining relationship for that enzyme, out of several possible substance relationships.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A numeric factor for the relationship, for instance to express that the salt of a substance has some percentage of the active substance in relation to some other.</xs:documentation>
            </xs:annotation>
            <xs:element name="amountQuantity" type="Quantity"/>
            <xs:element name="amountRatio" type="Ratio"/>
            <xs:element name="amountString" type="string"/>
            <xs:element name="amountRange" type="Range"/>
          </xs:choice>
          <xs:element name="ratioHighLimitAmount" minOccurs="0" maxOccurs="1" type="Ratio">
            <xs:annotation>
              <xs:documentation xml:lang="en">For use when the numeric has an uncertain range.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="comparator" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">An operator for the amount, for example &quot;average&quot;, &quot;approximately&quot;, &quot;less than&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="measurementType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind of measurement that the amount represents, e.g. an inhibitory concentration (IC50), dissociation constant (Kd), inhibition constant (Ki), or a ratio expressed by mole or by weight.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="interaction" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">For target relationships, the kind of interaction between the substance and its target.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="organism" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">For anti-infective target relationships, the specific organism the substance is targeted against (e.g. E. coli, S. aureus). For broad-spectrum agents, organismType may be specified instead.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="organismType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">For anti-infective target relationships, the high-level type of organism the substance is targeted against (e.g. bacterial, viral, fungal). May be used independently of organism, particularly for broad-spectrum agents.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="source" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Supporting literature.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.SourceMaterial">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A classification that provides the origin of the raw material. Example: cat hair would be an Animal source type.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="genus" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The genus of an organism, typically referring to the Latin epithet of the genus element of the plant/animal scientific name.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="species" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The species of an organism, typically referring to the Latin epithet of the species of the plant/animal.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="part" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">An anatomical origin of the source material within an organism.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="countryOfOrigin" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The country or countries where the material is harvested.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.NucleicAcid">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequenceType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of the sequence (e.g. DNA, RNA).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="numberOfSubunits" minOccurs="0" maxOccurs="1" type="integer">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of subunits — strands of nucleic acid that are tightly associated typically through Watson-Crick base pairing.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="areaOfHybridisation" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The area of hybridisation, for double-stranded RNA or DNA. Expressed as the subunit number followed by the residue number, in increasing order.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="oligoNucleotideType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The class of oligonucleotide, where relevant (e.g. antisense, siRNA, aptamer).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subunit" type="SubstanceDefinition.Subunit" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A subunit constituting the nucleic acid. Subunits are listed in decreasing length order; ties are ordered by molecular weight; identical sequences are repeated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="gene" type="SubstanceDefinition.Gene" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The gene that codes for this substance (typically applies to proteins and nucleic acids). Captures the gene's identity and the source organism or lineage of the gene sequence (e.g. humanised mouse, chimeric mouse-human).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="geneElement" type="SubstanceDefinition.GeneElement" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information about the functional elements (promoter, enhancer, coding sequence, terminator, etc.) that make up a nucleic acid construct used in gene therapy. Each element captures its role and identity.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Subunit">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="subunit" minOccurs="0" maxOccurs="1" type="integer">
            <xs:annotation>
              <xs:documentation xml:lang="en">Index of the subunit. Subunits are numbered in decreasing length order, with ties broken by molecular weight.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sequence" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The nucleotide sequence in 5’→3’ notation using standard single-letter codes. Sugar and linkage type may be expressed alongside, via .sugar and .linkage.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="length" minOccurs="0" maxOccurs="1" type="integer">
            <xs:annotation>
              <xs:documentation xml:lang="en">The length of the sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sequenceAttachment" minOccurs="0" maxOccurs="1" type="Attachment">
            <xs:annotation>
              <xs:documentation xml:lang="en">The sequence provided as an attached file (e.g. when too long for inline capture).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="fivePrime" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The nucleotide present at the 5’ terminus. Since the sequence is represented 5’→3’, this is the first nucleotide in the sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="threePrime" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The nucleotide present at the 3’ terminus. Since the sequence is represented 5’→3’, this is the last nucleotide in the sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="linkage" type="SubstanceDefinition.Linkage" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The linkages between sugar residues in the nucleotide sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sugar" type="SubstanceDefinition.Sugar" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A sugar component of the nucleotide sequence, identifying the sugar substance and the residue positions to which it applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Linkage">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="connectivity" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The chemistry of the linkage. For naturally occurring nucleic acids the linkage is usually a phosphate group; synthetic oligonucleotides may use phosphorothioate or other modified linkages. Linkage connectivity defaults to 3’-5’; 3’-3’ or 5’-5’ should be stated explicitly.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="substance" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The substance representing the linkage, expressed as a code or a reference to its SubstanceDefinition. Each linkage is registered as a fragment. Reference.identifier may be used to carry an external ID (e.g. ISO 11238 Substance ID) when no resolvable URL is available.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="residueSite" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The residue positions at which this linkage applies, listed in 5’→3’ direction consistent with the base sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Sugar">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="substance" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The substance representing the sugar (or sugar-like component) of the nucleotide, expressed as a code or a reference to its SubstanceDefinition. Reference.identifier may be used to carry an external ID (e.g. ISO 11238 Substance ID) when no resolvable URL is available.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="residueSite" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The residue positions at which this sugar applies, listed in 5’→3’ direction consistent with the base sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Gene">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequenceOrigin" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The species or lineage from which the gene sequence originated (e.g. human, humanised mouse, chimeric mouse-human, bacterial). For recombinant biologics, this is distinct from the production source organism.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="gene" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The gene itself, expressed as a code or as a reference to the SubstanceDefinition describing the gene as a nucleic acid. Reference.identifier may be used to carry an external ID (e.g. NCBI Gene, HGNC symbol) when no resolvable URL is available.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="source" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Supporting literature for the gene information.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.GeneElement">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The functional role of the element within the construct, for example promoter, enhancer, silencer, terminator, or coding sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="element" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The element itself, expressed as a code or as a reference to a SubstanceDefinition describing the element as a nucleic acid substance. Reference.identifier may be used to carry an external ID (e.g. addgene plasmid ID, NCBI accession) when no resolvable URL is available.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="source" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Supporting literature for the gene element information.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Polymer">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="class" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Overall type of the polymer.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="geometry" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Polymer geometry, e.g. linear, branched, cross-linked, network or dendritic.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="copolymerConnectivity" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes the copolymer sequence type (polymer connectivity).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modification" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A modification applied to the polymer, e.g. a chemical reaction that alters the structure post-polymerisation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="monomerSet" type="SubstanceDefinition.MonomerSet" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A set of monomers used to build the polymer, with their proportions and relationships.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="repeat" type="SubstanceDefinition.Repeat" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specifies and quantifies the repeated units and their configuration.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.MonomerSet">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="ratioType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Captures the type of ratio to the entire polymer, e.g. Monomer/Polymer ratio, SRU/Polymer Ratio.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="startingMaterial" type="SubstanceDefinition.StartingMaterial" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The starting materials - monomer(s) used in the synthesis of the polymer.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.StartingMaterial">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The substance acting as starting material. This may be specified as a code or as a reference to another SubstanceDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Substance high level category, e.g. chemical substance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="isDefining" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether this starting material is part of what defines the polymer's unique identity.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">A percentage.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Repeat">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="averageMolecularFormula" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A representation of an (average) molecular formula from a polymer.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="repeatUnitAmountType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">How the quantitative amount of Structural Repeat Units is captured (e.g. Exact, Numeric, Average).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="repeatUnit" type="SubstanceDefinition.RepeatUnit" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">An SRU - Structural Repeat Unit.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.RepeatUnit">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="unit" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identification of the structural repeat unit (SRU).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="orientation" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The orientation of the polymerisation, e.g. head-tail, head-head, random.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="0" maxOccurs="1" type="integer">
            <xs:annotation>
              <xs:documentation xml:lang="en">Number of repeats of this unit.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="degreeOfPolymerisation" type="SubstanceDefinition.DegreeOfPolymerisation" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Applies to homopolymer and block co-polymers where the degree of polymerisation within a block can be described.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="structuralRepresentation" type="SubstanceDefinition.Representation" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A graphical structure for this SRU.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.DegreeOfPolymerisation">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of degree of polymerisation, e.g. SRU/Polymer ratio.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="average" minOccurs="0" maxOccurs="1" type="integer">
            <xs:annotation>
              <xs:documentation xml:lang="en">An average amount of polymerisation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="low" minOccurs="0" maxOccurs="1" type="integer">
            <xs:annotation>
              <xs:documentation xml:lang="en">A low expected limit of the amount.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="high" minOccurs="0" maxOccurs="1" type="integer">
            <xs:annotation>
              <xs:documentation xml:lang="en">A high expected limit of the amount.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Protein">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequenceType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Whether the sequence provided is complete or partial.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="numberOfSubunits" minOccurs="0" maxOccurs="1" type="integer">
            <xs:annotation>
              <xs:documentation xml:lang="en">Number of subunits — linear sequences of amino acids linked through peptide bonds.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="disulfideLinkage" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Disulphide bond(s) between cysteine residues on the same subunit or across two different subunits. Positions are listed in increasing order of subunit number and intra-subunit position, followed by the amino-acid abbreviations. The positions should contain Cysteine residues.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subunit" type="SubstanceDefinition.Subunit1" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Each subunit constituting the protein. A subunit is a linear sequence of amino acids linked through peptide bonds. Used when the finished protein is a complex of multiple sequences (not for domains within a single sequence). Subunits are listed in order of decreasing length; ties resolved by decreasing molecular weight; identical sequences are repeated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="gene" type="SubstanceDefinition.Gene" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The gene that codes for this protein substance (typically the source gene). Captures the gene's identity and the source organism or lineage of the gene sequence (e.g. humanised mouse, chimeric mouse-human). Same structure as nucleicAcid.gene.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SubstanceDefinition.Subunit1">
    <xs:annotation>
      <xs:documentation xml:lang="en">The detailed description of a substance, typically at a level beyond what is used for prescribing.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="subunit" minOccurs="0" maxOccurs="1" type="integer">
            <xs:annotation>
              <xs:documentation xml:lang="en">Index of primary sequences of amino acids linked through peptide bonds in order of decreasing length. Sequences of the same length will be ordered by molecular weight. Subunits that have identical sequences will be repeated and have sequential subscripts.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sequence" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amino-acid sequence, listed N- to C-terminal using standard single-letter amino-acid codes. Uppercase denotes L-amino acids, lowercase denotes D-amino acids. Transcribed proteins are described using the translated sequence; for synthetic peptides containing amino acids without a single-letter code, X is used. Modified amino acids are identified by their position in the sequence.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="length" minOccurs="0" maxOccurs="1" type="integer">
            <xs:annotation>
              <xs:documentation xml:lang="en">Length of linear sequences of amino acids contained in the subunit.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sequenceAttachment" minOccurs="0" maxOccurs="1" type="Attachment">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amino-acid sequence provided as an attached file (e.g. when too long for inline capture, or only available in non-text form such as an image).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="nTerminalModification" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The molecular fragment modification at the N-terminal of the protein, expressed as a code or a reference to its SubstanceDefinition. Reference.identifier may be used to carry an external ID (e.g. ISO 11238 Substance ID) when no resolvable URL is available.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="cTerminalModification" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The molecular fragment modification at the C-terminal of the protein, expressed as a code or a reference to its SubstanceDefinition. Reference.identifier may be used to carry an external ID (e.g. ISO 11238 Substance ID) when no resolvable URL is available.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:schema>
