Class FhirQueryAuditStrategy
java.lang.Object
org.openehealth.ipf.commons.ihe.core.atna.AuditStrategySupport<FhirQueryAuditDataset>
org.openehealth.ipf.commons.ihe.fhir.audit.AbstractFhirAuditStrategy<FhirQueryAuditDataset, IBaseOperationOutcome>
org.openehealth.ipf.commons.ihe.fhir.audit.FhirAuditStrategy<FhirQueryAuditDataset>
org.openehealth.ipf.commons.ihe.fhir.audit.FhirQueryAuditStrategy
- All Implemented Interfaces:
AuditStrategy<FhirQueryAuditDataset>
- Direct Known Subclasses:
ChPpq5AuditStrategy, Iti119ClientAuditStrategy, Iti119ServerAuditStrategy, Iti66AuditStrategy, Iti67AuditStrategy, Iti78ClientAuditStrategy, Iti78ServerAuditStrategy, Iti83AuditStrategy, Pcc44AuditStrategy
Generic Audit Strategy for FHIR query transactions
- Since:
- 3.4
- Author:
- Christian Ohr
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a new audit dataset instance.enrichAuditDatasetFromRequest(FhirQueryAuditDataset auditDataset, Object request, Map<String, Object> parameters) Further enrich the audit dataset: add query string and patient IDs in the search parameter (if available).booleanenrichAuditDatasetFromResponse(FhirQueryAuditDataset auditDataset, Object response, AuditContext auditContext) Fills in the patient from the query string, for the client side.The search parameters that name the patient a query is about.Methods inherited from class FhirAuditStrategy
getEventOutcomeCodeFromOperationOutcome, getEventOutcomeDescriptionFromOperationOutcomeMethods inherited from class AbstractFhirAuditStrategy
doAudit, getEventOutcomeCodeFromResource, getEventOutcomeDescription, getEventOutcomeIndicatorMethods inherited from class AuditStrategySupport
isAuditableResponse, isServerSide, makeAuditMessageMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AuditStrategy
enrichAuditDatasetFromResponse
-
Constructor Details
-
FhirQueryAuditStrategy
protected FhirQueryAuditStrategy(boolean serverSide)
-
-
Method Details
-
enrichAuditDatasetFromRequest
public FhirQueryAuditDataset enrichAuditDatasetFromRequest(FhirQueryAuditDataset auditDataset, Object request, Map<String, Object> parameters) Further enrich the audit dataset: add query string and patient IDs in the search parameter (if available).- Specified by:
enrichAuditDatasetFromRequestin interfaceAuditStrategy<FhirQueryAuditDataset>- Overrides:
enrichAuditDatasetFromRequestin classAbstractFhirAuditStrategy<FhirQueryAuditDataset, IBaseOperationOutcome>- Parameters:
auditDataset- audit datasetrequest- request objectparameters- request parameters- Returns:
- enriched audit dataset
-
patientIdQueryParameters
The search parameters that name the patient a query is about. The server side does not need them: it gets the request parsed intoFhirSearchParameters, which knows its own patient parameter. The client side has only the query string it sent, so the names have to be spelled out.These are the ones the patient-centric FHIR query transactions use. A transaction whose patient lives somewhere else overrides this.
- Returns:
- names of the search parameters that carry a patient id
-
enrichAuditDatasetFromResponse
public boolean enrichAuditDatasetFromResponse(FhirQueryAuditDataset auditDataset, Object response, AuditContext auditContext) Fills in the patient from the query string, for the client side.This runs here rather than in
enrichAuditDatasetFromRequest(FhirQueryAuditDataset, Object, Map)because the query string does not exist yet when that is called: the client audit dataset only learns it once HAPI has built the request, which happens on the way out. Without it a client record could never name the patient, and would be stepped down to a weaker profile than the server record of the same transaction.- Specified by:
enrichAuditDatasetFromResponsein interfaceAuditStrategy<FhirQueryAuditDataset>- Overrides:
enrichAuditDatasetFromResponsein classAbstractFhirAuditStrategy<FhirQueryAuditDataset, IBaseOperationOutcome>- Parameters:
auditDataset- audit datasetresponse- response objectauditContext- audit context- Returns:
- whether the transaction is to be considered successful
-
createAuditDataset
Description copied from interface:AuditStrategyCreates a new audit dataset instance.
-