CVDPREVENT API Documentation

The documentation below sets out the available API end-points for retrieving CVDPREVENT data, as presented in the Data & Improvement Tool. If you have any suggestions for improvement, please complete the feedback form.

The API and documentation are subject to change.

The NHS Digital pipeline used to build a new data asset to link and curate the CVDPREVENT audit data, to existing administrative data tables, can be found at this GitHub repository.


Copyright

Cardiovascular Disease Prevention Audit (CVDPREVENT). Produced by Office for Health Improvement and Disparities and the NHS Benchmarking Network.

© Copyright NHS England 2021 - 2023. All rights reserved.


Base URL:

https://api.cvdprevent.nhs.uk


Contents:


Time Period

/timePeriod

Returns all available time periods.

Query parameters:

  • indicatorTypeID - Indicator type ID, e.g. standard or outcome indicator type. If passed will show time periods containing data of the given type (optional)

{ "timePeriodList": [ { "EndDate": "Tue, 31 Mar 2020 00:00:00 GMT", "StartDate": "Mon, 01 Jan 1900 00:00:00 GMT", "TimePeriodID": 1, "TimePeriodName": "To March 2020" }, { "EndDate": "Sat, 31 Dec 2022 00:00:00 GMT", "StartDate": "Mon, 01 Jan 1900 00:00:00 GMT", "TimePeriodID": 9, "TimePeriodName": "To December 2022" }, ... ] }

*Proposed* /timePeriod/systemLevels

Returns all available time periods, with an array of the system levels included in the given time period.

Note: Inverse of “/area/systemLevel/timePeriods“

{ "timePeriodList": [ { "EndDate": "Tue, 31 Mar 2020 00:00:00 GMT", "StartDate": "Mon, 01 Jan 1900 00:00:00 GMT", "TimePeriodID": 1, "TimePeriodName": "To March 2020", "SystemLevels": [ { "SystemLevelID": 1, "SystemLevelName": "England", "IsVisible": "Y", "NationalLevel": "Y" }, { "SystemLevelID": 2, "SystemLevelName": "STP", "IsVisible": "Y", "NationalLevel": "N" }, ... } ] }, ... ] }

Area

/area/systemLevel

Returns all available system levels for a specified time period.

Query parameters:

  • timePeriodID - ID of time period for which to return system levels for. Available system levels in given time period are controlled by SystemLevelTimePeriod table (compulsory)

 

{ "systemLevels": [ { "IsVisible": "Y", "NationalLevel": "Y", "SystemLevelID": 1, "SystemLevelName": "England", "SystemLevelOrder": 1 }, { "IsVisible": "Y", "NationalLevel": "N", "SystemLevelID": 2, "SystemLevelName": "STP", "SystemLevelOrder": 2 } ] }

*Proposed*/area/systemLevel/timePeriods

Returns all available system levels, with an array of the time periods where the system levels occur.

Note: Inverse of “/timePeriod/systemLevels”

 


/area

Returns all areas for a given time period and parent area or system level. Only areas which have data for specified time period will be returned.

Either parent area or system level must be specified. If parent area is specified, all children areas of that parent will be returned. If system level is specified, all areas within that system level will be returned. Parent area takes precedence over system level - if parent area is specified, system level is ignored.

 

Query parameters:

  • timePeriodID - specifies time period for which to return areas for (compulsory)

  • parentAreaID - specified the area of which children will be returned (optional)

  • systemLevelID - specifies which system levels to return areas for (optional)


/area/<area_id>/details

Returns details of a specific area at a given time period.

Query parameters:

  • timePeriodID - specified time period for which to return details for, i.e. population and participation rate (compulsory)

 


/area/unassigned

Returns a list of all areas which have data in selected time period, but do not have any parent areas assigned, and therefore are unreachable.

Query parameters:

  • timePeriodID - time period for which Area must have data for (compulsory)

  • systemLevelID - system level of areas in the unassigned list (optional)

 


/area/search

Returns a list of Areas that match a partial name for a given time period. Uses simple LIKE ‘%<partial_area_name>%’ comparison.

Query parameters:

  • partialAreaName - string to use to search for an Area (compulsory)

  • timePeriodID - limits the search to Areas which have data in specified time period (compulsory)


/area/<area_id>/nestedSubSystems

Returns given area and children areas in a nested structure.

No query parameters.


/area/<area_id>/flatSubSystems

Similar to /area/<area_id>/nestedSubSystems, but the sub-areas are grouped based on their system level.

No query parameters.


Indicators

