Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPA-3543: add initial /Consent endpoint and associated schema refactoring #109

Merged
merged 15 commits into from
Oct 29, 2024

Conversation

miiisterjim
Copy link
Contributor

Ticket Link

https://nhsd-jira.digital.nhs.uk/browse/NPA-3543

Description/Change Summary

These changes to the OAS cover the new /Consent API endpoint required for requesting proxy relationships from VRS. For each proxy relationship, there should be three resources:

  • Consent (filtering possible based on status)
  • RelatedPerson (optional _include in the bundle)
  • Patient (optional _include in the bundle)

Draft requirements can be found in confluence here (along with details of how to map NAM payloads to FHIR resources): https://nhsd-confluence.digital.nhs.uk/display/NPA/Consent+endpoint+requirements

A summary of expected behaviour of the endpoint:

  • Take IM1 connection params in HTTP header in order for VRS to use these against the new NAM endpoint outlined here. Design decision: I've decided to pass these params in a single delimited string that match the regex in order to be explicit about the expectation that these two values should be passed atomically
  • If the IM1 connection params header is not present then VRS should only check it's local cache
  • In case of a cache miss then we should hit the NAM for linked profiles and map these to FHIR resources before caching them and returning the resources requested (in accordance with status and _include query string parameter filters)
  • The performer:identifier parameter should be used for querying the local cache
  • The status parameter should be used for filtering the relationships (based on the consent.status property
  • The _include parameter should be used for including referenced resources

How to test?

No behaviour has been implemented as part of this change. Changes best reviewed in a swagger editor in addition to the raw changes

Of special note, ensure the previous two commits have been correctly incorporated into the spec due to these being merged manually.

Review Checklist

ℹ️ This section is to be filled in by the reviewer.

  • I have reviewed the changes in this PR and they fill all or part of the acceptance criteria of the ticket, and the code is in a mergeable state.
  • If there were infrastructure, operational, or build changes, I have made sure there is sufficient evidence that the changes will work.
  • I have ensured the changelog has been updated by the submitter, if necessary.

Copy link

This branch is work on a ticket in the NHS Digital NPA JIRA Project. Here's a handy link to the ticket:

NPA-3543

Copy link
Contributor

@JackPlowman JackPlowman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left a couple of questions on the PR.
Also it might be worth removing these two lines ->

[*.yaml]
trim_trailing_whitespace = false
. Then whitespace will be removed from the end of lines


## Sandbox test scenarios

For details of sandbox test scenarios, or to try out the sandbox using our 'Try it out' feature, see the documentation for each endpoint.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see the documentation for each endpoint. This comment is self referential as this is the endpoint sandbox section for the /Consent endpoint. Maybe the comment could it be removed or changed

specification/validated-relationships-service-api.yaml Outdated Show resolved Hide resolved
specification/validated-relationships-service-api.yaml Outdated Show resolved Hide resolved
Copy link

This branch is work on a ticket in the NHS Digital NPA JIRA Project. Here's a handy link to the ticket:

NPA-3543

JackPlowman
JackPlowman previously approved these changes Oct 29, 2024
Copy link
Contributor

@JackPlowman JackPlowman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link

This branch is work on a ticket in the NHS Digital NPA JIRA Project. Here's a handy link to the ticket:

NPA-3543

1 similar comment
Copy link

This branch is work on a ticket in the NHS Digital NPA JIRA Project. Here's a handy link to the ticket:

NPA-3543

Copy link
Contributor

@JackPlowman JackPlowman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@JackPlowman
Copy link
Contributor

Ran API tests using make test-api-with-get-token ENVIRONMENT=dev API_SPEC_BRANCH=NPA-3543_add_consent_endpoint_to_OAS with all tests passing
image

@miiisterjim miiisterjim force-pushed the NPA-3543_add_consent_endpoint_to_OAS branch from 78b7af8 to bfdad35 Compare October 29, 2024 12:10
Copy link

This branch is work on a ticket in the NHS Digital NPA JIRA Project. Here's a handy link to the ticket:

NPA-3543

@JackPlowman JackPlowman merged commit 0092e61 into master Oct 29, 2024
9 checks passed
@JackPlowman JackPlowman deleted the NPA-3543_add_consent_endpoint_to_OAS branch October 29, 2024 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants