<?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 Thu, Apr 9, 2026 17:12+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="ObservationDefinition" type="ObservationDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="ObservationDefinition">
    <xs:annotation>
      <xs:documentation xml:lang="en">Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.</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 URL that is used to identify this ObservationDefinition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this ObservationDefinition is (or will be) published. The URL SHOULD include the major version of the ObservationDefinition. For more information see Technical and Business Versions.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Business identifiers assigned to this ObservationDefinition by the performer and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server.</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 ObservationDefinition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the ObservationDefinition 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 are orderable.</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 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 ObservationDefinition. 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 ObservationDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="PublicationStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The current state of the ObservationDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="experimental" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A flag to indicate that this ObservationDefinition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used 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 ObservationDefinition 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 ObservationDefinition changes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="publisher" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Helps establish the &quot;authority/credibility&quot; of the ObservationDefinition. May also allow for contact.</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 ObservationDefinition from the 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 ObservationDefinition 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 jurisdiction in which the ObservationDefinition is intended to be used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="purpose" minOccurs="0" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">Explains why this ObservationDefinition 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">Copyright statement relating to the ObservationDefinition and/or its contents. Copyright statements are notices of intellectual property ownership and can include restrictions on the use and publishing of the ObservationDefinition.</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 asset 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 asset content was last reviewed. Review happens periodically after that, but doesn't 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 ObservationDefinition content was or is planned to be effective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="derivedFromCanonical" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The canonical URL pointing to another FHIR-defined ObservationDefinition that is adhered to in whole or in part by this definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="derivedFromUri" minOccurs="0" maxOccurs="unbounded" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">The URL pointing to an externally-defined observation definition, guideline or other definition that is adhered to in whole or in part by this definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that describes the intended kind of subject of Observation instances conforming to this ObservationDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="performerType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of individual/organization/device that is expected to act upon instances of this definition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code that classifies the general type of observation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes what will be observed. Sometimes this is called the observation &quot;name&quot;.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="permittedDataType" minOccurs="0" maxOccurs="unbounded" type="ObservationDataType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The data types allowed for the value element of the instance observations conforming to this ObservationDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="multipleResultsAllowed" minOccurs="0" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">Multiple results allowed for observations conforming to this ObservationDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="bodyStructure" minOccurs="0" maxOccurs="1" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The body structure on the subject's body where the observation is to be made.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="method" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The method or technique used to perform the observation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="specimen" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The kind of specimen that this type of observation is produced on.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The measurement model of device or actual device used to produce observations of this type.</xs:documentation>
            </xs:annotation>
            <xs:element name="deviceReference" type="Reference"/>
            <xs:element name="deviceCanonical" type="canonical"/>
          </xs:choice>
          <xs:element name="preferredReportName" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The preferred name to be used when reporting the results of observations conforming to this ObservationDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="permittedUnit" minOccurs="0" maxOccurs="unbounded" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">Units allowed for the valueQuantity element in the instance observations conforming to this ObservationDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="qualifiedValue" type="ObservationDefinition.QualifiedValue" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A set of qualified values associated with a context and a set of conditions -  provides a range for quantitative and ordinal observations and a collection of value sets for qualitative observations.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="hasMember" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">This ObservationDefinition defines a group  observation (e.g. a battery, a panel of tests, a set of vital sign measurements) that includes the target as a member of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="component" type="ObservationDefinition.Component" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Some observations have multiple component observations, expressed as separate code value pairs.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ObservationDefinition.QualifiedValue">
    <xs:annotation>
      <xs:documentation xml:lang="en">Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="context" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A concept defining the context for this set of qualified values.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="appliesTo" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The target population this  set of qualified values applies to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="sexParameterForClinicalUse" minOccurs="0" maxOccurs="1" type="AdministrativeGender">
            <xs:annotation>
              <xs:documentation xml:lang="en">The sex parameter for clinical use this set of qualified values applies to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="age" minOccurs="0" maxOccurs="1" type="Range">
            <xs:annotation>
              <xs:documentation xml:lang="en">The age range this  set of qualified values applies to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="gestationalAge" minOccurs="0" maxOccurs="1" type="Range">
            <xs:annotation>
              <xs:documentation xml:lang="en">The gestational age this  set of qualified values applies to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="condition" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Description of the criterion for which the qualified value is valid.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="rangeCategory" minOccurs="0" maxOccurs="1" type="ObservationRangeCategory">
            <xs:annotation>
              <xs:documentation xml:lang="en">The category of range of values for continuous or ordinal observations that match the criteria of this set of qualified values.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="range" minOccurs="0" maxOccurs="1" type="Range">
            <xs:annotation>
              <xs:documentation xml:lang="en">The range of values defined for continuous or ordinal observations that match the criteria of this set of qualified values.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="validCodedValueSet" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The set of valid coded results for qualitative observations  that match the criteria of this set of qualified values.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="normalCodedValueSet" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The set of normal coded results for qualitative observations  that match the criteria of this set of qualified values.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="abnormalCodedValueSet" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The set of abnormal coded results for qualitative observations  that match the criteria of this set of qualified values.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="criticalCodedValueSet" minOccurs="0" maxOccurs="1" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The set of critical coded results for qualitative observations  that match the criteria of this set of qualified values.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="interpretation" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The expected coded interpretation values of an observation that matches this qualified interval. For example, high, low, normal.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ObservationDefinition.Component">
    <xs:annotation>
      <xs:documentation xml:lang="en">Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Describes what will be observed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="permittedDataType" minOccurs="0" maxOccurs="unbounded" type="ObservationDataType">
            <xs:annotation>
              <xs:documentation xml:lang="en">The data types allowed for the value element of the instance of this component observations.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="permittedUnit" minOccurs="0" maxOccurs="unbounded" type="Coding">
            <xs:annotation>
              <xs:documentation xml:lang="en">Units allowed for the valueQuantity element in the instance observations conforming to this ObservationDefinition.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="qualifiedValue" type="ObservationDefinition.QualifiedValue" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A set of qualified values associated with a context and a set of conditions -  provides a range for quantitative and ordinal observations and a collection of value sets for qualitative observations.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ObservationDataTypeEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="Quantity">
        <xs:annotation>
          <xs:documentation xml:lang="en">Quantity</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CodeableConcept">
        <xs:annotation>
          <xs:documentation xml:lang="en">CodeableConcept</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="integer">
        <xs:annotation>
          <xs:documentation xml:lang="en">integer</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Range">
        <xs:annotation>
          <xs:documentation xml:lang="en">Range</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Ratio">
        <xs:annotation>
          <xs:documentation xml:lang="en">Ratio</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SampledData">
        <xs:annotation>
          <xs:documentation xml:lang="en">SampledData</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="time">
        <xs:annotation>
          <xs:documentation xml:lang="en">time</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="Period">
        <xs:annotation>
          <xs:documentation xml:lang="en">Period</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ObservationDataType">
    <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="ObservationDataTypeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ObservationRangeCategoryEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="reference">
        <xs:annotation>
          <xs:documentation xml:lang="en">reference range</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="critical">
        <xs:annotation>
          <xs:documentation xml:lang="en">critical range</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="absolute">
        <xs:annotation>
          <xs:documentation xml:lang="en">absolute range</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ObservationRangeCategory">
    <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="ObservationRangeCategoryEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:schema>
