-
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
base: main
Are you sure you want to change the base?
Conversation
| modified_doc.document_scan_creation = "2023-05-15" | ||
|
|
||
| patched_service.s3_service.get_file_size.return_value = 8000000 | ||
| # patched_service.s3_service.get_file_size.return_value = 8000000 |
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.
remove?
| response = camelize_dict(document_reference_search_service.get_paginated_references_by_nhs_number( | ||
| nhs_number=nhs_number, limit=limit, next_page_token=next_page_token, filter=doc_status_filter | ||
| )) |
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.
Can you break this down? a bit hard to read
| response = camelize_dict(document_reference_search_service.get_paginated_references_by_nhs_number( | ||
| nhs_number=nhs_number, limit=limit, next_page_token=next_page_token, filter=doc_status_filter | ||
| )) | ||
| else: |
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.
Why are we doing this? Can't we use a default limit like review search?
| def _get_table_name(self, common_name: MtlsCommonNames | None) -> str: | ||
| if not common_name or common_name not in MtlsCommonNames: | ||
| return table_list | ||
| return str(DynamoTables.LLOYD_GEORGE) |
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.
This is StrEnum, why do you need to do this?
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.
changed how we get the table name
| "operator": ConditionOperator.EQUAL.value, | ||
| "value": filter_value, } | ||
| ) | ||
| return build_mixed_condition_expression(conditions) |
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.
format
| "field": DocumentReferenceMetadataFields.DELETED.value, | ||
| "operator": ConditionOperator.NOT_EQUAL.value, | ||
| "value": True |
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.
Isn't delete a timestamp?
| for filter_key, filter_value in filter_values.items(): | ||
| if filter_key == "custodian": | ||
| conditions.append( | ||
| {"field": DocumentReferenceMetadataFields.CURRENT_GP_ODS.value, |
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.
Use Custodian
Code security issues foundView full details here. |
|



Overview
Jira ticket: PRMP-975
Description
Adding pagination capability to Document Reference Search
Context
Checklist
Tasks for all changes:
I have run git pre-commits.(WIP)[ ] 4. I have updated relevant documentation.Deploy - Sandbox- workflow run: mainSANDBOX Full- Deploy feature branch to sandbox- workflow run