Text Extracts v.1.2 (Beta)

Page last updated: 9 April 2020

Version 1.2

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.

Files

The following files are able to be produced:

Global Parameters

Name Purpose Default value Description
make Make Modules. control,amt,atc,cautions,cont-disp,drug,links,item,fees,manufacturer,med-chart,notes,pfdi,prescriber-type,restrictions,sn20dr,streamlined

A comma-separated list of modules to generate.

destination Destination folder. .

The folder for all products. All stylesheet modules write their result documents into this folder.

status Status. effective

Extract data with the given status. Valid values are 'effective' or 'supply-only'.

header Whether to display header. yes

Whether to display a header row. Default is 'yes'. '0', 'no', 'false' == no header; '1', 'yes', 'true' == header.

delimiter Column Separator. ,

The character to use to separate columns. Default is ','.

quote Quote character. "

The character to use to quote column values. Default is '"'.

eol Row Separator.

The character to use to separate rows. Default is LF.

debug Debugging.

Emit extra output for debugging purposes. Default is none.

Display Codes

The display parameter uses the following codes. These are also displayed as column headers when the header row is enabled.

Code Description
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

Produces the control.txt file

Version 3.0.1

Module Parameters

Name Purpose Default value Description
control-filename Filename. control.txt

The filename to use for the result document.

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

Produces the amt.txt file

Version 3.1

Module Parameters

Name Purpose Default value Description
amt-filename Filename. amt.txt

The filename to use for the result document.

amt-delimiter Column Separator. "!"

The character to use to delimit columns. Default is the exclamation mark (!). An empty string will use the global delimiter.

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.

Field Name Format Maximum Length Description
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.

Extract ATC File

Produces the atc.txt file

Version 4.0.2

Module Parameters

Name Purpose Default value Description
atc-filename Filename. atc.txt

The filename to use for the result document.

atc-delimiter Column Separator. "!"

The character to use to delimit columns. Default is the exclamation mark (!). An empty string will use the global delimiter.

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.

Field Name Format Maximum Length Description
ATC Code Character 20

Code as published in the current ATC Index issued by the WHO collaborating Centre for Drug Statistics Methodology, in a five level hierarchy in format annaann, as follows:

  • First level - a - anatomical main group
  • Second level - nn - therapeutic main group
  • Third level - a - therapeutic subgroup
  • Fourth level - a - chemical/therapeutic subgroup
  • Fifth level - nn - subgroup for chemical substance
ATC Meaning Character 230 Meaning for ATC code as published in the current ATC Index issued by the WHO Collaborating Centre for Drug Statistics Methodology.

Extract Cautions File

Produces the cautions.txt file

Version 4.0.2

Module Parameters

Name Purpose Default value Description
cautions-filename Filename. cautions.txt

The filename to use for the result document.

cautions-delimiter Column Separator. " "

The character to use to delimit columns. Default is the tab character. An empty string will use the global delimiter.

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.

Field Name Format Maximum Length Start Position Description
Caution Id Character 4 1 Numeric characters
Caution Text Character 12600 6 Text of Caution description from the PBS Book.

Extract continued dispensing file

Produces the cont-disp.txt file

Version 3.1

Module Parameters

Name Purpose Default value Description
cont-disp-filename Filename. cont-disp.txt

The filename to use for the result document.

cont-disp-delimiter Column Separator. " "

The character to use to delimit columns. Default is the tab character. An empty string will use the global delimiter.

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.

Field Name Format Maximum Length Description
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

Produces the drug.txt file

Version 4.1

Module Parameters

Name Purpose Default value Description
drug-filename Filename. drug.txt

The filename to use for the result document.

drug-display Fields. program-code,atc,atc-type,atc-print-option,item-code,restriction-flag,has-caution,has-note,mq,repeats,manufacturer-code,pack-size,markup-band,fee-code,dangerous-drug-code,brand-premium,therapeutic-premium,cp2p,cdpmq,lp2p,ldpmq,mp2p,mdpmq,mrvsn,bioequivalence,brand-name,mp-pt,tpuu-or-mpp-pt

The fields to be included, in order. Demlimited by comma.

drug-delimiter Delimiter "!"

