DEMO — not a clinical decision system, not validated, no real patient data.
TRAUMATRIAL · ENGINE PLAYGROUND
← BACK TO DEMO

Engine playground

Two HTTP endpoints back the live demo — both run the same matching engine you can install from github.com/jajjer/traumatrial. Paste your own Patient JSON below, or copy one of the curl snippets and try it from your terminal.

POST /api/match

bundled trials → ranked MatchResult[] · returns latency

curl
curl -sS -X POST https://traumatrial.vercel.app/api/match \
  -H "Content-Type: application/json" \
  -d '{"patient_id":"P-CUSTOM","age_years":35,"sex":"M","gcs":7,"sbp_mmhg":95,"hr_bpm":118,"mechanism":"blunt_mvc","trauma_activation_level":1,"eta_minutes":8,"pregnancy_status":"not_applicable","anticoagulant_use":false,"presumed_tbi":true,"presumed_hemorrhage":false,"presumed_intracranial_hemorrhage":true,"spinal_injury_suspected":false}'

REQUEST · application/json

RESPONSE

// run a match to see the response
The TS engine is byte-equivalent to the Python core. Trials evaluated against: 10 bundled.

POST /api/parse-trial

clinicaltrials.gov NCT → schema-validated Trial · rate limited

curl
curl -sS -X POST https://traumatrial.vercel.app/api/parse-trial \
  -H "Content-Type: application/json" \
  -d '{"nct_id":"NCT05889650"}'
The server fetches the trial from clinicaltrials.gov, sends the criteria text through Claude with the engine's rule schema as the contract, validates every output, and retries on failure (max 3 attempts). Criteria that don't fit the 8-operator vocabulary are surfaced as skipped_criteria rather than silently dropped. 5 calls per IP per 10 minutes.

Or skip the network

install the engine and embed it locally

pip
pip install traumatrial-match
python
from traumatrial_match import Patient, Trial, Rule, match
result = match(patient, trial)
print(result.eligible, result.confidence)
for c in result.trace:
    print("HIT" if c.hit else "MISS", c.clause)
npm
npm install @traumatrial/match
typescript
import { match, matchAll } from "@traumatrial/match";
import { fromNemsisXml } from "@traumatrial/match/nemsis"; // optional, peer dep on fast-xml-parser
const result = match(patient, trial);