# Reports and reconciliation

There are two types of integrated health fund report: a claims reconciliation report and a payments
reconciliation report.

- The **claims reconciliation report** lists all the claims processed for a given calendar day.
- The **payments reconciliation report** lists the payments made for approved claims that HealthPoint
settles. Funds that HealthPoint classes as non-consolidated (currently only HCF) don't appear in
these reports. The [HealthPoint health funds by modality (PDF)](/assets/dxc-hp-health-funds-by-modality-240719.cabb4829416c9281f1260bb8cc12ceb1169b4c057fa3de963ffa238cf5b3c937.d564e73d.pdf)
shows which funds are consolidated and which aren't.


Developing reporting features is optional, but recommended to make financial reconciliation easier
for providers.

## Request a report

JS library
Use `healthpointReconciliationReport`, setting `reportType` to `claims` or `payments`, and
`reconDate` to the report date in `yyyyMMdd` format.


```javascript
// Claims report for 21 September 2024
iclient.healthpointReconciliationReport(
    {
        reportType: "claims",
        reconDate: "20240921"
    },
    yourPosCode.reportCallback
);

// Payments report for 21 September 2024
iclient.healthpointReconciliationReport(
    {
        reportType: "payments",
        reconDate: "20240921"
    },
    yourPosCode.reportCallback
);
```

### Demo

