<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="PaymentTransaction" />
  <url value="http://fhir.synapxe.sg/StructureDefinition/PaymentTransaction" />
  <version value="0.1" />
  <name value="PaymentTransaction" />
  <status value="draft" />
  <publisher value="Synapxe" />
  <description value="PaymentTransaction structure definition specified for Synapxe." />
  <copyright value="Copyright (C) 2024 Synapxe" />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="PaymentTransaction" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/DomainResource" />
  <derivation value="specialization" />
  <differential>
    <element id="PaymentTransaction">
      <path value="PaymentTransaction" />
      <short value="Custom Inventory Resource" />
      <definition value="Custom Inventory resource that includes inventory specific data." />
    </element>
    <element id="PaymentTransaction.extension">
      <path value="PaymentTransaction.extension" />
      <min value="1" />
    </element>
    <element id="PaymentTransaction.extension:requesterId">
      <path value="PaymentTransaction.extension" />
      <sliceName value="requesterId" />
      <min value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://ihis.sg/ccdp/extension/requesterId" />
      </type>
    </element>
    <element id="PaymentTransaction.totalAmount">
      <path value="PaymentTransaction.totalAmount" />
      <short value="Total amount" />
      <definition value="Total amount for the inventory item" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="decimal" />
      </type>
    </element>
    <element id="PaymentTransaction.organizationGroup">
      <path value="PaymentTransaction.organizationGroup" />
      <short value="Organization group" />
      <definition value="Organization group of the inventory item" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="PaymentTransaction.payorInfo">
      <path value="PaymentTransaction.payorInfo" />
      <short value="Payor information" />
      <definition value="Information about the payor" />
      <max value="1" />
      <type>
        <code value="BackboneElement" />
      </type>
    </element>
    <element id="PaymentTransaction.payorInfo.name">
      <path value="PaymentTransaction.payorInfo.name" />
      <short value="Payor name" />
      <definition value="Name of the payor" />
      <max value="1" />
      <type>
        <code value="BackboneElement" />
      </type>
    </element>
    <element id="PaymentTransaction.payorInfo.name.text">
      <path value="PaymentTransaction.payorInfo.name.text" />
      <short value="Plain text representation of the payor name" />
      <definition value="Plain text representation of the payor name" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="PaymentTransaction.payorInfo.contact">
      <path value="PaymentTransaction.payorInfo.contact" />
      <short value="Contact information" />
      <definition value="Contact details for the payor" />
      <type>
        <code value="BackboneElement" />
      </type>
    </element>
    <element id="PaymentTransaction.payorInfo.contact.system">
      <path value="PaymentTransaction.payorInfo.contact.system" />
      <short value="Contact system type" />
      <definition value="The type of contact system (phone, email, etc.)" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="PaymentTransaction.payorInfo.contact.value">
      <path value="PaymentTransaction.payorInfo.contact.value" />
      <short value="Contact value" />
      <definition value="The contact value (phone number, email address, etc.)" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="PaymentTransaction.payorInfo.contact.use">
      <path value="PaymentTransaction.payorInfo.contact.use" />
      <short value="Contact use type" />
      <definition value="The purpose of the contact (mobile, home, etc.)" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="PaymentTransaction.category">
      <path value="PaymentTransaction.category" />
      <short value="Product category" />
      <definition value="Product category of the inventory item" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="PaymentTransaction.referenceNumber">
      <path value="PaymentTransaction.referenceNumber" />
      <short value="Product referenceNumber" />
      <definition value="Product referenceNumber of the inventory item" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="PaymentTransaction.billPayment">
      <path value="PaymentTransaction.billPayment" />
      <short value="Bill payment information" />
      <definition value="Information about the bill payment" />
      <max value="1" />
      <type>
        <code value="BackboneElement" />
      </type>
    </element>
    <element id="PaymentTransaction.billPayment.paymentMethod">
      <path value="PaymentTransaction.billPayment.paymentMethod" />
      <short value="Payment method" />
      <definition value="Method of payment (e.g., credit-card, cash, etc.)" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="PaymentTransaction.billPayment.billPaymentDetail">
      <path value="PaymentTransaction.billPayment.billPaymentDetail" />
      <short value="Bill payment details" />
      <definition value="Detailed information about the bill payment" />
      <type>
        <code value="BackboneElement" />
      </type>
    </element>
    <element id="PaymentTransaction.billPayment.billPaymentDetail.amount">
      <path value="PaymentTransaction.billPayment.billPaymentDetail.amount" />
      <short value="Payment amount" />
      <definition value="Amount of the payment" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="decimal" />
      </type>
    </element>
    <element id="PaymentTransaction.billPayment.billPaymentDetail.organization">
      <path value="PaymentTransaction.billPayment.billPaymentDetail.organization" />
      <short value="Organization reference" />
      <definition value="Reference to the organization" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
      </type>
    </element>
    <element id="PaymentTransaction.billPayment.billPaymentDetail.invoiceNumber">
      <path value="PaymentTransaction.billPayment.billPaymentDetail.invoiceNumber" />
      <short value="Invoice number" />
      <definition value="Reference number of the invoice" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="BackboneElement" />
      </type>
    </element>
    <element id="PaymentTransaction.billPayment.billPaymentDetail.invoiceNumber.value">
      <path value="PaymentTransaction.billPayment.billPaymentDetail.invoiceNumber.value" />
      <short value="Invoice number value" />
      <definition value="The actual invoice number" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="PaymentTransaction.billPayment.billPaymentDetail.invoiceStatus">
      <path value="PaymentTransaction.billPayment.billPaymentDetail.invoiceStatus" />
      <short value="Invoice status" />
      <definition value="Status of the invoice (e.g., issued, paid, etc.)" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="PaymentTransaction.billPayment.billPaymentDetail.subject">
      <path value="PaymentTransaction.billPayment.billPaymentDetail.subject" />
      <short value="Subject reference" />
      <definition value="Reference to the patient subject" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
      </type>
    </element>
    <element id="PaymentTransaction.billPayment.billPaymentDetail.visitDate">
      <path value="PaymentTransaction.billPayment.billPaymentDetail.visitDate" />
      <short value="Visit date" />
      <definition value="Date of the visit" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
    </element>
    <element id="PaymentTransaction.billPayment.billPaymentDetail.billType">
      <path value="PaymentTransaction.billPayment.billPaymentDetail.billType" />
      <short value="Bill type" />
      <definition value="Type of the bill (e.g., web-service)" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
  </differential>
</StructureDefinition>