Skip to main content

Supported EHR Systems

Rubric integrates with major EHR platforms to access clinical data for AI evaluation while maintaining HIPAA compliance.
EHR SystemIntegration MethodData Access
EpicSMART on FHIR, CDS HooksPatient records, clinical notes, orders
Cerner (Oracle Health)SMART on FHIR, Millennium APIsPatient data, documents, results
AllscriptsFHIR R4, Open APIsClinical summaries, medications
MEDITECHData extraction APIsPatient records, clinical data
athenahealthathenaNet APIsPatient data, clinical documents
CustomFHIR R4, HL7 v2, CSVConfigurable

Epic Integration

SMART on FHIR Setup

epic_fhir_integration.py
from rubric import Rubric
from rubric.integrations import EpicFHIR

client = Rubric()

# Configure Epic SMART on FHIR integration
epic = client.integrations.ehr.configure(
    provider="epic",
    integration_type="smart_on_fhir",

    # Epic App Orchard credentials
    client_id="your-client-id",
    client_secret="your-client-secret",  # Stored encrypted

    # Epic environment
    fhir_base_url="https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4",

    # Scopes requested
    scopes=[
        "patient/*.read",
        "user/*.read",
        "launch/patient"
    ],

    # Data access configuration
    data_access={
        "patient_demographics": True,
        "clinical_notes": True,
        "medications": True,
        "lab_results": True,
        "vital_signs": True,
        "diagnoses": True
    }
)

print(f"Epic integration configured: {epic.id}")

Fetch Patient Data for Evaluation

fetch_epic_data.py
from rubric import Rubric

client = Rubric()

# Fetch patient data for evaluation
patient_data = client.integrations.ehr.fetch_patient(
    integration_id="epic_prod",
    patient_id="E12345",

    # What to fetch
    include=[
        "demographics",
        "recent_encounters",
        "active_medications",
        "recent_labs"
    ],

    # Time range
    encounter_lookback_days=90
)

# Log for evaluation with EHR context
client.calls.log(
    project="triage-ai",

    input={
        "patient_context": patient_data.to_dict(),
        "chief_complaint": "chest pain",
        "transcript": "..."
    },

    output={
        "triage_level": "urgent",
        "reasoning": "..."
    },

    # Link to EHR record
    ehr_reference={
        "system": "epic",
        "patient_id": "E12345",
        "encounter_id": "ENC-67890"
    }
)

Cerner Integration

cerner_integration.py
from rubric import Rubric

client = Rubric()

# Configure Cerner SMART on FHIR
cerner = client.integrations.ehr.configure(
    provider="cerner",
    integration_type="smart_on_fhir",

    # Cerner Code Console credentials
    client_id="your-client-id",
    client_secret="your-client-secret",

    # Cerner FHIR endpoint
    fhir_base_url="https://fhir-ehr.cerner.com/r4/your-tenant-id",

    scopes=[
        "patient/Patient.read",
        "patient/Observation.read",
        "patient/MedicationRequest.read",
        "patient/DocumentReference.read"
    ]
)

Batch Data Extraction

For large-scale evaluation, extract data in batches:
batch_extraction.py
from rubric import Rubric

client = Rubric()

# Configure batch extraction job
extraction_job = client.integrations.ehr.batch_extract(
    integration_id="epic_prod",

    # Extraction criteria
    criteria={
        "date_range": {
            "start": "2024-01-01",
            "end": "2024-03-31"
        },
        "encounter_types": ["emergency", "urgent_care"],
        "departments": ["ED", "Urgent Care"],
        "sample_size": 1000
    },

    # What to extract
    include=[
        "demographics",
        "chief_complaint",
        "clinical_notes",
        "triage_assessment",
        "disposition"
    ],

    # De-identification
    deidentify={
        "enabled": True,
        "method": "safe_harbor",
        "preserve_dates": "shift"  # Shift dates consistently
    },

    # Output
    output_dataset="ehr_extraction_q1_2024"
)

print(f"Extraction job started: {extraction_job.id}")
print(f"Estimated records: {extraction_job.estimated_records}")

CDS Hooks Integration

Integrate with clinical decision support workflows:
cds_hooks.py
from rubric import Rubric
from rubric.integrations import CDSHooks

client = Rubric()

# Configure CDS Hooks endpoint for evaluation
cds_config = client.integrations.cds_hooks.configure(
    # Your CDS service endpoint
    service_endpoint="https://your-ai.example.com/cds-services",

    # Hooks to capture
    hooks=[
        "patient-view",
        "order-select",
        "order-sign"
    ],

    # Capture configuration
    capture_requests=True,
    capture_responses=True,
    capture_feedback=True,  # If clinicians provide feedback

    # Route to Rubric project
    target_project="cds-ai-evaluation"
)

Security & Compliance

PHI Protection: All EHR integrations are covered under Rubric’s BAA. Data is encrypted in transit and at rest. Access is logged and auditable.
ControlImplementation
AuthenticationOAuth 2.0, SMART on FHIR
AuthorizationScoped access tokens
EncryptionTLS 1.3 in transit, AES-256 at rest
Audit LoggingAll data access logged
Data MinimizationOnly fetch required fields
De-identificationOptional Safe Harbor compliance

Troubleshooting

IssueCauseSolution
Token refresh failedExpired refresh tokenRe-authenticate through EHR
Missing patient dataInsufficient scopesRequest additional FHIR scopes
Rate limitedToo many requestsImplement backoff, use batch extraction
FHIR validation errorsSchema mismatchCheck FHIR R4 compliance