Travis Nesbit, MD (geekmdtravis) | GeekMD, LLC
Main | Development | Coverage |
---|---|---|
Decision support is an important part of modern medical practice. Central to this decision support are various evidence-based calculations and algorithms. There are several tools on the internet that allow people to manually enter data to calculate values that aid clinicians as decision support, however to date a comprehensive API is not available in the open source space. geekmdcalc-js
is a JavaScript library that addresses this knowledge-vaccum in the open-source community.
There are two major reasons.
- This is an open-source project. JavaScript is ubiquitous, and developers are plentiful.
- JavaScript can easily be integrated into front-end and back-end applications.
This package can be downloaded and built, and eventually will be published to npm
.
This is a significant cardiovascular disease risk equation in clinical medicine. It's been used extensively to risk-stratify patients, and widely adopted and modified. Please see the attached study for information on the version implemented here.
Method signature
const framingham = (data, options)
data
type ASCVDData = {
age: number,
isDiabetic: boolean,
isGeneticMale: boolean,
isBlack: boolean,
isOnBloodPressureMeds: boolean,
isSmoker: boolean,
cholesterolTotal: number, // mg/dL
cholesterolHDL: number, // mg/dL
systolicBloodPressure: number, // mmHg
}
* NOTE: While the function framingham
shares the type
of ASCVDData
with pooledCohort2013
, race is not considered in this equation so the isBlack
boolean parameter will have no effect on the output.
options
type ASCVDOptions = {
calculationMethod: string,
avgRiskMethod: string,
}
calculationMethod
: points | regression*avgRiskMethod
: constant | calculated*
* CAUTION: calculationMethod
regression and avgRiskMethod
calculated are experimental. They have not yet been tested extensively.
return
type FraminghamResult = {
tenYearRisk: number,
averageTenYearRisk: number,
heartAge: number,
}
NOT IMPLEMENTED
Ensure you have git
and npm
or yarn
installed.
- Clone the repo using the GitHub® link above.
- Run
yarn build
ornpm run build
to have the ES6 content transpiled to CommomJS in thebuild
folder.
NOTE: This packages is not yet depoyed to NPM
This part is easy. Everyone is invited to contribute!
- If you see an issue that you feel you can address, feel free to fork and get to work.
- If you have a feature request, bug fix, or other issue, feel free to add it to the issues board. And, you can also takle the problem yourself.
- Self-documenting code is best. If your code is clean, people should be able to figure it out by the file names and methods.
- If you feel a particular piece of code is complex, then feel free to add additional commentary.
- Use standard JavaScript file, function, variable, etc. naming conventions.
- Where appropriate, use
flow
for type-checking. Theflow-bin
library is listed as a development dependency. - Test! While we make no guarantees with this open source product and while everybody should test it themselves before they put it into product as they assume responsibilty for the product, your logic for medical calculations should be evidence-based and have an adequate number of test cases to ensure you've covered every reasonable case.
Branches should follow the following naming convention:
- Bug Fixes:
bugfix-[issue#]<-[optional description]>
.- Example: A bug fix for calculating an age wrong.
bugfix-23-display-age
- Feature Request:
feature-[issue#]<-[optional description]>
.- Example: Add FIB-4 calculation.
feature-12-fib4
- Other Issues:
issue-[issue#]<-[optional desription]>
.- Example: Improve documentation.
issue-89-improve-docs
General template: "<[ci skip]> [#issue] - Message content goes here
" where content inside of <
and >
is optional.
Example: [ci skip] #103 - Updated 'How can I help?' section of the README.md
- Commit's the
master
anddevelopment
will be tested with Travis CI continuous integration system. If you feel that the commit does not need to be tested, then prepend[ci skip]
to the commit message. - All Commit messages should include
#issue
in the message so that the issue and project boards can track properly. - Message content should be descriptive, but brief.
Always make pull requests for development
and NOT master
.