{
  "_id": "69e1e97cc5259ad4cd939e32",
  "Package": "coder",
  "Type": "Package",
  "Title": "Deterministic Categorization of Items Based on External Code\nData",
  "Version": "1.0",
  "Authors@R": "c(\nperson(\"Erik\", \"Bulow\", email = \"eriklgb@gmail.com\",\nrole = c(\"aut\", \"cre\"),\ncomment = c(ORCID = \"0000-0002-9973-456X\")),\nperson(\"Emely C\", \"Zabore\", role = \"rev\",\ncomment = \"Emily reviewed the package (v. 0.12.1) for rOpenSci, see <https://github.com/ropensci/software-review/issues/381>\"),\nperson(\"David\", \"Robinson\", role = \"rev\",\ncomment = \"David reviewed the package (v. 0.12.1) for rOpenSci, see <https://github.com/ropensci/software-review/issues/381>\")\n)",
  "Description": "Fast categorization of items based on external code data\nidentified by regular expressions. A typical use case considers\npatient with medically coded data, such as codes from the\nInternational Classification of Diseases ('ICD') or the\nAnatomic Therapeutic Chemical ('ATC') classification system.\nFunctions of the package relies on a triad of objects: (1) case\ndata with unit id:s and possible dates of interest; (2)\nexternal code data for corresponding units in (1) and with\noptional dates of interest and; (3) a classification scheme\n('classcodes' object) with regular expressions to identify and\ncategorize relevant codes from (2). It is easy to introduce new\nclassification schemes ('classcodes' objects) or to use default\nschemes included in the package. Use cases includes patient\ncategorization based on 'comorbidity indices' such as\n'Charlson', 'Elixhauser', 'RxRisk V', or the\n'comorbidity-polypharmacy' score (CPS), as well as adverse\nevents after hip and knee replacement surgery.",
  "License": "GPL-2",
  "LazyData": "TRUE",
  "RoxygenNote": "7.3.2",
  "Roxygen": "list(markdown = TRUE)",
  "VignetteBuilder": "knitr",
  "URL": "https://docs.ropensci.org/coder/",
  "BugReports": "https://github.com/ropensci/coder/issues",
  "Encoding": "UTF-8",
  "Language": "en-US",
  "Repository": "https://ropensci.r-universe.dev",
  "Date/Publication": "2025-05-05 15:19:55 UTC",
  "RemoteUrl": "https://github.com/ropensci/coder",
  "RemoteRef": "master",
  "RemoteSha": "730d445598249bcafffdbbd47e450408befe486f",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-04-17 08:00:40 UTC",
    "User": "root"
  },
  "Author": "Erik Bulow [aut, cre] (ORCID: <https://orcid.org/0000-0002-9973-456X>),\nEmely C Zabore [rev] (Emily reviewed the package (v. 0.12.1) for\nrOpenSci, see\n<https://github.com/ropensci/software-review/issues/381>),\nDavid Robinson [rev] (David reviewed the package (v. 0.12.1) for\nrOpenSci, see\n<https://github.com/ropensci/software-review/issues/381>)",
  "Maintainer": "Erik Bulow <eriklgb@gmail.com>",
  "MD5sum": "2d085cec727e2e48319f60e7963dd6d3",
  "_user": "ropensci",
  "_type": "src",
  "_file": "coder_1.0.tar.gz",
  "_fileid": "511791f3bba0620c0b3e0b4f83c038500d3a340800401ad6b9a8e6d962dd16cf",
  "_filesize": 565689,
  "_sha256": "511791f3bba0620c0b3e0b4f83c038500d3a340800401ad6b9a8e6d962dd16cf",
  "_created": "2026-04-17T08:00:40.000Z",
  "_published": "2026-04-28T12:53:03.556Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 71787830514,
      "time": 132,
      "config": "linux-devel-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6491287354"
    },
    {
      "job": 71787830519,
      "time": 146,
      "config": "linux-release-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "6491290686"
    },
    {
      "job": 71787830517,
      "time": 82,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "6491274243"
    },
    {
      "job": 71787830496,
      "time": 113,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6491282189"
    },
    {
      "job": 71787450294,
      "time": 357,
      "config": "pkgdown",
      "r": "4.5.2",
      "check": "ERROR",
      "artifact": ""
    },
    {
      "job": 71787450291,
      "time": 176,
      "config": "source",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "6491253018"
    },
    {
      "job": 71787830465,
      "time": 119,
      "config": "wasm-release",
      "r": "4.5.1",
      "check": "OK",
      "artifact": "6491283394"
    },
    {
      "job": 71787830506,
      "time": 93,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "6491276885"
    },
    {
      "job": 71787830523,
      "time": 108,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "6491280859"
    },
    {
      "job": 71787830521,
      "time": 101,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6491279075"
    }
  ],
  "_buildurl": "https://github.com/r-universe/ropensci/actions/runs/24554441201",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/ropensci/coder",
  "_commit": {
    "id": "730d445598249bcafffdbbd47e450408befe486f",
    "author": "Erik Bülow <eriklgb@gmail.com>",
    "committer": "Erik Bülow <eriklgb@gmail.com>",
    "message": "new GH action\n",
    "time": 1746458395
  },
  "_maintainer": {
    "name": "Erik Bulow",
    "email": "eriklgb@gmail.com",
    "login": "eribul",
    "orcid": "0000-0002-9973-456X",
    "uuid": 7790927
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.5",
      "role": "Depends"
    },
    {
      "package": "data.table",
      "role": "Imports"
    },
    {
      "package": "decoder",
      "role": "Imports"
    },
    {
      "package": "generics",
      "role": "Imports"
    },
    {
      "package": "methods",
      "role": "Imports"
    },
    {
      "package": "tibble",
      "role": "Imports"
    },
    {
      "package": "covr",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "writexl",
      "role": "Suggests"
    }
  ],
  "_owner": "ropensci",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2025-19",
      "n": 2
    }
  ],
  "_tags": [],
  "_topics": [
    "classification",
    "icd-10"
  ],
  "_stars": 22,
  "_contributors": [
    {
      "user": "eribul",
      "count": 283,
      "uuid": 7790927
    },
    {
      "user": "dgrtwo",
      "count": 1,
      "uuid": 994718
    }
  ],
  "_userbio": {
    "uuid": 1200269,
    "type": "organization",
    "name": "rOpenSci",
    "description": "Tools and R Packages for Open Science"
  },
  "_downloads": {
    "count": 295,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/coder"
  },
  "_mentions": 1,
  "_devurl": "https://github.com/ropensci/coder",
  "_pkgdown": "https://docs.ropensci.org/coder/",
  "_searchresults": 30,
  "_metadata": {
    "review": {
      "id": 381,
      "status": "reviewed",
      "version": "0.11.9",
      "organization": "rOpenSci Software Review",
      "url": "https://github.com/ropensci/software-review/issues/381"
    },
    "ropensci_category": "data-extraction"
  },
  "_rbuild": "4.5.3",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/coder.html",
    "extra/contents.json",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/ropensci/coder",
  "_realowner": "ropensci",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.13.5",
      "date": "2021-01-18"
    },
    {
      "version": "0.13.8",
      "date": "2022-08-29"
    },
    {
      "version": "0.13.10",
      "date": "2023-03-14"
    }
  ],
  "_exports": [
    "%>%",
    "all_classcodes",
    "as.classcodes",
    "categorize",
    "classify",
    "codebook",
    "codebooks",
    "codify",
    "index",
    "is.classcodes",
    "set_classcodes",
    "visualize"
  ],
  "_datasets": [
    {
      "name": "charlson",
      "title": "Classcodes for Charlson comorbidity based on ICD-codes",
      "object": "charlson",
      "class": [
        "classcodes",
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "group",
        "description",
        "icd10",
        "icd9cm_deyo",
        "icd9cm_enhanced",
        "icd10_rcs",
        "icd10_swe",
        "icd8_brusselaers",
        "icd9_brusselaers",
        "charlson",
        "deyo_ramano",
        "dhoore",
        "ghali",
        "quan_original",
        "quan_updated"
      ],
      "rows": 17,
      "table": true,
      "tojson": true
    },
    {
      "name": "cps",
      "title": "Classcodes for the comorbidity-polypharmacy score (CPS) based on ICD-10 codes",
      "object": "cps",
      "class": [
        "classcodes",
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "group",
        "icd10",
        "only_ordinary"
      ],
      "rows": 2,
      "table": true,
      "tojson": true
    },
    {
      "name": "elixhauser",
      "title": "Classcodes for Elixhauser based on ICD-codes",
      "object": "elixhauser",
      "class": [
        "classcodes",
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "group",
        "icd10",
        "icd10_short",
        "icd9cm",
        "icd9cm_ahrqweb",
        "icd9cm_enhanced",
        "sum_all",
        "sum_all_ahrq",
        "walraven",
        "sid29",
        "sid30",
        "ahrq_mort",
        "ahrq_readm"
      ],
      "rows": 31,
      "table": true,
      "tojson": true
    },
    {
      "name": "ex_atc",
      "title": "Example data for random ATC codes",
      "object": "ex_atc",
      "class": [
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "name",
        "atc",
        "prescription"
      ],
      "rows": 10000,
      "table": true,
      "tojson": true
    },
    {
      "name": "ex_icd10",
      "title": "Example data for random codes assigned to random people",
      "object": "ex_icd10",
      "class": [
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "name",
        "admission",
        "icd10",
        "hdia"
      ],
      "rows": 2376,
      "table": true,
      "tojson": true
    },
    {
      "name": "ex_people",
      "title": "Example data for random people",
      "object": "ex_people",
      "class": [
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "name",
        "surgery"
      ],
      "rows": 100,
      "table": true,
      "tojson": true
    },
    {
      "name": "hip_ae",
      "title": "Classcodes for adverse events after knee and hip arthroplasty",
      "object": "hip_ae",
      "class": [
        "classcodes",
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "group",
        "icd10",
        "kva",
        "condition",
        "icd10_fracture"
      ],
      "rows": 7,
      "table": true,
      "tojson": true
    },
    {
      "name": "hip_ae_hailer",
      "title": "Classcodes for infection and dislocation after hip arthroplasty",
      "object": "hip_ae_hailer",
      "class": [
        "classcodes",
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "group",
        "icd10",
        "kva"
      ],
      "rows": 2,
      "table": true,
      "tojson": true
    },
    {
      "name": "knee_ae",
      "title": "Classcodes for adverse events after knee and hip arthroplasty",
      "object": "knee_ae",
      "class": [
        "classcodes",
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "group",
        "icd10",
        "kva",
        "condition"
      ],
      "rows": 7,
      "table": true,
      "tojson": true
    },
    {
      "name": "rxriskv",
      "title": "Classcodes for RxRisk V based on ATC codes",
      "object": "rxriskv",
      "class": [
        "classcodes",
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "group",
        "atc_pratt",
        "atc_caughey",
        "atc_garland",
        "pratt",
        "sum_all"
      ],
      "rows": 46,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "ae",
      "title": "Classcodes for adverse events after knee and hip arthroplasty",
      "concept": [
        "default classcodes"
      ],
      "topics": [
        "ae",
        "hip_ae",
        "knee_ae"
      ]
    },
    {
      "page": "all_classcodes",
      "title": "Summary data for all default classcodes object in the package",
      "concept": [
        "classcodes"
      ],
      "topics": [
        "all_classcodes"
      ]
    },
    {
      "page": "as.data.frame.classified",
      "title": "Convert output from classify() to matrix/data.frame/data.table",
      "concept": [
        "classcodes"
      ],
      "topics": [
        "as.data.frame.classified",
        "as.data.table.classified",
        "as.matrix.classified"
      ]
    },
    {
      "page": "as.keyvalue.classcodes",
      "title": "Make keyvalue object from classcodes object",
      "concept": [
        "helper"
      ],
      "topics": [
        "as.keyvalue.classcodes"
      ]
    },
    {
      "page": "categorize",
      "title": "Categorize cases based on external data and classification scheme",
      "concept": [
        "verbs"
      ],
      "topics": [
        "categorize",
        "categorize.codified",
        "categorize.data.frame",
        "categorize.data.table",
        "categorize.tbl_df"
      ]
    },
    {
      "page": "charlson",
      "title": "Classcodes for Charlson comorbidity based on ICD-codes",
      "concept": [
        "default classcodes"
      ],
      "topics": [
        "charlson"
      ]
    },
    {
      "page": "classcodes",
      "title": "Classcodes methods",
      "concept": [
        "classcodes"
      ],
      "topics": [
        "as.classcodes",
        "as.classcodes.classcodes",
        "as.classcodes.data.frame",
        "classcodes",
        "is.classcodes"
      ]
    },
    {
      "page": "classify",
      "title": "Classify codified data",
      "concept": [
        "verbs"
      ],
      "topics": [
        "classify",
        "classify.codified",
        "classify.data.frame",
        "classify.data.table",
        "classify.default"
      ]
    },
    {
      "page": "codebook",
      "title": "codebook(s) for classcodes object",
      "concept": [
        "classcodes"
      ],
      "topics": [
        "codebook",
        "codebooks",
        "print.codebook"
      ]
    },
    {
      "page": "codify",
      "title": "Codify case data with external code data (within specified time frames)",
      "concept": [
        "verbs"
      ],
      "topics": [
        "codify",
        "codify.data.frame",
        "codify.data.table",
        "print.codified"
      ]
    },
    {
      "page": "cps",
      "title": "Classcodes for the comorbidity-polypharmacy score (CPS) based on ICD-10 codes",
      "concept": [
        "default classcodes"
      ],
      "topics": [
        "cps"
      ]
    },
    {
      "page": "elixhauser",
      "title": "Classcodes for Elixhauser based on ICD-codes",
      "concept": [
        "default classcodes"
      ],
      "topics": [
        "elixhauser"
      ]
    },
    {
      "page": "ex_atc",
      "title": "Example data for random ATC codes",
      "concept": [
        "example data"
      ],
      "topics": [
        "ex_atc"
      ]
    },
    {
      "page": "ex_icd10",
      "title": "Example data for random codes assigned to random people",
      "concept": [
        "example data"
      ],
      "topics": [
        "ex_icd10"
      ]
    },
    {
      "page": "ex_people",
      "title": "Example data for random people",
      "concept": [
        "example data"
      ],
      "topics": [
        "ex_people"
      ]
    },
    {
      "page": "hip_ae_hailer",
      "title": "Classcodes for infection and dislocation after hip arthroplasty",
      "concept": [
        "default classcodes"
      ],
      "topics": [
        "hip_ae_hailer"
      ]
    },
    {
      "page": "index_fun",
      "title": "Calculate index based on classification scheme",
      "concept": [
        "verbs"
      ],
      "topics": [
        "index",
        "index.data.frame",
        "index.matrix",
        "index_fun"
      ]
    },
    {
      "page": "print.classcodes",
      "title": "Print classcodes object",
      "concept": [
        "classcodes"
      ],
      "topics": [
        "print.classcodes"
      ]
    },
    {
      "page": "print.classified",
      "title": "Printing classified data",
      "concept": [
        "classcodes"
      ],
      "topics": [
        "print.classified"
      ]
    },
    {
      "page": "rxriskv",
      "title": "Classcodes for RxRisk V based on ATC codes",
      "concept": [
        "default classcodes"
      ],
      "topics": [
        "rxriskv"
      ]
    },
    {
      "page": "set_classcodes",
      "title": "Set classcodes object",
      "concept": [
        "classcodes"
      ],
      "topics": [
        "set_classcodes"
      ]
    },
    {
      "page": "summary.classcodes",
      "title": "Summarizing a classcodes object",
      "concept": [
        "classcodes"
      ],
      "topics": [
        "print.summary.classcodes",
        "summary.classcodes"
      ]
    },
    {
      "page": "visualize.classcodes",
      "title": "Visualize classification scheme in web browser",
      "concept": [
        "classcodes"
      ],
      "topics": [
        "visualize.classcodes"
      ]
    }
  ],
  "_pkglogo": "https://github.com/ropensci/coder/raw/master/man/figures/logo.png",
  "_readme": "https://github.com/ropensci/coder/raw/master/README.md",
  "_rundeps": [
    "cli",
    "data.table",
    "decoder",
    "generics",
    "glue",
    "lifecycle",
    "magrittr",
    "pillar",
    "pkgconfig",
    "rlang",
    "tibble",
    "utf8",
    "vctrs"
  ],
  "_vignettes": [
    {
      "source": "classcodes.Rmd",
      "filename": "classcodes.html",
      "title": "Classcodes",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Motivating example",
        "Default classcodes",
        "classcodes object",
        "Hierarchy",
        "Conditions",
        "Use classcodes objects",
        "Explicit use of set_classcodes()",
        "Implicit use of set_classcodes()",
        "Bibliography"
      ],
      "created": "2020-04-22 11:21:44",
      "modified": "2020-11-19 17:00:06",
      "commits": 11
    },
    {
      "source": "coder.Rmd",
      "filename": "coder.html",
      "title": "coder",
      "author": "Erik Bulow",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Triad of objects",
        "Triad of functions",
        "Use case",
        "Charlson and Elixhauser",
        "Risk Rx V",
        "Concrete example",
        "Default categorization",
        "Specified time-window",
        "Alternative classification",
        "Specified index",
        "Dirty code data",
        "Bibliography"
      ],
      "created": "2018-10-04 10:29:17",
      "modified": "2021-01-12 10:54:54",
      "commits": 22
    },
    {
      "source": "ex_data.Rmd",
      "filename": "ex_data.html",
      "title": "Example data",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Patients",
        "Diagnoses data",
        "Medical data"
      ],
      "created": "2020-11-19 17:00:06",
      "modified": "2020-11-20 15:24:38",
      "commits": 2
    },
    {
      "source": "Interpret_regular_expressions.Rmd",
      "filename": "Interpret_regular_expressions.html",
      "title": "Interpret regular expressions",
      "engine": "knitr::rmarkdown",
      "headings": [
        "visualize()",
        "summary()",
        "",
        "codebook()",
        "codebooks()",
        "Bibliography"
      ],
      "created": "2020-11-19 17:00:06",
      "modified": "2020-11-19 17:00:06",
      "commits": 1
    }
  ],
  "_score": 6.1205739312058505,
  "_indexed": true,
  "_nocasepkg": "coder",
  "_universes": [
    "ropensci",
    "eribul"
  ],
  "_binaries": [
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.0",
      "date": "2026-04-17T08:02:43.000Z",
      "distro": "noble",
      "commit": "730d445598249bcafffdbbd47e450408befe486f",
      "fileid": "e535c517ac47d1ccce362626fcc27d10717caf4df8b45129b1593a500b9f77b5",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ropensci/actions/runs/24554441201"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.0",
      "date": "2026-04-17T08:02:04.000Z",
      "commit": "730d445598249bcafffdbbd47e450408befe486f",
      "fileid": "7d79353b39e1fe2c30a00f434a171292e244b9184af57e567461bb78638e37d4",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ropensci/actions/runs/24554441201"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "1.0",
      "date": "2026-04-17T08:02:26.000Z",
      "commit": "730d445598249bcafffdbbd47e450408befe486f",
      "fileid": "2f9e4a92e35a065c0974963ebf8c7d7d2ba1d2324cee56e21532585f453399cf",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ropensci/actions/runs/24554441201"
    },
    {
      "r": "4.5.1",
      "os": "wasm",
      "version": "1.0",
      "date": "2026-04-17T08:02:54.000Z",
      "commit": "730d445598249bcafffdbbd47e450408befe486f",
      "fileid": "1809e8b35acddd6d453ec1f2b8f06f6c476a7e9e341cde25da3e4587bdd8652b",
      "status": "success",
      "buildurl": "https://github.com/r-universe/ropensci/actions/runs/24554441201"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.0",
      "date": "2026-04-17T08:01:55.000Z",
      "commit": "730d445598249bcafffdbbd47e450408befe486f",
      "fileid": "ab4d4817cc4d4239c832bc13d3f698754bdbb111ad183167cc4c3cfea3757d68",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ropensci/actions/runs/24554441201"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.0",
      "date": "2026-04-17T08:02:10.000Z",
      "commit": "730d445598249bcafffdbbd47e450408befe486f",
      "fileid": "5eea78b8071dda8c424e28daaecb98ac33c39691b50f9980a1650eec4e974149",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ropensci/actions/runs/24554441201"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "1.0",
      "date": "2026-04-17T08:02:03.000Z",
      "commit": "730d445598249bcafffdbbd47e450408befe486f",
      "fileid": "0d78b504bcc22a0d65b7c1a0b0bc0d57c71d26b3a72d964ce4379dcf4ca3d88f",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ropensci/actions/runs/24554441201"
    }
  ]
}