HL7 EDI Connector 4.2 Reference | MuleSoft Documentation
# HL7 EDI Connector 4.2 Reference
## Configurations
### Config
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
Name for this configuration. Connectors reference the configuration with this name.  
Connection | Connection type for this configuration.  
Expiration Policy |  ExpirationPolicy | Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the instance expires at the exact moment that it becomes eligible. Mule purges the instances when appropriate.  
Mule application namespace ID (MSH-3-1/MSH-5-1) |  Application namespace ID for Mule in the message header (MSH segment). If set, this value affects both receive and send message handling:
  * On the receive side, the MSH receiving application namespace ID must match this value.
  * On the send side, the connector uses this value as the MSH sending application namespace ID unless the send configuration or message parameters override it.

  
Mule Application universal ID (MSH-3-2/MSH-5-2) |  Application universal ID for Mule in the message header (MSH segment). If set, this value affects both receive and send message handling:
  * On the receive side, the MSH receiving application universal ID must match this value.
  * On the send side, the connector uses this value as the MSH sending application universal ID unless it is overridden in the send configuration or message parameters.

  
Mule Application universal ID Type (MSH-3-3/MSH-5-3) |  Application universal ID type for Mule in the message header (MSH segment). If set, this value affects both receive and send message handling:
  * On the receive side, the MSH receiving application universal ID type must match this value.
  * On the send side, the connector uses this value as the MSH sending application universal ID type unless it is overridden in the send configuration or message parameters.

  
Partner Application Namespace ID (MSH-3-1/MSH-5-1) |  Application namespace ID for the partner in the message header (MSH segment). If set, this value affects both receive and send message handling:
  * On the receive side, the MSH sending application namespace ID must match this value.
  * On the send side, the connector uses this value as the MSH sending application namespace ID unless it is overridden in the send configuration or message parameters.

  
Partner Application universal ID (MSH-3-2/MSH-5-2) |  Application universal ID for the partner in the message header (MSH segment). If set, this value affects both receive and send message handling:
  * On the receive side, the MSH sending application universal ID must match this value.
  * On the send side, the connector uses this value as the MSH sending application universal ID unless it is overridden in the send configuration or message parameters.

  
Partner Application universal ID Type (MSH-3-3/MSH-5-3) |  Application universal ID type for the partner in the message header (MSH segment). If set, this value affects both receive and send message handling:
  * On the receive side, the MSH sending application universal ID type must match this value.
  * On the send side, the connector uses this value as the MSH sending application universal ID type unless it is overridden in the send configuration or message parameters.

  
Schema definitions |  Array of String | List of schema paths for the connector to use. The paths can be filesystem paths or classpaths.  
Event and message to message structure map path |  Path to a YAML file that defines the mapping of the event code and message code to the message structure ID:
  * If working with multiple message structures, this mapping definition supports using MSH-9-1 and MSH-9-2 to determine the message structure when MSH-9-3 is not present in a message.
  * If only a single message structure is present in the schemas for which this message structure is used, the connector uses the message structure to parse all messages.
  * If MSH-9-3 is present in a message, the connector ignores the MSH-9-1 and MSH-9-2 values.

  
HL7 Message character encoding |  Enumeration, one of:
  * ASCII
  * BIG_5
  * EUC_KR
  * EUC_TW
  * GB_18030
  * ISO_8859_1
  * ISO_8859_15
  * ISO_8859_2
  * ISO_8859_3
  * ISO_8859_4
  * ISO_8859_5
  * ISO_8859_6
  * ISO_8859_7
  * ISO_8859_8
  * ISO_8859_9
  * JIS0208
  * JIS_X0201
  * JIS_X0212
  * UTF_16
  * UTF_32
  * UTF_8

| Character encoding for HL7 messages. This is the default for receive messages when MSH-18 is not present and for send messages when MSH-18 is not present in the send message data.  
Disable numeric prefixes for data keys | Uses segment and group IDs directly as keys in the data, rather than prefixing the segment and group IDs with position values.  
Required processing ID |  Enumeration, one of:
  * DEBUGGING
  * PRODUCTION
  * TRAINING

