Skip to main content

The OpenSAFELY matching reusable action

27 June 2025

The opensafely-matching python package has been upgraded and converted to an OpenSAFELY reusable action.

Case-control studies compare the population with the condition or event of interest with a control population, matched on specific categorical and/or scalar variables.

The matching reusable action can be used to take a dataset of “cases” and a second dataset of potential controls, both extracted using ehrQL dataset definition, and match cases to controls using defined variables.

More information about using case control studies in OpenSAFELY can be found in the OpenSAFELY documentation.

For detailed information on the configuration option and use of the OpenSAFELY matching reusable action, please see the reusable actions registry documentation.