-
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
PRMP - 763 Update patient ods using batchupdate script #413
Closed
Closed
Changes from 17 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
7303998
[PRMP-763] create new handler to update patient ods codes
steph-torres-nhs 5eef058
[PRMP-763] create test file for new service
steph-torres-nhs f69c164
[PRMP-763] update handler to call batchupdate
steph-torres-nhs b35cb85
[PRMP-763] update github actions to include new lambda handler
steph-torres-nhs 6c10d89
[PRMP-763] add init file to scripts
steph-torres-nhs 94f08ae
[PRMP-763] move batch update ods code into services
steph-torres-nhs 22b1842
[PRMP-763] rename function in update_patient_ods_handler
steph-torres-nhs de49351
[PRMP-763] add os env for dynamo table
steph-torres-nhs 8b185f6
[PRMP-763] add logger to batchupdate
steph-torres-nhs 98af62d
[PRMP-763] add test cases for changed logic in batchupdate
steph-torres-nhs 759f8be
[PMRP-763] add tests for new logic added to BatchUpdate get_updated_g…
steph-torres-nhs ac2bb2f
[PRMP-763] format and refactor
abid-nhs 7362db8
[PRMP-763] Adjusted ODS code logic for formally vs informally decease…
AndyFlintAnswerDigital 44c9cb6
[PRMP-763] batch ODS code update uses stubbed PDS and handles HTTP er…
AndyFlintAnswerDigital f66ff88
[PRMP-763] added missing SSMService object for PDS service
AndyFlintAnswerDigital f53b255
[PRMP-763] fixed HTTPError's reference to status_code
AndyFlintAnswerDigital b5f65fa
[PRMP-763] Addressing Sonarcloud linting
AndyFlintAnswerDigital bb6760f
[PRMP-763] removed unused environment variables
AndyFlintAnswerDigital 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 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 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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
|
||
class PatientOdsInactiveStatus(StrEnum): | ||
RESTRICTED = "REST" | ||
SUSPENDED = "SUSP" | ||
DECEASED = "DECE" | ||
|
||
|
This file contains 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,34 @@ | ||
import os | ||
import tempfile | ||
|
||
from services.batch_update_ods_code import BatchUpdate | ||
from utils.audit_logging_setup import LoggingService | ||
from utils.decorators.ensure_env_var import ensure_environment_variables | ||
from utils.decorators.override_error_check import override_error_check | ||
from utils.decorators.set_audit_arg import set_request_context_for_logging | ||
|
||
logger = LoggingService(__name__) | ||
|
||
|
||
@set_request_context_for_logging | ||
@ensure_environment_variables( | ||
names=[ | ||
"APPCONFIG_APPLICATION", | ||
"APPCONFIG_CONFIGURATION", | ||
"APPCONFIG_ENVIRONMENT", | ||
"LLOYD_GEORGE_DYNAMODB_NAME", | ||
NogaNHS marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"PDS_FHIR_IS_STUBBED", | ||
] | ||
) | ||
@override_error_check | ||
def lambda_handler(event, context): | ||
table_name = os.environ["LLOYD_GEORGE_DYNAMODB_NAME"] | ||
tempdir = tempfile.mkdtemp() | ||
filename = "batch_update_progress.json" | ||
|
||
batch_update = BatchUpdate( | ||
table_name=table_name, | ||
progress_store_file_path=f"{tempdir}/{filename}", | ||
) | ||
|
||
batch_update.main() |
This file contains 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
Empty file.
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.
needed?
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.
@NogaNHS can you provide context for this please? Why does this stand out to you?
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.
We use app config for feature flags, and this lambda doesn't use any. (Maybe it should?)