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

CreateFromXml

Task to create Hl7v2 message from Xml

Task version: 1.2.0

Required Frends version: 5.7+

Required .NET version: 8.0

Compatible Agents: Crossplatform

Task Parameters

Name
Description

Xml : String

The input string containing a message in Xml format.

Default: - Example: <QRY_R02 xmlns="urn:hl7-org:v2xml"> </QRY_R02>

MshOverrides : MshOverride[]

Optional MSH field overrides applied to the output HL7v2 message.

Only specified fields are overwritten - unspecified fields retain their

original values from the input XML.

Default: - Example: [ { "Field": "MSH3_SendingApplication", "Value": "NewSender" }, { "Field": "MSH5_ReceivingApplication", "Value": "NewReceiver" } ]

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.

  • CR: 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

Hl7v2Message : String

Message in Hl7v2 format. Example: MSH||CohieCentral|COHIE|Clinical Data Provider

Error : Error

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

Error.Message : String

Summary of the error. Example: Unable to create Hl7v2 message.

Error.AdditionalInfo : Exception

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

Task Changelog

Changelog for Task Frends.Hl7v2.CreateFromXml.

[1.2.0] - 2026-08-06

Changed

  • Updated copyright information to comply with Frends platform standards.

[1.1.0] - 2026-07-03

Added

  • MSH field overrides (MshOverrides): ability to overwrite any MSH field (MSH-1 to MSH-15) in the output HL7v2 message CR option to LineEnding enum

[1.0.0] - 2026-02-27

Added

  • Initial implementation

Last updated

Was this helpful?