EHR Integration Architect
When to activate
When integrating a new system with an EHR (Epic, Cerner, Athenahealth), building health information exchange interfaces, implementing FHIR APIs, or when connecting labs, pharmacies, or imaging systems. Use for any clinical data integration project.
When NOT to use
Skip for simple CSV imports, one-time data migrations (not ongoing interfaces), or when the integration already exists and is functioning within SLA.
Instructions
Define the interface:
- Source system and target system
- Direction: Unidirectional vs. bidirectional
- Transport: HL7 v2.x, FHIR R4, X12, C-CDA, REST API
- Trigger: Real-time, batch, or on-demand
Data mapping:
- Source fields → target fields with transformation rules
- Code system mapping (SNOMED → ICD-10, local codes → LOINC)
- Required vs. optional fields
- Default values for missing data
FHIR resource mapping (if applicable):
- Patient, Encounter, Observation, MedicationRequest, DiagnosticReport
- USCDI data class compliance
- SMART on FHIR scopes for authorization
Error handling:
- Message validation (ACK/NAK for HL7, HTTP status for FHIR)
- Retry logic (exponential backoff, max retries)
- Error queue and manual review workflow
- Alerting for interface failures
Testing strategy:
- Unit tests per message type
- Integration tests with sample data
- Volume/stress testing
- Go-live validation checklist
Output Format
EHR INTERFACE: [Source] → [Target]
STANDARD: [HL7 v2.x / FHIR R4 / X12 / C-CDA]
DIRECTION: [Uni/Bidirectional] | TRANSPORT: [MLLP/HTTPS/SFTP]
TRIGGER: [Real-time/Batch/On-demand]
DATA MAPPING:
| Source Field | Target Field | Transform | Required | Code Map |
|-------------|-------------|-----------|----------|----------|
FHIR RESOURCES (if applicable):
[Resource type]: [Profile URL]
Scopes: [SMART scopes]
ERROR HANDLING:
Validation: [Rules]
Retry: [Strategy]
Alerting: [Threshold + channel]
TESTING:
Unit: [X] message types × [Y] scenarios
Integration: [End-to-end scenarios]
Volume: [X] messages/min for [Y] minutes
Example
EHR INTERFACE: Lab System → Epic EHR
STANDARD: HL7 v2.5.1 (ORU^R01)
DIRECTION: Unidirectional | TRANSPORT: MLLP (port 6661)
TRIGGER: Real-time on result finalization
DATA MAPPING:
| Source Field | Target Field | Transform | Required | Code Map |
|-----------------|------------------|------------------|----------|----------------|
| result.test_code| OBX-3 | Local → LOINC | Yes | Lab→LOINC table|
| result.value | OBX-5 | Unit conversion | Yes | — |
| result.ref_range| OBX-7 | Format: "L-H" | Yes | — |
| result.abnormal | OBX-8 | Map: A→A, H→H | Yes | Flag codes |
ERROR HANDLING:
Validation: Message structure, required fields, value range
Retry: 3 attempts, 5/15/60 min intervals
Alerting: >5 failures in 15 min → PagerDuty
TESTING:
Unit: 12 result types × 5 scenarios each (normal, abnormal, critical, empty, malformed)
Integration: 50 sample results end-to-end with Epic validation
Volume: 200 messages/min for 30 minutes
1---2name: ehr-integration-architect3description: Designs EHR integration architectures using HL7 FHIR, C-CDA, and X12 standards. Outputs interface specifications with data mapping, error handling, and interoperability compliance for health information exchange.4---56# EHR Integration Architect78## When to activate9When integrating a new system with an EHR (Epic, Cerner, Athenahealth), building health information exchange interfaces, implementing FHIR APIs, or when connecting labs, pharmacies, or imaging systems. Use for any clinical data integration project.1011## When NOT to use12Skip for simple CSV imports, one-time data migrations (not ongoing interfaces), or when the integration already exists and is functioning within SLA.1314## Instructions15161. **Define the interface:**17 - Source system and target system18 - Direction: Unidirectional vs. bidirectional19 - Transport: HL7 v2.x, FHIR R4, X12, C-CDA, REST API20 - Trigger: Real-time, batch, or on-demand21222. **Data mapping:**23 - Source fields → target fields with transformation rules24 - Code system mapping (SNOMED → ICD-10, local codes → LOINC)25 - Required vs. optional fields26 - Default values for missing data27283. **FHIR resource mapping (if applicable):**29 - Patient, Encounter, Observation, MedicationRequest, DiagnosticReport30 - USCDI data class compliance31 - SMART on FHIR scopes for authorization32334. **Error handling:**34 - Message validation (ACK/NAK for HL7, HTTP status for FHIR)35 - Retry logic (exponential backoff, max retries)36 - Error queue and manual review workflow37 - Alerting for interface failures38395. **Testing strategy:**40 - Unit tests per message type41 - Integration tests with sample data42 - Volume/stress testing43 - Go-live validation checklist4445## Output Format4647```48EHR INTERFACE: [Source] → [Target]49STANDARD: [HL7 v2.x / FHIR R4 / X12 / C-CDA]50DIRECTION: [Uni/Bidirectional] | TRANSPORT: [MLLP/HTTPS/SFTP]51TRIGGER: [Real-time/Batch/On-demand]5253DATA MAPPING:54| Source Field | Target Field | Transform | Required | Code Map |55|-------------|-------------|-----------|----------|----------|5657FHIR RESOURCES (if applicable):58 [Resource type]: [Profile URL]59 Scopes: [SMART scopes]6061ERROR HANDLING:62 Validation: [Rules]63 Retry: [Strategy]64 Alerting: [Threshold + channel]6566TESTING:67 Unit: [X] message types × [Y] scenarios68 Integration: [End-to-end scenarios]69 Volume: [X] messages/min for [Y] minutes70```7172## Example7374```75EHR INTERFACE: Lab System → Epic EHR76STANDARD: HL7 v2.5.1 (ORU^R01)77DIRECTION: Unidirectional | TRANSPORT: MLLP (port 6661)78TRIGGER: Real-time on result finalization7980DATA MAPPING:81| Source Field | Target Field | Transform | Required | Code Map |82|-----------------|------------------|------------------|----------|----------------|83| result.test_code| OBX-3 | Local → LOINC | Yes | Lab→LOINC table|84| result.value | OBX-5 | Unit conversion | Yes | — |85| result.ref_range| OBX-7 | Format: "L-H" | Yes | — |86| result.abnormal | OBX-8 | Map: A→A, H→H | Yes | Flag codes |8788ERROR HANDLING:89 Validation: Message structure, required fields, value range90 Retry: 3 attempts, 5/15/60 min intervals91 Alerting: >5 failures in 15 min → PagerDuty9293TESTING:94 Unit: 12 result types × 5 scenarios each (normal, abnormal, critical, empty, malformed)95 Integration: 50 sample results end-to-end with Epic validation96 Volume: 200 messages/min for 30 minutes97```