automapper-validation 0.8.1

AHB condition expression parsing, evaluation, and EDIFACT validation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
{
  "generated_at": "2026-03-12T10:04:47Z",
  "ahb_file": "UTILTS_AHB_1_0_Fehlerkorrektur_20250218.xml",
  "format_version": "FV2504",
  "conditions": {
    "12": {
      "confidence": "medium",
      "reasoning": "When a calculation step SG8 SEQ+Z37 contains the Z83 (Positivwert) operator in its SG9 CAV, no other SG8 SEQ+Z37 may share the same Rechenschrittidentifikator within the Vorgang. Groups step IDs by count and checks that any step with Z83 appears exactly once. Zeitraum-ID scoping approximated by global step_id grouping.",
      "description_hash": "d666c843",
      "is_external": false
    },
    "50": {
      "confidence": "medium",
      "reasoning": "Checks that all DTM segments in the message use the same DE2379 format code. Full per-IDE+24 scoping would require a navigator, but message-wide consistency is a practical approximation — in well-formed UTILTS messages a single IDE is common. Returns Unknown when no DTMs are found.",
      "description_hash": "2e4dc8a2",
      "is_external": false
    },
    "913": {
      "confidence": "medium",
      "reasoning": "Format condition: value must be in range [1, 99999]. Both bounds checked with validate_numeric and combined with AND logic. Applied to QTY value element as the most common numeric data element in UTILTS.",
      "description_hash": "d15f5fb9",
      "is_external": false
    },
    "21": {
      "confidence": "high",
      "reasoning": "Check CAV segment where DE7111 (elements[0][0]) == 'ZD3' (Zählzeitdefinitionstyp qualifier) and DE7110 (elements[0][3]) == 'Z32' (sonstiger Zählzeitdefinitionstyp). Segment structure confirms ZD3 at elements[0][0] and the value field at elements[0][3]; has_qualified_value handles both the qualifier filter and the value check.",
      "description_hash": "c4b17900",
      "is_external": false
    },
    "932": {
      "confidence": "high",
      "reasoning": "Format condition: time portion HHMM of DTM value must equal 2200. This corresponds to 22:00 UTC (midnight CET), the standard German energy market day boundary. Uses validate_hhmm_equals on elements[0][1] of the DTM segment.",
      "description_hash": "943b98c4",
      "is_external": false
    },
    "37": {
      "confidence": "medium",
      "reasoning": "Whether a validity end date can already be specified is an organizational business decision at message creation time. Checking DTM+Z35 presence would be circular (condition guards whether to include that very field). Must be resolved from business context external to the message.",
      "description_hash": "43eafe84",
      "is_external": true
    },
    "61": {
      "confidence": "medium",
      "reasoning": "Checks if STS+E01 has a DE9013 value from the 'Cluster Ablehnung' rejection code set. The specific set of rejection codes is defined in a code list table in the AHB (Kapitel referencing Ablehnung cluster) which is not provided here. The STS structure shows elements[0][0]=E01 and elements[2][0]=DE9013, but the exact membership in 'Cluster Ablehnung' requires the external code list — marked as external.",
      "description_hash": "790da731",
      "is_external": true
    },
    "490": {
      "confidence": "high",
      "reasoning": "Checks if the CCYYMMDD portion of the Nachrichtendatum (DTM+137) falls within the German summer time (MESZ/UTC+2) period per Tabelle Kapitel 3.5. Uses is_mesz_utc helper which applies the EU DST rule.",
      "description_hash": "b21c790d",
      "is_external": false
    },
    "41": {
      "confidence": "high",
      "reasoning": "Checks if any SG8 group instance within the SG5 transaction group contains SEQ with qualifier Z42 (Zählzeitdefinition) at elements[0][0]. Group-scoped to SG5→SG8.",
      "description_hash": "b0bc1ebf",
      "is_external": false
    },
    "30": {
      "confidence": "medium",
      "reasoning": "Compares CCYY of DTM+Z35 (Gültigkeitsende) to CCYY of DTM+Z34 (Gültigkeitsbeginn), checking that the end year is exactly start year + 1. 'Diesem DE' most plausibly refers to DTM+Z35 since it is the natural counterpart to DTM+Z34 and its year is constrained relative to Z34.",
      "description_hash": "caf76cd4",
      "is_external": false
    },
    "1": {
      "confidence": "medium",
      "reasoning": "Whether the MP-ID belongs to the electricity sector (Sparte Strom) cannot be determined from the EDIFACT message alone — requires external market participant registry lookup.",
      "description_hash": "f3221dba",
      "is_external": true
    },
    "6": {
      "confidence": "high",
      "reasoning": "Same-group absence pattern: in some SG8 instance RFF+Z23 (Rechenschritt reference, elements[0][0]==\"Z23\") is present AND SEQ+Z37 (elements[0][0]==\"Z37\") is absent. Mirrors condition 5 but for RFF+Z23 rather than RFF+Z19.",
      "description_hash": "1c91b7f5",
      "is_external": false
    },
    "34": {
      "confidence": "medium",
      "reasoning": "Checks if any DTM segment has format code 401 at elements[0][2] (DE2379). Counterpart to condition [31] for the 401 format code (point-in-time without timezone vs. UTC offset).",
      "description_hash": "8c613b6d",
      "is_external": false
    },
    "10": {
      "confidence": "high",
      "reasoning": "\"wenn vorhanden\" is a standard AHB conditional modifier indicating that a rule applies only when the element is present. As a standalone condition it is always True — the condition itself does not impose a boolean predicate, it only restricts applicability to cases where the element exists.",
      "description_hash": "07e09f1a",
      "is_external": false
    },
    "508": {
      "confidence": "high",
      "reasoning": "Hinweis: informational annotation, always applies unconditionally",
      "description_hash": "ffd91393",
      "is_external": false
    },
    "513": {
      "confidence": "high",
      "reasoning": "When DTM+Z33 uses format code 401 in elements[0][2], exactly one DE2380 value (elements[0][1]) across all Z33 instances must be '0000'. Straightforward filter-and-count over parsed segments using authoritative element positions from the MIG schema reference.",
      "description_hash": "3ce923ad",
      "is_external": false
    },
    "29": {
      "confidence": "medium",
      "reasoning": "In the same SG8, SEQ+Z43 (Zählzeitdefinition) must be present and DTM must have format code 303 at elements[0][2]. In a SEQ+Z43 SG8, the only DTM present is DTM+Z33, so checking format code 303 without qualifying by Z33 is safe.",
      "description_hash": "31a4cc57",
      "is_external": false
    },
    "49": {
      "confidence": "high",
      "reasoning": "Same as condition 48 but checks for format code 401.",
      "description_hash": "93ba4b27",
      "is_external": false
    },
    "519": {
      "confidence": "high",
      "reasoning": "Uniqueness check: no DTM+Z45 value (DE2380) may appear more than once. Same pattern as 515 but for Z45.",
      "description_hash": "f8082ce2",
      "is_external": false
    },
    "523": {
      "confidence": "high",
      "reasoning": "Hinweis informational note — always returns True unconditionally.",
      "description_hash": "c8d7baba",
      "is_external": false
    },
    "525": {
      "confidence": "high",
      "reasoning": "Hinweis informational note — always returns True unconditionally.",
      "description_hash": "9bbb8200",
      "is_external": false
    },
    "527": {
      "confidence": "high",
      "reasoning": "Hinweis condition — informational annotation, always returns True.",
      "description_hash": "b63dfb1f",
      "is_external": false
    },
    "930": {
      "confidence": "high",
      "reasoning": "Standard format condition for QTY value: at most 2 decimal places. Uses validate_max_decimal_places helper on elements[0][1] of the QTY segment, which is the canonical quantity value position in EDIFACT QTY segments.",
      "description_hash": "30e8c861",
      "is_external": false
    },
    "939": {
      "confidence": "high",
      "reasoning": "Format: must contain @ and . — standard email format check via validate_email.",
      "description_hash": "05a09b9a",
      "is_external": false
    },
    "963": {
      "confidence": "medium",
      "reasoning": "Format condition: value must be <= 100. Applied to QTY segment value (element 0, component 1). Uses validate_numeric helper.",
      "description_hash": "18dbe9b5",
      "is_external": false
    },
    "532": {
      "confidence": "medium",
      "reasoning": "Cross-group Zeitraum-ID matching: collect DE1156 values from SG6 RFF+Z49/Z53 segments, then verify that SG8 RFF+Z46 references (DE1154) point to one of those IDs. Medium confidence because the condition is a hint about correct data linkage across groups, and the exact scoping (per-SG5/SG6 instance vs message-wide) may require navigator-based logic for full correctness.",
      "description_hash": "d0030a2b",
      "is_external": false
    },
    "13": {
      "confidence": "medium",
      "reasoning": "Complex cross-SG8 pairing invariant: for each Z80 (Divisor) or Z81 (Dividend) operator in SG9 CCI+Z86, there must be exactly one matching SG8 with the same Rechenschrittidentifikator (SEQ.elements[1][0]) and Zeitraum-ID (RFF+Z46) that carries the complementary operator. Requires full navigator traversal.",
      "description_hash": "5154570e",
      "is_external": false
    },
    "526": {
      "confidence": "high",
      "reasoning": "Hinweis informational note — always returns True unconditionally.",
      "description_hash": "dd490e4b",
      "is_external": false
    },
    "515": {
      "confidence": "high",
      "reasoning": "Uniqueness check: no DTM+Z44 value (DE2380) may appear more than once. Collect all Z44 DE2380 values and check for duplicates.",
      "description_hash": "a3473634",
      "is_external": false
    },
    "55": {
      "confidence": "high",
      "reasoning": "This is a Hinweis/informational annotation. It instructs the sender how to compute the sequence number for a specific data element based on the repetition index of SG6 RFF+Z49/Z53. It does not express a boolean predicate — it always applies unconditionally.",
      "description_hash": "9953f598",
      "is_external": false
    },
    "27": {
      "confidence": "high",
      "reasoning": "Checks CAV with DE7111=ZD4 at elements[0][0] (qualifier) and DE7110=Z26 at elements[0][3] (keine Verwendung des Hochlastzeitfensters). Both qualifier and value are in the same C889 composite.",
      "description_hash": "8d89b387",
      "is_external": false
    },
    "15": {
      "confidence": "medium",
      "reasoning": "Checks that within the current SG5 (IDE+24) transaction group there is exactly one SG8 that contains both SEQ+Z37 (Bestandteil des Rechenschritts) and RFF+Z19 (Messlokation reference), and that all such matching SG8s reference the same Zeitraum-ID via RFF+Z46.",
      "description_hash": "73521a1f",
      "is_external": false
    },
    "2": {
      "confidence": "high",
      "reasoning": "Check if any SG5 instance contains STS where elements[0][0]==\"Z23\" (Statuskategorie Berechnungsformel) and elements[1][0]==\"Z34\" (Berechnungsformel muss beim Absender angefragt werden). Segment structure confirms STS Statuskategorie at elements[0][0] and Status Code at elements[1][0].",
      "description_hash": "1e218dae",
      "is_external": false
    },
    "22": {
      "confidence": "medium",
      "reasoning": "Whether the MP-ID in NAD+MS (Nachrichtenabsender) holds the role of NB (Netzbetreiber) cannot be determined from the EDIFACT message alone — requires external market participant role registry.",
      "description_hash": "b51d892c",
      "is_external": true
    },
    "31": {
      "confidence": "medium",
      "reasoning": "Checks if any DTM segment has format code 303 at elements[0][2] (DE2379). Applies to DTM+Z33/Z44/Z45 which can carry format codes 303 or 401. Message-wide check is sufficient since these are the only DTMs with variable format codes.",
      "description_hash": "9b38e578",
      "is_external": false
    },
    "510": {
      "confidence": "high",
      "reasoning": "Hinweis: informational annotation, always applies unconditionally",
      "description_hash": "047418b3",
      "is_external": false
    },
    "947": {
      "confidence": "high",
      "reasoning": "Format: MMDDHHMM = 12312300 — validates that the DTM value has MMDDHHMM portion equal to 12312300 (Dec 31, 23:00).",
      "description_hash": "4ff9a749",
      "is_external": false
    },
    "11": {
      "confidence": "medium",
      "reasoning": "When multiple SG8 SEQ+Z37 share the same Rechenschrittidentifikator (duplicates), all operator CAV codes across those instances must be exclusively Z69 (Addition) or Z70 (Subtraktion). Navigates SG9 children of each SG8 to collect operator codes, groups by step ID, and checks the constraint for duplicates. Zeitraum-ID same-scope matching is not enforced due to API limitations — treats global step_id grouping as approximation.",
      "description_hash": "b8d277b2",
      "is_external": false
    },
    "25": {
      "confidence": "low",
      "reasoning": "Requires runtime knowledge of the market participant role (LF = Lieferant) for the MP-ID in NAD+MR. While the NAD+MR MP-ID is present in elements[1][0], whether that ID is registered in the role LF cannot be determined from the EDIFACT message alone — it depends on external master data or market role registry.",
      "description_hash": "55130474",
      "is_external": true
    },
    "506": {
      "confidence": "high",
      "reasoning": "Hinweis condition — informational annotation describing the semantic meaning of the timestamp (validity start of Zählzeitdefinitionen overview). Always applies unconditionally.",
      "description_hash": "ae6d3b5f",
      "is_external": false
    },
    "969": {
      "confidence": "medium",
      "reasoning": "900-series format condition: 'Möglicher Wert: ≤ 1' means the value must be <= 1. Applied to QTY quantity value (most common numeric value in UTILTS). validate_numeric with \"<=\" operator handles this. Medium confidence because the exact target segment is inferred from context.",
      "description_hash": "7520c2ab",
      "is_external": false
    },
    "518": {
      "confidence": "high",
      "reasoning": "Hinweis: informational annotation, always applies unconditionally",
      "description_hash": "8ad36bf0",
      "is_external": false
    },
    "56": {
      "confidence": "medium",
      "reasoning": "Checks that DTM+Z25 (Verwendung der Daten ab) in any SG6 whose associated RFF has Zeitraum-ID '1' in DE1156 (C506 component [0][2]) is at most the day following DTM+137 (message date) at 0:00. Date arithmetic is implemented inline without external crates. Timezone nuance ('0:00 Uhr deutscher Zeit' = CET/CEST midnight, not UTC midnight) is approximated — threshold uses CCYYMMDD+10000 of the next calendar day in UTC, which introduces up to 2-hour margin of error around DST transitions. The Zeitraum-ID '1' is checked at elements[0][2] per the explicit DE1156 reference in the condition text.",
      "description_hash": "f7beebcf",
      "is_external": false
    },
    "514": {
      "confidence": "high",
      "reasoning": "Hinweis: informational annotation, always applies unconditionally",
      "description_hash": "5e3435f9",
      "is_external": false
    },
    "53": {
      "confidence": "high",
      "reasoning": "COM segment structure: elements[0] is C076 composite where [0][0]=DE3148 (communication address) and [0][1]=DE3155 (communication means type code). Checks if any COM has DE3155=='EM' (Email).",
      "description_hash": "f7255aef",
      "is_external": false
    },
    "529": {
      "confidence": "high",
      "reasoning": "Hinweis condition — informational annotation, always returns True.",
      "description_hash": "9592f83e",
      "is_external": false
    },
    "937": {
      "confidence": "high",
      "reasoning": "Format: keine Nachkommastelle — no decimal places allowed. Uses validate_max_decimal_places with max=0.",
      "description_hash": "e3f49bb8",
      "is_external": false
    },
    "960": {
      "confidence": "medium",
      "reasoning": "Netzlokations-ID (network location ID) follows the same 11-digit Luhn check digit format as MaLo-ID. LOC+Z18 is the qualifier for Netzlokation in UTILTS messages.",
      "description_hash": "0ce0bd80",
      "is_external": false
    },
    "501": {
      "confidence": "high",
      "reasoning": "Hinweis: Verwendung der ID der Marktlokation — informational note describing that the Marktlokations-ID is used in this field. Always applies unconditionally.",
      "description_hash": "9727b89c",
      "is_external": false
    },
    "2007": {
      "confidence": "medium",
      "reasoning": "The condition says the segment group must appear exactly once for each Zeitraum-ID from SG5 STS+Z23+Z33 (Berechnungsformel angefügt). From the MIG reference, STS with Statuskategorie Z23 has elements[0][0]=Z23, elements[1][0]=status code (Z33=angefügt), and elements[2][0]=Zeitraum-ID. The evaluator returns True when at least one such STS+Z23+Z33 is present in the message, which is when the cardinality rule triggers. Full cardinality counting (exactly one group per Zeitraum-ID) would require navigator-level group instance counting and cross-referencing, which goes beyond what the boolean ConditionResult can express — the condition is really a presence trigger for the group requirement.",
      "description_hash": "df5b81e6",
      "is_external": false
    },
    "8": {
      "confidence": "medium",
      "reasoning": "Validates that RFF+Z23 references in SG8 SEQ+Z37 instances point to existing SEQ+Z37 DE1050 values. Follows the Example 27 pattern with SG5/SG8 group path. The Zeitraum-ID same-scope constraint and same-SG5 IDE+24 scoping are not fully enforced — cross-SG5 step IDs could be accepted — but within a single-transaction UTILTS message this is typically equivalent. RFF+Z23 is the standard Rechenschrittidentifikator reference qualifier based on Example 27.",
      "description_hash": "ae4073f9",
      "is_external": false
    },
    "505": {
      "confidence": "high",
      "reasoning": "Hinweis condition — informational annotation about cardinality (each rolled-out Zählzeitdefinition must be in its own IDE segment). Always applies unconditionally.",
      "description_hash": "8502b371",
      "is_external": false
    },
    "517": {
      "confidence": "high",
      "reasoning": "When format code 401 is used in DTM+Z44 DE2379, at least one DTM+Z44 DE2380 value must equal '0000'. Direct value check.",
      "description_hash": "a608cbdf",
      "is_external": false
    },
    "494": {
      "confidence": "medium",
      "reasoning": "The date must be the document creation time or earlier (i.e. not in the future relative to when the document was created). This requires comparing the EDIFACT field value against an external reference timestamp (the actual document creation time or processing time), which is not available within the message segments themselves.",
      "description_hash": "785470ce",
      "is_external": true
    },
    "33": {
      "confidence": "medium",
      "reasoning": "Validates that SG8 change timestamps (Z33/Z44/Z45) are <= the SG5 DTM+Z35 validity end. Symmetric counterpart to condition 32. First 12 characters used for format-303 string comparison.",
      "description_hash": "ee4fe772",
      "is_external": false
    },
    "42": {
      "confidence": "medium",
      "reasoning": "Uniqueness of Schaltzeitdefinition codes within an IDE (SG5 group). The only Z44-keyed element in the provided SG8 schema is DTM+Z44 (Schaltzeitänderungszeitpunkt), so uniqueness is enforced on the DTM value within each SG5 instance. Medium confidence because the schema reference only shows DTM segments for SG8 — the actual 'Code' data element could reside in a CCI/SEQ segment not shown here.",
      "description_hash": "52641061",
      "is_external": false
    },
    "524": {
      "confidence": "high",
      "reasoning": "Hinweis informational note — always returns True unconditionally.",
      "description_hash": "055aa583",
      "is_external": false
    },
    "516": {
      "confidence": "medium",
      "reasoning": "When format code 303 is used in DTM+Z44 DE2379, at least one DTM+Z44 DE2380 value must match a SG5 DTM+Z34 DE2380 value. Cross-group check; medium confidence due to SG5 context dependency.",
      "description_hash": "b3c32d7a",
      "is_external": false
    },
    "26": {
      "confidence": "medium",
      "reasoning": "Cannot be determined from EDIFACT message content alone — requires external knowledge of whether a prior ORDERS message was used to make a claim. Depends on business process context outside the current message.",
      "description_hash": "baf706cc",
      "is_external": true
    },
    "57": {
      "confidence": "medium",
      "reasoning": "Complex cross-SG6 ordering condition: for each SG6 with Zeitraum-ID != 1, its DTM+Z25 must equal the DTM+Z26 of the SG6 with the next lower Zeitraum-ID. Implemented via navigator collecting (id, z25, z26) tuples per SG6 instance, then verifying the sequential boundary constraint.",
      "description_hash": "958047d8",
      "is_external": false
    },
    "965": {
      "confidence": "medium",
      "reasoning": "Format condition: HHMM <= 2359. Paired with condition 964 (HHMM >= 0000). Together they validate a valid HHMM time. Using validate_hhmm_range for both bounds on the DTM segment.",
      "description_hash": "abf42608",
      "is_external": false
    },
    "912": {
      "confidence": "medium",
      "reasoning": "Format condition: max 6 decimal places. Applies to a numeric quantity value; QTY is the standard numeric segment in UTILTS. The AHB row context is not in the structure reference but QTY.elements[0][1] is the standard value position.",
      "description_hash": "871dfa95",
      "is_external": false
    },
    "507": {
      "confidence": "high",
      "reasoning": "Hinweis condition — informational annotation requiring German legal time (deutsche gesetzliche Zeit). Always applies unconditionally.",
      "description_hash": "f9a00eb2",
      "is_external": false
    },
    "531": {
      "confidence": "high",
      "reasoning": "Hinweis condition — informational annotation referencing a documentation chapter, always returns True.",
      "description_hash": "e3d01b9a",
      "is_external": false
    },
    "931": {
      "confidence": "high",
      "reasoning": "Format condition: timezone component ZZZ of DTM value must be +00 (UTC). Uses validate_timezone_utc helper on the DTM value string (elements[0][1]). The timezone is embedded in the DTM value string as the trailing +00 suffix.",
      "description_hash": "825c510c",
      "is_external": false
    },
    "951": {
      "confidence": "medium",
      "reasoning": "Zählpunktbezeichnung (metering point designation) is a 33-character alphanumeric ID. The validate_zahlpunkt helper checks this format. The segment is typically LOC with a metering point qualifier (Z17 for Messlokation or Z19 for SteuerbareRessource in UTILTS). Using both as fallback.",
      "description_hash": "f35fc481",
      "is_external": false
    },
    "512": {
      "confidence": "medium",
      "reasoning": "When DTM+Z33 uses format code 303 in elements[0][2], exactly one DE2380 value (elements[0][1]) across all Z33 instances must equal the DE2380 value of DTM+Z34 from SG5. Medium confidence due to cross-SG group scoping — the message-wide fallback gives correct semantics here since we're correlating across SG5 and SG8 boundaries.",
      "description_hash": "d1833f5c",
      "is_external": false
    },
    "2002": {
      "confidence": "medium",
      "reasoning": "For each CCI+Z39 code (Zählzeitdefinition code, elements[2][0]) found in SG9 groups, at least 2 SG8 instances must have RFF+Z27 (elements[0][0]=Z27, elements[0][1]=code value) matching that code. Uses message-wide scan since navigator API does not expose a simple find-in-group method for non-child groups.",
      "description_hash": "21dab83e",
      "is_external": false
    },
    "36": {
      "confidence": "medium",
      "reasoning": "In the same SG8, SEQ+Z43 (Zählzeitdefinition) must be present and DTM+Z33 must have format code 401 at elements[0][2]. Counterpart to condition [29] for the 401 format code.",
      "description_hash": "d30c47ca",
      "is_external": false
    },
    "14": {
      "confidence": "medium",
      "reasoning": "When a Z82 (Faktor/Multiplikation) operator is present in a group of SG8s sharing the same Rechenschrittidentifikator and Zeitraum-ID, ALL members of that group must exclusively carry Z82 — no mixing with Z80/Z81. Returns True when this homogeneity constraint holds.",
      "description_hash": "b775c878",
      "is_external": false
    },
    "47": {
      "confidence": "high",
      "reasoning": "Same pattern as condition 46 but checks for format code 401 instead of 303. Both 303 and 401 are valid codes for DTM+Z44 per the segment reference.",
      "description_hash": "b6999cb1",
      "is_external": false
    },
    "58": {
      "confidence": "medium",
      "reasoning": "True when at least two SG6 RFF+Z49/Z53 instances exist with different DE1156 Zeitraum-IDs (i.e. min < max across all parsed integer IDs). This satisfies the 'smaller than another' ordering condition. Returns False for single-instance or equal-ID cases.",
      "description_hash": "4e255b62",
      "is_external": false
    },
    "933": {
      "confidence": "high",
      "reasoning": "Format condition: time portion HHMM of DTM value must equal 2300. This corresponds to 23:00 UTC (midnight CET during Central European Summer Time), the alternative German energy market day boundary used in summer. Uses validate_hhmm_equals on elements[0][1] of the DTM segment.",
      "description_hash": "b5e9c81e",
      "is_external": false
    },
    "9": {
      "confidence": "medium",
      "reasoning": "Checks that within each SG8 SEQ+Z37 instance, the RFF+Z23 reference value does not equal the current SG8's own SEQ DE1050 Rechenschrittidentifikator (no self-reference). Iterates all SG8 instances globally and returns False on first self-referential cycle detected.",
      "description_hash": "4046510e",
      "is_external": false
    },
    "502": {
      "confidence": "high",
      "reasoning": "Hinweis condition — informational annotation about using the Messlokation ID. Always applies unconditionally.",
      "description_hash": "d7954b75",
      "is_external": false
    },
    "491": {
      "confidence": "high",
      "reasoning": "Checks if the CCYYMMDD portion of the Nachrichtendatum (DTM+137) falls within the German winter time (MEZ/UTC+1) period per Tabelle Kapitel 3.6. Uses is_mez_utc helper which applies the EU DST rule.",
      "description_hash": "305e3493",
      "is_external": false
    },
    "7": {
      "confidence": "high",
      "reasoning": "Co-occurrence in the same SG8 instance: SEQ+Z37 (elements[0][0]==\"Z37\") AND RFF+Z19 (elements[0][0]==\"Z19\") must both be present. Uses any_group_has_co_occurrence with group path SG4.SG8.",
      "description_hash": "64f2bec9",
      "is_external": false
    },
    "522": {
      "confidence": "high",
      "reasoning": "Hinweis informational note — always returns True unconditionally.",
      "description_hash": "2f89522f",
      "is_external": false
    },
    "44": {
      "confidence": "medium",
      "reasoning": "RFF+Z27 (elements[0][1]) in SG8 holds the Zählzeitdefinition code per the segment reference. Collects all Z27 reference values message-wide and checks for duplicates. Returns True when all codes are distinct (unique), False when a duplicate exists, Unknown when no Z27 segments found. Group navigator would be needed to properly scope to SG5 boundaries — approximated as message-wide.",
      "description_hash": "8fec87d5",
      "is_external": false
    },
    "950": {
      "confidence": "high",
      "reasoning": "Format: Marktlokations-ID — 11 digits with Luhn check digit. Looks in LOC+Z16 element 1 component 0.",
      "description_hash": "a9ddfaec",
      "is_external": false
    },
    "62": {
      "confidence": "high",
      "reasoning": "Cannot determine the market role (MSB = Messstellenbetreiber) of a party from the NAD+MR ID alone — requires a market party registry lookup. Delegated to external condition provider.",
      "description_hash": "cf2a70c6",
      "is_external": true
    },
    "2004": {
      "confidence": "medium",
      "reasoning": "For each Zeitraum-ID from SG6 RFF+Z49 DE1156 (elements[0][2]), exactly one SG5 STS must reference it. STS+E01 (Status der Antwort) stores Zeitraum-ID at elements[2][3] (DE9012). STS+Z23 (Status der Berechnungsformel) stores it at elements[2][0] (DE9013). Checks count == 1 for each Zeitraum-ID.",
      "description_hash": "3cc9bfe9",
      "is_external": false
    },
    "520": {
      "confidence": "medium",
      "reasoning": "When format code 303 is used in DTM+Z45 DE2379, at least one DTM+Z45 DE2380 value must match a SG5 DTM+Z34 DE2380 value. Same pattern as 516 but for Z45.",
      "description_hash": "4f5d7811",
      "is_external": false
    },
    "509": {
      "confidence": "high",
      "reasoning": "Hinweis: informational annotation, always applies unconditionally",
      "description_hash": "b50b9651",
      "is_external": false
    },
    "964": {
      "confidence": "medium",
      "reasoning": "Format condition: HHMM >= 0000. Combined with condition 965 (HHMM <= 2359), together they validate a valid time range. Using validate_hhmm_range covering both bounds. Applied to DTM segment time value.",
      "description_hash": "aa3ada39",
      "is_external": false
    },
    "528": {
      "confidence": "high",
      "reasoning": "Hinweis condition — informational annotation, always returns True.",
      "description_hash": "a07166c1",
      "is_external": false
    },
    "2005": {
      "confidence": "medium",
      "reasoning": "Finds STS+E01 segments where DE9013 (Code des Prüfschritts, elements[2][0]) = 'A99' (Sonstiges), then collects Zeitraum-IDs from DE9012 (elements[2][3]). For each such ID, checks that exactly one SG8 RFF+Z46 (elements[0][1]) references it, confirming the annotated segment appears exactly once per qualifying Zeitraum-ID.",
      "description_hash": "095365c3",
      "is_external": false
    },
    "914": {
      "confidence": "medium",
      "reasoning": "Format condition: value must be strictly greater than 0. Applied to QTY value element; validate_numeric with '>' operator handles this directly.",
      "description_hash": "533e37f6",
      "is_external": false
    },
    "533": {
      "confidence": "high",
      "reasoning": "Hinweis: prefix indicates this is an informational annotation about cardinality — one segment per transmitted Zeitraum from the Berechnungsformel transmission. Not a boolean predicate; always True.",
      "description_hash": "7aa52f50",
      "is_external": false
    },
    "48": {
      "confidence": "high",
      "reasoning": "Checks that in the same SG8 group (Leistungskurvendefinition with SEQ+Z74), DTM+Z45 (Leistungskurvenänderungszeitpunkt) has format code 303. In Z74 SG8 groups the only DTM is Z45.",
      "description_hash": "fc52651b",
      "is_external": false
    },
    "59": {
      "confidence": "medium",
      "reasoning": "Cross-group Zeitraum-ID correlation: SG8 RFF+Z46 DE1154 (reference to Zeitraum-ID) must match a DE1156 value from SG6 RFF+Z49 (Verwendungszeitraum der Daten). Collects DE1156 values from all RFF+Z49 instances and checks whether any RFF+Z46 reference value matches. Returns Unknown when either set is empty.",
      "description_hash": "04a44c0d",
      "is_external": false
    },
    "504": {
      "confidence": "high",
      "reasoning": "Hinweis condition — informational annotation describing the value origin (BGM+Z55 DE1004 from the ORDERS message). Always applies unconditionally.",
      "description_hash": "36bbf34b",
      "is_external": false
    },
    "511": {
      "confidence": "medium",
      "reasoning": "Checks that no DTM+Z33 DE2380 value is repeated across SG8 instances. Collects all Z33 qualifier DTM segments and verifies uniqueness. Medium confidence because SG8-scoped iteration falls back to message-wide, which is correct here since each DTM+Z33 belongs to a distinct SG8.",
      "description_hash": "06f29fa9",
      "is_external": false
    },
    "530": {
      "confidence": "high",
      "reasoning": "Hinweis condition — informational annotation, always returns True.",
      "description_hash": "b7cc061b",
      "is_external": false
    },
    "534": {
      "confidence": "high",
      "reasoning": "Hinweis: prefix indicates this is an informational annotation about value origin — the value comes from SG5 IDE+24 DE7402 of the Berechnungsformel transmission. Not a boolean predicate; always True.",
      "description_hash": "e936f8bb",
      "is_external": false
    },
    "915": {
      "confidence": "medium",
      "reasoning": "Format condition: value must not equal 1. Applied to the QTY quantity value (element[0][1]) as this is the standard numeric data element in UTILTS. Medium confidence because the exact segment/element this applies to is inferred from context rather than stated explicitly.",
      "description_hash": "bbccfc5b",
      "is_external": false
    },
    "940": {
      "confidence": "high",
      "reasoning": "Format: must start with + followed only by digits — standard phone format check via validate_phone.",
      "description_hash": "de8363bc",
      "is_external": false
    },
    "24": {
      "confidence": "high",
      "reasoning": "Checks STS with Statuskategorie Z36 (Status der Nutzung von Definitionen, elements[0][0]) and Status Code Z45 (Definitionen werden verwendet, elements[1][0]).",
      "description_hash": "7936a6e8",
      "is_external": false
    },
    "521": {
      "confidence": "medium",
      "reasoning": "Incomplete condition text but follows the same pattern as 517 (DTM+Z44/401/'0000') but for DTM+Z45. Medium confidence due to incomplete specification.",
      "description_hash": "536d3978",
      "is_external": false
    },
    "43": {
      "confidence": "medium",
      "reasoning": "Uniqueness of Leistungskurvendefinition codes within an IDE (SG5 group). Mirrors condition 42 but targets DTM+Z45 (Leistungskurvenänderungszeitpunkt). Same caveat: the actual 'Code' element might live in a CCI/SEQ segment absent from the provided schema reference — medium confidence.",
      "description_hash": "e5848c11",
      "is_external": false
    },
    "5": {
      "confidence": "high",
      "reasoning": "Same-group absence pattern: in some SG8 instance RFF+Z19 (Messlokation reference, elements[0][0]==\"Z19\") is present AND SEQ+Z37 (Bestandteil des Rechenschritts, elements[0][0]==\"Z37\") is absent. Uses any_group_has_qualifier_without for same-SG8 presence+absence check.",
      "description_hash": "92e177d6",
      "is_external": false
    },
    "2006": {
      "confidence": "medium",
      "reasoning": "Finds STS+Z23 (Status der Berechnungsformel) where status code (elements[1][0]) = 'Z33' (formula attached), collects Zeitraum-IDs from DE9013 (elements[2][0]). For each such ID, checks that at least one SG8 RFF+Z46 (elements[0][1]) references it, confirming the calculation formula group appears at minimum once per qualifying Zeitraum-ID.",
      "description_hash": "2c5ec989",
      "is_external": false
    },
    "32": {
      "confidence": "medium",
      "reasoning": "Validates that SG8 change timestamps (Z33/Z44/Z45) are >= the SG5 DTM+Z34 validity start. 'Diesem DE' refers to the change-point timestamp being validated in SG8. First 12 characters (YYYYMMDDHHmm) are used for consistent lexicographic date comparison in format 303.",
      "description_hash": "82d7f5eb",
      "is_external": false
    },
    "46": {
      "confidence": "high",
      "reasoning": "Checks that in the same SG8 group instance (Schaltzeitdefinition), SEQ has qualifier Z73 AND DTM has elements[0][2]=='303' (format code 303). In Z73 SG8 groups the only DTM present is Z44 (Schaltzeitänderungszeitpunkt), so checking the format code without an additional qualifier filter is sufficient.",
      "description_hash": "d92b37c0",
      "is_external": false
    },
    "2001": {
      "confidence": "high",
      "reasoning": "This is a Hinweis/informational cardinality annotation stating the segment or segment group must appear exactly once. It describes structural requirements rather than a boolean predicate to evaluate at runtime. Always returns True.",
      "description_hash": "fad041fa",
      "is_external": false
    },
    "54": {
      "confidence": "high",
      "reasoning": "Same COM DE3155 check as condition 53 but for codes TE (Telephone), FX (Fax), AJ, and AL.",
      "description_hash": "6aac2a48",
      "is_external": false
    }
  }
}