Organisation Data Terminology - FHIR API: PrimaryRole

We are migrating from the ‘Organisation Data Service - ORD API’ to the ‘Organisation Data Terminology - FHIR API’. How do we identify the primary role in the FHIR API? In the ORD API we were using the “primaryRole” attribute.

This doesn’t seem to appear in the FHIR API, and instead we have the 2 OrganisationRoles without the same indication:

How can we deduce the same information i.e. RO98 is the primary one? Is it just because it appears first in the result set?

Thanks

Hi Laura

You can’t rely on the first role in the JSON response being the primary role.

The recommended approach is to make a call to the ods-organization-code codesystem like this (example calls to our sandbox):

https://sandbox.api.service.nhs.uk/organisation-data-terminology-api/fhir/CodeSystem/$lookup?system=https://fhir.nhs.uk/Id/ods-organization-code&code=11M&property=primaryRole

If you wanted all of the properties for an organisation you can use property=* like this:

https://sandbox.api.service.nhs.uk/organisation-data-terminology-api/fhir/CodeSystem/$lookup?system=https://fhir.nhs.uk/Id/ods-organization-code&code=11M&property=*

Or you could list out a selection of properties you require like this:

https://sandbox.api.service.nhs.uk/organisation-data-terminology-api/fhir/CodeSystem/$lookup?system=https://fhir.nhs.uk/Id/ods-organization-code&code=11M&property=primaryRole&property=address1&property=address2&property=address3&property=town&property=postcode&property=lastChangeDate

Hope that helps.

Thanks, Laura

Thanks for the quick response, that’s helpful.