Skip to content

Feature/cdapi 113#93

Open
nhsd-jack-wainwright wants to merge 2 commits intofeature/CDAPI-110from
feature/CDAPI-113
Open

Feature/cdapi 113#93
nhsd-jack-wainwright wants to merge 2 commits intofeature/CDAPI-110from
feature/CDAPI-113

Conversation

@nhsd-jack-wainwright
Copy link
Copy Markdown
Collaborator

Description

Addition of a MNS module to publish events.

Context

This change adds in the functionality to support publishing an event based on a stored Test Result.

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.

@nhsd-jack-wainwright nhsd-jack-wainwright force-pushed the feature/CDAPI-113 branch 2 times, most recently from 29d3332 to 88b96b5 Compare April 9, 2026 13:42
@nhsd-jack-wainwright nhsd-jack-wainwright force-pushed the feature/CDAPI-113 branch 2 times, most recently from 1f514ec to 1415992 Compare April 10, 2026 15:02
@nhsd-rebecca-flynn nhsd-rebecca-flynn force-pushed the feature/CDAPI-111 branch 2 times, most recently from ab0d52c to 405e5b9 Compare April 15, 2026 14:21
Base automatically changed from feature/CDAPI-111 to main April 15, 2026 14:33
@nhsd-jack-wainwright nhsd-jack-wainwright changed the base branch from main to feature/CDAPI-110 April 15, 2026 15:40
@nhsd-jack-wainwright nhsd-jack-wainwright marked this pull request as ready for review April 15, 2026 15:42
@nhsd-jack-wainwright nhsd-jack-wainwright requested review from a team as code owners April 15, 2026 15:42
Copy link
Copy Markdown
Contributor

@neil-sproston neil-sproston left a comment

Choose a reason for hiding this comment

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

Looks sand & proportionate.

Comment thread mocks/src/mns_mock/handler.py Outdated
def _with_default_headers(response: MNSResponse) -> Response[str]:
return Response(
body=json.dumps(response["response"]),
body=json.dumps(response["response"])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would it be better to have single if statement above the return rather than two inline if statements?

if response["response"] is not None:
    body = json.dumps(response["response"])
    headers = {"Content-Type": "application/fhir+json"}
else
    body = None
    headers = None
  

return Response(
    body=body, 
    status_code=response["status_code"], 
    headers=headers
)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good point, updated as suggested

Comment thread pathology-api/src/pathology_api/http.py
@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

Deployment Complete

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