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

Validate "reference_radiation_treatment_id" against previously submitted or currently submitting "submitter_treatment_id" #856

Closed
hknahal opened this issue Nov 30, 2022 · 9 comments
Assignees
Labels
blocker This issue is blocking another Dictionary 1.18 feature-hidden Feature is hidden behind a feature flag. This needs to be removed to test.

Comments

@hknahal
Copy link

hknahal commented Nov 30, 2022

Description:

This is related to icgc-argo/argo-dictionary#375
Cross-validation required between Radiation and Treatment tables, specifically the submitter_donor_id and reference_radiation_treatment_id in the Radiation table, and the submitter_donor_id, submitter_treatment_id and treatment_type fields in the Treatment table.

Background:

Two new optional fields will be added to the "Radiation" schema:
radiation_boost
reference_radiation_treatment_id

The reference_radiation_treatment_id is only required if radiation_boost = Yes (this is taken care by validation script). The field tells us which treatment the radiation boost was linked to.

Requirements for reference_radiation_treatment_id

  • The reference_radiation_treatment_id requires a submitter_treatment_id that has either been submitted previously in the Radiation table or is currently being submitted in the Radiation table.
  • The submitted submitter_treatment_id must belong to the same submitter_donor_id
  • The submitted submitter_treatment_id must be associated with radiation treatment (ie. treatment_type = Radiation therapy).

Example of validation that will pass:

Example 1: If reference_radiation_treatment_id matches a previous or existing submitter_treatment_id and it is associated with treatment_type = Radiation therapy, then validation will pass.

Test files
sample_registration.txt
donor.txt
primary_diagnosis.txt
chemotherapy.txt
radiation_pass.txt
treatment_pass.txt

The submitter_treatment_id "TR-4" submitted in the reference_radiation_treatment_id exists in the Treatment table.

Radiation table:
radiation_pass

Treatment table:
radiation_treatment_pass

Examples of validations that will fail:

Example 1: If reference_radiation_treatment_id does not match a previous or existing submitter_treatment_id, then validation will fail with an error message ("The submitter_treatment_id submitted in the "reference_radiation_treatment_id" field does not exist.")

Test files:
sample_registration.txt
donor.txt
primary_diagnosis.txt
chemotherapy.txt
radiation_fail1.txt
treatment_fail1.txt

The submitter_treatment_id "TR-9" submitted in the reference_radiation_treatment_id does not exist in the Treatment table.

Radiation table:
radiation_fail1

Treatment table:
radiaton_treatment_fail1

Example 2: If reference_radiation_treatment_id matches a previous or existing submitter_treatment_id but it is associated with a different treatment type other than Radiation therapy, then validation will fail with an error message ("The submitter_treatment_id submitted in the "reference_radiation_treatment_id" field is not for radiation treatment.")

Test files:
sample_registration.txt
donor.txt
primary_diagnosis.txt
chemotherapy.txt
radiation_fail2.txt
treatment_fail2.txt

The submitter_treatment_id "TR-1" submitted in the reference_radiation_treatment_id is not associated with radiation treatment in the Treatment table (it is for Chemotherapy)

Radiation table:
radiation_fail2

Treatment table:
radiation_treatment_fail2

Example 3: The reference_radiation_treatment_id exists in the Treatment table, but it belongs to a different submitter_donor_id. (The reference_radiation_treatment_id "TR-5" belongs to submitter_donor_id "DN425", not "DN290"). This should fail validation.

Test files:
sample_registration.txt
donor.txt
primary_diagnosis.txt
chemotherapy.txt
radiation_fail3.txt
treatment_fail3.txt

Radiation table:
radiation_fail3

Treatment table:
radiation_treatment_fail3

@puneet-oicr
Copy link

Dev needed from the clinical submission side. @Buwujiu @b-f-chan - who can we assign this to?
Release pending till we get a validation in.

@Buwujiu
Copy link
Contributor

Buwujiu commented Apr 5, 2023

@hknahal will make a new dictionary in qa and test cases.

@demariadaniel
Copy link
Contributor

Testing, but unit tests are working properly:
#928

@demariadaniel
Copy link
Contributor

Bug fix from Dev testing:
#1008

@hknahal
Copy link
Author

hknahal commented Jul 26, 2023

Test cases that fail

  1. Tested "Example 2" from Examples of validations that will fail from above on QA using TEST-GR

Validation passed but expected validation to fail because the submitter_treatment_id submitted in the reference_radiation_treatment_id is not for radiation treatment. Instead it is for chemotherapy treatment.
radiation_example3
treatment_example3

Expected error message: The submitter_treatment_id "TR-1" submitted in the reference_radiation_treatment_id field is not for radiation treatment in the Treatment table

  1. Tested "Example 3" from Examples of validations that will fail from above on QA using TEST-GR

Validation passed but expected validation to fail because the submitter_treatment_id submitted in the reference_radiation_treatment_id field does not belong to the same submitter_donor_id
radiation_example4
treatment_example4

Expected error message: The reference_radiation_treatment_id "TR-5" belongs to submitter_donor_id DN425, not DN290

@Buwujiu
Copy link
Contributor

Buwujiu commented Aug 8, 2023

This feature will be hidden in staging and prod until the issues are fixed.

@Buwujiu Buwujiu added the feature-hidden Feature is hidden behind a feature flag. This needs to be removed to test. label Aug 8, 2023
@demariadaniel
Copy link
Contributor

Tested and working on localhost:
Screenshot 2023-08-09 at 11.36.00 AM.png

@demariadaniel
Copy link
Contributor

Screenshot 2023-08-09 at 11.33.43 AM.png

@hknahal
Copy link
Author

hknahal commented Aug 17, 2023

This feature will be hidden in staging and prod until the issues are fixed.

Tested in Staging using TEST-CA by submitting radiation file with the reference_radiation_treatment_id and radiation_boost fields. Validation failed as expected. Confirmed feature is hidden in Staging
radiation_test-ca

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker This issue is blocking another Dictionary 1.18 feature-hidden Feature is hidden behind a feature flag. This needs to be removed to test.
Projects
None yet
Development

No branches or pull requests

6 participants