Loading...
Loading...
Reason about SaMD (Software as a Medical Device) regulatory compliance for FDA, EU MDR, and global submissions. Use when the user asks about IEC 62304 safety classification, ISO 14971 risk management, 21 CFR 820/QMSR quality system requirements, Design History File structure, 510(k)/De Novo/PMA pathway selection, SOUP/OTS assessment, verification and validation planning, cybersecurity for medical devices, PCCP for AI/ML devices, design reviews, traceability matrices, or post-market surveillance. Triggers include "SaMD", "medical device software", "IEC 62304", "ISO 14971", "ISO 13485", "21 CFR 820", "QMSR", "510(k)", "De Novo", "PMA", "design history file", "DHF", "software safety classification", "SOUP list", "risk management", "hazard analysis", "design review", "V&V protocol", "FDA submission", "EU MDR", "clinical evaluation", "PCCP", "predetermined change control", "GMLP", "cybersecurity premarket", "Part 11", "design controls", "design inputs", "design outputs", "traceability matrix", "post-market surveillance", "CAPA", "Class II device", "Class III device", "regulatory pathway", "predicate device", "substantial equivalence".
npx skill4agent add awslabs/hcls-agent-skills medical-device-software-complianceDoes the software system contribute to a hazardous situation?
├─ No → Class A (no injury possible)
│ Requirements: Basic documentation, no architecture decomposition required
├─ Yes, but not SERIOUS injury → Class B (non-serious injury possible)
│ Requirements: Architecture documentation, SOUP risk analysis, unit testing ≥80%
└─ Yes, SERIOUS injury or DEATH possible → Class C (serious injury/death possible)
Requirements: Detailed design, full SOUP verification, unit testing ≥95%,
additional detailed architecture documentation
Can harm be mitigated by external measures (hardware, clinical workflow)?
├─ Yes, reduced to non-serious → Downgrade to Class B
│ Document: Mitigation measure, residual risk, why measure is reliable
└─ No reliable external mitigation → Stays Class C
Class determination timing:
├─ At system level: Assign initial class based on intended use
├─ At software item level: May assign LOWER class if item is isolated
│ Condition: Item cannot contribute to higher-class hazard
└─ NEVER assign lower class at system level than hazard analysis supportsIs the device substantially equivalent to a legally marketed predicate?
├─ Yes, same intended use + same/different technology (equiv. safety/efficacy)
│ └─ 510(k) — Demonstrate substantial equivalence
│ Timeline: 3-6 months (traditional), 6-12 months (special)
├─ No predicate, but low-to-moderate risk (Class I or II)
│ └─ De Novo — Establish new classification with general/special controls
│ Timeline: 9-12 months
│ Note: Creates a new predicate for future 510(k)s
├─ High risk, Class III, life-sustaining/supporting
│ └─ PMA — Full clinical evidence, manufacturing controls
│ Timeline: 12-24+ months
└─ Clinical Decision Support meeting Cures Act Section 3060(a)?
All 4 criteria met:
1. Not intended to acquire/process/analyze medical images/signals
2. Intended for healthcare professionals (not patients)
3. Intended to enable HCP to independently review basis
4. Intended as aid (not to replace clinical judgment)
└─ Exempt from device regulation — document determination| Phase | Key Output | IEC 62304 Mapping | Blocking Gate |
|---|---|---|---|
| User Needs | User Needs Document | §5.2 Software requirements process | None |
| Design Input | SRS (Software Requirements Spec) | §5.2.1-5.2.6 Requirements | DR1 |
| Design Output | Architecture + Detailed Design | §5.3 Software architectural design | DR2 |
| Verification | Test protocols + reports | §5.5 Software integration testing, §5.6 System testing | DR3 |
| Validation | Clinical validation evidence | §5.7 Software release | Submission |
| Transfer | Manufacturing/deployment procedures | §5.8 Maintenance process | Release |
| Changes | Design change assessment | §5.2 (re-entry) | Per-change |
Is the SOUP item's failure capable of contributing to a hazardous situation?
├─ No → Low-risk SOUP
│ Document: Name, version, intended use, license
│ Action: Monitor for known anomalies annually
├─ Yes, contributes to Class B hazard → Medium-risk SOUP
│ Document: Above + known anomalies list, mitigation for each
│ Action: Version pin, anomaly monitoring, update assessment per release
└─ Yes, contributes to Class C hazard → High-risk SOUP
Document: Above + detailed integration testing, published problem reports
Action: Above + verify adequate testing by SOUP vendor, consider alternatives
SOUP Acceptance Criteria:
├─ Vendor maintains the software (active development)? → Preferred
├─ Known anomaly list published? → Required for Class B/C
├─ CVE history acceptable? → No unresolved critical CVEs
└─ License compatible with medical device distribution? → Required| Factor | Use SOUP | Build Custom |
|---|---|---|
| Well-validated open source library | ✅ | |
| Critical safety function with no validated library | ✅ | |
| Standard utility (logging, HTTP, encryption) | ✅ | |
| Regulatory precedent for the library | ✅ | |
| SOUP vendor unresponsive to anomaly reports | ✅ | |
| Time-to-market critical, library mature | ✅ |
| Level | Description | Examples | Acceptable Probability |
|---|---|---|---|
| S1 | Negligible | Inconvenience, no injury | Any |
| S2 | Minor | Temporary minor injury | Occasional |
| S3 | Serious | Injury requiring intervention | Remote |
| S4 | Critical | Permanent impairment | Improbable |
| S5 | Catastrophic | Death | Improbable |
Risk exceeds acceptability threshold?
├─ Option 1: Inherent safety by design (ALWAYS try first)
│ Example: Eliminate hazard entirely via architecture
├─ Option 2: Protective measures in device or manufacturing
│ Example: Software watchdog, timeout, bounds checking
├─ Option 3: Information for safety (warnings, labeling, training)
│ Example: Clinical alert, user manual warning
└─ NEVER: Skip to Option 3 without documenting why Options 1-2 are infeasible
Residual Risk Assessment:
├─ Individual residual risk acceptable? → Document and proceed
├─ Individual unacceptable but reducible? → Apply additional controls
└─ Overall residual risk vs. benefit determination
Required: Document benefit-risk analysis for entire device| Activity | Class A | Class B | Class C |
|---|---|---|---|
| Requirements traceability | ✅ | ✅ | ✅ |
| Unit testing | Optional | ≥80% coverage | ≥95% coverage |
| Integration testing | Optional | ✅ | ✅ + fault injection |
| System testing | ✅ | ✅ | ✅ + stress/boundary |
| Regression testing | On change | Full suite | Full suite + risk-based |
| Clinical validation | If claimed | If claimed | ✅ Mandatory |
| Cybersecurity testing | If connected | ✅ Penetration test | ✅ Full threat model |
| Usability validation | If HCP user | ✅ Formative | ✅ Summative |
Test fails acceptance criteria
├─ Safety-related requirement?
│ ├─ Yes → MUST fix before release (no exceptions)
│ └─ No → Evaluate options below
├─ Options:
│ A) Fix defect and retest (preferred)
│ B) Lower performance claim (update labeling + submission)
│ C) Change predicate (if comparative claim fails)
│ D) Add compensating evidence (additional clinical data)
│ E) Scope reduction (remove failed feature)
│ └─ F) Accept with justification (NON-SAFETY only, document rationale)
└─ All options require: updated risk assessment, traceability update, re-review| Category | Must Address | Example Threats |
|---|---|---|
| Confidentiality | PHI exposure | Unencrypted API, debug endpoints |
| Integrity | Data/algorithm tampering | Model poisoning, input manipulation |
| Availability | Denial of service | Resource exhaustion, dependency failure |
| Authentication | Unauthorized access | Default credentials, session hijacking |
| Update mechanism | Secure patching | Unsigned updates, rollback attacks |
Initial Authorization (510(k) / De Novo)
├─ Locked Algorithm: Standard pathway, no PCCP required
│ Future changes → new 510(k) for each modification
├─ Locked Algorithm + Anticipated Changes: Include PCCP
│ Changes within PCCP scope → no new submission
│ Changes outside PCCP scope → new 510(k)
└─ Adaptive Algorithm: PCCP MANDATORY (FDA Dec 2024 Guidance)
PCCP must specify:
├─ Description of modifications (what could change)
├─ Modification Protocol (how changes are developed + validated)
├─ Impact Assessment (risk analysis for each change type)
└─ Transparency (how users are notified of changes)| # | Principle | Verification Method |
|---|---|---|
| 1 | Multi-disciplinary team | Document team roles (clinical + engineering + regulatory) |
| 2 | Good Software Engineering Practice | IEC 62304 compliance |
| 3 | Representative clinical data | Dataset demographics vs. intended population |
| 4 | Independent training/test/validation sets | No data leakage verification |
| 5 | Reference datasets (ground truth) | Adjudication process documented |
| 6 | Model design fits intended use | Architecture justification document |
| 7 | Clinically relevant performance metrics | Sensitivity/Specificity/PPV/NPV/AUC |
| 8 | Testing across patient subgroups | Bias analysis across demographics |
| 9 | Clear user information | Labeling re: capabilities + limitations |
| 10 | Deployed model monitoring | Drift detection + performance tracking |
| Metric | Action Threshold | Escalation |
|---|---|---|
| Overall performance (AUC/F1) | >5% degradation from validation | Investigate root cause |
| Subgroup performance | >10% gap vs. majority subgroup | Bias review |
| False negative rate (safety) | Any increase >2% | Immediate CAPA |
| Data distribution shift | OOD rate >15% of inputs | Retraining evaluation |
| Alert volume (CDS devices) | >20 alerts/clinician/shift | Alert fatigue review |
User Need (UN-001)
→ Design Input / Requirement (REQ-001, REQ-002)
→ Design Output / Architecture Component (ARCH-001)
→ Implementation (code module / unit)
→ Verification Test (VER-001, VER-002)
→ Validation Evidence (VAL-001)
→ Risk Control (RC-001) [if requirement is risk-derived]| Check | Blocking? | Description |
|---|---|---|
| Orphan requirement (no parent UN) | Yes | Every REQ must trace to a user need |
| Unverified requirement | Yes | Every REQ must have ≥1 verification test |
| Unimplemented risk control | Yes | Every RC in hazard analysis must trace to code |
| Dead code (no tracing requirement) | Warning | May indicate scope creep or incomplete specs |
| Missing validation link | Class B/C | Each user need must trace through to validation |
| Item | Criteria |
|---|---|
| User needs documented | All clinical needs captured with acceptance criteria |
| Requirements complete | SRS covers all 9 categories (functional, performance, interface, cybersecurity, usability, risk control, data integrity, PHI, regulatory) |
| Risk management plan | ISO 14971 plan approved, initial hazard analysis complete |
| Regulatory strategy | Pathway selected, predicates identified |
| Traceability (initial) | UN → REQ links established |
| Item | Criteria |
|---|---|
| Architecture documented | IEC 62304 §5.3 satisfied |
| SOUP assessed | All 3rd-party items risk-classified |
| Code reviews complete | All units reviewed, findings resolved |
| Design freeze | No more code changes during V&V |
| Risk controls implemented | All controls in hazard analysis coded + unit tested |
| SBOM generated | CycloneDX/SPDX with all dependencies |
| Item | Criteria |
|---|---|
| All tests pass | 0 open failures on safety/efficacy tests |
| Coverage met | Class-appropriate thresholds achieved |
| Residual risk acceptable | Benefit-risk documented and favorable |
| Traceability closed | Full bidirectional, no orphans |
| Anomalies dispositioned | All defects resolved or risk-accepted |
| Labeling reviewed | Intended use, contraindications, IFU complete |
| Aspect | FDA (US) | EU MDR 2017/745 |
|---|---|---|
| Classification | Risk-based (Class I/II/III) | Rule 11: SaMD is IIa minimum; IIb/III if serious |
| Pathway | 510(k), De Novo, PMA | Notified Body conformity assessment |
| Clinical evidence | Substantial equivalence (510k) or clinical studies (PMA) | Clinical Evaluation Report ALWAYS required |
| Post-market | Annual reports, MDRs | PMCF + PSUR annually + vigilance |
| AI/ML updates | PCCP framework | Notified Body re-assessment for significant changes |
| Cybersecurity | Mandatory SBOM + threat model (2023) | MDCG 2019-16 guidance (recommended) |
| QMS standard | 21 CFR 820 / QMSR (aligned with ISO 13485) | ISO 13485 certification required |
| Software lifecycle | IEC 62304 (recognized consensus standard) | IEC 62304 (harmonized standard) |
| Timeline | 510(k): 3-6mo; De Novo: 9-12mo; PMA: 12-24mo | NB audit cycle: 12-18 months |
| Labeling | 21 CFR 801 + unique labeling requirements | Annex I GSPR + SSCP (for implants/Class III) |
Does your system create, modify, maintain, or transmit records required by FDA regulations?
├─ No → Part 11 not applicable (document why)
├─ Yes → Assess scope:
│ ├─ Full Part 11 (production system with regulatory records)
│ │ Requirements: Audit trails, electronic signatures, access controls,
│ │ system validation, backup/recovery, authority checks
│ ├─ Part 11-lite (hospital IT manages infrastructure)
│ │ Requirements: Your application provides audit trail + access control;
│ │ rely on hospital IT for infrastructure validation
│ └─ Development-only records (training data, model versions)
│ Requirements: Version control with audit trail, access control,
│ backup integrity verification
Electronic Signature Requirements (if applicable):
├─ Signature = legally binding (equivalent to handwritten)
├─ Must include: signer name, date/time, meaning (approval/review/authorship)
├─ Must be linked to record (cannot be separated)
└─ Biometric or non-biometric (ID + password) with controls| Activity | FDA | EU MDR | Frequency |
|---|---|---|---|
| Medical Device Report (MDR/vigilance) | ✅ | ✅ | Within 30 days (FDA) / immediately for serious (EU) |
| Annual report | ✅ | Annually | |
| Periodic Safety Update Report (PSUR) | ✅ | Annually (Class IIa+) | |
| Post-Market Clinical Follow-up (PMCF) | ✅ | Ongoing | |
| Complaint handling | ✅ | ✅ | Per event |
| CAPA process | ✅ | ✅ | Per finding |
| Trend analysis | ✅ | ✅ | Quarterly minimum |
| Software update reporting | ✅ | ✅ | Per update (risk-based) |
Signal detected (complaint, trend, field event)
├─ Safety-related?
│ ├─ Yes → Immediate CAPA + potential field corrective action
│ └─ No → Evaluate below
├─ Systematic (affects multiple units/users)?
│ ├─ Yes → CAPA (root cause likely systemic)
│ └─ No → Correction only (isolated incident)
├─ Recurring (≥3 occurrences same root cause)?
│ └─ Yes → CAPA mandatory (correction alone is insufficient)
└─ Regulatory requirement (audit finding, FDA warning letter)?
└─ Yes → CAPA mandatory with defined timeline