Go to top of page

The Australian Digital Health Agency provides sample code to assist software development and integration with the Healthcare Identifiers Service and the My Health Record system. Most sample code is available in .NET and Java. To see the full list of products visit the Products page on this website or GitHub.

Please note, this sample code is provided exclusively for software vendors who create software used by healthcare providers who want to connect to the My Health Record system.

Healthcare Identifiers Service

Before software connects to the My Health Record system, the software first must be able to identify both the patient and the healthcare provider which is done through the Healthcare Identifiers (HI) Service.

The Healthcare Identifiers Integration Toolkit provides software libraries and WSDL files to assist with the integration and is available both on the Agency website and GitHub (Java, .NET).

To obtain the patient’s Individual Healthcare Identifier (IHI), see the following examples: (Note: you will also need to conform to the relevant use cases)

  • Searching for a single patient’s IHI (Java, .NET)
  • Searching for multiple patients’ IHI as a Batch Synchronous Operation (Java, .NET)

To obtain a provider’s Healthcare Provider Identifier for Individuals (HPI-I), see the following example: (Note: you will also need to conform to the relevant use cases).

  • Searching an Individual Healthcare Provider’s HPI-I (Java, .NET)

My Health Record system

Once you have connected to the Healthcare Identifiers Service you can then connect to the My Health Record system via the B2B Gateway. The My Health Record Integration Toolkit is available both on the Agency website and GitHub (Java, .NET).

For the software to access a patient’s My Health Record on behalf of a healthcare provider, the following examples are available:

  • DoesPCEHRExist for checking if a patient has an advertised My Health Record (Java, .NET)
  • GainAcccess for gaining access to a patient’s My Health Record in order to view the patient’s record (Java, .NET)

For the healthcare provider to access and upload documents to a patient’s My Health Record, the following examples are available (see clinical documents for advice on authoring and rendering clinical documents):

  • Upload Document for uploading and replacing documents (Java, .NET)
  • Remove Document for removing documents (Java, .NET)
  • Get Document List for listing documents in a patient’s record (Java, .NET)
  • Get Document for downloading a document from a patient’s My Health Record (Java, .NET)

In addition to using the Document List for accessing a patient’s record you can also call the view service which aggregates information from a patient’s My Health Record. See the Java and .NET example.

  • Health Record Overview
  • Prescription and Dispense View
  • Medicare Overview
  • Pathology View
  • Diagnostic Imaging View
  • Audit View (Java, .NET)

Clinical Documents

Clinical documents in the My Health Record are in CDATM Format. The Clinical Document Integration Toolkit can be downloaded from the Agency website or GitHub and generates My Health Record compatible documents.

For creating CDA documents, see the following examples:

Before these clinical documents are uploaded to the My Health Record system they must be packaged in a CDA package. The Clinical Document Packaging Library is available on the Agency website and GitHub.

There are two examples:

Rendering the documents can be done easily using the Agency-provided XSLT style sheet. All documents and the Medicare Overview can be rendered using a generic style sheet. The Prescription and Dispense View has its own custom XSLT style sheet. Both the Generic and the Prescription and Dispense View XSLT are available on the Agency website and GitHub.