-
Notifications
You must be signed in to change notification settings - Fork 1
[PRMP-975] Document Search Results Backend - Pagination #992
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
Open
steph-torres-nhs
wants to merge
26
commits into
main
Choose a base branch
from
PRMP-975
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
0904a5b
[PRMP-975] add util to extract relevant querystring params
steph-torres-nhs d6a88c5
[PRMP-975] remove functionality of searching multiple tables
steph-torres-nhs e7d8076
Merge branch 'main' into PRMP-975
steph-torres-nhs 0aae733
[PRMP-975] extract limit from querystring
steph-torres-nhs 65e3deb
[PRMP-975] add pagination to doc ref search service
steph-torres-nhs 50a322b
[PRMP-975] add query with pagination to doc ref search
steph-torres-nhs 44d0f47
[PRMP-975] amend how filter is handled
steph-torres-nhs ed30447
[PRMP-975] update lg dynamo mock response
steph-torres-nhs 7ff97f9
[PRMP-975] update lg dynamo mock response
steph-torres-nhs 45ce75d
[PRMP-975] add filter build helper
steph-torres-nhs 21135cd
[PRMP-975] camelize response
steph-torres-nhs 47520bb
[PRMP-975] add test
steph-torres-nhs a360b9e
Merge branch 'main' into PRMP-975
steph-torres-nhs 0968a90
[PRMP-975] address PR comments
steph-torres-nhs 402ac05
[PRMP-975] format
steph-torres-nhs f86d414
[PRMP-975] adjust filter expression
steph-torres-nhs 887bebb
[PRMP-975] change getDocSearchResults response object
steph-torres-nhs e3f19ed
[PRMP-975] check 204 response, upload complete filter
steph-torres-nhs 1bbf5ad
Merge branch 'main' into PRMP-975
steph-torres-nhs c2f10ff
Merge branch 'main' into PRMP-975
steph-torres-nhs 176fb90
[PRMP-975] amend stubbed response e2e tests
steph-torres-nhs bbd75fd
[PRMP-975] update branch, resolve conflicts
steph-torres-nhs 42f5a3a
[PRMP-975] refactor test
steph-torres-nhs 67a41f8
[PRMP-975] format
steph-torres-nhs d8dd9ee
[PRMP-975] only return upload compelete document references
steph-torres-nhs bc727ca
[PRMP-975] remove redundant response
steph-torres-nhs 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
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
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
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
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
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 |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ export type DocumentSearchResultsArgs = { | |
| }; | ||
|
|
||
| export type GetDocumentSearchResultsResponse = { | ||
| data: Array<SearchResult>; | ||
| references: Array<SearchResult>; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. arn't you missing nextPageToken here? |
||
| }; | ||
|
|
||
| const getDocumentSearchResults = async ({ | ||
|
|
@@ -26,16 +26,17 @@ const getDocumentSearchResults = async ({ | |
| const gatewayUrl = baseUrl + endpoints.DOCUMENT_SEARCH; | ||
|
|
||
| try { | ||
| const response: GetDocumentSearchResultsResponse = await axios.get(gatewayUrl, { | ||
| const { data } = await axios.get<GetDocumentSearchResultsResponse>(gatewayUrl, { | ||
| headers: { | ||
| ...baseHeaders, | ||
| }, | ||
| params: { | ||
| patientId: nhsNumber?.replaceAll(/\s/g, ''), // replace whitespace | ||
| docType: docType == DOCUMENT_TYPE.ALL ? undefined : docType, | ||
| limit: 9999, | ||
| }, | ||
| }); | ||
| return response?.data; | ||
| return data.references; | ||
| } catch (e) { | ||
| if (isLocal) { | ||
| return [ | ||
|
|
||
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 |
|---|---|---|
|
|
@@ -15,3 +15,5 @@ class AttributeOperator(Enum): | |
| class ConditionOperator(Enum): | ||
| OR = "|" | ||
| AND = "&" | ||
| EQUAL = "=" | ||
| NOT_EQUAL = "<>" | ||
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need references property here