---
title: "Search for additional instance and reference data"
method: GET
path: "/CodeSystem/"
---

# Search for additional instance and reference data

`GET /CodeSystem/`

## Overview 

Use this endpoint to access a range of information contained in CodeSystems to meet your needs. We have CodeSystems that contain regularly changing data such as organisations, practitioners and relationships plus more traditional reference based CodeSystems.

CodeSystem names include the date when they were last updated i.e. `ods-organization-code-2024-03-07`, so when searching for individual concepts (records within the CodeSystem) it is necessary to perform a search using a `$lookup` providing the system and code required in addition to any properties you wish to return.

For example:

`/CodeSystem/$lookup?system=https://fhir.nhs.uk/Id/ods-organization-code&code=G81086&property=*`

### Summary information
You can return a summary of each codeSystem to see which properties are available and which search operations are supported, without attempting to return the data. Organisation, role, relationship, postcode and geography information will all generate errors as they are too large to be returned.

When you perform a search, unless you specify otherwise, we will provide a result in summary mode and list each instance of the CodeSystem currently stored on the Server. it is expected that we will retain 2-3 versions at any given point. 

For example:
`/CodeSystem?url=https://fhir.nhs.uk/Id/ods-organization-code`

The smaller reference based CodeSystems  can be returned in full using `_summary=false` which will return all versions stored on the server in full.

For example:
`/CodeSystem?system=https://digital.nhs.uk/services/organisation-data-service/CodeSystem/practitioner-role&_summary=false` 

For example:
`/CodeSystem?system=https://digital.nhs.uk/services/organisation-data-service/CodeSystem/succession`

## Code Validation
Using the $validate operation you can check whether a code is present within any given ValueSet and you can also provide additional properties to validate their values.
    
For example:
  `CodeSystem/$validate-code?url=https://fhir.nhs.uk/Id/ods-organization-code&code=RH8&status=active`

## Organisation data
### ods-organization-code 
https://fhir.nhs.uk/Id/ods-organization-code

