Community Services Data Set (CSDS)#

1. Summary#

The information below is retrieved from the Health Data Gateway API developed by NHS England, with additional fields added by UK LLC (indicated by italics). The CSDS dataset in the UK LLC TRE comprises nine separate datasets.

# define target dataset to document
schema = 'nhsd'
table = 'CSDS'
table1 = 'CSDS_care_activities'
table2 = 'CSDS_care_plans'
table3 = 'CSDS_coded_scored_assessments'
table4 = 'CSDS_demographics_and_referral'
table5 = 'CSDS_diagnoses'
table6 = 'CSDS_group_sessions'
table7 = 'CSDS_immunisations'
table8 = 'CSDS_onward_referrals'
table9 = 'CSDS_rtt'
version = 'v0003'
# import functions from script helper
import sys
script_fp = "../../../../scripts/"
sys.path.insert(0, script_fp)
from data_doc_helper import DocHelper
# create instance
document = DocHelper(schema, table, version, script_fp)
document1 = DocHelper(schema, table1, version, script_fp)
document2 = DocHelper(schema, table2, version, script_fp)
document3 = DocHelper(schema, table3, version, script_fp)
document4 = DocHelper(schema, table4, version, script_fp)
document5 = DocHelper(schema, table5, version, script_fp)
document6 = DocHelper(schema, table6, version, script_fp)
document7 = DocHelper(schema, table7, version, script_fp)
document8 = DocHelper(schema, table8, version, script_fp)
document9 = DocHelper(schema, table9, version, script_fp)
# markdown/code hybrid cell module requirement
from IPython.display import display, Markdown
# get api data
dataset = document.get_api_data()
display(Markdown("**NHS England title of dataset:** "+dataset['datasetfields']['datautility']['title']))
display(Markdown("***Dataset name in UK LLC TRE:*** *nhsd.CSDS*"))  
display(Markdown("**Short abstract:** "+dataset['datasetfields']['abstract']))
display(Markdown("***Extended abstract:*** *The CSDS collects data about children, young people and adults who are in contact with NHS funded organisations that provide community services in England. Settings include health centres, day care facilities, schools or community centres, mobile facilities or people's homes. The CSDS dataset replaced the Children and Young People's Health Services Data Set (CYPHS) which was restricted to those aged 18 years and under. The dataset provides information about social and personal circumstances, breastfeeding and nutrition, care event and screening activity, diagnoses, including long-term conditions and disabilities, scored assessments, and weight management services. The CSDS comprises more than 30 datasets. To access the CSDS data model and technical output specification, click here: [https://digital.nhs.uk/data-and-information/data-collections-and-data-sets/data-sets/community-services-data-set/implementing-the-community-services-data-set-csds-v1.6-tools-and-guidance](https://digital.nhs.uk/data-and-information/data-collections-and-data-sets/data-sets/community-services-data-set/implementing-the-community-services-data-set-csds-v1.6-tools-and-guidance)*"))
display(Markdown("**Geographical coverage:** "+dataset['datasetfields']['geographicCoverage'][0]))
display(Markdown("**Temporal coverage:** "+dataset['datasetfields']['datasetStartDate']))
display(Markdown("***Data available in UK LLC TRE from:*** *01/04/2015 onwards*"))
display(Markdown("**Typical age range:** "+dataset['datasetfields']['ageBand']))
display(Markdown("**Collection situation:** "+dataset['datasetv2']['provenance']['origin']['collectionSituation'][0]))
display(Markdown("**Purpose:** "+dataset['datasetv2']['provenance']['origin']['purpose'][0]))
display(Markdown("**Source:** "+dataset['datasetv2']['provenance']['origin']['source'][0]))
display(Markdown("**Pathway:** "+dataset['datasetv2']['coverage']['pathway']))
display(Markdown("***Information collected:*** *Social and personal circumstances, breastfeeding and nutrition, care event and screening activity, diagnoses, including long-term conditions and disabilities, scored assessments, and weight management services.*"))  
display(Markdown("***Structure of dataset:*** *TBC*"))  
display(Markdown("***Update frequency in UK LLC TRE:*** *Quarterly*"))  
display(Markdown("***Dataset versions in UK LLC TRE:*** *TBC*"))
display(Markdown("***Data quality issues:*** *TBC*"))  
display(Markdown("***Restrictions to data usage***: *Medical purposes only (medical research) as defined in the NHS Act 2006: [https://www.legislation.gov.uk/ukpga/2006/41/part/13/crossheading/patient-information](https://www.legislation.gov.uk/ukpga/2006/41/part/13/crossheading/patient-information)*"))  
display(Markdown("***Further information:*** *[https://digital.nhs.uk/data-and-information/data-collections-and-data-sets/data-sets/community-services-data-set](https://digital.nhs.uk/data-and-information/data-collections-and-data-sets/data-sets/community-services-data-set)*"))

