Package: drugprepr 0.0.5.9000

David Selby

drugprepr: Prepare Electronic Prescription Record Data to Estimate Drug Exposure

Prepare prescription data (such as from the Clinical Practice Research Datalink) into an analysis-ready format, with start and stop dates for each patient's prescriptions. Based on Pye et al (2018) <doi:10.1002/pds.4440>.

Authors:Belay Birlie Yimer [aut], David Selby [aut, cre], Meghna Jani [aut], Goran Nenadic [aut], Mark Lunt [aut], William G. Dixon [aut]

drugprepr_0.0.5.9000.tar.gz
drugprepr_0.0.5.9000.zip(r-4.5)drugprepr_0.0.5.9000.zip(r-4.4)drugprepr_0.0.5.9000.zip(r-4.3)
drugprepr_0.0.5.9000.tgz(r-4.4-any)drugprepr_0.0.5.9000.tgz(r-4.3-any)
drugprepr_0.0.5.9000.tar.gz(r-4.5-noble)drugprepr_0.0.5.9000.tar.gz(r-4.4-noble)
drugprepr_0.0.5.9000.tgz(r-4.4-emscripten)drugprepr_0.0.5.9000.tgz(r-4.3-emscripten)
drugprepr.pdf |drugprepr.html
drugprepr/json (API)
NEWS

# Install 'drugprepr' in R:
install.packages('drugprepr', repos = c('https://belayb.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/belayb/drugprepr/issues

Datasets:
  • cprd - Example data from the Clinical Practice Research Datalink (CPRD).
  • min_max_dat - Example plausible ranges for prescription quantity and dosage

On CRAN:

3.70 score 1 stars 3 scripts 161 downloads 12 exports 66 dependencies

Last updated 3 years agofrom:7d6d325503. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 26 2024
R-4.5-winOKOct 26 2024
R-4.5-linuxOKOct 26 2024
R-4.4-winOKOct 26 2024
R-4.4-macOKOct 26 2024
R-4.3-winOKOct 26 2024
R-4.3-macOKOct 26 2024

Exports:clean_durationclose_small_gapscompute_ndddrug_prepexample_therapyimputeimpute_durationimpute_nddimpute_qtyisolate_overlapsmake_decisionsshift_interval

Dependencies:askpassbitbit64blobbootcachemcellrangerchronclassclicpp11crayoncurldata.tableDBIDescToolsdoseminerdplyre1071ExactexpmfansifastmapgenericsgldgluegsubfnhmshttrjsonlitelatticelifecyclelmommagrittrMASSMatrixmemoisemimemvtnormopensslpillarpkgconfigplogrprettyunitsprogressprotoproxypurrrR6RcppreadxlrematchrlangrootSolveRSQLiterstudioapisqldfstringistringrsystibbletidyrtidyselectutf8vctrswithr

Introduction to drugprepr

Rendered fromintroduction.Rmdusingknitr::rmarkdownon Oct 26 2024.

Last update: 2021-11-10
Started: 2021-06-11

Readme and manuals

Help Manual

Help pageTopics
Clean implausibly-long prescription durationsclean_duration
Close small gaps between successive prescriptionsclose_small_gaps
Compute numerical daily dose from free-text prescribing instructionscompute_ndd
Example data from the Clinical Practice Research Datalink (CPRD).cprd
Decision 1: impute implausible total quantitiesdecision_1
Decision 10: close small gaps between successive prescriptionsdecision_10
Decision 2: impute missing total quantitiesdecision_2
Decision 3: impute implausible daily dosesdecision_3
Decision 4: impute missing daily dosesdecision_4
Decision 5: impute implausible prescription durationsdecision_5
Decision 6: choose method of calculating prescription durationdecision_6
Decision 7: impute missing prescription durationsdecision_7
Decision 8: disambiguate prescriptions with the same start datedecision_8
Decision 9: handle overlapping prescription periodsdecision_9
Run drug preparation algorithmdrug_prep
Example electronic prescription datasetexample_therapy
Get the mode (most common value) of a vectorget_mode
Impute missing or implausible valuesimpute
Replace missing or implausible prescription durationsimpute_duration
Replace implausible or missing numerical daily doses (NDD)impute_ndd
Find implausible entries Replace implausible or missing prescription quantitiesimpute_qty
Separating overlapping prescription periodsisolate_overlaps
Human-friendly interface to the drug prep algorithmmake_decisions
Example plausible ranges for prescription quantity and dosagemin_max_dat
Do values fall outside a specified 'plausible' range?outside_range
Shift time intervals until they no longer overlapshift_interval