public AcknowledgementType audit(PIXConsumerPRPAIN201301UVRequestType request) { SubjectAddedMessageType message = new SubjectAddedMessageType(); message.setPRPAIN201301UV02(request.getPRPAIN201301UV02()); message.setAssertion(request.getAssertion()); AcknowledgementType ack = logSubjectAdded( message, NhincConstants.AUDIT_LOG_INBOUND_DIRECTION, NhincConstants.AUDIT_LOG_ENTITY_INTERFACE); return ack; }
private AcknowledgementType logSubjectAdded( SubjectAddedMessageType message, String direction, String _interface) { AcknowledgementType ack = new AcknowledgementType(); AuditRepositoryLogger auditLogger = new AuditRepositoryLogger(); LogEventRequestType auditLogMsg = auditLogger.logSubjectAdded(message, direction, _interface); if (auditLogMsg != null) { AuditRepositoryProxyObjectFactory auditRepoFactory = new AuditRepositoryProxyObjectFactory(); AuditRepositoryProxy proxy = auditRepoFactory.getAuditRepositoryProxy(); ack = proxy.auditLog(auditLogMsg, message.getAssertion()); } return ack; }
public AcknowledgementType audit(PIXConsumerPRPAIN201301UVProxyRequestType request) { SubjectAddedMessageType message = new SubjectAddedMessageType(); PIXConsumerPRPAIN201301UVProxyRequestType logRequest = new PIXConsumerPRPAIN201301UVProxyRequestType(); if (request.getPRPAIN201301UV02() != null) { org.hl7.v3.PRPAIN201301UV02 input = request.getPRPAIN201301UV02(); if (input.getControlActProcess() != null && input.getControlActProcess().getSubject() != null) { List<org.hl7.v3.PRPAIN201301UV02MFMIMT700701UV01Subject1> subjects = input.getControlActProcess().getSubject(); if (subjects.get(0).getRegistrationEvent() != null) { if (subjects.get(0).getRegistrationEvent().getSubject1() != null) { if (subjects.get(0).getRegistrationEvent().getSubject1().getPatient() != null) { logRequest.setPRPAIN201301UV02( HL7PRPA201301Transforms.createPRPA201301( subjects.get(0).getRegistrationEvent().getSubject1().getPatient(), null, input.getSender().getDevice().getId().get(0).getRoot(), input.getReceiver().get(0).getDevice().getId().get(0).getRoot())); } } } } } message.setPRPAIN201301UV02(logRequest.getPRPAIN201301UV02()); message.setAssertion(request.getAssertion()); AcknowledgementType ack = logSubjectAdded( message, NhincConstants.AUDIT_LOG_INBOUND_DIRECTION, NhincConstants.AUDIT_LOG_ENTITY_INTERFACE); return ack; }