NHS England title of dataset: Community Services Data Set

Dataset name in UK LLC TRE: nhsd.CSDS

Short abstract: CSDS sets out national definitions for the extraction of data about children and adults: • personal and demographic • social and personal circumstances • breastfeeding and nutrition • care event and screening activity • diagnoses • scored assessments

Extended abstract: The CSDS collects data about children, young people and adults who are in contact with NHS funded organisations that provide community services in England. Settings include health centres, day care facilities, schools or community centres, mobile facilities or people’s homes. The CSDS dataset replaced the Children and Young People’s Health Services Data Set (CYPHS) which was restricted to those aged 18 years and under. The dataset provides information about social and personal circumstances, breastfeeding and nutrition, care event and screening activity, diagnoses, including long-term conditions and disabilities, scored assessments, and weight management services. The CSDS comprises more than 30 datasets. To access the CSDS data model and technical output specification, click here: https://digital.nhs.uk/data-and-information/data-collections-and-data-sets/data-sets/community-services-data-set/implementing-the-community-services-data-set-csds-v1.6-tools-and-guidance

Geographical coverage: United Kingdom,England

Temporal coverage: 10/01/2017

Data available in UK LLC TRE from: 01/04/2015 onwards

Typical age range: 0-150

Collection situation: COMMUNITY

Purpose: ADMINISTRATIVE

Source: EPR

Pathway: COMMUNITY SERVICES

Information collected: Social and personal circumstances, breastfeeding and nutrition, care event and screening activity, diagnoses, including long-term conditions and disabilities, scored assessments, and weight management services.

Structure of dataset: TBC

Update frequency in UK LLC TRE: Quarterly

Dataset versions in UK LLC TRE: TBC

Data quality issues: TBC

Restrictions to data usage: Medical purposes only (medical research) as defined in the NHS Act 2006: https://www.legislation.gov.uk/ukpga/2006/41/part/13/crossheading/patient-information

Further information: https://digital.nhs.uk/data-and-information/data-collections-and-data-sets/data-sets/community-services-data-set

2. Metrics#

The tables below summarise the nine datasets that make up the CSDS dataset in the UK LLC TRE.

2.1 CSDS Care Activities

Table 1 The number of participants from each LPS that are represented in the CSDS_Care_Activities dataset in the UK LLC TRE
(Note: numbers relate to the most recent extract of NHS England data)

gb_cohort = document1.get_cohort_count()
print(gb_cohort.to_markdown(index=False, tablefmt="fancy_grid"))
╒════════════════╤═════════╕
│ cohort         │   count │
╞════════════════╪═════════╡
│ ALSPAC         │    1855 │
├────────────────┼─────────┤
│ BCS70          │    1536 │
├────────────────┼─────────┤
│ BIB            │   15536 │
├────────────────┼─────────┤
│ ELSA           │    3524 │
├────────────────┼─────────┤
│ EPICN          │    9623 │
├────────────────┼─────────┤
│ EXCEED         │    4264 │
├────────────────┼─────────┤
│ FENLAND        │    3739 │
├────────────────┼─────────┤
│ GLAD           │   27423 │
├────────────────┼─────────┤
│ MCS            │    4796 │
├────────────────┼─────────┤
│ NCDS58         │    2174 │
├────────────────┼─────────┤
│ NEXTSTEP       │    1797 │
├────────────────┼─────────┤
│ NIHRBIO_COPING │    5596 │
├────────────────┼─────────┤
│ NSHD46         │    1200 │
├────────────────┼─────────┤
│ TEDS           │    1698 │
├────────────────┼─────────┤
│ TRACKC19       │    4040 │
├────────────────┼─────────┤
│ TWINSUK        │    4586 │
├────────────────┼─────────┤
│ UKHLS          │    2320 │
├────────────────┼─────────┤
│ total          │   95707 │
╘════════════════╧═════════╛

