User Guide : Designing and Executing Processes : Process Steps and Associated Components : Health Care Connectivity
 
Share this page                  
Health Care Connectivity
This section provides information to use the integration platform to handle data under the Health Level Seven (HL7) and National Council for Prescription Drug Programs (NCPDP) script standards.
The intended audience is mainly health care IT consultants who use messages in HL7 or NCPDP script format to exchange information between health information systems such as radiology, pharmacy, laboratory, billing, and patient-scheduling applications.
Before you begin using the information in these topics, you must have working knowledge of HL7 and NCPDP. In addition, you must know how to use the integration platform to design maps and processes. See the following help topics for details:
Process Steps and Associated Components
Building Processes
This section covers the following topics:
About Health Care Integration
Before You Begin
Health Care Step Types
Health Care Components
HL7 Integration Schemas
About Health Care Integration
Health Care Integration supports the exchange of electronic data among diverse and independent medical applications, rather than closely coupled client-server type applications. Messages are received, and delivered through TCP/IP, or file transfer protocol (FTP).The following types of health care standards are supported:
HIPAA - The Health Insurance Portability and Accountability Act of 1996 (HIPAA) mandates that health care organizations must adopt transaction and information security standards to support the electronic exchange of administrative and financial health care data for administrative simplification. HIPAA requires the use of certain standard formats for documentation of medical claims that are related to services and other transactions associated with medical record keeping.
NCPDP - The domain of NCPDP is pharmacy services. NCPDP Script defines the structure and content of messages transmitted to and from health care professionals in the pharmaceutical services industry. These include pharmacists, health insurers, drug manufacturers, and wholesale pharmaceutical distributors. The NCPDP Script standard handles new prescriptions, refill requests, medication history, and so on.
HL7 - The HL7 domain is clinical and administrative data. It covers areas such as patient care information, admissions, discharges, clinical observations, billings, and master file updates. It defines the format and the content of messages that applications exchange by implementing common interface standards between diverse medical applications. HL7 standards are used for the electronic data exchange in the health care environment.
HL7 Component Features and Capabilities
The Minimal Lower Layer Protocol (MLLP) components provide a mechanism to send and receive HL7 messages over a network.
The HL7 Message Fragment Aggregator concatenates fragment messages into a single message.
The HL7 Message Timeout Queue provides the facility to specify the maximum interval within which a message sequence is expected to arrive.
The HL7 Basic Message Validation Invoker performs the following actions:
Validates the message header (default).
Checks the syntax (optional).
The HL7 Message Structure Validation Invoker verifies the validity of the message structure.
The HL7 Standard Acknowledgment Message Invoker generates application-level acknowledgment messages.
The HL7 Enhanced Acknowledgment Message Invoker generates an acknowledgment after receiving the message. This acknowledgment releases the sending application from the need to resend the message.
The receiving application safely stores the message and sends an acknowledgment of receipt.
The HL7 Batch Iterator receives one or more batch messages and returns an individual message from the batch.
The HL7 Message Segment Iterator returns either a segment or segments (if it is repeating) using the segment name provided or a Field or Fields (if it is repeating) using the field name provided.
The HL7 Message Aggregator generates a template message using the data provided to the component.
Before You Begin
Before you begin using the information for Health Care integration, you must know certain conceptual information and procedures.
This section covers the following conceptual information:
Process Designer
Secure Socket Layer
ACK Message
HL7 Standard Acknowledgment Message Invoker
HL7 Enhanced Acknowledgment Message Invoker
Message Validation
Message Batch
Process Designer
Process Designer is a graphical data transformation management tool you can use to arrange your complete transformation project.
You should also be familiar with the following component types in Process Designer:
Aggregator - Aggregator components provide the ability to assemble a data object from its individual parts. This is done by passing a message object containing a part to the PutMessage action. The component is responsible for knowing when all of the parts have been provided to produce the complete data object.
Invoker - Invoker components provide the ability to utilize a service provided by an external system or application. The service is invoked by passing a source message object to the Execute Action. The component uses the data provided in the message object to pass the information necessary to use the service to the system or application. The invoker places any output from the service into the target message object. Typical applications for an invoker component would include using a web or SOAP service.
Iterators - Iterator components provide the ability to extract individual parts from a larger data object. This is done by placing the individual part into a message object that is returned by the GetMessage action. Each subsequent call to GetMessage will return the next part. Iterators do not change the Source data object.
Transformers - Transformer components provide you with a mechanism to take source data from one format and change it into a different target format.
Queues - Queue components provide access to data and services provided by message queueing systems. This includes the ability to read and write messages to and from a queue as well as transactional support. Queue components can provide access to common message queueing sytems, such as File Folder Queue.
Secure Socket Layer
Secure Socket Layer (SSL) is a protocol developed by Netscape for transmitting private documents through the Internet.
Secured Socket Layer uses a private key to encrypt data that is transferred over the SSL connection. Both Netscape Navigator and Internet Explorer support SSL, and many Web sites use the protocol to obtain confidential user information.
Currently, the Health Care Integration product is aimed at the Health Care vertical that is capable of supporting SSL-based communications over Minimum Lower Layer Protocol (MLLP) and Sequence Number Protocol (SNP).
ACK Message
The Health Level 7 (HL7) protocol requires that the application send an acknowledgment (ACK) after it has successfully received the message.
The HL7 protocol requires that the receiver send back a valid ACK message only after the message is received and the data is consumed.
To generate an ACK message, the generic mechanism should do the following
1. Extract the standard message header (MSH) segments from each incoming message.
2. Populate the required fields in the ACK message using the MSH segments.
HL7 Standard Acknowledgment Message Invoker
The standard message acknowledgment provides an acknowledgment at the application level, and is sent after the receiving application validates the HL7 message.
Note:  The support for this type of acknowledgment is available from HL7 2.1 and higher.
HL7 Enhanced Acknowledgment Message Invoker
Sending an acknowledgment (ACK) is an important requirement of the HL7 standard. The receiving application transmits an acknowledgment only after it has successfully received the message.
The enhanced acknowledgment is sent after the receiving application accepts the HL7 message. The receiving system then commits the message to safe storage in a manner that releases the transmitting system from the need to resend the message.
After the message has been processed by the receiving system, an application acknowledgment can then be used to return the status to the sending system.
Note:  The support for this type of acknowledgment is available only from HL7 2.2 and higher.
Message Validation
Message validation is where the incoming HL7 message is assessed against predefined rules. This validation ensures that the message is syntactically, structurally, and logically accurate.
Message validation is usually done before the message can be subjected to further any kind of business processing.
Message Batch
A batch usually consists of a single type of message. However, the HL7 definition does not restrict a batch to only one message type.
The structure of a HL7 batch file is given by the following
[FHS] (file header segment) { [BHS] (batch header segment)
 { [MSH (zero or more HL7 messages)
 ....
 ....
 ....
 ] }
 [BTS] (batch trailer segment)
 }
 [FTS] (file trailer segment)
