This XSL stylesheet produces all text extract files from a v3.0 PBS XML document.
The files created are as follows:
The source document must be a v3.0 (or later) PBS XML document.
There are multiple result documents. The main result document is a manifest.
Global Parameters
Display Codes
The display parameter uses the following codes. These are also displayed as column
headers when the header row is enabled.
program-code |
Program Code |
prescriber-type |
Prescriber Type Code |
med-chart |
Eligible for RACF medication chart |
drug-type |
Drug Type |
item-code |
PBS Item Code |
item-code-padded |
PBS Item Code, zero padded on left to five digits |
treatment-of-code |
Treatment-of Code, a.k.a. Streamlined Authority Code |
manufacturer-code |
Manufacturer Code |
fee-code |
Dispense Fee Type Code |
markup-band |
Markup Band Code |
dangerous-drug-code |
Dangerous Drug Code |
atc |
ATC level code |
atc-type |
ATC Type Code |
atc-print-option |
ATC Print Option |
restriction-flag |
Restriction Flag |
has-caution |
Has Caution Code |
has-note |
Has Note Code |
unit-of-measure |
Unit of Measure |
brand-name |
Brand Name |
mp-id |
MP SNOMED-CT identifier |
mp-pt |
MP Preferred Term |
mp-int |
MP Preferred Term (Legal) |
pr-int |
Prescribing Rule Preferred Term (Legal) |
mpuu-or-mpp-id |
MPUU or MPP SNOMED-CT-AU Identifier |
mpuu-or-mpp-pt |
MPUU or MPP Preferred Term |
mpuu-id |
MPUU SNOMED-CT-AU Identifier |
mpuu-pt |
MPUU Preferred Term |
mpp-id |
MPP SNOMED-CT-AU Identifier |
tpuu-or-mpp-id |
TPUU or MPP Preferred Term |
mpp-pt |
MPP Preferred Term |
tpuu-or-tpp-id |
TPUU or TPP SNOMED-CT-AU Identifier |
tpuu-or-tpp-pt |
TPUU or TPP Preferred Term |
tpuu-id |
TPUU SNOMED-CT-AU Identifier |
tpuu-pt |
TPUU Preferred Term |
tpp-id |
TPP SNOMED-CT-AU Identifier |
tpp-pt |
TPP Preferred Term |
pack-size |
MPP or TPP Pack Size |
pack-content |
TPP Pack Content |
vial-content |
TPUU Vial Content |
mq |
Maximum Quantity (in unit-of-use for ready-prepared) or Maximum Amount (infusible) |
mq-uu |
Maximum Quantity (in unit-of-use for ready-prepared) or Maximum Amount (infusible) |
mq-pack |
Maximum Quantity (in packs) |
repeats |
Number of Repeats |
cemp-tpuu-or-tpp |
Commonwealth Ex-Manufacturer Price |
cemp-tpuu |
Commonwealth Ex-Manufacturer Price |
cemp-tpp |
Commonwealth Ex-Manufacturer Price |
memp-tpuu-or-tpp |
Manufacturer Ex-Manufacturer Price |
memp-tpuu |
Manufacturer Ex-Manufacturer Price |
memp-tpp |
Manufacturer Ex-Manufacturer Price |
cp2p |
Commonwealth Price to Pharmacist |
lp2p |
Lowest Price to Pharmacist |
mp2p |
Manufacturer Price to Pharmacist |
cdpmq |
Commonwealth Dispensed Price for Maximum Quantity (or Dispensed Price for Maximum
Amount for infusibles) |
ldpmq |
Lowest Dispensed Price for Maximum Quantity (or Dispensed Price for Maximum Amount
for infusibles) |
mdpmq |
Manufacturer Dispensed Price for Maximum Quantity (or Dispensed Price for Maximum
Amount for infusibles) |
brand-premium |
Brand Premium |
therapeutic-premium |
Therapeutic Group Premium or Other Special Patient Contribution |
mrvsn |
Maximum Recordable Value for Safety Net |
pfdi |
Premium-free Dispensing Incentive |
moa |
Manner of Administration |
cont-disp |
Continued Dispensing Flag |
bioequivalence |
Bioequivalence Flag |
Modules
Produce Control File – control.txt
Produces the control file
Version 3.0.1
Module Parameters
Module Description
This is a stylesheet module. It is not intended to be evaluated directly, but is included
in the allextracts.xsl stylesheet.
This XSL stylesheet module produces the Control extract file (CONTROL.TXT) from a
v3.0 PBS XML document.
The control extract file gives information about the Standard Extract of data, specifying
the date it was extracted from the Australian Department of Health and Ageing's database
and its date of effect.
The source document must be a v3.0 PBS XML document.
The result document is a text file.
AMT Extract File – amt.txt, deprecated_amt.txt
Produces the amt.txt, deprecated_amt.txt files
Note: deprecated_amt.txt - Replicates the original amt.txt file. For use only in systems
that cannot upgrade to the new amt.txt file.
Version 3.1.1
Module Parameters
Module Description
This is a stylesheet module. It is not intended to be evaluated directly, but is included
in the allextracts.xsl stylesheet.
This XSL stylesheet module produces the extract file (amt yyyymmdd.txt) from a v3.0
PBS XML document containing details of AMT identifiers for PBS items.
The source document must be a v3.0 PBS XML document.
The result document is a text file.
The default field delimiter in this file is the exclamation mark (!).
Program Code |
Character |
2 |
As per Section 10 Drug Type Codes. |
PBS Code |
Character |
6 |
Five or six alphanumeric characters in format (n)nnnna. |
Manufacturer Code |
Character |
|
Two character alphabetic, refer to file Mnfr yyyymmdd.txt. Two character alphabetic
code in the Schedule Book. |
Brand Name |
Character |
|
TPP's 'Brand Name' as used in the PBS. |
Unit of Measure |
Character |
|
E.g. Milligram, Micrograms, International Units. |
MP Concept ID |
Character |
|
Medicinal product Code. |
MP |
Character |
|
Medicinal Product. |
MPUU Concept ID |
Character |
|
Medicinal Product Unit of Use Code. |
MPUU |
Character |
|
Medicinal Product Unit of Use. |
MPP Concept ID |
Character |
|
Medicinal Product Pack Code. |
MPP |
Character |
|
Medicinal Product Pack. |
TPUU Concept ID |
Character |
|
Trade Product Unit of Use Code. |
TPUU |
Character |
|
Trade Product Unit of Use. |
TPP Concept ID |
Character |
|
Trade Product Pack Code. |
TPP |
Character |
|
Trade Product Pack. |
Vial Content |
Character |
|
The number of UOM's in a single vial (unit-of-use). |
mq-pack |
Character |
|
For ready-prepared items the maximum quantity (in terms of pack). Infusible items
leave this field blank. |
mq-uu |
Character |
|
For ready-prepared items the maximum quantity (in terms of unit-of-use). For infusible
items the maximum amount of Medicinal Product in terms of UOM. |
cemp-tpp |
Character |
|
Commonwealth's 'Ex-Manufacturer Price' for a manufacturer's pack. |
cemp-tpuu |
Character |
|
Commonwealth's 'Ex-Manufacturer Price' for a manufacturer's unit-of-use. |
memp-tpp |
Character |
|
Manufacturer's 'Ex-Manufacturer Price' for a manufacturer's pack. |
memp-tpuu |
Character |
|
Manufacturer's 'Ex-Manufacturer Price' for a manufacturer's unit-of-use. |
PFDI Amount |
Character |
|
Value of Premium Free Dispensing Incentive. |
AMT2 Extract File – amt2.csv
Produces the amt2 file
Version 4.0.1
Module Parameters
Module Description
This is a stylesheet module. It is not intended to be evaluated directly, but is included
in the allextracts.xsl stylesheet.
This XSL stylesheet module produces an extract file (amt yyyymmdd.txt) from a v3.0
PBS XML document containing details of AMT identifiers for PBS items. Only ready-prepared
and infusible items are included in the extract.
The source document must be a v3.0 PBS XML document.
The result document is a text file.
The default field delimiter in this file is the exclamation mark (!) (see 'delimiter'
parameter, below).
Column values and their order are configurable using the 'display' parameter, see
below.
NB. the order of the descriptions of field names below does not necessarily reflect
their order in the output.
program-code |
Character |
2 |
As per Section 10 Drug Type Codes. |
item-code |
Character |
6 |
Alphanumeric characters in format (n)nnnna. |
manufacturer-code |
Character |
|
Two character alphabetic, refer to file Mnfr yyyymmdd.txt. Two character alphabetic
code in the Schedule Book. |
brand-name |
Character |
|
TPP's 'Brand Name' as used in the PBS. |
unit-of-measure |
Character |
|
E.g. Milligram, Micrograms, International Units. |
mp-id |
Character |
|
AMT Medicinal Product SNoMED-CT Code. |
mp-pt |
Character |
|
AMT Medicinal Product preferred term. |
mpp-id |
Character |
|
AMT Medicinal Product Pack SNoMED-CT Code. |
mpp-pt |
Character |
|
AMT Medicinal Product Pack preferred term. |
tpuu-id |
Character |
|
AMT Trade Product Unit-of-use SNoMED-CT Code. |
tpuu-pt |
Character |
|
AMT Trade Product Unit-of-use preferred term. |
tpp-id |
Character |
|
AMT Trade Product Pack SNoMED-CT Code. |
tpp-pt |
Character |
|
AMT Trade Product Pack preferred term. |
vial-content |
Character |
|
The number of UOM's in the TPUU (ie. a single vial). |
mq-pack |
Character |
|
For ready-prepared items the maximum quantity (in terms of pack). Infusible items
leave this field blank. |
mq-uu |
Character |
|
For ready-prepared items the maximum quantity (in terms of unit-of-use). For infusible
items the maximum amount of Medicinal Product in terms of UOM. |
cemp-tpp |
Character |
|
Commonwealth's 'Ex-Manufacturer Price' for a manufacturer's pack. |
cemp-tpuu |
Character |
|
Commonwealth's 'Ex-Manufacturer Price' for a manufacturer's unit-of-use. |
memp-tpp |
Character |
|
Manufacturer's 'Ex-Manufacturer Price' for a manufacturer's pack. |
memp-tpuu |
Character |
|
Manufacturer's 'Ex-Manufacturer Price' for a manufacturer's unit-of-use. |
pfdi |
Character |
|
Value of Premium Free Dispensing Incentive. |
NOT INCLUDED IN DISPLAY DEFAULT |
|
|
------------------------------------------- |
moa |
Character |
|
Manner of Administration |
mpuu-id |
Character |
|
AMT Medicinal Product Unit-of-use SNoMED-CT Code. |
mpuu-pt |
Character |
|
AMT Medicinal Product Unit-of-use preferred term. |
pack-content |
Character |
|
The number of UOM's in the TPP. |
mq |
Character |
|
For ready-prepared items the maximum quantity (in terms of unit-of-use). For infusible
items the maximum amount of Medicinal Product in terms of UOM. |
mp-int |
Character |
|
Internal description of MP. Selects shortest description if there are multiple available. |
pr-int |
Character |
|
Internal description of prescribing rule. |
Extract ATC File – atc.txt
Produces the atc file
Version 4.0.2
Module Parameters
Module Description
This is a stylesheet module. It is not intended to be evaluated directly, but is included
in the allextracts.xsl stylesheet.
This XSL stylesheet module produces the ATC extract file (ATC yyyymmdd.txt) from a
v3.0 PBS XML document.
The ATC extract file provides information on ATC codes and their meanings. The ATC
codes are used to provide the sort order for the drugs in the Schedule.
The source document must be a PBS XML document.
The result document is a text file.
The default field delimeter in this file is the exclamation mark (!).
Extract Cautions File – cautions.txt
Produces the cautions file
Version 4.0.2
Module Parameters
Module Description
This is a stylesheet module. It is not intended to be evaluated directly, but is included
in the allextracts.xsl stylesheet.
This XSL stylesheet module produces the Cautions ANS extract file (CautionExtract
yyyymmdd.txt) from a v3.0 PBS XML document.
The Caution extract lists all Caution Ids and their descriptions. It is used for linking
to values in the LinkExtract and PBS Item Table extract files.
The source document must be a PBS XML document.
The result document is a text file.
The field delimiter in this file is the tab character.
Caution Id |
Character |
4 |
1 |
Numeric characters |
Caution Text |
Character |
12600 |
6 |
Text of Caution description from the PBS Book. |
Extract continued dispensing file – cont-disp.txt
Produces the cont-disp file
Version 3.1
Module Parameters
Module Description
This is a stylesheet module. It is not intended to be evaluated directly, but is included
in the allextracts.xsl stylesheet.
This XSL stylesheet module produces the continued dispensing extract file (cd_yyyymmdd.txt)
from a v3.0 PBS XML document.
The source document must be a PBS XML document.
The result document is a text file.
The default field delimiter is the tab character.
Item Code |
Character |
6 |
Five or six alphanumeric characters in format (n)nnnna. |
LI Drug |
String |
|
Optional: Legislative Instrument - drug name. If this is not found, returns the MP
name. |
LI Form |
String |
|
Optional: Legislative Instrument - form and strength descriptor. If this is not found,
returns the MPP name. |
Continued dispensing |
Character |
1 |
If 'Y', then Continued Dispensing is allowed. If 'N' then Continued Dispensing is
not allowed. |
Drug Extract File – drug.txt
Produces the drug file
Version 4.2
Module Parameters
Module Description
This is a stylesheet module. It is not intended to be evaluated directly, but is included
in the allextracts.xsl stylesheet.
This XSL stylesheet module produces the Drug extract file (Drug yyyymmdd.txt) from
a v3.0 PBS XML document. Only ready prepared and infusible items are extracted.
The source document must be a v3.x PBS XML document.
The result document is a text file.
The default field delimiter in this file is the exclamation mark (!).
Extract fee-only items – fee-only.xml
Produces the fee-only file
Version 2.1
Module Parameters
Module Description
This is a stylesheet module. It is not intended to be evaluated directly, but is included
in the allextracts.xsl stylesheet.
This XSL stylesheet module produces the Fee-only extract file (fee-only-yyyymmdd.xml)
from a v3.1 PBS XML document.
The source document must be a PBS XML document, schema-valid against version 3.1 (or
later) of the PBS XML Schema.
The result is an XML document. The result document contains pricing information for
items that have a fee-only pricing arrangement.
Extract Fees File – fees.txt
Produces the fees file
Version 4.0.1
Module Parameters
Module Description
This is a stylesheet module. It is not intended to be evaluated directly, but is included
in the allextracts.xsl stylesheet.
This XSL stylesheet module produces the Fees extract file (Fees yyyymmdd.txt) from
a v3.0 PBS XML document.
The fees extract file contains details of patient contributions, mark-ups and fees
that are relevant to the prices of drugs shown in the file Drug yyyymmdd.txt.
The source document must be a v3.x PBS XML document.
The result document is a text file.
It is a free format text file containing the fields listed below.
Patient Contribution
Container Fee
Dispensing Fees
Markups
PBS Item Table Extract File – item.txt
Produces the item file
Version 5.1
Module Parameters
Module Description
This is a stylesheet module. It is not intended to be evaluated directly, but is included
in the allextracts.xsl stylesheet.
This XSL stylesheet module produces the PBS Item Table ANS extract file (PBS Item
Table yyyymmdd.txt) from a v3.0 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 a v3.0 PBS XML document.
The result document is a text file.
The default field delimeter in this file is the tab character.
Link Extract File – links.txt
Produces the links file
Version 5.1.2
Module Parameters
Module Description
This is a stylesheet module. It is not intended to be evaluated directly, but is included
in the allextracts.xsl stylesheet.
This XSL stylesheet module produces the Link ANS extract file (LinkExtract yyyymmdd.txt)
from a v3.0 PBS XML document.
A restriction is comprised of one or more indications. The Link extract file file
links the Indication Id to the PBS item code. Where there are multiple indications
for an item, there will be multiple records in this file for that PBS item code.
This version of the stylesheet only handles restrictions for prescribing rules. That
is, it assumes all restrictions are for both the prescribing rule and increase (Increase
MQ/R Flag=3). A future version of the stylesheet needs to handle increase rules.
The source document must be a v3.0 PBS XML document.
The result document is a text file.
The field delimiter in this file is the tab character.
Extract Manufacturer File – manufacturer.txt
Produces the manufacturer file
Version 2.0.2
Module Parameters
Module Description
This is a stylesheet module. It is not intended to be evaluated directly, but is included
in the allextracts.xsl stylesheet.
This XSL stylesheet module produces the Manufacturer extract file (Mnfr yyyymmdd.txt)
from a v3.0 PBS XML document.
The Manufacturer extract provides name, address, telephone and facsimile number information
for the sponsors of drugs listed in the schedule.
The source document must be a PBS XML document.
The result document is a text file.
The default field delimeter in this file is the exclamation mark (!).
Manufacturer Code |
Character |
2 |
Two character alphabetic code in the Schedule Book |
Manufacturer Name |
Character |
120 |
|
Street Address |
Character |
180 |
|
Telephone Number |
Character |
16 |
Numeric characters |
Facsimile Number |
Character |
16 |
Numeric characters |
Extract RACF medication chart file – med-chart-electronic.txt, med-chart-paper.txt
Produces the med-chart-electronic.txt, med-chart-paper.txt files
Version 4.2.1
Module Parameters
Module Description
This is a stylesheet module. It is not intended to be evaluated directly, but is included
in the allextracts.xsl stylesheet.
This XSL stylesheet module produces the Residential Aged Care Facility (RACF) medication
chart extract file (med chart yyyymmdd.txt) from a v3.0 PBS XML document.
NB. this XSL stylesheet DOES NOT produce an extract for Hospital medication charts.
The source document must be a PBS XML document.
The result document is a text file.
The default field delimiter is the tab character.
Program Code |
Character |
2 |
Two alphanumeric characters. |
Item Code |
Character |
6 |
Five or six alphanumeric characters in format (n)nnnna. |
LI Drug |
String |
|
Optional: Legislative Instrument - drug name. If this is not found, returns the MP
name. |
LI Form |
String |
|
Optional: Legislative Instrument - form and strength descriptor. If this is not found,
returns the MPP name. |
Med chart |
Character |
1 |
If 'Y', then the particular PBS item code cannot be supplied from a RACF medication
chart and a separate written prescription is still required. If 'N' then the particular
PBS item code can be supplied from a RACF medication chart. |
Extract Notes File – notes.txt
Produces the notes file
Version 4.0.1
Module Parameters
Module Description
This is a stylesheet module. It is not intended to be evaluated directly, but is included
in the allextracts.xsl stylesheet.
This XSL stylesheet module produces the Notes ANS extract file (NoteExtract yyyymmdd.txt)
from a v3.0 PBS XML document.
The Note extract lists all Note ids and their descriptions. It is used for linking
to values in the LinkExtract and PBS Item Table extract files.
The source document must be a PBS XML document.
The result document is a text file.
The field delimeter in this file is the tab character.
Notes Id |
Character |
4 |
1 |
Numeric characters |
Notes Text |
Character |
12600 |
6 |
Text of Note description from the PBS Book. |
Extract Dispensing Incentive Items – DI.txt
Produces the pfdi file
Version 3.1
Module Parameters
Module Description
This is a stylesheet module. It is not intended to be evaluated directly, but is included
in the allextracts.xsl stylesheet.
Extract Prescriber Type – prescriber-type.txt
Produces the prescriber-type file
Version 3.1
Module Parameters
Module Description
This is a stylesheet module. It is not intended to be evaluated directly, but is included
in the allextracts.xsl stylesheet.
This stylesheet module extracts prescriber type data from the PBS XML document.
The source document is the PBS XML document, schema-valid to v3.0 (or later) of the
PBS XML Schema.
The result is text. Each line lists the prescriber type applicable to an item. See
parameter descriptions for further details about the format of the text output.
Extract Restrictions File – restrictions-delimited.txt, restrictions-fixed.txt
Produces the restrictions-delimited.txt, restrictions-fixed.txt files
Version 3.2
Module Parameters
Module Description
This is a stylesheet module. It is not intended to be evaluated directly, but is included
in the allextracts.xsl stylesheet.
This XSL stylesheet module produces the Restrictions ANS extract file (RestrictionExtract
yyyymmdd.txt) from a v3.0 PBS XML document.
A restriction is comprised of one or more indications. The Restriction extract file
lists the Indication Ids and the text of the Indications. This is the text that appears
under the headings 'Restricted benefit', 'Authority Required (STREAMLINED)' and 'Authority
Required' in the Schedule of Pharmaceutical Benefits.
The source document must be a v3.0 PBS XML document.
The result document is a text file.
The field delimiter in this file is the tab character. NB. In the 'fixed' format type,
this file does not include a tab character after a five digit treatment-of code. In
this case, the restriction text starts in position 6 (as specified below). In the
'delimited' format type, this file always includes a tab character after the treatment-of
code. In this case, a five digit code will result in the text starting in position
7.
Extract SN20DR File – sn20dr.txt
Produces the sn20dr file
Version 4.1
Module Parameters
Module Description
This is a stylesheet module. It is not intended to be evaluated directly, but is included
in the allextracts.xsl stylesheet.
This XSL stylesheet module produces the SN20DR extract file (sn20dr yyyymmdd.txt)
from a v3.0 PBS XML document.
The source document must be a PBS XML document.
The result document is a text file.
The default field delimiter is the tab character.
Item Code |
Character |
6 |
Five or six alphanumeric characters in format (n)nnnna. |
Days |
Character |
|
The number of days before another repeat can be filled. |
Counted |
Character |
1 |
If 'Y', then if the script is filled within the specified number of days the script
is counted against the Safety Net. If 'N' then the script is not counted against the
Safety Net. |
Extract Streamlined Authority Items – streamlined.txt
Produces the streamlined file
Version 3.2
Module Parameters
Module Description
Revision History
1.5 |
12 October 2020 |
Add restrictions-delimited file |
1.4.2 |
01 October 2020 |
Moves deprecated-amt back into level with other extracts |
1.4.1 |
16 September 2020 |
Documentation improvements. |
1.4 |
15 September 2020 |
Add deprecated AMT extract. |
1.3.1 |
28 May 2020 |
Improve documentation. |
1.3 |
01 May 2020 |
Changed med-chart to mc-racf-electronic and mc-racf-paper. Added fee-only extract. |
1.2 |
07 April 2020 |
Added status parameter. |
1.1 |
16 March 2020 |
Added restrictions. |
1.0 |
14 June 2019 |
Initial version. |