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