diff --git a/docs/includes/generated_docs/schemas/beta.core.md b/docs/includes/generated_docs/schemas/beta.core.md index cac8211d9..322ad4395 100644 --- a/docs/includes/generated_docs/schemas/beta.core.md +++ b/docs/includes/generated_docs/schemas/beta.core.md @@ -23,7 +23,11 @@ from ehrql.tables.beta.core import (

many rows per patient

## clinical_events +Each record corresponds to a single clinical or consultation event for a patient. +Note that event codes do not change in this table. If an event code in the coding +system becomes inactive, the event will still be coded to the inactive code. +As such, codelists should include all relevant inactive codes.
Columns
diff --git a/ehrql/tables/beta/core.py b/ehrql/tables/beta/core.py index e9287ddfa..b41e913af 100644 --- a/ehrql/tables/beta/core.py +++ b/ehrql/tables/beta/core.py @@ -195,6 +195,15 @@ class ons_deaths(PatientFrame): @table class clinical_events(EventFrame): + """ + Each record corresponds to a single clinical or consultation event for a patient. + + Note that event codes do not change in this table. If an event code in the coding + system becomes inactive, the event will still be coded to the inactive code. + As such, codelists should include all relevant inactive codes. + + """ + date = Series(datetime.date) snomedct_code = Series(SNOMEDCTCode) numeric_value = Series(float)