Skip to navigation

Quickstart

Verify a published test patient on the test host, in 4 steps
View as Markdown
1

Get your credentials

In the RebateRight app, open Getting Started and work through activation. You finish with 3 credentials: a Minor ID, an API Key for production and a Test API Key for the test environment. This quickstart uses the Test API Key and the Minor ID. Keys, Minor ID and environments sets out where each credential goes.

2

Verify a test patient

Send a Patient Verification request to the test host. Replace <testApiKey> and <minorId> with your own credentials.

curl -X POST https://test-api.rebateright.com.au/VerifyPatient \
-H "x-api-key: <testApiKey>" \
-H "x-minor-id: <minorId>" \
-H "Content-Type: application/json" \
-d '{
"PatientFamilyName": "FLETCHER",
"PatientGivenName": "Edmond",
"PatientDateOfBirth": "1986-12-18",
"PatientSex": "1",
"PatientMedicareNumber": "4951525561",
"PatientMedicareRefNumber": "2"
}'

The patient is Edmond FLETCHER, from the FLETCHER family in Integration test data. RebateRight sends the request to Services Australia’s test environment. You can also send it from the explorer on the Patient Verification page: enter your Test API Key and Minor ID, then select Send.

3

Read the answer

Medicare has verified Edmond’s details, so Verified is true and every Correct… field is null:

{
"Verified": true,
"Reason": "The patient information matches Medicare's records.",
"ReasonCode": "Match",
"CorrectMedicareNumber": null,
"CorrectMedicareReferenceNumber": null,
"CorrectGivenName": null,
"CorrectFamilyName": null,
"CorrectDateOfBirth": null,
"CorrectSex": null
}

Branch on Verified, which can also be false or null. Patient Verification sets out what each value means, what to do next and the corrections Medicare sends back. The Patient Verification page holds a recorded example of each answer in its response panel.

Outside Sydney business hours, Services Australia’s test environment can return an error in place of a verdict. The note at the top of Integration test data says what to do.