This project contains methods to convert a set of Fhir R5 AuditEvents into a XES representation. The transformation is shown in the following image:
To use the project, simply include the maven dependency on the project.
<dependency>
<groupId>science.aist</groupId>
<artifactId>fhir-audit-event-to-xes</artifactId>
<version>1.0.0</version>
<scope>compile</scope> <!-- Note: this is default -->
</dependency>
This then enables you to access our service class, to convert from AuditEvents to XES Logs.
// Create a new Fhir service
var service = new FhirAuditEventsToXESLogService();
// create some outputstream where to write the results
var outputStream = new ByteArrayOutputStream();
// get the input stream to some auditEvent bundle:
var inputStream = ...
// Execute the service method
service.convertFhirAuditEventsToXESLog(inputStream, outputStream);
// (Optional - depending on choosen output stream): Get the data out of the stream
String res = outputStream.toString(StandardCharsets.UTF_8);
If you already have the AuditEvents as java classes you can also create the log out of these.
var service = new FhirAuditEventsToXESLogService();
Collection<AuditEvent> auditEvents = ...
var log = service.convertFhirAuditEventsToXESLog(auditEvents);
// (Optional): Write log to some output stream:
var outputStream = ...
new LogRepository().save(new ObjectFactory.createLog(log), outputStream);
If you have any questions, please check out our FAQ section.
First make sure to read our general contribution guidelines.
Copyright (c) 2022 the original author or authors. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
If you are going to use this project as part of a research paper, we would ask you to reference this project by citing it.