Logo: Department of HealthLogo: Pharmaceutical Benefits SchemeXPath Examples
PBS XML Schema Version 3.1.7

XPath is a language for navigating XML documents and follows a standard data format similar to a file system path that uses a slash to separate parts of the path e.g. pbs:prescribing-rule/pbs:code

The XPath syntax (data format) is used to:

An XPath that is comprised of two elements e.g. pbs:prescribing-rule/pbs:code indicates a parent-child relationship. In this example, the XPath will match all code elements that have a prescribing-rule parent.

The following gives a breakdown of the XPath syntax pbs:prescribing-rule.

Example

Meaning

pbs:prescribing-rule

Qualified name

pbs

Namespace prefix (associated with an URI)

prescribing-rule

Local Name

The following defines identification of the elements, which have various formats.

Item

Details

PBS Item Code

The PBS Item Code identifies a prescribing rule.

XPath:

pbs:prescribing-rule/pbs:code

Historically, a PBS Item Code has had two components: the PBS Number and a check character. For example, code "1234Y" consists of the PBS Number "1234" and the check character "Y". PBS numbers had no more than four-digits; however, there are no more available four-digit PBS numbers, as such new item codes are issued with a five-digit PBS number. There will be no changes to existing four-digit item codes.

A PBS Number is any number of digits and represents a positive integer.

The check character is a single uppercase character, which uses the modulo-19 algorithm. It is the rightmost character in the PBS Item Code.

Example:

<code rdf:resource="http://pbs.gov.au/code/item">108Q</code>

Manufacturer Code

A Manufacturer Code identifies the manufacturer of a product.

XPath:

pbs:organisation/pbs:code

A manufacturer code consists of two alphabetic characters. For example, "AB".

In the future, the format may change to be two alpha-numeric characters.

Example:

<code rdf:resource="http://pbs.gov.au/code/manufacturer">MK</code>

Streamlined Authority Code

A Streamlined Authority Code is an example of a Restriction Code. All restrictions associated with a prescribing rule are identified by a code, but restrictions can have more than one kind of code, and the code that is used for Streamlined Authority Code is the treatment-of code.

XPath:

pbs:restriction/pbs:code[@rdf:resource="http://pbs.gov.au/code/treatment-of"]

Both restriction codes and treatment-of codes consist of any number of digits in the same format. It represents a positive integer.

Example:

<code rdf:resource="http://pbs.gov.au/code/treatment-of">6286</code>

Note Code

A code which identifies different types of notes.

XPath:

pbs:administrative-advice/pbs:code

pbs:definition/pbs:code

pbs:prescriber-instruction/pbs:code

pbs:foreword/pbs:code

A note code consists of any number of digits and represents a positive integer.

Example:

<code rdf:resource="http://pbs.gov.au/code/prescribing-text">11428</code>

Caution Code

A code which identifies a caution.

XPath:

pbs:caution/pbs:code

A caution code consists of any number of digits and represents a positive integer.

Example:

<code rdf:resource="http://pbs.gov.au/code/prescribing-text">11428</code>

Markup Band Code

The Markup Band Code identifies a set of markup bands in a dispensing rule.

XPath:

pbs:markup-band/pbs:code

A markup band code consists of a single alphabetic value, for example, 'A'.

Example:

<code rdf:resource="http://pbs.gov.au/code/markup-band">A</code>