Skip to content
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

Prmdr 180 #83

Merged
merged 20 commits into from
Oct 16, 2023
Merged

Prmdr 180 #83

merged 20 commits into from
Oct 16, 2023

Conversation

AlexHerbertNHS
Copy link
Contributor

No description provided.

thisusernameisnowtaken and others added 16 commits October 5, 2023 14:52
Adding explicit import for proper compiling
Fixing test so it can be run by Windows users
finished on the code; need to rework a few tests due to refactoring
Adding more tests, some renaming, some refactoring, some import cleanup
Finished testing the Manifest Dynamo Service
Small cleanup, removing unnecessary comments and imports
Fix for existing tests
More test fixes
Adding final bits for comprehensive unit tests
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 10, 2023 10:05 — with GitHub Actions Inactive
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 10, 2023 10:05 — with GitHub Actions Inactive
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 10, 2023 10:05 — with GitHub Actions Inactive
Making changes and refactors as per code review
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 10, 2023 14:47 — with GitHub Actions Inactive
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 10, 2023 14:47 — with GitHub Actions Inactive
fixes for tests based on code review changes
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 10, 2023 15:19 — with GitHub Actions Inactive
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 10, 2023 15:19 — with GitHub Actions Inactive
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 11, 2023 08:35 — with GitHub Actions Inactive
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 11, 2023 08:35 — with GitHub Actions Inactive
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 11, 2023 08:35 — with GitHub Actions Inactive
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 11, 2023 08:35 — with GitHub Actions Inactive
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 11, 2023 10:01 — with GitHub Actions Inactive
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to test October 11, 2023 10:02 — with GitHub Actions Inactive
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 11, 2023 10:02 — with GitHub Actions Inactive
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 11, 2023 10:02 — with GitHub Actions Inactive
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 11, 2023 10:02 — with GitHub Actions Inactive
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 11, 2023 10:02 — with GitHub Actions Inactive
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to test October 11, 2023 10:02 — with GitHub Actions Inactive
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to test October 11, 2023 10:02 — with GitHub Actions Inactive
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 11, 2023 10:02 — with GitHub Actions Inactive
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to test October 11, 2023 10:02 — with GitHub Actions Inactive
Changing doctype validation logic and adding test as per code review
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 11, 2023 10:59 — with GitHub Actions Inactive
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 11, 2023 10:59 — with GitHub Actions Inactive
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 11, 2023 10:59 — with GitHub Actions Inactive
Copy link
Contributor

@joefong-nhs joefong-nhs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good to me, gave some minor suggestions


documents = lg_documents + ds_documents
dynamo_service = ManifestDynamoService()
documents = dynamo_service.discover_uploaded_documents(nhs_number, doc_type)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want this doc_type to be a string or an array?
Because in Readme it says For all docs ["LG", "ARF"], but the variable we pass into discover_uploaded_documents is a str

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's going to be a string from the UI side; I'll update the readme. Apologies for the confusion


PatientID is an NHS Number

This is an array and can be set to the following values:
Copy link
Contributor

@joefong-nhs joefong-nhs Oct 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it be docType is an array / a string and can be set to the following values: ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


For all docs ["LG", "ARF"]

If the value is not one of the above speified then a 204 will be returned
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be:

Suggested change
If the value is not one of the above speified then a 204 will be returned
If the value is not one of the above specified then a 400 Bad Request response will be returned

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment on lines 113 to 120
if is_windows():
expected_download_path = (
f"{service.temp_downloads_dir}\\{MOCK_DOCUMENTS[0].file_name}"
)
else:
expected_download_path = (
f"{service.temp_downloads_dir}/{MOCK_DOCUMENTS[0].file_name}"
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would suggest to use os.path.join(service.temp_downloads_dir, MOCK_DOCUMENTS[0].file_name) here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smart! Thank you, that check for Windows file system was a bit rubbish :D

Comment on lines 240 to 244
For just Lloyd George docs ["LG"]

For just ARF docs ["ARF"]

For all docs ["LG", "ARF"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from the implementation and tests, seems to me that options of docType that we support are LG, ARF or both of them connected by a comma
would it be good to give example so that it is clear on what the lambda expect?

For just Lloyd George docs: `/DocumentManifest?docType=LG`

For just ARF docs: `/DocumentManifest?docType=ARF`

For both LG and ARF docs: `/DocumentManifest?docType=LG,ARF`

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation has been updated :)

@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 12, 2023 09:12 — with GitHub Actions Inactive
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 12, 2023 09:12 — with GitHub Actions Inactive
Changes as per code review
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 16, 2023 08:54 — with GitHub Actions Inactive
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 16, 2023 08:54 — with GitHub Actions Inactive
@AlexHerbertNHS AlexHerbertNHS temporarily deployed to development October 16, 2023 08:54 — with GitHub Actions Inactive
@AlexHerbertNHS AlexHerbertNHS merged commit d2a43ae into main Oct 16, 2023
16 checks passed
@richbyrne-nhs richbyrne-nhs deleted the PRMDR-180 branch November 20, 2023 10:32
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.

4 participants