# Retrieve all Practitioners/Clinicians at an Organisation

**URL:** <https://developer.community.nhs.uk/t/retrieve-all-practitioners-clinicians-at-an-organisation/2985>\
**Category:** Organisation Data Service (ODS)\
**Created:** [1 November 2024 08:37 UTC](https://developer.community.nhs.uk/t/retrieve-all-practitioners-clinicians-at-an-organisation/2985 "2024-11-01T08:37:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![iminshall](https://avatars.discourse-cdn.com/v4/letter/i/a5b964/32.png) [@iminshall](https://developer.community.nhs.uk/u/iminshall)\
**Post date:** [1 November 2024 08:37 UTC](https://developer.community.nhs.uk/t/retrieve-all-practitioners-clinicians-at-an-organisation/2985/1 "2024-11-01T08:37:02Z")

</div>

Am I able to use this API to retrieve a list of consultants/clinicians at our organisation? If so how?

---

<div class="post-metadata">

**Author:** ![iminshall](https://avatars.discourse-cdn.com/v4/letter/i/a5b964/32.png) [@iminshall](https://developer.community.nhs.uk/u/iminshall)\
**Post date:** [1 November 2024 08:38 UTC](https://developer.community.nhs.uk/t/retrieve-all-practitioners-clinicians-at-an-organisation/2985/2 "2024-11-01T08:38:45Z")

</div>

By this API I mean the ‘Organisation Data Terminology - FHIR API’ which I thought I had posted under

---

<div class="post-metadata">

**Author:** ![kevin.mayfield1](https://dub1.discourse-cdn.com/nhsdigitaldeveloper/user_avatar/developer.community.nhs.uk/kevin.mayfield1/32/93_2.png) [@kevin.mayfield1](https://developer.community.nhs.uk/u/kevin.mayfield1)\
**Post date:** [2 November 2024 05:01 UTC](https://developer.community.nhs.uk/t/retrieve-all-practitioners-clinicians-at-an-organisation/2985/3 "2024-11-02T05:01:52Z")

</div>

I’ll leave others to officially answer your question.

Can you confirm you are asking for a capability which is answered by an API like this

[https://profiles.ihe.net/ITI/mCSD/ITI-90.html#23904125-practitionerrole-resource-message-semantics](https://profiles.ihe.net/ITI/mCSD/ITI-90.html#23904125-practitionerrole-resource-message-semantics)

So something like this?

```auto
GET \FHIR\R4\PractitionerRole?organization:identifier=https://fhir.nhs.uk/Id/ods-organization-code|M85011

```

which would returns a list (FHIR Bundle searchset) of PractitionerRole.

A single example PractitionerRole is below

```json
{
    "resourceType": "PractitionerRole",
    "id": "125686540025",
    "identifier": [
        {
            "system": "https://fhir.nhs.uk/Id/sds-role-profile-id",
            "value": "125686540025"
        }
    ],
    "active": true,
    "period": {
        "start": "2024-09-30"
    },
    "practitioner": {
        "reference": "https://directoryservice.example.nhs.uk/FHIR/R4/Practitioner/3415870201",
        "identifier": {
            "system": "https://fhir.hl7.org.uk/Id/gmp-number",
            "value": "G1234567"
        },
        "display": "Dr Razia Ali"
    },
    "organization": {
        "reference": "https://directoryservice.example.nhs.uk/FHIR/R4/Organization/M85011",
        "identifier": {
            "system": "https://fhir.nhs.uk/Id/ods-organization-code",
            "value": "M85011"
        },
        "display": "THE SWAN MEDICAL CENTRE"
    },
    "code": [
        {
            "coding": [
                {
                    "system": "https://fhir.nhs.uk/England/CodeSystem/England-JobRoleCode",
                    "code": "01025"
                }
            ]
        },
        {
            "coding": [
                {
                    "system": "https://fhir.nhs.uk/England/CodeSystem/England-SDSJobRoleName",
                    "code": "R0260"
                }
            ]
        }
    ]
}

```

---

<div class="post-metadata">

**Author:** ![kevin.mayfield1](https://dub1.discourse-cdn.com/nhsdigitaldeveloper/user_avatar/developer.community.nhs.uk/kevin.mayfield1/32/93_2.png) [@kevin.mayfield1](https://developer.community.nhs.uk/u/kevin.mayfield1)\
**Post date:** [2 November 2024 05:05 UTC](https://developer.community.nhs.uk/t/retrieve-all-practitioners-clinicians-at-an-organisation/2985/4 "2024-11-02T05:05:25Z")

</div>

This example is from elaboration of another API which isn’t listed on the API Catalogue.

p.s. the id of the PractitionerRole is the SDS User Role Id and the id of the Practitioner is the SDS User Id (so related to SmartCard and SDS)

---

<div class="post-metadata">

**Author:** ![iminshall](https://avatars.discourse-cdn.com/v4/letter/i/a5b964/32.png) [@iminshall](https://developer.community.nhs.uk/u/iminshall)\
**Post date:** [4 November 2024 08:45 UTC](https://developer.community.nhs.uk/t/retrieve-all-practitioners-clinicians-at-an-organisation/2985/5 "2024-11-04T08:45:21Z")

</div>

Hi Kev. Yes I am aware of being able to call a FHIR server for the Role. This API though is a terminology server where the Practitioner, PractitionerRole, etc are stored in CodeSystems/Valuesets. So to retrieve a practitioner you call

`CodeSystem/$lookup?system=https://digital.nhs.uk/services/organisation-data-service/CodeSystem/practitioner&code=80Y0298E&property=*`

according to the API.

I don’t think this API can return FHIR ‘resources’ but the API spec seems to have been removed.

`[Organisation Data Terminology - FHIR API - NHS England Digital](https://digital.nhs.uk/developer/api-catalogue/organisation-data-terminology)`

---

<div class="post-metadata">

**Author:** ![kevin.mayfield1](https://dub1.discourse-cdn.com/nhsdigitaldeveloper/user_avatar/developer.community.nhs.uk/kevin.mayfield1/32/93_2.png) [@kevin.mayfield1](https://developer.community.nhs.uk/u/kevin.mayfield1)\
**Post date:** [5 November 2024 08:32 UTC](https://developer.community.nhs.uk/t/retrieve-all-practitioners-clinicians-at-an-organisation/2985/6 "2024-11-05T08:32:11Z")

</div>

> [@iminshall](#):
>
> [https://digital.nhs.uk/developer/api-catalogue/organisation-data-terminology](https://digital.nhs.uk/developer/api-catalogue/organisation-data-terminology)

I think that site is having problems rendering OAS/Swagger.

I’ve been grabbing the OAS file and then pasting it into [https://editor.swagger.io/](https://editor.swagger.io/)

---

<div class="post-metadata">

**Author:** ![laura.reeves](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@laura.reeves](https://developer.community.nhs.uk/u/laura.reeves)\
**Post date:** [6 November 2024 16:07 UTC](https://developer.community.nhs.uk/t/retrieve-all-practitioners-clinicians-at-an-organisation/2985/7 "2024-11-06T16:07:07Z")

</div>

Hi Ian  
The OAS spec for the Organisation Data Terminology FHIR API should be available once again – apologies, there was a general website issue that has now been rectified.  
[Organisation Data Terminology - FHIR API - NHS England Digital](https://digital.nhs.uk/developer/api-catalogue/organisation-data-terminology)

There is a postman sandbox with a range of example queries that may be helpful in general:  
[organisation data service FHIR R4 API Sandbox for organisation-data-terminology API](https://documenter.getpostman.com/view/26163840/2sA3dvmD94)

For your specific query, we can advise that the Organisation Data Terminology FHIR API only contains practitioner data for a relatively small subset of clinicians/staff. This includes: General Practitioners, Hospital Consultants, Dental Consultants, Private Controlled Drug Prescribers and Nurse Prescribers.

ODS obtain consultant data from the NHS Workforce (ESR), further information is available in the ODS Reference Data Catalogue re data sources/update frequency etc:  
[Organisation Data Service : Hospital Consultants](https://www.odsdatasearchandexport.nhs.uk/referenceDataCatalogue/Hospital-Consultants_583142780.html)

To return a list of hospital consultants at Leeds Teaching Hospital (ODS code: RR8) for example, you would need to submit a POST:

[https://api.service.nhs.uk/organisation-data-terminology-api/fhir/ValueSet/$expand](https://api.service.nhs.uk/organisation-data-terminology-api/fhir/ValueSet/$expand)

And in the Body:  
{  
“resourceType”: “Parameters”,  
“parameter”: [  
{  
“name”: “valueSet”,  
“resource”: {  
“resourceType”: “ValueSet”,  
“compose”: {  
“inactive”: true,  
“include”: [

```
                    {
                        "system": "https://digital.nhs.uk/services/organisation-data-service/CodeSystem/practitioner",
                        "filter": [
                            {
                                "property": "ME3",
                                "op": "=",
                                "value": "RR8"
                            }
                           
                        ]
                    }
                ]
            }
        }
    },
    {
        "name": "activeOnly",
        "valueBoolean": false
    }
]

```

}

Note: ME3 is the hospital consultant relationship type – there is a different relationship type for each of the practitioner types that ODS publish data for. See Reference Data Catalogue for further information:  
[Organisation Data Service : Practitioner Membership](https://www.odsdatasearchandexport.nhs.uk/referenceDataCatalogue/Practitioner-Membership_587381382.html)

Thanks

---

<div class="post-metadata">

**Author:** ![iminshall](https://avatars.discourse-cdn.com/v4/letter/i/a5b964/32.png) [@iminshall](https://developer.community.nhs.uk/u/iminshall)\
**Post date:** [7 November 2024 09:06 UTC](https://developer.community.nhs.uk/t/retrieve-all-practitioners-clinicians-at-an-organisation/2985/8 "2024-11-07T09:06:08Z")

</div>

Thank you Laura… It seems to be exactly what I need. That Practioner Membership page is very useful

---

<div class="post-metadata">

**Author:** ![tom.brooks4](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@tom.brooks4](https://developer.community.nhs.uk/u/tom.brooks4)\
**Post date:** [28 November 2024 16:31 UTC](https://developer.community.nhs.uk/t/retrieve-all-practitioners-clinicians-at-an-organisation/2985/9 "2024-11-28T16:31:22Z")

</div>

Hi Ian, bit late to this but my team is currently building the [Healthcare Worker API](https://digital.nhs.uk/developer/api-catalogue/healthcare-fhir-api) for use cases like this.  
Currently in alpha and starting private beta in December. We currently have your specific use case on our roadmap for post-MVP so are likely to be releasing that feature in early 2025.  
It sounds like you’re getting what you need from ODS FHIR, but if that changes in future, our API is using a wider data set (the Care Identity Service directory, so anyone with a smartcard) which is updated slightly more frequently than the corresponding data from ODS as Laura alluded to above.  
If you’re interested in consuming our API once it goes live, please get in touch with myself or Catherine Ejiogu ([catherine.ejiogu1@nhs.net](mailto:catherine.ejiogu1@nhs.net)).  
Thanks  
Tom