2.2 CSDS Care Plans

Table 2 The number of participants from each LPS that are represented in the CSDS_Care_Plans dataset in the UK LLC TRE
(Note: numbers relate to the most recent extract of NHS England data)

gb_cohort = document2.get_cohort_count()
print(gb_cohort.to_markdown(index=False, tablefmt="fancy_grid"))
╒════════════════╤═════════╕
│ cohort         │   count │
╞════════════════╪═════════╡
│ ALSPAC         │      21 │
├────────────────┼─────────┤
│ BCS70          │     110 │
├────────────────┼─────────┤
│ BIB            │     429 │
├────────────────┼─────────┤
│ ELSA           │     552 │
├────────────────┼─────────┤
│ EPICN          │    4587 │
├────────────────┼─────────┤
│ EXCEED         │      30 │
├────────────────┼─────────┤
│ FENLAND        │     301 │
├────────────────┼─────────┤
│ GLAD           │    1983 │
├────────────────┼─────────┤
│ MCS            │     349 │
├────────────────┼─────────┤
│ NCDS58         │     203 │
├────────────────┼─────────┤
│ NEXTSTEP       │      55 │
├────────────────┼─────────┤
│ NIHRBIO_COPING │     478 │
├────────────────┼─────────┤
│ NSHD46         │     162 │
├────────────────┼─────────┤
│ TEDS           │      55 │
├────────────────┼─────────┤
│ TRACKC19       │     291 │
├────────────────┼─────────┤
│ TWINSUK        │     533 │
├────────────────┼─────────┤
│ UKHLS          │     208 │
├────────────────┼─────────┤
│ total          │   10347 │
╘════════════════╧═════════╛

2.3 CSDS Coded Scored Assessments

Table 3 The number of participants from each LPS that are represented in the CSDS_Coded_Score_Assessments dataset in the UK LLC TRE
(Note: numbers relate to the most recent extract of NHS England data)

gb_cohort = document3.get_cohort_count()
print(gb_cohort.to_markdown(index=False, tablefmt="fancy_grid"))
╒════════════════╤═════════╕
│ cohort         │ count   │
╞════════════════╪═════════╡
│ ALSPAC         │ <10     │
├────────────────┼─────────┤
│ BCS70          │ <10     │
├────────────────┼─────────┤
│ BIB            │ <10     │
├────────────────┼─────────┤
│ ELSA           │ 25      │
├────────────────┼─────────┤
│ EPICN          │ <10     │
├────────────────┼─────────┤
│ EXCEED         │ 113     │
├────────────────┼─────────┤
│ FENLAND        │ <10     │
├────────────────┼─────────┤
│ GLAD           │ 43      │
├────────────────┼─────────┤
│ MCS            │ <10     │
├────────────────┼─────────┤
│ NCDS58         │ 11      │
├────────────────┼─────────┤
│ NEXTSTEP       │ 0       │
├────────────────┼─────────┤
│ NIHRBIO_COPING │ 21      │
├────────────────┼─────────┤
│ NSHD46         │ <10     │
├────────────────┼─────────┤
│ TEDS           │ 0       │
├────────────────┼─────────┤
│ TRACKC19       │ 17      │
├────────────────┼─────────┤
│ TWINSUK        │ 18      │
├────────────────┼─────────┤
│ UKHLS          │ 10      │
├────────────────┼─────────┤
│ total          │ 258     │
╘════════════════╧═════════╛

2.4 CSDS Demographics and Referral

Table 4 The number of participants from each LPS that are represented in the CSDS_demographics_and_referral dataset in the UK LLC TRE
(Note: numbers relate to the most recent extract of NHS England data)

