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

Bug: Handle Empty RxNorm fields #1199

Merged
merged 2 commits into from
Sep 30, 2024
Merged

Conversation

demariadaniel
Copy link
Contributor

Link to Issue

Feedback for #1194

Description

Disables RxNorm Validation when alternate drug db fields are added

Checklist

Type of Change

  • Bug
  • Refactor
  • New Feature
  • Release Candidate

Checklist before requesting review:

  • Check branch (code change PRs go to develop not master)
  • Check copyrights for new files
  • Manual testing
  • Regression tests completed and passing (double check number of tests).
  • Spelling has been checked.
  • Updated swagger docs accordingly (check it's still valid)
  • Set validationDependency in meta tag for Argo Dictionary fields used in code

// Records using alternate Drug DB fields should skip RxNorm validation
// Drug DB field validation is handled downstream in validation-clinical/therapy.ts
const { drug_database, drug_term, drug_id } = processedRecord;
const hasDrugDbFields = Boolean(drug_database || drug_id || drug_term);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows me to skip rxNormDB validation if I provide any one of these three properties.

Do you have a check elsewhere that ensures if I have one of these fields that i have all of these and none of the rxnorm fields?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is handled by a mix of Dictionary and Clinical validations

Dictionary enforces that either RxNorm or Drug Db are submitted:
https://github.com/icgc-argo/argo-dictionary/pull/437/files#diff-893b20bc0b00b45e9cb1df1d1a13b5cba5dcf4627f2f182f345762618077ac54

Clinical enforces that all 3 Drug Db fields are submitted when RxNorm is blank:
https://github.com/icgc-argo/argo-clinical/pull/1195/files#diff-57392d148ba45d8530fa1789680e51f9398e3b20e910bccf1fa0e95b78445a08R297

Copy link
Member

@joneubank joneubank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 This logic works in conjunction with the scripts on the dictionary, as commented by Dan.

@demariadaniel demariadaniel merged commit 4dee6a9 into master Sep 30, 2024
@demariadaniel demariadaniel deleted the bug/handle-empty-rxnorm branch September 30, 2024 17:48
This was referenced Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants