Prerequisites
Consumer
The Consumer system:
- SHALL have previously resolved the organisation’s FHIR endpoint Base URL through the Spine Directory Service
API Usage
Resolve (zero or more) Organization resources using a business identifier (i.e. ODS organization code).
Request Operation
The [system] field SHALL be populated with a valid organization identifier system URL (i.e. https://fhir.nhs.uk/Id/ods-organization-code).
The consumer systerm SHALL apply percent encoding when constructing the request URL as indicated in RFC 3986 Section 2.1. The will ensure that downstream servers correctly handle the pipe | character which must be used in the identifier parameter value below.
FHIR Relative Request
GET /Organization?identifier=[system]|[value]
FHIR Absolute Request
GET https://[proxy_server]/https://[provider_server]/[fhir_base]/Organization?identifier=[system]|[value]
Request Headers
Consumers SHALL include the following additional HTTP request headers:
| Header | Value |
|---|---|
Ssp-TraceID |
Consumer’s TraceID (i.e. GUID/UUID) |
Ssp-From |
Consumer’s ASID |
Ssp-To |
Provider’s ASID |
Ssp-InteractionID |
urn:nhs:names:services:gpconnect:fhir:rest:search:organization-1 |
Payload Request Body
N/A
Error Handling
Provider systems:
- SHALL return an GPConnect-OperationOutcome-1 resource that provides additional detail when one or more request fields are corrupt or a specific business rule/constraint is breached.
For example the:
- Business identifier
[system]is not recognised/supported by the Provider system. - Business identifier fails any structural validation checks (i.e. length and check digits).
Request Response
Response Headers
Provider systems are not expected to add any specific headers beyond that described in the HTTP and FHIR® standards.
Payload Response Body
Provider systems:
- SHALL return a
200OK HTTP status code on successful execution of the operation. - SHALL return zero or more matching
Organizationresources in aBundleoftypesearchset. - SHALL return
Organizationresources that conform to the CareConnect-GPC-Organization-1 profile. - SHALL include the URI of the
CareConnect-GPC-Organization-1profile StructureDefinition in theOrganization.meta.profileelement of the returnedOrganizationresources. - SHALL include the
versionIdandfullUrlof the current version of eachOrganizationresource. - SHALL include all relevant business
identifierdetails (i.e. ODS Code) for eachOrganizationresource.
{
"resourceType": "Bundle",
"type": "searchset",
"entry": [{
"fullUrl": "http://gpconnect.aprovider.nhs.net/GP001/STU3/1/Organization/23",
"resource": {
"resourceType": "Organization",
"id": "23",
"meta": {
"versionId": "636064088098730113",
"lastUpdated": "2016-08-10T13:52:54.516+01:00",
"profile": ["https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Organization-1"]
},
"identifier": [{
"system": "https://fhir.nhs.uk/Id/ods-organization-code",
"value": "O001"
}],
"name": "Honley GP Practice"
}
}]
}
Example Code
C#
var client = new FhirClient("http://gpconnect.aprovider.nhs.net/GP001/STU3/1/");
client.PreferredFormat = ResourceFormat.Json;
var query = new string[] { "identifier=https://fhir.nhs.uk/Id/ods-organization-code|O001" };
var bundle = client.Search("Organization", query);
FhirSerializer.SerializeResourceToJson(bundle).Dump();
Java
FhirContext ctx = new FhirContext();
IGenericClient client = ctx.newRestfulGenericClient("http://gpconnect.aprovider.nhs.net/GP001/STU3/1/");
Bundle bundle = client.search().forResource(Organization.class)
.where(new TokenClientParam("identifier").exactly().systemAndCode("https://fhir.nhs.uk/Id/ods-organization-code", "O001"))
.encodedJson()
.execute();
