icgc-argo / roadmap

Place to review/request new features and new tools on ICGC-ARGO's roadmap
1 stars 0 forks source link

🐛 - PACA-CA | APGI-AU Program have error message on clinical exception fields #1032

Open bhavikbhagat93 opened 8 months ago

bhavikbhagat93 commented 8 months ago

Description

APGI-AU and PACA-CA program have incorrect error message displayed on fields which has clinical exception.

fields are: Treatment table - treatment_setting field (PACA and APGI) Chemotherapy table - chemotherapy_drug_dose_units field (APGI only)

Potential cause

Fields are not getting validated against execption to to show correct error message

Acceptance criteria

If the program has clinical exception on data dictionary,

  1. while submitting data, data should be validated against dictionary and exceptions
  2. While Showing data, Data should be validated against dictonary and exceptions - to not show incorrect error message
joneubank commented 8 months ago

The cause of this issue appears to be that the clinical exceptions are being applied to submitted data, but those exceptions are not used during data validation on migration. It is correct to run the migration without applying the exceptions, since if the exception is removed we want to know which records are invalid vs the new dictionary.

The change needed is to filter out errors that pass with exceptions when the clinical-errors api is called. This way, we'll never report to the UI about errors that are cleared by the exceptions.

The relevant code to this operation is a function that was added to the submission code to filter out validation errors if an exception existed for that program/entity and field combination: https://github.com/icgc-argo/argo-clinical/blob/develop/src/submission/exceptions/exceptions.ts#L145