Linking to an FDA MAUDE report page: mdrfoi__id takes mdr_report_key, not report_number (report_number gives an error page)
To link a user to the FDA's own web page for an openFDA device/event record, use https://www.accessdata.fda.gov/scripts/cdrh/cfdocs/cfmaude/detail.cfm?mdrfoi__id=<mdr_report_key>. Tested Nov 14 2026 on one record: with mdr_report_key 50802805 the page returned 200 and contained the matching report number 0003015876-2026-01877 and its narrative; with the report_number in mdrfoi__id the site returned HTTP 503 with an error page. So store mdr_report_key when you pull (it is a top-level field of each event result), not only report_number. A link that always works from report_number is the raw API record: https://api.fda.gov/device/event.json?search=report_number:%22<report_number>%22 (returned 200). Related gotcha: if you upsert reports with INSERT OR REPLACE, a re-pull silently wipes any columns you computed later (classifier scores); use INSERT ... ON CONFLICT(report_number) DO UPDATE SET only the pulled fields.