
Lifecycle Hooks
Intercept key points in the integration lifecycle to filter, enrich, or validate data with custom logic.
Develop, test, and debug customer-specific HL7 v2 → FHIR workflows locally in your IDE. Normalize source HL7, enrich generated FHIR, call external services, perform FHIR lookups, apply semantic rules, and deploy the same Groovy workflow to FireSonic.
Extend FireSonic through defined lifecycle hooks, platform-managed integration APIs, and a controlled runtime without modifying the platform core.

Intercept key points in the integration lifecycle to filter, enrich, or validate data with custom logic.

Secure, versioned APIs to connect, orchestrate, and manage integrations with reliability and scale.

Execute custom logic in an isolated, secure runtime with strict boundaries and zero impact on core flows.
Use SDK services to implement local healthcare workflows without rebuilding platform infrastructure.

Read, replace, clear, and normalize HL7 fields and segments before conversion.

Inspect, patch, add, or remove generated FHIR resources after conversion.

Search Patient, Encounter, and other resources using the managed FHIR client.

Validate local codes against configured terminology services and standard coding systems.

Call external HTTP services using managed clients, authentication, and sync/async requests.

Use TTL caches and injected environment-specific configuration properties.

Implement INFO, WARN, and ERROR rules against the generated FHIR Bundle.

Use managed retry helpers to make external integrations more resilient.
Develop, test, version, and deliver workflow changes using familiar engineering practices.





Generic interoperability stays in the platform. Customer scripts contain local workflow rules, normalization, enrichment, terminology reconciliation, validation, and organization-specific behavior.
Transport, parsing, mapping, durable processing, and delivery.
Workflow rules, enrichment, validation, terminology, and external integrations.
class Main implements IntegrationScript {
@Override
void onStartup() {
// Initialize script resources after dependency injection.
}
@Override
FilterResult shouldProcess(MessageEnvelope envelope) {
// Accept, filter, or reject the incoming HL7 message.
return FilterResult.accept()
}
@Override
MessageEnvelope preConvert(MessageEnvelope envelope) {
// Normalize customer-specific HL7 before conversion.
return envelope
}
@Override
Bundle postConvert(MessageEnvelope envelope, Bundle bundle) {
// Enrich generated FHIR and apply workflow-specific logic.
return bundle
}
@Override
void postValidation(MessageEnvelope envelope,
Bundle bundle,
SemanticValidationResult result) {
// React to semantic validation errors, warnings, and info.
}
@Override
void onShutdown() {
// Release external resources owned by the script.
}
@Override
String scriptVersion() {
// Report the active integration-script version.
return "customer-workflow-1.0.0"
}
}Build and verify customer workflows locally with confidence, then deploy the same workflow code to FireSonic without modifying the platform core.