Skip to content

Medical vertical — professional tutorial

Released in FCC v1.2.0. You are integrating FCC into a production Medical workflow with real compliance obligations. This tutorial covers the EU AI Act risk classification path, the vertical_risk_profiles override layer, and how to wire a persona into an existing event-bus + observability stack.

The Medical pack in one paragraph

The healthcare vertical pack (at src/fcc/data/verticals/healthcare.yaml) contains 11 healthcare personas (v2.1.0) — 5 retrofitted from v1.0 plus 6 v1.2.0 additions for genomic research, clinical imaging (DICOM), telemedicine UX, population health, precision medicine strategy, and medical device software. Headline compliance frameworks: HIPAA, HL7 FHIR R5, ICD-11, IEC 62304, EU MDR, DICOM, IMDRF SaMD.

Focus persona: MDS — Medical Device Software Engineer

We'll anchor this tutorial on MDS, because it's the one most relevant to the professional audience in the Medical domain.

from fcc.verticals.registry import VerticalRegistry

reg = VerticalRegistry.from_builtin()
pack = reg.get("healthcare")
persona = next(p for p in pack.personas if p.id == "MDS")

print(persona.name)
print(persona.risk_category or "minimal")
riscear = persona.riscear or {}
print("Archetype:", riscear.get("archetype"))
print("Role:", riscear.get("role"))

Wiring MDS into a production pipeline

Production FCC deployments typically have three concerns when adopting a vertical persona: (1) risk classification, (2) event-bus integration, (3) observability.

1. Risk classification

Use the vertical_risk_profiles.yaml override path so risk categories are data-driven rather than inferred from role descriptions:

from fcc.compliance.classifier import AIActClassifier

classifier = AIActClassifier()
persona = pack.get_persona("MDS") if hasattr(pack, "get_persona") else next(p for p in pack.personas if p.id == "MDS")
# Must supply the vertical_domain so the override activates:
risk = classifier.classify_persona(persona, vertical_domain="healthcare")

If you disagree with the shipped classification, override it in your own vertical_risk_profiles.yaml placed earlier on the import path — the file is a plain YAML dict, trivial to fork.

2. Event-bus integration

Subscribe to persona.action.completed events filtered by the MDS ID:

from fcc.messaging.bus import EventBus
from fcc.messaging.events import EventType

bus = EventBus()
bus.subscribe_filter(
    event_types={EventType.ACTION_COMPLETED},
    filter_fn=lambda e: e.payload.get("persona_id") == "MDS",
    handler=lambda e: audit_log.append(e),
)

3. Observability

Add a traced span around every MDS action so you can trace latency through OpenTelemetry:

from fcc.observability.tracing import get_tracer

tracer = get_tracer("fcc.healthcare")
with tracer.span(f"MDS.run", attributes={"domain": "healthcare"}):
    result = action_engine.run(persona_id="MDS", ...)

Production checklist

  • Risk category override present in vertical_risk_profiles.yaml.
  • Event-bus subscribers for audit trail.
  • Observability spans + metrics exporters configured.
  • CI runs pytest tests/test_verticals.py tests/test_compliance_classifier.py.
  • Model cards regenerated and committed (fcc model-card generate --all).

Verify what you did

Run the vertical test suite to make sure your changes didn't break anything:

pytest tests/test_verticals.py -k "healthcare" -v

All professional-path steps in this tutorial leave your working tree unchanged — the pack YAML is read-only from your perspective. The only state that accumulates is in _output/ (scenario run traces) and docs/model-cards/ (if you regenerated cards).

Next steps