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

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

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

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

-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://hl7.org/fhir" xmlns:xhtml="http://www.w3.org/1999/xhtml" targetNamespace="http://hl7.org/fhir" elementFormDefault="qualified" version="1.0">
  <xs:include schemaLocation="fhir-base.xsd"/>
  <xs:element name="PaymentReconciliation" type="PaymentReconciliation">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the details including amount of a payment and allocates the payment items being paid.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="PaymentReconciliation">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the details including amount of a payment and allocates the payment items being paid.</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 payment reconciliation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="1" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code to indicate the nature of the payment such as payment, adjustment.</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="kind" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The workflow or activity which gave rise to or during which the payment ocurred such as a kiosk, deposit on account, periodic payment etc.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="period" minOccurs="0" maxOccurs="1" type="Period">
            <xs:annotation>
              <xs:documentation xml:lang="en">The period of time for which payments have been gathered into this bulk payment for settlement.</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 when the resource was created.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="enterer" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Payment enterer if not the actual payment issuer.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="issuerType" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The type of the source such as patient or insurance.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="paymentIssuer" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party who generated the payment.</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="requestor" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The practitioner who is responsible for the services rendered to the patient.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="outcome" minOccurs="0" maxOccurs="1" type="PaymentOutcome">
            <xs:annotation>
              <xs:documentation xml:lang="en">The outcome of a request for a reconciliation.</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 request for the reconciliation.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="1" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date of payment as indicated on the financial instrument.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="location" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The location of the site or device for electronic transfers or physical location for cash payments.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="method" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">The means of payment such as check, card cash, or electronic funds transfer.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="cardBrand" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The card brand such as debit, Visa, Amex etc. used if a card is the method of payment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="accountNumber" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">A portion of the account number, often the last 4 digits, used for verification not charging purposes.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="expirationDate" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The year and month (YYYY-MM) when the instrument, typically card, expires.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="processor" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The name of the card processor, etf processor, bank for checks.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="referenceNumber" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">The check number, eft reference, car processor reference.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="authorization" minOccurs="0" maxOccurs="1" type="string">
            <xs:annotation>
              <xs:documentation xml:lang="en">An alphanumeric issued by the processor to confirm the successful issuance of payment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="tenderedAmount" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount offered by the issuer, typically applies to cash when the issuer provides an amount in bank note denominations equal to or excess of the amount actually being paid.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="returnedAmount" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The amount returned by the receiver which is excess to the amount payable, often referred to as 'change'.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">Total payment amount as indicated on the financial instrument.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="paymentIdentifier" 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:element name="allocation" type="PaymentReconciliation.Allocation" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">Distribution of the payment amount for a previously acknowledged payable.</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="processNote" type="PaymentReconciliation.ProcessNote" minOccurs="0" maxOccurs="unbounded">
            <xs:annotation>
              <xs:documentation xml:lang="en">A note that describes or explains the processing in a human readable form.</xs:documentation>
           </xs:annotation>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PaymentReconciliation.Allocation">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the details including amount of a payment and allocates the payment items being paid.</xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="BackboneElement">
        <xs:sequence>
          <xs:element name="identifier" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique identifier for the current payment item for the referenced payable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="predecessor" minOccurs="0" maxOccurs="1" type="Identifier">
            <xs:annotation>
              <xs:documentation xml:lang="en">Unique identifier for the prior payment item for the referenced payable.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="target" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">Specific resource to which the payment/adjustment/advance applies.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:choice minOccurs="0" maxOccurs="1" >
            <xs:annotation>
              <xs:documentation xml:lang="en"> Identifies the claim line item, encounter or other sub-element being paid. Note payment may be partial, that is not match the then outstanding balance or amount incurred.</xs:documentation>
            </xs:annotation>
            <xs:element name="targetItemString" type="string"/>
            <xs:element name="targetItemIdentifier" type="Identifier"/>
            <xs:element name="targetItemPositiveInt" type="positiveInt"/>
          </xs:choice>
          <xs:element name="encounter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Encounter to which this payment applies, may be completed by the receiver, used for search.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="account" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The Account to which this payment applies, may be completed by the receiver, used for search.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="type" minOccurs="0" maxOccurs="1" type="CodeableConcept">
            <xs:annotation>
              <xs:documentation xml:lang="en">Code to indicate the nature of the payment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="submitter" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party which submitted the claim or financial transaction.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="response" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A resource, such as a ClaimResponse, which contains a commitment to payment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="date" minOccurs="0" maxOccurs="1" type="date">
            <xs:annotation>
              <xs:documentation xml:lang="en">The date from the response resource containing a commitment to pay.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="responsible" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">A reference to the individual who is responsible for inquiries regarding the response and its payment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="payee" minOccurs="0" maxOccurs="1" type="Reference">
            <xs:annotation>
              <xs:documentation xml:lang="en">The party which is receiving the payment.</xs:documentation>
           </xs:annotation>
          </xs:element>
          <xs:element name="amount" minOccurs="0" maxOccurs="1" type="Money">
            <xs:annotation>
              <xs:documentation xml:lang="en">The monetary amount allocated from the total payment to the payable.</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:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="PaymentReconciliation.ProcessNote">
    <xs:annotation>
      <xs:documentation xml:lang="en">This resource provides the details including amount of a payment and allocates the payment items being paid.</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="NoteType">
            <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="0" 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:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:simpleType name="PaymentOutcomeEnum">
    <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="PaymentOutcome">
    <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="PaymentOutcomeEnum" use="optional"/>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:schema>
