Open clinical calculators · MIT licensed · DOI 10.5281/zenodo.20562618 · github.com/laurapiro17/medikquantis
# Single calculation, response in Spanish curl -X POST "https://medikquantis.vercel.app/api/v1/cha2ds2vasc?lang=es" -H "Content-Type: application/json" -d '{"age":72,"sex":"female","chf":false,"hypertension":true,"diabetes":false,"strokeOrTia":true,"vascularDisease":false}' # Two calcs in one request via /batch curl -X POST "https://medikquantis.vercel.app/api/v1/batch" -H "Content-Type: application/json" -d '{"calcs":[{"id":"cha2ds2vasc","inputs":{"age":72,"sex":"female","chf":false,"hypertension":true,"diabetes":false,"strokeOrTia":true,"vascularDisease":false}},{"id":"hasbled","inputs":{"age":72,"uncontrolledHypertension":false,"abnormalRenalFunction":false,"abnormalLiverFunction":false,"strokeHistory":true,"bleedingHistoryOrPredisposition":false,"labileInr":false,"drugsPredisposingToBleeding":false,"alcoholExcess":false}}]}'
const res = await fetch( "https://medikquantis.vercel.app/api/v1/cha2ds2vasc?lang=ca", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ age: 72, sex: "female", chf: false, hypertension: true, diabetes: false, strokeOrTia: true, vascularDisease: false, }), }, ); const data = await res.json(); console.log(data.score, data.tier, data.recommendation);
import httpx resp = httpx.post( "https://medikquantis.vercel.app/api/v1/cha2ds2vasc", params={"lang": "es"}, json={ "age": 72, "sex": "female", "chf": False, "hypertension": True, "diabetes": False, "strokeOrTia": True, "vascularDisease": False, }, timeout=10, ) data = resp.json() print(data["score"], data["tier"], data["recommendation"])