-
Notifications
You must be signed in to change notification settings - Fork 0
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
*Add ds_*
use case
#25
Comments
OverviewThe proposed additions to the Drug Exposure table are related to the The drug administration attributes Solid formulations taken orally have a straightforward conversion because the $$ \text{quantity}_\text{de} * \text{dose_unit_source_value}_\text{de} * \text{amount_value}_\text{ds} * \text{amount_unit}_\text{ds} = \frac{\text{total active ingredient mass}}{\text{1 administration}} $$ However, for all other formulations such as liquids reported as $$ \text{quantity}_\text{de} * \text{dose_unit_source_value}_\text{de} * \frac{\text{numerator_value}_\text{ds}}{\text{denominator_value}_\text{ds}} * \frac{\text{numerator_unit}_\text{ds}}{\text{denominator_unit}_\text{ds}} = \frac{\text{total active ingredient mass}}{\text{1 administration}} $$ In parallel to this, the frequency of drug administration is also carried over $$ \frac{\text{total active ingredient mass}}{\text{1 administration}} * \frac{\text{x administrations}_\text{de*}}{\text{day}} = \frac{\text{x * total active ingredient mass}}{\text{day}} $$ Finally, the total active ingredient for a drug exposure record is calculated by $$ (\text{drug_exposure_end_date}_\text{de} - \text{drug_exposure_start_date}_\text{de}) * \frac{\text{x * total active ingredient mass}}{\text{day}} = \text{total active ingredient mass in drug exposure} $$ The intent of the $$ \text{administration_dose}_\text{de*} \sim \text{quantity}_\text{de} $$ $$ |
Use Case
The most commonly seen medications with a non-null
administration_dose
fieldare first derived from the Drug Exposures table.
For testing, the top 10 most frequently seen drugs in the Drug Exposure table
are filtered.
The top 10 drugs are joined back with the Drug Exposures table to retrieve the
administration_dose
,administration_unit
, andfrequency_concept_id
fields.For easier visualization, the formatting of the concept attributes are merged
into a single
drug
string, with theconcept_id
field now called thedrug_id
.This dataset is then joined to the
Drug Strength Staged
table to get the stagedvalue
andunit
fields for each drug.The resulting table tells the story of the drug exposure for a given record. The
dose of the drug at each administration, the units of administration, the corresponding
ingredient_concept_id
from the Drug Strength table, and the stagedvalue
andunit
corresponding to the amount of the ingredient in 1 unit of the drug.
The
value
field requires evaluation as a numeric value, which would require loopingover almost 40,000 rows. Instead, each unique
value
is isolated, resulting in 9rows. These 9 values are mapped to their corresponding numeric value.
The resulting dataset is joined back with the original data.
Themes
Themes can be viewed at: https://bootswatch.com/3/.
Syntax Highlighting
Syntax Highlighting Styles can be viewed at https://www.garrickadenbuie.com/blog/pandoc-syntax-highlighting-examples/.
Dataframe
Dataframe printing options include
default
,kable
,tibble
, orpaged
.For paged dataframes, the chunk options include:
FALSE
turns off paged display for the chunkFALSE
turns off row names for the chunkFigure Captions
The text was updated successfully, but these errors were encountered: