<?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 Sun, Jun 14, 2026 12:41+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="Endpoint" type="Endpoint">
    <xs:annotation>
      <xs:documentation xml:lang="en">The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b, a REST endpoint for another FHIR server, or a s/Mime email address. This may include any security context information.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Endpoint">
    <xs:annotation>
      <xs:documentation xml:lang="en">The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b, a REST endpoint for another FHIR server, or a s/Mime email address. This may include any security context information.</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 for the organization that is used to identify the endpoint across multiple disparate systems.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="EndpointStatus">
            <xs:annotation>
              <xs:documentation xml:lang="en">The endpoint status represents whether the endpoint can currently be used for connections or why it can't be used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="connectionType" minOccurs="1" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A coded value that represents the technical details of the usage of this endpoint, such as what WSDLs should be used in what way. (e.g. XDS.b/DICOM/cds-hook).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="name" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A friendly name that this endpoint can be referred to with.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="description" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The description of the endpoint and what it is for (typically used as supplemental information in an endpoint directory describing its usage/purpose).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="environmentType" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of environment(s) exposed at this endpoint (dev, prod, test, etc.).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="managingOrganization" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The organization that provides technical management services for this endpoint.  This would be the organization that acts as the public help desk for when the endpoint is not functioning.  It does NOT necessarily represent the organization who is the steward of data being provided/accepted by the endpoint.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="contact" minOccurs="0" maxOccurs="unbounded" type="ContactPoint">
            <xs:annotation>
              <xs:documentation xml:lang="en">Contact details for a human to contact about the endpoint. The primary use of this for system administrator troubleshooting.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The interval during which the endpoint is expected to be operational.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="availability" minOccurs="0" maxOccurs="1" type="Availability">
            <xs:annotation>
              <xs:documentation xml:lang="en">The times the endpoint is expected to be available, including transient downtimes and any exceptions.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="payload" type="Endpoint.Payload" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The set of payloads that are provided/available at this endpoint.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="address" minOccurs="1" maxOccurs="1" type="url">
            <xs:annotation>
              <xs:documentation xml:lang="en">The uri that describes the actual end-point to connect to.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="header" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional headers / information to send as part of the notification.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Endpoint.Payload">
    <xs:annotation>
      <xs:documentation xml:lang="en">The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b, a REST endpoint for another FHIR server, or a s/Mime email address. This may include any security context information.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="type" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The payload type describes the acceptable content that can be communicated on the endpoint.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="mimeType" minOccurs="0" maxOccurs="unbounded" type="code">
            <xs:annotation>
              <xs:documentation xml:lang="en">The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="profileCanonical" minOccurs="0" maxOccurs="unbounded" type="canonical">
            <xs:annotation>
              <xs:documentation xml:lang="en">The FHIR profile that is expected at this endpoint. It describes the resources that are handled, or even simply which resource types -e.g. Vital Sign Observations or QuestionnaireResponse.
The `profileUri` may be used when a FHIR Structure Definition is not available/appropriate.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="profileUri" minOccurs="0" maxOccurs="unbounded" type="uri">
            <xs:annotation>
              <xs:documentation xml:lang="en">The profile (as a uri) that is expected at this endpoint when not represented using a FHIR profile.

e.g. CDA Template ID expressed as an OID (in the Uri).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="EndpointStatusEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="active">
        <xs:annotation>
          <xs:documentation xml:lang="en">Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="limited">
        <xs:annotation>
          <xs:documentation xml:lang="en">Limited</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="suspended">
        <xs:annotation>
          <xs:documentation xml:lang="en">Suspended</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="off">
        <xs:annotation>
          <xs:documentation xml:lang="en">Off</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="entered-in-error">
        <xs:annotation>
          <xs:documentation xml:lang="en">Entered in error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="EndpointStatus">
    <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="EndpointStatusEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:schema>
