help for cprdlinkutil(Roger Newson)

Inputting Clinical Practice Research Datalink (CPRD) linkage-source datasets into Stata

cprdlink_linkage_eligibility using filename [ , clear nokey ]

cprdlink_linkage_coverage using filename [ , clear nokey ]

cprdlink_linked_practices using filename [ , clear nokey ]

Description

The cprdlinkutil package is designed for use with the cprdutil package,
which creates Stata datasets from text data files
produced by the Clinical Practice Research Datalink (CPRD).
cprdlinkutil is a suite of utility programs for inputting linkage-source text data files produced by CPRD
for linkage to one or more non-CPRD sources of data on the same patients,
and creating equivalent Stata datasets in the memory.
Possible linkage-data sources include the Hospital Episodes System (HES) for data on hospitalisations,
and the Office of National Statistics (ONS) for data on deaths.
CPRD can carry out data retrievals to provide linkage datasets,
with data about patients known to CPRD,
and with one observation per event of the type recorded by the linkage-data source.
Datasets produced by cprdlinkutil contain information on patients and practices known to CPRD,
and on the times at which patients in these practices can be said to be at risk
of experiencing recorded events of the types recorded by each linkage-data source.
cprdlinkutil uses the SSC packages keyby and chardef,
which need to be installed for cprdlinkutil to work.

Options

clear specifies that any existing dataset in memory will be replaced.

nokey specifies that the dataset produced will not be sorted by a primary key of variables.
If nokey is not specified for a command that has a nokey option,
then the dataset will be sorted by a primary key of variables,
whose values will normally identify the observations uniquely,
with each value combination present in only one observation.

Remarks

The Clinical Practice Research Datalink (CPRD) is a database of information
from primary-care practices in the British Health Service.
Tab-delimited text data files of various types can be produed by CPRD,
containing data on things known to these practices,
such as practices, patients, staff members, clinical events, additional details on clinical events,
consultations, immunisations, referrals, tests, and prescribed therapies.
These text datafiles can then be converted to Stata datasets using the SSC package cprdutil.

Researchers sometimes aim to answer questions about the incidence of events experienced by CPRD patients,
but recorded by data sources other than CPRD.
These events include deaths recorded by the Office of National Statistics (ONS),
cancer registrations from cancer registries,
and hospitalisations recorded by the Hospital Episodes System (HES).
Some of the practices sending data to CPRD also have arrangements with CPRD,
allowing CPRD to attempt to identify the CPRD patients to which these events have happened,
and therefore to carry out retrievals to create text datasets on these events,
together with the CPRD variables identifying the CPRD patients for which these events happened.

The role of the cprdlinkutil package is to produce datasets identifying the practices with these arrangements,
the patients in these practices who can be said to be at risk of experiencing recorded events from the non-CPRD sources,
and the time windows in which these patients can be said to be at risk of experiencing these non-CPRD recorded events.
The datasets containing information on the non-CPRD recorded events themselves are produced by other SSC packages,
such as cprdhesutil, which creates datasets on events recorded by the Hospital Episodes System (HES).

In the cprdlinkutil package, there is one command for inputting each linkage-source dataset type.
The cprdlink_linkage_eligibility command creates a dataset with 1 observation per patient,
and data on the eligibility of the patient for experiencing recorded events of the types recorded by the linkage-data sources.
The cprdlink_linkage_coverage command creates a dataset with 1 observation per linkage-data source,
and data on the dates beginning and ending the time window covered by the retrieval.
The cprdlink_linked_practices command creates a dataset
with 1 observation per practice providing information allowing linkage to other data sources.

Examples

The following examples will work if the current folder has a sister folder ../cprdlinkdata,
containing tab-delimited text datasets linked_practices.txt, linkage_coverage.txt,
and linkage_eligibility.txt,
with the correct variables for linked practices, linkage coverage, and patient linkage eligibility,
respectively.

. cprdlink_linked_practices using "../cprdlinkdata/linked_practices.txt", clear

. summ pracid, de

. cprdlink_linkage_coverage using "../cprdlinkdata/linkage_coverage.txt", clear nokey

. list, abbr(32)

. cprdlink_linkage_eligibility using "../cprdlinkdata/linkage_eligibility.txt", clear

. summ linkdate_n, de format

Author

Roger Newson, Imperial College London, UK.

Email: r.newson@imperial.ac.uk

Also see

Help: Clinical Practice Research Datalink (CPRD)

cprdutil, cprdhesutil, keyby, chardef if installed