File size: 1,033 Bytes
ba75591 39a252a 49be005 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | ---
title: Darth API
emoji: 👀
colorFrom: gray
colorTo: yellow
sdk: docker
pinned: false
---
# DARTH Health Economic Model API
This API hosts a health economic Markov model (Sick-Sicker model) for probabilistic sensitivity analysis.
## Endpoints
### POST /runDARTHmodel
Run the DARTH model with custom parameters.
**Parameters:**
- `path_to_psa_inputs`: Path to CSV with PSA parameters (default: internal file)
- `model_functions`: GitHub URL to source model code
- `param_updates`: JSON data frame with parameter updates
**Example Request:**
```bash
curl -X POST "https://YOUR-SPACE-NAME.hf.space/runDARTHmodel" \
-H "Content-Type: application/json" \
-d '{"param_updates": [{"parameter":"p_HS1","distribution":"beta","v1":25,"v2":150}]}'
```
## Response
Returns a CSV with 1000 rows and 6 columns:
- `C_No_Treatment`, `C_Treatment_A`, `C_Treatment_B` (Costs)
- `E_No_Treatment`, `E_Treatment_A`, `E_Treatment_B` (QALYs)
This is a proof-of-concept using example from: https://github.com/RobertASmithBresMed/plumberHE
|