protected void auditQueryEvent ( boolean systemIsSource , IHETransactionEventTypeCodes transaction , RFC3881EventOutcomeCodes eventOutcome , String sourceFacility , String sourceApp , String sourceAltUserId , String sourceNetworkId , String destinationFacility , String destinationApp , String destinationAltUserId , String destinationNetworkId , String humanRequestor , String hl7MessageId , String hl7QueryParameters , String [ ] patientIds , List < CodedValueType > purposesOfUse , List < CodedValueType > userRoles ) { // Create query event QueryEvent queryEvent = new QueryEvent ( systemIsSource , eventOutcome , transaction , purposesOfUse ) ; queryEvent . setAuditSourceId ( getAuditSourceId ( ) , getAuditEnterpriseSiteId ( ) ) ; // Set the source active participant queryEvent . addSourceActiveParticipant ( EventUtils . concatHL7FacilityApplication ( sourceFacility , sourceApp ) , sourceAltUserId , null , sourceNetworkId , true ) ; // Set the human requestor active participant if ( ! EventUtils . isEmptyOrNull ( humanRequestor ) ) { queryEvent . addHumanRequestorActiveParticipant ( humanRequestor , null , null , userRoles ) ; } // Set the destination active participant queryEvent . addDestinationActiveParticipant ( EventUtils . concatHL7FacilityApplication ( destinationFacility , destinationApp ) , destinationAltUserId , null , destinationNetworkId , false ) ; // Add a patient participant object for each patient id if ( ! EventUtils . isEmptyOrNull ( patientIds ) ) { for ( int i = 0 ; i < patientIds . length ; i ++ ) { queryEvent . addPatientParticipantObject ( patientIds [ i ] ) ; } } byte [ ] queryParamsBytes = null , msgControlBytes = null ; if ( hl7QueryParameters != null ) { queryParamsBytes = hl7QueryParameters . getBytes ( ) ; } if ( hl7MessageId != null ) { msgControlBytes = hl7MessageId . getBytes ( ) ; } // Add the Query participant object queryEvent . addQueryParticipantObject ( null , null , queryParamsBytes , msgControlBytes , transaction ) ; audit ( queryEvent ) ; }
Audit a QUERY event for PIX and PDQ transactions . Useful for PIX Query PDQ Query and PDVQ Query in the PIX Manager as well as the PIX and PDQ Consumer