PBS Item Table Extract File

Version 3.7

This XSL stylesheet produces the PBS Item Table ANS extract file (PBS Item Table yyyymmdd.txt) from a PBS XML document.

The Item extract file provides information on the availability of items through the eAuthorities system, and also links Notes and Cautions to the PBS item codes.

The source document must be the result of the delta.xsl XSL stylesheet.

The result document is a text file.

The default field delimeter in this file is the tab character.

Field Name Format Maximum Length Start Position Description
PBS Item Code Character 6 1 five or six characters in format (n)nnnna
Restriction Flag Character 1 7

Indicates the restriction level for this PBS item, for quantity/repeats within the schedule limit.

  • A=Authority required
  • R=Restricted Benefit
  • U=Unrestricted
eAuthorities quantity Character 2 9 For use by Medicare Australia only.
eAuthorities Repeats Character 2 12 For use by Medicare Australia only.
eAuthorities Flag Character 1 15 For use by Medicare Australia only.
Schedule Indicator Character 1 17 For use by Medicare Australia only.
Start Date Character 8 19 format ddmmyyyy
End Date Character 8 28 format ddmmyyyy. May be blank if the item is current (no end date has been set).
Note Ids Character 60 37 Array of 15 x 4 character numerics. The Note Id of any Note(s) attached to the drug name, the item or the restriction. There is provision for up to fifteen Notes
Caution Ids Character 60 98 Array of 5 x 4 character numerics. The Caution Id of any Caution(s) attached to the drug name, the item or the restriction. There is provision for up to five Cautions

Parameters

Parameter: "type"

Default value: "'normal'"

Output Type

Specifies whether to generate the text output with or without eAuthority values. Default "normal" (ie. with eAuthority values). Valid values: "normal", "pharmacy". NB. This is also driven by the data (ie. if "normal" is selected but the data does not contain eAuthority values then the result will be the same as if "pharmacy" were selected).

Parameter: "bug-compatible"

Default value: "'no'"

Bug Compatibility

Specifies whether to generate date values properly, ie "DDMMYYY", or to be bug-compatible with PBDS, ie. "DMMYYYY". Default "no" (ie. not bug compatible). Valid values: "no", "yes".

Parameter: "delimiter"

Default value: "' '"

Field Delimiter

Delimiter to use between fields. Default is tab character.

Parameter: "eol"

Default value: "' '"

Record Delimiter

Delimiter to use between records. Default is newline character.

Revision History

Version Release date Changes
3.7 06 November 2013 Use before and after restriction level to find all changed prescribing rules
3.6 08 August 2013 Check source document is appropriate.
3.5.1 22 July 2013 Fixed note processing.
3.5 05 July 2013 Remove rwt:prescriber-instruction content from notes.
3.4.1 27 November 2012 Fixed setting of schedule indicator flag.
3.4 09 November 2012 Change priority of start date - restriction-reference is used first.
3.3.2 07 November 2012 Added documentation on the output format.
3.3.1 05 November 2012 Empty end date is represented as eight spaces.
3.3 01 November 2012 Supply default non-effective date.
3.2 22 October 2012 Ignore constraints notes.
3.1 18 September 2012 Bug fixes: 1) No longer pad caution and note ids with 0s in pharmacy mode. 2) Remove extra delimeter output before the first note and first caution. 3) Correct the number of cautions to 5 (from 4).
3.0 29 August 2012 Improve inclusion of start and end dates.
2.16 15 August 2012 Added processing of rwt:administrative-advice and rwt:administrative-advice-reference children of rwt:restriction when extracting notes.
2.15 23 April 2012 Remove trailing tab character at end of each line. Remove empty '0000' values for notes and cautions between valid values.
2.14 03 April 2012 Fix bugs relating to duplicate notes / cautions code output; and extra trailing space on start and end dates
2.13 21 February 2012 Upgrade to v2.7 PBS XML Schema
2.12 10 February 2012 IP program is not considered to be in CPAP
2.11 29 November 2011 Fix identification of cautions inside restrictions
2.10 24 November 2011 Only one row per item code
2.9 21 November 2011 Pad note and catuion numbers. Exclude non-numeric note and caution numbers
2.8 14 November 2011 Modified keys to address performance issues
2.7 04 November 2011 Reverse meaning of type parameter.
2.6 03 November 2011 Changed is-cpap to not consider "IP" as in CPAP.
2.5 26 October 2011 Added bug compatibility.
2.4 25 October 2011 Fixed MQ and rpt values. Added pharmacy parameter.
2.3 12 October 2011 Fixed notes and cautions to prevent blank lines. Note and caution IDs are no longer zero-padded.
2.2 01 August 2011 Fixed 'translate' statements with incorrect number of parameters.
2.1 16 June 2011 Fixed format issues.
2.0 19 February 2011 Updated for PBS XML Schema v2.4.
1.0 02 October 2009 Initial version.