<?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="ClaimResponse" type="ClaimResponse">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="ClaimResponse">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</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">A unique identifier assigned to this claim response.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="status" minOccurs="1" maxOccurs="1" type="FinancialResourceStatusCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">The status of the resource instance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="statusReason" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Used to indicate why the status has changed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="use" minOccurs="1" maxOccurs="1" type="Use">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code to indicate whether the nature of the request is: Claim - A request to an Insurer to adjudicate the supplied charges for health care goods and services under the identified policy and to pay the determined Benefit amount, if any; Preauthorization - A request to an Insurer to adjudicate the supplied proposed future charges for health care goods and services under the identified policy and to approve the services and provide the expected benefit amounts and potentially to reserve funds to pay the benefits when Claims for the indicated services are later submitted; or, Pre-determination - A request to an Insurer to adjudicate the supplied 'what if' charges for health care goods and services under the identified policy and report back what the Benefit payable would be had the services actually been provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party/group to whom the professional services and/or products have been supplied or are being considered and for whom actual for facast reimbursement is sought.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="created" minOccurs="1" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date this resource was created.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="insurer" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party responsible for authorization, adjudication and reimbursement.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="requestor" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The provider which is responsible for the claim, predetermination or preauthorization.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="request" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Original request resource reference.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="outcome" minOccurs="1" maxOccurs="1" type="ClaimProcessingCodes">
            <xs:annotation>
              <xs:documentation xml:lang="en">The outcome of the claim, predetermination, or preauthorization processing.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="decision" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The result of the claim, predetermination, or preauthorization adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="disposition" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A human readable description of the status of the adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preAuthRef" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference from the Insurer which is used in later communications which refers to this adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preAuthPeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The time frame during which this authorization is effective.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="event" type="ClaimResponse.Event" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Information code for an event with a corresponding date or period.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="payeeType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Type of Party to be reimbursed: subscriber, billing provider, other.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="encounter" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Healthcare encounters related to this claim.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="diagnosisRelatedGroup" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="supportingInfo" type="ClaimResponse.SupportingInfo" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional information codes regarding exceptions, special considerations, the condition, situation, prior or concurrent issues.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="item" type="ClaimResponse.Item" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A claim line. Either a simple (a product or service) or a 'group' of details which can also be a simple items or groups of sub-details.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="addItem" type="ClaimResponse.AddItem" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The first-tier service adjudications for payer added product or service lines.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjudication" type="ClaimResponse.Adjudication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The adjudication results which are presented at the header level rather than at the line-item or add-item levels.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="total" type="ClaimResponse.Total" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Categorized monetary totals for the adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="payment" type="ClaimResponse.Payment" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">Payment details for the adjudication of the claim.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="fundsReserve" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code, used only on a response to a preauthorization, to indicate whether the benefits payable have been reserved and for whom.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="formCode" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code for the form to be used for printing the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="form" minOccurs="0" maxOccurs="1" type="Attachment">
            <xs:annotation>
              <xs:documentation xml:lang="en">The actual form, by reference or inclusion, for printing the content or an EOB.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="processNote" type="ClaimResponse.ProcessNote" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A note that describes or explains adjudication results in a human readable form.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="communicationRequest" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Request for additional supporting or authorizing information.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="insurance" type="ClaimResponse.Insurance" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Financial instruments for reimbursement for the health care products and services specified on the claim.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="error" type="ClaimResponse.Error" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Errors encountered during the processing of the adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.Event">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</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 coded event such as when a service is expected or a card printed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="1" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">A date or period in the past or future indicating when the event occurred or is expectd to occur.</xs:documentation>
            </xs:annotation>
            <xs:element name="whenDateTime" type="dateTime"/>
            <xs:element name="whenPeriod" type="Period"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.SupportingInfo">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely identify supporting information entries.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The general class of the information supplied: information; exception; accident, employment; onset, etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient  for which care is sought.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The date when or period to which this information refers.</xs:documentation>
            </xs:annotation>
            <xs:element name="timingDateTime" type="dateTime"/>
            <xs:element name="timingPeriod" type="Period"/>
            <xs:element name="timingTiming" type="Timing"/>
          </xs:choice>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.</xs:documentation>
            </xs:annotation>
            <xs:element name="valueBase64Binary" type="base64Binary"/>
            <xs:element name="valueBoolean" type="boolean"/>
            <xs:element name="valueCanonical" type="canonical"/>
            <xs:element name="valueCode" type="code"/>
            <xs:element name="valueDate" type="date"/>
            <xs:element name="valueDateTime" type="dateTime"/>
            <xs:element name="valueDecimal" type="decimal"/>
            <xs:element name="valueId" type="id"/>
            <xs:element name="valueInstant" type="instant"/>
            <xs:element name="valueInteger" type="integer"/>
            <xs:element name="valueInteger64" type="integer64"/>
            <xs:element name="valueMarkdown" type="markdown"/>
            <xs:element name="valueOid" type="oid"/>
            <xs:element name="valuePositiveInt" type="positiveInt"/>
            <xs:element name="valueString" type="string"/>
            <xs:element name="valueTime" type="time"/>
            <xs:element name="valueUnsignedInt" type="unsignedInt"/>
            <xs:element name="valueUri" type="uri"/>
            <xs:element name="valueUrl" type="url"/>
            <xs:element name="valueUuid" type="uuid"/>
            <xs:element name="valueAddress" type="Address"/>
            <xs:element name="valueAge" type="Age"/>
            <xs:element name="valueAnnotation" type="Annotation"/>
            <xs:element name="valueAttachment" type="Attachment"/>
            <xs:element name="valueCodeableConcept" type="CodeableConcept"/>
            <xs:element name="valueCodeableReference" type="CodeableReference"/>
            <xs:element name="valueCoding" type="Coding"/>
            <xs:element name="valueContactPoint" type="ContactPoint"/>
            <xs:element name="valueCount" type="Count"/>
            <xs:element name="valueDistance" type="Distance"/>
            <xs:element name="valueDuration" type="Duration"/>
            <xs:element name="valueHumanName" type="HumanName"/>
            <xs:element name="valueIdentifier" type="Identifier"/>
            <xs:element name="valueMoney" type="Money"/>
            <xs:element name="valuePeriod" type="Period"/>
            <xs:element name="valueQuantity" type="Quantity"/>
            <xs:element name="valueRange" type="Range"/>
            <xs:element name="valueRatio" type="Ratio"/>
            <xs:element name="valueRatioRange" type="RatioRange"/>
            <xs:element name="valueReference" type="Reference"/>
            <xs:element name="valueSampledData" type="SampledData"/>
            <xs:element name="valueSignature" type="Signature"/>
            <xs:element name="valueTiming" type="Timing"/>
            <xs:element name="valueContactDetail" type="ContactDetail"/>
            <xs:element name="valueDataRequirement" type="DataRequirement"/>
            <xs:element name="valueExpression" type="Expression"/>
            <xs:element name="valueParameterDefinition" type="ParameterDefinition"/>
            <xs:element name="valueRelatedArtifact" type="RelatedArtifact"/>
            <xs:element name="valueTriggerDefinition" type="TriggerDefinition"/>
            <xs:element name="valueUsageContext" type="UsageContext"/>
            <xs:element name="valueAvailability" type="Availability"/>
            <xs:element name="valueExtendedContactDetail" type="ExtendedContactDetail"/>
            <xs:element name="valueVirtualServiceDetail" type="VirtualServiceDetail"/>
            <xs:element name="valueDosage" type="Dosage"/>
            <xs:element name="valueMeta" type="Meta"/>
          </xs:choice>
          <xs:element name="reason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Provides the reason in the situation where a reason code is required in addition to the content.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.Item">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="itemSequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely reference the claim item entries.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="informationSequence" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Exceptions, special conditions and supporting information applicable for this service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="noteNumber" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The numbers associated with notes below which apply to the adjudication of this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewOutcome" type="ClaimResponse.ReviewOutcome" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The high-level results of the adjudication if adjudication has been performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjudication" type="ClaimResponse.Adjudication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="detail" type="ClaimResponse.Detail" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A claim detail. Either a simple (a product or service) or a 'group' of sub-details which are simple items.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.ReviewOutcome">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="decision" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The result of the claim, predetermination, or preauthorization adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The reasons for the result of the claim, predetermination, or preauthorization adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preAuthRef" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference from the Insurer which is used in later communications which refers to this adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="preAuthPeriod" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The time frame during which this authorization is effective.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.Adjudication">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="category" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code supporting the understanding of the adjudication result and explaining variance from expected amount.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">Monetary amount associated with the category.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">A non-monetary value associated with the category. Mutually exclusive to the amount element above.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="decisionDate" minOccurs="0" maxOccurs="1" type="dateTime">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date and time the adjudication decision occured.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.Detail">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="detailSequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely reference the claim detail entry.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="noteNumber" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The numbers associated with notes below which apply to the adjudication of this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewOutcome" type="ClaimResponse.ReviewOutcome" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The high-level results of the adjudication if adjudication has been performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjudication" type="ClaimResponse.Adjudication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The adjudication results.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subDetail" type="ClaimResponse.SubDetail" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A sub-detail adjudication of a simple product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.SubDetail">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="subDetailSequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely reference the claim sub-detail entry.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="noteNumber" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The numbers associated with notes below which apply to the adjudication of this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewOutcome" type="ClaimResponse.ReviewOutcome" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The high-level results of the adjudication if adjudication has been performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjudication" type="ClaimResponse.Adjudication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The adjudication results.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.AddItem">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="itemSequence" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Claim items which this service line is intended to replace.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="detailSequence" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The sequence number of the details within the claim item which this line is intended to replace.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subdetailSequence" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The sequence number of the sub-details within the details within the claim item which this line is intended to replace.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subject" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party to whom the professional services and/or products have been supplied or are being considered and for whom actual for facast reimbursement is sought.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="informationSequence" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">Exceptions, special conditions and supporting information applicable for this service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="provider" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The providers who are authorized for the services rendered to the patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="revenue" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of revenue or cost center providing the product and/or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="category" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code to identify the general type of benefits under which products and services are provided.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrService" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrServiceEnd" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="request" minOccurs="0" maxOccurs="unbounded" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Request or Referral for Goods or Service to be rendered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Item typification or modifiers codes to convey additional context for the product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="programCode" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Identifies the program under which this may be recovered.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">The date or dates when the service or product was supplied, performed or completed.</xs:documentation>
            </xs:annotation>
            <xs:element name="servicedDate" type="date"/>
            <xs:element name="servicedPeriod" type="Period"/>
          </xs:choice>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en">Where the product or service was provided.</xs:documentation>
            </xs:annotation>
            <xs:element name="locationCodeableConcept" type="CodeableConcept"/>
            <xs:element name="locationAddress" type="Address"/>
            <xs:element name="locationReference" type="Reference"/>
          </xs:choice>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of repetitions of a service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unitPrice" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="factor" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="tax" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total of taxes applicable for this product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="net" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total amount claimed for the group (if a grouper) or the addItem. Net = unit price * quantity * factor.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="bodySite" type="ClaimResponse.BodySite" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Physical location where the service is performed or applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="noteNumber" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The numbers associated with notes below which apply to the adjudication of this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewOutcome" type="ClaimResponse.ReviewOutcome" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The high-level results of the adjudication if adjudication has been performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjudication" type="ClaimResponse.Adjudication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The adjudication results.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="detail" type="ClaimResponse.Detail1" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The second-tier service adjudications for payer added services.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.BodySite">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="site" minOccurs="1" maxOccurs="unbounded" type="CodeableReference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Physical service site on the patient (limb, tooth, etc.).</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subSite" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A region or surface of the bodySite, e.g. limb region or tooth surface(s).</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.Detail1">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="revenue" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of revenue or cost center providing the product and/or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrService" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrServiceEnd" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Item typification or modifiers codes to convey additional context for the product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of repetitions of a service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unitPrice" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="factor" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="tax" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total of taxes applicable for this product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="net" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total amount claimed for the group (if a grouper) or the addItem.detail. Net = unit price * quantity * factor.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="noteNumber" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The numbers associated with notes below which apply to the adjudication of this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewOutcome" type="ClaimResponse.ReviewOutcome" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The high-level results of the adjudication if adjudication has been performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjudication" type="ClaimResponse.Adjudication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The adjudication results.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subDetail" type="ClaimResponse.SubDetail1" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The third-tier service adjudications for payer added services.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.SubDetail1">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="traceNumber" minOccurs="0" maxOccurs="unbounded" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Trace number for tracking purposes. May be defined at the jurisdiction level or between trading partners.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="revenue" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of revenue or cost center providing the product and/or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrService" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">When the value is a group code then this item collects a set of related item details, otherwise this contains the product, service, drug or other billing code for the item. This element may be the start of a range of .productOrService codes used in conjunction with .productOrServiceEnd or it may be a solo element where .productOrServiceEnd is not used.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="productOrServiceEnd" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">This contains the end of a range of product, service, drug or other billing codes for the item. This element is not used when the .productOrService is a group code. This value may only be present when a .productOfService code has been provided to convey the start of the range. Typically this value may be used only with preauthorizations and not with claims.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="modifier" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Item typification or modifiers codes to convey additional context for the product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="quantity" minOccurs="0" maxOccurs="1" type="Quantity">
            <xs:annotation>
              <xs:documentation xml:lang="en">The number of repetitions of a service or product.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="unitPrice" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="factor" minOccurs="0" maxOccurs="1" type="decimal">
            <xs:annotation>
              <xs:documentation xml:lang="en">A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="tax" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total of taxes applicable for this product or service.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="net" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The total amount claimed for the addItem.detail.subDetail. Net = unit price * quantity * factor.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="noteNumber" minOccurs="0" maxOccurs="unbounded" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The numbers associated with notes below which apply to the adjudication of this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="reviewOutcome" type="ClaimResponse.ReviewOutcome" minOccurs="0" maxOccurs="1">
            <xs:annotation>
              <xs:documentation xml:lang="en">The high-level results of the adjudication if adjudication has been performed.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjudication" type="ClaimResponse.Adjudication" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">The adjudication results.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.Total">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="category" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="1" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">Monetary total amount associated with the category.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.Payment">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</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">Whether this represents partial or complete payment of the benefits payable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjustment" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="adjustmentReason" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reason for the payment adjustment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">Estimated date the payment will be issued or the actual issue date of payment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="1" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">Benefits payable less any payment adjustment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="identifier" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Issuer's unique identifier for the payment instrument.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.ProcessNote">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</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">A code to indicate the business purpose of the note.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="number" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely identify a note entry.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The business purpose of the note text.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="text" minOccurs="1" maxOccurs="1" type="markdown">
            <xs:annotation>
              <xs:documentation xml:lang="en">The explanation or description associated with the processing.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="language" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">A code to define the language used in the text of the note.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.Insurance">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="sequence" minOccurs="1" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="focal" minOccurs="1" maxOccurs="1" type="boolean">
            <xs:annotation>
              <xs:documentation xml:lang="en">A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="coverage" minOccurs="1" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="businessArrangement" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A business agreement number established between the provider and the insurer for special business processing purposes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="claimResponse" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The result of the adjudication of the line items for the Coverage specified in this insurance.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ClaimResponse.Error">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the adjudication details from the processing of a Claim resource.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="itemSequence" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The sequence number of the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="detailSequence" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The sequence number of the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="subDetailSequence" minOccurs="0" maxOccurs="1" type="positiveInt">
            <xs:annotation>
              <xs:documentation xml:lang="en">The sequence number of the sub-detail within the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="code" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">An error code, from a specified code system, which details why the claim could not be adjudicated.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expression" minOccurs="0" maxOccurs="unbounded" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A [simple subset of FHIRPath](fhirpath.html#simple) limited to element names, repetition indicators and the default child accessor that identifies one of the elements in the resource that caused this issue to be raised.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="ClaimProcessingCodesEnum">
    <xs:restriction base="code-primitive">
      <xs:enumeration value="queued">
        <xs:annotation>
          <xs:documentation xml:lang="en">Queued</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="complete">
        <xs:annotation>
          <xs:documentation xml:lang="en">Processing Complete</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="partial">
        <xs:annotation>
          <xs:documentation xml:lang="en">Partial Processing</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ClaimProcessingCodes">
    <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="ClaimProcessingCodesEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:schema>
