# `HL7v2.Segment.ZXX`
[🔗](https://github.com/Balneario-de-Cofrentes/hl7v2/blob/v3.10.1/lib/hl7v2/segment/zxx.ex#L1)

Generic Z-Segment (ZXX) — HL7v2 v2.5.1.

Handles any Z-segment (ZPD, ZPI, ZDX, etc.) by preserving all fields as raw
values. Z-segments are site-defined extensions — their structure is unknown to
the standard, so we store them losslessly.

# `t`

```elixir
@type t() :: %HL7v2.Segment.ZXX{raw_fields: list(), segment_id: binary()}
```

# `new`

```elixir
@spec new(binary(), list()) :: t()
```

Creates a ZXX from a specific Z-segment name and raw field list.

# `parse`

```elixir
@spec parse(list(), HL7v2.Separator.t()) :: t()
```

Parses a Z-segment, preserving all fields as raw values.

The `segment_name` is stored so we can re-encode with the correct identifier.

# `segment_name`

```elixir
@spec segment_name(t()) :: binary()
```

Returns the segment identifier for a specific ZXX instance.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
