NextGen Connect Programming Reference
NextGen Connect Programming Reference
Programming Reference
This book is provided as part of the NextGen Connect Training or NextGen Connect Certification Training
class for the sole purpose of the attendee’s personal training use. It is not available for sale or resale apart
from attending one of the aforementioned training classes hosted by NextGen Healthcare, Inc.
This document may not to be distributed, reproduced, transmitted, published or modified in any manor
without the express written permission of NextGen Healthcare, Inc.
All names, logos, images and marks appearing within these materials, except as otherwise noted, are
trademarks owned or used under license by NextGen Healthcare, Inc. The use or misuse of these
trademarks or any other content is strictly prohibited.
The information in this book is to be used strictly for training purposes only. Neither NextGen Healthcare,
Inc. nor the author of this book assume any responsibility for any errors or omissions, or for damages
resulting from the use of the information contained herein.
Method summary
ACKGenerator
com.mirth.connect.server.userutil
- Java utility class for generating ACK response messages.
static String generateAckResponse(String message, String
acknowledgementCode, String textMessage)
Generates a new HL7 ACK message based on the given HL7 message.
The MSA.1 field is set to the given acknowledgement code, and the
MSA.3 field is set to the given text message.
The date/time of message in MSH.7 is set to the current date/time in the
format yyyyMMddHHmmss.
No ERR segment is added to the message. To add an ERR segment,
use the version of this method listed below.
static String generateAckResponse(String message, boolean isXML, String
acknowledgementCode, String textMessage, String
dateFormat, String errorMessage)
Generates a new HL7 ACK message based on the given HL7 message.
The MSA.1 field is set to the given acknowledgement code, and the
MSA.3 field is set to the given text message.
The date/time of the message in MSH.7 is set to the current date/time
using the format provided for the dateFormat parameter.
If the errorMessage parameter is a non-null and non-zero-length string, an
ERR segment will be added with the given message set to field ERR.1.
AlertSender
com.mirth.connect.server.userutil
- Java utility class providing the ability to dispatch error events that can trigger an alert.
Constructor AlertSender(String channelId)
Instantiates a new AlertSender.
Constructor AlertSender(ImmutableConnectorMessage connectorMessage)
Instantiates a new AlertSender.
void sendAlert(String errorMessage)
Dispatches an error event that can trigger an alert.
Attachment
com.mirth.connect.server.userutil
- Java Class representing the attachment.
- Used to store and retrieve details about message attachments such as the ID, MIME type,
and content.
Constructor Attachment()
Instantiates a new Attachment with no ID, content, or MIME type.
Constructor Attachment(String id, byte[] content, String type)
Instantiates a new Attachment with byte data and the given MIME type.
Constructor Attachment(String id, String content, String type)
Instantiates a new Attachment with String data using UTF-8 charset
encoding and the given MIME type.
Constructor Attachment(String id, String content, String charset,
String type)
Instantiates a new Attachment with String data, using the given charset
encoding and MIME type.