This JS Fiddle example shows how the JS library can access the canned reports:
[Demo - JS Fiddle](https://jsfiddle.net/IntegrationSupport/rdux8y6w/6/).

Don't click **Save** if you make changes in the JS Fiddle sample app. Click **Run** instead.
Clicking Save may break the fiddle's functionality.

.NET library
Claims reconciliation report:

* `IReport HealthpointClaimsReconciliationReport(string date)`
* `IReport HealthpointClaimsReconciliationReport(string merchantID, string terminalID, string date)`


Payments reconciliation report:

* `IReport HealthpointPaymentsReconciliationReport(string date)`
* `IReport HealthpointPaymentsReconciliationReport(string merchantID, string terminalID, string date)`


| Parameter | Description | Valid values |
|  --- | --- | --- |
| `date` | The date of the report. | Format `yyyyMMdd` |
| `merchantId` | The merchant ID to report on (part of multi-merchant support). | The Tyro merchant ID. |
| `terminalId` | The terminal ID to report on (part of multi-merchant support). | The Tyro terminal ID. |


## Claims reconciliation report

The response body consists of these XML elements:

| Response element | Description |
|  --- | --- |
| `claims-reconciliation-response/claims-reconciliation` | Contains the report header elements. |
| `claims-reconciliation-response/claims-reconciliation/healthpoint-terminal-id` | The terminal ID in the HealthPoint system. This is different from the Tyro TID. |
| `claims-reconciliation-response/claims-reconciliation/claim-date` | The date, in `yyyyMMdd` format, of the claims in the report. Amended claims can appear on a different date from the one they were submitted, if the amendment took place on this date. |
| `claims-reconciliation-response/claim` | Contains the details of a claim. |
| `claims-reconciliation-response/claim/terminal-date-time` | The local terminal time, in `yyyyMMddHHmmss` format, when the claim was submitted. |
| `claims-reconciliation-response/claim/transaction-date-time` | The time, in `yyyyMMddHHmmss` format, HealthPoint received the claim. |
| `claims-reconciliation-response/claim/response-date-time` | The time, in `yyyyMMddHHmmss` format, HealthPoint received the claim response. |
| `claims-reconciliation-response/claim/settlement-date-time` | The time, in `yyyyMMddHHmmss` format, the payment instruction is expected to be sent for execution. |
| `claims-reconciliation-response/claim/provider-id` | The provider who made the claim. |
| `claims-reconciliation-response/claim/private-health-fund-id` | The fund that processed the claim. |
| `claims-reconciliation-response/claim/ref-tag` | The unique transaction reference generated by the terminal, included on receipts. |
| `claims-reconciliation-response/claim/status` | The status of the claim. See the status table below. |
| `claims-reconciliation-response/claim/total-claim-amount` | The total claim amount, in cents. |
| `claims-reconciliation-response/claim/private-health-fund-total-benefit-amount` | The benefit amount, in cents. |
| `claims-reconciliation-response/claim/private-health-fund-response-code` | The response code from the fund, or 32 for an adjustment, or 93 if the fund didn't respond. |
| `claims-reconciliation-response/claim/text` | Any text entered when the claim was amended. |
| `claims-reconciliation-response/check` | A summary of the reconciliation data. Use it to check that all expected claims were received and processed. |
| `claims-reconciliation-response/check/total-number-claims` | The total number of claim elements. |
| `claims-reconciliation-response/check/sum-benefit-amount` | The sum of all benefit amounts, in cents. |
| `claims-reconciliation-response/check/sum-claim-amount` | The sum of all claim amounts, in cents. |


| Status | Definition |
|  --- | --- |
| `NEW` | The claim is approved but not yet settled. |
| `CAN` | The claim has been cancelled. |
| `VOID` | The claim was rejected by the user. |
| `AVOID` | The claim was auto voided (reversed) due to a system error. |
| `PAY` | Settled through HealthPoint consolidated settlement. |
| `PRC` | Required action processed (reversed). |
| `TPY` | Test paid. Settled by the fund directly. |
| `EST` | Rebate estimate. A gap amount was returned, but it isn't an approved claim. Applies to [rebate estimates](/docs/in-person-payments/pay-in-person/features/private-health-fund/rebate-estimate), which are JS library only. |


### Example response


```xml
<claims-reconciliation-response>
    <claims-reconciliation>
        <healthpoint-terminal-id>TYR11111</healthpoint-terminal-id>
        <claim-date>20240921</claim-date>
    </claims-reconciliation>
    <claim>
        <terminal-date-time>20240921123455</terminal-date-time>
        <settlement-date-time>20240921040000</settlement-date-time>
        <response-date-time>20240921123455</response-date-time>
        <transaction-date-time>20240921123455</transaction-date-time>
        <provider-id>2147661H</provider-id>
        <private-health-fund-id>PHF00999</private-health-fund-id>
        <ref-tag>0000010</ref-tag>
        <status>e.g. NEW, PAY, TPY (see table above)</status>
        <total-claim-amount>10000</total-claim-amount>
        <private-health-fund-total-benefit-amount>5000</private-health-fund-total-benefit-amount>
        <private-health-fund-response-code>00</private-health-fund-response-code>
        <text>any text entered when claim was amended</text>
    </claim>
    <claim>
        <terminal-date-time>20240921123455</terminal-date-time>
        <settlement-date-time>20240921040000</settlement-date-time>
        <response-date-time>20240921123455</response-date-time>
        <transaction-date-time>20240921123455</transaction-date-time>
        <provider-id>2147661H</provider-id>
        <private-health-fund-id>PHF00999</private-health-fund-id>
        <ref-tag>0000011</ref-tag>
        <status>e.g. NEW, PAY, TPY (see table above)</status>
        <total-claim-amount>10000</total-claim-amount>
        <private-health-fund-total-benefit-amount>5000</private-health-fund-total-benefit-amount>
        <private-health-fund-response-code>00</private-health-fund-response-code>
        <text>any text entered when claim was amended</text>
    </claim>
    <check>
        <total-number-claims>2</total-number-claims>
        <sum-benefit-amount>10000</sum-benefit-amount>
        <sum-claim-amount>20000</sum-claim-amount>
    </check>
</claims-reconciliation-response>
```

### Report unavailable

If the report is unavailable, a report unavailable response is returned:


```xml
<claims-reconciliation-response>
    <claims-reconciliation>
        <healthpoint-terminal-id>TYR11111</healthpoint-terminal-id>
        <claim-date>20240921</claim-date>
    </claims-reconciliation>
    <unavailable>
        <text>Report unavailable.</text>
        <text>Please try again later.</text>
    </unavailable>
</claims-reconciliation-response>
```

## Payments reconciliation report

The response body consists of these XML elements:

| Response element | Description |
|  --- | --- |
| `payments-reconciliation-response/payments-reconciliation` | Contains the report header elements. |
| `payments-reconciliation-response/payments-reconciliation/healthpoint-terminal-id` | The terminal ID in the HealthPoint system. This is different from the Tyro TID. |
| `payments-reconciliation-response/payments-reconciliation/payment-date` | The date, in `yyyyMMdd` format, the payment instructions were sent to the bank. |
| `payments-reconciliation-response/payment` | Contains the details of a settlement payment. |
| `payments-reconciliation-response/payment/terminal-date-time` | The local terminal time, in `yyyyMMddHHmmss` format, when the claim was submitted. |
| `payments-reconciliation-response/payment/transaction-date-time` | The time, in `yyyyMMddHHmmss` format, HealthPoint received the claim. |
| `payments-reconciliation-response/payment/response-date-time` | The time, in `yyyyMMddHHmmss` format, HealthPoint received the claim response. |
| `payments-reconciliation-response/payment/settlement-date-time` | The time, in `yyyyMMddHHmmss` format, the payment was submitted to the provider. |
| `payments-reconciliation-response/payment/provider-id` | The provider who made the claim. |
| `payments-reconciliation-response/payment/private-health-fund-id` | The fund that processed the claim. |
| `payments-reconciliation-response/payment/ref-tag` | The unique transaction reference generated by the terminal, included on receipts. |
| `payments-reconciliation-response/payment/total-claim-amount` | The total claim amount, in cents. |
| `payments-reconciliation-response/payment/private-health-fund-total-benefit-amount` | The benefit amount, in cents. |
| `payments-reconciliation-response/payment/private-health-fund-response-code` | The response code from the fund, or 32 for an adjustment. |
| `payments-reconciliation-response/payment/payment-amount` | The amount paid for the claim, in cents. |
| `payments-reconciliation-response/payment/text` | Any text entered when the claim was amended. |
| `payments-reconciliation-response/payment/bsb` | The BSB number for settlement. |
| `payments-reconciliation-response/payment/account-number` | The bank account number for settlement. |
| `payments-reconciliation-response/payment/payment-reference` | The bank lodgement reference shown on the bank account statement. |
| `payments-reconciliation-response/check` | A summary of the reconciliation data. Use it to check that all expected claims were received and processed. |
| `payments-reconciliation-response/check/total-number-payments` | The total number of payment elements. |
| `payments-reconciliation-response/check/sum-payment-amount` | The sum of all payment amounts, in cents. |
| `payments-reconciliation-response/check/sum-claim-amount` | The sum of all claim amounts, in cents. |


### Example response


```xml
<payments-reconciliation-response>
    <payments-reconciliation>
        <healthpoint-terminal-id>TYR11111</healthpoint-terminal-id>
        <payment-date>20240921</payment-date>
    </payments-reconciliation>
    <payment>
        <terminal-date-time>20240921123455</terminal-date-time>
        <settlement-date-time>20240921040000</settlement-date-time>
        <response-date-time>20240921123455</response-date-time>
        <transaction-date-time>20240921123455</transaction-date-time>
        <provider-id>2147661H</provider-id>
        <private-health-fund-id>PHF00999</private-health-fund-id>
        <ref-tag>0000010</ref-tag>
        <total-claim-amount>10000</total-claim-amount>
        <private-health-fund-total-benefit-amount>5000</private-health-fund-total-benefit-amount>
        <private-health-fund-response-code>00</private-health-fund-response-code>
        <payment-amount>5000</payment-amount>
        <text>any text entered when claim was amended</text>
        <bsb>069690</bsb>
        <account-number>100001</account-number>
        <payment-reference>your payment ref</payment-reference>
    </payment>
    <payment>
        <terminal-date-time>20240921123455</terminal-date-time>
        <settlement-date-time>20240921040000</settlement-date-time>
        <response-date-time>20240921123455</response-date-time>
        <transaction-date-time>20240921123455</transaction-date-time>
        <provider-id>2147661H</provider-id>
        <private-health-fund-id>PHF00999</private-health-fund-id>
        <ref-tag>0000011</ref-tag>
        <total-claim-amount>10000</total-claim-amount>
        <private-health-fund-total-benefit-amount>5000</private-health-fund-total-benefit-amount>
        <private-health-fund-response-code>00</private-health-fund-response-code>
        <payment-amount>5000</payment-amount>
        <text>any text entered when claim was amended</text>
        <bsb>069690</bsb>
        <account-number>100001</account-number>
        <payment-reference>your payment ref</payment-reference>
    </payment>
    <check>
        <total-number-payments>2</total-number-payments>
        <sum-payment-amount>10000</sum-payment-amount>
        <sum-claim-amount>20000</sum-claim-amount>
    </check>
</payments-reconciliation-response>
```

### Report unavailable

If the report is unavailable, a report unavailable response is returned:


```xml
<payments-reconciliation-response>
    <payments-reconciliation>
        <healthpoint-terminal-id>TYR11111</healthpoint-terminal-id>
        <payment-date>20240921</payment-date>
    </payments-reconciliation>
    <unavailable>
        <text>Report unavailable.</text>
        <text>Please try again later.</text>
    </unavailable>
</payments-reconciliation-response>
```