epocakir
🏥 Clinical coding of patients with kidney disease using KDIGO clinical practice guidelines
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.2%) to scientific vocabulary
Keywords
kdigo
kdigo-guidelines
kidney-disease
medical
r
r-package
rstats
Last synced: 10 months ago
·
JSON representation
Repository
🏥 Clinical coding of patients with kidney disease using KDIGO clinical practice guidelines
Basic Info
- Host: GitHub
- Owner: alwinw
- License: other
- Language: R
- Default Branch: master
- Homepage: https://alwinw.github.io/epocakir
- Size: 6.51 MB
Statistics
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 1
- Releases: 7
Topics
kdigo
kdigo-guidelines
kidney-disease
medical
r
r-package
rstats
Created almost 6 years ago
· Last pushed about 1 year ago
Metadata Files
Readme
Changelog
License
Codemeta
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# epocakir
*/ˈiːpɒk ə keɪ aɪ ɑː/*
[](https://cran.r-project.org/package=epocakir)
[](https://github.com/alwinw/epocakir/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/alwinw/epocakir)
[](https://www.repostatus.org/)
[](https://lifecycle.r-lib.org/articles/stages.html#stable)
[](https://cran.r-project.org/package=epocakir)
## Clinical Coding of Patients with Kidney Disease
The *epocakir* package makes clinical coding of patients with kidney disease using clinical practice guidelines easy.
The guidelines used are the evidence-based [KDIGO guidelines](https://kdigo.org/guidelines/).
This package covers acute kidney injury (AKI), anemia, and chronic kidney disease (CKD):
- `aki_staging()`: Classification of AKI staging (`aki_stages`) with automatic selection of:
- `aki_bCr()`: AKI based on baseline creatinine
- `aki_SCr()`: AKI based on changes in serum creatinine
- `aki_UO()`: AKI based on urine output
- `anemia()`: Classification of anemia
- Classification of albuminuria (`Albuminuria_stages`)
- `Albuminuria_staging_ACR()`: Albuminuria based on Albumin excretion rate
- `Albuminuria_staging_AER()`: Albuminuria based on Albumin-to-creatinine ratio
- `eGFR()`: Estimation of glomerular filtration rate with automatic selection of:
- `eGFR_adult_SCr()`: eGFR based on the 2009 CKD-EPI creatinine equation
- `eGFR_adult_SCysC()`: eGFR based on the 2012 CKD-EPI cystatin C equation
- `eGFR_adult_SCr_SCysC()`: eGFR based on the 2012 CKD-EPI creatinine-cystatin C equation
- `eGFR_child_SCr()`: eGFR based on the pediatric creatinine-based equation
- `eGFR_child_SCr_BUN()`: eGFR based on the pediatric creatinine-BUN equation
- `eGFR_child_SCysC()`: eGFR based on the pediatric cystatin C-based equation
- `GFR_staging()`: Staging of GFR (`GFR_stages`)
- Multiple utility functions including:
- `conversion_factors`: Conversion factors used throughout the KDIGO guidelines
- `as_metric()`: Conversion of a measured value into metric units
- `dob2age()`: Calculation of age from a date of birth
- `binary2factor()`: Conversion of binary data into factors based on a column name
- `combine_date_time_cols()`: Combining separate date and time columns into a single date and time column
- `combn_changes`: Generating changes between measurements
## Installation
You can install the **released** version from [CRAN](https://cran.r-project.org/package=epocakir) with:
```{r cran, eval=FALSE}
install.packages("epocakir")
```
You can install the **development** version from [GitHub](https://github.com/alwinw/epocakir) with:
```{r dev, eval=FALSE}
# install.packages("remotes")
remotes::install_github("alwinw/epocakir")
```
## Getting Started
```{r pkgs, message = FALSE, warning=FALSE}
library(epocakir)
library(dplyr)
library(units)
```
Often clinical data must be cleansed and tidied before analysis can begin.
To assist in this, several utility functions have been included.
To explore these, consider a sample clinical dataset `clinical_obvs`:
```{r clinical_data}
glimpse(clinical_obvs)
tidy_obvs <- clinical_obvs %>%
combine_date_time_cols() %>%
mutate(
Age = dob2age(`Date of Birth`),
Height = as_metric(height = set_units(as.numeric(Height), "cm"))
) %>%
binary2factor(Male, Surgery)
glimpse(tidy_obvs)
```
Make sure to use `set_units()` from the `units` package to convert all measurements into unit objects for automatic unit conversion in epocakir.
## Examples
It is possible to use `aki_staging()` to automatically classify the presence and staging of AKI.
If a particular method is required, it is possible to classify AKI using `aki_bCr()`, `aki_SCr()` or `aki_UO().`
```{r aki}
head(aki_pt_data)
aki_staging(aki_pt_data,
SCr = "SCr_", bCr = "bCr_", UO = "UO_",
dttm = "dttm_", pt_id = "pt_id_"
)
aki_pt_data %>%
mutate(aki = aki_staging(
SCr = SCr_, bCr = bCr_, UO = UO_,
dttm = dttm_, pt_id = pt_id_
)) %>%
select(pt_id_, SCr_:dttm_, aki)
aki_pt_data %>%
mutate(aki = aki_SCr(
SCr = SCr_, dttm = dttm_, pt_id = pt_id_
)) %>%
select(pt_id_, SCr_:dttm_, aki)
```
Similarly, `eGFR()` offers the ability to automatically select the appropriate formula to estimate the glomerular filtration rate.
If a particular formula is required, then `eGFR_adult_SCr`, `eGFR_adult_SCysC`, `eGFR_adult_SCr_SCysC`, `eGFR_child_SCr`, `eGFR_child_SCr_BUN`, or `eGFR_child_SCysC` can be used.
```{r eGFR}
head(eGFR_pt_data)
eGFR(eGFR_pt_data,
SCr = "SCr_", SCysC = "SCysC_",
Age = "Age_", height = "height_", BUN = "BUN_",
male = "male_", black = "black_", pediatric = "pediatric_"
)
eGFR_pt_data %>%
dplyr::mutate(eGFR = eGFR(
SCr = SCr_, SCysC = SCysC_,
Age = Age_, height = height_, BUN = BUN_,
male = male_, black = black_, pediatric = pediatric_
)) %>%
select(SCr_:pediatric_, eGFR)
eGFR_pt_data %>%
dplyr::mutate(eGFR = eGFR_adult_SCr(
SCr = SCr_, Age = Age_, male = male_, black = black_
)) %>%
select(SCr_:pediatric_, eGFR)
```
## References
KDIGO Guidelines -
## Activity





----
See for more usage details and package reference.
Owner
- Name: Alwin Wang
- Login: alwinw
- Kind: user
- Location: Australia
- Website: researchgate.net/profile/Alwin_Wang
- Repositories: 7
- Profile: https://github.com/alwinw
Former design lead @MonashUAS
CodeMeta (codemeta.json)
{
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"@type": "SoftwareSourceCode",
"identifier": "epocakir",
"description": "Clinical coding and diagnosis of patients with kidney using clinical practice guidelines. The guidelines used are the evidence-based KDIGO guidelines, see <https://kdigo.org/guidelines/> for more information. This package covers acute kidney injury (AKI), anemia, and chronic kidney disease (CKD).",
"name": "epocakir: Clinical Coding of Patients with Kidney Disease",
"relatedLink": "https://alwinw.github.io/epocakir/",
"codeRepository": "https://github.com/alwinw/epocakir",
"issueTracker": "https://github.com/alwinw/epocakir/issues",
"license": "https://spdx.org/licenses/MIT",
"version": "1.0.0",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 4.5.1 (2025-06-13 ucrt)",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"author": [
{
"@type": "Person",
"givenName": "Alwin",
"familyName": "Wang",
"email": "alwin.wang@austin.org.au",
"@id": "https://orcid.org/0000-0003-4883-2917"
},
{
"@type": "Person",
"givenName": "Lisa",
"familyName": "Toh",
"email": "lisa.toh2@austin.org.au",
"@id": "https://orcid.org/0000-0002-5994-3666"
}
],
"contributor": [
{
"@type": "Person",
"givenName": "Davis",
"familyName": "Vaughan",
"email": "davis@rstudio.com"
},
{
"@type": "Person",
"givenName": "Olivier",
"familyName": "Roy"
},
{
"@type": "Person",
"givenName": "Inaki",
"familyName": "Ucar"
}
],
"maintainer": [
{
"@type": "Person",
"givenName": "Alwin",
"familyName": "Wang",
"email": "alwin.wang@austin.org.au",
"@id": "https://orcid.org/0000-0003-4883-2917"
}
],
"softwareSuggestions": [
{
"@type": "SoftwareApplication",
"identifier": "testthat",
"name": "testthat",
"version": ">= 3.0.0",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=testthat"
},
{
"@type": "SoftwareApplication",
"identifier": "knitr",
"name": "knitr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=knitr"
},
{
"@type": "SoftwareApplication",
"identifier": "rmarkdown",
"name": "rmarkdown",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=rmarkdown"
},
{
"@type": "SoftwareApplication",
"identifier": "vctrs",
"name": "vctrs",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=vctrs"
}
],
"softwareRequirements": {
"1": {
"@type": "SoftwareApplication",
"identifier": "R",
"name": "R",
"version": ">= 3.5.0"
},
"2": {
"@type": "SoftwareApplication",
"identifier": "dplyr",
"name": "dplyr",
"version": ">= 1.0.1",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=dplyr"
},
"3": {
"@type": "SoftwareApplication",
"identifier": "tidyr",
"name": "tidyr",
"version": ">= 1.1.1",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=tidyr"
},
"4": {
"@type": "SoftwareApplication",
"identifier": "tibble",
"name": "tibble",
"version": ">= 3.0.1",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=tibble"
},
"5": {
"@type": "SoftwareApplication",
"identifier": "rlang",
"name": "rlang",
"version": ">= 1.0.0",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=rlang"
},
"6": {
"@type": "SoftwareApplication",
"identifier": "units",
"name": "units",
"version": ">= 0.7",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=units"
},
"7": {
"@type": "SoftwareApplication",
"identifier": "lubridate",
"name": "lubridate",
"version": ">= 1.7.0",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=lubridate"
},
"8": {
"@type": "SoftwareApplication",
"identifier": "magrittr",
"name": "magrittr",
"version": ">= 2.0.1",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=magrittr"
},
"SystemRequirements": null
},
"fileSize": "403.521KB"
}
GitHub Events
Total
- Issue comment event: 2
- Push event: 9
- Pull request event: 3
- Create event: 1
Last Year
- Issue comment event: 2
- Push event: 9
- Pull request event: 3
- Create event: 1
Committers
Last synced: over 3 years ago
All Time
- Total Commits: 288
- Total Committers: 5
- Avg Commits per committer: 57.6
- Development Distribution Score (DDS): 0.486
Top Committers
| Name | Commits | |
|---|---|---|
| AlwinW | 1****W@u****m | 148 |
| alwinw | 1****w@u****m | 78 |
| lymt | 6****t@u****m | 58 |
| GitHub Actions | a****s@g****m | 3 |
| DavisVaughan | d****s@r****m | 1 |
Committer Domains (Top 20 + Academic)
rstudio.com: 1
github.com: 1
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 1
- Total pull requests: 43
- Average time to close issues: N/A
- Average time to close pull requests: 9 days
- Total issue authors: 1
- Total pull request authors: 4
- Average comments per issue: 0.0
- Average comments per pull request: 0.12
- Merged pull requests: 42
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: 4 months
- Issue authors: 0
- Pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 2.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- alwinw (1)
Pull Request Authors
- alwinw (34)
- lymt (7)
- olivroy (2)
- DavisVaughan (1)
Top Labels
Issue Labels
Pull Request Labels
hacktoberfest-accepted (5)
Packages
- Total packages: 1
-
Total downloads:
- cran 273 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 3
- Total maintainers: 1
cran.r-project.org: epocakir
Clinical Coding of Patients with Kidney Disease
- Homepage: https://github.com/alwinw/epocakir
- Documentation: http://cran.r-project.org/web/packages/epocakir/epocakir.pdf
- License: MIT + file LICENSE
-
Latest release: 0.9.9
published over 3 years ago
Rankings
Forks count: 21.9%
Stargazers count: 22.5%
Dependent packages count: 29.8%
Average: 31.2%
Dependent repos count: 35.5%
Downloads: 46.4%
Maintainers (1)
Last synced:
10 months ago
Dependencies
DESCRIPTION
cran
- R >= 3.5.0 depends
- dplyr >= 1.0.1 imports
- ellipsis * imports
- lubridate >= 1.7.0 imports
- magrittr >= 2.0.1 imports
- rlang >= 0.4.0 imports
- tibble >= 3.0.1 imports
- tidyr >= 1.1.1 imports
- units >= 0.7 imports
- covr * suggests
- knitr * suggests
- rmarkdown * suggests
- testthat * suggests
- usethis * suggests
- vctrs * suggests
.github/workflows/R-CMD-check.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/document.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/lint.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml
actions
- JamesIves/github-pages-deploy-action v4.4.1 composite
- actions/checkout v3 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pr-commands.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/pr-fetch v2 composite
- r-lib/actions/pr-push v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/render-rmarkdown.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-renv v2 composite
.github/workflows/style.yaml
actions
- actions/cache v3 composite
- actions/checkout v3 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml
actions
- actions/checkout v3 composite
- actions/upload-artifact v3 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite