Documentation
Getting startedInstallationLoading data with AirflowQuerying the databaseFinding tables in pgAdminHow SageRx worksData dictionary
Show me the dataData sourcesSource dataStaging dataIntermediate dataMartsUse cases
Use casesExample queriesExample queries
Some questions you can try to answer using SageRx queries.
🖱️ Click to reveal the answer for each.
‣
select distinct dose_form_name
from intermediate.int_rxnorm_clinical_products_to_ingredients
where ingredient_name = 'prednisone'
and ingredient_tty = 'IN'
/* answer = Delayed Release Oral Tablet,
Oral Capsule, Oral Solution, Oral Tablet,
Rectal Suppository */
‣
select
ingredient_component_name
from intermediate.int_rxnorm_clinical_products_to_ingredient_components ing
left join staging.stg_rxnorm__ndcs ndc
on ing.clinical_product_rxcui = ndc.clinical_product_rxcui
where ndc = '00597014660'
/* answer = linagliptin, metformin */
‣
select
cls.class_name
, count(*)
from staging.stg_fda_ndc__ndc ndc
left join staging.stg_fda_ndc__class cls
on ndc.productid = cls.productid
where to_date(product_startmarketingdate, 'YYYYMMDD') >= current_date - 90
and cls.class_type = 'EPC'
group by cls.class_name
order by count(*) desc
/* answer (at the time of writing) =
Osmotic Laxative */
‣
NOTE: RXCUI 857005 = acetaminophen 325 MG / HYDROcodone bitartrate 7.5 MG Oral Tablet
select floor(4000 / cast(strength_numerator_value as float)) as num_tablets
from intermediate.int_rxnorm_clinical_products_to_ingredient_strengths cpstr
where clinical_product_rxcui = '857005'
and ingredient_component_name = 'acetaminophen'
and strength_numerator_unit = 'MG'
/* answer = 12 */
‣
Coming soon
‣
Coming soon
← Previous
Next →
On this page