A batch message may not always have header and trailer segments.
Health Care Step Types
Health care integration supports the following step types:
Aggregators - Assemble data objects from individual parts. An aggregator passes a message object containing one of the individual parts to a PutMessage action. When the aggregator determines that all parts are present, it assembles the completed data object.
Invokers - Invoke services provided by external systems or applications. An invoker passes a source message object to an Execute action. Data from the message object is passed to the service. The invoker places any output from the service into a target message object. Typical applications for invokers include Web or SOAP services.
Iterators - Extract individual parts from larger data objects. An iterator passes the individual parts to a message object that is returned by a GetMessage action. Each subsequent call to GetMessage returns the next part of the data object. Iterators do not change the source data objects.
Queues - Provide access to data and services provided by message queueing systems. This includes the ability to read and write messages to and from a queue as well as transactional support. Queue components can provide access to common message queueing systems, such as File Folder Queue.
Transformers - Take source data that is in one format and convert it to a different target format.
Validators - Verify source data conforms to supplied schema. A validator checks data at a structural level, such as the loop repeat count, segment information, minimum and maximum field length, and field values. The validators do not provide conditional validation or validate the data itself.
Health Care Components
The following table lists the HL7 components and provides a description for each component.
Component
Description
Component Version(s)
Aggregators
Generates a template message from the data provided to the component.
1.0.0
Receives multiple fragments of HL7 messages and aggregates them into a single message.
1.0.0
Invokers
Validates a message header and optionally checks its syntax.
Note:  This component is similar, but not identical to the HL7 Message Structure Validator. Make sure you use the correct component.
1.0.0
Generates an enhanced system-level acknowledgment message to the sending application.
1.0.0
Checks the validity of message structure.
1.0.0
Generates an application-level acknowledgment message to the sending application.
1.0.0
Iterators
Receives one or more batch messages and returns an individual message from the batch.
1.0.0
Returns either segments or fields, using the segment or field names that you provide.
1.0.0
Transformers
Transforms an HL7 message into XML.
1.2.1
2.0.0
Transforms an XML message into HL7.
1.1.1
2.0.0
Transforms NCPDP script to XML
1.0.6
Transforms XML script to NCPDP script
1.0.6
Validator
 
 
Verifies incoming EDI claim transactions with a standard schema at different Strategic National Implementation Process (SNIP) levels, and then generates a 999 Functional Acknowledgment that reports the results.
1.1.0
Validates the structure of the HL7 Message against the applicable schema for a given version.
2.0.0
Validates the Interchange Control Header (ISA segment) and Interchange Control Trailer (IEA segment) of a HIPAA document against specific TA1 technical acknowledgement note codes.
1.0.0
HL7 Message Aggregator
The HL7 Message Aggregator generates a template HL7 message using the data provided.
You must provide a pattern specifying the composite /sub-composite of a field under a segment along with the data so that the required message is generated. The pattern along with the data is in the XML format.
The process then performs the following actions:
1. Sets the pattern XML to the DJMessage body.
2. Passes the DJMessage body to the PutMessage action of the component.
3. Calls multiple PutMessage action (s) on the component by providing the pattern XML.
4. Retrieves the template message (GetMessage action) using the information provided by the PutMessage action.
5. Clears the data placeholder objects after generating the XML message.
Pattern XML
The pattern XML has the following definitions:
<? xml version="1.0" encoding="UTF-8"? >
      <!ELEMENT datapattern (data)+>
      <!ELEMENT data (segment | group | choice)+>
      <!ELEMENT group (segment | group )+>
      <!ATTLIST group 
      id CDATA #REQUIRED
      repeatIndex CDATA #IMPLIED
      sequence CDATA #IMPLIED
      mode CDATA #IMPLIED>
     <!ELEMENT choice (segment+)>
      <!ATTLIST choice 
      id CDATA #REQUIRED
      repeatIndex CDATA #IMPLIED
      sequence CDATA #IMPLIED
      mode CDATA #IMPLIED>
      <!ELEMENT segment (field+)>
      <!ATTLIST segment
      id CDATA #REQUIRED
      repeatIndex CDATA #IMPLIED
      sequence CDATA #IMPLIED
      mode CDATA #IMPLIED>
      <!ELEMENT field (composite+)>
      <!ATTLIST field
      number CDATA #REQUIRED
      repeatIndex CDATA #IMPLIED>
      <!ELEMENT composite (#PCDATA | subcomposite)*>
      <!ATTLIST composite number CDATA #REQUIRED>
      <!ELEMENT subcomposite (#PCDATA)>
      <!ATTLIST subcomposite 
      number CDATA #REQUIRED> 
The data element contains groups, segments, and choices for which the data has to be inserted.The following table provides the attributes for the XML pattern.
Attribute Name
Description
id
The name of the segment/group/choice.
repeatIndex
(Optional) Applicable only to segment/group/fields.
Default - first index.
If an invalid repeatIndex is specified, then the component displays an error. The reason is that you cannot create a higher repeatIndex when a lower repeatIndex is not created.
sequence
(Optional) Specifies the position of the occurrence of this segment/group/choice within the message.
Default - first occurring sequence of this segment/group within the message.
To add a repeated segment, specify the sequence number of the segment within the message so that it is inserted at the specified position in the message.
The sequence attribute is used to differentiate between segments occurring in more than one position within the message.
mode
(Optional) Allowable values are:
"C" - for create
"D" - for delete.
If the data for a composite or subcomposite exists and a new value is provided, then the old value is overwritten with the new one. Thus, the default behavior of the component is "when the data already exists then update".
The "D"- delete mode, removes the data from the specified composite or subcomposite and the placeholder associated with it. Delete mode is available at all the levels of the message hierarchy. If the delete option is specified at segment level, then values from all the fields, composites, and subcomposites within that segment is removed.
Default - "C" - create.
number
(Mandatory) Available only at the field, composite and the sub composite level. This attribute specifies the sequence of the field within the segment.
Composites can have data only if it does not have any sub composite within it. Otherwise the data is set to the subcomposite values.
HL7 Message Aggregator Properties
 
Property Name
Description
Base Segment Path
Location of the schema library, which the component loads for a specific schema version and message type.
Version
Supported HL7 version.
Message Type
Message type for which the template message is generated.
Supported Actions
 
Action
Description
GetMessage
Returns data from the Iterator in a DJMessage object.
PutMessage
Sends the data contained in a DJMessage object to the aggregator.
Note:  The maximum size limit for DJMessage is 512 MB.
Supported Action Parameters
 
Action
Parameter
Description
GetMessage
Message
Returns the template message.
PutMessage
Message
Creates the data placeholders using the pattern XML provided.
Supported Action Properties
There are no supported action properties.
Error Conditions
This transformer returns the following error messages.
Error Code
Error Name
Description
Reason
8
ERR_WRITERR
Error while running the “put message” action.
This error is returned by the HL7 Message Aggregator when an error occurs while creating the template message
0
ERR_OK
OK status
No Error. OK Status. The Information is returned successfully
HL7 Message Fragment Aggregator
The HL7 Message Fragment Aggregator supports HL7 standards to perform the following actions:
1. Receive multiple HL7 message fragments.
2. Aggregate them into a single message.
The recipient may receive the message in minutes, days or weeks later, as there is no set time frame.
The component receives messages in the format of Electronic Data Exchange (EDI).
HL7 Message Fragment Aggregator Properties
 
Property Name
Description
Domain_Name
Location of the schema library, which the component loads for a specific schema version and message type.
Message_Type
Supported HL7 version.
Cache_Type
Message type for which the template message is generated.
Supported Actions
 
Action
Description
GetMessage
Returns data from the aggregator in a djmessage object.
PutMessage
Sends the data contained in a DJMessage object to the aggregator.
Note:  The maximum size limit for DJMessage is 512 MB.
Supported Action Parameters
 
Action
Parameter
Description
GetMessage
Message
Returns the template message.
PutMessage
Message
Creates the data placeholders using the pattern XML provided.
Supported Action Properties
There are no supported action properties.
Error Conditions
This transformer returns the following error messages.
 
Error Code
Error Name
Description
Reason
4
ERR_READERR
Error during reading of messages from a DJMessage body.
This error code is returned when an exception is encountered at the time of reading messages from a DJMessage body.
8
ERR_WRITERR
Error at the time of storing the messages to the message cache.
This error code is returned when an exception is encountered at the time of storing a message to cache.
0
ERR_OK
On completion of a particular message sequence.
This error code is returned when different parts of a HL7 Message is aggregated to form the complete message.
86
ERR_MSG_INCOMPLETE
Error on receiving incomplete message parts.
This error code is returned when the present message part is not the last part of a message sequence.
HL7 Basic Message Validation Invoker
The HL7 Basic Message Validation Invoker performs the following actions:
Validates the message header (default)
Checks the syntax (optional)
Message validation is usually done before the message can be subjected to any kind of business processing.
The HL7 Basic Message Validation Invoker performs the following activities on the HL7 message:
Header Validation
This validation applies only to the message header (MSH) segment.
The HL7 Basic Message Validation Invoker performs the following actions:
Searches for the MSH segment
Parses the MSH segment of the message
Validates the required fields of the MSH segment.
Checks for valid field delimiters.
Note:  The field delimiters cannot be an alphabet or a digit.
The HL7 Basic Message Validation Invoker parses the MSH segment of the message, and validates the required fields of the MSH segment.
Syntax Check (Optional)
The Syntax check validation is performed for all the segments of a message.
If syntax check is enabled, it performs the following actions.
Verifies that the segment name does not contain any delimiter.
Checks if the field delimiter specified in the MSH segment, is the same for all the segments.
Verifies that the segment has at least one field.
Returns error code 85, if any of the preceeding checks fails.
HL7 Basic Message Validation Invoker Properties
 
Property
Default Value
Description
CheckSyntax
false
Enable or disable syntax check:
True - CheckSyntax validates all the segments of a message.
False - CheckSyntax is disabled. Header validation validates only the MSH segment of the message.
Supported Actions
 
Action
Description
Execute
Runs any expression that you specify.
Supported Action Parameters
 
Action
Parameter
Description
Execute
SourceMessage
The SourceMessage property is used to set the HL7 message and the DJMessage properties. These values are set before they are passed to the acknowledgment component.
Execute
TargetMessage
Contains the generated message.
Supported Action Properties
There are no action properties for this invoker.
Error Conditions
This transformer returns the following error messages.
Error Code
Error Name
Description
Reason
50
ERR_UNSPECIFIED
Unspecified error
Unknown error condition
89
ERR_ HEADERDER_VALIDATION
Error at the time of Header Validation
This error code is returned when an exception is encountered at the time of basic validation of a message.
85
ERR_SYNTAXCHECK
Error at the time of Syntax check
This error code is returned when an exception is encountered at the time of checking the syntax of a message.
0
ERR_OK
On basic Validation
This error code is returned when a HL7 Message is passed against any kind of validation.
HL7 Message Structure Validation Invoker
The HL7 Message Structure Validation Invoker validates the structure of the HL7 Message with the applicable schema for a given version. The process is as follows:
1. Message is parsed to retrieve the message type and the version from the message header (MSH) segment of the incoming message.
2. Component loads the schema based on this information and validates the message structure using the schema.
3. After successful validation, the message is saved in the cache memory as a value object.
4. Target message of the Execute action is populated with the Message Control ID of the message as a key. This key is used to retrieve the value object from the cache.
HL7 Message Structure Validation Invoker Properties
 
Property
Default Value
Description
Schema Base Path
-
Location of the schema library, which the component loads for a specific schema version and message type.
Supported Actions
 
Action
Description
Execute
Runs any expression that you specify.
Supported Action Parameters
 
Action
Parameter
Description
Execute
SourceMessage
Sets the HL7 message and the DJMessage properties. These values are set before they are passed to the acknowledgment component.
Execute
TargetMessage
Contains the generated acknowledgement message.
Supported Action Properties
There are no action properties for this invoker.
Error Conditions
The following table provides the error information set by the HL7 Message Structure Validation Invoker.
Error Code
Description
Reason
100
Segment sequence error
Possible reasons:
A required segment is missing
An error in the segment sequence in the message.
101
Required field missing
A mandatory field is missing in the segment.
103
Table value not found
The value does not match with the allowable value specified in the code table for a field.
150
Max length error
The length of the field value exceeds the maxlength specified in the schema.
200
Unsupported message type
The specified message type is not supported for this HL7 version.
201
Unsupported event code
The specified event code not supported for this HL7 version.
203
Unsupported version ID
The specified version ID is not supported.
207
Application internal error
Some internal error occurred during validation.
For example, the component could not find the schema library file for the specified message type and version.
The following table provides the error conditions supported by the HL7 Message Structure Validation Invoker.
Error Code
Error Name
Description
Reason
89
ERR_ HEADERDER_VALIDATION
Error at the time of Header Validation
This error code is returned when an exception is encountered at the time of structure validation of a message
85
ERR_SYNTAXCHECK
Error at the time of Syntax check
This error code is returned when an exception is encountered at the time of checking the syntax of a message
88
ERR_STRUCTURAL_VALIDATION
Error at the time of structure validation
This error code is returned when an exception is encountered at the time of structure validation of a message
87
ERR_MSG_CONTINUATION
Error on receiving incomplete message parts
This error code is returned when the present message part is not the last part of a Message sequence
50
ERR_UNSPECIFIED
Unspecified error
Unknown error condition
4
ERR_READERR
Error was encountered reading file or table
The error code is returned when the component cannot locate the schema
0
ERR_OK
On structure validation
This error code is returned when a HL7 Message is passed against any kind of validation
HL7 Standard Acknowledgment Message Invoker
The HL7 Standard Acknowledgment Message Invoker is responsible for generating application-level acknowledgment messages.
The HL7 standard defines a general ACK structure for all message types. The HL7 Standard Acknowledgment Message Invoker is generated based on the HL7-defined ACK structure.
The ACK message is constructed using the following values taken from the MSH segment of the incoming HL7 message:
1. The Message Control Id from the MSH is copied to the message acknowledgment (MSA) segment of the ACK message.
2. The ACK code is then generated using the value passed to this component. The following table provides the acceptable ACK codes.
ACK Code
Description
AA
Application Accept
This code is sent when the application successfully validates the HL7 message.The AA code indicates that the receiving application has verified the message at the application level and found it to be valid.
AE
Application Error
This code is sent when the application has processed the HL7 message but found errors within the message itself.The AE code indicates that the receiving application found a problem while either parsing or validating the message at the application level.For example: a segment sequence error, or a required field is missing.
AR
Application Reject
This code is sent when the application is unable to process the HL7 message due to errors.The AR code indicates that the receiving application was unable to parse or validate the message at the application level.For example: an unsupported message type, or an unsupported version id.
The HL7 Standard Acknowledgment Message Invoker requires the information described the following table from DJMessage.
Note:  The srcMsg variable included in the example is of type DJMessage.
 
Property (Mandatory/Optional)
Description
Example
General Properties
HL7 message (M)
Set in the message body
srcMsg.body
Acknowledgment Code (M)
Set as a property
srcMsg.properties("AckCode") = "AE"
ErrorText (O)
Set as a property.
This property provides the specific error that the component encountered.
srcMsg.properties("ErrorText") = "Required field is missing"
SequenceNumber (O)
Set as a property.
This property is used when generating the ACK message for the sequence number protocol (SNP).
srcMsg.properties("SequenceNumber") = "10101011"
MessageControlId (M)
Set as a property.
This property should be set for generating a new Message control Id for the MSH segment.
srcMsg.properties("MessageControlId") = "12345678"
Version (M)
Set as a property
This property should be set to provide the version number. This is the base HL7 version for which the ACK will be generated
List of valid and supported versions: 2.1, 2.2, 2.3, 2.3.1, 2.4, 2.5.
srcMsg.properties("Version")="2.1"
ERR segment — ErrorLocation
SegmentId (O)
Set as a property.
This property provides the segment name for which the error occurred.
srcMsg.properties("SegmentId") = "MSH"
SegmentSequence (O)
Set as a property.
This property provides the segment sequence in the HL7 message at which the error occurred.
srcMsg.properties("SegmentSequence") = "1"
FieldPosition (O)
Set as a property.
This property provides the position of the field in a segment where the error occurred.
srcMsg.properties("FieldPosition") = "2"
FieldRepetition (O)
Set as a property.
This property provides the position of the repeating field where the error occurred.
srcMsg.properties("FieldRepetition") = "3"
ComponentNumber (O)
Set as a property.
This property provides the position of the component within the field where the error occurred.
srcMsg.properties("ComponentNumber") = "4"
SubComponentNumber (O)
Set as a property.
This property provides the position of the sub component within the component where the error occurred.
srcMsg.properties("SubComponentNumber") = "5"
ERR Segment — ErrorSeverity
ErrorSeverity (M)
Set as a property.
The Severity code is one of the following:
I - Information
E - Error
W - Warning
Note:  The Error Severity information is required for version HL7 version 2.5.
srcMsg.properties("ErrorSeverity") = "E"
ERR Segment — ErrorCode
ErrorCode (M)
Set as a property.
This property is required to be set if the AckCode is either Application Error or Application Reject.
For more information on the list of valid ErrorCodes, see table definition “0357” under the HL7 specification.
srcMsg.properties("ErrorCode") = "101
Supported Actions
 
Action
Description
Execute
Runs any expression that you specify.
Supported Action Parameters
 
Action
Parameter
Description
Execute
SourceMessage
Sets the HL7 message and the DJMessage properties. These values are set before they are passed to the acknowledgment component.
Execute
TargetMessage
Contains the generated ACK message.
Supported Action Properties
There are no action properties for this invoker.
Error Conditions
 
Error Code
Error Name
Description
Reason
8
ERR_WRITERR
Error in generating acknowledgment
The component could not generate an acknowledgment.
50
ERR_UNSPECIFIED
Unknown Error occurred
The component identified an unknown error.
0
ERR_OK
OK status
The component generated an ACK successfully. There is no error.
HL7 Enhanced Acknowledgment Message Invoker
The HL7 Enhanced Acknowledgment Message Invoker generates system-level acknowledgment messages.
The receiving system commits the data to physical storage before sending this acknowledgment. It is the sole responsibility of the receiving system to send the ACK after successfully storing the message.
The HL7 standard defines a general ACK structure for all message types. The enhanced acknowledgment is generated based on the HL7-defined ACK structure.
The ACK message is constructed using the following values taken from the MSH segment of the incoming HL7 message:
1. The Message Control Id from the MSH is copied to the message acknowledgment (MSA) segment of the ACK message.
2. The ACK code is then generated using the value passed to this component. The following table provides the acceptable ACK codes.
 
ACK Code
Description
CA
Commit Accept
This code is sent when the message is successfully accepted for processing.
CE
Commit Error
This code is sent if the message cannot be accepted for any other reason.
For example, a sequence number error.
CR
Commit Reject
This code is sent when the receiving application finds any of the following values as unacceptable: message type, version ID, or processing ID.
The HL7 Standard Acknowledgment Message Invoker requires the information described the following table from DJMessage.
Note:  The srcMsg variable included in the example is of type DJMessage.
 
Property (Mandatory/Optional)
Description
Example
General Properties
HL7 message (M)
Set in the message body
srcMsg.body
Acknowledgment Code (M)
Set as a property
srcMsg.properties("AckCode") = "AE"
ErrorText (O)
Set as a property.
This property provides the specific error that the component encountered.
srcMsg.properties("ErrorText") = "Required field is missing"
SequenceNumber (O)
Set as a property.
This property is used when generating the ACK message for the sequence number protocol (SNP).
srcMsg.properties("SequenceNumber") = "10101011"
MessageControlId (M)
Set as a property.
This property should be set for generating a new Message control Id for the MSH segment.
srcMsg.properties("MessageControlId") = "12345678"
Version (M)
Set as a property
This property should be set to provide the version number. This is the base HL7 version for which the ACK will be generated
List of valid and supported versions: 2.1, 2.2, 2.3, 2.3.1, 2.4, 2.5.
srcMsg.properties("Version")="2.1"
ERR segment — ErrorLocation
SegmentId (O)
Set as a property.
This property provides the segment name for which the error occurred.
srcMsg.properties("SegmentId") = "MSH"
SegmentSequence (O)
Set as a property.
This property provides the segment sequence in the HL7 message at which the error occurred.
srcMsg.properties("SegmentSequence") = "1"
FieldPosition (O)
Set as a property.
This property provides the position of the field in a segment where the error occurred.
srcMsg.properties("FieldPosition") = "2"
FieldRepetition (O)
Set as a property.
This property provides the position of the repeating field where the error occurred.
srcMsg.properties("FieldRepetition") = "3"
ComponentNumber (O)
Set as a property.
This property provides the position of the component within the field where the error occurred.
srcMsg.properties("ComponentNumber") = "4"
SubComponentNumber (O)
Set as a property.
This property provides the position of the sub component within the component where the error occurred.
srcMsg.properties("SubComponentNumber") = "5"
ERR Segment — ErrorSeverity
ErrorSeverity (M)
Set as a property.
The Severity code is one of the following:
I - Information
E - Error
W - Warning
Note:  The Error Severity information is required for version HL7 version 2.5.
srcMsg.properties("ErrorSeverity") = "E"
ERR Segment — ErrorCode
ErrorCode (M)
Set as a property.
This property is required to be set if the AckCode is either Application Error or Application Reject.
For more information on the list of valid ErrorCodes, see table definition “0357” under the HL7 specification.
srcMsg.properties("ErrorCode") = "101
Supported Actions
 
Action
Description
Execute
Runs any expression that you specify.
Supported Action Parameters
 
Action
Parameter
Description
Execute
SourceMessage
Sets the HL7 message and the DJMessage properties. These values are set before they are passed to the acknowledgment component.
Execute
TargetMessage
Contains the generated ACK message.
Supported Action Properties
There are no action properties for this invoker.
Error Conditions
 
Error Code
Error Name
Description
Reason
8
ERR_WRITERR
Error in generating acknowledgment
The component could not generate an acknowledgment.
50
ERR_UNSPECIFIED
Unknown Error occurred
The component identified an unknown error.
0
ERR_OK
OK status
The component generated an ACK successfully. There is no error.
HL7 Batch Iterator
The HL7 Batch Iterator 1.0.0 supports the complete processing of incoming batches as defined by the HL7 standard.
The HL7 Batch Iterator receives one or more batch messages and returns an individual message from the batch.
A batch usually consists of a single type of message. However, the HL7 definition does not restrict a batch to only one message type.
The structure of a HL7 batch file is:
[FHS] (file header segment) { [BHS] (batch header segment)
 { [MSH (zero or more HL7 messages)
 ....
 ....
 ....
 ] }
 [BTS] (batch trailer segment)
 }
 [FTS] (file trailer segment)
Note:  A batch message may not always have header and trailer segments.
HL7 Batch Iterator Properties
 
Property Name
Description
Message From
Specifies the format of batch message fragments:
DJMessage (default) - Use this format if memory is a constraint and your batch message fragments are small.
File - Use this format if memory is not a constraint and your batch-message fragments are very large.
The default value is DJMessage.
File Location
Full path name to the HL7 message file.
Supported Actions
 
Action
Description
PutMessage
Receives HL7 batch-message fragments in the following formats:
Flat file format - Use this format if memory is not a constraint and your batch-message fragments are very large.
DJMessage body - Use this format if memory is a constraint and your batch- message fragments are small.
These fragments are then stored in memory.
GetMessage
Returns individual HL7 messages in a DJ Message variable.
Disconnect
Break the connection with the component source.
Supported Action Parameters
 
Action
Parameter
Description
PutMessage, GetMessage
Message
Type the message.
Supported Action Properties
There are no supported action properties.
Error Conditions
This transformer returns the following error messages.
Error Code
Error Name
Description
Reason
4
ERR_READERR
Error during reading of messages from a DJMessage body.
This error code is returned when an exception is encountered at the time of reading messages from a DJMessage body or URL.
8
ERR_WRITERR
Error at the time of storing the messages to Message Cache.
This error code is returned when an exception is encountered at the time of storing a message.
0
ERR_OK
On completion of a particular message Batch.
This error code is returned when batch messages are read from source and parsed into individual messages.
86
ERR_MSG_END
Error when there are no more message in Batch.
This error code is returned when the present batch has no more messages.
HL7 Message Segment Iterator
The HL7 Message Segment Iterator is used to access data from the segments / fields / composites / sub-composites of a HL7 message by providing the required information.
This component returns either of the following:
A segment or segments (if it is repeating) using the segment name provided
A field or fields (if it is repeating) using the field name provided.
A composite or sub-composites using the composite name provided.
The component can retrieve multiple segment or field data by calling the GetMessage action until the error code 12 is returned.
Note:  The data is accessible only if the message is structurally valid. Therefore, you must structurally validate your message before you use the HL7 Message Segment Iterator.
The HL7 Message Segment Iterator then performs the following actions:
The Message control Id of the structurally valid message is set as the "OriginalMsgControlId" property of the process variable. This process variable (DJMessage type) is the one that is passed to the HL7 Message Segment Iterator.
HL7 Message Segment Iterator Properties
 
Property Name
Description
Base Segment Path
Location of the schema library, which the component loads for a specific schema version and message type.
Return Type
Specify the type of information that is returned:
All - All the matching information is returned if the segment or field repeats.
First - Only the first matching information is returned.
Supported Actions
 
Action
Description
GetMessage
Returns data from the Iterator in a djmessage object. The maximum size limit for DJMessage is 512 MB.
Supported Action Parameters
 
Action
Parameter
Description
GetMessage
Message
Type the message.
Supported Action Properties
 
Action
Property
Description
GetMessage
Version
Supported HL7 version.The supported values are 2.1 to 2.5. The default value is 2.5
Segment Name
Any valid HL7 segment name.
Segment Order Number
A valid number greated than zero that represents the order or occurence of the segment within the HL7 message. By default, the first occurrence of this segment is considered.
Field Name
A valid field ID.
All the Field IDs along with the description of the selected segment are automatically displayed in the drop-down list.
Field Required
True – If the fields have to be returned
False – If the fields are not required to be returned.
Composite
A composite number of the selected field together with its data type ID.
Composite Required
True – If the composites have to be returned
False – If the composites are not required to be returned.
Error Conditions
This transformer returns the following error messages.
Error Code
Error Name
Description
Reason
4
ERR_READERR
Error in getting required information to return composite/ subcomposite/segment / field data
Returned when the component is unable to get required information.
8
ERR_NOSOURCE
No data found
No data found for the requested segment name or field name. Either data is not present or the segment or field is not found in the schema.
0
ERR_OK
OK status
No Error. OK Status. The Information is returned successfully
HL7 to XML Transformer
The HL7 to XML Transformer generates an XML message using the data provided. You must provide an HL7 v2.x source message. If you want the target message customized using XSLT, you must provide the XSLT.
The information in this section applies to version 2.0.0 of the HL7 to XML Transformer component. Version 2.0.0 of the component includes support for v2.6 HL7 messages.
The transformer performs the following actions:
1. Reads the HL7 v2.x source message.
2. Converts the message to a v2.xml document.
3. Displays the v2.xml target document.
4. Optionally transforms the v2.xml document into a custom one using an XSLT document that you provide.
5. Displays the custom v2.xml target document.
Note:  You should familiarize yourself with the v2.xml specification. Go to http://www.HL7.org and search for "XML encoding rules for HL7 v2 messages." To access this specification you must be a member of HL7.org.
Using Linux
For versions 1.2.1 and 2.0.0, check if the MSH segment in your data file ends with a version number and a line feed (LF), as shown in the following example:
IE: MSH|^~\&||^123457^Labs|||200808141530||ORU^R01|123456789|P|2.6
If it does, change the line feed to a carriage return (CR) to prevent the transformer from improperly parsing the file.
Supported Actions
 
Action
Description
Execute
Performs the transformation based on the specified parameters and properties.
Supported Action Parameters
 
Action
Parameter
Description
Execute
SourceMessage
Path and name of the source message.
Execute
TargetMessage
Path and name of the target message.
Supported Action Properties
 
Action
Property
Description
Execute
Optional XSLT Document
To create a custom document, enter the full path to the XSLT document you want to use. The XSLT document must consume v2.xml.
Error Conditions
This transformer returns the following error messages.
Error Code
Error Name
Description
Reason
0
ERR_OK
OK status.
No error. The information is returned successfully.
7
ERR_CREATERR
Error creating a file or table.
Error detected during component initialization.
8
ERR_WRITERR
Error writing to a file or table.
XSLT transformation failed. See the process log for specific message.
34
INVALID
Primary transformation failed.
HL7 source message may be malformed. See the process log for specific message.
46
LICENSING
Component is not licensed for the product version.
Component is not licensed.
XML to HL7 Transformer
The XML to HL7 transformer generates an HL7 v2.x message using the data provided. You must provide a v2.xml source message. If you are using custom XML, provide an XSLT that formats your XML into v2.xml.
The information in this section applies to version 2.0.0 of the XML to HL7 Transformer component. Version 2.0.0 of the component includes support for v2.6 HL7 messages.
The transformer then performs the following actions:
1. Optionally reads a custom XML message using an XSLT that transforms the message to v2.xml format.
2. Reads the v2.xml source message.
3. Converts the message to an HL7 v2.x message.
4. Displays the HL7 v2.x target message.
Note:  It is important that you familiarize yourself with the v2.xml specification. Go to www.HL7.org. and search for "XML encoding rules for HL7 v2 messages." To access this specification, you must be a member of HL7.org.
Using Linux
For versions 1.1.1 and 2.0.0, check if the MSH segment in your data file ends with a version number and a line feed (LF), as shown in the following example:
IE: MSH|^~\&||^123457^Labs|||200808141530||ORU^R01|123456789|P|2.6
If it does, change the line feed to a carriage return (CR) to prevent the transformer from improperly parsing the file.
Supported Actions
 
Action
Description
Execute
Performs the transformation based on the specified parameters and properties.
Supported Action Parameters
 
Action
Parameter
Description
Execute
SourceMessage
Path and name of the source message.
Execute
TargetMessage
Path and name of the target message.
Supported Action Properties
 
Action
Property
Description
Execute
Optional XSLT Document
To create a custom document, enter the full path to the XSLT document you want to use. The XSLT document must consume v2.xml.
Error Conditions
 
Error Code
Error Name
Description
Reason
0
ERR_OK
OK status.
No error. OK The information is returned successfully.
7
ERR_CREATERR
Error creating a file or table.
Error detected during component initialization.
8
ERR_WRITERR
Error writing to a file or table.
XSLT transformation failed. See the process log for specific message.
34
INVALID
Primary transformation failed.
This error code does not mean that your HL7 XML message is invalid. However, your XML source message may be malformed. Verify that your XML syntax is correct.
See the process log for specific message.
46
LICENSING
Component is not licensed for the product version.
Component is not licensed.
XML to NCPDP Script Transformer
The XML to NCPDP Script transformer uses input data to generate a standard NCPDP Script message.This section provides information for the following:You must provide an XML source message. If are using custom XML, you must also provide an XSLT that formats your XML into NCPDP Script XML. This component supports NCPDP Script 8.1 and XSLT 2.0.
The transformer used in a basic process performs the following actions:
1. Reads the NCPDP XML source message.
2. If the source message is in a custom XML format, the component uses the XSLT document you provide to transform the message into NCPDP XML format.
3. Optionally creates an XSLT target message which holds the NCPDP XML message.
4. Converts the NCPDP XML message to a standard NCPDP Script message.
Supported Actions
 
Action
Description
Execute
Performs the transformation based on the specified parameters and properties.
Supported Action Parameters
 
Action
Parameter
Description
Execute
SourceMessage
Path and name of the source message.
Execute
TargetMessage
Path and name of the target message.
Supported Action Properties
 
Action
Property
Description
Execute
Optional XSLT Document
If you want to transform a custom XML document into NCPDP XML to act as the source, type the path and name of the XSLT.
Supported Transaction Types
 
Transaction Type
Description
NEWRX
New prescription from doctor to pharmacy.
REFREQ
Request from pharmacy to prescriber asking for additional refills.
REFRES
Prescription authorization from prescriber to pharmacy. Response to REFREQ.
RXFILL
Message to prescriber from pharmacy indicating the status of prescriptions (dispensed, partially dispensed, not dispensed).
CANRX
Request from prescriber to pharmacy to cancel a previously sent prescription.
CANRES
Response from pharmacy to prescriber to acknowledge a cancel request (CANRX).
STATUS
Relays acceptance of a transaction back to sender. Indicates acceptance and responsibility for a request. Response to REFREQ, REFRES, NEWRX, RXCHG, CHGRES, CANRX, CANRES, or RXFILL.
RXCHG
Request from pharmacy for a change in the original prescription.
CHGRES
Response to an RXCHG message.
ERROR
An error occurred and the request was canceled.
RXHREQ
An entity is requesting medication history from another entity.
RXHRES
Response describing a patient’s medication history. Response to RXHREQ.
Mapping Script Customization
You can customize select mapping scripts in the NCPDP code lists. For example, you might want to identify supervisors by badge number. To do this, add a new entry to the SupervisorIDTypeto.xsl mapping script that designates the ID and Value parameters. Then restart Process Designer so that your modifications are updated in the component.
Note:  To edit these scripts, you must be familiar with XSLT.
The mapping scripts you can edit are located in InstallDir\Common\Plug-Ins\NCPDP Script Component\1.0.0\xsl\codelist. The following mapping scripts are available for customization with NCPDP Script to XML processes.
Code List Type
File Name
Patient ID type
PatientIDTypeto.xsl
Payer ID type
PayerIDTypeto.xsl
Pharmacy ID type
PharmacyIDTypeto.xsl
Prescriber ID type
PrescriberIDTypeto.xsl
Supervisor ID type
SupervisorIDTypeto.xsl
Error Conditions
 
Error Code
Error Name
Description
Reason
0
ERR_OK
OK status.
No error. OK The information is returned successfully.
7
ERR_CREATERR
Error creating a file or table.
Error detected during component initialization.
8
ERR_WRITERR
Error writing to a file or table.
XSLT transformation failed. See the process log for specific message.
34
INVALID
Primary transformation failed.
XML source message may be malformed. See the process log for specific message.
46
LICENSING
Component is not licensed for the product version.
Component is not licensed.
NCPDP to XML Script Transformer
The NCPDP Script to XML transformer uses input data to generate an NCPDP Script XML message.This section provides information for the following:
You must provide a standard NCPDP Script source message. If you want the target message customized using XSLT, you must provide the XSLT document. This component supports NCPDP Script 8.1 and XSLT 2.0.
The transformer used in a basic process performs the following actions:
1. Reads the NCPDP Script source message.
2. Converts the message to an NCPDP XML document.
3. Optionally transforms the NCPDP XML document into a custom XML document using an XSLT document you provide.
Supported Actions
 
Action
Description
Execute
Performs the transformation based on the specified parameters and properties.
Supported Action Parameters
 
Action
Parameter
Description
Execute
SourceMessage
Path and name of the source message.
Execute
TargetMessage
Path and name of the target message.
Supported Action Properties
 
Action
Property
Description
Execute
Optional XSLT Document
Path name of the XSLT document. This is optional.
Supported Transaction Types
 
Transaction Type
Description
NEWRX
New prescription from doctor to pharmacy.
REFREQ
Request from pharmacy to prescriber asking for additional refills.
REFRES
Prescription authorization from prescriber to pharmacy. Response to REFREQ.
RXFILL
Message to prescriber from pharmacy indicating the status of prescriptions (dispensed, partially dispensed, not dispensed).
CANRX
Request from prescriber to pharmacy to cancel a previously sent prescription.
CANRES
Response from pharmacy to prescriber to acknowledge a cancel request (CANRX).
STATUS
Relays acceptance of a transaction back to sender. Indicates acceptance and responsibility for a request. Response to REFREQ, REFRES, NEWRX, RXCHG, CHGRES, CANRX, CANRES, or RXFILL.
RXCHG
Request from pharmacy for a change in the original prescription.
CHGRES
Response to an RXCHG message.
ERROR
An error occurred and the request was canceled.
RXHREQ
An entity is requesting medication history from another entity.
RXHRES
Response describing a patient’s medication history. Response to RXHREQ.
Mapping Script Customization
You can customize select mapping scripts in the NCPDP code lists. For example, you might want to identify supervisors by badge number. To do this, add a new entry to the SupervisorIDTypeto.xsl mapping script that designates the ID and Value parameters. Then restart Process Designer so that your modifications are updated in the component.
Note:  To edit these scripts, you must be familiar with XSLT.
The mapping scripts you can edit are located in InstallDir\Common\Plug-Ins\NCPDP Script Component\1.0.0\xsl\codelist. The following mapping scripts are available for customization with NCPDP Script to XML processes.
Code List Type
File Name
Patient ID type
PatientIDTypeto.xsl
Payer ID type
PayerIDTypeto.xsl
Pharmacy ID type
PharmacyIDTypeto.xsl
Prescriber ID type
PrescriberIDTypeto.xsl
Supervisor ID type
SupervisorIDTypeto.xsl
Error Conditions
 
Error Code
Error Name
Description
Reason
0
ERR_OK
OK status.
No error. OK The information is returned successfully.
7
ERR_CREATERR
Error creating a file or table.
Error detected during component initialization.
8
ERR_WRITERR
Error writing to a file or table.
XSLT transformation failed. See the process log for specific message.
34
INVALID
Primary transformation failed.
XML source message may be malformed. See the process log for specific message.
46
LICENSING
Component is not licensed for the product version.
Component is not licensed.
EDI 999 Validator
The 999 Validator allows you to verify incoming EDI claim transactions with a standard schema at different Strategic National Implementation Process (SNIP) levels, and then generate a 999 Functional Acknowledgment that reports the results. The 999 acknowledgement is designed to report on conformance to an implementation guideline, but can also report syntactical errors. If 999 is being generated through multiple instances of the validator, the 999 should not report syntax errors.
Note:  The 999 Validator acknowledges only a single functional group. If you expect an incoming document will contain multiple functional groups, you must use the function group splitter or iterator before the validation component.
EDI 999 Validator Properties
This validator component does not have any instance properties that you can specify when you create an instance of this validator component.
Supported Actions
 
Action
Description
Execute
Validates the incoming EDI document and generates a 999 response message.
Supported Action Parameters
 
Action
Parameter
Description
Execute
SourceMessage
Name of the DJMessage source object that references the incoming HIPAA document.
Execute
TargetMessage
Name of the DJMessage output object that references the outgoing 999 Function Acknowledgment. Also contains individual error information.
Supported Action Properties
Action
Property
Description
Execute
Acknowledgment Type
Type of acknowledgment that is required.
Execute
Schema
Indicate the document schema used to validate the HIPAA transaction.
Execute
SNIP types
SNIP level types to validate the transaction and specify the action to take on them:
1 - Validate using SNIP level 1
2 - Validate using SNIP level 2
= (equal sign) - Specify the action to take when an error is encountered for a SNIP type:
Info - Accept message with errors
Error - Reject message
Ignore - Do not validate SNIP type
Multiple values must be separated by a comma. For example, if you want to validate with SNIP types 1 and 2, and you want messages with errors to be accepted, you must enter 1, 2=info.
Execute
Max Errors per ST Segment
Maximum number of errors to be reported per ST segment/transaction set. The default value of 0 indicates no limit. If the value is set to anything else, at most that number of errors will be reported for each transaction set.
Execute
Allow Trailing Spaces
Normally, unnecessary trailing spaces are considered an error (unnecessary means trailing spaces not used as padding to reach the minimum allowed length). Setting this to true will ignore trailing space errors.
Execute
Reject Handling
Specify when to reject the entire functional group:
any - If any transaction sets are rejected, then the functional group is rejected.
all - If any transaction sets are not rejected (AK501 = 'A' or 'E'), then the functional group is partially accepted (AK901 = 'P').
Execute
Element Separator
Select the delimiter character to use as the element separator in the output message:
*
Copy from source - Use the value from the source message.
Execute
Segment Terminator
Provide the character that is used to mark the end of a segment in the output message:
~
Copy from source - Use the value from the source message.
Note:  If the segments in the source message are separated by <CR><LF>, the parser reports only the carriage return, and that will become the segment terminator.
Execute
Suffix
Select a string that will be written after each segment terminator:
<CR><LF>
<CR>
<LF>
None (default)
While any string can be entered, any character other than whitespace characters results in an invalid message.
Execute
Component Element Separator
Select the delimiter character to use as the separator between components of a composite field:
:
Copy from source - Use the value from the source message.
Execute
Repetition Separator
Select the delimiter character that is used to separate repeated occurrences of an element:
^
Copy from source - Use the value from the source message.
Execute
Application Sender's Code
Specify the value to use for the Application Sender's Code in GS02 of the output message. If this is not specified, the Application Receiver's Code from GS03 of the source message is used.
Execute
Application Receiver's Code
Specify the value to use for the Application Receiver's Code in GS03 of the output message. If this is not specified, the Application Sender's Code from GS02 of the source message is used.
Execute
Group Control Number
Provide the value to use for the Group Control Number (GS06, GE02) in the GS and GE segments.
Execute
Write ISA Segment
Specify whether to write ISA and IEA segments or not:
True - Writes ISA and IEA segments.
False - Collate multiple responses into a single message.
Execute
Interchange Sender ID Qualifier
Specify the sender Interchange ID Qual (ISA05). If this is not set, the receiver qual (ISA07) from the source is used. This option is displayed if the Write ISA Segment option is set to True.
Execute
Interchange Sender ID
Specify the Sender ID to be used in ISA06. If this is not set, the Receiver ID (ISA08) from the source message is used. This option is displayed if the Write ISA Segment option is set to True.
Execute
Interchange Receiver ID Qualifier
Specify the receiver Interchange ID Qual (ISA07). If this is not set, the sender qual (ISA05) from the source is used. This option is displayed if the Write ISA Segment option is set to True.
Execute
Interchange Receiver ID
Specify the Receiver ID to be used in ISA08. If this is not set, the Sender ID (ISA06) from the source message is used. This option is displayed if the Write ISA Segment option is set to True.
Execute
Interchange Control Number
Specify the value to use for the Interchange Control Number (ISA13 and IEA02) in the ISA and IEA segments. This option is displayed if the Write ISA Segment option is set to True.
Errors
The EDI 999 Validator captures the following error conditions.
 
Error Code
Error Name
Description
0
B_OK
Indicates the validation was successful.
Check the resulting target message to determine if validation errors were detected.
4
B_READERR
Indicates there was a problem parsing the source message or running the 999 Validator.
20
B_BADFILETYPE
Indicates the source document is not a valid EDI document or is a different type than the schema.
33
B_BADOPTIONVALUE
Indicates an invalid value is used for one of the options.
44
B_NOTSUP
Indicates more than one function group (GS/GE pair, for example) was detected.
50
B_UNSPECIFIED
Indicates that an unexpected error has occurred.
Target Message
The target message body contains:
999 message.
Properties that describe the results.
One attachment message for each error that is detected.
The following table provides the properties that are set for the target message.
Name
Type
Description
errorCount
int
The number of fatal errors.
warningCount
int
The number of warning errors.
totalErrorCount
int
The total number of errors (fatal + warnings).
The response message contains a message attachment for each error found. The body of each attachment provides a description of the particular error. It contains the following properties that describe the error.
Name
Type
Description
severity
string
Indicates the error severity:
ERROR
INFO (a warning)
category
string
Indicates the error condition. These are strings indicating an error noted in either AK/IK304 or AK/IK 403. The following values may occur:
Name AK304 value AK403 value
UNRECOGNIZED_SEGMENT_ID 1
UNEXPECTED_SEGMENT 2
REQUIRED_SEGMENT_MISSING 3
LOOP_OCCURS_TOO_MANY_TIMES 4
SEGMENT_EXCEEDS_MAXIMUM_USE 5
SEGMENT_NOT_IN_TS 6
SEGMENT_OUT_OF_ORDER 7
IMPL_NOT_USED_SEGMENT_PRESENT I4
IMPL_DEPENDENT_SEGMENT_MISSING I6
IMPL_LOOP_OCCURS_TOO_FEW_TIMES I7
IMPL_SEGMENT_BELOW_MINIMUM_USE I8
IMPL_DEPENDENT_NOT_USED_SEGMENT_PRESENT I9
REQUIRED_DATA_ELEMENT_MISSING 8 1
CONDITIONAL_REQUIRED_DATA_ELEMENT_MISSING 8 2
TOO_MANY_DATA_ELEMENTS 8 3
DATA_ELEMENT_TOO_SHORT 8 4
DATA_ELEMENT_TOO_LONG 8 5
INVALID_CHARACTER_IN_ELEMENT 8 6
INVALID_CODE_VALUE 8 7
INVALID_DATE 8 8
INVALID_TIME 8 9
EXCLUSION_CONDITION_VIOLATED 8 10
TOO_MANY_REPETITIONS 8 12
TOO_MANY_COMPONENTS 8 13
IMPL_NOT_USED_DATA_ELEMENT_PRESENT 8 I10
IMPL_TOO_FEW_REPITITIONS 8 I11
IMPL_PATTERN_MATCH_FAILURE 8 I12
IMPL_DEPENDENT_NOT_USED_DATA_ELEMENT_PRESENT 8 I13
CODE_VALUE_NOT_USED_IN_IMPLEMENTATION 8 I6
IMPL_DEPENDENT_DATA_ELEMENT_MISSING 8 I9
segmentNumber
int
Indicates the segment number (starting from 1) that contains the error.
segmentId
string
Provides the segment ID of the segment that contains the error.
elementPosition
int
Indicates the position in the segment of the element that contains the error, if known. If it is not known (or not applicable), this property is not set.
compositePosition
int
Indicates the position within the composite of the error. If the error is not in a composite, this property is not set. The first position is 1.
repeatPosition
int
If the error occurs in a repeating element, this property contains the repetition number (starting from 1) where the error occurred. If the error is not in a repeating element, this property is not set.
Note:  You can retrieve the error message attachments using EZScript (through a script step after the validation step or in the stop step of the process). A sample EZScript is provided in the next section that creates a file from the 999 response message content (variable is named msgOut) and one file for each error message.
Sample EZScript
The following is a sample EZScript that retrieves the validator response message and the error message attachments.
'Log the repsonse message property count
 For i = 0 to msgOut.PropertiesCount - 1
    LogMessage("INFO", "Property Name: " & msgOut.PropertyNames(i) & ", Property Value: " & msgOut.Properties(i))
 Next i
'Write the response message body to a file (this is either the 999 acknowledgement)
FileWrite(MacroExpand("$(TRG)") & "/reponse_body.txt", msgOut.body)
'Log the error attachment count
 Dim attachedMsg as DJMessage
 LogMessage("INFO", "msgOut attachment count: " & msgOut.AttachmentCount())
'Run through any attachments and create files (one per error) from the attachment body and it's properties
 For i = 0 to msgOut.AttachmentCount() - 1
    'Return the attachment by index
    Set attachedMsg = msgOut.GetAttachment(i)
    LogMessage("INFO", "attachedMsg property count: " & attachedMsg.PropertiesCount())
    Dim props
    props = ""
    For j = 0 to attachedMsg.PropertiesCount - 1
        props = props & ("Property Name: " & attachedMsg.PropertyNames(j) & ", Property Value: " & attachedMsg.Properties(j) & chr(13) & chr(10))
    Next j
    FileWrite(MacroExpand("$(TRG)") & "/error_attachment_" & i & ".txt", attachedMsg.body & chr(13) & chr(10) & props)
Next i
Error File Content
The sample EZScript produces a 999 response file and the content of each error file is similar to the following:
The segment 'REF' is invalid in Loop.Message
Property Name: category, Property Value: SEGMENT_NOT_IN_TS
Property Name: segmentId, Property Value: REF
Property Name: segmentNumber, Property Value: 14
Property Name: severity, Property Value: ERROR
HL7 Message Structure Validator
The HL7 Message Structure Validator validates the structure of the HL7 Message against the applicable schema for a given version. Version 2.0.0 of the HL7 Message Structure Validator includes support for v2.6 HL7 messages.
The information in this section applies to version 2.0.0 of the HL7 Message Structure Validator component. This component is similar, but not identical to the HL7 Message Structure Validation Invoker. Make sure you use the correct component.
Note:  The HL7 version 2.6 schema does not contain custom table fields. HL7 messages that use this schema version cannot be validated using the 2.0.0 version of the HL7 Message Structure Validator.
The HL7 Message Structure Validator process is as follows:
1. The message is parsed to retrieve the message type and version from the message header (MSH) segment of the incoming message.
2. The validator loads the schema based on information from the previous step and validates the message structure using the schema.
3. After successful validation, the message is saved in the cache memory as a value object.
4. The target message of the Execute action is populated with the Message Control ID of the message as a key. This key is used to retrieve the value object from the cache.
Step Actions
This validator supports the Execute action, which runs any expression that you specify.
Instance Properties
This validator has the following instance properties.
Property
Description
Schema Location
Required. Location of the schema. You have the choice of using a master schema or a subset schema that is based on the master.
If you want to use a subset schema, specify the complete path or browse to the subset schema file.
If you want to use a master schema, specify the complete path or browse to the directory containing the master schema. The validator loads the master schema for a specific schema version and message type. The name and location of the master schema directory does not matter. However, the sub-directories and master schema file must adhere to the following:
Sub-directories must appear in ascending order (2.1, 2.2, 2.3)
The ending string of the master schema file name must be .master.ds.schema (for example, HL726.master.ds.schema)
The sub-directory must contain only one master schema with the required .master.ds.schema ending string.
Example
The following is an example master schema directory structure:
Master schema directory
2.1
HL721.master.ds.schema
2.2
HL722.master.ds.schema
2.3
HL723.master.ds.schema
2.3.1
HL7231.master.ds.schema
Step Action Parameters
This validator has the following step action parameters.
Property
Supported Actions
Description
SourceMessage
Execute
Required. Path and name of the source message.
TargetMessage
Execute
Required. Path and name of the target message.
Error Conditions
This validator uses the following error conditions to populate the target message.
Code
Description
Reason
100
Incorrect message type
The message type is incorrect for the subset schema validation.
101
MSH element not first
MSH is not the first segment of the message.
102
Version undefined
The version of the schema is not defined in the data file.
103
Undefined version
The version number is undefined in the data file.
104
Missing delimiters
One or more delimiters are missing.
105
Missing required segment
One or more mandatory segments are missing.
106
Extra segment
An undefined segment is in the data file.
107
Repeating segment
A segment repeats more times than the value specified for maxOccurs.
108
Cannot repeat segment
The segment cannot repeat.
109
Segment not in choice
The segment is not contained in the Choice element.
110
Incorrect segment field count
The segment field count is incorrect.
111
Cannot repeat field
The segment contains one or more invalid fields that cannot repeat.
112
Missing required field
A mandatory field is missing in the segment.
113
Expected max field length
The length of the segment field is greater than the maximum length specified in the data file.
114
Expected composite count
A segment field was encountered when a Composite count was expected.
115
Missing required composite
A mandatory composite is missing.
116
Expected subcomposite count
A field Composite was encountered when a Subcomposite count was expected.
118
Unsupported event code
The specified event code is not supported for this version of HL7.
119
Field repeats more than maxOccurs
The segment field repeats more times than the value specified for maxOccurs.
120
Required subcomposite missing/not included
A mandatory subcomposite is missing in the composite.
121
Error loading json schema file
The specified schema cannot be found.
122
Group repeats more than maxOccurs
The group repeats more times than the value specified for maxOccurs.
123
Required group is missing/not included
A mandatory segment is missing in the group.
998
Invalid data file
An invalid data file was encountered.
999
Application internal error
An internal error occurred during validation. For example, the invoker could not find the schema library file for the specified message type and version.
The validator returns these error messages.
Error Code
Error Name
Description
Reason
89
ERR_ HEADERDER_VALIDATION
Error at the time of header validation.
An exception was encountered at the time of structure validation of a message.
85
ERR_SYNTAXCHECK
Error at the time of syntax check.
An exception was encountered at the time of checking the syntax of a message.
88
ERR_STRUCTURAL_VALIDATION
Error at the time of structure validation.
An exception was encountered at the time of structure validation of a message.
87
ERR_MSG_CONTINUATION
Error on receiving incomplete message parts.
The present message part is not the last part of a Message sequence
50
ERR_UNSPECIFIED
Unspecified error.
Unknown error condition.
4
ERR_READERR
Error during reading of file or table.
The component cannot locate the schema.
0
ERR_OK
Error on structure validation.
An HL7 message was passed against any kind of validation.
See Also
For information on adding an instance of the component and associating the instance with the step, see these sections:
Instance and Session Types
Setting Up Processes
TA1 Validator
The TA1 Validator validates the Interchange Control Header (ISA segment) and Interchange Control Trailer (IEA segment) of a HIPAA document against specific TA1 technical acknowledgement note codes. This validator automatically generates a TA1, which is an optional response message that a trading partner may require as confirmation that a HIPAA document has been received and accepted.
Note:  The TA1 Validator does not verify the functionality of a HIPAA document.
In addition to the interchange control number, date, and time from the incoming HIPAA document, the generated TA1 also contains the following two elements:
Interchange Note Code - Three-digit error code that indicates the result of the HIPAA validation process.
Interchange Acknowledgement Code (ACK) - Character code that indicates the status of the HIPAA document. The possible values are:
A: Accepted)
R: Rejected because of errors; requires the sender to resubmit)
E: Accepted with errors; does not require sender to resubmit)
Note:  If the ISA segment of an incoming HIPAA document is invalid, the TA1 Validator generates an error output message instead of a TA1 message.
If there are multiple errors in the incoming HIPAA document, the TA1 output message contains only the first error.
The following are examples of TA1 output messages:
Example TA1: Accepted
TA1*000011135*020823*0841*A*000
In this example, the "A" and "000" indicate the HIPAA document was accepted with no errors.
Example TA1: Rejected
TA1*000011135*020823*0841*R*022
In this example, the "R" and "022" indicate the HIPAA document was rejected with note code 022, which references an invalid control structure. The sender would have to resubmit the HIPAA document.
TA1 Validator Properties
You can specify the following properties when you create an instance of this validator component in the Configuration tab > Message Components section.
Property Name
Description
Error Code Configuration
Allows you to set TA1 note codes to on (include) or off (exclude) to control which ones are shown in the TA1 output. Multiple values must be separated by a comma. By default, all codes are set to on. For information about the TA1 note codes, see TA1 Note Codes.
TA1 Note Codes
The TA1 Validator supports the following TA1 interchange note codes.
Note Code
ACK Code
Configurable?
Condition
000
A
No
Success (no error).
001
E
Yes
The Interchange Control Numbers in the header ISA 13 and trailer IEA02 do not match.
005
R
Yes
Invalid Interchange ID Qualifier for Sender.
007
R
Yes
Invalid Interchange ID Qualifier for Receiver.
010
R
Yes
Invalid Authorization Information Qualifier value.
012
R
Yes
Invalid Security Information Qualifier value.
014
R
Yes
Invalid Interchange Date value.
015
R
Yes
Invalid Interchange Time value.
017
R
Yes
Invalid Interchange Version ID value.
019
E
Yes
Invalid Interchange Version ID value.
020
E
Yes
Invalid Test Indicator value.
022
R
No
Invalid Control Structure is  missing ISA segment or two ISA/IEA combinations were submitted in one physical file.
024
R
Yes
Invalid Interchange Content is 1) missing GS segment, 2) GS02 (Application Sender’s Code) does not match ISA06, or 3) GS03 (Application Receiver’s Code) does not match.
Supported Actions
 
