NHS Digital FHIR Implementation Guide (Retired - 2.1.50)

This guidance is under active development by NHS Digital and content may be added or updated on a regular basis.

Device Search Interactions

The SCR API SHALL support a search interaction to return Device resources using search parameters for:

  • [Mandatory] Organisation code - ODS code of the target organisation (i.e. GP practice operating the software instance)
  • [Mandatory] MHS Interaction ID - type of Interaction supported by software instance
  • [Optional ] Manufacturer's organisation code - ODS code of the manufacturer's organisation (i.e. GP System supplier)
  • [Optional ] Party Key - identifier representing the target organisation and service interaction

Device resources are returned as a searchset Bundle containing 0, 1 or many matching Endpoint resources

SearchParameter-SDS-ManagingOrganisation has been defined to specify search on the managingOrganisation extension

The Device Search Interaction supports GP Connect use cases by allowing a consumer system to retrieve the Accredited System (AS) record for a capability at a target GP provider organisation OR at their own organisation

Search Parameter

Data Item Query Parameter Query Target Example
Organisation code organization Device.owner organization=[GPSystemODSCode]
MHS Interaction ID identifier Device.identifier:NhsEndpointServiceId identifier=https://fhir.nhs.uk/Id/nhsEndpointServiceId|[interactionId]
Manufacturer organisation code managing-organisation Device.extension:Extension-SDS-ManagingOrganisation managing-organisation=[supplierODSCode]
Party Key identifier Device.identifier:NhsMhsPartyKey identifier=https://fhir.nhs.uk/Id/nhsMhsPartyKey|[partyKey]

Request pattern

GET [baseURL]/Device?
  organization=[ODSNamingSystem]|[GPSystemODSCode]&
  identifier=[EndpointServiceIdNamingSystem]|[interactionId]&
  managing-organisation=[ODSNamingSystem]|[supplierODSCode]&
  identifier=[PartyKeyNamingSystem]|[partyKey]

Example request

GET [baseURL]/Device?
  organization=https://fhir.nhs.uk/Id/ods-organization-code|R8008&
  identifier=https://fhir.nhs.uk/Id/nhsEndpointServiceId|urn:nhs:names:services:psis:REPC_IN150016UK05&
  managing-organisation=https://fhir.nhs.uk/Id/ods-organization-code|T10101&
  identifier=https://fhir.nhs.uk/Id/nhsMhsPartyKey|R8008-0000806

Example response payload

<Bundle xmlns="http://hl7.org/fhir">
    <id value="6cf80168-a1ef-49a2-bb92-e870c8e11e3c" />
    <type value="searchset" />
    <total value="1" />
    <link>
        <relation value="self" />
        <url value="[baseURL]/Device?organization=https://fhir.nhs.uk/Id/ods-organization-code|R8008&amp;identifier=https://fhir.nhs.uk/Id/nhsEndpointServiceId|urn:nhs:names:services:psis:REPC_IN150016UK05&amp;managing-organisation=https://fhir.nhs.uk/Id/ods-organization-code|T10101&amp;identifier=https://fhir.nhs.uk/Id/nhsMhsPartyKey|R8008-0000806" />
    </link>
    <entry>
        <fullUrl value="[baseURL]/Device/ef4a9244-cec1-474a-8694-775dd385d2cc" />
        <resource>
            <Device>
                <id value="ef4a9244-cec1-474a-8694-775dd385d2cc" />
                <extension url="https://fhir.nhs.uk/StructureDefinition/Extension-SDS-ManagingOrganisation">
                    <valueReference>
                        <identifier>
                            <system value="https://fhir.nhs.uk/Id/ods-organization-code" />
                            <value value="T10101" />
                        </identifier>
                        <display value="Some GP System provider" />
                    </valueReference>
                </extension>
                <identifier>
                    <system value="https://fhir.nhs.uk/Id/nhsSpineASID" />
                    <value value="227319907548" />
                </identifier>
                <identifier>
                    <system value="https://fhir.nhs.uk/Id/nhsMhsPartyKey" />
                    <value value="R8008-0000806" />
                </identifier>
                <identifier>
                    <system value="https://fhir.nhs.uk/Id/nhsEndpointServiceId" />
                    <value value="urn:nhs:names:services:psis:REPC_IN150016UK05" />
                </identifier>
                <owner>
                    <identifier>
                        <system value="https://fhir.nhs.uk/Id/ods-organization-code" />
                        <value value="R8008" />
                    </identifier>
                    <display value="Some GP Practice" />
                </owner>
            </Device>
        </resource>
        <search>
            <mode value="match" />
        </search>
    </entry>
</Bundle>
{
    "resourceType": "Bundle",
    "id": "6cf80168-a1ef-49a2-bb92-e870c8e11e3c",
    "type": "searchset",
    "total": 1,
    "link":  [
        {
            "relation": "self",
            "url": "[baseURL]/Device?organization=https://fhir.nhs.uk/Id/ods-organization-code|R8008&identifier=https://fhir.nhs.uk/Id/nhsEndpointServiceId|urn:nhs:names:services:psis:REPC_IN150016UK05&managing-organisation=https://fhir.nhs.uk/Id/ods-organization-code|T10101&identifier=https://fhir.nhs.uk/Id/nhsMhsPartyKey|R8008-0000806"
        }
    ],
    "entry":  [
        {
            "fullUrl": "[baseURL]/Device/ef4a9244-cec1-474a-8694-775dd385d2cc",
            "resource": {
                "resourceType": "Device",
                "id": "ef4a9244-cec1-474a-8694-775dd385d2cc",
                "extension":  [
                    {
                        "url": "https://fhir.nhs.uk/StructureDefinition/Extension-SDS-ManagingOrganisation",
                        "valueReference": {
                            "identifier": {
                                "system": "https://fhir.nhs.uk/Id/ods-organization-code",
                                "value": "T10101"
                            },
                            "display": "Some GP System provider"
                        }
                    }
                ],
                "identifier":  [
                    {
                        "system": "https://fhir.nhs.uk/Id/nhsSpineASID",
                        "value": "227319907548"
                    },
                    {
                        "system": "https://fhir.nhs.uk/Id/nhsMhsPartyKey",
                        "value": "R8008-0000806"
                    },
                    {
                        "system": "https://fhir.nhs.uk/Id/nhsEndpointServiceId",
                        "value": "urn:nhs:names:services:psis:REPC_IN150016UK05"
                    }
                ],
                "owner": {
                    "identifier": {
                        "system": "https://fhir.nhs.uk/Id/ods-organization-code",
                        "value": "R8008"
                    },
                    "display": "Some GP Practice"
                }
            },
            "search": {
                "mode": "match"
            }
        }
    ]
}
back to top