Consumer Test Scripts Spine Integration - nhsconnect/gpc-consumer-support GitHub Wiki


Spine Integration Consumer Tests for all of the latest versions of the capabilities.

Please scroll to the right to view the full test information including test data

TESTSCRIPT ID Scenario Name Description Requirement ID Demonstrator Patient ID Provider Test?
GPC-SPN-TST-01 Retrieve the Accredited System ID (ASID) for a patient's GP Provider Organisation retrieved from PDS or SMSP lookup
Given I am using the Spine Directory Services LDAP server And I am performing the ldapsearch to retrieve the ASID and the MHS Party Key
When I request the ldapsearch operation
Then I set Accredited System type as nhsAS, Organisation code as the GP Practice Organisation code and the InteractionID as a specific GP Connect Interaction ID
And the ldap response should contain the ASID and the MHS Party Key of the GP Practice Organisation Code
GPC-SSP03-02 9658218873
GPC-SPN-TST-02 Retrieve the FHIR endpoint URL of the Message Handling System (MHS) for the ASID record
Given I am using the default Spine Directory Services LDAP server
And I am performing the ldapsearch to retrieve the FHIR endpoint URL of the MHS
When I request the ldapsearch operation
Then I set Message Handling System type as nhsMHS, provide the MHS Party Key and the Interaction ID as a specific GP Connect Interaction ID
And the ldap response should contain the FHIR endpoint URL of the MHS in the nhsMhsEndPoint
GPC-SSP03-03 9658218873
GPC-SPN-TST-03 Retrieve a patient record using a valid Security valid client certificate, cipher and SSL using TLSv1
Given I am using the default server
And I am performing a Foundations, Appointments, HTML GetCareRecord OR GetStructuredRecord interaction interaction
When I make a GPConnect request
Then I use a valid client certificate
And the response status code should indicate success
GPC-SSP04-02, GPC-SSP04-03, GPC-SSP04-04 9658218873
GPC-SPN-TST-04 Retrieve a patient record using a valid SSLCipherSuite
Given I am using the default server
And I am performing a Foundations, Appointments, HTML GetCareRecord OR GetStructuredRecord interaction interaction
When I make a GPConnect request
Then I use a valid SSLCipherSuite = AESGCM+EECDH,AESGCM+EDH,AES256+EECDH,AES256+EDH
And the response status code should indicate success
GPC-SSP04-05 9658218873
GPC-SPN-TST-05 Fhir content type test where Accept header is JSON and request payload is XML
Given I am using the default server
And I am performing a Foundations, Appointments, HTML GetCareRecord or GetStructuredRecord interaction
And I set the request content type to ""application/xml+fhir"
And I set the Accept header to ""application/json+fhir"
When I make the GPConnect request
Then the response status code should indicate success
And the response body should be FHIR JSON
GPC-SSP06-03 9658218873
GPC-SPN-TST-06 Fhir content type test where _format parameter is JSON and request payload is JSON
Given I am using the default serverAnd I am performing a Foundations, Appointments, HTML GetCareRecord or GetStructuredRecord interaction
And I set the request content type to ""application/json+fhir"
And I do not send header ""Accept"
And I add the parameter ""_format"" with the value ""application/json+fhir"
When I make the GPConnect request
Then the response status code should indicate success
And the response body should be FHIR JSON
GPC-SSP06-04 9658218873
GPC-SPN-TST-07 Receive and handle a SPINE operation outcome resource
Given I am using the default server
And I am performing a Foundations, Appointments, HTML GetCareRecord or GetStructuredRecord interaction
And I author a GPConnect request for patient with NHS Number (NHS Number to be provided by NHS Digital) who does not consent to their record being shared
When I make a valid request
Then the response status code should be ""403"" and Error Code of "NO_PATIENT_CONSENT"
And I will display appropriate error response
And I will add the interaction to the audit trail
GPC-SSP07-01 9450056234 YES (TPP PROVIDER)
GPC-SPN-TST-08 Write to audit trail successful interaction
Given I am using the default server
And I am performing a Foundations, Appointments, HTML GetCareRecord or GetStructuredRecord interaction
And I author a GPConnect request for patient with NHS Number
And I make a valid request
When I receive a successful response
Then I shall add to the systems audit trail the interaction header data items including Ssp-TraceID, Ssp-From, Ssp - To, Ssp-Interaction ID details sent in the request
And I shall add to the systems audit trail the JWT data items including - User ID Name, Role and Organisation - Identity of authority (the person authorising the entry of or access to data Date and Time on which the interaction occurred - Details of the nature of the event and the identity of the associated data (e.g. message/audit event ID) of the event
GPC-SSP08-01 9658218873
GPC-SPN-TST-09 Write to audit trail unsuccessful interaction
Given I am using the default server
And I am performing a Foundations, Appointments, HTML GetCareRecord or GetStructuredRecord interaction
And I author a GPConnect request for patient with NHS Number (NHS Number to be provided by NHS Digital)
And I make a valid request
When I receive an unsuccessful response.
Then I shall add to the systems audit trail the interaction header items including Ssp-TraceID, Ssp-From, Ssp - To, Ssp-Interaction ID details sent in the request
And I shall add to the systems audit trail the interaction header data items including Ssp-TraceID, Ssp-From, Ssp - To, Ssp-Interaction ID details sent in the requestAnd I shall add to the systems audit trail the JWT data items including - User ID Name, Role and Organisation - Identity of authority (the person authorising the entry of or access to data - Date and Time on which the interaction occurred - Details of the nature of the event and the identity of the associated data (e.g. message/audit event ID) of the event
And I shall add to the systems audit trail the Operation Outcome response details returned in the response
And I shall display the interaction-returned message
GPC-SSP08-02 9658219748
GPC-SPN-TST-10 JWT is valid (practitioner has smartcard)
Given Given I am performing the Foundations, Appointments, HTML GetCareRecord or GetStructuredRecord interaction
When I make the GPConnect request
Then I include a JWT Header, Payload and Signature each separated by dots
And I am generating a new JWT header
And I include the 'alg' header parameter with value 'none'
And I inlcude the 'typ' header parameter with value 'JWT'
And I have set the JWT payload creation time 'iat' to now
And I have set the JWT payload expiry time 'exp' to ""300"" seconds after creation time
And I set the JWT payload 'reason_for_request' to "directcare"
And I have set the JWT payload 'requesting_device' claim value to hold business identifiers of the consuming system and deviceAnd I have set the JWT payload 'requesting_organization' claim value to hold details of the care organisation sending the request, including the organisation's name, the organisation's identifier system of system of ""http://fhir.nhs.net/Id/ods-organization-code"" and the ODS code of care organisation sending the request
And I have set the JWT payload 'requesting_practitioner' claim value to hold valid details of the logged in practitioner including - identifier element with system containing http://fhir.nhs.net/sds-user-id and value containing SDS user ID - practitionerRole element with system containing http://fhir.nhs.net/ValueSet/sds-job-role-name-1 and value containing the SDS Job Role ID
And I have set the JWT payload 'iss' claim value to the URL of the Spine endpoint of the consuming system
And I have set the JWT payload 'sub' claim value to requesting_practitioner.id
And I have set the JWT payload 'aud' claim value appropriate to the request type
And I set the JWT payload 'requested_scope' claim value appropriate to the request type
And I am generating a new JWT signature
And I do not include any signature parameters
And I add the base64 encoded JWT to the authorisation header
And I set the completed JWT with base64encodingAnd the response status code should indicate success
GPC-SSP05-06 9658218873
GPC-SPN-TST-11 JWT is valid (practitioner not a smartcard login)
Given I am performing request using the relevant GPC interaction
When I make the GPConnect request
Then I include a JWT Header, Payload and Signature each separated by dots
And I am generating a new JWT header
And I include the 'alg' header parameter with value 'none'
And I inlcude the 'typ' header parameter with value 'JWT'
And I have set the JWT payload creation time 'iat' to now
And I have set the JWT payload expiry time 'exp' to ""300"" seconds after creation time
And I set the JWT payload 'reason_for_request' to ""directcare""
And I have set the JWT payload 'requesting_device' claim value to hold business identifiers of the consuming system and device
And I have set the JWT payload 'requesting_organization' claim value to hold details of the care organisation sending the request, including the organisation's name, the organisation's identifier system of system of ""http://fhir.nhs.net/Id/ods-organization-code"" and the ODS code of care organisation sending the request
And I have set the JWT payload 'requesting_practitioner' claim value to hold valid details of the logged in practitioner including - identifier element with system containing http://fhir.nhs.net/sds-user-id and value containing 'UNK' - practitionerRole element with system containing http://fhir.nhs.net/ValueSet/sds-job-role-name-1 and value containing 'UNK'
And I have set the JWT payload 'iss' claim value to the URL of the Spine endpoint of the consuming system
And I have set the JWT payload 'sub' claim value to requesting_practitioner.id
And I have set the JWT payload 'aud' claim value appropriate to the request type
And I set the JWT payload 'requested_scope' claim value appropriate to the request type
And I am generating a new JWT signature
And I do not include any signature parameters
And I add the base64 encoded JWT to the authorisation header
And I set the completed JWT with base64 encoding
And the response status code should indicate success
GPC-SSP05-04, GPC-SSP05-05 9658218873
GPC-SPN-TST-12 Use transfer encoding and compression headers
Given I am using the default serverAnd I am performing a Foundations, Appointments, HTML GetCareRecord or GetStructuredRecord interaction
When I make the GPConnect request
Then  I set the transfer-encoding header to ""chunked" And I set the Accept-encoding header to "gzip""
And the response status code should indicate success
GPC-SSP04-07 9658218873
GPC-SPN-TST-13 Use spine headers
Given I am using the default server And I am performing a Foundations, Appointments, HTML GetCareRecord or GetStructuredRecord interaction
When I make the GPConnect request
Then I set the Ssp-TraceID to a TraceID that uniquely identifies this request
And I set the Ssp-From to my ASID
And I set the Ssp-To to the recipient’s ASID
And I set the Ssp-InteractionID to the correct value for the interaction
And the response status code should indicate success
GPC-SSP05-09 9658218873
⚠️ **GitHub.com Fallback** ⚠️