{
  "_id": "6a62391435834fefe99ecaa6",
  "Package": "drugprepr",
  "Title": "Prepare Electronic Prescription Record Data to Estimate Drug\nExposure",
  "Version": "0.0.7",
  "Authors@R": "c(person(given = \"Belay Birlie\",\nfamily = \"Yimer\",\nrole = c(\"aut\"),\nemail = \"BelayBirlie.Yimer@astellas.com\",\ncomment = c(ORCID = \"0000-0001-8621-6539\")),\nperson(given = \"David\",\nfamily = \"Selby\",\nrole = c(\"aut\", \"cre\", \"cph\"),\nemail = \"David.Selby@dfki.de\",\ncomment = c(ORCID = \"0000-0001-8026-5663\")),\nperson(given = \"Meghna\",\nfamily = \"Jani\",\nrole = c(\"aut\"),\nemail = \"meghna.jani@manchester.ac.uk\"),\nperson(given = \"Goran\",\nfamily = \"Nenadic\",\nrole = c(\"aut\"),\nemail = \"goran.nenadic@manchester.ac.uk\"),\nperson(given = \"Mark\",\nfamily = \"Lunt\",\nrole = c(\"aut\"),\nemail = \"mark.lunt@manchester.ac.uk\"),\nperson(given = \"William G.\",\nfamily = \"Dixon\",\nrole = c(\"aut\"),\nemail = \"will.dixon@manchester.ac.uk\")\n)",
  "Date": "2026-07-22",
  "Maintainer": "David Selby <David.Selby@dfki.de>",
  "URL": "https://github.com/belayb/drugprepr",
  "BugReports": "https://github.com/belayb/drugprepr/issues",
  "Description": "Prepare prescription data (such as from the Clinical\nPractice Research Datalink) into an analysis-ready format, with\nstart and stop dates for each patient's prescriptions. Based on\nPye et al (2018) <doi:10.1002/pds.4440>.",
  "License": "MIT + file LICENSE",
  "Encoding": "UTF-8",
  "Language": "en-GB",
  "LazyData": "true",
  "VignetteBuilder": "knitr",
  "Config/roxygen2/version": "8.0.0",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-07-23 15:49:33 UTC",
    "User": "root"
  },
  "Author": "Belay Birlie Yimer [aut] (ORCID:\n<https://orcid.org/0000-0001-8621-6539>), David Selby [aut,\ncre, cph] (ORCID: <https://orcid.org/0000-0001-8026-5663>),\nMeghna Jani [aut], Goran Nenadic [aut], Mark Lunt [aut],\nWilliam G. Dixon [aut]",
  "Repository": "https://cran.r-universe.dev",
  "Date/Publication": "2026-07-23 10:50:28 UTC",
  "RemoteUrl": "https://github.com/cran/drugprepr",
  "RemoteRef": "HEAD",
  "RemoteSha": "473257b21d385c85142787d06dbf1678c18f4a77",
  "_user": "cran",
  "_type": "src",
  "_file": "drugprepr_0.0.7.tar.gz",
  "_fileid": "https://r2.ropensci.org/da65c7490c89f30743a3c6cfc1e234cd7ca102b81cee21a9299c92e9ac1459ab",
  "_filesize": 276776,
  "_sha256": "da65c7490c89f30743a3c6cfc1e234cd7ca102b81cee21a9299c92e9ac1459ab",
  "_expires": "2026-10-31T15:53:54.000Z",
  "_created": "2026-07-23T15:49:33.000Z",
  "_published": "2026-07-23T15:53:56.209Z",
  "_jobs": [
    {
      "job": 89258065739,
      "time": 190,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "WARNING",
      "artifact": "8569890254"
    },
    {
      "job": 89258065669,
      "time": 214,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "WARNING",
      "artifact": "8569902491"
    },
    {
      "job": 89257150804,
      "time": 208,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "8569790682"
    },
    {
      "job": 89258065764,
      "time": 158,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "8569873606"
    },
    {
      "job": 89258065827,
      "time": 118,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "WARNING",
      "artifact": "8569855201"
    }
  ],
  "_host": "GitHub-Actions",
  "_buildurl": "https://github.com/r-universe/cran/actions/runs/30022059711",
  "_status": "success",
  "_upstream": "https://github.com/cran/drugprepr",
  "_commit": {
    "id": "473257b21d385c85142787d06dbf1678c18f4a77",
    "author": "David Selby <David.Selby@dfki.de>",
    "committer": "cran-robot <csardi.gabor+cran@gmail.com>",
    "message": "version 0.0.7\n",
    "time": 1784803828
  },
  "_maintainer": {
    "name": "David Selby",
    "email": "david.selby@dfki.de",
    "login": "selbosh",
    "bluesky": "@davidselby.bsky.social",
    "linkedin": "in/daselby",
    "twitter": "@TeaStats",
    "description": "Senior researcher in health data science at German Artificial Intelligence Research Centre (DFKI). Honorary researcher at TCD, UCL and University of Manchester.",
    "uuid": 7850509,
    "orcid": "0000-0001-8026-5663"
  },
  "_distro": "resolute",
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 2.10",
      "role": "Depends"
    },
    {
      "package": "dplyr",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "role": "Imports"
    },
    {
      "package": "tidyr",
      "role": "Imports"
    },
    {
      "package": "sqldf",
      "role": "Imports"
    },
    {
      "package": "stringr",
      "role": "Imports"
    },
    {
      "package": "purrr",
      "role": "Imports"
    },
    {
      "package": "DescTools",
      "role": "Imports"
    },
    {
      "package": "doseminer",
      "role": "Imports"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "role": "Suggests"
    },
    {
      "package": "kableExtra",
      "role": "Suggests"
    }
  ],
  "_owner": "cran",
  "_selfowned": false,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-30",
      "n": 1
    }
  ],
  "_tags": [
    {
      "name": "0.0.7",
      "date": "2026-07-23"
    }
  ],
  "_stars": 0,
  "_contributors": [
    {
      "user": "selbosh",
      "count": 2,
      "uuid": 7850509
    }
  ],
  "_userbio": {
    "uuid": 6899542,
    "type": "organization",
    "name": "cran",
    "followers": 623,
    "description": "Unofficial read-only mirror of all CRAN R packages"
  },
  "_downloads": {
    "count": 35,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/drugprepr"
  },
  "_devurl": "https://github.com/belayb/drugprepr",
  "_rbuild": "4.6.1",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/drugprepr.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "LICENSE",
    "manual.pdf"
  ],
  "_cranurl": false,
  "_releases": [
    {
      "version": "0.0.4",
      "date": "2021-11-09"
    },
    {
      "version": "0.0.7",
      "date": "2026-07-23"
    }
  ],
  "_exports": [
    "clean_duration",
    "close_small_gaps",
    "compute_ndd",
    "drug_prep",
    "example_therapy",
    "impute",
    "impute_duration",
    "impute_ndd",
    "impute_qty",
    "isolate_overlaps",
    "make_decisions",
    "shift_interval"
  ],
  "_datasets": [
    {
      "name": "cprd",
      "title": "Example data from the Clinical Practice Research Datalink (CPRD).",
      "object": "cprd",
      "class": [
        "data.frame"
      ],
      "fields": [
        "patid",
        "pracid",
        "start_date",
        "prodcode",
        "dosageid",
        "text",
        "qty",
        "numdays",
        "dose_duration"
      ],
      "rows": 18,
      "table": true,
      "tojson": true
    },
    {
      "name": "min_max_dat",
      "title": "Example plausible ranges for prescription quantity and dosage",
      "object": "min_max_dat",
      "class": [
        "data.frame"
      ],
      "fields": [
        "prodcode",
        "max_qty",
        "min_qty",
        "max_ndd",
        "min_ndd"
      ],
      "rows": 2,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "clean_duration",
      "title": "Clean implausibly-long prescription durations",
      "topics": [
        "clean_duration"
      ]
    },
    {
      "page": "close_small_gaps",
      "title": "Close small gaps between successive prescriptions",
      "topics": [
        "close_small_gaps"
      ]
    },
    {
      "page": "compute_ndd",
      "title": "Compute numerical daily dose from free-text prescribing instructions",
      "topics": [
        "compute_ndd"
      ]
    },
    {
      "page": "cprd",
      "title": "Example data from the Clinical Practice Research Datalink (CPRD).",
      "topics": [
        "cprd"
      ]
    },
    {
      "page": "decision_1",
      "title": "Decision 1: impute implausible total quantities",
      "concept": [
        "decision functions"
      ],
      "topics": [
        "decision_1"
      ]
    },
    {
      "page": "decision_10",
      "title": "Decision 10: close small gaps between successive prescriptions",
      "concept": [
        "decision functions"
      ],
      "topics": [
        "decision_10"
      ]
    },
    {
      "page": "decision_2",
      "title": "Decision 2: impute missing total quantities",
      "concept": [
        "decision functions"
      ],
      "topics": [
        "decision_2"
      ]
    },
    {
      "page": "decision_3",
      "title": "Decision 3: impute implausible daily doses",
      "concept": [
        "decision functions"
      ],
      "topics": [
        "decision_3"
      ]
    },
    {
      "page": "decision_4",
      "title": "Decision 4: impute missing daily doses",
      "concept": [
        "decision functions"
      ],
      "topics": [
        "decision_4"
      ]
    },
    {
      "page": "decision_5",
      "title": "Decision 5: impute implausible prescription durations",
      "concept": [
        "decision functions"
      ],
      "topics": [
        "decision_5"
      ]
    },
    {
      "page": "decision_6",
      "title": "Decision 6: choose method of calculating prescription duration",
      "concept": [
        "decision functions"
      ],
      "topics": [
        "decision_6"
      ]
    },
    {
      "page": "decision_7",
      "title": "Decision 7: impute missing prescription durations",
      "concept": [
        "decision functions"
      ],
      "topics": [
        "decision_7"
      ]
    },
    {
      "page": "decision_8",
      "title": "Decision 8: disambiguate prescriptions with the same start date",
      "concept": [
        "decision functions"
      ],
      "topics": [
        "decision_8"
      ]
    },
    {
      "page": "decision_9",
      "title": "Decision 9: handle overlapping prescription periods",
      "concept": [
        "decision functions"
      ],
      "topics": [
        "decision_9"
      ]
    },
    {
      "page": "drug_prep",
      "title": "Run drug preparation algorithm",
      "concept": [
        "decision functions"
      ],
      "topics": [
        "drug_prep"
      ]
    },
    {
      "page": "example_therapy",
      "title": "Example electronic prescription dataset",
      "topics": [
        "example_therapy"
      ]
    },
    {
      "page": "get_mode",
      "title": "Get the mode (most common value) of a vector",
      "topics": [
        "get_mode"
      ]
    },
    {
      "page": "impute",
      "title": "Impute missing or implausible values",
      "topics": [
        "impute"
      ]
    },
    {
      "page": "impute_duration",
      "title": "Replace missing or implausible prescription durations",
      "topics": [
        "impute_duration"
      ]
    },
    {
      "page": "impute_ndd",
      "title": "Replace implausible or missing numerical daily doses (NDD)",
      "topics": [
        "impute_ndd"
      ]
    },
    {
      "page": "impute_qty",
      "title": "Find implausible entries Replace implausible or missing prescription quantities",
      "topics": [
        "impute_qty"
      ]
    },
    {
      "page": "isolate_overlaps",
      "title": "Separating overlapping prescription periods",
      "topics": [
        "isolate_overlaps"
      ]
    },
    {
      "page": "make_decisions",
      "title": "Human-friendly interface to the drug prep algorithm",
      "topics": [
        "make_decisions"
      ]
    },
    {
      "page": "min_max_dat",
      "title": "Example plausible ranges for prescription quantity and dosage",
      "topics": [
        "min_max_dat"
      ]
    },
    {
      "page": "outside_range",
      "title": "Do values fall outside a specified 'plausible' range?",
      "topics": [
        "outside_range"
      ]
    },
    {
      "page": "shift_interval",
      "title": "Shift time intervals until they no longer overlap",
      "topics": [
        "shift_interval"
      ]
    }
  ],
  "_readme": "https://github.com/cran/drugprepr/raw/HEAD/README.md",
  "_rundeps": [
    "askpass",
    "bit",
    "bit64",
    "blob",
    "boot",
    "cachem",
    "cellranger",
    "chron",
    "class",
    "cli",
    "clipr",
    "cpp11",
    "crayon",
    "curl",
    "data.table",
    "DBI",
    "DescTools",
    "doseminer",
    "dplyr",
    "e1071",
    "Exact",
    "expm",
    "fastmap",
    "forcats",
    "fs",
    "generics",
    "gld",
    "glue",
    "gsubfn",
    "haven",
    "hms",
    "httr",
    "jsonlite",
    "lattice",
    "lifecycle",
    "lmom",
    "magrittr",
    "MASS",
    "Matrix",
    "memoise",
    "mime",
    "mvtnorm",
    "openssl",
    "pillar",
    "pkgconfig",
    "prettyunits",
    "progress",
    "proto",
    "proxy",
    "purrr",
    "R6",
    "Rcpp",
    "readr",
    "readxl",
    "rematch",
    "rlang",
    "rootSolve",
    "RSQLite",
    "rstudioapi",
    "sqldf",
    "stringi",
    "stringr",
    "sys",
    "tibble",
    "tidyr",
    "tidyselect",
    "tzdb",
    "utf8",
    "vctrs",
    "vroom",
    "withr"
  ],
  "_vignettes": [
    {
      "source": "introduction.Rmd",
      "filename": "introduction.html",
      "title": "Introduction to drugprepr",
      "author": "Belay B. Yimer, David A. Selby, Meghna Jani, Goran Nenadic, Mark Lunt, William G. Dixon",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Motivation",
        "CPRD data",
        "The algorithm",
        "R package drugprepr",
        "Computation of ndd from free text",
        "Defining implausible values",
        "Processing the CPRD prescription data"
      ],
      "created": "2021-11-09 17:50:05",
      "modified": "2026-07-23 10:50:28",
      "commits": 2
    }
  ],
  "_score": 2.6989700043360187,
  "_indexed": true,
  "_nocasepkg": "drugprepr",
  "_universes": [
    "cran",
    "selbosh",
    "belayb"
  ],
  "_previous": "0.0.4",
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.0.7",
      "date": "2026-07-23T15:52:21.000Z",
      "distro": "resolute",
      "commit": "473257b21d385c85142787d06dbf1678c18f4a77",
      "fileid": "https://r2.ropensci.org/2d0c0388552014c63406cae645858944bedd1f98ac55bb5f482fe554efc9bd16",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/30022059711"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "0.0.7",
      "date": "2026-07-23T15:52:46.000Z",
      "distro": "resolute",
      "commit": "473257b21d385c85142787d06dbf1678c18f4a77",
      "fileid": "https://r2.ropensci.org/1fad91d6cd0b8fe25e17fcfca4e51300eb480bbf060a6643cfdcc7601b320304",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/30022059711"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.0.7",
      "date": "2026-07-23T15:52:32.000Z",
      "commit": "473257b21d385c85142787d06dbf1678c18f4a77",
      "fileid": "https://r2.ropensci.org/641c17c446ea29aa587ef30b222249a2e66a682630bed04c5df2ae39fb69ce13",
      "status": "success",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/30022059711"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.0.7",
      "date": "2026-07-23T15:51:03.000Z",
      "commit": "473257b21d385c85142787d06dbf1678c18f4a77",
      "fileid": "https://r2.ropensci.org/3cfe4277efe5d1bf4e855aa839c4509e75a1c7dd4418a8db057bc3d458591a31",
      "status": "success",
      "check": "WARNING",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/30022059711"
    }
  ]
}