Skip to main content

EMR / EHR Integration

Crew can integrate with Electronic Medical Record (EMR) and Electronic Health Record (EHR) systems to access patient data, schedule appointments, and update records. This guide covers integration patterns and data handling considerations.
Healthcare integrations require careful attention to data handling and privacy. Crew is designed with healthcare workflows in mind, but the overall compliance posture depends on your specific deployment and configuration. See Healthcare Readiness for details.

Integration Approaches

FHIR API Integration

FHIR (Fast Healthcare Interoperability Resources) is the modern standard for healthcare data exchange.
{
  "emr_integration": {
    "type": "fhir",
    "base_url": "https://your-ehr.com/fhir/r4",
    "auth": {
      "type": "oauth2",
      "token_url": "https://your-ehr.com/oauth/token",
      "client_id": "crew_client",
      "client_secret": "..."
    }
  }
}

Supported FHIR Resources

ResourceUse Case
PatientLook up patient demographics
AppointmentSchedule and manage appointments
ScheduleCheck provider availability
SlotFind available time slots
PractitionerProvider information
LocationOffice/facility details

Custom API Integration

For EMRs without FHIR support, use custom API integrations:
{
  "emr_integration": {
    "type": "custom",
    "endpoints": {
      "patient_lookup": "https://your-emr.com/api/patients/search",
      "schedule_appointment": "https://your-emr.com/api/appointments",
      "check_availability": "https://your-emr.com/api/slots"
    },
    "auth": {
      "type": "api_key",
      "header": "X-API-Key",
      "key": "..."
    }
  }
}

Webhook-Based Integration

Receive notifications from your EMR:
{
  "emr_webhooks": {
    "appointment_created": "https://api.usecrew.ai/v1/emr/webhook/{crew_id}",
    "appointment_updated": "https://api.usecrew.ai/v1/emr/webhook/{crew_id}",
    "patient_updated": "https://api.usecrew.ai/v1/emr/webhook/{crew_id}"
  }
}

Common Workflows

Patient Verification

Verify caller identity before accessing information:
// During call, Crew collects patient identifiers
const patientData = {
  date_of_birth: "1985-03-15",
  last_name: "Smith",
  phone: "+14155551234"
};

// Crew queries EMR to verify
const patient = await emr.searchPatient(patientData);

if (patient && patient.verified) {
  // Proceed with authenticated context
}

Appointment Scheduling

1

Identify Patient

Verify caller identity through date of birth and name
2

Determine Appointment Type

Agent asks about the reason for the visit
3

Check Availability

Query EMR for available slots matching criteria
4

Present Options

Offer available times to the caller
5

Book Appointment

Create appointment in EMR
6

Confirm

Read back confirmation details

Appointment Lookup

// Caller asks about existing appointment
const appointments = await emr.getAppointments({
  patient_id: patient.id,
  status: "booked",
  date_from: today
});

// Agent: "I see you have an appointment with Dr. Johnson 
// on January 20th at 2pm. Would you like to keep, 
// reschedule, or cancel that?"

Prescription Refills

// Validate patient has active prescription
const prescription = await emr.getPrescription({
  patient_id: patient.id,
  medication: requested_medication,
  status: "active"
});

if (prescription && prescription.refills_remaining > 0) {
  // Create refill request in EMR
  await emr.createRefillRequest({
    prescription_id: prescription.id,
    requested_via: "phone",
    call_id: call.id
  });
}

Supported EMR Systems

Crew has pre-built connectors for:
EMRIntegration TypeFeatures
EpicFHIR R4Full scheduling, patient lookup
CernerFHIR R4Scheduling, patient lookup
athenahealthREST APIScheduling, patient lookup
DrChronoREST APIScheduling, patient lookup
eClinicalWorksCustomScheduling (limited)
Contact sales@usecrew.ai for EMR integrations not listed above.

Data Handling

Minimum Necessary Principle

Crew only accesses the data required for the specific task:
TaskData Accessed
Appointment schedulingName, DOB, contact info, appointment preferences
Appointment lookupName, DOB, upcoming appointments
Prescription refillName, DOB, active prescriptions

Data in Transit

All data between Crew and EMR systems is encrypted:
  • TLS 1.2+ for all connections
  • Certificate validation enforced
  • No data cached in transit

Data at Rest

Crew can be configured to minimize data storage:
{
  "data_handling": {
    "store_patient_data": false,
    "store_transcripts": true,
    "redact_phi_from_transcripts": true,
    "retention_days": 30
  }
}

Authentication Patterns

OAuth 2.0

For FHIR and modern APIs:
{
  "auth": {
    "type": "oauth2",
    "grant_type": "client_credentials",
    "token_url": "https://emr.com/oauth/token",
    "client_id": "...",
    "client_secret": "...",
    "scope": "patient/*.read appointment/*.write"
  }
}

SMART on FHIR

For clinical contexts requiring user authorization:
{
  "auth": {
    "type": "smart_on_fhir",
    "iss": "https://emr.com/fhir",
    "scopes": ["launch", "patient/Appointment.write"]
  }
}

API Keys

For simpler integrations:
{
  "auth": {
    "type": "api_key",
    "header": "Authorization",
    "prefix": "Bearer",
    "key": "your_api_key"
  }
}

Error Handling

Handle EMR connectivity issues gracefully:
try {
  const slots = await emr.getAvailableSlots(criteria);
  // Present options to caller
} catch (error) {
  if (error.type === "emr_unavailable") {
    // Agent: "I'm having trouble accessing our scheduling system. 
    // Can I take your information and have someone call you back?"
    await collectCallbackInfo();
  }
}

Responsibility Boundaries

Integration with EMR systems involves shared responsibilities between Crew and your organization.

Crew Responsibilities

  • Secure transmission of data
  • Proper authentication to your EMR
  • Logging of all EMR interactions
  • Error handling and graceful degradation

Customer Responsibilities

  • EMR access credentials management
  • Data access policies and permissions
  • Audit log review
  • User training on data handling
  • Regulatory compliance oversight

Best Practices

Grant Crew only the EMR permissions needed for specific workflows.
Review Crew’s EMR access logs for unexpected patterns.
Use EMR sandbox/test environments before production.
Design call flows that gracefully handle EMR unavailability.
Ensure staff understand how Crew accesses and uses EMR data.

Next Steps