## Hl7Segment.toString() method [​](/content/docs/sdk/core.hl7segment.tostring#hl7segmenttostring-method "Direct link to Hl7Segment.toString(/index.html) method")

Returns the HL7 segment as a string.

Unparsed fields 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 segment as a string.

- [Hl7Segment.toString() method](/content/docs/sdk/core.hl7segment.tostring#hl7segmenttostring-method/index.html)
