CureApp / adopt-lc

calculates ADOPT-LC

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AdoptLC

installation

git clone github:CureApp/adopt-lc.git
npm install
npm install -g mocha # only for test.

and put it to "lib" directory in Titanium Alloy

usage

Child-Pugh Classification

ChildPughClassification = require('adopt-lc').ChildPughClassification

cpclass = new ChildPughClassification(
    2   #  frequency of encephalopathy
    2   #  degree of ascites
    3.1 #  total billirubin
    3.0 #  albumin
    77  #  prothrombin time
)

score = cpclass.getScore() # A|B|C

Charlson Comorbidity Index

CharlsonComorbidityIndex = require('adopt-lc').CharlsonComorbidityIndex
ccindex = new CharlsonComorbidityIndex()
ccindex.hasAIDS = true
score = ccindex.getScore() # number
description = ccindex.getScoreDescription() # Low|Moderate|High|Very high

Adopt-LC

AdoptLC = require('adopt-lc').AdoptLC
adoptLC = new AdoptLC(
    71  # age
    'A' # Child-Pugh score
    3   # score value of Charlson Comorbidity Index
    400 # duration of anesthesia
)
score = adoptLC.getScore() # number
mortality = adoptLC.getMortality() # number(float)

test

cake test

or

npm test

About

calculates ADOPT-LC


Languages

Language:CoffeeScript 99.1%Language:JavaScript 0.9%