In addition to the data available through the FHIR Organization resource we also have the following properties:

  * related organisations using a Relationship ID such as RE4 (commissioned by), RE6 (operated by), RE8 (is partner to and RE10 (nominated payee for) 
  * presence of successor or predecessor information
  * indicator for onward succession
  * geographic values such as Local Authority boundary, Integrated Care Board boundary or 2011 Lower Super Output Area (LSOA11) 

### organisation-relationship-instance 
https://digital.nhs.uk/services/organisation-data-service/CodeSystem/organization-relationship-instance 

- Contains relationship history

### organisation-role-instance
https://digital.nhs.uk/services/organisation-data-service/CodeSystem/organization-role-instance

- Contains role history

### Succession
https://digital.nhs.uk/services/organisation-data-service/CodeSystem/succession

- Contains succession (merger and acquisition) data for statutory organisations

## Practitioner data
### practitioner
https://digital.nhs.uk/services/organisation-data-service/CodeSystem/practitioner

Contains the prescribing practitioner and consultants in a single CodeSystem to enable lookup and validation of practitioner codes. Practitioners are categorised with a type and role. Roles and types can be validated against the practitioner-role CodeSystem.

Types include `PGP` (General Practitioner), `PNURSE` - Prescribing Nurse and `PDENTCON` Dental Consultants. 
  
Roles include `PHOSPCON120` (ear nose and throat), `PGP1` (principal GP), `PNURSE1` (district nurse / health visitor).

Where practitioners are associated to an organisation, the current/latest values is held in a membership property, these include `ME1` parent practice for GPs and `ME4` parent trust for a Dental Consultant. More information about the associations can be found in the practitioner-relationship-instance CodeSystem.

This CodeSystem has been designed to enable practitioners with multiple codes, i.e a Prescribing Code and a General Medical Council (GMC) code to be returned or validated.

Properties numbered from 1 to 8 contain a specific identifier issued by a range of authorities, more information about each assigned identifier including start date and issuing Authority can be found in the practitioner-additional-attribute CodeSystem.  

### practitioner-relationship-instance
https://digital.nhs.uk/services/organisation-data-service/CodeSystem/practitioner-relationship-instance

Contains relationship history where practitioners are associated with an organisation.

### practitioner-additional-attribute
https://digital.nhs.uk/services/organisation-data-service/CodeSystem/practitioner-additional-attribute

Contains additional information about the identifier issued to a practitioner, in addition to the identifier, the name and ODS code of the Issuing authority, start and end dates for the identifier are included.

## Geographic Data
### geography-name 
https://digital.nhs.uk/services/organisation-data-service/CodeSystem/geography-name

Supports the identification of Office for National Statistics (ONS) identifiers for geographic boundaries used within the ods-organization-code CodeSytem. ODS identifiers for geographic organisations such as `ICB` and `Local Authority` can be retreived from the `Organization` Endpoint.

### postcode
https://digital.nhs.uk/services/organisation-data-service/CodeSystem/postcode

Contains every postcode within the NHS Postcode Directory and a selection of their geographic boundaries.

More information about how this data is compiled can be found in the [NHSPD user guide](https://digital.nhs.uk/binaries/content/assets/website-assets/services/ods/user_guide.pdf).

The following Geographic boundaries are included:
| Attribute name                  | Description                                            |
|---------------------------------|--------------------------------------------------------|
  | `CA` | cancer alliance |
  | `EW` | electoral ward |
  | `GOR` | government office region
  | `ICB` | integrated care board
  | `LA` | local authority
  | `LSOA11` | 2011 lower super output areas
  | `NHSER` | NHS England region
  | `PC` | parliamentary constituency
  | `PCO` | primary care organisation 
  | `SMHPC AED` | strategic mental health provider collaborative - adult eating disorder
  | `SMHPC AS` | strategic mental health provider collaborative - adult secure
  | `SMHPC CT4` | strategic mental health provider collaborative - CYPMH tier 4

## Reference data
### ODSOrganisationRole  
https://digital.nhs.uk/services/organisation-data-service/CodeSystem/ODSOrganisationRole

Every organisation has at least one role; a primary role. It may also have additional roles which provide more information about the organisation's function or purpose.

The full list of role codes is contained in this CodeSystem and you can return  all roles or 
individual role codes can be returned or validated. Our [Reference Data Catalogue](https://odsdatasearchandexport.dc4h.link/referenceDataCatalogue/index.html) contains more help information.

This CodeSystem has 1 additional Property: `primaryRole` which contains a true/false value if the role is a primary role or not.

### ODSRelationship
https://digital.nhs.uk/services/organisation-data-service/CodeSystem/ODSRelationship

Every relationship has a type to describe the nature of the relationship, which includes: `is Commissioned by`, `is operated by` and `is partner to`.

### practitioner-role 
https://digital.nhs.uk/services/organisation-data-service/CodeSystem/practitioner-role

Within the former CSV publications for practitioners, any classifications against a practitioner such as consultant speciality code or nurse prescriber type have been converted to roles and can be returned or validated with this CodeSystem.

## Query parameters

- `system` string
- `code` string
- `property` string
- `_summmary` boolean

## Response `200`

Valid request that returns every paramter for a single concept for the specified code.

## Other responses

- `4XX` — An error occurred as follows: | HTTP Code | issue.severity | issue.code | issue.details.code | issue.details.display | |------------ |----------------|---------------|---------------------|--------------------- | |400 |error |invalid |HAPI-1940 |Invalid Date/Time/Quantity format | |400 |error |invalid |HAPI-0524 |Unknown Search Parameter| |404 |error |invalid |HAPI-2001 |Organization not found | |405 |error |method not allowed|HAPI-0427 |Method Not Allowed | |422 |unprocessable |too-costly |Too many records requested (Use _count and _offset)|Invalid parameter | |422 |unprocessable |processing |No declared filter on Codesystem |An input field has an invalid value for its type |

---

[API](https://skmtc.net/nhs/apis/organisation-data-terminology-api-2.md) · [All operations](https://skmtc.net/nhs/apis/organisation-data-terminology-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nhs/organisation-data-terminology-api-2/versions/c2df8e70fcf4/schema)
