Skip to content

Commit

Permalink
add hex sticker
Browse files Browse the repository at this point in the history
  • Loading branch information
ginberg committed Jan 15, 2024
1 parent a4d4cf1 commit fe5bf53
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ knitr::opts_chunk$set(
)
```

# DrugExposureDiagnostics <img src='man/figures/DrugExposureDiagnostics.png' align="right" height="139"/>
# DrugExposureDiagnostics <img src='man/figures/DrugExposureDiagnostics.png' align="right" width="139"/>

<!-- badges: start -->
[![CRAN status](https://www.r-pkg.org/badges/version/DrugExposureDiagnostics)](https://CRAN.R-project.org/package=DrugExposureDiagnostics)
Expand Down
80 changes: 60 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# DrugExposureDiagnostics <img src='man/figures/DrugExposureDiagnostics.png' align="right" height="139"/>
# DrugExposureDiagnostics <img src='man/figures/DrugExposureDiagnostics.png' align="right" width="139"/>

<!-- badges: start -->

Expand Down Expand Up @@ -84,15 +84,20 @@ The output is a list which contains the following set of tibbles:

``` r
names(all_checks)
#> [1] "conceptSummary" "missingValuesOverall"
#> [3] "drugExposureDurationOverall" "drugTypesOverall"
#> [5] "drugRoutesOverall" "drugSourceConceptsOverall"
#> [7] "drugDaysSupply" "drugVerbatimEndDate"
#> [9] "drugDose" "drugSig"
#> [11] "drugQuantity" "drugIngredientOverview"
#> [13] "drugIngredientPresence" "drugDaysSupplyHistogram"
#> [15] "drugQuantityHistogram" "drugDurationHistogram"
#> [17] "diagnosticsSummary"
#> [1] "conceptSummary" "missingValuesOverall"
#> [3] "missingValuesByConcept" "drugExposureDurationOverall"
#> [5] "drugExposureDurationByConcept" "drugTypesOverall"
#> [7] "drugTypesByConcept" "drugRoutesOverall"
#> [9] "drugRoutesByConcept" "drugSourceConceptsOverall"
#> [11] "drugSourceConceptsByConcept" "drugDaysSupply"
#> [13] "drugDaysSupplyByConcept" "drugVerbatimEndDate"
#> [15] "drugVerbatimEndDateByConcept" "drugDose"
#> [17] "drugDoseByConcept" "drugSig"
#> [19] "drugSigByConcept" "drugQuantity"
#> [21] "drugQuantityByConcept" "drugIngredientOverview"
#> [23] "drugIngredientPresence" "drugDaysSupplyHistogram"
#> [25] "drugQuantityHistogram" "drugDurationHistogram"
#> [27] "diagnosticsSummary"
```

The first item contains information on the concept ids that are used in
Expand All @@ -103,18 +108,18 @@ glimpse(all_checks$conceptSummary)
#> Rows: 2
#> Columns: 26
#> Rowwise:
#> $ drug_concept_id <int> 40162522, 1127078
#> $ drug <chr> "Acetaminophen 325 MG / Hydrocodone Bitart
#> $ drug_concept_id <int> 1127078, 40162522
#> $ drug <chr> "Acetaminophen 160 MG Oral Tablet", "Aceta
#> $ ingredient_concept_id <dbl> 1125315, 1125315
#> $ ingredient <chr> "Acetaminophen", "Acetaminophen"
#> $ n_records <int> 312, 2158
#> $ n_patients <int> 312, 1428
#> $ n_records <int> 2158, 312
#> $ n_patients <int> 1428, 312
#> $ domain_id <chr> "Drug", "Drug"
#> $ vocabulary_id <chr> "RxNorm", "RxNorm"
#> $ concept_class_id <chr> "Clinical Drug", "Clinical Drug"
#> $ standard_concept <chr> "S", "S"
#> $ concept_code <chr> "857005", "282464"
#> $ valid_start_date <date> 2009-08-02, 1970-01-01
#> $ concept_code <chr> "282464", "857005"
#> $ valid_start_date <date> 1970-01-01, 2009-08-02
#> $ valid_end_date <date> 2099-12-31, 2099-12-31
#> $ invalid_reason <chr> NA, NA
#> $ amount_value <dbl> 1, 1
Expand All @@ -135,8 +140,8 @@ all_checks$conceptSummary %>%
#> # Rowwise:
#> drug_concept_id drug
#> <int> <chr>
#> 1 40162522 Acetaminophen 325 MG / Hydrocodone Bitartrate 7.5 MG Oral Tab…
#> 2 1127078 Acetaminophen 160 MG Oral Tablet
#> 1 1127078 Acetaminophen 160 MG Oral Tablet
#> 2 40162522 Acetaminophen 325 MG / Hydrocodone Bitartrate 7.5 MG Oral Tab…
```

