diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index b7f24655..cba5a14e 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -8,12 +8,6 @@ https://nhsd-jira.digital.nhs.uk/browse/NPA-XXXX --- -## 📝 PR Title Format - -Must follow format: `NPA-XXXX: Short Description of the Change` - ---- - ## 📄 Description/Summary of Changes diff --git a/specification/validated-relationships-service-api.yaml b/specification/validated-relationships-service-api.yaml index 568182c3..3d64ea9b 100644 --- a/specification/validated-relationships-service-api.yaml +++ b/specification/validated-relationships-service-api.yaml @@ -128,7 +128,6 @@ info: We currently don't have any open source client libraries or sample code for this API and the source code for the PDS FHIR back end (the Core Spine source code) is not currently in the open. If you think this would be useful, [contact us](https://digital.nhs.uk/developer/help-and-support). ## Environments and testing - | Environment | Base URL | | ----------------- | ------------------------------------------------------------------------------------ | | Sandbox | `https://sandbox.api.service.nhs.uk/validated-relationships/FHIR/R4/` | @@ -247,7 +246,8 @@ paths: | HTTP status | Error code | Description | | ----------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | - | 400 | `BAD_REQUEST` | Bad request. For details, see the `diagnostics` | + | 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 | @@ -333,9 +333,10 @@ paths: | HTTP status | Error code | Description | | ----------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | - | 400 | `BAD_REQUEST` | Bad request. | | 400 | `INVALID_REFERENCE_CODE` | The reference code must be alphanumeric and exactly 10 characters long. | + | 400 | `INVALID_VALUE` | Invalid Parameter or Invalid operation. | | 400 | `MISSING_REFERENCE_CODE` | The reference code 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 reference code. | @@ -397,8 +398,8 @@ paths: | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- | | List Relationship | `identifier`=`9000000017` | HTTP Status 200 List of relationships for the proxy | | List Relationship and include patient's details | `identifier`=`9000000017` and `_include`=`RelatedPerson:patient` | HTTP Status 200 List of relationships for the proxy and includes patient data | - | List Patient Relationship | `patient:identifier`=`9000000042` | HTTP Status 200 List of relationships for the patient | - | List Patient Relationship and include patient's details | `patient:identifier`=`9000000042` and `_include`=`RelatedPerson:patient` | HTTP Status 200 List of relationships for the patient and includes proxy data | + | List Patient Relationship | `patient:identifier`=`9000000042` | HTTP Status 200 List of relationships for the patient | + | List Patient Relationship and include patient's details | `patient:identifier`=`9000000042` and `_include`=`RelatedPerson:patient` | HTTP Status 200 List of relationships for the patient and includes proxy data | | List Relationship and no relationships returned | `identifier`=`9000000033` | HTTP Status 200 Empty bundle | | Verify Relationship between proxy and patient | `identifier`=`9000000017` and `patient:identifier`=`9000000009` | HTTP Status 200 Verified relationship between patient and proxy | | Verify Relationship between proxy and patient and include patient's details | `identifier`=`9000000017` and `patient:identifier`=`9000000009` and `_include`=`RelatedPerson:patient` | HTTP Status 200 Verified relationship between patient and proxy and includes patient's details | @@ -457,7 +458,9 @@ paths: | HTTP status | Error code | Description | | ----------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | | 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. | @@ -537,7 +540,7 @@ paths: | A single proxy relationship between consenting adults including details | `performer:identifier`=`9000000010` and/or `patient:identifier`=`9000000005` and `_include` = `Consent:patient` and `_include` = `Consent:proxy` | HTTP Status 200 Bundle containing a single proxy relationship including performer and patient details | | A single proxy relationship between a mother and child | `performer:identifier`=`9000000019` and/or `patient:identifier`=`9000000009` | HTTP Status 200 Bundle containing a single proxy relationship | | A single proxy relationship between a mother and child including details | `performer:identifier`=`9000000019` and/or `patient:identifier`=`9000000009` and `_include` = `Consent:patient` and `_include` = `Consent:proxy` | HTTP Status 200 Bundle containing a single proxy relationship including performer and patient details | - | Invalid status parameter | `performer:identifier`=`9000000019` and/or `patient:identifier`=`9000000009` and `status` = `test` | HTTP Status 422 and INVALID_VALUE error response | + | Invalid status parameter | `performer:identifier`=`9000000019` and/or `patient:identifier`=`9000000009` and `status` = `test` | HTTP Status 422 and INVALID_PARAMETER error response | | Invalid include parameter | `performer:identifier`=`9000000019` and/or `patient:identifier`=`9000000009` and `_include` = `test` | HTTP Status 422 and INVALID_PARAMETER error response | | Missing identifier | `patient:identifier`=`9000000009` | HTTP Status 400 and MISSING_IDENTIFIER_VALUE error response | | Invalid identifier | `identifier`=`900000000` Note: This identifier is 9 characters long, too short to be NHS Number | HTTP Status 422 and INVALID_IDENTIFIER_VALUE error response | @@ -638,11 +641,11 @@ paths: description: | Errors will be returned for the first error encountered in the request. An error occurred as follows: - | HTTP status | Error code | Description | - | ----------- | -------------------------- | ------------------------------------------------------------ | - | 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. | - | 502 | `BAD_GATEWAY` | Connection to the backend service failed. | - | 503 | `DOWNSTREAM_SERVICE_ERROR` | A downsteam service has failed, request cannot be completed. | + | HTTP status | Error code | Description | + | ----------- | -------------------------- | ------------------------------------------------------------- | + | 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. | + | 502 | `BAD_GATEWAY` | Connection to the backend service failed. | + | 503 | `DOWNSTREAM_SERVICE_ERROR` | A downstream service has failed, request cannot be completed. | content: application/fhir+json: @@ -714,7 +717,7 @@ paths: | HTTP status | Error code | Description | | ----------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | - | 400 | `BAD_REQUEST` | Bad request. | | + | 400 | `INVALID_VALUE` | Invalid Parameter or Invalid operation. | | 400 | `MISSING_IDENTIFIER_VALUE` | Missing performer or patient identifier. | | 400 | `MISSING_IDENTIFIER_SYSTEM` | Missing performer or patient identifier system. | | 400 | `MISSING_PATIENT` | Missing patient. | @@ -723,6 +726,7 @@ paths: | 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. | | 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 | @@ -739,6 +743,7 @@ paths: | 422 | `INVALID_DATETIME` | Invalid datetime. | | 422 | `INVALID_PROVISION` | Invalid provision. | | 422 | `INVALID_EXTENSION` | Invalid extension. | + | 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: @@ -763,11 +768,11 @@ paths: description: | Errors will be returned for the first error encountered in the request. An error occurred as follows: - | HTTP status | Error code | Description | - | ----------- | -------------------------- | ------------------------------------------------------------ | - | 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. | - | 502 | `BAD_GATEWAY` | Connection to the backend service failed. | - | 503 | `DOWNSTREAM_SERVICE_ERROR` | A downsteam service has failed, request cannot be completed. | + | HTTP status | Error code | Description | + | ----------- | -------------------------- | ------------------------------------------------------------- | + | 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. | + | 502 | `BAD_GATEWAY` | Connection to the backend service failed. | + | 503 | `DOWNSTREAM_SERVICE_ERROR` | A downstream service has failed, request cannot be completed. | content: application/fhir+json: @@ -849,8 +854,9 @@ paths: | HTTP status | Error code | Description | | ----------- | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | - | 400 | `BAD_REQUEST` | Missing header or parameter. For details, see the `diagnostics` field. | | 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 | @@ -877,11 +883,11 @@ paths: description: | Errors will be returned for the first error encountered in the request. An error occurred as follows: - | HTTP status | Error code | Description | - | ----------- | -------------------------- | ------------------------------------------------------------ | - | 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. | - | 502 | `BAD_GATEWAY` | Connection to the backend service failed. | - | 503 | `DOWNSTREAM_SERVICE_ERROR` | A downsteam service has failed, request cannot be completed. | + | HTTP status | Error code | Description | + | ----------- | -------------------------- | ------------------------------------------------------------- | + | 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. | + | 502 | `BAD_GATEWAY` | Connection to the backend service failed. | + | 503 | `DOWNSTREAM_SERVICE_ERROR` | A downstream service has failed, request cannot be completed. | content: application/fhir+json: @@ -986,10 +992,10 @@ paths: | HTTP status | Error code | Description | | ----------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | - | 400 | `BAD_REQUEST` | Bad request. | | 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. | | 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 | @@ -1024,11 +1030,11 @@ paths: description: | Errors will be returned for the first error encountered in the request. An error occurred as follows: - | HTTP status | Error code | Description | - | ----------- | -------------------------- | ------------------------------------------------------------ | - | 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. | - | 502 | `BAD_GATEWAY` | Connection to the backend service failed. | - | 503 | `DOWNSTREAM_SERVICE_ERROR` | A downsteam service has failed, request cannot be completed. | + | HTTP status | Error code | Description | + | ----------- | -------------------------- | ------------------------------------------------------------- | + | 500 | `SERVER_ERROR` | An unexpected internal server error has occurred. | + | 502 | `BAD_GATEWAY` | Connection to the backend service failed. | + | 503 | `DOWNSTREAM_SERVICE_ERROR` | A downstream service has failed, request cannot be completed. | content: application/fhir+json: