Architecture

How FireSonic receives, persists, processes, validates, and delivers HL7 v2 messages as FHIR R4.

FireSonic uses a durable asynchronous processing model designed for reliability, recoverability, and extensibility. Incoming HL7 v2 messages are persisted before processing, then move through independent transformation, customization, validation, and delivery stages.

Architecture goals

Durable message handlingPersist incoming messages before processing begins.
Restart recoveryRecover interrupted work after an unexpected shutdown or restart.
Stage isolationDecouple intake, transformation, validation, and delivery.
Controlled customizationRun customer-specific Groovy logic at defined lifecycle points.
Operational visibilityTrack processing state, failures, retries, and runtime health.
Semantic validationEvaluate clinical and workflow context before downstream delivery.

Internal processing pipeline

PROCESSING PIPELINEpersist first · process asynchronously
1MLLP intakeReceive HL7 v2
→
2PersistDurable local storage
→
3QueueBuffer processing work
→
4ProcessHooks + mapping
7DeliverTarget FHIR server
←
6ValidateSemantic rules
←
5BundleFHIR R4 transaction

Durable persistence and internal queues decouple message intake from transformation and downstream delivery.

Main components

ComponentResponsibility
MLLP ListenerAccept HL7 v2 over TCP, validate framing, return ACK/NACK, and collect connection metrics.
Embedded persistenceStore messages durably, track processing state and history, and support retries and restart recovery.
Intake queueBuffer persisted messages and decouple receive operations from downstream processing.
Processing workersCoordinate scripts, transformation, semantic validation, and delivery.
Groovy hooksExecute organization-specific filtering, normalization, enrichment, reconciliation, and workflow logic.
HL7 → FHIR mapperPerform deterministic Java-based transformation for supported HL7 workflows and FHIR resources.
Bundle generationAssemble generated resources into FHIR R4 transaction Bundles with resource links and idempotent delivery patterns.
Semantic validationEvaluate business, interoperability, and clinical-context rules before delivery.
FHIR deliveryDeliver transaction Bundles to the configured FHIR endpoint with timeout, authentication, and retry handling.

Platform core and customer customization

FireSonic separates generic interoperability behavior from organization-specific workflow logic. This keeps the core mapper stable while allowing each deployment to adapt to local HL7 conventions, terminology, and business rules.

PLATFORM COREDeterministic interoperability
  • HL7 v2 parsing and framing
  • HL7 → FHIR R4 mapping
  • FHIR Bundle construction
  • Persistence, queueing, recovery, and delivery
CUSTOM WORKFLOWOrganization-specific behavior
  • Filtering and routing decisions
  • HL7 normalization before mapping
  • FHIR enrichment after mapping
  • Terminology reconciliation and local validation

Asynchronous processing and persistence

Incoming messages are persisted locally before transformation starts. Persisted messages survive FireSonic restarts and can re-enter processing or retry workflows without requiring the source system to resend the original HL7 payload.

FireSonic uses SQLite as the default embedded persistence layer to keep single-node deployments lightweight and operationally simple. The database is optimized for local SSD-backed storage and durable queue semantics. See Persistence & Retention for storage, retention, backup, and database-maintenance details.

Failure isolation and recovery

The processing stages are separated so a downstream FHIR outage or a processing failure does not prevent FireSonic from continuing to accept and persist new HL7 messages. Failed or interrupted messages remain traceable by status and can be recovered or retried according to their failure type.

See Reliability & Recovery for message states, retry behavior, circuit breakers, stale-processing recovery, and administrative retry operations.

Workers and concurrency Commercial

Message intake and processing are asynchronous. Commercial editions allow intake and processing worker counts to be tuned for the deployment so FireSonic can better utilize available CPU resources and increase parallel processing capacity.

Runtime extensibility

Groovy scripts and semantic validation rules provide the runtime extension points for customer-specific behavior. Scripts execute at defined lifecycle stages; semantic rules run against the generated FHIR Bundle before delivery.

Automatic hot reload Commercial

Commercial editions can detect script and semantic-rule changes, compile and validate a new generation, and activate it without restarting the FireSonic runtime. Invalid generations do not replace the currently active configuration.