protected Element eventIdentification(EventIdentificationType eventIdentification) { Element element = new Element("EventIdentification"); if (eventIdentification != null) { element.setAttribute("EventActionCode", eventIdentification.getEventActionCode().getValue()); element.setAttribute("EventDateTime", eventIdentification.getEventDateTime().toString()); element.setAttribute("EventOutcomeIndicator", eventIdentification.getEventOutcomeIndicator().getValue().toString()); if (eventIdentification.getEventID() != null) { element.addContent(codedValueType("EventID", eventIdentification.getEventID())); } eventIdentification.getEventTypeCode().stream() .map(eventTypeCode -> codedValueType("EventTypeCode", eventTypeCode)) .forEach(element::addContent); if (eventIdentification.getEventOutcomeDescription() != null) { element.addContent( new Element("EventOutcomeDescription") .addContent(eventIdentification.getEventOutcomeDescription())); } eventIdentification.getPurposesOfUse().stream() .map(purposeOfUse -> codedValueType("PurposeOfUse", purposeOfUse)) .forEach(element::addContent); } return element; }
protected AuditEvent translate(AuditMessage auditMessage) { EventIdentificationType eit = auditMessage.getEventIdentification(); AuditEvent auditEvent = new AuditEvent() .setType(codedValueTypeToCoding(eit.getEventID())) .setAction(getAuditEventAction(eit.getEventActionCode())) .setRecorded(Date.from(eit.getEventDateTime())) .setOutcome(getAuditEventOutcome(eit.getEventOutcomeIndicator())) .setOutcomeDesc(eit.getEventOutcomeDescription()); eit.getEventTypeCode().forEach(etc -> auditEvent.addSubtype(codedValueTypeToCoding(etc))); eit.getPurposesOfUse().forEach(pou -> auditEvent.addPurposeOfEvent(codedValueTypeToCodeableConcept(pou))); auditMessage.getActiveParticipants().forEach(ap -> auditEvent.addAgent(activeParticipantToAgent(ap))); auditEvent.setSource(auditSourceIdentificationToEventSource(auditMessage.getAuditSourceIdentification())); auditMessage.getParticipantObjectIdentifications().forEach(poit -> auditEvent.addEntity(participantObjectIdentificationToEntity(poit))); return auditEvent; }
protected AuditEvent translate(AuditMessage auditMessage) { EventIdentificationType eit = auditMessage.getEventIdentification(); AuditEvent auditEvent = new AuditEvent() .setType(codedValueTypeToCoding(eit.getEventID())) .setAction(getAuditEventAction(eit.getEventActionCode())) .setRecorded(Date.from(eit.getEventDateTime())) .setOutcome(getAuditEventOutcome(eit.getEventOutcomeIndicator())) .setOutcomeDesc(eit.getEventOutcomeDescription()); eit.getEventTypeCode().forEach(etc -> auditEvent.addSubtype(codedValueTypeToCoding(etc))); eit.getPurposesOfUse().forEach(pou -> auditEvent.addPurposeOfEvent(codedValueTypeToCodeableConcept(pou))); auditMessage.getActiveParticipants().forEach(ap -> auditEvent.addAgent(activeParticipantToAgent(ap))); auditEvent.setSource(auditSourceIdentificationToEventSource(auditMessage.getAuditSourceIdentification())); auditMessage.getParticipantObjectIdentifications().forEach(poit -> auditEvent.addEntity(participantObjectIdentificationToEntity(poit))); return auditEvent; }
@Test public void testRetrieveDocument() { try { getProducerTemplate().requestBody("direct:input", null, byte[].class); fail(); } catch (CamelExecutionException e) { assertTrue(e.getCause() instanceof HttpOperationFailedException); // Check ATNA Audit AbstractMockedAuditMessageQueue sender = getAuditSender(); assertEquals(1, sender.getMessages().size()); AuditMessage event = sender.getMessages().get(0); assertEquals( EventOutcomeIndicator.MajorFailure, event.getEventIdentification().getEventOutcomeIndicator()); } }
boolean serverSide, boolean requiresPatient) { assertEquals(eventOutcomeIndicator, auditMessage.getEventIdentification().getEventOutcomeIndicator()); assertEquals(eventActionCode, auditMessage.getEventIdentification().getEventActionCode()); assertEquals(eventId, auditMessage.getEventIdentification().getEventID());
event.getEventIdentification().getEventOutcomeIndicator()); assertEquals( EventActionCode.Create,
event.getEventIdentification().getEventOutcomeIndicator()); assertEquals( EventActionCode.Execute,
event.getEventIdentification().getEventOutcomeIndicator()); assertEquals( EventActionCode.Execute,
event.getEventIdentification().getEventOutcomeIndicator()); assertEquals( EventActionCode.Execute,
event.getEventIdentification().getEventOutcomeIndicator()); assertEquals( EventActionCode.Execute,
event.getEventIdentification().getEventOutcomeIndicator()); assertEquals( EventActionCode.Create,
event.getEventIdentification().getEventOutcomeIndicator()); assertEquals( EventActionCode.Create,
event.getEventIdentification().getEventOutcomeIndicator()); assertEquals( EventActionCode.Execute,
event.getEventIdentification().getEventOutcomeIndicator()); assertEquals( EventActionCode.Execute,
event.getEventIdentification().getEventOutcomeIndicator()); assertEquals( EventActionCode.Execute,
event.getEventIdentification().getEventOutcomeIndicator()); assertEquals( EventActionCode.Execute,