Giter Club home page Giter Club logo

riskscorer's Introduction

riskscorer Package-License DOI

riskscorer provides an interface for calculation of clinical risk scores

At the moment the following score are implemented

The following will be added in a future release:

Eventually

Example

In this simple example known data of a potential patient is entered as arguments.

calc_sts(proc_cabg = TRUE,
           proc_valve = "avr",
           gender = "male",
           age = 60,
           lvef = 35,
           weight_kg = 65,
           height_cm = 185,
           chf_2w = "yes")

# Source: local data frame [1 x 10]
# 
# Procedure Mortality Morbidity_Mortality DSW_Infection Long_LOS Perm_Stroke Prolong_Vent Renal_failure Reoperation Short_LOS
# (chr)     (dbl)               (dbl)         (dbl)    (dbl)       (dbl)        (dbl)         (dbl)       (dbl)     (dbl)
# 1 AV Replacement + CAB   0.01415             0.11393       0.00168  0.04453     0.00878      0.06237       0.01895     0.06435   0.51145

Coding can differ for factor variables. Simple heuristics translate common clinical factor codings. For example "Female", "female" or "f" will all be detected as female gender. Boolean variables such as '0', '1', 'True', 'T', "Y", "Yes" will be detected. Documentation about coding and interpretation is available for every score component.

calc_sts(proc_cabg = TRUE,
           proc_valve = "avr",
           gender = "m",
           age = 60,
           lvef = 35,
           weight_kg = 65,
           height_cm = 185,
           chf_2w = 1)
Source: local data frame [1 x 10]

# Procedure Mortality Morbidity_Mortality DSW_Infection Long_LOS Perm_Stroke Prolong_Vent Renal_failure Reoperation
#      (chr)     (dbl)               (dbl)         (dbl)    (dbl)       (dbl)        (dbl)         (dbl)       (dbl)
# 1 AV Replacement + CAB   0.01415             0.11393       0.00168  0.04453     0.00878      0.06237       0.01895     0.06435
# Variables not shown: Short_LOS (dbl)

Web service ready thanks to plumber

Thanks to the fantastic plumber package, every score calculation function can be easily used as a web service. Each risk score has its dedicated self contained R source file, such as R/sts.R.

Setting up a web service is as easy as running the following lines of code:

service <- plumber::plumb("R/sts.R")
service$run(port = 8080)

The hosting of such a service is well documented at the plumber documentation.

Installation

Pre-release versions can be installed from this repository via

if (!require("devtools")) install.packages("devtools")
devtools::install_github("meyera/riskscorer")

A CRAN release will follow.

Authors

Alexander Meyer

License

The MIT License (MIT)

riskscorer's People

Contributors

meyera avatar schnayo avatar

Watchers

James Cloos avatar Hatem Hosny avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.