icgc-argo / argo-dictionary

Development of the ARGO Data Dictionary
https://docs.icgc-argo.org/dictionary
GNU Affero General Public License v3.0
2 stars 1 forks source link

Exceptions validation script changes #408

Closed hknahal closed 1 year ago

hknahal commented 1 year ago

Related to https://github.com/icgc-argo/argo-dictionary/issues/407

Updated validation scripts for fields that are conditional on fields that could have exception values ("not applicable" or "unknown").

Summary

Updated validation script for lymph_nodes_examined_method:

Updated validation script for tumour_grade:

hknahal commented 1 year ago

Tested in QA using TEST-CA

  1. Submitted tumour_grading_system = Not applicable and tumour_grade = G3. This fails validation as expected and returns a more clear message indicating that tumour_grade can only be Not applicable. specimen_error_ok

  2. Submitted enum value from dictionary for lymph_nodes_examined_method when there is an exception value (Unknown) for lymph_nodes_examined_status. This correctly displays an error message indicating that lymph_nodes_examined_method should not be submitted if lymph_nodes_examined_status = Unknown: pd_error_ok

joneubank commented 1 year ago

@hknahal Your changes look good, but I just want to confirm with you that for this to work both fields would need to have an exception provided... ie. lymph_nodes_examined_status and lymph_nodes_examined_method have been given the same exception value.

If we are agreed about that then this can proceed.

hknahal commented 1 year ago

Thanks @joneubank. Yes agreed, both fields (ie. lymph_nodes_examined_status and lymph_nodes_examined_method) would need the same exception value.