opensafely-core / opensafely-core/opencodelists

Automate and schedule NHS PCD and Medications Refset updates

Open
#2,671 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

coding system releases pcd-refsets
Dominant language
Python
Stars
60
Forks
16
Avg merge
4d 12h
Merged PRs (30d)
17

Description

Why are we doing this?

We have user requests to update these periodically, which is a manual process.

The most recent of these is in #2668.

#2250 made improvements to this process, but there still remain manual steps.

We should make this process more automated and schedule it to be run on a regular basis such that these Refsets remain up to date.

How will we know when it's done?

The NHS Primary Care Domain Reference Sets (PCD Refsets) on Opencodelists in the NHSD organisation are kept up to date on an automatic basis.

We monitor the Refset load process such that know they are successfully being kept up to date.

What are we doing?

  • Integrating with the Refset portal or TRUD (with which we have other integrations) to download the refset files.
  • Handle exceptions during the load (e.g. codes in refset not matching the latest release of SNOMED CT - this is often because the Refsets are defined using an earlier release. E.g. The May 2025 Refsets are defined in the 24th Sept SNOMED CT Release)
  • Create a cron job for the load process on a suitable schedule, with appropriate Sentry monitoring.

Defining delivery tasks guidance

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing process improvements in #2250 and the manual update described in #2668. Compare the Refset portal and TRUD as possible download entry points, then define how exception handling, scheduling, and Sentry monitoring should work. Done means NHSD PCD Refsets update automatically and the load process reports failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, devops, observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.