Other tibbles then contain information from the various checks
Expand Down Expand Up @@ -174,7 +179,31 @@ all_checks$missingValuesOverall
#> # n_records_missing_value <dbl>, proportion_records_missing_value <dbl>,
#> # result_obscured <lgl>
all_checks$missingValuesByConcept
#> NULL
#> # A tibble: 18 × 11
#> # Rowwise: drug_concept_id, drug, ingredient_concept_id, ingredient
#> drug_concept_id drug ingredient_concept_id ingredient variable n_records
#> <int> <chr> <dbl> <chr> <chr> <int>
#> 1 40162522 Acetamin… 1125315 Acetamino… n_missi… 59
#> 2 40162522 Acetamin… 1125315 Acetamino… n_missi… 59
#> 3 40162522 Acetamin… 1125315 Acetamino… n_missi… 59
#> 4 40162522 Acetamin… 1125315 Acetamino… n_missi… 59
#> 5 40162522 Acetamin… 1125315 Acetamino… n_missi… 59
#> 6 40162522 Acetamin… 1125315 Acetamino… n_missi… 59
#> 7 40162522 Acetamin… 1125315 Acetamino… n_missi… 59
#> 8 40162522 Acetamin… 1125315 Acetamino… n_missi… 59
#> 9 40162522 Acetamin… 1125315 Acetamino… n_missi… 59
#> 10 40162522 Acetamin… 1125315 Acetamino… n_missi… 59
#> 11 40162522 Acetamin… 1125315 Acetamino… n_missi… 59
#> 12 40162522 Acetamin… 1125315 Acetamino… n_missi… 59
#> 13 40162522 Acetamin… 1125315 Acetamino… n_missi… 59
#> 14 40162522 Acetamin… 1125315 Acetamino… n_missi… 59
#> 15 40162522 Acetamin… 1125315 Acetamino… n_missi… 59
#> 16 40162522 Acetamin… 1125315 Acetamino… n_missi… 59
#> 17 40162522 Acetamin… 1125315 Acetamino… n_missi… 59
#> 18 40162522 Acetamin… 1125315 Acetamino… n_missi… 59
#> # ℹ 5 more variables: n_sample <dbl>, n_records_not_missing_value <dbl>,
#> # n_records_missing_value <dbl>, proportion_records_missing_value <dbl>,
#> # result_obscured <lgl>
```

Or we can also see a summary of drug exposure duration
Expand All @@ -195,7 +224,18 @@ all_checks$drugExposureDurationOverall
#> # q90_drug_exposure_days <dbl>, q95_drug_exposure_days <dbl>,
#> # maximum_drug_exposure_days <dbl>, result_obscured <lgl>
all_checks$drugExposureDurationByConcept
#> NULL
#> # A tibble: 1 × 19
#> # Rowwise: drug_concept_id, drug, ingredient_concept_id
#> drug_concept_id drug ingredient_concept_id ingredient n_records n_sample
#> <int> <chr> <dbl> <chr> <int> <dbl>
#> 1 40162522 Acetamino… 1125315 Acetamino… 59 10000
#> # ℹ 13 more variables: n_non_negative_days <int>, n_negative_days <int>,
#> # proportion_negative_days <dbl>, minimum_drug_exposure_days <dbl>,
#> # q05_drug_exposure_days <dbl>, q10_drug_exposure_days <dbl>,
#> # q25_drug_exposure_days <dbl>, median_drug_exposure_days <dbl>,
#> # q75_drug_exposure_days <dbl>, q90_drug_exposure_days <dbl>,
#> # q95_drug_exposure_days <dbl>, maximum_drug_exposure_days <dbl>,
#> # result_obscured <lgl>
```

For further information on the checks performed please see the package
Expand Down
Binary file added man/figures/DrugExposureDiagnostics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fe5bf53

Please sign in to comment.