Consumer Test Scripts Structured - nhsconnect/gpc-consumer-support GitHub Wiki

Consumer Tests - Structured upto 1.2.7

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

TestScript ID Scenario Name Description Requirement ID Demonstrator Patient ID
GPC-STR-TST-GEN-02 Imported data (Exporting data to a third party)
Given I have imported GP Connect data
And I support data sharing with other systems
When I receive a request for patient record data for a patient I hold GP Connect data for
Then I only include GP Connect data where the request is for Direct Care use only
And I always include the resource identifiers received from GP Connect messages when exporting the data, adding any other identifiers as appropriate
GPC-STR-GEN-02 NA
GPC-STR-TST-GEN-05 Access Control and Audit (Audit)
Given I am at a point in the system where I have access to attempt a call to a GP Connect service
When I make that attempt to access GP Connect
Then an audit record is written to an appropriate auidit log including when access is blocked, unsuccessful or successful
And the audit record confirms to NHS Digital audit standards
GPC-IG10-01, GPC-IG10-02 9658218873, 9658220142, 9476718943
GPC-STR-TST-GEN-06 Access Control and Audit (PDS trace timeliness)
Given I have access to request data from GP Connect and the patient trace was [time] ago
When I make that attempt to access GP Connect
Then the GP Connect is request message is [result]
Examples
  • result: blocked, time: > 24 hours**
  • result sent, time: < 24 hours**