An Indicator represents Cardiovascular Disease health indicators as defined by NHS England. An example of an Indicator is CVDP001AF, “Prevalence of GP recorded atrial fibrillation in patients aged 18 and over”. Indicators have unique Indicator IDs. Each Indicators is further broken down into Metrics.

A Metric represents a further breakdown of an Indicator by Inequality Marker. An example of an Inequality Marker is “Age Group - Male, 40-59”. Metrics have unique Metric IDs, with each Metric ID representing a combination of Indicator and Metric Category.

A Metric Category describes the inequality markers which the Metric applies to. Each Metric Category has a unique ID, for each combination of Name and Metric Category Type.

Each Metric Category belongs to a Metric Category Type, which groups the Metric Categories into one entity. Each Metric Category Type has a unique ID.

For example, “Male - 40-59” is a Metric Category in the “Age Group” Metric Category Type. Age Group will also contain Metric Categories “18-39”, “40-59”, “60-79”, “80+”. Assigning Metrics Categories to Metric Category Type allows comparison of all metrics in one inequality marker (in this case Age Group), or displaying Metric Categories in same Metric Category Type alongside each other.


/indicator/list

Example: /indicator/list?timePeriodID=1&systemLevelID=2

Returns basic details of all indicators for a given system level and time period. Only returns indicators for which data exists in selected time period, and on selected system level. Used to populate available indicator list in Data Explorer.

Query parameters:

  • timePeriodID - time period to return data for (compulsory)

  • systemLevelID - system level to return data for (compulsory)


*Proposed*/indicator/metricList

Example: /indicator/metricList?timePeriodID=1&systemLevelID=2

Returns same data as “/indicator/list“, but adds a “MetricList“ array for each indicator, containing details of the relevant metrics.. Only returns indicators for which data exists in selected time period, and on selected system level.

Query parameters:

  • timePeriodID - time period to return data for (compulsory)

  • systemLevelID - system level to return data for (compulsory)


/indicator

Example: /indicator?timePeriodID=1&areaID=3&tagID=12&tagID=34

Returns all indicators and data for given time period and area. Also returns time series data for all time periods available. If tags are specified, only indicators which have one of the specified tags will be returned.

Query parameters:

  • timePeriodID - time period to return data for (compulsory)

  • areaID - area to return data for (compulsory)

  • tagID - allows filtering indicators by one or more tags (optional, array)


/indicator/tags

Returns a list of all available tags, which can be used to filter indicators.

Query parameter:
None


/indicator/<indicator_ID>/details

Returns details of a single indicator

Query parameters:

None


/indicator/siblingData

Returns all sibling areas and their data for specified time period, area and metric. This endpoint is intended to only return data for selected metric, and not all metrics for a chosen indicator, hence the metricID query parameter.

Query parameters:

  • timePeriodID - time period for which to return data (compulsory)

  • areaID - area for which all sibling data will be returned (compulsory)

  • metricID - metric for which to return data (compulsory)


/indicator/childData

Returns all children areas and their data for specified time period, area and metric. This endpoint is intended to only return data for selected metric, and not all metrics for indicators, hence the metricID query parameter.

Query parameters:

  • timePeriodID - time period for which to return data (compulsory)

  • areaID - area for which all children data will be returned (compulsory)

  • metricID - metric for which to return data (compulsory)


/indicator/<indicator_id>/data

Returns all metric data for a specified indicator. Data will include values for both selected area, and organisation at National Level (usually England).

Query parameters:

  • timePeriodID - time period for which to return data for (compulsory)

  • areaID - area for which to return data for (compulsory)


*Proposed*/indicator/metric/<metric_id>/data

Returns all metric data for a specified metric. Data will include values for both selected area, and organisation at National Level (usually England).

Query parameters:

  • timePeriodID - time period for which to return data for (compulsory)

  • areaID - area for which to return data for (compulsory)


/indicator/<indicator_ID>/rawDataJSON

Returns all metric data for a specified indicator, system level and time period. Data will be in JSON format, and will include all “raw” values, as provided by PHE/OHID team.

Query parameters:

  • timePeriodID - time period for which to return data for (compulsory)

  • systemLevelID - system level for which to return data for (compulsory)


/indicator/<id>/rawDataCSV

Returns all metric data for specified indicator, system level and time period. Data will be in CSV (comma separated-values), and will include all “raw” values, as provided by PHE/OHID team. Same as above endpoint (/rawDataJSON), except a CSV file will be returned instead.

