Primary Care Medicines (PCM) Dataset#
1. Summary#
The information below is retrieved from the Health Data Gateway API developed by NHS England, with additional fields added by UK LLC (indicated by italics).This dataset is also called the Medicines Dispensed in Primary Care NHS Business Services Authority dataset.
# define target dataset to document
schema = 'nhsd'
table = 'PCM'
version = 'v0003'
# import functions from script helper
import sys
script_fp = "../../../../scripts/"
sys.path.insert(0, script_fp)
from data_doc_helper import DocHelper
# create instance
document = DocHelper(schema, table, version, script_fp)
# markdown/code hybrid cell module requirement
from IPython.display import display, Markdown
# get api data
dataset = document.get_api_data()
display(Markdown("**NHS England title of dataset:** "+dataset['datasetfields']['datautility']['title']))
display(Markdown("***Dataset name in UK LLC TRE:*** *nhsd.PCM*"))
display(Markdown("**Short abstract:** "+dataset['datasetfields']['abstract']))
display(Markdown("***Extended abstract:*** *The PCM dataset contains information about all prescriptions that have been submitted by prescribers to the NHS Business Services Authority (NHSBSA) for reimbursement purposes. The dataset includes prescriptions issued by pharmacists, dentists and doctors in general practice, community clinics, dentists, hospital clinics and community nursing homes. The prescriptions may have been written in England and dispensed UK-wide or written elsewhere in the UK and dispensed in England. For a full list of variables see the [NHS England Metadata Dashboard.](https://app.powerbi.com/view?r=eyJrIjoiMjY4OTRhNmUtZDdiMy00NzVhLTkzMmMtZmRhMzAyOWFkZjc4IiwidCI6IjM3YzM1NGIyLTg1YjAtNDdmNS1iMjIyLTA3YjQ4ZDc3NGVlMyJ9)*"))
display(Markdown("**Geographical coverage:** "+dataset['datasetfields']['geographicCoverage'][0]))
display(Markdown("**Temporal coverage:** "+dataset['datasetfields']['datasetStartDate']))
display(Markdown("***Data available in UK LLC TRE from:*** *01/04/2015 onwards*"))
display(Markdown("**Typical age range:** "+dataset['datasetfields']['ageBand']))
display(Markdown("**Collection situation:** "+dataset['datasetv2']['provenance']['origin']['collectionSituation'][0]))
display(Markdown("**Purpose:** "+dataset['datasetv2']['provenance']['origin']['purpose'][0]))
display(Markdown("**Source:** "+dataset['datasetv2']['provenance']['origin']['source'][0]))
display(Markdown("**Pathway:** "+dataset['datasetv2']['coverage']['pathway']))
display(Markdown("***Information collected:*** *TBC*"))
display(Markdown("***Structure of dataset:*** *TBC*"))
display(Markdown("***Update frequency in UK LLC TRE:*** *Quarterly*"))
display(Markdown("***Dataset versions in UK LLC TRE:*** *TBC*"))
display(Markdown("***Data quality issues:*** *TBC*"))
display(Markdown("***Restrictions to data usage***: *Only to be used for research that provides information about the safety and effectiveness of medicines, as specified by the [NHSBSA Medicines Data Directions.](https://digital.nhs.uk/about-nhs-digital/corporate-information-and-documents/directions-and-data-provision-notices/secretary-of-state-directions/nhs-business-services-authority-nhsbsa-medicines-data-directions-2019) Medical purposes only (medical research) as defined in the NHS Act 2006: [https://www.legislation.gov.uk/ukpga/2006/41/part/13/crossheading/patient-information](https://www.legislation.gov.uk/ukpga/2006/41/part/13/crossheading/patient-information)*"))
display(Markdown("***Further information:*** *[https://digital.nhs.uk/data-and-information/data-tools-and-services/data-services/medicines-dispensed-in-primary-care-nhsbsa-data](https://digital.nhs.uk/data-and-information/data-tools-and-services/data-services/medicines-dispensed-in-primary-care-nhsbsa-data)*"))
NHS England title of dataset: Medicines dispensed in Primary Care (NHSBSA data)
Dataset name in UK LLC TRE: nhsd.PCM
Short abstract: The Medicines Dispensed in Primary Care (NHSBSA) data comprises prescriptions for medicines that are dispensed or supplied by community pharmacists, appliance contractors and dispensing doctors in England.
Extended abstract: The PCM dataset contains information about all prescriptions that have been submitted by prescribers to the NHS Business Services Authority (NHSBSA) for reimbursement purposes. The dataset includes prescriptions issued by pharmacists, dentists and doctors in general practice, community clinics, dentists, hospital clinics and community nursing homes. The prescriptions may have been written in England and dispensed UK-wide or written elsewhere in the UK and dispensed in England. For a full list of variables see the NHS England Metadata Dashboard.
Geographical coverage: United Kingdom,England
Temporal coverage: 2018-04-01
Data available in UK LLC TRE from: 01/04/2015 onwards
Typical age range: 0-150
Collection situation: PRIMARY CARE
Purpose: CARE
Source: PAPER BASED
Pathway: MEDICINES IN COMMUNITY SETTINGS
Information collected: TBC
Structure of dataset: TBC
Update frequency in UK LLC TRE: Quarterly
Dataset versions in UK LLC TRE: TBC
Data quality issues: TBC
Restrictions to data usage: Only to be used for research that provides information about the safety and effectiveness of medicines, as specified by the NHSBSA Medicines Data Directions. Medical purposes only (medical research) as defined in the NHS Act 2006: https://www.legislation.gov.uk/ukpga/2006/41/part/13/crossheading/patient-information
Further information: https://digital.nhs.uk/data-and-information/data-tools-and-services/data-services/medicines-dispensed-in-primary-care-nhsbsa-data
2. Metrics#
The tables below summarise the PCM dataset in the UK LLC TRE.
Table 1 The number of participants from each LPS that are represented in the PCM dataset in the UK LLC TRE
(Note: numbers relate to the most recent extract of NHS England data)
gb_cohort = document.get_cohort_count()
print(gb_cohort.to_markdown(index=False, tablefmt="fancy_grid"))
╒════════════════╤═════════╕
│ cohort │ count │
╞════════════════╪═════════╡
│ ALSPAC │ 5313 │
├────────────────┼─────────┤
│ BCS70 │ 5349 │
├────────────────┼─────────┤
│ BIB │ 24916 │
├────────────────┼─────────┤
│ ELSA │ 6890 │
├────────────────┼─────────┤
│ EPICN │ 14580 │
├────────────────┼─────────┤
│ EXCEED │ 9113 │
├────────────────┼─────────┤
│ FENLAND │ 9588 │
├────────────────┼─────────┤
│ GLAD │ 66004 │
├────────────────┼─────────┤
│ MCS │ 16220 │
├────────────────┼─────────┤
│ NCDS58 │ 5836 │
├────────────────┼─────────┤
│ NEXTSTEP │ 4569 │
├────────────────┼─────────┤
│ NIHRBIO_COPING │ 15568 │
├────────────────┼─────────┤
│ NSHD46 │ 2441 │
├────────────────┼─────────┤
│ TEDS │ 6931 │
├────────────────┼─────────┤
│ TRACKC19 │ 12855 │
├────────────────┼─────────┤
│ TWINSUK │ 11423 │
├────────────────┼─────────┤
│ UKHLS │ 6474 │
├────────────────┼─────────┤
│ total │ 224070 │
╘════════════════╧═════════╛
3. Helpful syntax#
Below we will include syntax that may be helpful to other researchers in the UK LLC TRE. For longer scripts, we will include a snippet of the code plus a link to Git where you can find the full script.