Skip to content

FHIR GP Connect Profiles Test Scenarios

MikeHowley edited this page Dec 21, 2016 · 11 revisions

Operation Outcomes

Test ID Scenario Name Description
FHIRPROFTEST1 No Record Section Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I author a request without specifying care record section for the patient with the NHS Number "900 000 0033" When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should indicate error of HTTP 422 and error code of "INVALID_RESOURCE" And the response body should be FHIR JSON And the JSON value "resourceType" should be "OperationOutcome"
FHIRPROFTEST2 Invalid Record Section Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I author a request with specifying an invalid care record section "INV" for the patient with the NHS Number "900 000 0033" When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should indicate error of HTTP 422 and error code "INVALID_PARAMETER" And the response body should be FHIR JSON And the JSON value "resourceType" should be "OperationOutcome"
FHIRPROFTEST3 No NHS Number Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I author a request without providing the NHS Number for the patient When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should indicate error code of HTTP 422 and error code of "INVALID_RESOURCE" And the response body should be FHIR JSON And the JSON value "resourceType" should be "OperationOutcome"
FHIRPROFTEST4 Invalid NHS Number Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I author a request for the patient with a invalid NHS Number "XYZ" When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should indicate error of HTTP 400 and Error Code of "INVALID_NHS_NUMBER" And the response body should be FHIR JSON And the JSON value "resourceType" should be "OperationOutcome"
FHIRPROFTEST5 NHS Number Not Found Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I author a request for a patient with a valid NHS Number which does not exist on the server When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should indicate error of HTTP 404 and Error Code of "PATIENT_NOT_FOUND" And the response \
FHIRPROFTEST6 Invalid Start Date Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I author a request for the 'OBS' care record section for a patient but specify an invalid start date When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should indicate error of HTTP 422 and error code of "INVALID_PARAMETER" And the response body should be FHIR JSON And the JSON value "resourceType" should be "OperationOutcome"
FHIRPROFTEST7 Invalid End Date Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I author a request for the 'OBS' care record section for a patient but specify an invalid end date When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should indicate error of HTTP 422 and error code of "INVALID_PARAMETER" And the response body should be FHIR JSON And the JSON value "resourceType" should be "OperationOutcome"
FHIRPROFTEST8 Start Date greater than the End Date Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I author a request for the 'OBS' care record section for a patient but specify the Start Date to be greater than the End Date When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should indicate error of HTTP 422 and error code of "INVALID_PARAMETER" And the response body should be FHIR JSON And the JSON value "resourceType" should be "OperationOutcome"
FHIRPROFTEST9 Time Filtering Specified for Allergies Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I author a request for the 'ALL' care record section for a patient and specify a Start Date and an End Date When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should indicate error of HTTP 422 and error code of "INVALID_PARAMETER" And the response body should be FHIR JSON And the JSON value "resourceType" should be "OperationOutcome"
FHIRPROFTEST10 Time Filtering Specified for Problems Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I author a request for the 'PRB' care record section for a patient and specify a Start Date and an End Date When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should indicate error of HTTP 422 and error code of "INVALID_PARAMETER" And the response body should be FHIR JSON And the JSON value "resourceType" should be "OperationOutcome"
FHIRPROFTEST11 Time Filtering Specified for Immunisations Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I author a request for the 'IMM' care record section for a patient and specify a Start Date and an End Date When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should indicate error of HTTP 422 and error code of "INVALID_PARAMETER" And the response body should be FHIR JSON And the JSON value "resourceType" should be "OperationOutcome"
FHIRPROFTEST12 Time Filtering Specified for Problems Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I author a request for the 'PRB' care record section for a patient and specify a Start Date and an End Date When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should indicate error of HTTP 422 and error code of "INVALID_PARAMETER" And the response body should be FHIR JSON And the JSON value "resourceType" should be "OperationOutcome"
FHIRPROFTEST13 Time Filtering Specified for Summary Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I author a request for the 'SUM' care record section for a patient and specify a Start Date and an End Date When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should indicate error of HTTP 422 and error code of "INVALID_PARAMETER" And the response body should be FHIR JSON And the JSON value "resourceType" should be "OperationOutcome"
FHIRPROFTEST14 No Patient Consent to Share Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I author a request for the 'SUM' care record section for the patient with the NHS Number "900 000 0033 And the patient has not given consent to share When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should indicate error of HTTP 403 and error code of "NO_PATIENT_CONSENT" And the response body should be FHIR JSON And the JSON value "resourceType" should be "OperationOutcome"
FHIRPROFTEST15 Retrieve the care record sections for a patient Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I am requesting the record for config patient "patient1" And I am requesting the "" care record section When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should indicate success And the response body should be FHIR JSON And the JSON value "resourceType" should be "Bundle"
FHIRPROFTEST16 Empty request Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction When I make a POST request to "/Patient/$gpc.getcarerecord" Then the response status code should be "400" And the response body should be FHIR JSON And the JSON value "resourceType" should be "OperationOutcome"
FHIRPROFTEST17 Multiple record sections requested Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I am requesting the record for config patient "patient1" And I am requesting the "SUM" care record section And I am requesting the "ALL" care record section When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should be "400" And the response body should be FHIR JSON And the JSON value "resourceType" should be "OperationOutcome"
FHIRPROFTEST18 Multiple duplication record sections in request Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I am requesting the record for config patient "patient1" And I am requesting the "SUM" care record section And I am requesting the "SUM" care record section When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should be "400" And the response body should be FHIR JSON And the JSON value "resourceType" should be "OperationOutcome"
FHIRPROFTEST19 Record section with invalid system for codable concept Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I am requesting the record for config patient "patient1" And I am requesting the "SUM" care record section with system "http://GPConnectTest.nhs.net/ValueSet/record-section" When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should be "400" And the response body should be FHIR JSON And the JSON value "resourceType" should be "OperationOutcome"
FHIRPROFTEST20 Request record sections with String type rather than CodableConcept Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I am requesting the record for config patient "patient1" And I am requesting the "SUM" care record section with a string parameter When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should be "422" And the response body should be FHIR JSON And the JSON value "resourceType" should be "OperationOutcome"
FHIRPROFTEST21 Invalid identifier system for patient NHS number Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I am requesting the record for config patient "patient1" of system "http://GPConnectTest.nhs.net/Id/identifierSystem" And I am requesting the "SUM" care record section When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should be "400" And the response body should be FHIR JSON And the JSON value "resourceType" should be "OperationOutcome"
FHIRPROFTEST22 Multiple different NHS number parameters in request Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I am requesting the record for config patient "patient1" And I am requesting the record for config patient "patient2" And I am requesting the "SUM" care record section When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should be "400" And the response body should be FHIR JSON And the JSON value "resourceType" should be "OperationOutcome"
FHIRPROFTEST23 Duplicate NHS number parameters in request Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I am requesting the record for config patient "patient1" And I am requesting the record for config patient "patient1" And I am requesting the "SUM" care record section When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should be "400" And the response body should be FHIR JSON And the JSON value "resourceType" should be "OperationOutcome"
FHIRPROFTEST24 Request patient summary with parameters in opposite order to other tests Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I set a valid time period start and end date And I am requesting the "SUM" care record section And I am requesting the record for config patient "patient1" When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should indicate success And the response body should be FHIR JSON And the JSON value "resourceType" should be "Bundle"
FHIRPROFTEST25 Request care record where request resource type is something other than Parameters Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I author a request for the "SUM" care record section for config patient "patient1" When I send a gpc.getcarerecord operation request with invalid resource type payload Then the response status code should be "422" And the response body should be FHIR JSON And the JSON value "resourceType" should be "OperationOutcome"
FHIRPROFTEST26 Time period with only start date parameter Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I am requesting the record for config patient "patient1" And I am requesting the "SUM" care record section And I set a time period parameter with start date "2012" When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should indicate success And the response body should be FHIR JSON And the JSON value "resourceType" should be "Bundle"
FHIRPROFTEST27 Time period with only end date parameter Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I am requesting the record for config patient "patient1" And I am requesting the "SUM" care record section And I set a time period parameter with end date "2016" When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response status code should indicate success And the response body should be FHIR JSON And the JSON value "resourceType" should be "Bundle"
FHIRPROFTEST28 GPConnect-Patient-1 - Metadata checks Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I author a request for a care record section for the patient with the NHS Number "900 000 0033" When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response contains the Patient resource which conforms to the GPConnect-Patient-1 resource profile And contains the version of the patient resource in element And contains the date when the patient resource was last updated in the element And contains the assertion that the patient resource content conforms to a resource profile"http://fhir.nhs.net/StructureDefinition/gpconnect-patient-1" in the element
FHIRPROFTEST29 GPConnect-Patient-1 - Identifier Checks Given I am using the default server And I am performing the "urn:nhs:names:services:gpconnect:fhir:operation:gpc.getcarerecord" interaction And I author a request for a care record section for the patient with the NHS Number "900 000 0033" When I request the FHIR "gpc.getcarerecord" Patient Type operation Then the response contains the Patient resource which conforms to the GPConnect-Patient-1 resource profile And the response contains the NHS number "900 000 0033" with the element And contains the namespace for the identifier as "http://fhir.nhs.net/Id/nhs-number" in the element
FHIRPROFTEST30 Time period format start and end date only contain year
FHIRPROFTEST31 Time period format start and end date only contain year and month
FHIRPROFTEST32 Response should be bundle containing all mandatory elements
FHIRPROFTEST33 Response bundle should contain composition as the first element
FHIRPROFTEST34 Response contains the structure definitions in the meta fields for all resources
FHIRPROFTEST35 Composition contains generic mandatory fields
FHIRPROFTEST36 Composition contains type element
FHIRPROFTEST37 Composition contains subject referencing a patient resource in the bundle
FHIRPROFTEST38 If composition contains class element
FHIRPROFTEST39 If composition contains author, the device reference can be found in the bundle
FHIRPROFTEST40 If composition contains custodian reference
FHIRPROFTEST41 If patient contains a valid identifiers
FHIRPROFTEST42 If patient contains name elements
FHIRPROFTEST43 If patient contains telecom information
FHIRPROFTEST44 If patient contains gender
FHIRPROFTEST45 If patient contains address
FHIRPROFTEST46 If patient contains maritalStatus
FHIRPROFTEST47 If patient contains contact
FHIRPROFTEST48 If patient contains communication
FHIRPROFTEST49 If patient contains practitioner as care provider
FHIRPROFTEST50 If patient contains managingOrganizaiton
FHIRPROFTEST51 If patient does not contain disallowed fields
Clone this wiki locally