Class GenericFhirAuditStrategy
java.lang.Object
org.openehealth.ipf.commons.ihe.core.atna.AuditStrategySupport<T>
org.openehealth.ipf.commons.ihe.fhir.audit.AbstractFhirAuditStrategy<T,IBaseOperationOutcome>
org.openehealth.ipf.commons.ihe.fhir.audit.FhirAuditStrategy<GenericFhirAuditDataset>
org.openehealth.ipf.commons.ihe.fhir.audit.GenericFhirAuditStrategy
- All Implemented Interfaces:
AuditStrategy<GenericFhirAuditDataset>
Generic Audit Strategy for FHIR interfaces. The audit written is built alongside what is
defined for IHE FHIR transactions, with the resource type (e.g. Encounter) as event type code.
- Author:
- Christian Ohr
-
Constructor Summary
ConstructorDescriptionGenericFhirAuditStrategy
(boolean serverSide, PatientIdExtractor patientIdExtractor) -
Method Summary
Modifier and TypeMethodDescriptionCreates a new audit dataset instance.enrichAuditDatasetFromRequest
(GenericFhirAuditDataset auditDataset, Object request, Map<String, Object> parameters) Enriches the given audit dataset with transaction-specific contents of the request message and Camel exchange.boolean
enrichAuditDatasetFromResponse
(GenericFhirAuditDataset auditDataset, Object response, AuditContext auditContext) Enriches the given audit dataset with transaction-specific contents of the response message.makeAuditMessage
(AuditContext auditContext, GenericFhirAuditDataset auditDataset) Constructs anAuditMessage
from a providedAuditDataset
Methods inherited from class org.openehealth.ipf.commons.ihe.fhir.audit.FhirAuditStrategy
getEventOutcomeCodeFromOperationOutcome, getEventOutcomeDescriptionFromOperationOutcome
Methods inherited from class org.openehealth.ipf.commons.ihe.fhir.audit.AbstractFhirAuditStrategy
getEventOutcomeCodeFromResource, getEventOutcomeDescription, getEventOutcomeIndicator
Methods inherited from class org.openehealth.ipf.commons.ihe.core.atna.AuditStrategySupport
doAudit, getEventOutcomeDescription, getEventOutcomeIndicator, isAuditableResponse, isServerSide
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.openehealth.ipf.commons.ihe.core.atna.AuditStrategy
enrichAuditDatasetFromResponse
-
Constructor Details
-
GenericFhirAuditStrategy
- Parameters:
serverSide
- server side auditingpatientIdExtractor
- function that extracts a patient reference from a domain resource
-
-
Method Details
-
createAuditDataset
Description copied from interface:AuditStrategy
Creates a new audit dataset instance. -
enrichAuditDatasetFromRequest
public GenericFhirAuditDataset enrichAuditDatasetFromRequest(GenericFhirAuditDataset auditDataset, Object request, Map<String, Object> parameters) Description copied from interface:AuditStrategy
Enriches the given audit dataset with transaction-specific contents of the request message and Camel exchange.- Specified by:
enrichAuditDatasetFromRequest
in interfaceAuditStrategy<GenericFhirAuditDataset>
- Overrides:
enrichAuditDatasetFromRequest
in classAbstractFhirAuditStrategy<GenericFhirAuditDataset,
IBaseOperationOutcome> - Parameters:
auditDataset
- audit dataset to be enriched.request
-Object
representing the request.parameters
- additional parameters
-
enrichAuditDatasetFromResponse
public boolean enrichAuditDatasetFromResponse(GenericFhirAuditDataset auditDataset, Object response, AuditContext auditContext) Description copied from interface:AuditStrategy
Enriches the given audit dataset with transaction-specific contents of the response message.- Specified by:
enrichAuditDatasetFromResponse
in interfaceAuditStrategy<GenericFhirAuditDataset>
- Overrides:
enrichAuditDatasetFromResponse
in classAbstractFhirAuditStrategy<GenericFhirAuditDataset,
IBaseOperationOutcome> - Parameters:
auditDataset
- audit dataset to be enriched.response
-Object
representing the responded resource.auditContext
- audit context, if relevant- Returns:
- true if response indicates success, false otherwise
-
makeAuditMessage
public AuditMessage[] makeAuditMessage(AuditContext auditContext, GenericFhirAuditDataset auditDataset) Description copied from class:AuditStrategySupport
Constructs anAuditMessage
from a providedAuditDataset
- Specified by:
makeAuditMessage
in classAuditStrategySupport<GenericFhirAuditDataset>
- Parameters:
auditContext
- audit contextauditDataset
- audit dataset- Returns:
- audit message
-