Open
Conversation
|
This branch is work on a ticket in the NHS Digital NPA JIRA Project. Here's a handy link to the ticket: NPA-6402 |
|
This branch is work on a ticket in the NHS Digital NPA JIRA Project. Here's a handy link to the ticket: NPA-6402 |
|
This branch is work on a ticket in the NHS Digital NPA JIRA Project. Here's a handy link to the ticket: NPA-6402 |
ClarksonAdam
requested changes
Feb 20, 2026
Contributor
ClarksonAdam
left a comment
There was a problem hiding this comment.
Couple of small things to resolve. Otherwise it's looking good
postman/validated_relationship_service.integration.postman_collection.json
Show resolved
Hide resolved
|
This branch is work on a ticket in the NHS Digital NPA JIRA Project. Here's a handy link to the ticket: NPA-6402 |
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.
Description/Summary of Changes
Pull Request
🧾 Ticket Link
https://nhsd-jira.digital.nhs.uk/browse/NPA-6402
This PR updates the sandbox API, OAS specification, example YAML responses, Postman collections, and tests to replace
_include=Consent:performerwith_include=Consent:grantee. When_include=Consent:granteeis used, the response now returns a Patient resource for the proxy (containing their demographic information) and a RelatedPerson resource for the relationship, rather than only returning a RelatedPerson resource for the proxy as was previously the case withConsent:performer.This change addresses the issue where Proxy Role Related Persons may not exist in PDS (e.g. when a GP sets up a proxy role via NPS for a carer). By returning proxy details via a Patient resource, VRS avoids the scenario where PDS returns a 404 for a non-existent RelatedPerson, which would previously cause VRS to return an error.
_includeparameter value fromConsent:performertoConsent:granteeacross the sandbox API code (constants.py,utils.py,get_consent.py,get_consent_by_id.py)sandbox/api/examples/andspecification/examples/responses/to reflect the newConsent:granteeinclude behaviour, with grantee includes now returning a Patient resource for the proxy and a RelatedPerson resource for the relationship*-include-performer*to*-include-grantee*naming conventionConsent:performerexample files that are no longer neededvalidated-relationships-service-api.yaml) to documentConsent:granteeas the valid include parameter value, including descriptions, scenario tables, example references, and enum definitionsConsent:granteein place ofConsent:performerConsent:granteeparameter values and reference the renamed example filesDeveloper Testing Carried Out
cd sandbox && python -m pytest api/tests/ -v)GET /ConsentandGET /Consent/{id}endpoints with_include=Consent:grantee,_include=Consent:patient, and both combinedperformer:identifier,patient:identifier, and_includeparamsReviewer Testing Required
cd sandbox && python -m pytest api/tests/ -v- all 103 tests should passGET /Consent?performer:identifier=9000000010&_include=Consent:granteereturns a Bundle with the Consent resource and a Patient resource for the proxyGET /Consent?performer:identifier=9000000010&_include=Consent:grantee&_include=Consent:patientreturns a Bundle with the Consent, Patient (proxy), RelatedPerson (relationship), and Patient (patient) resourcesGET /Consent/{id}?_include=Consent:granteereturns the expected included resources for both consenting adult (74eed847-ca25-4e76-8cf2-f2c2d7842a7a) and mother-child (39df03a2-1b14-4d19-b1dc-d5d8cbf96948) scenariosGET /Consent?performer:identifier=9000000022&_include=Consent:granteereturns multiple relationships with proxy Patient resources included_includevalues (e.g._include=Consent:performer) return HTTP 422 with an INVALID_PARAMETER errorConsent:granteereturn expected responsesConsent:grantee✅ Developer Checklist
NPA-XXXX: <short-description><type>/NPA-XXXX/<short-description>NPA-XXXX: <short-description>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.