generated from nhs-england-tools/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 2
feat: Add NHS number search functionality for exceptions and reports #1777
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
Merged
Merged
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
94de5ef
feat: feedback component and scss
Warren-Pitterson e903385
feat: renamed component to UserFeedback and added components to requi…
Warren-Pitterson a04cebd
chore: renamed imports from feedback to UserFeedback
Warren-Pitterson e515277
feat: unused css removed
Warren-Pitterson 2e8f207
feat: input added to UI
Warren-Pitterson 1b38ac3
feat: search page
Warren-Pitterson 956e570
feat: search moved out of header to own component
Warren-Pitterson 14c9550
feat: search function
Warren-Pitterson b58d7e1
feat: fetch updated with fetchExceptionsByNhsNumber endpoint
Warren-Pitterson 17ff964
feat: ValidationExceptionsByNhsNumberResponse
Warren-Pitterson c948b98
feat: GetValidationExceptionsByNhsNumber function added
Warren-Pitterson a186816
feat: added showing item numbers
Warren-Pitterson 498adb0
Merge branch 'main' into feat/DTOSS-10947-UI-Search
Warren-Pitterson a97fb36
feat: Header tidy and search button added
Warren-Pitterson 96f2de2
feat: pagination fixed, reports added, page count made dynamic, respo…
Warren-Pitterson 4b716e7
feat: added missing feedback component from report details page
Warren-Pitterson bdd12ed
feat: generate report logic
Warren-Pitterson 3cb9521
feat: refactor service methods, and calling function, move pagination…
Warren-Pitterson 0157b9d
feat: Error handling
Warren-Pitterson 12834b1
feat: no results card
Warren-Pitterson c022e85
refactor: readonly props, refactor
Warren-Pitterson e1648d8
feat: No Result page added, Conditional display added to input Search…
Warren-Pitterson ee428fe
feat: error handling and redirect
Warren-Pitterson 84ce999
Merge branch 'main' into feat/DTOSS-10947-UI-Search
Warren-Pitterson 3b01ffc
chore: placeholder typo
Warren-Pitterson ac493eb
fix: updated test references
Warren-Pitterson a8495d4
feat: update tests and remove duplicate styling
Warren-Pitterson 739d046
chore: sonarQube Issues
Warren-Pitterson ec7eb9b
feat: used standard component, updated scss
Warren-Pitterson daf3fda
feat: server side rendering on conditionalHeaderSearch Component
Warren-Pitterson 910cf9e
chore: Sonaqube img fix
Warren-Pitterson 2396f50
chore: styling
Warren-Pitterson e40f57e
feat: code tidy and refactor,
Warren-Pitterson 1a18c64
refactor: GetExceptionsWithReportsByNhsNumber refactor, controller re…
Warren-Pitterson 2fd0263
refactor: abstract methods
Warren-Pitterson 799764b
test: unit tests added
Warren-Pitterson 1add645
Merge branch 'main' into feat/DTOSS-10947-UI-Search
Warren-Pitterson a1bbbac
chore: encodeURIComponent
Warren-Pitterson f84bbfe
Merge branch 'feat/DTOSS-10947-UI-Search' of https://github.com/NHSDi…
Warren-Pitterson e173121
fix: removed wrong ExceptionCategory
Warren-Pitterson 497e017
fix: type needed for all
Warren-Pitterson 9dcac24
fix: NhsNumber logging removed
Warren-Pitterson 4f7afd5
refactor: addressing PR comments, removed logging, changed return typ…
Warren-Pitterson b2d1f60
fix: mapping
Warren-Pitterson 912b4da
fix: ISO string causing incorrect date to be parsed for some records
Warren-Pitterson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
application/CohortManager/src/Functions/Shared/Common/Pagination/IPaginationService.cs
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
1 change: 1 addition & 0 deletions
1
application/CohortManager/src/Functions/Shared/Common/Pagination/PaginationService.cs
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
10 changes: 8 additions & 2 deletions
10
application/CohortManager/src/Functions/Shared/Data/Database/IValidationExceptionData.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,21 @@ | ||
| namespace Data.Database; | ||
|
|
||
| using System; | ||
| using System.Linq.Expressions; | ||
| using System.Threading.Tasks; | ||
| using Common; | ||
| using Model; | ||
| using Model.DTO; | ||
| using Model.Enums; | ||
|
|
||
| public interface IValidationExceptionData | ||
| { | ||
| Task<bool> Create(ValidationException exception); | ||
| Task<List<ValidationException>?> GetFilteredExceptions(ExceptionStatus? exceptionStatus, SortOrder? sortOrder, ExceptionCategory exceptionCategory); | ||
| Task<List<ValidationException>> GetFilteredExceptions(ExceptionStatus? exceptionStatus, SortOrder? sortOrder, ExceptionCategory exceptionCategory); | ||
| Task<ValidationException?> GetExceptionById(int exceptionId); | ||
| Task<bool> RemoveOldException(string nhsNumber, string screeningName); | ||
| Task<ServiceResponseModel> UpdateExceptionServiceNowId(int exceptionId, string serviceNowId); | ||
| Task<List<ValidationException>?> GetReportExceptions(DateTime? reportDate, ExceptionCategory exceptionCategory); | ||
| Task<List<ValidationException>> GetReportExceptions(DateTime? reportDate, ExceptionCategory exceptionCategory); | ||
| Task<List<ExceptionManagement>> GetByFilter(Expression<Func<ExceptionManagement, bool>> filter); | ||
| Task<ValidationExceptionsByNhsNumberResponse> GetExceptionsWithReportsByNhsNumber(string nhsNumber); | ||
| } |
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
4 changes: 2 additions & 2 deletions
4
...red/Common/Pagination/PaginationResult.cs → ...ions/Shared/Model/DTO/PaginationResult.cs
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
21 changes: 21 additions & 0 deletions
21
...n/CohortManager/src/Functions/Shared/Model/DTO/ValidationExceptionsByNhsNumberResponse.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| namespace Model.DTO; | ||
|
|
||
| using Model.Pagination; | ||
|
|
||
| /// <summary> | ||
| /// Response model for NHS number search containing paginated exceptions and associated reports | ||
| /// </summary> | ||
| public class ValidationExceptionsByNhsNumberResponse | ||
| { | ||
| public string NhsNumber { get; set; } = string.Empty; | ||
| public List<ValidationException> Exceptions { get; set; } = []; | ||
| public List<ValidationExceptionReport> Reports { get; set; } = []; | ||
| public PaginationResult<ValidationException> PaginatedExceptions { get; set; } = new() { Items = [] }; | ||
| } | ||
|
|
||
| public class ValidationExceptionReport | ||
| { | ||
| public DateTime ReportDate { get; set; } | ||
| public int? Category { get; set; } | ||
| public int ExceptionCount { get; set; } | ||
| } |
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
18 changes: 18 additions & 0 deletions
18
application/CohortManager/src/Web/app/components/conditionalHeaderSearch.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| interface ConditionalHeaderSearchProps { | ||
| readonly children: React.ReactNode; | ||
| readonly pathname: string; | ||
| } | ||
|
|
||
| export function ConditionalHeaderSearch({ | ||
| children, | ||
| pathname, | ||
| }: ConditionalHeaderSearchProps) { | ||
| const isNoResultsPage = pathname === "/exceptions/noResults"; | ||
|
|
||
| // Don't render the header search if we're on the no results page | ||
| if (isNoResultsPage) { | ||
| return null; | ||
| } | ||
|
|
||
| return <>{children}</>; | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.