code: protected void auditRegisterEvent(
  			IHETransactionEventTypeCodes transaction, RFC3881EventOutcomeCodes eventOutcome, 
  			String repositoryUserId, String repositoryIpAddress,
              String userName,
  			String registryEndpointUri,
  			String submissionSetUniqueId, 
  			String patientId,
              List<CodedValueType> purposesOfUse,
  			List<CodedValueType> userRoles)
  	{
  		ImportEvent importEvent = new ImportEvent(false, eventOutcome, transaction, purposesOfUse);
  		importEvent.setAuditSourceId(getAuditSourceId(), getAuditEnterpriseSiteId());
  		importEvent.addSourceActiveParticipant(repositoryUserId, null, null, repositoryIpAddress, true);
          if (! EventUtils.isEmptyOrNull(userName)) {
              importEvent.addHumanRequestorActiveParticipant(userName, null, userName, userRoles);
          }
  		importEvent.addDestinationActiveParticipant(registryEndpointUri, getSystemAltUserId(), null, EventUtils.getAddressForUrl(registryEndpointUri, false), false);
  		if (!EventUtils.isEmptyOrNull(patientId)) {
  			importEvent.addPatientParticipantObject(patientId);
  		}
  		importEvent.addSubmissionSetParticipantObject(submissionSetUniqueId);		
  		
  		audit(importEvent);
  	}
docs: Generically sends audit messages for XDS Document Registry Register Document Set events
  
  @param transaction The specific IHE Transaction (ITI-15 or ITI-41)
  @param eventOutcome The event outcome indicator
  @param repositoryUserId The Active Participant UserID for the repository (if using WS-Addressing)
  @param repositoryIpAddress The IP Address of the repository that initiated the transaction
  @param userName user name from XUA
  @param registryEndpointUri The URI of this registry's endpoint that received the transaction
  @param submissionSetUniqueId The UniqueID of the Submission Set provided
  @param patientId The Patient Id that this submission pertains to
  @param purposesOfUse purpose of use codes (may be taken from XUA token)
  @param userRoles roles of the human user (may be taken from XUA token)