Action
Description
Execute
Validates the incoming HIPAA document and generates a TA1 response in .txt format.
Supported Action Parameters
 
Action
Parameter
Description
SourceMessage
Message
Required. The name of the DJMessage source object that references the incoming HIPAA document.
Target Message
Message
Required. The name of the DJMessage output object that references the outgoing TA1 report.
Supported Action Properties
There are no supported action properties.
Errors
The validator supports the following error conditions.
Error Code
Error Name
Description
0
ERR_OK
Indicates the TA1 validation was successful. Check the resulting TA1 error code to determine if the HIPAA document is valid.
4
ERR_READERR
Indicates there is no input EDI file or that the ISA segment is invalid.
HL7 Integration Schemas
The HL7 standards use schemas to define message structures. The integration platform generates schemas based on data provided by HL7. If necessary, open the schemas in the Schema window to make changes.
Health care integration using the integration platform supports HL7 version messages from v2.1 through v2.6. For detailed information on HL7 schemas, see www.hl7.org.
You can custom-build schema subsets for specific Electronic Data Interchange (EDI) Trading Partner and TransType scenarios. The schemas provide the following:
File structures
Metadata support
Parsing capabilities
Validation support
HL7 Mapping Rules
To run successfully, transformations for HL7 messages must match the schemas. The Map window implements the following transformation rules for HL7 messages:
A segment is ignored if it is not defined in the schema. It is logged as a warning.
If extra components and subcomponents are found, they are ignored.
If more repetitions run than are defined, a warning is added.
If a segment is required but not found, a dummy segment is added.
If a field or component is required but not found, a dummy field or component is added.
HL7 Message Definition
Every message type for an HL7 version has its own schema definition. The schema definition has references to the segment, field, and code libraries of its version.
Name
Value
ID
Schema identification number.
Name
Name of the schema.
STANDARD
Schema standard. Default is HL7.
STDVERSION
Schema version.
HL7 Segment Library
A segment is a logical grouping of data fields. Message segments may be required or optional. They may occur only once in a message or they may be allowed to repeat. Each segment is given a name. For example, the ADT message may contain the following segments: Message Header (MSH), Event Type (EVN), Patient ID (PID), and Patient Visit (PV1).
Each segment is identified by a unique three-character code known as the segment ID.
All segment ID codes beginning with Z are reserved for locally defined messages. No such codes are defined within the HL7 Standard.
Name
Value
ITEM
Field ID Number
NAME
Field Name
DT
Data Type
SEQ
Sequence Number
OPT
Option: O=Optional, R=Required, C=Conditional
LEN
Size of the field
REPEAT
Number of times a field can repeat. An integer or N = No repeat. Y = indefinite or site-determined number of times.
HL7 Field Library
A field is a string of characters. HL7 does not determine how systems store data within an application. When fields are transmitted, they are sent as character strings. Except where noted, HL7 data fields may take on the null value. Sending the null value, which is transmitted as two double quotation marks (""), is different from omitting an optional data field. The difference appears when message content is used to update a record in a database rather than to create a new one. If no value is sent, the old value is unchanged. If the null value is sent, the old value is changed to null.
Composite
A composite may consist of either a primitive data type (ST,ID, and so on) or a group of subcomposites.
Subcomposite
Subcomposites are parts of a component and consist of primitive data types (ST, ID, and so on).
HL7 Message and Library Relationship
Every Message Type has a reference to the segment, field, and code libraries. The segment library has a reference to the field library, which has a reference to the code library. The code library stores segments and fields in tables.