## Hl7Message.toString() method [​](/content/docs/sdk/core.hl7message.tostring#hl7messagetostring-method "Direct link to Hl7Message.toString(/index.html) method")

Returns the HL7 message as a string.

Unparsed segments are emitted directly from their original string form, which preserves the source text without forcing a parse.

**Signature:**

```typescript
toString(): string;
```

**Returns:**

string

The HL7 message as a string.

- [Hl7Message.toString() method](/content/docs/sdk/core.hl7message.tostring#hl7messagetostring-method/index.html)
