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; }
public MCCIIN000002UV01 createAck( PIXConsumerPRPAIN201301UVRequestType request, String ackMsgText) { MCCIIN000002UV01 ack = new MCCIIN000002UV01(); II msgId = new II(); String senderOID = null; String receiverOID = null; if (request != null && request.getPRPAIN201301UV02() != null) { // Extract the message id if (request.getPRPAIN201301UV02().getId() != null) { msgId = request.getPRPAIN201301UV02().getId(); } // Set the sender OID to the receiver OID from the original message if (NullChecker.isNotNullish(request.getPRPAIN201301UV02().getReceiver()) && request.getPRPAIN201301UV02().getReceiver().get(0) != null && request.getPRPAIN201301UV02().getReceiver().get(0).getDevice() != null && NullChecker.isNotNullish( request.getPRPAIN201301UV02().getReceiver().get(0).getDevice().getId()) && request.getPRPAIN201301UV02().getReceiver().get(0).getDevice().getId().get(0) != null && NullChecker.isNotNullish( request .getPRPAIN201301UV02() .getReceiver() .get(0) .getDevice() .getId() .get(0) .getRoot())) { senderOID = request.getPRPAIN201301UV02().getReceiver().get(0).getDevice().getId().get(0).getRoot(); } // Set the receiver OID to the sender OID from the original message if (request.getPRPAIN201301UV02().getSender() != null && request.getPRPAIN201301UV02().getSender().getDevice() != null && NullChecker.isNotNullish(request.getPRPAIN201301UV02().getSender().getDevice().getId()) && request.getPRPAIN201301UV02().getSender().getDevice().getId().get(0) != null && NullChecker.isNotNullish( request.getPRPAIN201301UV02().getSender().getDevice().getId().get(0).getRoot())) { receiverOID = request.getPRPAIN201301UV02().getSender().getDevice().getId().get(0).getRoot(); } // Create the ack message ack = HL7AckTransforms.createAckMessage( null, msgId, HL7AckTransforms.ACK_TYPE_CODE_ACCEPT, ackMsgText, senderOID, receiverOID); } return ack; }