| Value to match the MSH-11-1 processing ID. If set, only messages with the specified processing ID are accepted for processing. Messages with other processing ID values or with no processing ID specified are rejected with an exception.  
Pattern for generic extension segment names | Java regular pattern for segment names to treat as generic extension segments. If specified, segment names matching this pattern are allowed anywhere in the message and are converted to maps of string values for elements and composites.  
Fail when required value missing |  Whether to reject a message if a required value is missing:
  * If `true`, a message with this error is rejected.
  * If `false`, the value is ignored and the message is accepted.

In either case, the error is logged and reported in an ERR segment.  
Fail when value length outside allowed range |  Whether to reject a message if the receive value length is outside of allowed the range:
  * If `true`, a message with this error is rejected.
  * If `false`, the value is used and the message is accepted.

In either case, the error is logged and reported in an ERR segment.  
Fail when invalid character in value |  Whether to reject a message if the receive value contains an invalid character:
  * If `true`, a message with this error is rejected.
  * If `false`, the character is either passed through or substituted, and the message is accepted.

In either case the error is reported in an ERR segment.  
Fail when too many repeats of value |  Whether to reject a message if the receive value is repeated too many times:
  * If `true`, a message with this error is rejected.
  * If `false`, the value is accepted and the message is accepted.

In either case the error is reported in an ERR segment.  
Fail when unknown segment in message |  Whether to reject a message if it contains an unknown segment:
  * If `true`, a message with this error is rejected.
  * If `false`, the segment is ignored and the message is accepted.

In either case the error is reported in an ERR segment.  
Fail when segment out of order in message set |  Whether to reject a message when a segment in a message set is out of order:
  * If `true`, a message with this error is rejected.
  * If `false` and the segment can be reordered, the message is accepted.

In either case the error is reported in an ERR segment.  
Fail when unused segment included in message set |  Whether to reject a message when a segment marked as unused is included in a message set:
  * If `true`, a message with this error is rejected.
  * If `false`, the message is accepted and the unused segment is ignored.

In either case the error is reported in an ERR segment.  
Fail when too many repeats of segment |  Whether to reject a message when a segment occurs too many times in a message set:
  * If `true`, a message with this error is rejected.
  * If `false`, the message is accepted.

In either case, the error is reported in an ERR segment.  
HL7 Message segment terminator |  Enumeration, one of: | Value for the segment terminator.  
## Connection Type
### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
Reconnection |  | Configures a reconnection strategy to use when a connector operation fails to connect to an external server.  
## Operations
### Read
`<hl7:read>`
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
Configuration | Name of the configuration to use.  
Read Content | Input payload. | `#[payload]`  
Target Variable | Name of the variable that stores the operation’s output.  
Target Value | Expression that evaluates the operation’s output. The outcome of the expression is stored in the **Target Variable** field. | `#[payload]`  
Reconnection Strategy |
In either case the error is reported in an ERR segment.  
Fail when too many repeats of segment |  Whether to reject a message when a segment occurs too many times in a message set:
  * If `true`, a message with this error is rejected.
  * If `false`, the message is accepted.

In either case, the error is reported in an ERR segment.  
HL7 Message segment terminator |  Enumeration, one of: | Value for the segment terminator.  
## Connection Type
### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
Reconnection |  | Configures a reconnection strategy to use when a connector operation fails to connect to an external server.  
## Operations
### Read
`<hl7:read>`
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
Configuration | Name of the configuration to use.  
Read Content | Input payload. | `#[payload]`  
Target Variable | Name of the variable that stores the operation’s output.  
Target Value | Expression that evaluates the operation’s output. The outcome of the expression is stored in the **Target Variable** field. | `#[payload]`  
Reconnection Strategy | 

