help for cprdonsutil(Roger Newson)

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

cprdons_death_patient using filename [ , clear nokey delimiters("chars"[, collapse|asstring]) ]

Description

The cprdonsutil 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).
cprdonsutil is a suite of utility programs for inputting linkage text data files produced by CPRD
to contain data on the same patients from the United Kingdom (UK) Office of National Statistics (ONS),
and creating equivalent Stata datasets in the memory.
Currently, there is one program in the suite, which imports into Stata a dataset type produced by a CPRD ONS linkage retrieval,
with 1 observation for each of a set of patients on which ONS collects death data.
cprdonsutil uses the SSC packages keyby, chardef, and lablist,
which need to be installed for cprdonsutil 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.

delimiters("chars"[, collapse|asstring])
specifies the delimiters used in the input text file.
This option functions as the option of the same name for import delimited.

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, such as the Office of National Statistics (ONS).
The cprdonsutil package allows users to do this.
It should be used in combination with the cprdlinkutil package,
also downloadable from SSC.

Examples

The following examples assume that the current folder has a sister folder ../cprdonsdata,
containing a tab-delimited data file death_patient_18_109_Request4.txt,
with the correct variables for a CPRD ONS patient death dataset.

. cprdons_death_patient using "../cprdonsdata/death_patient_18_109_Request4.txt", clear

. cprdons_death_patient using "../cprdonsdata/death_patient_18_109_Request4.txt", clear nokey

Author

Roger Newson, Imperial College London, UK.

Email: r.newson@imperial.ac.uk

Also see

Help: Clinical Practice Research Datalink (CPRD)

cprdutil, cprdlinkutil, keyby, chardef, lablist if installed