import_rx: Download and return a combined dataframe for specified months

Usage Arguments Details Examples

Usage

1
import_rx(month_range = 1:1)

Arguments

month_range

The range of months to download and combine, with 1 being the most recent available month

Details

The import_rx function has been written to make it easier to import monthly Northern Ireland GP practice-level prescribing data from OpenDataNI.gov.uk and create combined datasets of the .csv files. This requires internet access to work.

The data covers prescriptions that are prescribed by a GP or Nurse practitioner (within a GP practice) subsequently dispensed (e.g. by a Community Pharmacist) and submitted to HSCNI Business Services Organisation (BSO) for payment. Items prescribed but not redeemed by patients at pharamacies are therefore not included. Private prescriptions, hospice items and post-payment adjustments are also excluded.

For each GP practice in Northern Ireland, and for each prescribed medicine (by presentation), dressing and appliance, information on the number of prescribed items, quantity of individual tablets, capsules, liquids etc. dispensed (in units, millilitres or grammes), and the gross and actual cost are included.

Practices are referred to by their practice_id. Practice references are available from... @TODO

Individual presentations are referred to by the substance or product's name (VTM_NM), by the generic name (VMP_NM) and by their branded name (AMP_NM). In addition, British National Formulary (BNF) codes, and BNF chapter, section, paragraph and subparagraph reference numbers feature.

The default behaviour is to download the most recent single month (i.e. rx_combine_months(1:1)).

Examples

1
2
3
4
5
6
prescriptions <- import_rx(1:12) ## Download the last 12 months of prescribing data and return to object



{ ~kwd1 }
{ ~kwd2 }

BobHarper1/rxni documentation built on May 9, 2019, 1:14 a.m.