# `HL7v2.Profiles.IHE.LTW`
[🔗](https://github.com/Balneario-de-Cofrentes/hl7v2/blob/v3.10.1/lib/hl7v2/profiles/ihe/ltw.ex#L1)

IHE Laboratory Testing Workflow (LTW) conformance profiles.

Ships factory functions for the two most common IHE PaLM TF
laboratory transactions:

- **LAB-1 Placer Order Management** — `OML^O21` placer → filler.
  Source: IHE PaLM TF-2a §3.1 (Rev 11.0, 2024-04-08).
- **LAB-3 Order Results Management** — `ORU^R01` filler → results
  tracker. Source: IHE PaLM TF-2a §3.3.

Both transactions are defined on HL7 v2.5.1. The IHE PaLM TF
constrains several base-HL7 fields to `X` (not supported) in
favor of newer segments — notably ORC-7 and OBR-5/6/8/27 are
replaced by TQ1.

## Usage

    profile = HL7v2.Profiles.IHE.LTW.lab_1_placer_oml_o21()
    HL7v2.validate(msg, profile: profile)

# `all`

```elixir
@spec all() :: %{required(String.t()) =&gt; HL7v2.Profile.t()}
```

Returns the complete LTW profile catalog.

# `lab_1_placer_oml_o21`

```elixir
@spec lab_1_placer_oml_o21() :: HL7v2.Profile.t()
```

LAB-1 OML^O21 — Placer Order Management.

Placer → Filler new-order flow. Requires MSH, PID, ORC, OBR.
PV1-2 is required (value "U" when patient class is unknown).
ORC-1 must be a valid IHE subset code; ORC-9 carries the
transaction timestamp; OBR-2/OBR-4/OBR-16 are all required.

Forbidden fields (per IHE PaLM TF-2a §3.1.4.1.2.3):
- ORC-7 (Quantity/Timing) — replaced by TQ1
- OBR-5 (Priority) — replaced by TQ1
- OBR-6 (Requested Date/Time) — replaced by TQ1
- OBR-8 (Observation End Date/Time) — replaced by SPM
- OBR-15 (Specimen Source) — replaced by SPM
- OBR-22 (Results Rpt/Status Chng) — not supported in LAB-1
- OBR-27 (Quantity/Timing) — replaced by TQ1

Source: IHE PaLM TF-2a §3.1.

# `lab_3_results_oru_r01`

```elixir
@spec lab_3_results_oru_r01() :: HL7v2.Profile.t()
```

LAB-3 ORU^R01 — Order Results Management.

Filler → Results Tracker results delivery. Requires MSH, PID,
ORC, OBR, OBX. OBR-3 (Filler Order Number) is the primary
correlation key; OBR-4 must carry Identifier + Text + Coding
System subcomponents. OBR-25 (Order Result Status) is required
and must be one of {S, I, R, P, F, C, X}. OBX-11 (Observation
Result Status) is required and must be one of {O, I, D, R, P,
F, C, X} — note `U` is explicitly forbidden.

Source: IHE PaLM TF-2a §3.3.

---

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