Closed jrlegrand closed 3 years ago
I wonder if we instead consider adding another filter on the back-end to an RxClass column that specifies route based on system?
idk all the edge cases for this and if all the classification systems actually map every drug, but say for asthma: disease is under "respiratory tract diseases" ATC is under "respiratory system" and VA_Class is under "respiratory tract medications"
So could we say if the user picks something under of these "respiratory" categories, then filter for DFG IN (inhalant product, injectable product, oral product, etc) Or if user picks something under "ophthalmic" or "eye", then filter for DFG IN (ophthalmic product) Or under "otic" or "ear", then DFG IN (otic product, ophthalmic product) etc.
I may be wrong or have a big gap in my understanding of the RxNav/RxClass tables, but it feels like there aren't that many dosage-form specific classes and not too many DFGs that get affected by this, and therefore perhaps we can create some rules/filters like this?
That sounds cool and might be possible but probably would file that under optimization because I think doing this type of thing in settings would be palatable enough for end users and we know it covers all RxNorm meds. There's other cooler things I would personally rather try to do before we try to do this. Also I have found sometimes when I try to get too fancy, I build things that don't behave the way users would expect them to.
Example issue (note 3 dose_form_group_name
fields):
medication_ingredient_rxcui | medication_ingredient_name | medication_ingredient_tty | medication_product_rxcui | medication_product_name | medication_product_tty | dose_form_rxcui | dose_form_name | dose_form_tty | dose_form_group_rxcui | dose_form_group_name | dose_form_group_tty | medication_ndc |
---|---|---|---|---|---|---|---|---|---|---|---|---|
26225 | ondansetron | IN | 104894 | ondansetron 4 MG Disintegrating Oral Tablet | SCD | 316942 | Disintegrating Oral Tablet | DF | 1151133 | Pill | DFG | 63187037910 |
26225 | ondansetron | IN | 104894 | ondansetron 4 MG Disintegrating Oral Tablet | SCD | 316942 | Disintegrating Oral Tablet | DF | 1294713 | Disintegrating Oral Product | DFG | 63187037910 |
26225 | ondansetron | IN | 104894 | ondansetron 4 MG Disintegrating Oral Tablet | SCD | 316942 | Disintegrating Oral Tablet | DF | 1151131 | Oral Product | DFG | 63187037910 |
How do we maintain granularity with this? Or do we handle this with a different table?
42 distinct DFGs 118 distinct DFs
Therefore, it will be easier for user to filter by DFG.
Maybe we create a second table called dfg_df
which just has the mappings from DFG to DF or something and just use that to allow the user to filter the results of the main query?
Link to DFG granularity export: https://drive.google.com/file/d/1Ae7NroHP7nBgoWxLQkLVp4M3OCbQZB8M/view?usp=sharing
select distinct df_rxnconso.str as df, dfg_rxnconso.str as dfg
-- dose form
from rxnconso df_rxnconso
-- dose form group
left join rxnrel dfg_rxnrel on dfg_rxnrel.rxcui2 = df_rxnconso.rxcui and dfg_rxnrel.rela = 'isa'
left join rxnconso dfg_rxnconso on dfg_rxnconso.rxcui = dfg_rxnrel.rxcui1 and dfg_rxnconso.sab = 'RXNORM' and dfg_rxnconso.tty = 'DFG'
where df_rxnconso.sab = 'RXNORM' and df_rxnconso.tty = 'DF'
df | dfg |
---|---|
Mouthwash | Dental Product |
Mouthwash | Oral Liquid Product |
Mouthwash | Mouthwash Product |
Ophthalmic Solution | Ophthalmic Product |
Delayed Release Oral Tablet | Oral Product |
Delayed Release Oral Tablet | Pill |
Toothpaste | Dental Product |
Toothpaste | Paste Product |
Toothpaste | Toothpaste Product |
Toothpaste | Oral Paste Product |
Vaginal Cream | Vaginal Product |
Vaginal Foam | Vaginal Product |
Vaginal Gel | Vaginal Product |
Chewable Tablet | Oral Product |
Chewable Tablet | Pill |
Chewable Tablet | Chewable Product |
Ophthalmic Ointment | Ophthalmic Product |
Medicated Shampoo | Shampoo Product |
Nasal Spray | Inhalant Product |
Nasal Spray | Nasal Product |
Irrigation Solution | Irrigation Product |
Ophthalmic Irrigation Solution | Ophthalmic Product |
Disintegrating Oral Tablet | Oral Product |
Disintegrating Oral Tablet | Pill |
Disintegrating Oral Tablet | Disintegrating Oral Product |
Extended Release Oral Capsule | Oral Product |
Extended Release Oral Capsule | Pill |
Extended Release Oral Tablet | Oral Product |
Extended Release Oral Tablet | Pill |
Extended Release Suspension | Oral Product |
Extended Release Suspension | Oral Liquid Product |
Injectable Solution | Injectable Product |
Injectable Suspension | Injectable Product |
Intraperitoneal Solution | Intraperitoneal Product |
Medicated Bar Soap | Soap Product |
Medicated Liquid Soap | Soap Product |
Mucous Membrane Topical Solution | Mucosal Product |
Nasal Inhalant | Inhalant Product |
Nasal Inhalant | Nasal Product |
Nasal Gel | Nasal Product |
Nasal Ointment | Nasal Product |
Nasal Solution | Nasal Product |
Ophthalmic Gel | Ophthalmic Product |
Ophthalmic Suspension | Ophthalmic Product |
Oral Capsule | Oral Product |
Oral Capsule | Pill |
Oral Cream | Oral Product |
Oral Cream | Oral Cream Product |
Oral Solution | Oral Product |
Oral Solution | Oral Liquid Product |
Oral Suspension | Oral Product |
Oral Suspension | Oral Liquid Product |
Otic Solution | Otic Product |
Otic Suspension | Otic Product |
Rectal Cream | Rectal Product |
Rectal Spray | Rectal Product |
Rectal Suppository | Rectal Product |
Topical Cream | Topical Product |
Topical Lotion | Topical Product |
Topical Oil | Topical Product |
Topical Ointment | Topical Product |
Topical Solution | Topical Product |
Transdermal System | Topical Product |
Transdermal System | Transdermal Product |
Oral Wafer | Oral Product |
Oral Wafer | Wafer Product |
Oral Lozenge | Oral Product |
Oral Lozenge | Lozenge Product |
Delayed Release Oral Capsule | Oral Product |
Delayed Release Oral Capsule | Pill |
Gas for Inhalation | Inhalant Product |
Inhalation Powder | Inhalant Product |
Powder Spray | Topical Product |
Rectal Ointment | Rectal Product |
Rectal Solution | Rectal Product |
Sublingual Tablet | Oral Product |
Sublingual Tablet | Pill |
Sublingual Tablet | Sublingual Product |
Topical Powder | Topical Product |
Vaginal Ointment | Vaginal Product |
Oral Tablet | Oral Product |
Oral Tablet | Pill |
Rectal Foam | Rectal Product |
Urethral Suppository | Urethral Product |
Enema | Rectal Product |
Oral Granules | Oral Product |
Oral Granules | Granule Product |
Oral Pellet | Oral Product |
Oral Pellet | Pellet Product |
Inhalation Solution | Inhalant Product |
Mucosal Spray | Mucosal Product |
Oral Spray | Oral Product |
Oral Spray | Oral Liquid Product |
Oral Spray | Oral Spray Product |
Topical Spray | Topical Product |
Oral Gel | Oral Product |
Oral Gel | Oral Gel Product |
Rectal Gel | Rectal Product |
Oral Paste | Oral Product |
Oral Paste | Paste Product |
Oral Paste | Oral Paste Product |
Oral Foam | Oral Product |
Oral Foam | Oral Foam Product |
Topical Foam | Topical Product |
Topical Gel | Topical Product |
Oral Ointment | Oral Product |
Oral Ointment | Oral Ointment Product |
Oral Powder | Oral Product |
Oral Powder | Oral Powder Product |
Paste | Paste Product |
Chewing Gum | Oral Product |
Chewing Gum | Chewable Product |
Douche | Vaginal Product |
Drug Implant | Drug Implant Product |
Metered Dose Inhaler | Inhalant Product |
Prefilled Syringe | Injectable Product |
Dry Powder Inhaler | Inhalant Product |
Pack | |
Medicated Pad | Topical Product |
Medicated Pad | Medicated Pad or Tape |
Medicated Tape | Topical Product |
Medicated Tape | Medicated Pad or Tape |
Buccal Film | Oral Product |
Buccal Film | Buccal Product |
Buccal Tablet | Oral Product |
Buccal Tablet | Pill |
Buccal Tablet | Buccal Product |
Injectable Foam | Injectable Product |
Effervescent Oral Tablet | Oral Product |
Powder for Nasal Solution | Nasal Product |
Granules for Oral Solution | Oral Product |
Granules for Oral Solution | Granule Product |
Granules for Oral Suspension | Oral Product |
Granules for Oral Suspension | Granule Product |
Powder for Oral Solution | Oral Product |
Powder for Oral Solution | Oral Powder Product |
Powder for Oral Suspension | Oral Product |
Powder for Oral Suspension | Oral Powder Product |
Topical Suspension | Topical Product |
Auto-Injector | Injectable Product |
Pen Injector | Injectable Product |
Cartridge | Injectable Product |
Jet Injector | Injectable Product |
Injection | Injectable Product |
Intratracheal Suspension | Intratracheal Product |
Nasal Powder | Nasal Product |
Vaginal Film | Vaginal Product |
Topical Liquefied Gas | Topical Product |
Medicated Patch | Topical Product |
Metered Dose Nasal Spray | Inhalant Product |
Metered Dose Nasal Spray | Nasal Product |
Sublingual Powder | Oral Product |
Sublingual Powder | Sublingual Product |
Sublingual Powder | Oral Powder Product |
Intrauterine System | Drug Implant Product |
Tablet for Oral Suspension | Oral Product |
Tablet for Oral Suspension | Oral Liquid Product |
Inhalation Suspension | Inhalant Product |
Vaginal Insert | Vaginal Product |
Vaginal Sponge | Vaginal Product |
Vaginal System | Vaginal Product |
Chewable Extended Release Oral Tablet | Oral Product |
Chewable Extended Release Oral Tablet | Pill |
Chewable Extended Release Oral Tablet | Chewable Product |
Oral Film | Oral Product |
Oral Film | Oral Film Product |
Sublingual Film | Oral Product |
Sublingual Film | Sublingual Product |
Sublingual Film | Oral Film Product |
Inhalation Spray | Inhalant Product |
Delayed Release Oral Granules | Oral Product |
Delayed Release Oral Granules | Granule Product |
Powder for Pyelocalyceal Solution | Pyelocalyceal Product |
@jrlegrand @yevgenybulochnik @Bridg109 apologies if I missed this in the code or our call, but curious about where the MDT user would input the selected dfg's; namely, the config seems more like population-based params vs. the drug class/cui params are entered in the command line run_mdt step.
See https://github.com/coderxio/medication-diversification/issues/21 if you have any - pardon the pun - input.
Lol thank you! I knew we were talking about it in the context of other tickets or related topics but couldn't find it. Yea I think depending on how we want the user to use the config file, it may make sense to either put all the inputs in the config file or keep drug-related params in the command line step vs. the population params in the config file. Just my opinion though.
Problem Statement
Users need to be able to filter by dose form group (DFG). DFG is a grouping of dose form (DF).
Criteria for Success
Pulling in DFG does not make the granularity of the
rxcui_ndc.sql
query change and I should be able to specify DFGs and only see results with those DFGs. Maybe I am also notified of which DFGs are filtered out?Additional Information
See these links: