feat: DTOSS-12464 remove dummy gp code screen#1878
Open
hardik-desai-nhs wants to merge 7 commits intomainfrom
Open
feat: DTOSS-12464 remove dummy gp code screen#1878hardik-desai-nhs wants to merge 7 commits intomainfrom
hardik-desai-nhs wants to merge 7 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new “Remove Dummy GP Code” user flow to the Cohort Manager web app, including a new route and server action for submitting removal requests to an external API, and updates the home/overview to surface the new capability while improving exceptions-card loading via Suspense.
Changes:
- Introduces
/remove-dummy-gp-codepage with a client form + server action + Zod validation + tests. - Updates overview home page to stream exception card data using Suspense and parallel exception fetches; adds a new “Dummy GP Code” section.
- Enhances card components to support optional numeric values and a loading shimmer state; adjusts test step to read the card number reliably.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| application/CohortManager/src/Web/tsconfig.json | Switches JSX emit to react-jsx. |
| application/CohortManager/src/Web/tests/features/steps/steps.ts | Improves card-number extraction/assertion in Playwright step. |
| application/CohortManager/src/Web/app/remove-dummy-gp-code/page.tsx | Adds the new route page and success panel handling via searchParams. |
| application/CohortManager/src/Web/app/lib/removeDummyGpCode.ts | Adds server action: form parsing, Zod validation, API call + response handling. |
| application/CohortManager/src/Web/app/lib/removeDummyGpCode.test.ts | Adds unit tests for server action behaviors and request payload. |
| application/CohortManager/src/Web/app/lib/formValidationSchemas.ts | Adds removeDummyGpCodeSchema with NHS number, DOB, and ServiceNow ticket validation. |
| application/CohortManager/src/Web/app/lib/formValidationSchemas.test.ts | Adds schema unit tests for removeDummyGpCodeSchema. |
| application/CohortManager/src/Web/app/globals.scss | Adds shimmer animation styling for loading card placeholders. |
| application/CohortManager/src/Web/app/components/removeDummyGpCodeForm.tsx | Adds client form component using useActionState, inline errors, and value preservation. |
| application/CohortManager/src/Web/app/components/overviewData.tsx | New async component to fetch exception counts in parallel and render cards (or error). |
| application/CohortManager/src/Web/app/components/overview.tsx | Refactors overview to use Suspense + skeleton cards; adds “Dummy GP Code” section. |
| application/CohortManager/src/Web/app/components/cardGroup.tsx | Extends card group items to allow optional value and loading. |
| application/CohortManager/src/Web/app/components/card.tsx | Updates card rendering for optional value and loading shimmer; adjusts clickability logic. |
| application/CohortManager/src/Web/.env.tests | Adds REMOVE_DUMMY_GP_CODE_API_URL for tests. |
| application/CohortManager/src/Web/.env.example | Documents REMOVE_DUMMY_GP_CODE_API_URL in example env file. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Warren-Pitterson
approved these changes
Apr 2, 2026
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
implement DTOSS-12464. add new screen to request remove dummy GP code.
Key changes:
/remove-dummy-gp-codewith an NHS-styled form collecting NHS Number, Forename, Surname, Date of Birth, and ServiceNow Ticket Numberapp/lib/removeDummyGpCode.ts) that validates input via Zod, calls theRemoveDummyGPCodeAPI endpoint, and handles 202/400/error responsesapp/lib/formValidationSchemas.ts) with NHS Number checksum validation, ServiceNow ticket format, and date-of-birth assembly from day/month/year fieldsapp/components/removeDummyGpCodeForm.tsx) usinguseActionStatefor progressive enhancement, inline field-level errors, error summary, and form value preservation on failurevalueand aloadingshimmer stateContext
Adds a new Remove Dummy GP Code screen to the Cohort Manager web application, allowing users to submit a request to remove a dummy GP practice code from a participant record. Also improves the overview/home page by introducing Suspense-based streaming for exception card data and parallelising the fetch calls.
Type of changes
Checklist
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.
##Test Evidence