Library

Browse and search developer information

A009: Retrieve Generic Service Search

API

Request Type: POST

URL: https://mhsin.{{env}}.ers.ncrs.nhs.uk/ers-api/v1/ServiceSearch?specialty={{Specialty}}&clinicType={{Clinic_Type}}&priority={{Priority}}

 

Description

This API lets the professional user retrieve directory of services that are available in e-RS

Input

Header: Provide ASID for the end-point system and Session Key.

Example

XAPI_ASID:200000000220

HTTP_X_SESSION_KEY:{{sessionKey}}

Accept:application/json+fhir

 

Output

If successful the list of directory services are returned. The response code 200 (OK) is returned.

Example

{

“contained”: [

{

“id”: “1”,

“resourceType”: “Location”,

“address”: {

“resourceType”: “Address”,

“line”: [

“70 EAST STREET, MERCHANTS QUAY”

],

“city”: “LEEDS”,

“district”: “WEST YORKSHIRE”,

“postalCode”: “LS9 8BB”,

“country”: “England”

},

“identifier”: [

{

“value”: “R0B01”

}

],

“name”: “R0B ERS API TRUST SITE01”

},

{

“id”: “2”,

“resourceType”: “Location”,

“address”: {

“resourceType”: “Address”,

“line”: [

“70 EAST STREET, MERCHANTS QUAY”

],

“city”: “LEEDS”,

“district”: “WEST YORKSHIRE”,

“postalCode”: “LS9 8BB”,

“country”: “England”

},

“identifier”: [

{

“value”: “R1501”

}

],

“name”: “R15 ERS API TRUST SITE01”

},

{

“id”: “3”,

“resourceType”: “Location”,

“address”: {

“resourceType”: “Address”,

“line”: [

“C/O Test Data Manager”,

“PRINCES EXCHANGE”,

“PRINCES SQUARE”

],

“city”: “LEEDS”,

“district”: “WEST YORKSHIRE”,

“postalCode”: “LS1 4HY”,

“country”: “England”

},

“identifier”: [

{

“value”: “A21165”

}

],

“name”: “SAP GP PRACTICE 01”

},

{

“id”: “4”,

“resourceType”: “Location”,

“address”: {

“resourceType”: “Address”,

“line”: [

“C/O Test Data Manager”,

“PRINCES EXCHANGE”,

“PRINCES SQUARE”

],

“city”: “LEEDS”,

“district”: “WEST YORKSHIRE”,

“postalCode”: “LS1 4HY”,

“country”: “England”

},

“identifier”: [

{

“value”: “A21165”

}

],

“name”: “SAP GP PRACTICE 01”

}

],

“resourceType”: “Bundle”,

“type”: “searchset”,

“total”: 4,

“entry”: [

{

“resource”: {

“extension”: [

{

“url”: “http://fhir.nhs.net/StructureDefinition/extension-ers-healthcareService-1-0”,

“extension”: [

{

“url”: “bookable”,

“valueCode”: “INDIRECTLY_BOOKABLE”

},

{

“url”: “commissioningType”,

“valueCode”: “NATIONALLY_AVAILABLE”

},

{

“url”: “capacityStatus”,

“valueCode”: “GOOD”

},

{

“url”: “nhsChoicesLink”,

“valueString”: “http://www.nhs.uk/service-search/chooseandbook?serviceId=6473431”

},

{

“url”: “prioritiesSupported”,

“valueString”: “ROUTINE,TWO_WEEK_WAIT,URGENT”

},

{

“url”: “appointmentType”,

“valueString”: “DAY_CASE”

},

{

“url”: “organisationType”,

“valueString”: “NHS_TRUST”

},

{

“url”: “restricted”,

“valueBoolean”: false

},

{

“url”: “accredited”,

“valueBoolean”: true

}

]

}

],

“resourceType”: “HealthcareService”,

“identifier”: [

{

“value”: “6473431”

}

],

“name”: “ERS TEST”,

“specialty”: [

{

“coding”: [

{

“code”: “DERMATOLOGY”

}

]

}

],

“location”: [

{

“reference”: “#1”

}

]

}

},

{

“resource”: {

“extension”: [

{

“url”: “http://fhir.nhs.net/StructureDefinition/extension-ers-healthcareService-1-0”,

“extension”: [

{

“url”: “bookable”,

“valueCode”: “INDIRECTLY_BOOKABLE”

},

{

“url”: “commissioningType”,

“valueCode”: “NATIONALLY_AVAILABLE”

},

{

“url”: “capacityStatus”,

“valueCode”: “GOOD”

},

{

“url”: “nhsChoicesLink”,

“valueString”: “http://www.nhs.uk/service-search/chooseandbook?serviceId=6473445”

},

{

“url”: “prioritiesSupported”,

“valueString”: “ROUTINE,TWO_WEEK_WAIT,URGENT”

},

{

“url”: “appointmentType”,

“valueString”: “FIRST_OUTPATIENT”

},

{

“url”: “organisationType”,

“valueString”: “NHS_TRUST”

},

{

“url”: “restricted”,

“valueBoolean”: false

},

{

“url”: “accredited”,

“valueBoolean”: true

}

]

}

],

“resourceType”: “HealthcareService”,

“identifier”: [

{

“value”: “6473445”

}

],

“name”: “Patient.Webcam Dermatology Appointments & Advice Service”,

“specialty”: [

{

“coding”: [

{

“code”: “DERMATOLOGY”

}

]

}

],

“extraDetails”: “An example Referrer Alert”,

“location”: [

{

“reference”: “#2”

}

]

}

},

{

“resource”: {

“extension”: [

{

“url”: “http://fhir.nhs.net/StructureDefinition/extension-ers-healthcareService-1-0”,

“extension”: [

{

“url”: “bookable”,

“valueCode”: “DIRECTLY_BOOKABLE”

},

{

“url”: “commissioningType”,

“valueCode”: “NATIONALLY_AVAILABLE”

},

{

“url”: “capacityStatus”,

“valueCode”: “GOOD”

},

{

“url”: “nhsChoicesLink”,

“valueString”: “http://www.nhs.uk/service-search/chooseandbook?serviceId=6473242”

},

{

“url”: “prioritiesSupported”,

“valueString”: “ROUTINE,TWO_WEEK_WAIT,URGENT”

},

{

“url”: “appointmentType”,

“valueString”: “FIRST_OUTPATIENT”

},

{

“url”: “organisationType”,

“valueString”: “GP_PRACTICE”

},

{

“url”: “restricted”,

“valueBoolean”: false

},

{

“url”: “accredited”,

“valueBoolean”: true

}

]

}

],

“resourceType”: “HealthcareService”,

“identifier”: [

{

“value”: “6473242”

}

],

“name”: “Test SAP – Hair”,

“specialty”: [

{

“coding”: [

{

“code”: “DERMATOLOGY”

}

]

}

],

“location”: [

{

“reference”: “#3”

}

]

}

},

{

“resource”: {

“extension”: [

{

“url”: “http://fhir.nhs.net/StructureDefinition/extension-ers-healthcareService-1-0”,

“extension”: [

{

“url”: “bookable”,

“valueCode”: “DIRECTLY_BOOKABLE”

},

{

“url”: “commissioningType”,

“valueCode”: “NATIONALLY_AVAILABLE”

},

{

“url”: “capacityStatus”,

“valueCode”: “GOOD”

},

{

“url”: “nhsChoicesLink”,

“valueString”: “http://www.nhs.uk/service-search/chooseandbook?serviceId=6473243”

},

{

“url”: “prioritiesSupported”,

“valueString”: “ROUTINE,TWO_WEEK_WAIT,URGENT”

},

{

“url”: “appointmentType”,

“valueString”: “FIRST_OUTPATIENT”

},

{

“url”: “organisationType”,

“valueString”: “GP_PRACTICE”

},

{

“url”: “restricted”,

“valueBoolean”: false

},

{

“url”: “accredited”,

“valueBoolean”: true

}

]

}

],

“resourceType”: “HealthcareService”,

“identifier”: [

{

“value”: “6473243”

}

],

“name”: “Test SAP – Hair 2”,

“specialty”: [

{

“coding”: [

{

“code”: “DERMATOLOGY”

}

]

}

],

“location”: [

{

“reference”: “#4”

}

]

}

}

]

}

 

Code Sample

Refer to ‘API Client Demonstrator tool’ Source code