-
Notifications
You must be signed in to change notification settings - Fork 0
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
Prmdr 180 #83
Conversation
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
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.
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) |
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.
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
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.
It's going to be a string from the UI side; I'll update the readme. Apologies for the confusion
lambdas/README.md
Outdated
|
||
PatientID is an NHS Number | ||
|
||
This is an array and can be set to the following values: |
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.
would it be docType is an array / a string and can be set to the following values:
?
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.
Done
lambdas/README.md
Outdated
|
||
For all docs ["LG", "ARF"] | ||
|
||
If the value is not one of the above speified then a 204 will be returned |
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.
Would it be:
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 |
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.
Done
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}" | ||
) |
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.
would suggest to use os.path.join(service.temp_downloads_dir, MOCK_DOCUMENTS[0].file_name)
here
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.
Smart! Thank you, that check for Windows file system was a bit rubbish :D
lambdas/README.md
Outdated
For just Lloyd George docs ["LG"] | ||
|
||
For just ARF docs ["ARF"] | ||
|
||
For all docs ["LG", "ARF"] |
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.
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`
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.
Documentation has been updated :)
No description provided.