Skip to main content
Toggle menu

Search the website

Recent updates to OpenCodelists

Posted:
Written by:

Recently, one of the software teams here at the Bennett Institute have been focusing on making improvements to OpenCodelists, so that all its users can have an easier and more productive time building and sharing their codelists.

A lot of the changes have been improvements to the way the builder functions under the hood, such as eliminating weird edge cases and speeding up certain operations. However, there have also been a few visual and functional updates to the builder, and I’d like to shout out the excellent work my colleagues have been doing by showcasing some of these changes.

Updates to searching for codes

When using the builder to create a codelist, you’ll typically use the search box to find codes which you can then add or exclude. New updates to the search functionality include the following:

Choose between searching via code or via term

Previously, to search for a clinical code using its alphanumerical… well… code, you’d typically prepend code: to your search - for example, code:0407010AD to find paracetamol and ibuprofen. There’s now a toggle on the search box, so that you can select whether you’re searching for a clinical code via its code or via terms that appear in its description. This search will appear in your codelist’s ’previous searches’ with the correct type prepended.

A screenshot from the OpenCodelists builder. The user has previously used the search box to search for the code ‘0407010AD’, and the builder is displaying the tree of codes resulting from that search, which relate to paracetamol and ibuprofen. In the ‘previous searches’ section on the left of the builder, the previous search ‘code: 0407010AD’ is visible.

We now limit term inputs to the search box to 255 characters, and code inputs to 18 characters, to prevent confusing or unintended behaviour from the builder. The UI will display a clear message if you enter a search term that’s too long.

A screenshot of the search box from the OpenCodelists builder, showing an error message in red text, which reads “Your search term has reached the maximum length of 255 characters”.

Clearer display when no results are found

If your search yields no results, OpenCodelists now displays a much clearer message than previously.

A screenshot from the OpenCodelists builder. The user has previously searched for the string “something which yields no results”. The main section of the builder, which usually displays codes resulting from searches, shows a message with the heading “None of your searches match any concepts” and further explanatory text.

UI updates within the builder

We’ve made updates which make it easier to quickly see information about codelists, such as their draft status or their metadata. We’ve also made other updates to reduce cognitive load, and make functionality more intuitive for users.

Show codelist coding system and number of codes under ‘My Codelists’

Under your ‘My Codelists’ page, you’ll now be able to see certain information about your codelists at a glance. For the moment, this includes the coding system for each codelist, and how many codes are in each codelist.

A screenshot of a user’s ‘My Codelists’ page, showing two codelists saved for review and two saved as drafts. Each has information appended to it, showing its coding system (for example, BNF) and how many codes are contained within it.

Draft codelist status is now at the top of the builder

When you edit a draft codelist, that status will be displayed at the top of the builder.

A screenshot from the OpenCodelists builder, showing a draft codelist being edited. The title of the codeist, ‘Breathlessness’, has a section next to it which says ‘DRAFT’. Certain codelist metadata, such as its coding system, coding system release, ID and version ID, are also shown directly beneath the title.

Codelist metadata is now shown beneath the title

In the above screenshot, you can also now see certain information about the codelist directly beneath the title. For the moment, this information includes the codelist’s coding system and coding system release, and its codelist ID and version ID.

Codelist management buttons have moved to the top right of the builder

The buttons for saving codelists, including changing their status to ‘review’ or ‘published’, have now moved to the top right of the builder to separate them out from the left hand side of the builder (which is now used only for searching and filtering codes).

A screenshot from the OpenCodelist builder, showing the title of a codelist on the left hand side, along with the management buttons on the right hand side. The buttons read ‘Save for review’ in green, ‘Save draft’ in blue, and ‘Discard’ in red.

Creating draft codelists from CSV

Previously, codelists created from CSV uploads would automatically be published immediately, Now, they will default to ‘Draft’ status, allowing you to edit them with the builder before publishing them for further use.

As always, we welcome any feedback or comments on our ongoing work to improve the OpenSAFELY platform for all our users. The improvements to OpenCodelists are still in progress, and we’d love to hear about what you think we could add, change or fix. Feel free to get in touch at team@opensafely.org and let us know how we’re doing!