Query parameters:

  • timePeriodID - time period for which to return data for (compulsory)

  • systemLevelID - area for which to return data for (compulsory)


/indicator/<id>/rawDataXLSX

Returns all metric data for a specified indicator, system level and time period. Data will be in an XLSX format, and will include all “raw” values, as provided by PHE/OHID team. Same as above endpoint (/rawDataCSV), except an XLSX file will be returned instead.

Query parameters:

  • timePeriodID - time period for which to return data for (compulsory)

  • systemLevelID - area for which to return data for (compulsory)


/indicator/<id>/metaDataXLSX

Returns all Meta data for a specified indicator as an XLSX file. Resulting file will include columns IndicatorCode, IndicatorName, CategoryName, MetaDataTitle and MetaData.


/indicator/nationalVsAreaMetricData/<metric_ID>

Returns national and area data for provided metric ID, areaID and timePeriodID, which are passed asarameters. Target data contains the target value is a percentage stored as a whole number up to 100; target patients is the number of patients more needed to reach the target percentage. If there is not data for both national and chosen area for the given parameters, an error will be returned.

Query Parameters:

  • timePeriodID - time period for which to return data for (compulsory)

  • areaID - area for which to return data for (compulsory)

 

 


/indicator/priorityGroups

Returns the list of top-level groupings (Priority Groups) displayed in the Regional & ICS Insights page. Returns a dictionary called "PriorityGroups", with each key being a Priority Group name, and each value being the array of indicators contained in that group. The "PriorityGroupDisplayOrder" indicates the order in which it should be displayed for the given Priority Group.

 

 


/indicator/pathwayGroup/<pathway_group_id>

Pathway groups are sub-groupings of Priority Groups, visible in the Regional & ICS Insights page. This endpoint returns a single pathway group for a given group ID. An error will be returned if there is no pathway group associated with the given ID. For a valid request, Pathway Group ID and name are returned as key value pairs, and the Indicators populate an array.


/indicator/indicatorGroup/<indicator_group_ID>

Returns a single indicator group for a given group ID. An error will be returned if there is no indicator group associated with the given ID. IndicatorGroup is the primary key in the IndicatorGroup table, which also contains IndicatorGroupName and IndicatorGroupTypeID. The group type ID tells you what type of indicator group you’re dealing with, e.g. a Priority Group. IndicatorGroupTypeID is the primary key of IndicatorGroupType, and so IndicatorGroupTypeName is the associated name for the given group type ID. Finally, there is the array of indicators which are contained in this group, including display orders for the given group.


/indicator/timeSeriesByMetric/<metric_ID>

Returns data for the Time Series chart for specified metric ID and area ID. Contains an array of two areas in "Areas", one of which is the National data, with the other corresponding to the provided area ID. "TargetValue" is also returned in the "Data" dictionary.

Query Parameters:

  • areaID - area for which to return data for (compulsory)


/indicator/personsTimeSeriesByIndicator/<indicator_ID>

Returns data for the Inequalitiers Markers Time Series chart for provided indicator ID and area ID. "Data" contains info about the chosen area and the target value, as well as an array "InequalityMarkers" which contains all the timeseries data grouped into metric category types, e.g. age group, ethnicity, etc.

Query Parameters:

  • areaID - area for which to return data for (compulsory)


/indicator/metricSystemLevelComparison/<metric_ID>

Returns data for the SystemLevel Comparison chart for provided metric ID, area ID and time period ID. "Data" contains the target value, as well as an array "SystemLevels" which contains data grouped by system level.

Query Parameters:

  • timePeriodID - time period for which to return data for (compulsory)

  • areaID - area for which to return data for (compulsory)

 


/indicator/metricAreaBreakdown/<metric_ID>

Returns data for the Area Breakdown chart for provided metric ID, area ID and time period ID. "Data" contains the target value, as well as an array "SystemLevels" which contains data grouped by system level.

Query Parameters:

  • timePeriodID - time period for which to return data for (compulsory)

  • areaID - area for which to return data for (compulsory)

 

 


External Resource

/externalResource

Returns a list of all external resources.

Response:

 


Data Availability

/dataAvailability

Returns the data availability.

Query parameters:

  • timePeriodID (compulsory)

  • systemLevelID (compulsory)

  • indicatorID (optional)

  • metricCategoryTypeID (optional)

Response:

  • DataAvailabilityID - ID of the resource as found in the database.

  • DataAvailabilityName - explanation for the data availability.

  • IsAvailable - ‘Y' for data is available, 'N’ for data is unavailable, and NULL for unknown data.