-
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
Validate "reference_radiation_treatment_id" against previously submitted or currently submitting "submitter_treatment_id" #856
Comments
@hknahal will make a new dictionary in qa and test cases. |
Testing, but unit tests are working properly: |
Bug fix from Dev testing: |
Test cases that fail
Validation passed but expected validation to fail because the submitter_treatment_id submitted in the Expected error message: The submitter_treatment_id "TR-1" submitted in the
Validation passed but expected validation to fail because the submitter_treatment_id submitted in the Expected error message: The |
This feature will be hidden in staging and prod until the issues are fixed. |
Description:
This is related to icgc-argo/argo-dictionary#375
Cross-validation required between Radiation and Treatment tables, specifically the
submitter_donor_id
andreference_radiation_treatment_id
in the Radiation table, and thesubmitter_donor_id
,submitter_treatment_id
andtreatment_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 ifradiation_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
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.treatment_type
=Radiation therapy
).Example of validation that will pass:
Example 1: If
reference_radiation_treatment_id
matches a previous or existingsubmitter_treatment_id
and it is associated withtreatment_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:
Treatment table:
Examples of validations that will fail:
Example 1: If
reference_radiation_treatment_id
does not match a previous or existingsubmitter_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:
Treatment table:
Example 2: If
reference_radiation_treatment_id
matches a previous or existingsubmitter_treatment_id
but it is associated with a different treatment type other thanRadiation 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:
Treatment table:
Example 3: The
reference_radiation_treatment_id
exists in the Treatment table, but it belongs to a different submitter_donor_id. (Thereference_radiation_treatment_id
"TR-5" belongs tosubmitter_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:
Treatment table:
The text was updated successfully, but these errors were encountered: