From 56f87ffec8173463ecf3dda1012ae4fa968add3c Mon Sep 17 00:00:00 2001 From: Alexis Lucattini Date: Sun, 13 Aug 2023 13:59:32 +1000 Subject: [PATCH] Flip validation and/or logic to determine if sample is validation Cater for situation where sample is clinical but not in redcap Cater for situation where sample is validation in redcap, but not in GLIMS. --- deploy/cttso-ica-to-pieriandx-cdk/Changelog.md | 3 ++- .../lambda_code.py | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/deploy/cttso-ica-to-pieriandx-cdk/Changelog.md b/deploy/cttso-ica-to-pieriandx-cdk/Changelog.md index 2c925fb..be2bc18 100644 --- a/deploy/cttso-ica-to-pieriandx-cdk/Changelog.md +++ b/deploy/cttso-ica-to-pieriandx-cdk/Changelog.md @@ -10,9 +10,10 @@ are nested under deploy/cttso-ica-to-pieriandx-cdk. * Updated submission columns -### Hot fix +### Hot fixes * Updated submission column [#124](https://github.com/umccr/cttso-ica-to-pieriandx/pull/124) (fixes [#123](https://github.com/umccr/cttso-ica-to-pieriandx/issues/123)) +* Update is_validation logic [#127](https://github.com/umccr/cttso-ica-to-pieriandx/pull/127) (fixes [#126](https://github.com/umccr/cttso-ica-to-pieriandx/issues/126)) ## 2023-08-09 diff --git a/deploy/cttso-ica-to-pieriandx-cdk/lambdas/launch_available_payloads_and_update_cttso_lims_sheet/lambda_code.py b/deploy/cttso-ica-to-pieriandx-cdk/lambdas/launch_available_payloads_and_update_cttso_lims_sheet/lambda_code.py index 0767801..17afd73 100644 --- a/deploy/cttso-ica-to-pieriandx-cdk/lambdas/launch_available_payloads_and_update_cttso_lims_sheet/lambda_code.py +++ b/deploy/cttso-ica-to-pieriandx-cdk/lambdas/launch_available_payloads_and_update_cttso_lims_sheet/lambda_code.py @@ -243,10 +243,10 @@ def get_libraries_for_processing(merged_df) -> pd.DataFrame: to_process_df["is_validation_sample"] = to_process_df.apply( lambda x: True if x.glims_is_validation is True - and ( - pd.isnull(x.redcap_is_complete) or - not x.redcap_is_complete.lower() == "complete" - or x.redcap_sample_type.lower() == "validation" + or ( + not pd.isnull(x.redcap_is_complete) + and x.redcap_is_complete.lower() == "complete" + and x.redcap_sample_type.lower() == "validation" ) else False, axis="columns"