| Reconnection strategy to use.  
#### For Configurations
#### Throws
  * HL7:RETRY_EXHAUSTED
  * HL7:UNKNOWN
  * HL7:PARSE
  * HL7:SCHEMA
  * HL7:CONNECTIVITY
  * HL7:WRITE


### Write
`<hl7:write>`
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
Configuration | Name of the configuration to use.  
Write Content | Output payload. | `#[payload]`  
Streaming Strategy | 
  * Repeatable In Memory Stream
  * Repeatable File Store Stream
  * Non-Repeatable Stream

| Configures how Mule processes streams. Repeatable streams are the default behavior.  
Target Variable | The name of a variable that stores the output of the operation.  
Target Value | Expression that evaluates the operation’s output. The outcome of the expression is stored in the **Target Variable** field. | `#[payload]`  
Reconnection Strategy | 

| Reconnection strategy to use.  
#### For Configurations
#### Throws
  * HL7:RETRY_EXHAUSTED
  * HL7:UNKNOWN
  * HL7:PARSE
  * HL7:SCHEMA
  * HL7:CONNECTIVITY
  * HL7:WRITE


## Types
### Expiration Policy
Configures the maximum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
Max Idle Time | Maximum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.  
Time Unit |  Enumeration, one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

| A time unit that qualifies the **Max Idle Time** field.  
### Forever
Configures a forever reconnection strategy by which the connector operation attempts to reconnect at a specified frequency for as long as the Mule app runs.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
Frequency | How often to attempt to reconnect, in milliseconds.  
### Non-Repeatable Stream
Disables the repeatable stream functionality and uses non-repeatable streams to have lower performance overhead, memory use, and cost.
### Reconnection
Configures reconnection options.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
Fails deployment when test connection fails |  What to do if, when an app is deployed, a connectivity test does not pass after exhausting the associated reconnection strategy:
  * true Allow the deployment to fail.
  * false Ignore the results of the connectivity test.

  
Reconnection Strategy | 

| Reconnection strategy to use.  
### Repeatable File Store Stream
Configures the repeatable file store streaming strategy by which Mule keeps a portion of the stream content in memory. If the stream content is larger than the configured buffer size, Mule backs up the buffer’s content to disk and then clears the memory.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
Max In Memory Size |  Maximum amount of memory that the stream can use for data. If the amount of memory exceeds this value, Mule buffers the content to disk. To optimize performance:
  * Configure a larger buffer size to avoid the number of times Mule needs to write the buffer on disk. This increases performance, but it also limits the number of concurrent requests your application can process, because it requires additional memory.
  * Configure a smaller buffer size to decrease memory load at the expense of response time.

  
Buffer Unit |  Enumeration, one of: | Unit for the **Max In Memory Size** field.  
### Repeatable In Memory Stream
Configures the in-memory streaming strategy by which the request fails if the data exceeds the maximum buffer size. Always run performance tests to find the optimal buffer size for your specific use case.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
Initial Buffer Size | Initial amount of memory to allocate to the data stream. If the streamed data exceeds this value, the buffer expands by the **Buffer Size Increment** , with an upper limit of the **Max Buffer Size** value.  
Buffer Size Increment | Amount by which the buffer size expands if it exceeds its initial size. Setting a value of `0` or lower specifies that the buffer can’t expand.  
Max Buffer Size | Maximum size of the buffer. If the buffer size exceeds this value, Mule raises a `STREAM_MAXIMUM_SIZE_EXCEEDED` error. A value of less than or equal to `0` means no limit.  
Buffer Unit |  Enumeration, one of: | Unit for the **Initial Buffer Size** , **Buffer Size Increment** , and **Max Buffer Size** fields.  
### Standard
Configures a standard reconnection strategy, which specifies how often to reconnect and how many reconnection attempts the connector operation can make.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
Frequency | How often to attempt to reconnect, in milliseconds.  
Reconnection Attempts | How many reconnection attempts the Mule app can make.  
## See Also
  * Introduction to Anypoint Connectors
  * MuleSoft Help Center