{
 "use_case": "device-mdr-triage",
 "title": "MDR triage: a catheter fragment the sales rep heard about first, a cosmetic crack, and a failure-mode trend",
 "about": "Two synthetic device complaints and a synthetic trend. The first: a PICC catheter tip separated on removal and the fragment was snared out in interventional radiology; the sales rep was told on 2 Sep 2026 and the complaint unit logged it on 14 Sep. The triage must say reportable (a serious injury: an intervention to prevent permanent damage), quote it, and start the 30-day clock on 2 Sep (due 2 Oct), not 14 Sep. A named person then signs the decision. The second: a hairline crack in a CPAP humidifier lid's cosmetic cover, device working, no injury: not reportable, and no narrative drafted. The trend: seven complaints about one fictional pump, four with an occlusion alarm that did not sound, one of them a serious injury; the malfunction-only ones of that mode are flagged to re-triage under FDA's two-year presumption. Both signed records verify, and fail once changed.",
 "licence": "Synthetic (CC0): the complaints, devices and companies are invented (decosa_api/verticals/mdr/data/samples.json). Part of decosa-api, AGPL-3.0-or-later.",
 "inputs": [
  {
   "file": "inputs/reportable-complaint.json",
   "what": "The catheter complaint: narrative, received date, device, complainant and patient fields."
  },
  {
   "file": "inputs/reportable-product.json",
   "what": "Its product information: name, common name, labeling, class."
  },
  {
   "file": "inputs/cosmetic-complaint.json",
   "what": "The CPAP lid complaint, with correction and reply."
  },
  {
   "file": "inputs/cosmetic-product.json",
   "what": "Its product information."
  },
  {
   "file": "inputs/trend-complaints.json",
   "what": "Seven complaints for the trend view: id, device, failure mode, date, outcome, malfunction, triage."
  }
 ],
 "steps": [
  {
   "id": "clock",
   "method": "POST",
   "path": "/mdr/clock",
   "auth": false,
   "body": {
    "aware_date": "2026-09-02",
    "fda_5day_request": true
   }
  },
  {
   "id": "reportable",
   "method": "POST",
   "path": "/mdr/triage",
   "body": {
    "complaint": {
     "$file": "inputs/reportable-complaint.json"
    },
    "product": {
     "$file": "inputs/reportable-product.json"
    },
    "role": "manufacturer",
    "today": "2026-09-26",
    "title": "Rehearsal: catheter fragment"
   }
  },
  {
   "id": "verify",
   "method": "POST",
   "path": "/record/verify",
   "auth": false,
   "body": {
    "record": {
     "$ref": "reportable.record"
    }
   }
  },
  {
   "id": "tampered",
   "method": "POST",
   "path": "/record/verify",
   "auth": false,
   "body": {
    "record": {
     "$ref": "reportable.record"
    }
   },
   "tamper": {
    "at": "record.statement.triage",
    "set": "not_reportable"
   }
  },
  {
   "id": "decide",
   "method": "POST",
   "path": "/mdr/decide",
   "body": {
    "triage_record": {
     "$ref": "reportable.record"
    },
    "decision": "reportable",
    "report_type": "30_day",
    "decider": {
     "name": "Rehearsal Reviewer",
     "role": "RA specialist"
    },
    "rationale": "Snare retrieval of a retained catheter fragment is an intervention to prevent permanent damage."
   }
  },
  {
   "id": "verify_decision",
   "method": "POST",
   "path": "/record/verify",
   "auth": false,
   "body": {
    "record": {
     "$ref": "decide.record"
    }
   }
  },
  {
   "id": "cosmetic",
   "method": "POST",
   "path": "/mdr/triage",
   "body": {
    "complaint": {
     "$file": "inputs/cosmetic-complaint.json"
    },
    "product": {
     "$file": "inputs/cosmetic-product.json"
    },
    "role": "manufacturer",
    "today": "2026-09-26",
    "title": "Rehearsal: cosmetic crack"
   }
  },
  {
   "id": "trend",
   "method": "POST",
   "path": "/mdr/trend",
   "body": {
    "complaints": {
     "$file": "inputs/trend-complaints.json"
    }
   }
  }
 ],
 "checks": [
  {
   "says": "a 5-day report requested by FDA is due 5 work days after 2 Sep 2026, skipping Labor Day (no model)",
   "path": "clock.primary.deadline",
   "equals": "2026-09-10"
  },
  {
   "says": "the catheter complaint looks reportable",
   "path": "reportable.decision.decision",
   "equals": "reportable"
  },
  {
   "says": "the outcome is a serious injury, with a quote from the complaint",
   "path": "reportable.judgments[id=outcome][0].answer",
   "equals": "serious_injury"
  },
  {
   "says": "the 30-day clock starts on 2 Sep, the day the sales rep was told, not the 14 Sep received date",
   "path": "reportable.clock.primary.start",
   "equals": "2026-09-02"
  },
  {
   "says": "and is due 2 Oct 2026",
   "path": "reportable.clock.primary.deadline",
   "equals": "2026-10-02"
  },
  {
   "says": "a draft event description is written, attributed to the report",
   "path": "reportable.narrative",
   "contains": "It was reported"
  },
  {
   "says": "the signed triage record verifies",
   "path": "verify.ok",
   "equals": true
  },
  {
   "says": "a record whose suggestion was changed no longer verifies",
   "path": "tampered.ok",
   "equals": false
  },
  {
   "says": "the named decision is signed and verifies",
   "path": "verify_decision.ok",
   "equals": true
  },
  {
   "says": "the decision record names the decider",
   "path": "decide.record.statement.decider",
   "equals": "Rehearsal Reviewer"
  },
  {
   "says": "the cosmetic crack does not look reportable",
   "path": "cosmetic.decision.decision",
   "equals": "not_reportable"
  },
  {
   "says": "and no narrative is drafted for it",
   "path": "cosmetic.narrative",
   "equals": null
  },
  {
   "says": "the complaint record check finds the complainant's address missing",
   "path": "cosmetic.complaint_file[id=complainant][0].present",
   "equals": false
  },
  {
   "says": "the occlusion-alarm complaints are grouped together",
   "path": "trend.groups[0].count",
   "min": 3
  },
  {
   "says": "the malfunction-only complaint C-0719 is flagged to re-triage under the presumption",
   "path": "trend.groups[0].flags[kind=presumption][0].recheck",
   "contains": "C-0719"
  },
  {
   "says": "every model call has a signed receipt",
   "receipts": "signed",
   "min": 8
  }
 ]
}