docs(sp3): put transaction_type_code on ClaimOutput (mirrors envelope convention)

This commit is contained in:
Tyler
2026-06-20 07:18:16 -06:00
parent 467087d683
commit 763ca3d758
@@ -56,8 +56,15 @@ def test_r034_ref_g1_required_when_freq_1_no_ref_g1_passes(strict_ref_g1_payer):
**Files:**
- Modify: `backend/src/cyclone/parsers/validator.py`
- Modify: `backend/src/cyclone/parsers/models.py` (add `Envelope.transaction_type_code: str | None`)
- Modify: `backend/src/cyclone/parsers/parse_837.py` (populate `transaction_type_code` from BHT06 in `_build_envelope`)
- Modify: `backend/src/cyclone/parsers/models.py` (add `ClaimOutput.transaction_type_code: str | None = None`)
- Modify: `backend/src/cyclone/parsers/parse_837.py` (populate `ClaimOutput.transaction_type_code` from BHT06 in the per-claim builder)
> **Why on ClaimOutput, not Envelope?** The current `ClaimOutput` shape
> already mirrors a few envelope fields (`control_number`,
> `transaction_date`) because the per-claim flow is easier when the
> validator only needs to look at one object. Following the same
> convention keeps R035's lookup one-liner clean and avoids threading
> the Envelope into every validation rule signature.
> **Note on naming:** BHT06 in the 837P 005010X222A1 implementation is the
> "Transaction Type Code" element (qualifier 640) — not the "Transaction