decaf-risk-calculator's Introduction
decaf-risk-calculator's People
decaf-risk-calculator's Issues
Test coverage
Let's see if we can get some test coverage.
I suggest using jest
and enzyme
.
Use of constants and mappings
There are several concepts in the app that seem like good candidates to be defined as constants such as hospitalMortality
, risk
, care
, and decafScore
.
It would be helpful to define them as const
somewhere, and use them throughout the app instead of having their definitions show up as part of conditional logic.
There may be a map (data structure) you can use to represent some of these relationships that could help clean up some of the code:
{
1: {
hospitalMortality: '...',
risk: '...',
care: '...'
},
...
}
Again, probably need some iteration on this concept before it fits this use case
Calculate on the fly
It might not be necessary to always wait for a click on the calculate
button in order to perform a calculation.
Can you think of a way that would enable the calculator to react to any form input, and return a calculation? (as long as they are all set)
Don't commit your `node_modules`
package.json
is sufficient to define external dependancies without having to commit the actual source of those dependencies to your repo.
(This is in contrast to pod files that are sometimes committed with iOS projects where dependency version management is a bit less stable)
Repo name should not be Wellsheet
Do you mind changing the name of this repo to something other than wellsheet
?
My suggestion: decaf-risk-calculator
Componentize toggle buttons
There are a few form-input button-like components that all look and behave really simliarly:
ExtendedMrc
Eosinopenia
ChestXray
AtrialFibrilation
Acidemia
Can you think of a way to consolidate them into a single, re-useable component?
A call signature like
<ToggleButton
title={'Eosinopenia'}
options={eosinopeniaOptions}
onSelect={() => this.onSelectEosinopenia}>
could take you a long way (will probably need to iterate on this).
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.