opensafely-core / ehrql

ehrQL: the electronic health record query language for OpenSAFELY
https://docs.opensafely.org/ehrql/
Other
7 stars 3 forks source link

Automate checks of "code to label" mappings against data dictionary #2009

Open evansd opened 4 months ago

evansd commented 4 months ago

There are various places in the TPP backend where we map internal codes to meaningful labels. For example: https://github.com/opensafely-core/ehrql/blob/dea0c837e57063f2e633aae0d36309a2eebef1ce/ehrql/backends/tpp.py#L234-L250

Following #2003 we now have a copy of the data dictionary included in the test suite. We should come up with some scheme for either automatically generating, or at least automatically checking, these CASE expressions against the contents of the dictionary.