Skip to content

Conversation

@SamAinsworth-NHS
Copy link
Contributor

@SamAinsworth-NHS SamAinsworth-NHS commented Nov 25, 2025

Description

  • Remove deprecated ServiceNowCohortLookup Azure Function and all related assets (project, Dockerfile, host/config, solution entry, and unit tests).
  • Integrate ServiceNow case status update into Cohort Distribution flow via new activity in DistributeParticipant (updates case status on arrival into distribution).
  • Update application compose and configuration to reflect removal and new dependency wiring.
  • Adjust Terraform environment .tfvars to drop lookup function references and add the new required data service setting.
  • Add targeted unit tests for the new ServiceNow case status update behavior; remove obsolete tests for the deleted function.

Key changes by area:

  • Functions: deleted ServiceNowIntegration/ServiceNowCohortLookup/*; updated CohortDistributionServices/DistributeParticipant/* to include DistributeParticipantActivities and config wiring.
  • Infrastructure: updated infrastructure/tf-core/environments/*.tfvars and cleaned solution Functions.sln.
  • Tests: added UpdateServiceNowCaseStatusTests.cs; updated DistributeParticipant tests; removed ServiceNowCohortLookupTests.

Deployment notes:

  • This removes a deployed Azure Function. Ensure any external references to ServiceNowCohortLookup are retired before deploy.
  • Apply Terraform with updated *.tfvars to propagate the new data service setting across environments.

Context

  • The standalone ServiceNow cohort lookup function is no longer required and duplicated responsibility with the distribution pipeline.
  • Consolidating ServiceNow interactions within the Cohort Distribution flow reduces operational surface area, simplifies infrastructure, and removes an extra Function app/container to maintain.
  • Adding a direct status update on cohort arrival improves data freshness and aligns with expected ServiceNow workflow.

https://nhsd-jira.digital.nhs.uk/browse/DTOSS-11408

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 am familiar with the contributing guidelines
  • 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

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.

@SamAinsworth-NHS SamAinsworth-NHS changed the title Chore/dtoss 11408 remove service now cohort lookup function chore: dtoss 11408 remove service now cohort lookup function Nov 25, 2025
@SamAinsworth-NHS SamAinsworth-NHS changed the title chore: dtoss 11408 remove service now cohort lookup function chore: DTOSS-11408 remove service now cohort lookup function Nov 25, 2025
@github-actions
Copy link

github-actions bot commented Nov 25, 2025

Unit Test Results

✔️ Tests 891 / 891 - passed in 67.1s
📝 Coverage 46.82%
📏 4484 / 9822 lines covered 🌿 1087 / 2076 branches covered
🔍 click here for more details

✏️ updated for commit 22abe3a

@NHSDigital NHSDigital deleted a comment from github-actions bot Nov 26, 2025
…p-function; keep ServiceNowCohortLookupTests deleted per branch scope
@SamAinsworth-NHS SamAinsworth-NHS marked this pull request as ready for review December 1, 2025 11:41
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 1, 2025

@rfk-nc rfk-nc marked this pull request as draft December 12, 2025 09:22
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