Audit Dispatch Service

IAuditDispatchService in assembly SanteDB.Core.Api version


Represents a service that dispatches audits to a central repository


The auditing of access to clinical data is of the utmost importance. SanteDB generates and stores audits locally using an IRepositoryService for AuditData. However, many implementations will have centralized audit repositories for collecting audits from various health systems in a central place. Such collection is useful to establishing overall patterns of access across systems in an HIE (for example)

The audit dispatching service is responsible for sending AuditData instances to remote audit repositories. The service's responsibilities are:

  1. Ensure that the AuditData instance is complete and contains relevant information for this node

  2. Transform the AuditData class into the appropriate format (IETF RFC3881, FHIR, etc.)

  3. Ensure the delivery of the audit to the central repository





AuditData audit

Sends the audit to the central authority


IHE ATNA Audit Dispatcher - (SanteDB.Messaging.Atna)

Represents an audit service that communicates Audits via an IHE ATNA transport


This implementation of the IAuditDispatchService is responsible for creating and dispatching audits in one of the appropriate formats for IHE Audit Trail and Node Authentication audits.

The specific formats of audits supported are:

The audits can be sent via a variety of transports including:

  • UDP Syslog

  • TCP Syslog

  • Secure (TLS) TCP Syslog


  • File System Settings

The configuration of this service is described in AtnaConfigurationSection

Service Registration

<section xsi:type="ApplicationServiceContextConfigurationSection" threadPoolSize="4">
		<add type="SanteDB.Messaging.Atna.AtnaAuditService, SanteDB.Messaging.Atna, Version=, Culture=neutral, PublicKeyToken=null" />

FhirAuditDispatcher - (SanteDB.Messaging.FHIR)

Audit dispatch service which sends audits using HL7 FHIR


This implementation of the IAuditDispatchService is responsible for dispatching audits to a central FHIR repository which supports the FHIR auditing specification.

This dispatcher is configured using the FhirDispatcherTargetConfiguration class where the dispatcher name is audit. The dispatcher configuration may include authentication/authorization parameters for the solution, as well as authenticators or proxy information.

Service Registration

<section xsi:type="ApplicationServiceContextConfigurationSection" threadPoolSize="4">
		<add type="SanteDB.Messaging.FHIR.Auditing.FhirAuditDispatcher, SanteDB.Messaging.FHIR, Version=, Culture=neutral, PublicKeyToken=null" />

Example Implementation

/// Example Implementation
using SanteDB.Core.Services;
/// Other usings here
public class MyAuditDispatchService : SanteDB.Core.Services.IAuditDispatchService { 
	public String ServiceName => "My own IAuditDispatchService service";
	/// <summary>
	/// Sends the audit to the central authority
	/// </summary>
	public void SendAudit(AuditData audit){
		throw new System.NotImplementedException();


Last updated