opensafely-core / opensafely-core/opencodelists
Improve the BNF data fetching/import process
@KatieB5 is already working on this.
Since Sep 15, 2026.
- Dominant language
- Python
- Stars
- 60
- Forks
- 16
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 17
Description
Why are we doing this?
Following completion of #3010, we are now in a position to begin work on #2435. For now, we are splitting this work into two Parts:
- Do the most minimal thing to unblock our user (#3167)
- Improve (and automate) the BNF data fetching/import process (this issue)
We currently have a manual process to import new BNF data releases into opencodelists.
Updated BNF data are released each month. To ensure users have access to the most up to date BNF data for their research, and to help make our lives easier, we could schedule and automate the process of checking whether a new release is available, and fetching it then importing it if it is.
How will we know when it's done?
We are regularly updating the BNF coding system on OpenCodelists from the NHSBSA ODP API.
What are we doing?
- Speak to Team Prescribosaurus to find out how they implemented this for OP v1/v2; it looks like the OPv2 code to fetch the data is here, and the code to ingest the data is here.
- Review the suggestions captured in #2435 for how this could work.
- Implement any improvements needed to fetch and import BNF releases from the ODP.
- Automate the process, for example with a cron job (we may potentially address #1964 as part of this work)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.