GPC-CORE01-01 9658218873
GPC-STR-TST-GEN-07 Patient Demographics (Patient demographics - primary)
Given I have made a successful request to GP Connect
When I receive a valid response including a patient resource
Then I verify the patient resource details for family name, given name, gender, date of birth and GP Practice Code match to those presented to the user from the local system in the patient record
And I alert the user to any mismatch between the local record demographics and those provided in the GP Connect response message
GPC-CORE02-02 9658218873 (To exercise scenario consumer needs to amend the local demographics to cause mismatch)
GPC-STR-TST-GEN-08 Patient Demographics (PDS trace - registered practice)
Given I have access to request data from GP Connect and the patient trace was within the last 24 hours
When I make that attempt to access GP Connect
Then the registered GP practice from the last PDS trace is used to identify the practice to submit the request to
GPC-CORE03-01, GPC-CORE03-02 9658218873
GPC-STR-TST-GEN-09 Patient Demographics (PDS trace - sensitive patient)
Given I have access to request data from GP Connect but I cannot confirm the registered practice either because it is not on PDS or the patient has an s-flag
When I attempt to access GP Connect
Then the request to GP Connect is blocked and handled gracefully so the user is aware that access is not available for that patient at that time
GPC-CORE03-03, GPC-CORE04-01 9658220142, 9658220150
GPC-STR-TST-GEN-10 Patient Demographics (Deceased patient)
Given I access a patient which is recorded as deceased on PDS or on the local system
When I am at a point where I would normally be able to access GP Connect
Then the system prevents access to GP Connect
And handles the prevention gracefully so the users is aware that GP Connect is not available for this patient
GPC-CORE07-01 9658220290
GPC-STR-TST-GEN-11 Error Handling (Patient Not Found)
Given I have made a request to a GP Connect service
When I receive a aptient not found error response
Then I handle the response gracefully
And I make available all the diagnostic details to appropriate people to enable fault resolution
GPC-CORE13-02 9999999999
GPC-STR-TST-GEN-12 Error Handling (Patient Dissent to Share)
Given I have made a request to a GP Connect service
When I receive a patient dissent to share error response
Then I handle the response gracefully
And I make available all the diagnostic details to appropriate people to enable fault resolution
GPC-CORE13-03 9658220169
GPC-STR-TST-GEN-13 Error Handling (Invalid resource)
Given I have made a request to a GP Connect service using an Invalid Resource (The Parameters resource passed does not conform to that specified in the GPConnect-GetStructuredRecord-Operation-1 OperationDefinition)
When I receive an invalid resource error response
Then I handle the response gracefully
And I make available all the diagnostic details to appropriate people to enable fault resolution
GPC-CORE13-04 9658218873
GPC-STR-TST-GEN-14 Error Handling (Invalid NHS Number)
Given I have made a request to a GP Connect service using an Invalid NHS Number
When I receive an invalid NHS number error response
Then I handle the response gracefully
And I make available all the diagnostic details to appropriate people to enable fault resolution
GPC-CORE13-05 Submit Using Invalid NHS Number
GPC-STR-TST-GEN-15 Error Handling (Invalid parameter - allergies)
Given I have made a request for allergies to a GP Connect service with invalid Allergies Parameters/Part Parameters
When I receive an invalid parameter error response
Then I handle the response gracefully
And I make available all the diagnostic details to appropriate people to enable fault resolution
GPC-CORE13-ALL01 9658218873
GPC-STR-TST-GEN-16 Error Handling (Invalid parameter - medications)
Given I have made a request for medications to a GP Connect service invalid Medications Parametes/Part Parameters
When I receive an invalid parameter error response
Then I handle the response gracefully
And I make available all the diagnostic details to appropriate people to enable fault resolution
GPC-CORE13-MED01 9658218873
GPC-STR-TST-GEN-17 Warnings (Message warnings - GP2GP transfer)
Given I have sent a valid message to GP Connect
When I receive a response including a data in transit warning
Then I make the user aware as appropriate
GPC-CORE13-07, GPC-CORE13-06 9658219705
GPC-STR-TST-GEN-18 Warnings (Message warnings - Confidential allergy)
Given I have sent a valid message to GP Connect
And I have requested allergies are included
When I receive a response including a confidential items warning for allergies
Then I make the user aware and apply controls as appropriate
GPC-CORE13-ALL02 9658219705
GPC-STR-TST-GEN-19 Warnings (Message warnings - Confidential medication)
Given I have sent a valid message to GP Connect
And I have requested medications are included
When I receive a response including a confidential items warning for medications
Then I make the user aware and apply controls as appropriate
GPC-CORE13-MED02 9658218873
GPC-STR-TST-GEN-20 Presnting patient data (Data Source)
Given I have received a valid message response
When I present the data to the end user
Then the user is aware that the data has come from the patient's registered GP record (this may be expressed generically or specific to the source practice)
GPC-STR02-01 9658218873
GPC-STR-TST-GEN-24 Imported data (Storing identifiers)
Given I have received a successful, valid response message
When I import the GP Connect resource / data into the local system
Then I always retain resource identifiers including, but not limited to, system and value
GPC-STR-TST-GEN-24 9658218873
GPC-STR-TST-MED-01 Requesting Medications (Request all medications)
Given I am enabled to access GP Connect data for a given patient
And I want to retrieve a full medication history
When I make the medication request to GP Connect
Then the request conforms to the GP Connect specification
And includes the patient's NHS Number
And the request has the includeMedication parameter
And the request sets the includePrescriptionIssues part parameter to true
And the request does NOT include the medicationSearchFromDate parameter
And the resulting response is processed successfully by the Consumer
GPC-STR-MED01-01, GPC-STR-MED01-02 9658218873
GPC-STR-TST-MED-02 Using the medication resources (Medication data elements)
Given I have received a successful, valid medications message response
When I display or use the medication information
Then I display or utilise all the key information to represent or process the medication record(s) commenserate with the original record meaning and my specific use case
GPC-STR-MED02-01, GPC-STR-MED13-01, GPC-STR-MED13-(03-17),GPC-STR-MED14-02, GPC-STR-MED13-17 9658218873
GPC-STR-TST-MED-03 Requesting Medications (Request medication by date)
Given I am enabled to access GP Connect data for a given patient
And I want to retrieve medication details but I do not require a full medication history
When I make the medication request to GP Connect
Then the request conforms to the GP Connect specification
And includes the patient's NHS Number
And the request has the includeMedication parameter
And the request sets the includePrescriptionIssues part parameter to true or false
And the request includes the medicationSearchFromDate parameter
And the medicationSearchFromDate is in the defined format
And the medicationSearchFromDate is equal or less than the current date
And the resulting response is processed successfully by the Consumer
GPC-STR-MED04-01, GPC-STR-MED04-03 9658218873
GPC-STR-TST-MED-04 Requesting Medications (Request medication by user selected date)
Given I am enabled to access GP Connect data for a given patient
And I am able to specify the date from which I want medications
When I attempt to request medications by a future date
Then I am prevented from submitting the request
GPC-STR-MED04-02 9658218873
GPC-STR-TST-MED-05 Requesting Medications (Requesting medication issues)
Given I am enabled to access GP Connect data for a given patient
And my use case [inc issue] require medication issues to be included
When I make the medication request to GP Connect
Then the request conforms to the GP Connect specification
And includes the patient's NHS Number
And the request has the includeMedication parameter
And the request sets the includePrescriptionIssues part parameter to [param value]
And the resulting response is processed successfully by the Consumer
Examples
  • inc Issues: does, does not
  • param value: true, false
GPC-STR-MED06-01 9658218873
GPC-STR-TST-MED-07 Using the medication resources (No medication records)
Given I have received a successful, valid medications message response
And the response has a list with an empty reason
And the response does not include medication resourcese
When I display or use the medication information
Then I display or utilise the list empty reson to inform the user that the patient has no medication records within the request parameters in a way appropriate to my use case
GPC-STR-MED15-01 9658218903
GPC-STR-TST-ALG-01 Requesting allergies or adverse reactions (Request current allergies)
Given the user wishes to view / import all current allergiesOR the system is set to only view / import all current allergies
When the user selects to access current allergies from GP Connect
Then the resulting request is populated with valid syntax using the includeAllergies parameter with part parameter includeResolvedAllergies set to false
And the resulting response is processed successfully by the Consumer.
GPC-STR-ALL01-(01-02) 9658218873
GPC-STR-TST-ALG-02 Requesting allergies or adverse reactions (Request current and resolved allergies)
Given the user wishes to view / import all allergies, including resolved allergiesOR the system is set to only view / import all allergies, including resolved allergies
When the user selects to access all allergies from GP Connect
Then the resulting request is populated with valid syntax using the includeAllergies parameter with part parameter includeResolvedAllergies set to true
And the resulting response is processed successfully by the Consumer.
GPC-STR-ALL02-01 9658218873
GPC-STR-TST-ALG-03 Using the allergies resource (Handling resolved allergies)
Given I have received a successful, valid allergies message response
And the response includes resolved allergies
When I display or use the allergies information
Then my system identifies the resolved allergies and handles them in a clinical safe manner such that they remain distinct from current allegies
And where the resolved allergies are presented in the UI they are clearly and prominently labelled as ended, resolved or equivalent
And ensures that the resolved allergies cannot be utilised by decision support (where decision support is in use)
GPC-STR-ALL02-02 9658218873
GPC-STR-TST-ALG-04 Using the allergies resource (Allergy data elements)
Given I have received a successful, valid allergies message response
When I display or use the allergy information
Then I display or utilise all the key information to represent or process the allergy record(s) commenserate with the original record meaning and my specific use case
GPC-STR-ALL04-(01-09) 9658218873
GPC-STR-TST-ALG-05 Using the allergies resource (Unrecognised allergies)
Given I have received a successful, valid allergies message response
And the response includes allergies which is not recognised by my system
When I display or use the allergy information
Then I display or utilise any SNOMED code or alternative code system coding, as applicable to my use case
And I display or utilise the allergy name as provided which represents the name of the allergy as entered by the original user, as applicable to my use case
And I can handle any records which are sent as allergies but are not recognised as allergy codes by my system
And if the unrecognised record is stored it is degraded
GPC-STR-TST-ALG-05 Need discussion if this test and requirment is applicable
GPC-STR-TST-ALG-07 Using the allergies resource (No data response)
Given I have received a successful, valid allergies message response
And the response includes an empty active allergies list resource indicating that the patient record has no content recorded
When I display or use the allergies response
Then I recognise this as a record with no active allergies recorded
And I handle it appropriate to my use case and in such a way it is not confused with a clinical assertion of no known allergies
GPC-STR-ALL06-01 9658218865
GPC-STR-TST-ALG-08 Using the allergies resource (Clinically asserted no known allergies)
Given I have received a successful, valid allergies message response
And the response includes a single code item which indicates that the clinician has recorded that the patient has no known allergies
When I display or use the allergies response
Then I recognise this as a clinical assertion of no known allergies
And I handle it appropriate to my use case and in such a way it is not confused with an empty list response
GPC-STR-ALL06-01 9658218989
GPC-STR-TST-GEN-25 Warnings (Multiple message warnings)
Given I have sent a valid message to GP Connect
And I have included a request for medications data
When I receive a response including a data in transit warning and a confidential data items warning for medications
Then I make the user aware as appropriate and that the data in transit warning is shown as applicable to all data
And the confidential data warning is shown to apply to medications data only
GPC-CORE13-09 9658219705
GPC-STR-TST-GEN-26 Warnings (Forwards compatibility)
Given I have sent a request for both medications and allergies
When the provider processes the request and returns a success response
And includes resources for [CA1]
And a warning that [CA2] is not recognised
Then I recognise the warning in the response as appropriate to my use case
And utilise the successful [CA1] response information
And handle gracefully the warning that the request for [CA2] has failed informing users appropriatelyOR I treat the full response as an error and handle it gracefully, informing users appropriately[CA1]: allergies; medications[CA2]: medications; allergies
GPC-STR-TST-GEN-26 CANNED RESPONSE TBC NOT YET APPLICABLE
GPC-STR-TST-GEN-27 Warnings (Backwards compatibility)
Given GIVEN I have sent a valid request to a provider at a higher version than I support
When I receive the response it includes additional information
And I process the response
Then I ignore the additional information
And I process the response successfully
GPC-STR-TST-GEN-27 CANNED RESPONSE TBC NOT YET APPLICABLE
GPC-STR-TST-MED-08 Requesting Medications (Request all medications)
Given I am enabled to access GP Connect data for a given patient
And I want to retrieve a full medication history
When I make the medication request to GP Connect
Then the request conforms to the GP Connect specification
And includes the patient's NHS Number
And the request has the includeMedication parameter
And the request does NOT include the includePrescriptionIssues part parameter OR includes and sets the includePrescriptionIssues part parameter to true
And the request does NOT include the medicationSearchFromDate parameter
GPC-STR-TST-MED-08 9658218873
GPC-STR-TST-MED-09 Requesting Medications (Requesting medication issues)
Given I am enabled to access GP Connect data for a given patient
And my use case [inc issue] require medication issues to be included
When I make the medication request to GP Connect
Then the request conforms to the GP Connect specification
And includes the patient's NHS Number
And the request has the includeMedication parameter
And the request sets the includePrescriptionIssues part parameter to [param value]
Examples
  • inc Issues: does, does not
  • param value: true, false, is absent
GPC-STR-TST-MED-09 9658218873
GPC-STR-TST-GEN-10 Patient Demographics (Deceased patient)
Given I access a patient which is recorded as deceased on PDS or on the local system
When I am at a point where I would normally be able to access GP Connect
Then the system prevents access to GP Connect
And handles the prevention gracefully so the users is aware that GP Connect is not available for this patient
GPC-CORE07-01 9658220290
⚠️ **GitHub.com Fallback** ⚠️