Skip to content

Conversation

@DWolfsNHS
Copy link
Collaborator

@DWolfsNHS DWolfsNHS commented Jan 15, 2026

Description

This pull request introduces the GpProviderClient class, which provides a simple client for interacting with the GPProvider FHIR GP System. The client includes methods to fetch structured patient records from a GPProvider FHIR API endpoint. Additionally, unit tests and a stub for the GPProvider FHIR API have been implemented to ensure the correctness of the client.

Context

This change is required to enable integration with the GPProvider FHIR GP System, allowing the retrieval of structured patient records. It addresses the need for a robust and reusable client to interact with the GPProvider API, ensuring compliance with the GPConnect specifications.

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming
  • Exceptions/Exclusions to coding standards (e.g. #noqa or #NOSONAR) are included within this Pull Request.

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@DWolfsNHS DWolfsNHS force-pushed the feature/GPCAPIM-251 branch from a73f501 to 89fa638 Compare January 16, 2026 15:49
Copy link
Contributor

@Vox-Ben Vox-Ben left a comment

Choose a reason for hiding this comment

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

Looks good, comments mostly on non-critical stuff. :-)

@DWolfsNHS DWolfsNHS marked this pull request as ready for review January 19, 2026 11:20
@DWolfsNHS DWolfsNHS requested a review from a team as a code owner January 19, 2026 11:20
@DWolfsNHS DWolfsNHS force-pushed the feature/GPCAPIM-251 branch from 2da189a to 2026888 Compare January 19, 2026 15:11
@github-actions
Copy link

ALB Target: arn:aws:elasticloadbalancing:eu-west-2:900119715266:targetgroup/gpcapim-251/70f82f0c23a3968d
Preview URL: https://feature-gpcapim-251.dev.endpoints.clinical-data-gateway.national.nhs.uk

Copy link

@davidhamill1-nhs davidhamill1-nhs left a comment

Choose a reason for hiding this comment

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

Happy with functionality. Some minor comments about style

Same comment as I left with @Vox-Ben , which needs a discussion amongst the team: to what extent do we document in code?


headers = self._build_headers(trace_id)

endpoint_path = "/".join([ars_fhir_base, fhir_resource, ars_fhir_operation])

Choose a reason for hiding this comment

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

Nit: I would say it is easier to parse ...

Suggested change
endpoint_path = "/".join([ars_fhir_base, fhir_resource, ars_fhir_operation])
endpoint_path = f"{ars_fhir_base}/{fhir_resource}/{ars_fhir_operation}"

"""
provider_asid = "200000001154"
consumer_asid = "200000001152"
provider_endpoint = "https://invalid.com"

Choose a reason for hiding this comment

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

Nit: Given the assigned string, I would assume this to be an invalid url.

Suggested change
provider_endpoint = "https://invalid.com"
provider_endpoint = "https://test.com"

@github-actions
Copy link

ALB Target: arn:aws:elasticloadbalancing:eu-west-2:900119715266:targetgroup/gpcapim-251/70f82f0c23a3968d
Preview URL: https://feature-gpcapim-251.dev.endpoints.clinical-data-gateway.national.nhs.uk

3 similar comments
@github-actions
Copy link

ALB Target: arn:aws:elasticloadbalancing:eu-west-2:900119715266:targetgroup/gpcapim-251/70f82f0c23a3968d
Preview URL: https://feature-gpcapim-251.dev.endpoints.clinical-data-gateway.national.nhs.uk

@github-actions
Copy link

ALB Target: arn:aws:elasticloadbalancing:eu-west-2:900119715266:targetgroup/gpcapim-251/70f82f0c23a3968d
Preview URL: https://feature-gpcapim-251.dev.endpoints.clinical-data-gateway.national.nhs.uk

@github-actions
Copy link

ALB Target: arn:aws:elasticloadbalancing:eu-west-2:900119715266:targetgroup/gpcapim-251/70f82f0c23a3968d
Preview URL: https://feature-gpcapim-251.dev.endpoints.clinical-data-gateway.national.nhs.uk

@Vox-Ben
Copy link
Contributor

Vox-Ben commented Jan 23, 2026

You've got one entire line not covered in coverage testing. Also you need to # NOSONAR a line in your stub.

image

@Vox-Ben
Copy link
Contributor

Vox-Ben commented Jan 23, 2026

(I'm fine with 👍 this once the coverage and the sonar issue are sorted)

@github-actions
Copy link

ALB Target: arn:aws:elasticloadbalancing:eu-west-2:900119715266:targetgroup/gpcapim-251/70f82f0c23a3968d
Preview URL: https://feature-gpcapim-251.dev.endpoints.clinical-data-gateway.national.nhs.uk

Copy link
Contributor

@Vox-Ben Vox-Ben left a comment

Choose a reason for hiding this comment

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

LGTM. One or two outstanding things to be discussed next week, but can be picked up as tech debt if we decide to do things differently.

@DWolfsNHS DWolfsNHS force-pushed the feature/GPCAPIM-251 branch from 42041dd to a673938 Compare January 23, 2026 13:16
@github-actions
Copy link

ALB Target: arn:aws:elasticloadbalancing:eu-west-2:900119715266:targetgroup/gpcapim-251/70f82f0c23a3968d
Preview URL: https://feature-gpcapim-251.dev.endpoints.clinical-data-gateway.national.nhs.uk

@DWolfsNHS
Copy link
Collaborator Author

Completed walkthrough with @BJSS-russell-pollock ahead of merging

@sonarqubecloud
Copy link

@DWolfsNHS DWolfsNHS merged commit 5c958ab into main Jan 23, 2026
53 checks passed
@DWolfsNHS DWolfsNHS deleted the feature/GPCAPIM-251 branch January 23, 2026 13:21
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.

3 participants