Skip to content

Commit

Permalink
Merge pull request #305 from coderxio/jrlegrand/minor-unii-fixes
Browse files Browse the repository at this point in the history
Update docs for products to inactive ingredient marts and remove int model materialization override
  • Loading branch information
jrlegrand authored Jul 3, 2024
2 parents 2b5b24e + 7820773 commit a487345
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
-- int_mthspl_products_to_inactive_ingredients.sql
{{ config(materialized='table') }}

with

Expand Down
32 changes: 31 additions & 1 deletion dbt/sagerx/models/marts/products/_products__models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ models:
- name: product_rxcui
description: >
Product-level RxNorm RXCUI.
tests:
data_tests:
- unique
- not_null
- name: brand_vs_generic
Expand Down Expand Up @@ -51,6 +51,30 @@ models:
DailyMed (MTHSPL) products (along with 9-digit NDCs), mapped to DailyMed
substances, which are mapped to normalized FDA UNII display names.
columns:
- name: ndc9
- name: fda_unii_code
- name: fda_unii_display_name
- name: pubchem_id
description: >
The ID for this compound in PubChem.
Use this to generate a link to the PubChem detail
page for this compound.
Example: `concat('https://pubchem.ncbi.nlm.nih.gov/compound/', pubchem_id)`
Sodium Benzoate example: [https://pubchem.ncbi.nlm.nih.gov/compound/517055](https://pubchem.ncbi.nlm.nih.gov/compound/517055)
- name: usp_preservative
description: |
1 if the UNII matches a CAS RN from USP where
USP considers it a preservative based on preservative
product filter on their product website.
USP product website filtered to Preservatives: [link](https://store.usp.org/preservatives/category/USP-1213)
29 products at the time of writing this - one of which had N/A for CAS RN
and one which had two possible CAS RNs.
- name: product_rxcui
- name: product_name
description: |
NOTE: this field is aggregated and pipe-delimited (' | '). It appears
Expand All @@ -59,6 +83,9 @@ models:
with NDC to UNII code, the names of the products as they
exist in the MTHSPL SAB of RxNorm should be for quick reference
and validation only.
- name: product_tty
- name: inactive_ingredient_unii
- name: inactive_ingredient_rxcui
- name: inactive_ingredient_name
description: |
NOTE: this field is aggregated and pipe-delimited (' | '). It appears
Expand All @@ -67,3 +94,6 @@ models:
with NDC to UNII code, the names of the substances as they
exist in the MTHSPL SAB of RxNorm should be for quick reference
and validation only.
- name: inactive_ingredient_tty
- name: active
- name: prescribable

0 comments on commit a487345

Please sign in to comment.