Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ paket-files/
#Ignore .feature.cs
/GPConnect.Provider.AcceptanceTests/*.feature.cs

#ignore app.config file
*.config

/GPConnect.Provider.AcceptanceTests/App.config

settings.json
8 changes: 8 additions & 0 deletions Data/NHSNoMap.csv
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,11 @@ patient21,9690938142
patient30,9690937367
patient31,9690938223
patient32,9690937340
patient33,9690937316
patient34,9690937324
patient35,9690937332
patient36,9690938207
patient37,9690938215
patient38,9690937693
patient39,9690938770
patient40,9690938088
607 changes: 518 additions & 89 deletions GPConnect.Provider.AcceptanceTests/AppointmentAmend.feature.cs

Large diffs are not rendered by default.

1,277 changes: 1,106 additions & 171 deletions GPConnect.Provider.AcceptanceTests/AppointmentBook.feature.cs

Large diffs are not rendered by default.

853 changes: 721 additions & 132 deletions GPConnect.Provider.AcceptanceTests/AppointmentCancel.feature.cs

Large diffs are not rendered by default.

210 changes: 106 additions & 104 deletions GPConnect.Provider.AcceptanceTests/AppointmentRead.feature
Original file line number Diff line number Diff line change
@@ -1,108 +1,110 @@
@appointment @1.5.0-Full-Pack
Feature: AppointmentRead

Scenario Outline: I perform a successful Read appointment
Given I create an Appointment for Patient "<PatientName>"
Scenario Outline: I perform a successful Read appointment
Given I create an Appointment for Patient "<PatientName>"
And I store the Created Appointment
Given I configure the default "AppointmentRead" request
When I make the "AppointmentRead" request
Then the response status code should indicate success
Given I configure the default "AppointmentRead" request
When I make the "AppointmentRead" request
Then the response status code should indicate success
And the Response Resource should be an Appointment
And the Appointments returned must be in the future
And the Appointment Id should be valid
And the Appointment Metadata should be valid
And the Appointment DeliveryChannel must be valid
And the Appointment PractitionerRole must be valid
# git hub ref 120
# RMB 25/10/2018
# git hub ref 120
# RMB 25/10/2018
And the Appointment Not In Use should be valid
Examples:
| PatientName |
| patient1 |
| patient2 |
| patient3 |

Scenario Outline: I perform a successful Read appointment with Extensions
Given I create an Appointment for Patient "<PatientName>"
And I create an Appointment with org type "<OrgType>" with channel "<DeliveryChannel>" with prac role "<PracRole>"
Examples:
| PatientName |
| patient1 |
| patient2 |
| patient3 |

Scenario Outline: I perform a successful Read appointment with Extensions
Given I create an Appointment for Patient "<PatientName>"
And I create an Appointment with org type "<OrgType>" with channel "<DeliveryChannel>" with prac role "<PracRole>"
And I store the Created Appointment
Given I configure the default "AppointmentRead" request
When I make the "AppointmentRead" request
Then the response status code should indicate success
Given I configure the default "AppointmentRead" request
When I make the "AppointmentRead" request
Then the response status code should indicate success
And the Response Resource should be an Appointment
And the Appointments returned must be in the future
And the Appointment Id should be valid
And the Appointment Metadata should be valid
And the Appointment DeliveryChannel must be present
And the Appointment PractitionerRole must be present
Examples:
| PatientName | OrgType | DeliveryChannel | PracRole |
| patient1 | true | true | true |

Scenario: I perform a successful Read appointment with JWT Org Different
# git hub ref 177
# RMB 31/1/19
Given I create an Appointment for Patient "patient1" and Organization Code "ORG3"
Examples:
| PatientName | OrgType | DeliveryChannel | PracRole |
| patient1 | true | true | true |

Scenario: I perform a successful Read appointment with JWT Org Different
# git hub ref 177
# RMB 31/1/19
Given I create an Appointment for Patient "patient1" and Organization Code "ORG3"
And I store the Created Appointment
Given I configure the default "AppointmentRead" request
When I make the "AppointmentRead" request
Then the response status code should indicate success
Given I configure the default "AppointmentRead" request
When I make the "AppointmentRead" request
Then the response status code should indicate success
And the Response Resource should be an Appointment
And the Appointment Organisation Code should equal "ORG1"

Scenario Outline: Read appointment invalid appointment id
Given I create an Appointment for Patient "patient1"
Scenario Outline: Read appointment invalid appointment id
Given I create an Appointment for Patient "patient1"
And I store the Created Appointment
Given I configure the default "AppointmentRead" request
Given I configure the default "AppointmentRead" request
And I set the Read Operation logical identifier used in the request to "<id>"
When I make the "AppointmentRead" request
Then the response status code should be "404"
When I make the "AppointmentRead" request
Then the response status code should be "404"
And the response body should be FHIR JSON
Examples:
| id |
| Invalid4321 |
| 8888888888 |
| |

Scenario Outline: Read appointment using the _format parameter to request response format
Given I create an Appointment for Patient "patient1"

Examples:
| id |
| Invalid4321 |
| 8888888888 |
| |


Scenario Outline: Read appointment using the _format parameter to request response format
Given I create an Appointment for Patient "patient1"
And I store the Created Appointment
Given I configure the default "AppointmentRead" request
Given I configure the default "AppointmentRead" request
And I add the parameter "_format" with the value "<Parameter>"
When I make the "AppointmentRead" request
Then the response status code should indicate success
When I make the "AppointmentRead" request
Then the response status code should indicate success
And the response body should be FHIR <BodyFormat>
And the Response Resource should be an Appointment
Examples:
| Parameter | BodyFormat |
| application/fhir+json | JSON |
| application/fhir+xml | XML |
Examples:
| Parameter | BodyFormat |
| application/fhir+json | JSON |
| application/fhir+xml | XML |


Scenario Outline: Read appointment using the _format parameter and accept header to request response format
Given I create an Appointment for Patient "patient1"
Scenario Outline: Read appointment using the _format parameter and accept header to request response format
Given I create an Appointment for Patient "patient1"
And I store the Created Appointment
Given I configure the default "AppointmentRead" request
Given I configure the default "AppointmentRead" request
And I set the Accept header to "<Header>"
And I add the parameter "_format" with the value "<Parameter>"
When I make the "AppointmentRead" request
Then the response status code should indicate success
When I make the "AppointmentRead" request
Then the response status code should indicate success
And the response body should be FHIR <BodyFormat>
And the Response Resource should be an Appointment
Examples:
| Header | Parameter | BodyFormat |
| application/fhir+json | application/fhir+json | JSON |
| application/fhir+json | application/fhir+xml | XML |
| application/fhir+xml | application/fhir+json | JSON |
| application/fhir+xml | application/fhir+xml | XML |

Scenario Outline: Read appointment ensure response appointments contain the manadatory elements
Given I create an Appointment for Patient "patient1"
Examples:
| Header | Parameter | BodyFormat |
| application/fhir+json | application/fhir+json | JSON |
| application/fhir+json | application/fhir+xml | XML |
| application/fhir+xml | application/fhir+json | JSON |
| application/fhir+xml | application/fhir+xml | XML |

Scenario Outline: Read appointment ensure response appointments contain the manadatory elements
Given I create an Appointment for Patient "patient1"
And I store the Created Appointment
Given I configure the default "AppointmentRead" request
Given I configure the default "AppointmentRead" request
And I set the Accept header to "<Header>"
When I make the "AppointmentRead" request
Then the response status code should indicate success
When I make the "AppointmentRead" request
Then the response status code should indicate success
And the response body should be FHIR <BodyFormat>
And the Response Resource should be an Appointment
And the Appointment Status should be valid
Expand All @@ -118,68 +120,68 @@ Scenario Outline: Read appointment ensure response appointments contain the mana
And the Response should contain the ETag header matching the Resource Version Id
And the Appointment booking organization extension and contained resource must be valid
And the appointment reason must not be included
Examples:
| Header | BodyFormat |
| application/fhir+json | JSON |
| application/fhir+xml | XML |
Scenario: Read appointment valid response check caching headers exist
Given I create an Appointment for Patient "patient1"
Examples:
| Header | BodyFormat |
| application/fhir+json | JSON |
| application/fhir+xml | XML |

Scenario: Read appointment valid response check caching headers exist
Given I create an Appointment for Patient "patient1"
And I store the Created Appointment
Given I configure the default "AppointmentRead" request
When I make the "AppointmentRead" request
Then the response status code should indicate success
Given I configure the default "AppointmentRead" request
When I make the "AppointmentRead" request
Then the response status code should indicate success
And the Response Resource should be an Appointment
And the required cacheing headers should be present in the response

Scenario:Read appointment invalid response check caching headers exist
Given I create an Appointment for Patient "patient1"
Scenario:Read appointment invalid response check caching headers exist
Given I create an Appointment for Patient "patient1"
And I store the Created Appointment
Given I configure the default "AppointmentRead" request
Given I configure the default "AppointmentRead" request
And I set the Read Operation logical identifier used in the request to "555555"
When I make the "AppointmentRead" request
Then the response status code should be "404"
When I make the "AppointmentRead" request
Then the response status code should be "404"
And the response body should be FHIR JSON

# git hub ref 171
# RMB 22/1/19
Scenario: CapabilityStatement profile supports the read appointment operation
Given I configure the default "MetadataRead" request
When I make the "MetadataRead" request
Then the response status code should indicate success
# git hub ref 171
# RMB 22/1/19
Scenario: CapabilityStatement profile supports the read appointment operation
Given I configure the default "MetadataRead" request
When I make the "MetadataRead" request
Then the response status code should indicate success
And the CapabilityStatement REST Resources should contain the "Appointment" Resource with the "Read" Interaction

Scenario Outline: Read a patient’s appointments expecting servicecategory is populated
Given I create an Appointment in "2" days time for Patient "patient1" and Organization Code "ORG1"
Scenario Outline: Read a patient’s appointments expecting servicecategory is populated
Given I create an Appointment in "2" days time for Patient "patient1" and Organization Code "ORG1"
And I store the Created Appointment
Given I configure the default "AppointmentRead" request
When I make the "AppointmentRead" request
Then the response status code should indicate success
Given I configure the default "AppointmentRead" request
When I make the "AppointmentRead" request
Then the response status code should indicate success
And the Response Resource should be an Appointment
And the Appointments returned must be in the future
And the Appointment Id should be valid
And the Appointment Metadata should be valid
And the Appointment DeliveryChannel must be present
And the Appointment PractitionerRole must be present
And One Appointment contains serviceCategory element
Examples:
| PatientName | OrgType | DeliveryChannel | PracRole |
| patient1 | true | true | true |
Examples:
| PatientName | OrgType | DeliveryChannel | PracRole |
| patient1 | true | true | true |


Scenario Outline: Read a patient’s appointments expecting serviceType is populated
Given I create an Appointment in "2" days time for Patient "patient1" and Organization Code "ORG1"
Scenario Outline: Read a patient’s appointments expecting serviceType is populated
Given I create an Appointment in "2" days time for Patient "patient1" and Organization Code "ORG1"
And I store the Created Appointment
Given I configure the default "AppointmentRead" request
When I make the "AppointmentRead" request
Then the response status code should indicate success
Given I configure the default "AppointmentRead" request
When I make the "AppointmentRead" request
Then the response status code should indicate success
And the Response Resource should be an Appointment
And the Appointments returned must be in the future
And the Appointment Id should be valid
And the Appointment Metadata should be valid
And the Appointment DeliveryChannel must be present
And the Appointment PractitionerRole must be present
And One Appointment contains serviceType element
Examples:
| PatientName | OrgType | DeliveryChannel | PracRole |
| patient1 | true | true | true |
Examples:
| PatientName | OrgType | DeliveryChannel | PracRole |
| patient1 | true | true | true |
Loading