gb_cohort = document4.get_cohort_count()
print(gb_cohort.to_markdown(index=False, tablefmt="fancy_grid"))
╒════════════════╤═════════╕
│ cohort         │   count │
╞════════════════╪═════════╡
│ ALSPAC         │    2502 │
├────────────────┼─────────┤
│ BCS70          │    2004 │
├────────────────┼─────────┤
│ BIB            │   20900 │
├────────────────┼─────────┤
│ ELSA           │    4024 │
├────────────────┼─────────┤
│ EPICN          │   10483 │
├────────────────┼─────────┤
│ EXCEED         │    4767 │
├────────────────┼─────────┤
│ FENLAND        │    4490 │
├────────────────┼─────────┤
│ GLAD           │   36873 │
├────────────────┼─────────┤
│ MCS            │    8361 │
├────────────────┼─────────┤
│ NCDS58         │    2605 │
├────────────────┼─────────┤
│ NEXTSTEP       │    2316 │
├────────────────┼─────────┤
│ NIHRBIO_COPING │    6959 │
├────────────────┼─────────┤
│ NSHD46         │    1381 │
├────────────────┼─────────┤
│ TEDS           │    2412 │
├────────────────┼─────────┤
│ TRACKC19       │    5168 │
├────────────────┼─────────┤
│ TWINSUK        │    5815 │
├────────────────┼─────────┤
│ UKHLS          │    2990 │
├────────────────┼─────────┤
│ total          │  124050 │
╘════════════════╧═════════╛

2.5 CSDS diagnoses

Table 5 The number of participants from each LPS that are represented in the CSDS_diagnoses dataset in the UK LLC TRE
(Note: numbers relate to the most recent extract of NHS England data)

gb_cohort = document5.get_cohort_count()
print(gb_cohort.to_markdown(index=False, tablefmt="fancy_grid"))
╒════════════════╤═════════╕
│ cohort         │   count │
╞════════════════╪═════════╡
│ ALSPAC         │      29 │
├────────────────┼─────────┤
│ BCS70          │     269 │
├────────────────┼─────────┤
│ BIB            │    1340 │
├────────────────┼─────────┤
│ ELSA           │     800 │
├────────────────┼─────────┤
│ EPICN          │    2191 │
├────────────────┼─────────┤
│ EXCEED         │      54 │
├────────────────┼─────────┤
│ FENLAND        │     422 │
├────────────────┼─────────┤
│ GLAD           │    4019 │
├────────────────┼─────────┤
│ MCS            │     727 │
├────────────────┼─────────┤
│ NCDS58         │     414 │
├────────────────┼─────────┤
│ NEXTSTEP       │     153 │
├────────────────┼─────────┤
│ NIHRBIO_COPING │     904 │
├────────────────┼─────────┤
│ NSHD46         │     266 │
├────────────────┼─────────┤
│ TEDS           │     160 │
├────────────────┼─────────┤
│ TRACKC19       │     712 │
├────────────────┼─────────┤
│ TWINSUK        │     771 │
├────────────────┼─────────┤
│ UKHLS          │     424 │
├────────────────┼─────────┤
│ total          │   13655 │
╘════════════════╧═════════╛

2.6 CSDS Group Sessions

Table 6 The number of participants from each LPS that are represented in the CSDS_group_sessions dataset in the UK LLC TRE
(Note: numbers relate to the most recent extract of NHS England data)

gb_cohort = document6.get_cohort_count()
print(gb_cohort.to_markdown(index=False, tablefmt="fancy_grid"))
╒══════════╤═════════╕
│ cohort   │   count │
╞══════════╪═════════╡
│ total    │       0 │
╘══════════╧═════════╛

2.7 CSDS Immunisations

Table 7 The number of participants from each LPS that are represented in the CSDS_immunisations dataset in the UK LLC TRE
(Note: numbers relate to the most recent extract of NHS England data)

gb_cohort = document7.get_cohort_count()
print(gb_cohort.to_markdown(index=False, tablefmt="fancy_grid"))
╒════════════════╤═════════╕
│ cohort         │ count   │
╞════════════════╪═════════╡
│ ALSPAC         │ <10     │
├────────────────┼─────────┤
│ BCS70          │ <10     │
├────────────────┼─────────┤
│ BIB            │ 6392    │
├────────────────┼─────────┤
│ ELSA           │ <10     │
├────────────────┼─────────┤
│ EPICN          │ <10     │
├────────────────┼─────────┤
│ EXCEED         │ 11      │
├────────────────┼─────────┤
│ FENLAND        │ 0       │
├────────────────┼─────────┤
│ GLAD           │ 2709    │
├────────────────┼─────────┤
│ MCS            │ 1322    │
├────────────────┼─────────┤
│ NCDS58         │ <10     │
├────────────────┼─────────┤
│ NEXTSTEP       │ 17      │
├────────────────┼─────────┤
│ NIHRBIO_COPING │ 46      │
├────────────────┼─────────┤
│ NSHD46         │ <10     │
├────────────────┼─────────┤
│ TEDS           │ 36      │
├────────────────┼─────────┤
│ TRACKC19       │ <10     │
├────────────────┼─────────┤
│ TWINSUK        │ 87      │
├────────────────┼─────────┤
│ UKHLS          │ 64      │
├────────────────┼─────────┤
│ total          │ 10684   │
╘════════════════╧═════════╛

