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

FDA SPL Product to Substance (Active/Inactive/Moiety) #158

Merged
merged 4 commits into from
Sep 27, 2022

Conversation

jrlegrand
Copy link
Member

Resolves #79

Explanation

Added FDA SPL inactive ingredient, active ingredient, and active moiety staging tables/views.

Rationale

To support the Purdue research use case.

Tests

Ran DAG several times. Tested a query.

select * 
from flatfile.mthspl_product_to_inactive_ingredient
where product_rxcui in (
	select distinct product_rxcui
	from flatfile.mthspl_product_to_active_ingredient
   	where lower(active_ingredient_name) in('cetirizine', 'cetirizine hydrochloride')
)

@jrlegrand
Copy link
Member Author

@Bridg109 - NOTE: I was getting some errors from the api-rxnorm-ingredient step of the rxnorm_full DAG but I think it's unrelated to my build in this PR.

@jrlegrand jrlegrand changed the title Jrlegrand/mthspl rxnorm FDA SPL Product to Substance (Active/Inactive/Moiety) Aug 31, 2022
Copy link
Collaborator

@Bridg109 Bridg109 left a comment

Choose a reason for hiding this comment

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

This PR runs and returns data that looks like it should be useful to the researcher.

The one thing I would suggest it to change to TRUNCATE tables methods, instead of DROP TABLE. This will add benefit as we don't need to cascade which might cause issues on API and it also allows us to do append data as needed. See NADAC PR for an example

@Bridg109
Copy link
Collaborator

Should we consider adding in a API for 11 digit NDC for the active and inactive ingredient? Since we have the info seems like a quick thing to add the API

@Bridg109
Copy link
Collaborator

we should also set a start date so this runs with out us triggering it.

@Bridg109
Copy link
Collaborator

Could also consider merging the read sql functions into a for loop like done in NADAC. If we start trimming these then making a class and implementing will be easier...or maybe we just wait till we make the class

@Bridg109
Copy link
Collaborator

Could consider merging the api keys calls into a single task with the download dataset. This would enforce atomiciticy on the dag...which is a BP

@jrlegrand
Copy link
Member Author

Noting that most of these comments are about the RxNorm DAG as a whole, I would feel better about addressing these when we eventually do a class-based / TRUNCATE overhaul of our DAGs. I added it as a note to other tickets that relate to those topics so we don't forget.

@jrlegrand jrlegrand merged commit 7d5c8d9 into main Sep 27, 2022
@jrlegrand jrlegrand deleted the jrlegrand/mthspl-rxnorm branch September 27, 2022 16:41
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.

RxNorm inactive ingredient
2 participants