NPA-5191: Update POST QuestionnaireResponse DUPLICATE_RELATIONSHIP#231
Merged
LeoKHoward merged 6 commits intoJul 3, 2025
Merged
Conversation
|
This branch is work on a ticket in the NHS Digital NPA JIRA Project. Here's a handy link to the ticket: NPA-5191 |
|
This branch is work on a ticket in the NHS Digital NPA JIRA Project. Here's a handy link to the ticket: NPA-5191 |
|
This branch is work on a ticket in the NHS Digital NPA JIRA Project. Here's a handy link to the ticket: NPA-5191 |
| | Scenario | Request | Response | | ||
| | --------------- | ----------------------------------------------- | -------------------------------- | | ||
| | Example request | Example questionnaire response from try it now | HTTP Status 200 Success response | | ||
| | Scenario | Request | Response | |
Contributor
There was a problem hiding this comment.
With update to postman json would expect an update to the try it out in postman url
|
This branch is work on a ticket in the NHS Digital NPA JIRA Project. Here's a handy link to the ticket: NPA-5191 |
|
This branch is work on a ticket in the NHS Digital NPA JIRA Project. Here's a handy link to the ticket: NPA-5191 |
|
This branch is work on a ticket in the NHS Digital NPA JIRA Project. Here's a handy link to the ticket: NPA-5191 |
ellie-bound1-NHSD
approved these changes
Jul 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
🧾 Ticket Link
https://nhsd-jira.digital.nhs.uk/browse/NPA-5191
📄 Description/Summary of Changes
Updated the OAS for POST /QuestionnaireResponse endpoint to include new DUPLICATE_RELATIONSHIP error response
Created DUPLICATE_RELATIONSHIP error
Updated Postman to include a test scenario for the DUPLICATE_RELATIONSHIP error
Modified Sandbox to handle DUPLICATE_RELATIONSHIP error for requests with specific NHS number
Updated Sandbox to include test case for the DUPLICATE_RELATIONSHIP error
Updated Postman URL
🧪 Developer Testing Carried Out
Updated unit tests in Sandbox to cover both successful (200) and DUPLICATE_RELATIONSHIP (409) scenarios
Validated OAS via Swagger
🧪 Reviewer Testing Required
Testing Environment:
Deploy the changes to the sandbox environment (dev/test/int) with the feature flag for proposed proxy roles enabled
Verify Postman:
Run the DUPLICATE_RELATIONSHIP test ensuring request with source.identifier.value="9000000049" returns a 409 and the expected error response body
Verify Sandbox API:
Send a POST request to QuestionnaireResponse in the sandbox with the body containing source.identifier.value="9000000049"
Confirm the response is a 409 with the OperationOutcome resource containing code: DUPLICATE_RELATIONSHIP
Test with a different NHS number 9000000009 to ensure a 200 response is returned
✅ Developer Checklist
NPA-XXXX: <short-description><type>/NPA-XXXX-<short-description>NPA-XXXX: <short-description>with
new tests or requirements
terraform,documentation) are added👀 Reviewer Checklist
🚀 Post-merge
After merging and deploying changes to the sandbox, Postman collection or spec examples please run the Run Postman
collection workflow.
This will run the tests within the collection to check that the sandbox is working as expected once deployed.