The character to use to separate fields. Default is the exclamation mark ('!'). Blank uses the global default.

drug-truncate Truncate true()

Indicates whether or not to truncate fields to fit the maximum length. Default is true (truncate fields).

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.

Field Name Format Maximum Length Description
Program Code Character 2 two character alphabetic, see separate table below
ATC Code Character 8 refer to file ATC yyyymmdd.txt
ATC Type Character 1

one character alphabetic, one value:

  • P - primary reference
ATC Print Option Character 1

determines how THIS drug item listed under THIS ATC code is printed in the Schedule of Pharmaceutical Benefits - one character numeric, one value:

  • 1 - print full entry ONLY
PBS Code Character 5 Five or six character in format (n)nnnna; for allocations of PBS code blocks see separate table below
Restriction Flag Character 1

one character alphabetic, three possible values:

  • U - unrestricted
  • R - restricted benefit
  • A - authority required
Caution Flag Character 1 one character alphabetic, C if Caution attached, otherwise blank
Note Flag Character 1 one character alphabetic, N if Note(s) attached,otherwise blank
Maximum Quantity (Maximum Amount for infusible items) Character 5 the maximum quantity (units-of-use) published in the Schedule
Number of Repeats Character 2 the maximum number of repeats published in the Schedule
Manufacturer's Code Character 2 two character alphabetic, refer to file Mnfr yyyymmdd.txt
Pack Size Character 4 the quantity contained in the manufacturer's pack
Mark-up Code Character 1

one character alphabetic (current rates in file Fees yyyymmdd.txt), four values:

  • A - no mark-up (section 100 drug types)
  • B - 50% (not currently in use)
  • C - standard six-tier ready-prepared mark-up; the price to pharmacist for maximum quantity determines which tier applies
  • D - HSD four-tier ready-prepared mark-up; the price to pharmacist for maximum quantity determines which tier applies
  • E - one-tier ready-prepared mark-up
Dispense Fee Type Code Character 2

two characters alphabetic (current rates in file Fees yyyymmdd.txt), four values:

  • NF - no fee (section 100 drug types)
  • RP - ready-prepared, normal pricing arrangement
  • EP - extemporaneously-prepared, normal pricing arrangement
  • EW - extemporaneously-prepared + purified water, normal pricing arrangement
  • FR - fee-only pricing arrangement
  • FN - fee-only pricing arrangement, no fee (section 100 drug types)
  • FE - fee-only pricing arrangement + extemporaneously-prepared
  • FW - fee-only pricing arrangement + extemporaneously-prepared + purified water
Dangerous Drug Fee Code Character 2 DD (current rate in file Fees yyyymmdd.txt) if dangerous drug fee payable, otherwise blank
Brand Premium Character 10
Therapeutic Group Premium Character 10 This is the Therapeutic Group Premium (or Special Patient Contribution)
Commonwealth Price to Pharmacist Character 10 Reimbursement price-to-pharmacist for manufacturer's pack. For S100 programs this value is the price ex-manufacturer.
Commonwealth Dispensed Price for Maximum Quantity (Maximum Amount for infusible items) Character 10
Therapeutic Group Manufacturer's Price to Pharmacist Character 10 This is the Therapeutic Group Manufacturer's Price to Pharmacist (or Special Patient Contribution Manufacturer's Price to Pharmacist) (for manufacturer's pack). For S100 programs this value is the price ex-manufacturer.
Therapeutic Group Manufacturer's Dispensed Price for Maximum Quantity Character 10 This is the Therapeutic Group Manufacturer's Dispensed Price for Maximum Quantity (or Special Patient Contribution Manufacturer's Dispensed Price for Maximum Quantity) (for manufacturer's pack).
Manufacturer's Price to Pharmacist Character 10 For manufacturer's pack. For S100 programs this value is the price ex-manufacturer.
Manufacturer's Dispensed Price for Maximum Quantity (Maximum Amount for infusible items Character 10
Maximum Recordable Value for Safety Net Character 10 Maximum Recordable Value for Safety Net
Bioequivalence Indicator Character 1 Bioequivalence Indicator
Brand Name Character 45 MAY be truncated at 45 characters
Drug (MP) Name Character 80 MAY be truncated at 80 characters
AMT MPP preferred term Character 150 MAY be truncated at 150 characters

Link Extract File

Produces the links.txt file

Version 5.1.2

Module Parameters

Name Purpose Default value Description
links-filename Filename links.txt

The filename to use for the result document.

links-display Fields item-code,treatment-of-code,increase-code,start-date,end-date

Fields to be included, in order. Delimited by comma.

links-delimiter Field Delimiter

Delimiter to use between fields. Default is tab character. Blank uses the global default.

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.

Field Name Format Maximum Length Start Position Description
PBS Item Code Character 6 1 five or six characters in format (n)nnnna
Indication Id Character 4 7 Numeric characters.The text of the Indication can be found in the RestrictionExtract file.
Increased MQ/R Flag Character 1 12

Indicates whether the Indication applies to:

  • increased quantities and/or repeats; or
  • normal quantities and/or repeats; or
  • both normal and increased quantities and/or repeats

Values:

  • 1 = this indication applies only to increased quantities and/or repeats
  • 2 = this indication applies only to normal quantities and/or repeats
  • 3 = this indication applies both to normal and increased quantities and/or repeats

For any given PBS item code, these flags will be either 3 (the usual case), or either 1 or 2.

Start date Character 8 14 Format ddmmyyyy
End date Character 8 23 Format ddmmyyyy. Maybe blank if item is current (no end date has been set).

PBS Item Table Extract File

Produces the item.txt file

Version 5.1

Module Parameters

Name Purpose Default value Description
item-filename Filename item.txt

The filename to use for the result document.

item-bug-compatible Bug Compatibility no

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".

item-delimiter Field Delimiter

Delimiter to use between fields. Default is tab character. Blank uses the global default.

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.

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

Extract Fees File

Produces the fees.txt file

Version 4.0.1

Module Parameters

Name Purpose Default value Description
fees-filename Filename. fees.txt

The filename to use for the result document.

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

Field Name Format Maximum Length Description
Code Character 6 Values = C or G
Contribution Type Character 25

Description of category code

  • C = Concessional
  • G = General
Maximum Contribution Character 15 Maximum contribution towards cost of prescription under the PBS
Minimum Safety Net Character 15 Minimum safety net value to be recorded for prescriptions under PBS

Container Fee

Field Name Format Maximum Length Description
Code Character 6 Values = I or O
Container Type Character 25

Description of Container Fee Code

  • I = Injectable
  • O = Other
Container Fee Character 15 The ready-prepared container fee which applies to quantities less than the manufacturer's pack. Not payable on quantities over the manufacturer's pack

Dispensing Fees

Field Name Format Maximum Length Description
Code Character 6 Code to indicate Dispensing Fee Values = DD,EP,EW,NF,RP
Fee Description Character 25

Description of Dispensing Fee Type Code

  • DD = Dangerous Drug
  • EP = Extemporaneously Prepared
  • EW = Water added
  • NF = No Fee
  • RP = Ready Prepared
Dispensing Fee Character 15 Dispensing fee for given Dispensing Type
Additional Fee Character 15 Additional fee for given Dispensing Type

Markups

Field Name Format Maximum Length Description
Code Character 6

one character alphabetic (current rates in file Fees yyyymmdd.txt), three values:

  • A - no mark-up (section 100 drug types)
  • C - standard six-tier ready-prepared mark-up; the price to pharmacist for maximum quantity determines which tier applies
  • D - HSD four-tier ready-prepared mark-up; the price to pharmacist for maximum quantity determines which tier applies
  • E - one-tier ready-prepared mark-up
Drug Types Character 43 Drug types associated with a given Markup code (For drug type codes see separate table below at 6. Drug txt file)
Markup Low Value Character 10 The lower value of the Markup range
Markup High Value Character 10 The higer value of the Markup range
Markup Character 10 This field may either be a percentage, indicated by a % sign following, or a fixed value, indicated by a preceding $ sign.

Extract Manufacturer File

Produces the manufacturer.txt file

Version 2.0.2

Module Parameters

Name Purpose Default value Description
manufacturer-filename Filename. manufacturer.txt

