code: public void auditRegistryStoredQueryEvent(
  			RFC3881EventOutcomeCodes eventOutcome,
  			String registryEndpointUri,
              String consumerUserName,
  			String storedQueryUUID, String adhocQueryRequestPayload, String homeCommunityId,
  			String patientId,
              List<CodedValueType> purposesOfUse,
  			List<CodedValueType> userRoles)
  	{
  		if (!isAuditorEnabled()) {
  			return;
  		}
  		
  		/*
  		 * FIXME:  Overriding endpoint URI with "anonymous", for now
  		 */
  		String replyToUri = "http://www.w3.org/2005/08/addressing/anonymous";
  		//String replyToUri = getSystemUserId();
  		
  		auditQueryEvent(true, 
  				new IHETransactionEventTypeCodes.RegistryStoredQuery(), eventOutcome, 
  				getAuditSourceId(), getAuditEnterpriseSiteId(),
  				replyToUri, getSystemAltUserId(), getSystemUserName(), getSystemNetworkId(),
  				consumerUserName, consumerUserName, false,
  				registryEndpointUri, null,
  				storedQueryUUID, adhocQueryRequestPayload, homeCommunityId, 
  				patientId, purposesOfUse, userRoles);
  	}
docs: Audits an ITI-18 Registry Stored Query event for XDS.a and XDS.b Document Consumer actors.
  
  @param eventOutcome The event outcome indicator
  @param registryEndpointUri The endpoint of the registry in this transaction
  @param consumerUserName The Active Participant UserName for the consumer (if using WS-Security / XUA)
  @param storedQueryUUID The UUID of the stored query
  @param adhocQueryRequestPayload The payload of the adhoc query request element
  @param homeCommunityId The home community id of the transaction (if present)
  @param patientId The patient ID queried (if query pertained to a patient id)
  @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)