> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.rebateright.com.au/api-reference/medicare-eligibility/eligibility-check/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.rebateright.com.au/_mcp/server. # Eligibility Check POST https://api.rebateright.com.au/CalculateRebate Content-Type: application/json That is the question this endpoint answers, for up to 50 MBS items in one call, with the reasoning behind every answer. Verifies the patient with Medicare and checks each item you send. One item can be eligible while another is not. ## What you get back ``` PatientVerification Rebates[] ├─ ItemNumber ├─ IsEligible ├─ Reason ├─ ReasonCode ├─ Benefit ├─ ItemScheduleFee └─ Checks[] ├─ Title ├─ IsEligible ├─ Reason └─ ReasonCode ``` Three levels, each answering a narrower question: | Level | Answers | Use it for | | ----------------------------------- | ------------------------------------ | -------------------------------- | | The patient (`PatientVerification`) | Did Medicare recognise this patient? | Correcting the patient's details | | Each item (`Rebates`) | Can the patient claim this item? | The answer you act on | | Each check on an item (`Checks`) | What one rule found | The working behind that answer | Items and checks carry the same three fields: | Field | What it holds | | ------------ | ------------------------------------------- | | `IsEligible` | The answer. `true`, `false`, or `null` | | `Reason` | Why, in one sentence you can show as it is. | | `ReasonCode` | A code for that reason, for analytics only. | An item carries four more: | Field | What it holds | | ----------------- | ------------------------------------------------------ | | `ItemNumber` | The item you asked about, echoed back. `"104"` | | `Benefit` | What Medicare pays, in dollars. `"88.36"`, never cents | | `ItemScheduleFee` | The MBS fee for the item. `"103.95"` | | `Checks` | One entry per check that ran on this item | A check carries one more, `Title`, naming what it looked at: `"Patient age"`, `"Frequency of service"`. The answer on each item, the benefit and the checks, laid out as a screen. For the front desk as much as the developer. A full response is in the example panel alongside this page. ## `IsEligible`: `true`, `false`, or `null` `IsEligible` is not a yes/no flag. Handle all three values: | `IsEligible` | Result | Meaning | What to do | | ------------ | ---------------------- | ---------------------------------------------- | ----------------------------------------- | | `true` | **`eligible`** | The patient is eligible to claim this item. | Proceed with the claim. | | `false` | **`not eligible`** | The patient is not eligible. | Show `Reason`. A claim would not be paid. | | `null` | **`cannot determine`** | The item couldn't be checked for this patient. | Show `Reason`, and see below. | ## When `IsEligible` is `null` Something a check needed was missing or unavailable, so the item could not be decided. A `null` is never a quiet `false`. Only `false` says the patient can't claim. The causes include: | Cause | What to do | | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | | No referrer sent, on an item that requires one | Send `ReferrerProviderNumber` and check again. See [Provider Atlas](/provider-atlas). | | A field is missing, or its value is wrong | Fix that field and check again. `Reason` names it. | | Medicare doesn't verify this item online, and it has a claim-frequency limit | Nothing is missing from your request. Decide using the patient's history. See [coverage](/eligibility-coverage). | | The details you hold don't match Medicare's current record | Correct the details and check again. `PatientVerification` says what was wrong, and `Checks` shows what could still be checked. | ## The checks Every check that ran on an item appears as an entry in its `Checks`: patient age, referrer eligibility, in-hospital status, how often the item has been claimed, items that conflict on the same day, the servicing provider, and more. Check titles stay stable. New checks appear as coverage grows, so handle unfamiliar titles gracefully. Not every item can be confirmed with Medicare online. Those answers are **indicative**. The [coverage guide](/eligibility-coverage) lists which items fall where. ## How to use each field | Field | Use it for | Don't | | ------------ | ----------------------------------------- | -------------------------------- | | `IsEligible` | Branching your logic. | Treating it as a boolean. | | `Reason` | Showing the outcome to staff or patients. | Parsing it. The wording changes. | | `ReasonCode` | Analytics, grouping, and reporting. | Branching your logic. | **New `ReasonCode` values appear over time**, as RebateRight covers more checks. That is not a breaking change, so treat the set as open. **Display `Reason` exactly as supplied.** It is a requirement by Services Australia that its messages are displayed to the end user exactly as supplied in the response, not truncated, transformed, or changed in any way. The wording may be updated at any time, so never parse `Reason` for logic. This applies at both levels, the item's `Reason` and each check's. Reference: https://docs.rebateright.com.au/api-reference/medicare-eligibility/eligibility-check ## Authentication - `x-api-key` header (required) — API Key authentication via header - `x-minor-id` header (required) — Your Minor ID is three uppercase letters followed by five digits, such as `MDE00001`. Send the Minor ID exactly as issued. A malformed value gets a 400 with "The Minor ID is not valid." on every endpoint. ## Servers - `https://api.rebateright.com.au` (Production, default) - `https://test-api.rebateright.com.au` (Test) ## Request ### Body (application/json) This endpoint expects an object. - `MedicareItems` (list of CalculateRebatePostRequestBodyContentApplicationJsonSchemaMedicareItemsItems, required) — MBS items to evaluate. Up to **50 items total**, grouped into up to **16 medical events** (via `MedicalEventId`) with up to **14 items per event**. - `DateOfService` (date, optional) — Date the service was / will be performed (`YYYY-MM-DD`). Defaults to today when omitted. Cannot be in the future or more than 2 years in the past. - `InHospitalTreatment` (boolean, optional) — Whether the service is provided to an in-hospital patient. Drives the in-hospital vs out-of-hospital rebate percentage and several MBS restriction rules. Defaults to false when omitted — the service is treated as out-of-hospital. - `BulkBilled` (boolean, optional) — Optional. Indicates the service will be bulk-billed. Used only by rules that differ between bulk-bill and non-bulk-bill scenarios. Defaults to false when omitted — benefits are quoted at the not-bulk-billed rate, so an item carrying the bulk-billing incentive quotes 85% rather than 95% of the Schedule Fee unless you set it. - `PatientDateOfBirth` (date, optional) — Patient date of birth (`YYYY-MM-DD`). Cannot be a future date or more than 130 years in the past. - `PatientFamilyName` (string, optional) — Patient family name as it appears on the Medicare card. - `PatientGivenName` (string, optional) — Patient first given name as it appears on the Medicare card. - `PatientSex` (enum, optional) — Patient sex (Services Australia coding). | Code | Meaning | |---|---| | `1` | Male | | `2` | Female | | `3` | Other | | `9` | Not stated / inadequately described | On a sex-restricted item, `9` returns `IsEligible: null`, since the restriction can't be checked without a recorded sex. - Allowed values: `1`, `2`, `3`, `9` - `PatientMedicareNumber` (string, optional) — Patient's 10-digit Medicare card number. - `PatientMedicareRefNumber` (string, optional) — Individual Reference Number (IRN) from the patient's Medicare card, a single digit identifying the family member. - `ReferrerProviderNumber` (string, optional) — Referring provider's Medicare provider number. Required when any requested item has a referrer restriction. Omit it and those items return `IsEligible: null` (**`cannot determine`**); supply a referrer Medicare doesn't recognise for the item and they return `IsEligible: false` with a plain-language reason. See the [Provider Atlas](/provider-atlas) for who may refer what. - `ServicingProviderNumber` (string, optional) — Provider number of the health professional who performs the service. - `PrincipalProviderNumber` (string, optional) — Provider number of the practice / principal provider the service is billed under. Often the same as `ServicingProviderNumber`. ## Response ### 200 OK - `PatientVerification` (CalculateRebatePostResponsesContentApplicationJsonSchemaPatientVerification, required) — Did Medicare recognise this patient? Always present. Same outcome as the [Patient Verification](/api-reference/medicare-eligibility/patient-verification) endpoint, which documents the corrections in full. - `Rebates` (list of CalculateRebatePostResponsesContentApplicationJsonSchemaRebatesItems, required) — One entry per item you sent, on every response. Match entries by `ItemNumber` rather than by position, since rules that weigh items against each other (such as coning) can reorder them. If you sent the same item twice, the duplicates keep their relative order. - `Reason` (string, required) — Legacy summary field, kept for backward compatibility. New integrations can ignore it and read `PatientVerification` and `Rebates` instead. ## Types ### CalculateRebatePostRequestBodyContentApplicationJsonSchemaMedicareItemsItems A single MBS item to evaluate. Only `ItemNumber` is required. The remaining fields are **optional service overrides** used when integrators need precise control over how the item is sent to Medicare or to group multiple items into the same medical event — ignore them all if you don't need that control. - `ItemNumber` (string, required) — Numeric MBS item number (`1`–`99999`, up to 5 digits). - `ChargeAmount` (string, optional) — Optional. Overrides the charge sent to Medicare for this item, expressed in **whole cents** as a numeric string (`100`–`999999`, no decimal, no spaces — `$1.00` is `"100"`, `$150.00` is `"15000"`). Minimum `"100"` (`$1.00`). When omitted, RebateRight supplies a high default so eligibility isn't masked by under-charging. - `MedicalEventId` (string, optional) — Optional. Groups items into the same medical event (same provider, same visit). Items sharing a value are sent to Medicare under one medical event; items with no `MedicalEventId` each become their own event. Useful for coning and same-day-rule evaluation. - `FieldQuantity` (string, optional) — Optional. Service quantity passed to Medicare as `fieldQuantity`. Leave unset for single-service items. - `NumberOfPatientsSeen` (string, optional) — Optional. Number of patients seen for a group attendance item (`1`–`99`). - `NotNormalAftercare` (boolean, optional) — Optional. Set to `true` to flag the service as **not normal aftercare** (sends `aftercareOverrideInd` = `Y` to Medicare). Use only when the aftercare rule genuinely doesn't apply. - `MoreThanOnceOnSameDay` (boolean, optional) — Optional. Set to `true` to override Medicare's duplicate-service rule when the same item legitimately happens more than once on the same day (sends `duplicateServiceOverrideInd` = `Y`). - `IgnoreItemRestrictions` (boolean, optional) — Optional. Overrides Medicare's item-restriction rule (`restrictionOverrideInd`). `true` sends `Y`, `false` sends `N`; omit to let Medicare apply the default. - `IgnoreTimeDependantRestrictions` (boolean, optional) — Optional. Overrides Medicare's time-dependant restriction rule (`timeDependantOverrideInd`). `true` sends `Y`, `false` sends `N`; omit to let Medicare apply the default. - `NonMBSItem` (boolean, optional) — Optional. Set to `true` to indicate the item is not an MBS-coded item, which suppresses the `serviceCodeTypeCode` = `C` flag on the Medicare payload. ### CalculateRebatePostResponsesContentApplicationJsonSchemaPatientVerification Did Medicare recognise this patient? Always present. Same outcome as the [Patient Verification](/api-reference/medicare-eligibility/patient-verification) endpoint, which documents the corrections in full. - `Verified` (boolean, required, nullable) — | `Verified` | Result | Meaning | |---|---|---| | `true` | **`patient verified`** | Patient details verified with Medicare. | | `false` | **`details don't match`** | The details you hold don't match Medicare's current record. Correct the patient's record before claiming. | | `null` | **`cannot determine`** | The details couldn't be checked against Medicare's record. `Reason` says what stopped it. | Same three values as `IsEligible`, and **`cannot determine`** means the same thing on both. A Medicare error reads `null`, never `false`. **`patient verified`** covers the fields Medicare checks, not every field you sent — it does not check family name or sex, so those can still differ. - `Reason` (string, required) — Human-readable explanation of the check outcome — Medicare's determination, or the validation failure when the Medicare call never ran. - `ReasonCode` (string, required) — Machine-readable label for this outcome. Always present. **Use it for analytics and grouping, not for branching.** The codes are refined over time as RebateRight's coverage grows, so treat them as an open set and handle unfamiliar values gracefully. Branch on `Verified`, which is stable. - `CorrectSex` (string, optional, nullable) — Always `null` — Medicare does not report corrections to sex. - `CorrectGivenName` (string, optional, nullable) — Corrected given name when Medicare's records differ and the given name is the only field wrong; `null` otherwise. - `CorrectFamilyName` (string, optional, nullable) — Always `null` — Medicare does not report corrections to family name. - `CorrectDateOfBirth` (string, optional, nullable) — Always `null` — Medicare signals a date-of-birth mismatch in `Reason` but does not return the correct value. - `CorrectMedicareNumber` (string, optional, nullable) — Corrected 10-digit Medicare card number when Medicare has re-issued the card; `null` otherwise. - `CorrectMedicareReferenceNumber` (string, optional, nullable) — Corrected IRN when the IRN was the only field wrong, or when a new Medicare card has been issued; `null` otherwise. ### CalculateRebatePostResponsesContentApplicationJsonSchemaRebatesItems - `ItemNumber` (string, required) — Echo of the submitted MBS item number. - `IsEligible` (boolean, required, nullable) — Can the patient claim this item: `true`, `false`, or `null` when it couldn't be determined. Branch on all three. It follows the item's checks: `false` if any check found it not eligible, otherwise `null` if any couldn't be determined, otherwise `true`. `Checks` shows which. - `Reason` (string, required) — One plain sentence explaining the answer, for display exactly as returned. It comes from the first check that didn't clear the item, or confirms eligibility when they all cleared. It's a convenience for surfaces showing one line per item; read `Checks` for the full picture. - `ReasonCode` (string, required) — Machine-readable label for this outcome, taken from the same check as `Reason`. Always present. **Use it for analytics and grouping, not for branching.** The codes are refined over time as RebateRight's coverage grows, so treat them as an open set and handle unfamiliar values gracefully. Branch on `IsEligible`, which is stable. - `Benefit` (string, required) — Medicare benefit payable for this item, as a **dollar decimal string** (for example `"20.05"`). `"0"` when no benefit is payable. Dollars, not cents; RebateRight's Bulk Bill reports use cents. - `ItemScheduleFee` (string, required, nullable) — MBS schedule fee for this item at `DateOfService`, as a **dollar decimal string** (for example `"452.05"`). `null` when no fee could be established; an unknown item that Medicare still assessed returns `"0"`. - `Checks` (list of CalculateRebatePostResponsesContentApplicationJsonSchemaRebatesItemsChecksItems, required) — One entry per check that ran on this item. This is the structured way to read an outcome: iterate it to see what each check found, instead of parsing the item's `Reason`. ### CalculateRebatePostResponsesContentApplicationJsonSchemaRebatesItemsChecksItems - `Title` (string, required) — Stable check category, suitable for grouping or display (for example `Patient age`, `Referrer eligibility`, `Servicing provider`, or `Frequency of service`). Titles stay constant even as the underlying `Reason` and `ReasonCode` evolve. - `IsEligible` (boolean, required, nullable) — Tri-state result for this check, same shape as the item-level answer: | `IsEligible` | Result | Meaning | |---|---|---| | `true` | **`eligible`** | The check found the item eligible. | | `false` | **`not eligible`** | The check found the item not eligible. | | `null` | **`cannot determine`** | `Reason` says what this check needed — for example a referrer-restricted item with no `ReferrerProviderNumber` supplied. | - `Reason` (string, required) — Plain-language finding for this specific check. For a not-eligible or undetermined check, this is the same wording that reaches the item-level `Reason`. Partly passthrough from Services Australia: display it to staff or patients exactly as returned and don't parse it; the wording is refined over time. - `ReasonCode` (string, required) — Machine-readable label for this check's outcome. Always present. **Use it for analytics and grouping, not for branching.** The codes are refined over time as RebateRight's coverage grows, so treat them as an open set and handle unfamiliar values gracefully. Branch on `IsEligible`, which is stable. ## Examples ### Eligible **Request** ```json { "MedicareItems": [ { "ItemNumber": "104" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ReferrerProviderNumber": "2447791K", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } ``` **Response** ```json { "PatientVerification": { "Verified": true, "Reason": "The patient information matches Medicare's records.", "ReasonCode": "Match", "CorrectSex": null, "CorrectGivenName": null, "CorrectFamilyName": null, "CorrectDateOfBirth": null, "CorrectMedicareNumber": null, "CorrectMedicareReferenceNumber": null }, "Rebates": [ { "ItemNumber": "104", "IsEligible": true, "Reason": "The patient is eligible to claim this item.", "ReasonCode": "Eligible", "Benefit": "88.36", "ItemScheduleFee": "103.95", "Checks": [ { "Title": "Patient age", "IsEligible": true, "Reason": "This Medicare item does not have patient age restrictions.", "ReasonCode": "Eligible" }, { "Title": "Referrer eligibility", "IsEligible": true, "Reason": "The referrer you provided is eligible to refer this item, because the Medicare Provider Directory lists them as 'Physiotherapist'. This item accepts a referral from any provider recognised as 'Practitioner'.", "ReasonCode": "Eligible" }, { "Title": "In-hospital status", "IsEligible": true, "Reason": "The rebate for this Medicare item is available to both in-hospital and out-of-hospital patients.", "ReasonCode": "Eligible" }, { "Title": "Patient sex", "IsEligible": true, "Reason": "This item is not restricted based on patient sex.", "ReasonCode": "Eligible" }, { "Title": "Frequency of service", "IsEligible": true, "Reason": "This item's frequency-of-service and prior-claim limits were not exceeded.", "ReasonCode": "Eligible" }, { "Title": "Multiple item restrictions", "IsEligible": true, "Reason": "No conflicting or mutually exclusive item restrictions applied to this claim.", "ReasonCode": "Eligible" }, { "Title": "Other Medicare checks", "IsEligible": true, "Reason": "Medicare's remaining checks (servicing provider, referral requirements, and similar) raised no restrictions.", "ReasonCode": "Eligible" } ] } ], "Reason": "The patient information matches Medicare's records." } ``` **SDK Code** ```python Eligible import requests url = "https://api.rebateright.com.au/CalculateRebate" payload = { "MedicareItems": [{ "ItemNumber": "104" }], "InHospitalTreatment": False, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ReferrerProviderNumber": "2447791K", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Eligible const url = 'https://api.rebateright.com.au/CalculateRebate'; const options = { method: 'POST', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{"MedicareItems":[{"ItemNumber":"104"}],"InHospitalTreatment":false,"PatientDateOfBirth":"1986-12-18","PatientFamilyName":"FLETCHER","PatientGivenName":"Edmond","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"2","ReferrerProviderNumber":"2447791K","ServicingProviderNumber":"2447781L","PrincipalProviderNumber":"2447781L"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Eligible package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.rebateright.com.au/CalculateRebate" payload := strings.NewReader("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"104\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ReferrerProviderNumber\": \"2447791K\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-api-key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Eligible require 'uri' require 'net/http' url = URI("https://api.rebateright.com.au/CalculateRebate") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"104\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ReferrerProviderNumber\": \"2447791K\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}" response = http.request(request) puts response.read_body ``` ```java Eligible import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.rebateright.com.au/CalculateRebate") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"104\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ReferrerProviderNumber\": \"2447791K\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") .asString(); ``` ```php Eligible request('POST', 'https://api.rebateright.com.au/CalculateRebate', [ 'body' => '{ "MedicareItems": [ { "ItemNumber": "104" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ReferrerProviderNumber": "2447791K", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" }', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp Eligible using RestSharp; var client = new RestClient("https://api.rebateright.com.au/CalculateRebate"); var request = new RestRequest(Method.POST); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"104\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ReferrerProviderNumber\": \"2447791K\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Eligible import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = [ "MedicareItems": [["ItemNumber": "104"]], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ReferrerProviderNumber": "2447791K", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/CalculateRebate")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Eligible (indicative) **Request** ```json { "MedicareItems": [ { "ItemNumber": "23" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } ``` **Response** ```json { "PatientVerification": { "Verified": true, "Reason": "The patient information matches Medicare's records.", "ReasonCode": "Match", "CorrectSex": null, "CorrectGivenName": null, "CorrectFamilyName": null, "CorrectDateOfBirth": null, "CorrectMedicareNumber": null, "CorrectMedicareReferenceNumber": null }, "Rebates": [ { "ItemNumber": "23", "IsEligible": true, "Reason": "This item has no frequency-of-service limit, so this check finds it eligible. Medicare doesn't verify it online for out-of-hospital claims, so the answer is indicative.", "ReasonCode": "IndicativeNoFrequencyLimit", "Benefit": "45.05", "ItemScheduleFee": "45.05", "Checks": [ { "Title": "Patient age", "IsEligible": true, "Reason": "This Medicare item does not have patient age restrictions.", "ReasonCode": "Eligible" }, { "Title": "Referrer eligibility", "IsEligible": true, "Reason": "A referral is optional for this item, so it is accepted with any referrer or with none.", "ReasonCode": "Eligible" }, { "Title": "In-hospital status", "IsEligible": true, "Reason": "The rebate for this Medicare item is available for out-of-hospital patients, and the patient is marked as out-of-hospital.", "ReasonCode": "Eligible" }, { "Title": "Patient sex", "IsEligible": true, "Reason": "This item is not restricted based on patient sex.", "ReasonCode": "Eligible" }, { "Title": "Frequency of service", "IsEligible": true, "Reason": "This item has no frequency-of-service limit, so this check finds it eligible. Medicare doesn't verify it online for out-of-hospital claims, so the answer is indicative.", "ReasonCode": "IndicativeNoFrequencyLimit" } ] } ], "Reason": "The patient information matches Medicare's records." } ``` **SDK Code** ```python Eligible (indicative) import requests url = "https://api.rebateright.com.au/CalculateRebate" payload = { "MedicareItems": [{ "ItemNumber": "23" }], "InHospitalTreatment": False, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Eligible (indicative) const url = 'https://api.rebateright.com.au/CalculateRebate'; const options = { method: 'POST', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{"MedicareItems":[{"ItemNumber":"23"}],"InHospitalTreatment":false,"PatientDateOfBirth":"1986-12-18","PatientFamilyName":"FLETCHER","PatientGivenName":"Edmond","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"2","ServicingProviderNumber":"2447781L","PrincipalProviderNumber":"2447781L"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Eligible (indicative) package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.rebateright.com.au/CalculateRebate" payload := strings.NewReader("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"23\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-api-key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Eligible (indicative) require 'uri' require 'net/http' url = URI("https://api.rebateright.com.au/CalculateRebate") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"23\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}" response = http.request(request) puts response.read_body ``` ```java Eligible (indicative) import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.rebateright.com.au/CalculateRebate") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"23\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") .asString(); ``` ```php Eligible (indicative) request('POST', 'https://api.rebateright.com.au/CalculateRebate', [ 'body' => '{ "MedicareItems": [ { "ItemNumber": "23" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" }', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp Eligible (indicative) using RestSharp; var client = new RestClient("https://api.rebateright.com.au/CalculateRebate"); var request = new RestRequest(Method.POST); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"23\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Eligible (indicative) import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = [ "MedicareItems": [["ItemNumber": "23"]], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/CalculateRebate")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Not eligible (item is in-hospital only) **Request** ```json { "MedicareItems": [ { "ItemNumber": "37201" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } ``` **Response** ```json { "PatientVerification": { "Verified": true, "Reason": "The patient information matches Medicare's records.", "ReasonCode": "Match", "CorrectSex": null, "CorrectGivenName": null, "CorrectFamilyName": null, "CorrectDateOfBirth": null, "CorrectMedicareNumber": null, "CorrectMedicareReferenceNumber": null }, "Rebates": [ { "ItemNumber": "37201", "IsEligible": false, "Reason": "The rebate for this Medicare item is only available for in-hospital patients, while the patient is marked as out-of-hospital.", "ReasonCode": "RequiresInHospital", "Benefit": "0", "ItemScheduleFee": "992.10", "Checks": [ { "Title": "Patient age", "IsEligible": true, "Reason": "This Medicare item does not have patient age restrictions.", "ReasonCode": "Eligible" }, { "Title": "Referrer eligibility", "IsEligible": true, "Reason": "A referral is optional for this item, so it is accepted with any referrer or with none.", "ReasonCode": "Eligible" }, { "Title": "In-hospital status", "IsEligible": false, "Reason": "The rebate for this Medicare item is only available for in-hospital patients, while the patient is marked as out-of-hospital.", "ReasonCode": "RequiresInHospital" }, { "Title": "Patient sex", "IsEligible": true, "Reason": "This item is not restricted based on patient sex.", "ReasonCode": "Eligible" }, { "Title": "Frequency of service", "IsEligible": true, "Reason": "This item's frequency-of-service and prior-claim limits were not exceeded.", "ReasonCode": "Eligible" }, { "Title": "Multiple item restrictions", "IsEligible": true, "Reason": "No conflicting or mutually exclusive item restrictions applied to this claim.", "ReasonCode": "Eligible" }, { "Title": "Other Medicare checks", "IsEligible": true, "Reason": "Medicare's remaining checks (servicing provider, referral requirements, and similar) raised no restrictions.", "ReasonCode": "Eligible" } ] } ], "Reason": "The patient information matches Medicare's records." } ``` **SDK Code** ```python Not eligible (item is in-hospital only) import requests url = "https://api.rebateright.com.au/CalculateRebate" payload = { "MedicareItems": [{ "ItemNumber": "37201" }], "InHospitalTreatment": False, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Not eligible (item is in-hospital only) const url = 'https://api.rebateright.com.au/CalculateRebate'; const options = { method: 'POST', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{"MedicareItems":[{"ItemNumber":"37201"}],"InHospitalTreatment":false,"PatientDateOfBirth":"1986-12-18","PatientFamilyName":"FLETCHER","PatientGivenName":"Edmond","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"2","ServicingProviderNumber":"2447781L","PrincipalProviderNumber":"2447781L"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Not eligible (item is in-hospital only) package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.rebateright.com.au/CalculateRebate" payload := strings.NewReader("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"37201\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-api-key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Not eligible (item is in-hospital only) require 'uri' require 'net/http' url = URI("https://api.rebateright.com.au/CalculateRebate") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"37201\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}" response = http.request(request) puts response.read_body ``` ```java Not eligible (item is in-hospital only) import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.rebateright.com.au/CalculateRebate") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"37201\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") .asString(); ``` ```php Not eligible (item is in-hospital only) request('POST', 'https://api.rebateright.com.au/CalculateRebate', [ 'body' => '{ "MedicareItems": [ { "ItemNumber": "37201" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" }', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp Not eligible (item is in-hospital only) using RestSharp; var client = new RestClient("https://api.rebateright.com.au/CalculateRebate"); var request = new RestRequest(Method.POST); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"37201\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Not eligible (item is in-hospital only) import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = [ "MedicareItems": [["ItemNumber": "37201"]], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/CalculateRebate")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Not eligible (already claimed recently) **Request** ```json { "MedicareItems": [ { "ItemNumber": "58120" }, { "ItemNumber": "58121" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ReferrerProviderNumber": "2447791K", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } ``` **Response** ```json { "PatientVerification": { "Verified": true, "Reason": "The patient information matches Medicare's records.", "ReasonCode": "Match", "CorrectSex": null, "CorrectGivenName": null, "CorrectFamilyName": null, "CorrectDateOfBirth": null, "CorrectMedicareNumber": null, "CorrectMedicareReferenceNumber": null }, "Rebates": [ { "ItemNumber": "58120", "IsEligible": true, "Reason": "The patient is eligible to claim this item.", "ReasonCode": "Eligible", "Benefit": "110.12", "ItemScheduleFee": "129.55", "Checks": [ { "Title": "Patient age", "IsEligible": true, "Reason": "This Medicare item does not have patient age restrictions.", "ReasonCode": "Eligible" }, { "Title": "Referrer eligibility", "IsEligible": true, "Reason": "The referrer you provided is eligible to refer this item, because the Medicare Provider Directory lists them as 'Physiotherapist'.", "ReasonCode": "Eligible" }, { "Title": "In-hospital status", "IsEligible": true, "Reason": "The rebate for this Medicare item is available to both in-hospital and out-of-hospital patients.", "ReasonCode": "Eligible" }, { "Title": "Patient sex", "IsEligible": true, "Reason": "This item is not restricted based on patient sex.", "ReasonCode": "Eligible" }, { "Title": "Frequency of service", "IsEligible": true, "Reason": "This item's frequency-of-service and prior-claim limits were not exceeded.", "ReasonCode": "Eligible" }, { "Title": "Multiple item restrictions", "IsEligible": true, "Reason": "No conflicting or mutually exclusive item restrictions applied to this claim.", "ReasonCode": "Eligible" }, { "Title": "Other Medicare checks", "IsEligible": true, "Reason": "Medicare's remaining checks (servicing provider, referral requirements, and similar) raised no restrictions.", "ReasonCode": "Eligible" } ] }, { "ItemNumber": "58121", "IsEligible": false, "Reason": "Maximum number of services for this item already paid", "ReasonCode": "MaximumNumberOfServicesForThisItemAlreadyPaid_160", "Benefit": "0", "ItemScheduleFee": "129.55", "Checks": [ { "Title": "Patient age", "IsEligible": true, "Reason": "This Medicare item does not have patient age restrictions.", "ReasonCode": "Eligible" }, { "Title": "Referrer eligibility", "IsEligible": true, "Reason": "The referrer you provided is eligible to refer this item, because the Medicare Provider Directory lists them as 'Physiotherapist'.", "ReasonCode": "Eligible" }, { "Title": "In-hospital status", "IsEligible": true, "Reason": "The rebate for this Medicare item is available to both in-hospital and out-of-hospital patients.", "ReasonCode": "Eligible" }, { "Title": "Patient sex", "IsEligible": true, "Reason": "This item is not restricted based on patient sex.", "ReasonCode": "Eligible" }, { "Title": "Frequency of service", "IsEligible": false, "Reason": "Maximum number of services for this item already paid", "ReasonCode": "MaximumNumberOfServicesForThisItemAlreadyPaid_160" } ] } ], "Reason": "The patient information matches Medicare's records." } ``` **SDK Code** ```python Not eligible (already claimed recently) import requests url = "https://api.rebateright.com.au/CalculateRebate" payload = { "MedicareItems": [{ "ItemNumber": "58120" }, { "ItemNumber": "58121" }], "InHospitalTreatment": False, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ReferrerProviderNumber": "2447791K", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Not eligible (already claimed recently) const url = 'https://api.rebateright.com.au/CalculateRebate'; const options = { method: 'POST', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{"MedicareItems":[{"ItemNumber":"58120"},{"ItemNumber":"58121"}],"InHospitalTreatment":false,"PatientDateOfBirth":"1986-12-18","PatientFamilyName":"FLETCHER","PatientGivenName":"Edmond","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"2","ReferrerProviderNumber":"2447791K","ServicingProviderNumber":"2447781L","PrincipalProviderNumber":"2447781L"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Not eligible (already claimed recently) package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.rebateright.com.au/CalculateRebate" payload := strings.NewReader("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"58120\"\n },\n {\n \"ItemNumber\": \"58121\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ReferrerProviderNumber\": \"2447791K\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-api-key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Not eligible (already claimed recently) require 'uri' require 'net/http' url = URI("https://api.rebateright.com.au/CalculateRebate") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"58120\"\n },\n {\n \"ItemNumber\": \"58121\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ReferrerProviderNumber\": \"2447791K\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}" response = http.request(request) puts response.read_body ``` ```java Not eligible (already claimed recently) import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.rebateright.com.au/CalculateRebate") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"58120\"\n },\n {\n \"ItemNumber\": \"58121\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ReferrerProviderNumber\": \"2447791K\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") .asString(); ``` ```php Not eligible (already claimed recently) request('POST', 'https://api.rebateright.com.au/CalculateRebate', [ 'body' => '{ "MedicareItems": [ { "ItemNumber": "58120" }, { "ItemNumber": "58121" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ReferrerProviderNumber": "2447791K", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" }', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp Not eligible (already claimed recently) using RestSharp; var client = new RestClient("https://api.rebateright.com.au/CalculateRebate"); var request = new RestRequest(Method.POST); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"58120\"\n },\n {\n \"ItemNumber\": \"58121\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ReferrerProviderNumber\": \"2447791K\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Not eligible (already claimed recently) import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = [ "MedicareItems": [["ItemNumber": "58120"], ["ItemNumber": "58121"]], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ReferrerProviderNumber": "2447791K", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/CalculateRebate")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Not eligible (items conflict) **Request** ```json { "MedicareItems": [ { "ItemNumber": "58900" }, { "ItemNumber": "58909" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ReferrerProviderNumber": "2054781W", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } ``` **Response** ```json { "PatientVerification": { "Verified": true, "Reason": "The patient information matches Medicare's records.", "ReasonCode": "Match", "CorrectSex": null, "CorrectGivenName": null, "CorrectFamilyName": null, "CorrectDateOfBirth": null, "CorrectMedicareNumber": null, "CorrectMedicareReferenceNumber": null }, "Rebates": [ { "ItemNumber": "58900", "IsEligible": true, "Reason": "The patient is eligible to claim this item.", "ReasonCode": "Eligible", "Benefit": "35.79", "ItemScheduleFee": "42.10", "Checks": [ { "Title": "Patient age", "IsEligible": true, "Reason": "This Medicare item does not have patient age restrictions.", "ReasonCode": "Eligible" }, { "Title": "Referrer eligibility", "IsEligible": true, "Reason": "A referral is optional for this item, so it is accepted with any referrer or with none.", "ReasonCode": "Eligible" }, { "Title": "In-hospital status", "IsEligible": true, "Reason": "The rebate for this Medicare item is available to both in-hospital and out-of-hospital patients.", "ReasonCode": "Eligible" }, { "Title": "Patient sex", "IsEligible": true, "Reason": "This item is not restricted based on patient sex.", "ReasonCode": "Eligible" }, { "Title": "Frequency of service", "IsEligible": true, "Reason": "This item's frequency-of-service and prior-claim limits were not exceeded.", "ReasonCode": "Eligible" }, { "Title": "Multiple item restrictions", "IsEligible": true, "Reason": "No conflicting or mutually exclusive item restrictions applied to this claim.", "ReasonCode": "Eligible" }, { "Title": "Other Medicare checks", "IsEligible": true, "Reason": "Medicare's remaining checks (servicing provider, referral requirements, and similar) raised no restrictions.", "ReasonCode": "Eligible" } ] }, { "ItemNumber": "58909", "IsEligible": false, "Reason": "Item restrictive with another item", "ReasonCode": "ItemRestrictiveWithAnotherItem_702", "Benefit": "0", "ItemScheduleFee": "105.90", "Checks": [ { "Title": "Patient age", "IsEligible": true, "Reason": "This Medicare item does not have patient age restrictions.", "ReasonCode": "Eligible" }, { "Title": "Referrer eligibility", "IsEligible": null, "Reason": "The referrer's provider number you provided, '2054781W', is not in the current Medicare Provider Directory. Each provider number belongs to one practice location, which the referrer may have closed. Check the number on the referral, or ask the referrer for their current provider number.", "ReasonCode": "ReferrerProviderNumberNotFound" }, { "Title": "In-hospital status", "IsEligible": true, "Reason": "The rebate for this Medicare item is available to both in-hospital and out-of-hospital patients.", "ReasonCode": "Eligible" }, { "Title": "Patient sex", "IsEligible": true, "Reason": "This item is not restricted based on patient sex.", "ReasonCode": "Eligible" }, { "Title": "Multiple item restrictions", "IsEligible": false, "Reason": "Item restrictive with another item", "ReasonCode": "ItemRestrictiveWithAnotherItem_702" } ] } ], "Reason": "The patient information matches Medicare's records." } ``` **SDK Code** ```python Not eligible (items conflict) import requests url = "https://api.rebateright.com.au/CalculateRebate" payload = { "MedicareItems": [{ "ItemNumber": "58900" }, { "ItemNumber": "58909" }], "InHospitalTreatment": False, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ReferrerProviderNumber": "2054781W", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Not eligible (items conflict) const url = 'https://api.rebateright.com.au/CalculateRebate'; const options = { method: 'POST', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{"MedicareItems":[{"ItemNumber":"58900"},{"ItemNumber":"58909"}],"InHospitalTreatment":false,"PatientDateOfBirth":"1986-12-18","PatientFamilyName":"FLETCHER","PatientGivenName":"Edmond","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"2","ReferrerProviderNumber":"2054781W","ServicingProviderNumber":"2447781L","PrincipalProviderNumber":"2447781L"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Not eligible (items conflict) package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.rebateright.com.au/CalculateRebate" payload := strings.NewReader("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"58900\"\n },\n {\n \"ItemNumber\": \"58909\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ReferrerProviderNumber\": \"2054781W\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-api-key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Not eligible (items conflict) require 'uri' require 'net/http' url = URI("https://api.rebateright.com.au/CalculateRebate") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"58900\"\n },\n {\n \"ItemNumber\": \"58909\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ReferrerProviderNumber\": \"2054781W\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}" response = http.request(request) puts response.read_body ``` ```java Not eligible (items conflict) import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.rebateright.com.au/CalculateRebate") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"58900\"\n },\n {\n \"ItemNumber\": \"58909\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ReferrerProviderNumber\": \"2054781W\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") .asString(); ``` ```php Not eligible (items conflict) request('POST', 'https://api.rebateright.com.au/CalculateRebate', [ 'body' => '{ "MedicareItems": [ { "ItemNumber": "58900" }, { "ItemNumber": "58909" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ReferrerProviderNumber": "2054781W", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" }', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp Not eligible (items conflict) using RestSharp; var client = new RestClient("https://api.rebateright.com.au/CalculateRebate"); var request = new RestRequest(Method.POST); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"58900\"\n },\n {\n \"ItemNumber\": \"58909\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ReferrerProviderNumber\": \"2054781W\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Not eligible (items conflict) import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = [ "MedicareItems": [["ItemNumber": "58900"], ["ItemNumber": "58909"]], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ReferrerProviderNumber": "2054781W", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/CalculateRebate")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Not eligible (unknown item number) **Request** ```json { "MedicareItems": [ { "ItemNumber": "1" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } ``` **Response** ```json { "PatientVerification": { "Verified": true, "Reason": "The patient information matches Medicare's records.", "ReasonCode": "Match", "CorrectSex": null, "CorrectGivenName": null, "CorrectFamilyName": null, "CorrectDateOfBirth": null, "CorrectMedicareNumber": null, "CorrectMedicareReferenceNumber": null }, "Rebates": [ { "ItemNumber": "1", "IsEligible": false, "Reason": "Medicare item does not exist.", "ReasonCode": "ItemNotFound", "Benefit": "0", "ItemScheduleFee": "0", "Checks": [ { "Title": "Medicare item", "IsEligible": false, "Reason": "Medicare item does not exist.", "ReasonCode": "ItemNotFound" }, { "Title": "Other Medicare checks", "IsEligible": false, "Reason": "Item number does not attract a benefit at date of service", "ReasonCode": "ItemNumberDoesNotAttractABenefitAtDateOfService_206" } ] } ], "Reason": "The patient information matches Medicare's records." } ``` **SDK Code** ```python Not eligible (unknown item number) import requests url = "https://api.rebateright.com.au/CalculateRebate" payload = { "MedicareItems": [{ "ItemNumber": "1" }], "InHospitalTreatment": False, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Not eligible (unknown item number) const url = 'https://api.rebateright.com.au/CalculateRebate'; const options = { method: 'POST', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{"MedicareItems":[{"ItemNumber":"1"}],"InHospitalTreatment":false,"PatientDateOfBirth":"1986-12-18","PatientFamilyName":"FLETCHER","PatientGivenName":"Edmond","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"2","ServicingProviderNumber":"2447781L","PrincipalProviderNumber":"2447781L"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Not eligible (unknown item number) package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.rebateright.com.au/CalculateRebate" payload := strings.NewReader("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"1\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-api-key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Not eligible (unknown item number) require 'uri' require 'net/http' url = URI("https://api.rebateright.com.au/CalculateRebate") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"1\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}" response = http.request(request) puts response.read_body ``` ```java Not eligible (unknown item number) import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.rebateright.com.au/CalculateRebate") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"1\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") .asString(); ``` ```php Not eligible (unknown item number) request('POST', 'https://api.rebateright.com.au/CalculateRebate', [ 'body' => '{ "MedicareItems": [ { "ItemNumber": "1" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" }', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp Not eligible (unknown item number) using RestSharp; var client = new RestClient("https://api.rebateright.com.au/CalculateRebate"); var request = new RestRequest(Method.POST); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"1\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Not eligible (unknown item number) import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = [ "MedicareItems": [["ItemNumber": "1"]], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/CalculateRebate")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Not eligible (reciprocal card, in-hospital-only item) **Request** ```json { "MedicareItems": [ { "ItemNumber": "37201" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "1975-09-15", "PatientFamilyName": "Xpatriot", "PatientGivenName": "English", "PatientSex": "1", "PatientMedicareNumber": "2297582345", "PatientMedicareRefNumber": "1", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } ``` **Response** ```json { "PatientVerification": { "Verified": null, "Reason": "The patient is or was covered under the Reciprocal Health Care Agreement.", "ReasonCode": "ReciprocalHealthCareAgreement_9626", "CorrectSex": null, "CorrectGivenName": null, "CorrectFamilyName": null, "CorrectDateOfBirth": null, "CorrectMedicareNumber": null, "CorrectMedicareReferenceNumber": null }, "Rebates": [ { "ItemNumber": "37201", "IsEligible": false, "Reason": "The rebate for this Medicare item is only available for in-hospital patients, while the patient is marked as out-of-hospital.", "ReasonCode": "RequiresInHospital", "Benefit": "0", "ItemScheduleFee": "992.10", "Checks": [ { "Title": "Patient age", "IsEligible": true, "Reason": "This Medicare item does not have patient age restrictions.", "ReasonCode": "Eligible" }, { "Title": "Referrer eligibility", "IsEligible": true, "Reason": "A referral is optional for this item, so it is accepted with any referrer or with none.", "ReasonCode": "Eligible" }, { "Title": "In-hospital status", "IsEligible": false, "Reason": "The rebate for this Medicare item is only available for in-hospital patients, while the patient is marked as out-of-hospital.", "ReasonCode": "RequiresInHospital" }, { "Title": "Patient sex", "IsEligible": true, "Reason": "This item is not restricted based on patient sex.", "ReasonCode": "Eligible" }, { "Title": "Medicare eligibility check", "IsEligible": null, "Reason": "The patient is or was covered under the Reciprocal Health Care Agreement.", "ReasonCode": "ReciprocalHealthCareAgreement_9626" } ] } ], "Reason": "The patient is or was covered under the Reciprocal Health Care Agreement." } ``` **SDK Code** ```python Not eligible (reciprocal card, in-hospital-only item) import requests url = "https://api.rebateright.com.au/CalculateRebate" payload = { "MedicareItems": [{ "ItemNumber": "37201" }], "InHospitalTreatment": False, "PatientDateOfBirth": "1975-09-15", "PatientFamilyName": "Xpatriot", "PatientGivenName": "English", "PatientSex": "1", "PatientMedicareNumber": "2297582345", "PatientMedicareRefNumber": "1", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Not eligible (reciprocal card, in-hospital-only item) const url = 'https://api.rebateright.com.au/CalculateRebate'; const options = { method: 'POST', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{"MedicareItems":[{"ItemNumber":"37201"}],"InHospitalTreatment":false,"PatientDateOfBirth":"1975-09-15","PatientFamilyName":"Xpatriot","PatientGivenName":"English","PatientSex":"1","PatientMedicareNumber":"2297582345","PatientMedicareRefNumber":"1","ServicingProviderNumber":"2447781L","PrincipalProviderNumber":"2447781L"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Not eligible (reciprocal card, in-hospital-only item) package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.rebateright.com.au/CalculateRebate" payload := strings.NewReader("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"37201\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1975-09-15\",\n \"PatientFamilyName\": \"Xpatriot\",\n \"PatientGivenName\": \"English\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"2297582345\",\n \"PatientMedicareRefNumber\": \"1\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-api-key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Not eligible (reciprocal card, in-hospital-only item) require 'uri' require 'net/http' url = URI("https://api.rebateright.com.au/CalculateRebate") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"37201\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1975-09-15\",\n \"PatientFamilyName\": \"Xpatriot\",\n \"PatientGivenName\": \"English\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"2297582345\",\n \"PatientMedicareRefNumber\": \"1\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}" response = http.request(request) puts response.read_body ``` ```java Not eligible (reciprocal card, in-hospital-only item) import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.rebateright.com.au/CalculateRebate") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"37201\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1975-09-15\",\n \"PatientFamilyName\": \"Xpatriot\",\n \"PatientGivenName\": \"English\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"2297582345\",\n \"PatientMedicareRefNumber\": \"1\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") .asString(); ``` ```php Not eligible (reciprocal card, in-hospital-only item) request('POST', 'https://api.rebateright.com.au/CalculateRebate', [ 'body' => '{ "MedicareItems": [ { "ItemNumber": "37201" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "1975-09-15", "PatientFamilyName": "Xpatriot", "PatientGivenName": "English", "PatientSex": "1", "PatientMedicareNumber": "2297582345", "PatientMedicareRefNumber": "1", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" }', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp Not eligible (reciprocal card, in-hospital-only item) using RestSharp; var client = new RestClient("https://api.rebateright.com.au/CalculateRebate"); var request = new RestRequest(Method.POST); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"37201\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1975-09-15\",\n \"PatientFamilyName\": \"Xpatriot\",\n \"PatientGivenName\": \"English\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"2297582345\",\n \"PatientMedicareRefNumber\": \"1\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Not eligible (reciprocal card, in-hospital-only item) import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = [ "MedicareItems": [["ItemNumber": "37201"]], "InHospitalTreatment": false, "PatientDateOfBirth": "1975-09-15", "PatientFamilyName": "Xpatriot", "PatientGivenName": "English", "PatientSex": "1", "PatientMedicareNumber": "2297582345", "PatientMedicareRefNumber": "1", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/CalculateRebate")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Cannot determine (referrer missing) **Request** ```json { "MedicareItems": [ { "ItemNumber": "104" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } ``` **Response** ```json { "PatientVerification": { "Verified": true, "Reason": "The patient information matches Medicare's records.", "ReasonCode": "Match", "CorrectSex": null, "CorrectGivenName": null, "CorrectFamilyName": null, "CorrectDateOfBirth": null, "CorrectMedicareNumber": null, "CorrectMedicareReferenceNumber": null }, "Rebates": [ { "ItemNumber": "104", "IsEligible": null, "Reason": "This item needs a referral from a provider recognised as 'Practitioner'. Provide the referrer's provider number to check the referral.", "ReasonCode": "ReferrerProviderNumberMissing", "Benefit": "0", "ItemScheduleFee": "103.95", "Checks": [ { "Title": "Patient age", "IsEligible": true, "Reason": "This Medicare item does not have patient age restrictions.", "ReasonCode": "Eligible" }, { "Title": "Referrer eligibility", "IsEligible": null, "Reason": "This item needs a referral from a provider recognised as 'Practitioner'. Provide the referrer's provider number to check the referral.", "ReasonCode": "ReferrerProviderNumberMissing" }, { "Title": "In-hospital status", "IsEligible": true, "Reason": "The rebate for this Medicare item is available to both in-hospital and out-of-hospital patients.", "ReasonCode": "Eligible" }, { "Title": "Patient sex", "IsEligible": true, "Reason": "This item is not restricted based on patient sex.", "ReasonCode": "Eligible" }, { "Title": "Frequency of service", "IsEligible": true, "Reason": "This item's frequency-of-service and prior-claim limits were not exceeded.", "ReasonCode": "Eligible" }, { "Title": "Multiple item restrictions", "IsEligible": true, "Reason": "No conflicting or mutually exclusive item restrictions applied to this claim.", "ReasonCode": "Eligible" }, { "Title": "Other Medicare checks", "IsEligible": true, "Reason": "Medicare's remaining checks (servicing provider, referral requirements, and similar) raised no restrictions.", "ReasonCode": "Eligible" } ] } ], "Reason": "The patient information matches Medicare's records." } ``` **SDK Code** ```python Cannot determine (referrer missing) import requests url = "https://api.rebateright.com.au/CalculateRebate" payload = { "MedicareItems": [{ "ItemNumber": "104" }], "InHospitalTreatment": False, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Cannot determine (referrer missing) const url = 'https://api.rebateright.com.au/CalculateRebate'; const options = { method: 'POST', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{"MedicareItems":[{"ItemNumber":"104"}],"InHospitalTreatment":false,"PatientDateOfBirth":"1986-12-18","PatientFamilyName":"FLETCHER","PatientGivenName":"Edmond","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"2","ServicingProviderNumber":"2447781L","PrincipalProviderNumber":"2447781L"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Cannot determine (referrer missing) package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.rebateright.com.au/CalculateRebate" payload := strings.NewReader("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"104\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-api-key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Cannot determine (referrer missing) require 'uri' require 'net/http' url = URI("https://api.rebateright.com.au/CalculateRebate") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"104\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}" response = http.request(request) puts response.read_body ``` ```java Cannot determine (referrer missing) import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.rebateright.com.au/CalculateRebate") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"104\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") .asString(); ``` ```php Cannot determine (referrer missing) request('POST', 'https://api.rebateright.com.au/CalculateRebate', [ 'body' => '{ "MedicareItems": [ { "ItemNumber": "104" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" }', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp Cannot determine (referrer missing) using RestSharp; var client = new RestClient("https://api.rebateright.com.au/CalculateRebate"); var request = new RestRequest(Method.POST); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"104\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Cannot determine (referrer missing) import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = [ "MedicareItems": [["ItemNumber": "104"]], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/CalculateRebate")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Cannot determine (claim history needed) **Request** ```json { "MedicareItems": [ { "ItemNumber": "10960" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } ``` **Response** ```json { "PatientVerification": { "Verified": true, "Reason": "The patient information matches Medicare's records.", "ReasonCode": "Match", "CorrectSex": null, "CorrectGivenName": null, "CorrectFamilyName": null, "CorrectDateOfBirth": null, "CorrectMedicareNumber": null, "CorrectMedicareReferenceNumber": null }, "Rebates": [ { "ItemNumber": "10960", "IsEligible": null, "Reason": "This item has a frequency-of-service limit, and Medicare doesn't verify it online for out-of-hospital claims. Without the patient's claim history, eligibility can't be determined.", "ReasonCode": "FrequencyLimitUnverifiable", "Benefit": "0", "ItemScheduleFee": "74.55", "Checks": [ { "Title": "Patient age", "IsEligible": true, "Reason": "This Medicare item does not have patient age restrictions.", "ReasonCode": "Eligible" }, { "Title": "Referrer eligibility", "IsEligible": true, "Reason": "A referral is optional for this item, so it is accepted with any referrer or with none.", "ReasonCode": "Eligible" }, { "Title": "In-hospital status", "IsEligible": true, "Reason": "The rebate for this Medicare item is available for out-of-hospital patients, and the patient is marked as out-of-hospital.", "ReasonCode": "Eligible" }, { "Title": "Patient sex", "IsEligible": true, "Reason": "This item is not restricted based on patient sex.", "ReasonCode": "Eligible" }, { "Title": "Frequency of service", "IsEligible": null, "Reason": "This item has a frequency-of-service limit, and Medicare doesn't verify it online for out-of-hospital claims. Without the patient's claim history, eligibility can't be determined.", "ReasonCode": "FrequencyLimitUnverifiable" } ] } ], "Reason": "The patient information matches Medicare's records." } ``` **SDK Code** ```python Cannot determine (claim history needed) import requests url = "https://api.rebateright.com.au/CalculateRebate" payload = { "MedicareItems": [{ "ItemNumber": "10960" }], "InHospitalTreatment": False, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Cannot determine (claim history needed) const url = 'https://api.rebateright.com.au/CalculateRebate'; const options = { method: 'POST', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{"MedicareItems":[{"ItemNumber":"10960"}],"InHospitalTreatment":false,"PatientDateOfBirth":"1986-12-18","PatientFamilyName":"FLETCHER","PatientGivenName":"Edmond","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"2","ServicingProviderNumber":"2447781L","PrincipalProviderNumber":"2447781L"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Cannot determine (claim history needed) package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.rebateright.com.au/CalculateRebate" payload := strings.NewReader("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"10960\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-api-key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Cannot determine (claim history needed) require 'uri' require 'net/http' url = URI("https://api.rebateright.com.au/CalculateRebate") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"10960\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}" response = http.request(request) puts response.read_body ``` ```java Cannot determine (claim history needed) import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.rebateright.com.au/CalculateRebate") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"10960\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") .asString(); ``` ```php Cannot determine (claim history needed) request('POST', 'https://api.rebateright.com.au/CalculateRebate', [ 'body' => '{ "MedicareItems": [ { "ItemNumber": "10960" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" }', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp Cannot determine (claim history needed) using RestSharp; var client = new RestClient("https://api.rebateright.com.au/CalculateRebate"); var request = new RestRequest(Method.POST); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"10960\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Cannot determine (claim history needed) import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = [ "MedicareItems": [["ItemNumber": "10960"]], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/CalculateRebate")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Cannot determine (patient details don't match) **Request** ```json { "MedicareItems": [ { "ItemNumber": "3" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "2009-02-08", "PatientFamilyName": "FLETCHER", "PatientGivenName": "PETER", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "3", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } ``` **Response** ```json { "PatientVerification": { "Verified": false, "Reason": "Patient Verification has been accepted however patient details were not an exact match. Please check patient Given Name before claiming. Correct Given Name: CLINT.", "ReasonCode": "CheckGivenName_8017", "CorrectSex": null, "CorrectGivenName": "CLINT", "CorrectFamilyName": null, "CorrectDateOfBirth": null, "CorrectMedicareNumber": null, "CorrectMedicareReferenceNumber": null }, "Rebates": [ { "ItemNumber": "3", "IsEligible": null, "Reason": "Patient Verification has been accepted however patient details were not an exact match. Please check patient Given Name before claiming. Correct Given Name: CLINT.", "ReasonCode": "CheckGivenName_8017", "Benefit": "0", "ItemScheduleFee": "20.55", "Checks": [ { "Title": "Patient age", "IsEligible": true, "Reason": "This Medicare item does not have patient age restrictions.", "ReasonCode": "Eligible" }, { "Title": "Referrer eligibility", "IsEligible": true, "Reason": "A referral is optional for this item, so it is accepted with any referrer or with none.", "ReasonCode": "Eligible" }, { "Title": "In-hospital status", "IsEligible": true, "Reason": "The rebate for this Medicare item is available for out-of-hospital patients, and the patient is marked as out-of-hospital.", "ReasonCode": "Eligible" }, { "Title": "Patient sex", "IsEligible": true, "Reason": "This item is not restricted based on patient sex.", "ReasonCode": "Eligible" }, { "Title": "Medicare eligibility check", "IsEligible": null, "Reason": "Patient Verification has been accepted however patient details were not an exact match. Please check patient Given Name before claiming. Correct Given Name: CLINT.", "ReasonCode": "CheckGivenName_8017" } ] } ], "Reason": "Patient Verification has been accepted however patient details were not an exact match. Please check patient Given Name before claiming. Correct Given Name: CLINT." } ``` **SDK Code** ```python Cannot determine (patient details don't match) import requests url = "https://api.rebateright.com.au/CalculateRebate" payload = { "MedicareItems": [{ "ItemNumber": "3" }], "InHospitalTreatment": False, "PatientDateOfBirth": "2009-02-08", "PatientFamilyName": "FLETCHER", "PatientGivenName": "PETER", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "3", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Cannot determine (patient details don't match) const url = 'https://api.rebateright.com.au/CalculateRebate'; const options = { method: 'POST', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{"MedicareItems":[{"ItemNumber":"3"}],"InHospitalTreatment":false,"PatientDateOfBirth":"2009-02-08","PatientFamilyName":"FLETCHER","PatientGivenName":"PETER","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"3","ServicingProviderNumber":"2447781L","PrincipalProviderNumber":"2447781L"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Cannot determine (patient details don't match) package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.rebateright.com.au/CalculateRebate" payload := strings.NewReader("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"3\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"2009-02-08\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"PETER\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"3\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-api-key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Cannot determine (patient details don't match) require 'uri' require 'net/http' url = URI("https://api.rebateright.com.au/CalculateRebate") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"3\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"2009-02-08\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"PETER\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"3\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}" response = http.request(request) puts response.read_body ``` ```java Cannot determine (patient details don't match) import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.rebateright.com.au/CalculateRebate") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"3\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"2009-02-08\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"PETER\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"3\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") .asString(); ``` ```php Cannot determine (patient details don't match) request('POST', 'https://api.rebateright.com.au/CalculateRebate', [ 'body' => '{ "MedicareItems": [ { "ItemNumber": "3" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "2009-02-08", "PatientFamilyName": "FLETCHER", "PatientGivenName": "PETER", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "3", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" }', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp Cannot determine (patient details don't match) using RestSharp; var client = new RestClient("https://api.rebateright.com.au/CalculateRebate"); var request = new RestRequest(Method.POST); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"3\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"2009-02-08\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"PETER\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"3\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Cannot determine (patient details don't match) import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = [ "MedicareItems": [["ItemNumber": "3"]], "InHospitalTreatment": false, "PatientDateOfBirth": "2009-02-08", "PatientFamilyName": "FLETCHER", "PatientGivenName": "PETER", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "3", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/CalculateRebate")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Cannot determine (reciprocal card) **Request** ```json { "MedicareItems": [ { "ItemNumber": "23" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "1975-09-15", "PatientFamilyName": "Xpatriot", "PatientGivenName": "English", "PatientSex": "1", "PatientMedicareNumber": "2297582345", "PatientMedicareRefNumber": "1", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } ``` **Response** ```json { "PatientVerification": { "Verified": null, "Reason": "The patient is or was covered under the Reciprocal Health Care Agreement.", "ReasonCode": "ReciprocalHealthCareAgreement_9626", "CorrectSex": null, "CorrectGivenName": null, "CorrectFamilyName": null, "CorrectDateOfBirth": null, "CorrectMedicareNumber": null, "CorrectMedicareReferenceNumber": null }, "Rebates": [ { "ItemNumber": "23", "IsEligible": null, "Reason": "The patient is or was covered under the Reciprocal Health Care Agreement.", "ReasonCode": "ReciprocalHealthCareAgreement_9626", "Benefit": "0", "ItemScheduleFee": "45.05", "Checks": [ { "Title": "Patient age", "IsEligible": true, "Reason": "This Medicare item does not have patient age restrictions.", "ReasonCode": "Eligible" }, { "Title": "Referrer eligibility", "IsEligible": true, "Reason": "A referral is optional for this item, so it is accepted with any referrer or with none.", "ReasonCode": "Eligible" }, { "Title": "In-hospital status", "IsEligible": true, "Reason": "The rebate for this Medicare item is available for out-of-hospital patients, and the patient is marked as out-of-hospital.", "ReasonCode": "Eligible" }, { "Title": "Patient sex", "IsEligible": true, "Reason": "This item is not restricted based on patient sex.", "ReasonCode": "Eligible" }, { "Title": "Medicare eligibility check", "IsEligible": null, "Reason": "The patient is or was covered under the Reciprocal Health Care Agreement.", "ReasonCode": "ReciprocalHealthCareAgreement_9626" } ] } ], "Reason": "The patient is or was covered under the Reciprocal Health Care Agreement." } ``` **SDK Code** ```python Cannot determine (reciprocal card) import requests url = "https://api.rebateright.com.au/CalculateRebate" payload = { "MedicareItems": [{ "ItemNumber": "23" }], "InHospitalTreatment": False, "PatientDateOfBirth": "1975-09-15", "PatientFamilyName": "Xpatriot", "PatientGivenName": "English", "PatientSex": "1", "PatientMedicareNumber": "2297582345", "PatientMedicareRefNumber": "1", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Cannot determine (reciprocal card) const url = 'https://api.rebateright.com.au/CalculateRebate'; const options = { method: 'POST', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{"MedicareItems":[{"ItemNumber":"23"}],"InHospitalTreatment":false,"PatientDateOfBirth":"1975-09-15","PatientFamilyName":"Xpatriot","PatientGivenName":"English","PatientSex":"1","PatientMedicareNumber":"2297582345","PatientMedicareRefNumber":"1","ServicingProviderNumber":"2447781L","PrincipalProviderNumber":"2447781L"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Cannot determine (reciprocal card) package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.rebateright.com.au/CalculateRebate" payload := strings.NewReader("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"23\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1975-09-15\",\n \"PatientFamilyName\": \"Xpatriot\",\n \"PatientGivenName\": \"English\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"2297582345\",\n \"PatientMedicareRefNumber\": \"1\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-api-key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Cannot determine (reciprocal card) require 'uri' require 'net/http' url = URI("https://api.rebateright.com.au/CalculateRebate") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"23\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1975-09-15\",\n \"PatientFamilyName\": \"Xpatriot\",\n \"PatientGivenName\": \"English\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"2297582345\",\n \"PatientMedicareRefNumber\": \"1\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}" response = http.request(request) puts response.read_body ``` ```java Cannot determine (reciprocal card) import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.rebateright.com.au/CalculateRebate") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"23\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1975-09-15\",\n \"PatientFamilyName\": \"Xpatriot\",\n \"PatientGivenName\": \"English\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"2297582345\",\n \"PatientMedicareRefNumber\": \"1\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") .asString(); ``` ```php Cannot determine (reciprocal card) request('POST', 'https://api.rebateright.com.au/CalculateRebate', [ 'body' => '{ "MedicareItems": [ { "ItemNumber": "23" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "1975-09-15", "PatientFamilyName": "Xpatriot", "PatientGivenName": "English", "PatientSex": "1", "PatientMedicareNumber": "2297582345", "PatientMedicareRefNumber": "1", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" }', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp Cannot determine (reciprocal card) using RestSharp; var client = new RestClient("https://api.rebateright.com.au/CalculateRebate"); var request = new RestRequest(Method.POST); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"23\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1975-09-15\",\n \"PatientFamilyName\": \"Xpatriot\",\n \"PatientGivenName\": \"English\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"2297582345\",\n \"PatientMedicareRefNumber\": \"1\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Cannot determine (reciprocal card) import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = [ "MedicareItems": [["ItemNumber": "23"]], "InHospitalTreatment": false, "PatientDateOfBirth": "1975-09-15", "PatientFamilyName": "Xpatriot", "PatientGivenName": "English", "PatientSex": "1", "PatientMedicareNumber": "2297582345", "PatientMedicareRefNumber": "1", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/CalculateRebate")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Cannot determine (date of birth malformed) **Request** ```json { "MedicareItems": [ { "ItemNumber": "3" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-13-99", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } ``` **Response** ```json { "PatientVerification": { "Verified": null, "Reason": "'PatientDateOfBirth' is provided as '1986-13-99' which is not in correct format. Acceptable date format: 'yyyy-MM-dd'.", "ReasonCode": "PatientDateOfBirthInvalid", "CorrectSex": null, "CorrectGivenName": null, "CorrectFamilyName": null, "CorrectDateOfBirth": null, "CorrectMedicareNumber": null, "CorrectMedicareReferenceNumber": null }, "Rebates": [ { "ItemNumber": "3", "IsEligible": null, "Reason": "'PatientDateOfBirth' is provided as '1986-13-99' which is not in correct format. Acceptable date format: 'yyyy-MM-dd'.", "ReasonCode": "PatientDateOfBirthInvalid", "Benefit": "0", "ItemScheduleFee": "20.55", "Checks": [ { "Title": "Patient age", "IsEligible": true, "Reason": "This Medicare item does not have patient age restrictions.", "ReasonCode": "Eligible" }, { "Title": "Referrer eligibility", "IsEligible": true, "Reason": "A referral is optional for this item, so it is accepted with any referrer or with none.", "ReasonCode": "Eligible" }, { "Title": "In-hospital status", "IsEligible": true, "Reason": "The rebate for this Medicare item is available for out-of-hospital patients, and the patient is marked as out-of-hospital.", "ReasonCode": "Eligible" }, { "Title": "Patient sex", "IsEligible": true, "Reason": "This item is not restricted based on patient sex.", "ReasonCode": "Eligible" }, { "Title": "Medicare eligibility check", "IsEligible": null, "Reason": "'PatientDateOfBirth' is provided as '1986-13-99' which is not in correct format. Acceptable date format: 'yyyy-MM-dd'.", "ReasonCode": "PatientDateOfBirthInvalid" } ] } ], "Reason": "'PatientDateOfBirth' is provided as '1986-13-99' which is not in correct format. Acceptable date format: 'yyyy-MM-dd'." } ``` **SDK Code** ```python Cannot determine (date of birth malformed) import requests url = "https://api.rebateright.com.au/CalculateRebate" payload = { "MedicareItems": [{ "ItemNumber": "3" }], "InHospitalTreatment": False, "PatientDateOfBirth": "1986-13-99", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Cannot determine (date of birth malformed) const url = 'https://api.rebateright.com.au/CalculateRebate'; const options = { method: 'POST', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{"MedicareItems":[{"ItemNumber":"3"}],"InHospitalTreatment":false,"PatientDateOfBirth":"1986-13-99","PatientFamilyName":"FLETCHER","PatientGivenName":"Edmond","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"2","ServicingProviderNumber":"2447781L","PrincipalProviderNumber":"2447781L"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Cannot determine (date of birth malformed) package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.rebateright.com.au/CalculateRebate" payload := strings.NewReader("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"3\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-13-99\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-api-key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Cannot determine (date of birth malformed) require 'uri' require 'net/http' url = URI("https://api.rebateright.com.au/CalculateRebate") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"3\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-13-99\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}" response = http.request(request) puts response.read_body ``` ```java Cannot determine (date of birth malformed) import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.rebateright.com.au/CalculateRebate") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"3\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-13-99\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") .asString(); ``` ```php Cannot determine (date of birth malformed) request('POST', 'https://api.rebateright.com.au/CalculateRebate', [ 'body' => '{ "MedicareItems": [ { "ItemNumber": "3" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-13-99", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" }', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp Cannot determine (date of birth malformed) using RestSharp; var client = new RestClient("https://api.rebateright.com.au/CalculateRebate"); var request = new RestRequest(Method.POST); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"3\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-13-99\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Cannot determine (date of birth malformed) import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = [ "MedicareItems": [["ItemNumber": "3"]], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-13-99", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/CalculateRebate")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Several items, different results **Request** ```json { "MedicareItems": [ { "ItemNumber": "104" }, { "ItemNumber": "37201" }, { "ItemNumber": "10960" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ReferrerProviderNumber": "2447791K", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } ``` **Response** ```json { "PatientVerification": { "Verified": true, "Reason": "The patient information matches Medicare's records.", "ReasonCode": "Match", "CorrectSex": null, "CorrectGivenName": null, "CorrectFamilyName": null, "CorrectDateOfBirth": null, "CorrectMedicareNumber": null, "CorrectMedicareReferenceNumber": null }, "Rebates": [ { "ItemNumber": "104", "IsEligible": true, "Reason": "The patient is eligible to claim this item.", "ReasonCode": "Eligible", "Benefit": "88.36", "ItemScheduleFee": "103.95", "Checks": [ { "Title": "Patient age", "IsEligible": true, "Reason": "This Medicare item does not have patient age restrictions.", "ReasonCode": "Eligible" }, { "Title": "Referrer eligibility", "IsEligible": true, "Reason": "The referrer you provided is eligible to refer this item, because the Medicare Provider Directory lists them as 'Physiotherapist'. This item accepts a referral from any provider recognised as 'Practitioner'.", "ReasonCode": "Eligible" }, { "Title": "In-hospital status", "IsEligible": true, "Reason": "The rebate for this Medicare item is available to both in-hospital and out-of-hospital patients.", "ReasonCode": "Eligible" }, { "Title": "Patient sex", "IsEligible": true, "Reason": "This item is not restricted based on patient sex.", "ReasonCode": "Eligible" }, { "Title": "Frequency of service", "IsEligible": true, "Reason": "This item's frequency-of-service and prior-claim limits were not exceeded.", "ReasonCode": "Eligible" }, { "Title": "Multiple item restrictions", "IsEligible": true, "Reason": "No conflicting or mutually exclusive item restrictions applied to this claim.", "ReasonCode": "Eligible" }, { "Title": "Other Medicare checks", "IsEligible": true, "Reason": "Medicare's remaining checks (servicing provider, referral requirements, and similar) raised no restrictions.", "ReasonCode": "Eligible" } ] }, { "ItemNumber": "37201", "IsEligible": false, "Reason": "The rebate for this Medicare item is only available for in-hospital patients, while the patient is marked as out-of-hospital.", "ReasonCode": "RequiresInHospital", "Benefit": "0", "ItemScheduleFee": "992.10", "Checks": [ { "Title": "Patient age", "IsEligible": true, "Reason": "This Medicare item does not have patient age restrictions.", "ReasonCode": "Eligible" }, { "Title": "Referrer eligibility", "IsEligible": true, "Reason": "A referral is optional for this item, so it is accepted with any referrer or with none.", "ReasonCode": "Eligible" }, { "Title": "In-hospital status", "IsEligible": false, "Reason": "The rebate for this Medicare item is only available for in-hospital patients, while the patient is marked as out-of-hospital.", "ReasonCode": "RequiresInHospital" }, { "Title": "Patient sex", "IsEligible": true, "Reason": "This item is not restricted based on patient sex.", "ReasonCode": "Eligible" }, { "Title": "Frequency of service", "IsEligible": true, "Reason": "This item's frequency-of-service and prior-claim limits were not exceeded.", "ReasonCode": "Eligible" }, { "Title": "Multiple item restrictions", "IsEligible": true, "Reason": "No conflicting or mutually exclusive item restrictions applied to this claim.", "ReasonCode": "Eligible" }, { "Title": "Other Medicare checks", "IsEligible": true, "Reason": "Medicare's remaining checks (servicing provider, referral requirements, and similar) raised no restrictions.", "ReasonCode": "Eligible" } ] }, { "ItemNumber": "10960", "IsEligible": null, "Reason": "This item has a frequency-of-service limit, and Medicare doesn't verify it online for out-of-hospital claims. Without the patient's claim history, eligibility can't be determined.", "ReasonCode": "FrequencyLimitUnverifiable", "Benefit": "0", "ItemScheduleFee": "74.55", "Checks": [ { "Title": "Patient age", "IsEligible": true, "Reason": "This Medicare item does not have patient age restrictions.", "ReasonCode": "Eligible" }, { "Title": "Referrer eligibility", "IsEligible": true, "Reason": "A referral is optional for this item, so it is accepted with any referrer or with none.", "ReasonCode": "Eligible" }, { "Title": "In-hospital status", "IsEligible": true, "Reason": "The rebate for this Medicare item is available for out-of-hospital patients, and the patient is marked as out-of-hospital.", "ReasonCode": "Eligible" }, { "Title": "Patient sex", "IsEligible": true, "Reason": "This item is not restricted based on patient sex.", "ReasonCode": "Eligible" }, { "Title": "Frequency of service", "IsEligible": null, "Reason": "This item has a frequency-of-service limit, and Medicare doesn't verify it online for out-of-hospital claims. Without the patient's claim history, eligibility can't be determined.", "ReasonCode": "FrequencyLimitUnverifiable" } ] } ], "Reason": "The patient information matches Medicare's records." } ``` **SDK Code** ```python Several items, different results import requests url = "https://api.rebateright.com.au/CalculateRebate" payload = { "MedicareItems": [{ "ItemNumber": "104" }, { "ItemNumber": "37201" }, { "ItemNumber": "10960" }], "InHospitalTreatment": False, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ReferrerProviderNumber": "2447791K", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" } headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Several items, different results const url = 'https://api.rebateright.com.au/CalculateRebate'; const options = { method: 'POST', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{"MedicareItems":[{"ItemNumber":"104"},{"ItemNumber":"37201"},{"ItemNumber":"10960"}],"InHospitalTreatment":false,"PatientDateOfBirth":"1986-12-18","PatientFamilyName":"FLETCHER","PatientGivenName":"Edmond","PatientSex":"1","PatientMedicareNumber":"4951525561","PatientMedicareRefNumber":"2","ReferrerProviderNumber":"2447791K","ServicingProviderNumber":"2447781L","PrincipalProviderNumber":"2447781L"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Several items, different results package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.rebateright.com.au/CalculateRebate" payload := strings.NewReader("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"104\"\n },\n {\n \"ItemNumber\": \"37201\"\n },\n {\n \"ItemNumber\": \"10960\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ReferrerProviderNumber\": \"2447791K\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-api-key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Several items, different results require 'uri' require 'net/http' url = URI("https://api.rebateright.com.au/CalculateRebate") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"104\"\n },\n {\n \"ItemNumber\": \"37201\"\n },\n {\n \"ItemNumber\": \"10960\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ReferrerProviderNumber\": \"2447791K\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}" response = http.request(request) puts response.read_body ``` ```java Several items, different results import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.rebateright.com.au/CalculateRebate") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"104\"\n },\n {\n \"ItemNumber\": \"37201\"\n },\n {\n \"ItemNumber\": \"10960\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ReferrerProviderNumber\": \"2447791K\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}") .asString(); ``` ```php Several items, different results request('POST', 'https://api.rebateright.com.au/CalculateRebate', [ 'body' => '{ "MedicareItems": [ { "ItemNumber": "104" }, { "ItemNumber": "37201" }, { "ItemNumber": "10960" } ], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ReferrerProviderNumber": "2447791K", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" }', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp Several items, different results using RestSharp; var client = new RestClient("https://api.rebateright.com.au/CalculateRebate"); var request = new RestRequest(Method.POST); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"MedicareItems\": [\n {\n \"ItemNumber\": \"104\"\n },\n {\n \"ItemNumber\": \"37201\"\n },\n {\n \"ItemNumber\": \"10960\"\n }\n ],\n \"InHospitalTreatment\": false,\n \"PatientDateOfBirth\": \"1986-12-18\",\n \"PatientFamilyName\": \"FLETCHER\",\n \"PatientGivenName\": \"Edmond\",\n \"PatientSex\": \"1\",\n \"PatientMedicareNumber\": \"4951525561\",\n \"PatientMedicareRefNumber\": \"2\",\n \"ReferrerProviderNumber\": \"2447791K\",\n \"ServicingProviderNumber\": \"2447781L\",\n \"PrincipalProviderNumber\": \"2447781L\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Several items, different results import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = [ "MedicareItems": [["ItemNumber": "104"], ["ItemNumber": "37201"], ["ItemNumber": "10960"]], "InHospitalTreatment": false, "PatientDateOfBirth": "1986-12-18", "PatientFamilyName": "FLETCHER", "PatientGivenName": "Edmond", "PatientSex": "1", "PatientMedicareNumber": "4951525561", "PatientMedicareRefNumber": "2", "ReferrerProviderNumber": "2447791K", "ServicingProviderNumber": "2447781L", "PrincipalProviderNumber": "2447781L" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/CalculateRebate")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```