# Diagnostics for OMOP Common Data Model Drug Records

## Documentation for package ‘DrugExposureDiagnostics’ version 1.1.6

- DESCRIPTION file.
- User guides, package vignettes and other documentation.
- Package NEWS.

## Help Pages

checkDaysSupply | Check if Days_supply is the same as datediff(drug_exp_start_date,drug_exp_end_date)
checkDbType | Check the database type.
checkDrugDose | Get a summary of the daily drug dose
checkDrugSig | Check the drug sig field; this is the verbatim instruction for the drug as written by the provider.
checkIngredientInTable | Check ingredient is present in given table
checkIsIngredient | Check is an ingredient
checkLogical | Check if given object is a boolean.
checkSampleMinCellCount | Check that the sample is bigger than the mincellcount
checkTableExists | Check if given table exists in cdm.
checkVerbatimEndDate | Check the verbatim_end_date field
computeDBQuery | Store the given input in a remote database table. It will be stored either in a permanent table or a temporary table depending on tablePrefix.
dataPlotPanel | dataPlotPanel
executeChecks | Execute given checks on Drug Exposure.
executeChecksSingleIngredient | Execute given checks on Drug Exposure for a single ingredient.
getAllCheckOptions | Get all options that can be passed to the "checks" parameter
getDrugMissings | Check missings in drug exposure records
getDrugRecords | Drug exposure records for ingredients of interest
getDrugRoutes | Get drug exposure route types
getDrugSourceConcepts | Check drug exposure source types
getDrugTypes | Get drug exposure record types
getDuration | Compute the difference in days between 2 variables in a database table.
ingredientDescendantsInDb | Get the descendants for the given ingredients
mem_change | Determine change in memory from running code
mem_used | How much memory is currently used by R?
metaDataPanel | metaDataPanel
mockDrugExposure | Mock Drug exposure tables for ingredients of interest
obscureCounts | Obscure the small number of counts
printDurationAndMessage | Print duration from start to now and print it as well as new status message
runBenchmarkExecuteSingleIngredient | Run benchmark for ExecuteSingleIngredient
ShinyApp | DrugExposureDiagnostics ShinyApp
ShinyModule | Module Decorator Class
summariseChecks | Create a summary about the diagnostics results
summariseDrugExposureDuration | Summarise drug exposure record durations
summariseQuantity | Summarise the quantity column of the drug_exposure table
summariseTimeBetween | Check time in between drug records per person and report the summary
validateChecks | Validate the "checks" parameter
viewResults | View the results in the Shiny app
writeFile | Write a result to a file on disk.
writeIngredientResultToDisk | Write (ingredient) diagnostics results on disk in given output folder.
writeResultToDisk | Write diagnostics results to a zip file on disk in given output folder.
writeZipToDisk | Write (ingredient) diagnostics results on disk in given output folder.