Migrating from HSCN/CIS1 to APIM/CIS2
Learn how to migrate your integrated software to the modern internet-facing e-RS API.
Overview
This page explains how to migrate your integrated NHS e-Referral Service (e-RS) application from the Health and Social Care Network (HSCN) to the internet-facing API, accessible via the API Management (APIM) platform.
In particular, it describes deprecation of the e-RS API on HSCN and the Care Identity Service (CIS1) authentication. It also describes authentication and authorisation changes, as well as updates to endpoint URLs.
Who will be affected
Partners will be affected if your integrated software uses:
- HSCN
- specific environments
- session endpoints
HSCN
All partners integrated with the FHIR API over the HSCN will be affected. This API can only be used with CIS1.
Environments
You will be affected if your integrated software uses any of the following environments and URLs:
Production - https://api.ebs.ncrs.nhs.uk
Integration - https://api.int1.ers.ncrs.nhs.uk
Deployment - https://api.dep1.ers.ncrs.nhs.uk
Session endpoints
You will be affected if your integrated software uses the DSTU2 authentication and authorisation endpoints:
A001: Create Professional Session
FHIR DSTU2 API endpoints are only available over the HSCN.
Partners using these will also have to migrate to the equivalent FHIR Standard for Trial Use 3 (STU3) endpoints.
What we are doing
The e-RS deprecated HSCN access to its API using CIS1 authentication in August 2023. This functionality will be withdrawn from service in August 2024.
At this point, HSCN access and CIS1 authentication will no longer be supported by the e-RS API.
The e-RS internet-facing API, available via APIM, provides enhanced functionality with all the features of the HSCN API.
Why we are making the change
The e-RS API uses a global standard for health care data exchange - FHIR.
The standard and best integration practices are constantly evolving. The e-RS must adapt and respond to changes. This ensures that the service continues to deliver reliable, secure and cost-effective products.
The Identity and Access Management team have deprecated the Care Identity Service (CIS1). Suppliers must migrate to the Care Identity Service 2 (CIS2) for authentication.
The e-RS HSCN API does not support CIS2. Instead, e-RS offers an internet-facing API via APIM which is compatible with CIS2. These provide enhanced functionality, including application-restricted access and an OpenAPI specification.
Next steps
- Read the FHIR DSTU2 to FHIR STU3 migration guide
- Review our integration process
- Implement the APIM/CIS2 authentication pattern
- Implement e-RS authorisation
- Change endpoint URLs
1. Read the FHIR DSTU2 to FHIR STU3 migration guide
Partners using FHIR DSTU2 API endpoints will be required to migrate over to the equivalent FHIR STU3 versions.
The migration guide explains the differences in endpoint changes and base URLs.
2. Review our integration process
The integration process documents the activities required to get your product live.
Partners with existing integrated systems will have carried out much of this work already. However, we advise working through the whole process to understand the differences and to revalidate at each step.
A lighter weight assurance policy will be available for migrations, provided no new functionality is to be adopted.
You must inform us when you start onboarding. You can contact us at [email protected].
3. Implement the APIM/CIS2 authentication pattern
The pattern used for authentication with the Internet-facing API is different to that used for the e-RS HSCN API.
The e-RS API delegates responsibility for authentication to APIM and CIS2 directly.
Security and authorisation outlines the security patterns offered by the APIM platform. The "User-restricted: Healthcare Worker access mode" is the equivalent access mode supported by the e-RS HSCN API.
The e-RS supports the User-restricted RESTful API - NHS CIS2 separate authentication and authorisation security pattern.
The security pattern guide details how the pattern works and how it may be used with CIS1 and existing smartcards.
It also describes how to:
- setup your application, including how to register your application with the:
- NHS CIS2 authentication
- API platform
- authorise the healthcare worker with NHS CIS2 authentication
- exchange the NHS CIS2 authentication ID token for an access token
- provide the access token when calling a user-restricted e-RS API
With the HSCN API the organisation, business function and any on-behalf-of user context was established within the session. This was created using A001: Create Professional Session and A002: Professional Session Select Role.
A session no longer applies with the internet-facing e-RS API and APIM.
5. Change endpoint URLs
The endpoint URLs have changed in the following ways - host and base path.
The host is now provided by the APIM platform:
Production: https://api.service.nhs.uk
Integration: https://int.api.service.nhs.uk
Deployment: https://dep.api.service.nhs.uk
The HSCN base path included an endpoint version, for example: /STU3/v1/ReferralRequest/{ubrn}. This is no longer included:
Production: /referrals/FHIR
Integration: /referrals/FHIR
Deployment: /referrals-dep/FHIR
Note that functional endpoint paths will remain unchanged, for example:
Production: Retrieve referral request (A005, FHIR STU3)
Worked example
This section provides an example of the differences between using HSCN/CIS1 and the internet-facing API via APIM/CIS2.
It details variances in:
- authentication and authorisation
- calling an e-RS endpoint
Calling an e-RS endpoint
This example is calling Retrieve referral request (A005, FHIR STU3) in the integration (INT) environment.
Field | HSCN/CIS1/STU3 | APIM/CIS2/STU3 |
---|---|---|
URL | GET https://api.int1.ers.ncrs.nhs.uk/ers-api/STU3/v1/ReferralRequest/123456789012 | GET https://int.api.service.nhs.uk/referrals/FHIR/STU3/ReferralRequest/123456789012 |
Key Request Headers |
XAPI_ASID : 100000001234 The Accredited System ID issued to the third party |
An ASID is not provided on the request It is configured on the APIM platform, as part of configuring your application |
HTTP_X_SESSION_KEY : pro-api-session:d32e2399-97b8-42f9-b871-4c3bc58197e6 The session key generated by the Create Session endpoint (A001) |
Authorization: Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM Access token generated during APIM authentication flow (see Exchange NHS CIS2 Authentication ID token for access token) |
|
Organisation and Business Function context is established in the session (not via each request) See call to A002: Professional Session Select Role in the previous section
|
NHSD-End-User-Organisation-ODS: R69 The ODS code of the caller's organisation NHSD-eRS-Business-Function: SERVICE_PROVIDER_CLINICIAN The e-RS business function of the caller |
|
Key Response Headers |
X_ERS_TRANSACTION_ID: 3ab166e8-3094-4af3-adaf-ea3156c7353d-1 |
X-Request-ID: 3ab166e8-3094-4af3-adaf-ea3156c7353d-1 |
Response Payload | No changes |
Last edited: 27 January 2025 12:01 pm