The filename to use for the result document.

manufacturer-delimiter Column Separator. "!"

The character to use to delimit columns. The default is exclamation mark ('!'). An empty string will use the global delimiter.

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.

Field Name Format Maximum Length Description
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

Produces the med-chart.txt file

Version 4.1

Module Parameters

Name Purpose Default value Description
med-chart-filename Filename. med-chart.txt

The filename to use for the result document.

med-chart-delimiter Column Separator. " "

The character to use to delimit columns. Default is tab character. An empty string will use the global delimiter.

med-chart-display item-code-padded,med-chart
med-chart-type http://pbs.gov.au/medication-chart/racf

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.

Field Name Format Maximum Length Description
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

Produces the notes.txt file

Version 4.0.1

Module Parameters

Name Purpose Default value Description
notes-filename Filename. notes.txt

The filename to use for the result document.

notes-delimiter Column Separator. " "

The character to use to delimit columns. Default is tab character. An empty string will use the global delimiter.

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.

Field Name Format Maximum Length Start Position Description
Notes Id Character 4 1 Numeric characters
Notes Text Character 12600 6 Text of Note description from the PBS Book.

Extract Dispensing Incentive Items

Produces the DI.txt file

Version 3.1

Module Parameters

Name Purpose Default value Description
pfdi-filename Filename. DI.txt

The filename to use for the result document.

pfdi-delimiter Column Separator. " "

The character to use to delimit columns. Default is tab character. An empty string will use the global delimiter.

pfdi-display Column Separator. mp-pt,item-code,manufacturer-code,pfdi

What information to display, and the order in which to display it.

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

Produces the prescriber-type.txt file

Version 3.1

Module Parameters

Name Purpose Default value Description
prescriber-type-filename Filename. prescriber-type.txt

The filename to use for the result document.

prescriber-type-delimiter Column Separator. " "

The character to use to delimit columns. Default is tab character. An empty string will use the global delimiter.

prescriber-type-display Filename. "mp-pt,item-code,prescriber-type"

What information to display, and the order in which to display it. Allowed values are: drug-name, item-code and prescriber-type.

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

Produces the restrictions.txt file

Version 3.0.1

Module Parameters

Name Purpose Default value Description
restrictions-filename Filename restrictions.txt

The filename to use for the result document.

restrictions-display Fields treatment-of-code,restriction-text,misc-flag,date-required-flag,text-required-flag

Fields to be included, in order. Delimited by comma.

restrictions-delimiter Field Delimiter

Delimiter to use between fields. Default is tab character. Blank uses the global default.

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.

Field Name Format Maximum Length Start Position Description
Indication Id Character 4 1 4 digit numeric, commencing with 1000
Restriction Indication Text Character 17040 6 text of indication as it appears in the Schedule
Miscellaneous Restriction Flag Character 1 17047

one numeric character - currently only two values:

  • 0 - default value
  • 1 - only one course of treatment allowed
Date Required Flag Character 1 17049 Y/N, Y where a date (e.g. of an x-ray) is required in an authority application, otherwise N
Text required flag Character 1 17051 Y/N, Y where some text (other than a date) is required in an authority application, otherwise N

Extract SN20DR File

Produces the sn20dr.txt file

Version 4.1

Module Parameters

Name Purpose Default value Description
sn20dr-filename Filename. sn20dr.txt

The filename to use for the result document.

sn20dr-delimiter Column Separator. " "

The character to use to delimit columns. Default is tab character. An empty string will use the global delimiter.

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.

Field Name Format Maximum Length Description
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

Produces the streamlined.txt file

Version 3.1

Module Parameters

Name Purpose Default value Description
streamlined-filename Filename. streamlined.txt

The filename to use for the result document.

streamlined-delimiter Column Separator. " "

The character to use to delimit columns. Default is tab character. An empty string will use the global delimiter.

streamlined-display mp-pt,item-code,treatment-of-code

Module Description

Revision History

Version Release date Changes
1.2 07 April 2020 Added status parameter. Removed amt2 module (the amt2 file has been merged with the amt file, which replaces it).
1.1 16 March 2020 Added restrictions.
1.0 14 June 2019 Initial version.