nhsconnect / gpconnect-demonstrator

GP Connect demonstrator is a reference implementation of a GP Connect providing system and a consumer system demonstration
https://orange.testlab.nhs.uk/
Apache License 2.0
17 stars 10 forks source link

Error responses for invalid resources #250

Closed PeterGresty closed 5 years ago

PeterGresty commented 5 years ago

This ticket is to implement the demonstrator aspects of this change to correct a number of tests that were incorrectly looking for a 400/BAD_REQUEST error response but 422/INVALID_RESOURCE is more accurate according to the following spec page - https://developer.nhs.uk/apis/gpconnect-1-2-3/development_fhir_error_handling_guidance.html

GPConnect.Provider.AcceptanceTests.AppointmentBookFeature.BookAppointmentForPatientAndSendExtraFieldsInTheResource GPConnect.Provider.AcceptanceTests.PatientRegisterFeature.RegisterPatientWithAdditionalNotAllowedElements("Animal",System.String[]) GPConnect.Provider.AcceptanceTests.PatientRegisterFeature.RegisterPatientWithAdditionalNotAllowedElements("Communication",System.String[]) GPConnect.Provider.AcceptanceTests.PatientRegisterFeature.RegisterPatientWithAdditionalNotAllowedElements("Deceased",System.String[]) GPConnect.Provider.AcceptanceTests.PatientRegisterFeature.RegisterPatientWithAdditionalNotAllowedElements("Photo",System.String[]) GPConnect.Provider.AcceptanceTests.PatientRegisterFeature.RegisterPatientWithInvalidAdditionalValidElements("Active",System.String[]) GPConnect.Provider.AcceptanceTests.PatientRegisterFeature.RegisterPatientWithInvalidAdditionalValidElements("Births",System.String[]) GPConnect.Provider.AcceptanceTests.PatientRegisterFeature.RegisterPatientWithInvalidAdditionalValidElements("CareProvider",System.String[]) GPConnect.Provider.AcceptanceTests.PatientRegisterFeature.RegisterPatientWithInvalidAdditionalValidElements("Contact",System.String[]) GPConnect.Provider.AcceptanceTests.PatientRegisterFeature.RegisterPatientWithInvalidAdditionalValidElements("ManagingOrg",System.String[]) GPConnect.Provider.AcceptanceTests.PatientRegisterFeature.RegisterPatientWithInvalidAdditionalValidElements("Marital",System.String[]) GPConnect.Provider.AcceptanceTests.PatientRegisterFeature.RegisterPatientWithInvalidPatientResourceWithAdditionalElement

SimonFarrowNHS commented 5 years ago

This relates to the following provider issues: https://github.com/nhsconnect/gpconnect-provider-testing/issues/261 https://github.com/nhsconnect/gpconnect-provider-testing/issues/262