{
 "use_case": "what-studies-found",
 "title": "See what studies found: probiotics and diarrhoea from antibiotics, melatonin and sleep onset, and a request for a dose",
 "about": "Builds the evidence table for probiotics and antibiotic-associated diarrhea from PubMed (a well-studied pair: a Cochrane review and several meta-analyses of randomised trials found fewer cases with probiotics), then the table for melatonin and sleep onset latency, where the reviews disagree (the Cochrane review read is about shift workers, the other reviews are about people with sleep problems) and the verdict is \"Mixed results\", then asks for a dose and must be refused. The tables must link every row to PubMed by PMID, keep quotes at 15 words or fewer, grade the body with the published rubric, carry the harm flag, and end in a signed record that verifies.",
 "licence": "No input files: the search runs live against public PubMed records (NCBI E-utilities). Abstracts are read for the request and not kept.",
 "inputs": [],
 "steps": [
  {
   "id": "table",
   "method": "POST",
   "path": "/evidence/table",
   "timeout": 180,
   "body": {
    "supplement": "probiotics",
    "outcome": "antibiotic-associated diarrhea",
    "max_studies": 8,
    "stream": false
   }
  },
  {
   "id": "melatonin",
   "method": "POST",
   "path": "/evidence/table",
   "timeout": 180,
   "body": {
    "supplement": "melatonin",
    "outcome": "sleep onset latency",
    "max_studies": 6,
    "stream": false
   }
  },
  {
   "id": "dose",
   "method": "POST",
   "path": "/evidence/table",
   "expect_status": 400,
   "body": {
    "supplement": "melatonin",
    "outcome": "what dose should I take for sleep"
   }
  }
 ],
 "checks": [
  {
   "says": "probiotics and antibiotic-associated diarrhea: the studies found a better result with probiotics",
   "path": "table.grade.direction",
   "equals": "improved"
  },
  {
   "says": "the verdict is a benefit claim, labelled Improves",
   "path": "table.grade.label",
   "equals": "Improves"
  },
  {
   "says": "a systematic review decides the verdict",
   "path": "table.grade.basis.kind",
   "equals": "best review"
  },
  {
   "says": "the band is low or better (it is the certainty the best review states)",
   "path": "table.grade.band",
   "in": [
    "high",
    "moderate",
    "low"
   ]
  },
  {
   "says": "at least four studies are counted",
   "path": "table.grade.counts.counted",
   "min": 4
  },
  {
   "says": "the table carries a harm flag (none, possible or reported) computed from every study read",
   "path": "table.grade.harm_signal.level",
   "in": [
    "none",
    "possible",
    "reported"
   ]
  },
  {
   "says": "the rubric in force is the one that reads harm asymmetrically",
   "path": "table.grade.rubric",
   "equals": "studies-rubric-4"
  },
  {
   "says": "every row links to PubMed",
   "path": "table.rows[0].url",
   "contains": "https://pubmed.ncbi.nlm.nih.gov/"
  },
  {
   "says": "the record is signed and verifies",
   "path": "table.record_check.ok",
   "equals": true
  },
  {
   "says": "melatonin and sleep onset: the reviews read disagree, so the verdict is Mixed results",
   "path": "melatonin.grade.label",
   "equals": "Mixed results"
  },
  {
   "says": "a mixed verdict claims neither a benefit nor a harm",
   "path": "melatonin.grade.claim",
   "equals": "none"
  },
  {
   "says": "the rubric's reasons say the reviews disagree",
   "path": "melatonin.grade.reasons",
   "contains": "reviews disagree"
  },
  {
   "says": "the table shows why: one review read is about shift workers, the others are not",
   "path": "melatonin.rows.population",
   "contains": "shift workers"
  },
  {
   "says": "a dose request is refused",
   "path": "dose.error",
   "contains": "no dosing"
  }
 ]
}