2.8 CSDS Onward Referrals

Table 8 The number of participants from each LPS that are represented in the CSDS_onward_referrals dataset in the UK LLC TRE
(Note: numbers relate to the most recent extract of NHS England data)

gb_cohort = document8.get_cohort_count()
print(gb_cohort.to_markdown(index=False, tablefmt="fancy_grid"))
╒════════════════╤═════════╕
│ cohort         │   count │
╞════════════════╪═════════╡
│ ALSPAC         │      14 │
├────────────────┼─────────┤
│ BCS70          │      59 │
├────────────────┼─────────┤
│ BIB            │     546 │
├────────────────┼─────────┤
│ ELSA           │     218 │
├────────────────┼─────────┤
│ EPICN          │     222 │
├────────────────┼─────────┤
│ EXCEED         │      52 │
├────────────────┼─────────┤
│ FENLAND        │     802 │
├────────────────┼─────────┤
│ GLAD           │    1144 │
├────────────────┼─────────┤
│ MCS            │     229 │
├────────────────┼─────────┤
│ NCDS58         │     116 │
├────────────────┼─────────┤
│ NEXTSTEP       │      50 │
├────────────────┼─────────┤
│ NIHRBIO_COPING │     400 │
├────────────────┼─────────┤
│ NSHD46         │      56 │
├────────────────┼─────────┤
│ TEDS           │      33 │
├────────────────┼─────────┤
│ TRACKC19       │     203 │
├────────────────┼─────────┤
│ TWINSUK        │     253 │
├────────────────┼─────────┤
│ UKHLS          │      95 │
├────────────────┼─────────┤
│ total          │    4492 │
╘════════════════╧═════════╛

2.9 CSDS Referral to Treatment

Table 9 The number of participants from each LPS that are represented in the CSDS_onward_referrals dataset in the UK LLC TRE
(Note: numbers relate to the most recent extract of NHS England data)

gb_cohort = document9.get_cohort_count()
print(gb_cohort.to_markdown(index=False, tablefmt="fancy_grid"))
╒════════════════╤═════════╕
│ cohort         │   count │
╞════════════════╪═════════╡
│ ALSPAC         │     183 │
├────────────────┼─────────┤
│ BCS70          │     646 │
├────────────────┼─────────┤
│ BIB            │    1382 │
├────────────────┼─────────┤
│ ELSA           │    1563 │
├────────────────┼─────────┤
│ EPICN          │    9007 │
├────────────────┼─────────┤
│ EXCEED         │    3133 │
├────────────────┼─────────┤
│ FENLAND        │    3425 │
├────────────────┼─────────┤
│ GLAD           │   11375 │
├────────────────┼─────────┤
│ MCS            │    1757 │
├────────────────┼─────────┤
│ NCDS58         │     913 │
├────────────────┼─────────┤
│ NEXTSTEP       │     456 │
├────────────────┼─────────┤
│ NIHRBIO_COPING │    2786 │
├────────────────┼─────────┤
│ NSHD46         │     479 │
├────────────────┼─────────┤
│ TEDS           │     525 │
├────────────────┼─────────┤
│ TRACKC19       │    1735 │
├────────────────┼─────────┤
│ TWINSUK        │    1830 │
├────────────────┼─────────┤
│ UKHLS          │    1039 │
├────────────────┼─────────┤
│ total          │   42234 │
╘════════════════╧═════════╛

3. Helpful syntax#

Below we will include syntax that may be helpful to other researchers in the UK LLC TRE. For longer scripts, we will include a snippet of the code plus a link to Git where you can find the full script.