diff --git a/.gitignore b/.gitignore index 5865c338..126c61fa 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ __pycache__/ .venv/ smoketest-report.xml +test-report.xml env .dir-locals.el *.pyc diff --git a/specification/validated-relationships-service-api.yaml b/specification/validated-relationships-service-api.yaml index 1ebbee83..b84aaeb5 100644 --- a/specification/validated-relationships-service-api.yaml +++ b/specification/validated-relationships-service-api.yaml @@ -268,13 +268,13 @@ paths: | ----------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- | | 400 | `MISSING_VALUE` | Missing header or parameter. For details, see the `diagnostics` field. | | 400 | `INVALID_VALUE` | Invalid Parameter or Invalid operation. | + | 400 | `BAD_REQUEST` | Failed questionnaire response validation | | 401 | `ACCESS_DENIED` | Missing or invalid OAuth 2.0 bearer token in request. | | 403 | `FORBIDDEN` | Access denied to resource. | - | 404 | `INVALIDATED_RESOURCE` | Resource that has been marked as invalid was requested - invalid resources cannot be retrieved | | 405 | `METHOD_NOT_ALLOWED` | The method is not allowed. | | 408 | `TIMEOUT` | Request timed out. | - | 409 | `DUPLICATE_RELATIONSHIP` | A proposed proxy role already exists for this proxy/patient relationship. | - | 415 | `UNSUPPORTED_MEDIA` | Unsupported media type. | + | 409 | `DUPLICATE_RELATIONSHIP` | A proposed proxy role already exists for this proxy/patient relationship. | + | 415 | `UNSUPPORTED_MEDIA` | Unsupported media type. | | 429 | `THROTTLED` | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | content: @@ -360,14 +360,13 @@ paths: | HTTP status | Error code | Description | | ----------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | - | 400 | `INVALID_IDENTIFIER_VALUE` | The access request ID must be a valid uuid. | + | 400 | `INVALID_IDENTIFIER_VALUE` | The access request ID must be a valid uuid. | | 400 | `INVALID_VALUE` | Invalid Parameter or Invalid operation. | - | 400 | `BAD_REQUEST` | The access request ID is required but was not provided in the request. | + | 400 | `BAD_REQUEST` | The access request ID is required but was not provided in the request. | | 400 | `MISSING_VALUE` | Missing header or parameter. For details, see the `diagnostics` field. | | 401 | `ACCESS_DENIED` | Missing or invalid OAuth 2.0 bearer token in request. | | 403 | `FORBIDDEN` | Access denied to resource. | - | 404 | `QUESTIONNAIRE_RESPONSE_NOT_FOUND` | No questionnaire response was found for the provided access request ID. | - | 404 | `INVALIDATED_RESOURCE` | Resource that has been marked as invalid was requested - invalid resources cannot be retrieved | + | 404 | `QUESTIONNAIRE_RESPONSE_NOT_FOUND` | No questionnaire response was found for the provided access request ID. | | 405 | `METHOD_NOT_ALLOWED` | The method is not allowed. | | 408 | `TIMEOUT` | Request timed out. | | 429 | `THROTTLED` | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | @@ -390,7 +389,9 @@ paths: | HTTP status | Error code | Description | | ----------- | -------------------------- | ------------------------------------------------------------ | | 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. | + | 501 | `NOT_IMPLEMENTED` | API Endpoint not implemented. | | 502 | `BAD_GATEWAY` | Connection to the backend service failed. | + | 503 | `DOWNSTREAM_SERVICE_ERROR` | Failed to generate response | content: application/fhir+json: @@ -487,13 +488,11 @@ paths: | HTTP status | Error code | Description | | ----------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | + | 400 | `MISSING_IDENTIFIER_VALUE` | Missing RelatedPerson NHS number. | | 400 | `INVALID_IDENTIFIER_SYSTEM` | Invalid identifier system. | | 400 | `INVALID_VALUE` | Invalid Parameter or Invalid operation. | - | 400 | `MISSING_IDENTIFIER_VALUE` | Missing RelatedPerson NHS number. | - | 400 | `MISSING_VALUE` | Missing header or parameter. For details, see the `diagnostics` field. | - | 400 | `INVALID_IDENTIFIER_VALUE` | Malformed RelatedPerson NHS number. | | 400 | `INVALID_PATIENT_IDENTIFIER_VALUE` | Malformed Patient NHS number. | - | 400 | `NOT_SUPPORTED` | The request is not currently supported. | + | 400 | `INVALID_IDENTIFIER_VALUE` | Malformed RelatedPerson NHS number. | | 401 | `ACCESS_DENIED` | Missing or invalid OAuth 2.0 bearer token in request. | | 403 | `FORBIDDEN` | Access denied to resource. | | 404 | `INVALIDATED_RESOURCE` | Resource that has been marked as invalid was requested - invalid resources cannot be retrieved | @@ -524,6 +523,7 @@ paths: | HTTP status | Error code | Description | | ----------- | -------------------------- | ------------------------------------------------------------ | | 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. | + | 501 | `NOT_IMPLEMENTED` | API Endpoint not implemented. | | 502 | `BAD_GATEWAY` | Connection to the backend service failed. | content: @@ -644,17 +644,11 @@ paths: | HTTP status | Error code | Description | | ----------- | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | - | 400 | `MISSING_VALUE` | Missing header or parameter. For details, see the `diagnostics` field. | - | 400 | `INVALID_VALUE` | Invalid header. For details, see the `diagnostics` field. | - | 400 | `MISSING_IDENTIFIER_VALUE` | Missing performer:identifier or patient:identifier value. | | 401 | `ACCESS_DENIED` | Missing or invalid OAuth 2.0 bearer token in request. | - | 403 | `FORBIDDEN` | Access denied to resource. | | 404 | `INVALIDATED_RESOURCE` | Resource that has been marked as invalid was requested - invalid resources cannot be retrieved | | 404 | `GP_PRACTICE_NOT_FOUND` | GP Practice not found. | | 405 | `METHOD_NOT_ALLOWED` | The method is not allowed. | | 408 | `TIMEOUT` | Request timed out. | - | 422 | `INVALID_IDENTIFIER_SYSTEM` | Invalid performer:identifier or patient:identifier identifier system. | - | 422 | `INVALID_IDENTIFIER_VALUE` | Malformed performer:identifier or patient:identifier NHS number. | | 422 | `INVALID_PARAMETER` | Invalid parameter. For details, see the `diagnostics` field. | | 429 | `THROTTLED` | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | @@ -776,23 +770,21 @@ paths: | HTTP status | Error code | Description | | ----------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | - | 400 | `INVALID_VALUE` | Invalid Parameter or Invalid operation. | - | 400 | `MISSING_IDENTIFIER_VALUE` | Missing grantee or patient identifier. | - | 400 | `MISSING_IDENTIFIER_SYSTEM` | Missing grantee or patient identifier system. | + | 400 | `MISSING_IDENTIFIER_VALUE` | Missing grantee or patient identifier. | + | 400 | `MISSING_IDENTIFIER_SYSTEM` | Missing grantee or patient identifier system. | | 400 | `MISSING_PATIENT` | Missing patient. | | 400 | `MISSING_GRANTEE` | Missing grantee. | | 400 | `MISSING_GRANTOR` | Grantor extension is required when creating or activating an active proxy role. | - | 400 | `MISSING_GRANTOR_REFERENCE` | Grantor extension is present but missing valueReference. | - | 400 | `MISSING_GRANTOR_IDENTIFIER`| Grantor extension is present but missing valueIdentifier. | + | 400 | `MISSING_GRANTOR_REFERENCE` | Grantor extension is present but missing valueReference. | + | 400 | `MISSING_GRANTOR_IDENTIFIER`| Grantor extension is present but missing valueIdentifier. | + | 400 | `MISSING_VALUE` | Missing header or parameter. For details, see the `diagnostics` field. | | 400 | `MISSING_STATUS` | Missing status. | | 400 | `MISSING_SCOPE` | Missing scope. | | 400 | `MISSING_CATEGORY` | Missing category. | | 400 | `MISSING_DATETIME` | Missing datetime. | - | 400 | `MISSING_VALUE` | Missing header or parameter. For details, see the `diagnostics` field. | | 400 | `BAD_REQUEST` | Invalid request. For details, see the `diagnostics` field. | | 401 | `ACCESS_DENIED` | Missing or invalid OAuth 2.0 bearer token in request. | | 403 | `FORBIDDEN` | Access denied to resource. | - | 404 | `INVALIDATED_RESOURCE` | Resource that has been marked as invalid was requested - invalid resources cannot be retrieved | | 405 | `METHOD_NOT_ALLOWED` | The method is not allowed. | | 408 | `TIMEOUT` | Request timed out. | | 409 | `DUPLICATE_RELATIONSHIP` | Conflict with requested proxy role. | @@ -806,9 +798,9 @@ paths: | 422 | `INVALID_DATETIME` | Invalid datetime. | | 422 | `INVALID_PROVISION` | Invalid provision. | | 422 | `INVALID_EXTENSION` | Invalid extension. | - | 422 | `INVALID_GRANTOR_VALUE` | Grantor ODS code is missing, empty, whitespace-only or invalid format. | + | 422 | `INVALID_GRANTOR_VALUE` | Grantor ODS code is missing, empty, whitespace-only or invalid format. | + | 422 | `INVALID_PERFORMER` | Invalid performer. | | 422 | `INVALID_GRANTOR_SYSTEM` | Grantor identifier system is invalid (must be 'https://fhir.nhs.uk/Id/ods-organization-code'). | - | 422 | `INVALID_PARAMETER` | Invalid request parameter. For details, see the diagnostics field. | | 429 | `THROTTLED` | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | content: @@ -850,6 +842,7 @@ paths: | HTTP status | Error code | Description | | ----------- | -------------------------- | ------------------------------------------------------------- | | 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. | + | 501 | `NOT_IMPLEMENTED` | API Endpoint not implemented. | | 502 | `BAD_GATEWAY` | Connection to the backend service failed. | | 503 | `DOWNSTREAM_SERVICE_ERROR` | A downstream service has failed, request cannot be completed. | @@ -939,16 +932,10 @@ paths: | HTTP status | Error code | Description | | ----------- | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | - | 400 | `NOT_SUPPORTED` | The request is not currently supported. | - | 400 | `MISSING_VALUE` | Missing header or parameter. For details, see the `diagnostics` field. | - | 400 | `INVALID_VALUE` | Invalid Parameter or Invalid operation. | | 401 | `ACCESS_DENIED` | Missing or invalid OAuth 2.0 bearer token in request. | - | 403 | `FORBIDDEN` | Access denied to resource. | | 404 | `INVALIDATED_RESOURCE` | Resource that has been marked as invalid was requested - invalid resources cannot be retrieved | | 405 | `METHOD_NOT_ALLOWED` | The method is not allowed. | | 408 | `TIMEOUT` | Request timed out. | - | 422 | `INVALID_ID_VALUE` | Invalid id. | - | 422 | `INVALID_PARAMETER` | Invalid parameter. For details, see the `diagnostics` field. | | 429 | `THROTTLED` | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | content: @@ -971,6 +958,7 @@ paths: | HTTP status | Error code | Description | | ----------- | -------------------------- | ------------------------------------------------------------- | | 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. | + | 501 | `NOT_IMPLEMENTED` | API Endpoint not implemented. | | 502 | `BAD_GATEWAY` | Connection to the backend service failed. | content: @@ -1081,28 +1069,27 @@ paths: | HTTP status | Error code | Description | | ----------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | - | 400 | `INVALID_VALUE` | Invalid Parameter or Invalid operation. | - | 400 | `INVALID_PATCH_FORMAT` | Invalid patch format. | - | 400 | `INVALID_PATCH` | Invalid patch. | | 400 | `MISSING_VALUE` | Missing header or parameter. For details, see the `diagnostics` field. | | 400 | `MISSING_GRANTOR` | Grantor extension is required when creating or activating a consent with status "active". For details, see the `diagnostics` field. | | 400 | `MISSING_GRANTOR_REFERENCE` | Grantor extension reference is required when creating or activating a consent with status "active". For details, see the `diagnostics` field. | | 400 | `MISSING_GRANTOR_IDENTIFIER`| Grantor extension identifier is required when creating or activating a consent with status "active". For details, see the `diagnostics` field. | + | 400 | `INVALID_PATCH` | Invalid patch. | + | 400 | `INVALID_VALUE` | Invalid Parameter or Invalid operation. | | 401 | `ACCESS_DENIED` | Missing or invalid OAuth 2.0 bearer token in request. | | 403 | `FORBIDDEN` | Access denied to resource. | - | 404 | `INVALIDATED_RESOURCE` | Resource that has been marked as invalid was requested - invalid resources cannot be retrieved | | 405 | `METHOD_NOT_ALLOWED` | The method is not allowed. | | 408 | `TIMEOUT` | Request timed out. | + | 409 | `DUPLICATE_PATCHES` | Two or more patches use same path. | | 415 | `UNSUPPORTED_MEDIA` | Unsupported media type. | + | 422 | `INVALID_EXTENSION` | Invalid extension. | | 422 | `INVALID_PATCH_PATH` | Invalid patch path. | | 422 | `INVALID_STATUS_CODE` | Invalid status code. | | 422 | `INVALID_STATUS_REASON` | Invalid status reason. | | 422 | `INVALID_STATE_TRANSITION` | Invalid state transition. | | 422 | `INVALID_LEGAL_BASIS_CODE` | Invalid legal basis code. | | 422 | `INVALID_END_DATE` | End date is invalid. | - | 422 | `DUPLICATE_PATCHES` | Two or more patches use same path. | - | 422 | `INVALID_GRANTOR_VALUE` | Invalid grantor identifier value. For details, see the `diagnostics` field. | - | 422 | `INVALID_GRANTOR_SYSTEM` | Invalid grantor system value. For details, see the `diagnostics` field. | + | 422 | `INVALID_GRANTOR_VALUE` | Invalid grantor identifier value. For details, see the `diagnostics` field. | + | 422 | `INVALID_GRANTOR_SYSTEM` | Invalid grantor system value. For details, see the `diagnostics` field. | | 429 | `THROTTLED` | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). | content: @@ -1140,6 +1127,7 @@ paths: | HTTP status | Error code | Description | | ----------- | -------------------------- | ------------------------------------------------------------- | | 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. | + | 501 | `NOT_IMPLEMENTED` | API Endpoint not implemented. | | 502 | `BAD_GATEWAY` | Connection to the backend service failed. | content: