A Multi State Competing Risks model to predict COVID-19 medical conditions
- R >= 4.0
- Node >= 13.0
cd competing-risks/client
npm run build
cd ..
docker-compose upFirst, clone this repository:
git clone https://github.com/idocal/competing-risks.git
cd competing-risksNow add your CSV data file to server/data directory.
To start the R server:
cd server
Rscript serve.RR should mow be listening to port 8000.
To start the client:
cd client
npm install
npm run startThe React server should now be running on port 3000. The website should be available through the browser at: http://localhost:3000
The R server runs 20,000 Monte Carlo simulations for a requested patient and returns:
- Death probability
- Time at hospital quantiles (0.1, 0.25, 0.5, 0.7, 0.9)
- Time at Severe condition in days
Each requests expects:
- Age
- Gender (Male 1 or Female 2)
- Start State Type
- Start State
- Visited States
Example request:
curl --data '{"age": 45, "gender": 1, "start_state_type": 3, "start_state": 23, "states": [{"medicalState": 2, "hospital": 5}]}' "http://localhost:8000/patient"