For the complete documentation index, see llms.txt. This page is also available as Markdown.

ConvertToXml

Task to convert HL7v2 message to XML.

Task version: 1.3.0

Required Frends version: 5.7+

Required .NET version: 8.0

Compatible Agents: Crossplatform

Task Parameters

Name
Description

Hl7v2Message : String

The input string containing a message in Hl7v2 format.

Default: - Example: MSH|^~&|SendingApp|SendingFac|ReceivingApp|ReceivingFac|20060228155525||ADT^A01|123|P|2.3

Name
Description

LineEnding : LineEnding

Define the line ending of the output.

Possible values:

  • LF: Define the line ending of the output.

  • CRLF: Define the line ending of the output.

Default: LF Example: LineEnding.LF

ThrowErrorOnFailure : Boolean

Whether to throw an error on failure.

Default: True Example: true

ErrorMessageOnFailure : String

Overrides the error message on failure.

Default: - Example: Custom error message

Task Result

Name
Description

Success : Boolean

Indicates if the task completed successfully. Example: true

Xml : String

Message in Xml format. Example: <QRY_R02 xmlns="urn:hl7-org:v2xml"> </QRY_R02>

Error : Error

Error that occurred during task execution. Example: object { string Message, Exception AdditionalInfo }

Error.Message : String

Summary of the error. Example: Unable to convert a message.

Error.AdditionalInfo : Exception

Additional information about the error. Example: object { Exception AdditionalInfo }

Task Changelog

Changelog for Task Frends.Hl7v2.ConvertToXml.

[1.3.0] - 2026-07-30

Changed

  • Updated package copyright metadata to comply with Frends platform standards

[1.2.0] - 2026-07-01

Added

  • Unit tests verifying core parsing behaviors (schema auto-detection, Z-segment handling, delimiters, escape sequences, large message performance)

  • Documented supported HL7 versions (2.1 - 2.8.1) in task summary

[1.1.0] - 2026-06-17

Added

  • Normalize HL7 segment separators to CR

[1.0.0] - 2026-02-26

Added

  • Initial implementation

Last updated

Was this helpful?