Giter Club home page Giter Club logo

decaf-risk-calculator's Introduction

decaf-risk-calculator

build using "yarn run build"

run using "yarn run dev-server"

decaf-risk-calculator's People

Contributors

aalobai1 avatar

Watchers

 avatar

decaf-risk-calculator's Issues

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)

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 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.