Accessing dated patient-level prescription data
Hi!
For my project, I am looking for patient level prescription information, which shows a complete list of pt medication and associated administration date.
From a previous post (https://community.ukbiobank.ac.uk/hc/en-gb/community/posts/25312352869021-20003-Treatment-medication-code) and referenced article number, I found this field (https://biobank.ndph.ox.ac.uk/ukb/field.cgi?id=42039) and this record table (https://biobank.ndph.ox.ac.uk/ukb/rectab.cgi?id=1062) which may include information I am interested.
On the data note, I see that it says “Adding this field to project basket will grant access to the primary care prescriptions table (gp_scripts) on the Data Portal.” I wonder where are the project basket and data portal is mentioned? Are these data downloadable using dx cli?
Thanks!
Comments
1 comment
Hi Yibo,
Firstly, please note that UKB does not hold a “complete list of participant medication”. Data on regular medications is gathered when a participant attends a UKB assessment centre, but that is only a snapshot, and it relies on the participant’s memory. Further data on prescription medications has been received from the NHS, but only up to 2017 and only for 45% of participants.
Secondly, please note that UKB data can only be analysed within the UKB-RAP. Individual-level data must not be downloaded.
Before summer 2024, some researchers were permitted to download data in a Basket or via the Showcase Data Portal. I have checked the basket for your project, and it did not include the gp_scripts data access field that would have allowed access to the Data Portal for the GP presricption data.
Before summer 2024, some researchers were permitted to download data from the UKB-RAP. If any of the collaborators on your project have previously downloaded the gp_scripts data from the UKB-RAP then it is permissible for you to continue to use it. Please ask each of your collaborators whether they have stored a downloaded copy of the gp_scripts data.
The gp_scripts data in the UKB-RAP is in a separate table called gp_scripts as part of the main Parquet database. One way to access it is to use the Table Exporter tool to export the whole of the gp_scripts table to your project storage as a csv. Once you have the csv, you can copy it into a JupyterLab instance using dx download, and process it there. Note that storage of the csv incurs costs, so you will probably want to filter it for the data of interest and keep only the filtered version. Another way to access the data is to browse it using the cohort browser. The gp_scripts record level data fields are in health-related outcomes > Primary care > Record-level access > GP Prescription Record , see image.
It is also possible to combine the Cohort Browser and the Table Exporter to export a csv that only includes gp_scripts data for the participants of interest.
Please sign in to leave a comment.