// <auto-generated>
// Generated by automapper-generator generate-conditions
// AHB: xml-migs-and-ahbs/FV2504/UTILMD_AHB_Strom_2_1_Fehlerkorrektur_20250623.xml
// Generated: 2026-03-12T10:15:42Z
// </auto-generated>
#[allow(unused_imports)]
use crate::eval::format_validators::*;
use crate::eval::{ConditionEvaluator, ConditionResult, EvaluationContext};
/// Generated condition evaluator for UTILMD_Strom FV2504.
pub struct UtilmdStromConditionEvaluatorFV2504 {
// External condition IDs that require runtime context.
external_conditions: std::collections::HashSet<u32>,
}
impl Default for UtilmdStromConditionEvaluatorFV2504 {
fn default() -> Self {
let mut external_conditions = std::collections::HashSet::new();
external_conditions.insert(1);
external_conditions.insert(4);
external_conditions.insert(5);
external_conditions.insert(6);
external_conditions.insert(8);
external_conditions.insert(9);
external_conditions.insert(10);
external_conditions.insert(14);
external_conditions.insert(31);
external_conditions.insert(33);
external_conditions.insert(36);
external_conditions.insert(37);
external_conditions.insert(38);
external_conditions.insert(39);
external_conditions.insert(40);
external_conditions.insert(75);
external_conditions.insert(98);
external_conditions.insert(99);
external_conditions.insert(151);
external_conditions.insert(233);
external_conditions.insert(241);
external_conditions.insert(251);
external_conditions.insert(292);
external_conditions.insert(314);
external_conditions.insert(315);
external_conditions.insert(323);
external_conditions.insert(412);
external_conditions.insert(425);
external_conditions.insert(426);
external_conditions.insert(427);
external_conditions.insert(428);
external_conditions.insert(429);
external_conditions.insert(433);
external_conditions.insert(435);
external_conditions.insert(453);
external_conditions.insert(459);
external_conditions.insert(460);
external_conditions.insert(706);
external_conditions.insert(717);
external_conditions.insert(2011);
Self {
external_conditions,
}
}
}
impl ConditionEvaluator for UtilmdStromConditionEvaluatorFV2504 {
fn message_type(&self) -> &str {
"UTILMD_Strom"
}
fn format_version(&self) -> &str {
"FV2504"
}
fn evaluate(&self, condition: u32, ctx: &EvaluationContext) -> ConditionResult {
match condition {
1 => self.evaluate_1(ctx),
4 => self.evaluate_4(ctx),
5 => self.evaluate_5(ctx),
6 => self.evaluate_6(ctx),
7 => self.evaluate_7(ctx),
8 => self.evaluate_8(ctx),
9 => self.evaluate_9(ctx),
10 => self.evaluate_10(ctx),
11 => self.evaluate_11(ctx),
12 => self.evaluate_12(ctx),
13 => self.evaluate_13(ctx),
14 => self.evaluate_14(ctx),
15 => self.evaluate_15(ctx),
16 => self.evaluate_16(ctx),
17 => self.evaluate_17(ctx),
18 => self.evaluate_18(ctx),
19 => self.evaluate_19(ctx),
20 => self.evaluate_20(ctx),
21 => self.evaluate_21(ctx),
22 => self.evaluate_22(ctx),
23 => self.evaluate_23(ctx),
24 => self.evaluate_24(ctx),
25 => self.evaluate_25(ctx),
27 => self.evaluate_27(ctx),
30 => self.evaluate_30(ctx),
31 => self.evaluate_31(ctx),
32 => self.evaluate_32(ctx),
33 => self.evaluate_33(ctx),
34 => self.evaluate_34(ctx),
35 => self.evaluate_35(ctx),
36 => self.evaluate_36(ctx),
37 => self.evaluate_37(ctx),
38 => self.evaluate_38(ctx),
39 => self.evaluate_39(ctx),
40 => self.evaluate_40(ctx),
41 => self.evaluate_41(ctx),
42 => self.evaluate_42(ctx),
43 => self.evaluate_43(ctx),
44 => self.evaluate_44(ctx),
45 => self.evaluate_45(ctx),
46 => self.evaluate_46(ctx),
47 => self.evaluate_47(ctx),
48 => self.evaluate_48(ctx),
49 => self.evaluate_49(ctx),
50 => self.evaluate_50(ctx),
51 => self.evaluate_51(ctx),
52 => self.evaluate_52(ctx),
53 => self.evaluate_53(ctx),
54 => self.evaluate_54(ctx),
55 => self.evaluate_55(ctx),
56 => self.evaluate_56(ctx),
57 => self.evaluate_57(ctx),
58 => self.evaluate_58(ctx),
60 => self.evaluate_60(ctx),
61 => self.evaluate_61(ctx),
62 => self.evaluate_62(ctx),
63 => self.evaluate_63(ctx),
64 => self.evaluate_64(ctx),
65 => self.evaluate_65(ctx),
66 => self.evaluate_66(ctx),
67 => self.evaluate_67(ctx),
68 => self.evaluate_68(ctx),
69 => self.evaluate_69(ctx),
70 => self.evaluate_70(ctx),
71 => self.evaluate_71(ctx),
72 => self.evaluate_72(ctx),
73 => self.evaluate_73(ctx),
74 => self.evaluate_74(ctx),
75 => self.evaluate_75(ctx),
76 => self.evaluate_76(ctx),
77 => self.evaluate_77(ctx),
78 => self.evaluate_78(ctx),
83 => self.evaluate_83(ctx),
84 => self.evaluate_84(ctx),
85 => self.evaluate_85(ctx),
86 => self.evaluate_86(ctx),
87 => self.evaluate_87(ctx),
88 => self.evaluate_88(ctx),
89 => self.evaluate_89(ctx),
90 => self.evaluate_90(ctx),
91 => self.evaluate_91(ctx),
92 => self.evaluate_92(ctx),
93 => self.evaluate_93(ctx),
94 => self.evaluate_94(ctx),
95 => self.evaluate_95(ctx),
96 => self.evaluate_96(ctx),
97 => self.evaluate_97(ctx),
98 => self.evaluate_98(ctx),
99 => self.evaluate_99(ctx),
100 => self.evaluate_100(ctx),
101 => self.evaluate_101(ctx),
102 => self.evaluate_102(ctx),
103 => self.evaluate_103(ctx),
104 => self.evaluate_104(ctx),
105 => self.evaluate_105(ctx),
106 => self.evaluate_106(ctx),
107 => self.evaluate_107(ctx),
108 => self.evaluate_108(ctx),
110 => self.evaluate_110(ctx),
111 => self.evaluate_111(ctx),
112 => self.evaluate_112(ctx),
113 => self.evaluate_113(ctx),
114 => self.evaluate_114(ctx),
115 => self.evaluate_115(ctx),
116 => self.evaluate_116(ctx),
117 => self.evaluate_117(ctx),
118 => self.evaluate_118(ctx),
119 => self.evaluate_119(ctx),
120 => self.evaluate_120(ctx),
121 => self.evaluate_121(ctx),
122 => self.evaluate_122(ctx),
123 => self.evaluate_123(ctx),
124 => self.evaluate_124(ctx),
125 => self.evaluate_125(ctx),
126 => self.evaluate_126(ctx),
127 => self.evaluate_127(ctx),
128 => self.evaluate_128(ctx),
129 => self.evaluate_129(ctx),
130 => self.evaluate_130(ctx),
131 => self.evaluate_131(ctx),
132 => self.evaluate_132(ctx),
133 => self.evaluate_133(ctx),
134 => self.evaluate_134(ctx),
135 => self.evaluate_135(ctx),
136 => self.evaluate_136(ctx),
137 => self.evaluate_137(ctx),
138 => self.evaluate_138(ctx),
139 => self.evaluate_139(ctx),
140 => self.evaluate_140(ctx),
141 => self.evaluate_141(ctx),
142 => self.evaluate_142(ctx),
143 => self.evaluate_143(ctx),
144 => self.evaluate_144(ctx),
145 => self.evaluate_145(ctx),
146 => self.evaluate_146(ctx),
147 => self.evaluate_147(ctx),
148 => self.evaluate_148(ctx),
149 => self.evaluate_149(ctx),
150 => self.evaluate_150(ctx),
151 => self.evaluate_151(ctx),
152 => self.evaluate_152(ctx),
153 => self.evaluate_153(ctx),
156 => self.evaluate_156(ctx),
161 => self.evaluate_161(ctx),
162 => self.evaluate_162(ctx),
163 => self.evaluate_163(ctx),
164 => self.evaluate_164(ctx),
165 => self.evaluate_165(ctx),
166 => self.evaluate_166(ctx),
167 => self.evaluate_167(ctx),
170 => self.evaluate_170(ctx),
172 => self.evaluate_172(ctx),
173 => self.evaluate_173(ctx),
174 => self.evaluate_174(ctx),
175 => self.evaluate_175(ctx),
176 => self.evaluate_176(ctx),
177 => self.evaluate_177(ctx),
178 => self.evaluate_178(ctx),
179 => self.evaluate_179(ctx),
180 => self.evaluate_180(ctx),
184 => self.evaluate_184(ctx),
190 => self.evaluate_190(ctx),
191 => self.evaluate_191(ctx),
192 => self.evaluate_192(ctx),
193 => self.evaluate_193(ctx),
194 => self.evaluate_194(ctx),
195 => self.evaluate_195(ctx),
196 => self.evaluate_196(ctx),
197 => self.evaluate_197(ctx),
198 => self.evaluate_198(ctx),
199 => self.evaluate_199(ctx),
201 => self.evaluate_201(ctx),
202 => self.evaluate_202(ctx),
203 => self.evaluate_203(ctx),
204 => self.evaluate_204(ctx),
205 => self.evaluate_205(ctx),
206 => self.evaluate_206(ctx),
209 => self.evaluate_209(ctx),
210 => self.evaluate_210(ctx),
212 => self.evaluate_212(ctx),
213 => self.evaluate_213(ctx),
215 => self.evaluate_215(ctx),
216 => self.evaluate_216(ctx),
217 => self.evaluate_217(ctx),
219 => self.evaluate_219(ctx),
220 => self.evaluate_220(ctx),
221 => self.evaluate_221(ctx),
223 => self.evaluate_223(ctx),
224 => self.evaluate_224(ctx),
227 => self.evaluate_227(ctx),
229 => self.evaluate_229(ctx),
232 => self.evaluate_232(ctx),
233 => self.evaluate_233(ctx),
234 => self.evaluate_234(ctx),
237 => self.evaluate_237(ctx),
238 => self.evaluate_238(ctx),
239 => self.evaluate_239(ctx),
240 => self.evaluate_240(ctx),
241 => self.evaluate_241(ctx),
243 => self.evaluate_243(ctx),
244 => self.evaluate_244(ctx),
248 => self.evaluate_248(ctx),
249 => self.evaluate_249(ctx),
251 => self.evaluate_251(ctx),
252 => self.evaluate_252(ctx),
254 => self.evaluate_254(ctx),
255 => self.evaluate_255(ctx),
256 => self.evaluate_256(ctx),
257 => self.evaluate_257(ctx),
259 => self.evaluate_259(ctx),
261 => self.evaluate_261(ctx),
262 => self.evaluate_262(ctx),
265 => self.evaluate_265(ctx),
266 => self.evaluate_266(ctx),
267 => self.evaluate_267(ctx),
268 => self.evaluate_268(ctx),
269 => self.evaluate_269(ctx),
270 => self.evaluate_270(ctx),
273 => self.evaluate_273(ctx),
279 => self.evaluate_279(ctx),
280 => self.evaluate_280(ctx),
282 => self.evaluate_282(ctx),
284 => self.evaluate_284(ctx),
285 => self.evaluate_285(ctx),
286 => self.evaluate_286(ctx),
287 => self.evaluate_287(ctx),
288 => self.evaluate_288(ctx),
291 => self.evaluate_291(ctx),
292 => self.evaluate_292(ctx),
293 => self.evaluate_293(ctx),
294 => self.evaluate_294(ctx),
295 => self.evaluate_295(ctx),
296 => self.evaluate_296(ctx),
297 => self.evaluate_297(ctx),
298 => self.evaluate_298(ctx),
299 => self.evaluate_299(ctx),
300 => self.evaluate_300(ctx),
301 => self.evaluate_301(ctx),
302 => self.evaluate_302(ctx),
303 => self.evaluate_303(ctx),
304 => self.evaluate_304(ctx),
305 => self.evaluate_305(ctx),
306 => self.evaluate_306(ctx),
307 => self.evaluate_307(ctx),
309 => self.evaluate_309(ctx),
314 => self.evaluate_314(ctx),
315 => self.evaluate_315(ctx),
316 => self.evaluate_316(ctx),
317 => self.evaluate_317(ctx),
318 => self.evaluate_318(ctx),
321 => self.evaluate_321(ctx),
322 => self.evaluate_322(ctx),
323 => self.evaluate_323(ctx),
327 => self.evaluate_327(ctx),
329 => self.evaluate_329(ctx),
331 => self.evaluate_331(ctx),
332 => self.evaluate_332(ctx),
333 => self.evaluate_333(ctx),
334 => self.evaluate_334(ctx),
335 => self.evaluate_335(ctx),
336 => self.evaluate_336(ctx),
337 => self.evaluate_337(ctx),
338 => self.evaluate_338(ctx),
339 => self.evaluate_339(ctx),
340 => self.evaluate_340(ctx),
341 => self.evaluate_341(ctx),
342 => self.evaluate_342(ctx),
344 => self.evaluate_344(ctx),
345 => self.evaluate_345(ctx),
346 => self.evaluate_346(ctx),
347 => self.evaluate_347(ctx),
348 => self.evaluate_348(ctx),
349 => self.evaluate_349(ctx),
350 => self.evaluate_350(ctx),
351 => self.evaluate_351(ctx),
352 => self.evaluate_352(ctx),
355 => self.evaluate_355(ctx),
356 => self.evaluate_356(ctx),
357 => self.evaluate_357(ctx),
358 => self.evaluate_358(ctx),
359 => self.evaluate_359(ctx),
360 => self.evaluate_360(ctx),
363 => self.evaluate_363(ctx),
365 => self.evaluate_365(ctx),
366 => self.evaluate_366(ctx),
367 => self.evaluate_367(ctx),
368 => self.evaluate_368(ctx),
370 => self.evaluate_370(ctx),
371 => self.evaluate_371(ctx),
372 => self.evaluate_372(ctx),
373 => self.evaluate_373(ctx),
375 => self.evaluate_375(ctx),
376 => self.evaluate_376(ctx),
377 => self.evaluate_377(ctx),
378 => self.evaluate_378(ctx),
379 => self.evaluate_379(ctx),
380 => self.evaluate_380(ctx),
384 => self.evaluate_384(ctx),
386 => self.evaluate_386(ctx),
387 => self.evaluate_387(ctx),
388 => self.evaluate_388(ctx),
391 => self.evaluate_391(ctx),
392 => self.evaluate_392(ctx),
393 => self.evaluate_393(ctx),
394 => self.evaluate_394(ctx),
395 => self.evaluate_395(ctx),
396 => self.evaluate_396(ctx),
397 => self.evaluate_397(ctx),
398 => self.evaluate_398(ctx),
399 => self.evaluate_399(ctx),
401 => self.evaluate_401(ctx),
402 => self.evaluate_402(ctx),
403 => self.evaluate_403(ctx),
404 => self.evaluate_404(ctx),
405 => self.evaluate_405(ctx),
406 => self.evaluate_406(ctx),
407 => self.evaluate_407(ctx),
408 => self.evaluate_408(ctx),
409 => self.evaluate_409(ctx),
410 => self.evaluate_410(ctx),
411 => self.evaluate_411(ctx),
412 => self.evaluate_412(ctx),
413 => self.evaluate_413(ctx),
414 => self.evaluate_414(ctx),
415 => self.evaluate_415(ctx),
416 => self.evaluate_416(ctx),
417 => self.evaluate_417(ctx),
419 => self.evaluate_419(ctx),
420 => self.evaluate_420(ctx),
421 => self.evaluate_421(ctx),
425 => self.evaluate_425(ctx),
426 => self.evaluate_426(ctx),
427 => self.evaluate_427(ctx),
428 => self.evaluate_428(ctx),
429 => self.evaluate_429(ctx),
430 => self.evaluate_430(ctx),
431 => self.evaluate_431(ctx),
432 => self.evaluate_432(ctx),
433 => self.evaluate_433(ctx),
435 => self.evaluate_435(ctx),
436 => self.evaluate_436(ctx),
437 => self.evaluate_437(ctx),
438 => self.evaluate_438(ctx),
440 => self.evaluate_440(ctx),
441 => self.evaluate_441(ctx),
442 => self.evaluate_442(ctx),
444 => self.evaluate_444(ctx),
445 => self.evaluate_445(ctx),
446 => self.evaluate_446(ctx),
447 => self.evaluate_447(ctx),
448 => self.evaluate_448(ctx),
449 => self.evaluate_449(ctx),
450 => self.evaluate_450(ctx),
451 => self.evaluate_451(ctx),
452 => self.evaluate_452(ctx),
453 => self.evaluate_453(ctx),
454 => self.evaluate_454(ctx),
455 => self.evaluate_455(ctx),
456 => self.evaluate_456(ctx),
457 => self.evaluate_457(ctx),
458 => self.evaluate_458(ctx),
459 => self.evaluate_459(ctx),
460 => self.evaluate_460(ctx),
461 => self.evaluate_461(ctx),
462 => self.evaluate_462(ctx),
463 => self.evaluate_463(ctx),
465 => self.evaluate_465(ctx),
466 => self.evaluate_466(ctx),
467 => self.evaluate_467(ctx),
468 => self.evaluate_468(ctx),
469 => self.evaluate_469(ctx),
470 => self.evaluate_470(ctx),
471 => self.evaluate_471(ctx),
472 => self.evaluate_472(ctx),
473 => self.evaluate_473(ctx),
474 => self.evaluate_474(ctx),
475 => self.evaluate_475(ctx),
476 => self.evaluate_476(ctx),
477 => self.evaluate_477(ctx),
478 => self.evaluate_478(ctx),
479 => self.evaluate_479(ctx),
480 => self.evaluate_480(ctx),
481 => self.evaluate_481(ctx),
483 => self.evaluate_483(ctx),
484 => self.evaluate_484(ctx),
487 => self.evaluate_487(ctx),
489 => self.evaluate_489(ctx),
490 => self.evaluate_490(ctx),
491 => self.evaluate_491(ctx),
494 => self.evaluate_494(ctx),
500 => self.evaluate_500(ctx),
501 => self.evaluate_501(ctx),
502 => self.evaluate_502(ctx),
503 => self.evaluate_503(ctx),
504 => self.evaluate_504(ctx),
505 => self.evaluate_505(ctx),
506 => self.evaluate_506(ctx),
507 => self.evaluate_507(ctx),
508 => self.evaluate_508(ctx),
509 => self.evaluate_509(ctx),
510 => self.evaluate_510(ctx),
511 => self.evaluate_511(ctx),
512 => self.evaluate_512(ctx),
513 => self.evaluate_513(ctx),
514 => self.evaluate_514(ctx),
515 => self.evaluate_515(ctx),
516 => self.evaluate_516(ctx),
517 => self.evaluate_517(ctx),
518 => self.evaluate_518(ctx),
519 => self.evaluate_519(ctx),
520 => self.evaluate_520(ctx),
521 => self.evaluate_521(ctx),
522 => self.evaluate_522(ctx),
523 => self.evaluate_523(ctx),
524 => self.evaluate_524(ctx),
525 => self.evaluate_525(ctx),
526 => self.evaluate_526(ctx),
527 => self.evaluate_527(ctx),
528 => self.evaluate_528(ctx),
529 => self.evaluate_529(ctx),
530 => self.evaluate_530(ctx),
531 => self.evaluate_531(ctx),
532 => self.evaluate_532(ctx),
533 => self.evaluate_533(ctx),
555 => self.evaluate_555(ctx),
556 => self.evaluate_556(ctx),
558 => self.evaluate_558(ctx),
559 => self.evaluate_559(ctx),
563 => self.evaluate_563(ctx),
566 => self.evaluate_566(ctx),
567 => self.evaluate_567(ctx),
568 => self.evaluate_568(ctx),
569 => self.evaluate_569(ctx),
570 => self.evaluate_570(ctx),
572 => self.evaluate_572(ctx),
576 => self.evaluate_576(ctx),
577 => self.evaluate_577(ctx),
579 => self.evaluate_579(ctx),
580 => self.evaluate_580(ctx),
581 => self.evaluate_581(ctx),
586 => self.evaluate_586(ctx),
590 => self.evaluate_590(ctx),
594 => self.evaluate_594(ctx),
599 => self.evaluate_599(ctx),
601 => self.evaluate_601(ctx),
606 => self.evaluate_606(ctx),
609 => self.evaluate_609(ctx),
611 => self.evaluate_611(ctx),
614 => self.evaluate_614(ctx),
617 => self.evaluate_617(ctx),
618 => self.evaluate_618(ctx),
619 => self.evaluate_619(ctx),
621 => self.evaluate_621(ctx),
622 => self.evaluate_622(ctx),
623 => self.evaluate_623(ctx),
630 => self.evaluate_630(ctx),
631 => self.evaluate_631(ctx),
632 => self.evaluate_632(ctx),
637 => self.evaluate_637(ctx),
638 => self.evaluate_638(ctx),
639 => self.evaluate_639(ctx),
640 => self.evaluate_640(ctx),
641 => self.evaluate_641(ctx),
642 => self.evaluate_642(ctx),
643 => self.evaluate_643(ctx),
645 => self.evaluate_645(ctx),
646 => self.evaluate_646(ctx),
647 => self.evaluate_647(ctx),
648 => self.evaluate_648(ctx),
651 => self.evaluate_651(ctx),
653 => self.evaluate_653(ctx),
655 => self.evaluate_655(ctx),
659 => self.evaluate_659(ctx),
660 => self.evaluate_660(ctx),
662 => self.evaluate_662(ctx),
663 => self.evaluate_663(ctx),
664 => self.evaluate_664(ctx),
665 => self.evaluate_665(ctx),
667 => self.evaluate_667(ctx),
668 => self.evaluate_668(ctx),
670 => self.evaluate_670(ctx),
671 => self.evaluate_671(ctx),
672 => self.evaluate_672(ctx),
673 => self.evaluate_673(ctx),
674 => self.evaluate_674(ctx),
675 => self.evaluate_675(ctx),
677 => self.evaluate_677(ctx),
678 => self.evaluate_678(ctx),
679 => self.evaluate_679(ctx),
680 => self.evaluate_680(ctx),
682 => self.evaluate_682(ctx),
683 => self.evaluate_683(ctx),
684 => self.evaluate_684(ctx),
685 => self.evaluate_685(ctx),
687 => self.evaluate_687(ctx),
688 => self.evaluate_688(ctx),
689 => self.evaluate_689(ctx),
690 => self.evaluate_690(ctx),
693 => self.evaluate_693(ctx),
694 => self.evaluate_694(ctx),
695 => self.evaluate_695(ctx),
696 => self.evaluate_696(ctx),
698 => self.evaluate_698(ctx),
699 => self.evaluate_699(ctx),
700 => self.evaluate_700(ctx),
704 => self.evaluate_704(ctx),
705 => self.evaluate_705(ctx),
706 => self.evaluate_706(ctx),
707 => self.evaluate_707(ctx),
708 => self.evaluate_708(ctx),
709 => self.evaluate_709(ctx),
710 => self.evaluate_710(ctx),
711 => self.evaluate_711(ctx),
712 => self.evaluate_712(ctx),
713 => self.evaluate_713(ctx),
714 => self.evaluate_714(ctx),
715 => self.evaluate_715(ctx),
716 => self.evaluate_716(ctx),
717 => self.evaluate_717(ctx),
718 => self.evaluate_718(ctx),
719 => self.evaluate_719(ctx),
902 => self.evaluate_902(ctx),
910 => self.evaluate_910(ctx),
914 => self.evaluate_914(ctx),
922 => self.evaluate_922(ctx),
926 => self.evaluate_926(ctx),
930 => self.evaluate_930(ctx),
931 => self.evaluate_931(ctx),
932 => self.evaluate_932(ctx),
933 => self.evaluate_933(ctx),
937 => self.evaluate_937(ctx),
938 => self.evaluate_938(ctx),
939 => self.evaluate_939(ctx),
940 => self.evaluate_940(ctx),
942 => self.evaluate_942(ctx),
943 => self.evaluate_943(ctx),
946 => self.evaluate_946(ctx),
948 => self.evaluate_948(ctx),
950 => self.evaluate_950(ctx),
951 => self.evaluate_951(ctx),
952 => self.evaluate_952(ctx),
955 => self.evaluate_955(ctx),
957 => self.evaluate_957(ctx),
960 => self.evaluate_960(ctx),
961 => self.evaluate_961(ctx),
967 => self.evaluate_967(ctx),
2001 => self.evaluate_2001(ctx),
2002 => self.evaluate_2002(ctx),
2003 => self.evaluate_2003(ctx),
2004 => self.evaluate_2004(ctx),
2005 => self.evaluate_2005(ctx),
2006 => self.evaluate_2006(ctx),
2007 => self.evaluate_2007(ctx),
2008 => self.evaluate_2008(ctx),
2009 => self.evaluate_2009(ctx),
2010 => self.evaluate_2010(ctx),
2011 => self.evaluate_2011(ctx),
2012 => self.evaluate_2012(ctx),
2013 => self.evaluate_2013(ctx),
2014 => self.evaluate_2014(ctx),
2015 => self.evaluate_2015(ctx),
2016 => self.evaluate_2016(ctx),
2017 => self.evaluate_2017(ctx),
2018 => self.evaluate_2018(ctx),
2060 => self.evaluate_2060(ctx),
2061 => self.evaluate_2061(ctx),
2071 => self.evaluate_2071(ctx),
2073 => self.evaluate_2073(ctx),
2075 => self.evaluate_2075(ctx),
2080 => self.evaluate_2080(ctx),
2095 => self.evaluate_2095(ctx),
2096 => self.evaluate_2096(ctx),
2119 => self.evaluate_2119(ctx),
2140 => self.evaluate_2140(ctx),
2182 => self.evaluate_2182(ctx),
2183 => self.evaluate_2183(ctx),
2207 => self.evaluate_2207(ctx),
2225 => self.evaluate_2225(ctx),
2236 => self.evaluate_2236(ctx),
2252 => self.evaluate_2252(ctx),
2261 => self.evaluate_2261(ctx),
2284 => self.evaluate_2284(ctx),
2286 => self.evaluate_2286(ctx),
2287 => self.evaluate_2287(ctx),
2288 => self.evaluate_2288(ctx),
2307 => self.evaluate_2307(ctx),
2308 => self.evaluate_2308(ctx),
2309 => self.evaluate_2309(ctx),
2310 => self.evaluate_2310(ctx),
2311 => self.evaluate_2311(ctx),
2312 => self.evaluate_2312(ctx),
2313 => self.evaluate_2313(ctx),
2317 => self.evaluate_2317(ctx),
2318 => self.evaluate_2318(ctx),
2344 => self.evaluate_2344(ctx),
2350 => self.evaluate_2350(ctx),
2351 => self.evaluate_2351(ctx),
2352 => self.evaluate_2352(ctx),
2356 => self.evaluate_2356(ctx),
2357 => self.evaluate_2357(ctx),
2358 => self.evaluate_2358(ctx),
2359 => self.evaluate_2359(ctx),
2360 => self.evaluate_2360(ctx),
2361 => self.evaluate_2361(ctx),
_ => ConditionResult::Unknown,
}
}
fn is_external(&self, condition: u32) -> bool {
self.external_conditions.contains(&condition)
}
fn is_known(&self, condition: u32) -> bool {
matches!(
condition,
1 | 4
| 5
| 6
| 7
| 8
| 9
| 10
| 11
| 12
| 13
| 14
| 15
| 16
| 17
| 18
| 19
| 20
| 21
| 22
| 23
| 24
| 25
| 27
| 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
| 60
| 61
| 62
| 63
| 64
| 65
| 66
| 67
| 68
| 69
| 70
| 71
| 72
| 73
| 74
| 75
| 76
| 77
| 78
| 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
| 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
| 156
| 161
| 162
| 163
| 164
| 165
| 166
| 167
| 170
| 172
| 173
| 174
| 175
| 176
| 177
| 178
| 179
| 180
| 184
| 190
| 191
| 192
| 193
| 194
| 195
| 196
| 197
| 198
| 199
| 201
| 202
| 203
| 204
| 205
| 206
| 209
| 210
| 212
| 213
| 215
| 216
| 217
| 219
| 220
| 221
| 223
| 224
| 227
| 229
| 232
| 233
| 234
| 237
| 238
| 239
| 240
| 241
| 243
| 244
| 248
| 249
| 251
| 252
| 254
| 255
| 256
| 257
| 259
| 261
| 262
| 265
| 266
| 267
| 268
| 269
| 270
| 273
| 279
| 280
| 282
| 284
| 285
| 286
| 287
| 288
| 291
| 292
| 293
| 294
| 295
| 296
| 297
| 298
| 299
| 300
| 301
| 302
| 303
| 304
| 305
| 306
| 307
| 309
| 314
| 315
| 316
| 317
| 318
| 321
| 322
| 323
| 327
| 329
| 331
| 332
| 333
| 334
| 335
| 336
| 337
| 338
| 339
| 340
| 341
| 342
| 344
| 345
| 346
| 347
| 348
| 349
| 350
| 351
| 352
| 355
| 356
| 357
| 358
| 359
| 360
| 363
| 365
| 366
| 367
| 368
| 370
| 371
| 372
| 373
| 375
| 376
| 377
| 378
| 379
| 380
| 384
| 386
| 387
| 388
| 391
| 392
| 393
| 394
| 395
| 396
| 397
| 398
| 399
| 401
| 402
| 403
| 404
| 405
| 406
| 407
| 408
| 409
| 410
| 411
| 412
| 413
| 414
| 415
| 416
| 417
| 419
| 420
| 421
| 425
| 426
| 427
| 428
| 429
| 430
| 431
| 432
| 433
| 435
| 436
| 437
| 438
| 440
| 441
| 442
| 444
| 445
| 446
| 447
| 448
| 449
| 450
| 451
| 452
| 453
| 454
| 455
| 456
| 457
| 458
| 459
| 460
| 461
| 462
| 463
| 465
| 466
| 467
| 468
| 469
| 470
| 471
| 472
| 473
| 474
| 475
| 476
| 477
| 478
| 479
| 480
| 481
| 483
| 484
| 487
| 489
| 490
| 491
| 494
| 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
| 555
| 556
| 558
| 559
| 563
| 566
| 567
| 568
| 569
| 570
| 572
| 576
| 577
| 579
| 580
| 581
| 586
| 590
| 594
| 599
| 601
| 606
| 609
| 611
| 614
| 617
| 618
| 619
| 621
| 622
| 623
| 630
| 631
| 632
| 637
| 638
| 639
| 640
| 641
| 642
| 643
| 645
| 646
| 647
| 648
| 651
| 653
| 655
| 659
| 660
| 662
| 663
| 664
| 665
| 667
| 668
| 670
| 671
| 672
| 673
| 674
| 675
| 677
| 678
| 679
| 680
| 682
| 683
| 684
| 685
| 687
| 688
| 689
| 690
| 693
| 694
| 695
| 696
| 698
| 699
| 700
| 704
| 705
| 706
| 707
| 708
| 709
| 710
| 711
| 712
| 713
| 714
| 715
| 716
| 717
| 718
| 719
| 902
| 910
| 914
| 922
| 926
| 930
| 931
| 932
| 933
| 937
| 938
| 939
| 940
| 942
| 943
| 946
| 948
| 950
| 951
| 952
| 955
| 957
| 960
| 961
| 967
| 2001
| 2002
| 2003
| 2004
| 2005
| 2006
| 2007
| 2008
| 2009
| 2010
| 2011
| 2012
| 2013
| 2014
| 2015
| 2016
| 2017
| 2018
| 2060
| 2061
| 2071
| 2073
| 2075
| 2080
| 2095
| 2096
| 2119
| 2140
| 2182
| 2183
| 2207
| 2225
| 2236
| 2252
| 2261
| 2284
| 2286
| 2287
| 2288
| 2307
| 2308
| 2309
| 2310
| 2311
| 2312
| 2313
| 2317
| 2318
| 2344
| 2350
| 2351
| 2352
| 2356
| 2357
| 2358
| 2359
| 2360
| 2361
)
}
}
impl UtilmdStromConditionEvaluatorFV2504 {
/// [2006] Segmentgruppe ist genau einmal für jede SG8 SEQ+Z01 (Daten der Marktlokation) anzugeben, bei der die Bedingung [199] an der Segmentgruppe erfüllt ist. Dabei ist die selbe Zeitraum-ID im nachfolge...
// REVIEW: Counts SG8 instances with SEQ+Z01 where condition [199] is fulfilled and collects their Zeitraum-IDs from SEQ elements[1][0]. Returns True if at least one qualifying parent exists (cardinality enforcement is partial — full 'exactly once' check requires knowing the current SG type). The recursive call self.evaluate(199, ctx) operates at message scope, which is the best available approximation. (medium confidence)
fn evaluate_2006(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator() {
Some(n) => n,
None => return ConditionResult::Unknown,
};
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
let mut qualifying_zeitraum_ids: Vec<String> = Vec::new();
for i in 0..sg8_count {
let seq_segs = nav.find_segments_in_group("SEQ", &["SG4", "SG8"], i);
let is_z01 = seq_segs.iter().any(|s| {
s.elements
.first()
.and_then(|e| e.first())
.is_some_and(|v| v == "Z01")
});
if is_z01 && matches!(self.evaluate(199, ctx), ConditionResult::True) {
for seq in &seq_segs {
if seq
.elements
.first()
.and_then(|e| e.first())
.is_some_and(|v| v == "Z01")
{
if let Some(zid) = seq.elements.get(1).and_then(|e| e.first()) {
if !zid.is_empty() {
qualifying_zeitraum_ids.push(zid.clone());
}
}
}
}
}
}
if qualifying_zeitraum_ids.is_empty() {
return ConditionResult::Unknown;
}
ConditionResult::True
}
/// [2007] Segmentgruppe ist genau einmal für jede SG8 SEQ+Z01 (Daten der Marktlokation) anzugeben, bei der die Bedingungen [199] an der Segmentgruppe erfüllt ist. Dabei ist die selbe Zeitraum-ID im nachfol...
// REVIEW: Semantically identical to [2006] — 'Bedingungen' (plural) vs 'Bedingung' (singular) is a grammatical variation with no functional difference. Same logic: collects qualifying SG8 SEQ+Z01 Zeitraum-IDs where condition [199] is fulfilled. Recursive call self.evaluate(199, ctx) operates at message scope. (medium confidence)
fn evaluate_2007(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator() {
Some(n) => n,
None => return ConditionResult::Unknown,
};
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
let mut qualifying_zeitraum_ids: Vec<String> = Vec::new();
for i in 0..sg8_count {
let seq_segs = nav.find_segments_in_group("SEQ", &["SG4", "SG8"], i);
let is_z01 = seq_segs.iter().any(|s| {
s.elements
.first()
.and_then(|e| e.first())
.is_some_and(|v| v == "Z01")
});
if is_z01 && matches!(self.evaluate(199, ctx), ConditionResult::True) {
for seq in &seq_segs {
if seq
.elements
.first()
.and_then(|e| e.first())
.is_some_and(|v| v == "Z01")
{
if let Some(zid) = seq.elements.get(1).and_then(|e| e.first()) {
if !zid.is_empty() {
qualifying_zeitraum_ids.push(zid.clone());
}
}
}
}
}
}
if qualifying_zeitraum_ids.is_empty() {
return ConditionResult::Unknown;
}
ConditionResult::True
}
/// [2008] Segmentgruppe ist genau einmal für jede SG8 SEQ+Z01 (Daten der Marktlokation) anzugeben, bei der die Bedingung [89] an der Segmentgruppe erfüllt ist. Dabei ist die selbe Zeitraum-ID im nachfolgen...
// REVIEW: Same structure as [2006/2007] but references condition [89] instead of [199]. Counts qualifying SG8 SEQ+Z01 instances where condition [89] is fulfilled and collects their Zeitraum-IDs from SEQ elements[1][0]. The recursive self.evaluate(89, ctx) call operates at message scope. (medium confidence)
fn evaluate_2008(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator() {
Some(n) => n,
None => return ConditionResult::Unknown,
};
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
let mut qualifying_zeitraum_ids: Vec<String> = Vec::new();
for i in 0..sg8_count {
let seq_segs = nav.find_segments_in_group("SEQ", &["SG4", "SG8"], i);
let is_z01 = seq_segs.iter().any(|s| {
s.elements
.first()
.and_then(|e| e.first())
.is_some_and(|v| v == "Z01")
});
if is_z01 && matches!(self.evaluate(89, ctx), ConditionResult::True) {
for seq in &seq_segs {
if seq
.elements
.first()
.and_then(|e| e.first())
.is_some_and(|v| v == "Z01")
{
if let Some(zid) = seq.elements.get(1).and_then(|e| e.first()) {
if !zid.is_empty() {
qualifying_zeitraum_ids.push(zid.clone());
}
}
}
}
}
}
if qualifying_zeitraum_ids.is_empty() {
return ConditionResult::Unknown;
}
ConditionResult::True
}
/// [2009] Segmentgruppe ist genau einmal für jede SG8 SEQ+Z01 (Daten der Marktlokation) anzugeben, bei der die Bedingungen [89] an der Segmentgruppe erfüllt ist. Dabei ist die selbe Zeitraum-ID im nachfolg...
// REVIEW: Semantically identical to [2008] — 'Bedingungen' (plural) vs 'Bedingung' (singular) is a grammatical variation. Same logic: collects qualifying SG8 SEQ+Z01 Zeitraum-IDs where condition [89] is fulfilled. Recursive call self.evaluate(89, ctx) operates at message scope. (medium confidence)
fn evaluate_2009(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator() {
Some(n) => n,
None => return ConditionResult::Unknown,
};
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
let mut qualifying_zeitraum_ids: Vec<String> = Vec::new();
for i in 0..sg8_count {
let seq_segs = nav.find_segments_in_group("SEQ", &["SG4", "SG8"], i);
let is_z01 = seq_segs.iter().any(|s| {
s.elements
.first()
.and_then(|e| e.first())
.is_some_and(|v| v == "Z01")
});
if is_z01 && matches!(self.evaluate(89, ctx), ConditionResult::True) {
for seq in &seq_segs {
if seq
.elements
.first()
.and_then(|e| e.first())
.is_some_and(|v| v == "Z01")
{
if let Some(zid) = seq.elements.get(1).and_then(|e| e.first()) {
if !zid.is_empty() {
qualifying_zeitraum_ids.push(zid.clone());
}
}
}
}
}
}
if qualifying_zeitraum_ids.is_empty() {
return ConditionResult::Unknown;
}
ConditionResult::True
}
/// [1] Wenn Aufteilung vorhanden
fn evaluate_1(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("message_splitting")
}
/// [4] Wenn MP-ID in SG2 NAD+MR (Nachrichtenempfänger) in der Rolle LF
fn evaluate_4(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("recipient_is_lf")
}
/// [5] Wenn MP-ID in SG2 NAD+MS (Nachrichtenabsender) in der Rolle LF
fn evaluate_5(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("sender_is_lf")
}
/// [6] Wenn MP-ID in SG2 NAD+MR (Nachrichtenempfänger) in der Rolle ÜNB
fn evaluate_6(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("recipient_role_check")
}
/// [7] Wenn SG4 STS+7++ZG9/ZH1/ZH2 (Transaktionsgrund: Aufhebung einer zukünftigen Zuordnung wegen Auszug des Kunden / -wegen Stilllegung / -wegen aufgehobenem Vertragsverhältnis) vorhanden
fn evaluate_7(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [8] Wenn für Datenclearing erforderlich
fn evaluate_8(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("data_clearing_required")
}
/// [9] Wenn MP-ID in SG2 NAD+MS (Nachrichtenabsender) in der Rolle MSB
fn evaluate_9(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("sender_role_check")
}
/// [10] Wenn SG4 STS+7++xxx+xxx+E01/E03 (Transaktionsgrund befristete Anmeldung) vorhanden
fn evaluate_10(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("registration_is_time_limited")
}
/// [11] Wenn SG4 STS+7++ZG9/ZH1/ZH2 (Transaktionsgrund: Aufhebung einer zukünftigen Zuordnung wegen Auszug des Kunden / -wegen Stilllegung / -wegen aufgehobenem Vertragsverhältnis) nicht vorhanden
fn evaluate_11(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [12] Wenn SG4 DTM+471 (Ende zum nächstmöglichem Termin) nicht vorhanden
fn evaluate_12(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [13] Wenn SG4 STS+E01++Z01 (Status der Antwort: Zustimmung mit Terminänderung) nicht vorhanden
fn evaluate_13(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [14] Wenn Datum bekannt
fn evaluate_14(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("date_known")
}
/// [15] Wenn in derselben SG8 das SEQ+Z98 (Informative Daten der Marktlokation) vorhanden
fn evaluate_15(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [16] Wenn SG4 STS+E01++Z12 (Status der Antwort: Ablehnung Vertragsbindung) vorhanden
fn evaluate_16(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [17] Wenn in derselben SG8 das SEQ+Z01/Z80/Z81 (Daten der Marktlokation) vorhanden
fn evaluate_17(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [18] Wenn SG4 DTM+93 (Ende zum) nicht vorhanden
fn evaluate_18(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [19] Wenn SG8 SEQ+Z01/ Z98 (Daten der Marktlokation) SG10 CCI+++ZC0 (Prognose auf Basis von Werten) vorhanden
fn evaluate_19(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [20] Wenn SG8 SEQ+Z01 (Daten der Marktlokation) SG10 CCI+Z30++Z07 (Verbrauch) vorhanden
fn evaluate_20(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [21] Wenn SG10 CCI+++ZA6 (Prognose auf Basis von Profilen) in dieser SG8 vorhanden
fn evaluate_21(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [22] Es ist die Zeitraum-ID vom DE1156 aus einem passenden SG6 RFF+Z47/ Z48/ Z49 (Verwendungszeitraum der Daten) einzutragen
// REVIEW: Checks if any SG6 RFF+Z47/Z48/Z49 Zeitraum-ID (DE1156 at elements[0][2]) matches any SG8 SEQ Zeitraum-ID reference (DE1050 at elements[1][0]). Uses groups_share_qualified_value for cross-group correlation across all three qualifying codes. (medium confidence)
fn evaluate_22(&self, ctx: &EvaluationContext) -> ConditionResult {
for qual in &["Z47", "Z48", "Z49"] {
if matches!(
ctx.groups_share_qualified_value(
"RFF",
0,
qual,
0,
2,
&["SG4", "SG6"],
"SEQ",
1,
0,
&["SG4", "SG8"],
),
ConditionResult::True
) {
return ConditionResult::True;
}
}
ConditionResult::False
}
/// [23] Wenn in dieser SG4 das STS+E01++A05/A99 (Status der Antwort) vorhanden
fn evaluate_23(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [24] Wenn in dieser SG4 das STS+E01++A25/A99 (Status der Antwort) vorhanden
fn evaluate_24(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [25] Wenn die Veräußerungsform der erzeugenden Marktlokation der Marktprämie zugeordnet ist
fn evaluate_25(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [27] Wenn das DE2380 von SG4 DTM+Z01 (Kündigungsfrist des Vertrags) an vierter Stelle ein T oder R enthält
fn evaluate_27(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [30] Wenn Antwort auf Aktivierung übermittelt wird
fn evaluate_30(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [31] Wenn eine Korrektur erfolgt
fn evaluate_31(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("correction_in_progress")
}
/// [32] Wenn mehr als ein SG8 (Referenz auf die Lokationsbündelstruktur) vorhanden
fn evaluate_32(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [33] Wenn in einer SG8 SEQ+Z79 im PIA+5 (Erforderliches Produkt) DE7140 ein Produkt-Code genannt ist, der in der Codeliste der Konfigurationen im Kapitel 6 \"Produkte zur Bestellung / Änderung von Date...
fn evaluate_33(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("code_list_membership_check")
}
/// [34] Wenn Antwort auf Deaktivierung übermittelt wird
fn evaluate_34(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [35] Wenn das DE2380 von SG4 DTM+Z01 (Kündigungsfrist des Vertrags) an vierter Stelle T (Termin) enthält
fn evaluate_35(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [36] Wenn in derselben SG8 SEQ+Z79 im PIA+5 (Erforderliches Produkt) DE7140 ein Produkt-Code genannt ist, der in der Codeliste der Konfigurationen im Kapitel 6.1 \"Anmeldung einer Zuordnung des LFN (UTI...
fn evaluate_36(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("code_list_membership_check")
}
/// [37] Wenn Anmeldung/ Änderung befristet
fn evaluate_37(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("registration_is_time_limited")
}
/// [38] Es sind nur die Code der Produkteigenschaft zu dem in derselben SG8 SEQ+Z79 im PIA+5 (Erforderliches Produkt) DE7140 erlaubt, die in der Codeliste der Konfigurationen im Kapitel 6.1 \"Anmeldung ei...
fn evaluate_38(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("code_list_membership_check")
}
/// [39] Wenn in derselben SG8 SEQ+Z79 m PIA+5 (Erforderliches Produkt) DE7140 ein Produkt-Code genannt ist, der in der Codeliste der Konfigurationen im Kapitel 6.1 \"Anmeldung einer Zuordnung des LFN (UTIL...
fn evaluate_39(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("code_list_membership_check")
}
/// [40] Es ist nur der Wertebereich erlaubt, der zu dem in derselben SG8 SEQ+Z79 im PIA+5 (Erforderliches Produkt) DE7140 genannten Produkt, das in der Codeliste der Konfigurationen im Kapitel 6.1 \"Anmeld...
fn evaluate_40(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("code_list_membership_check")
}
/// [41] Es ist eine Produktpaket-ID aus dem DE1050 von einem SG8 SEQ+Z79 (Erforderliches Produkt) zu nennen
fn evaluate_41(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [42] Wenn mehr als ein SG8 SEQ+ZH0 (Priorisierung erforderliches Produktpaket) vorhanden
fn evaluate_42(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [43] Wenn in dieser SG4 das STS+E01++A12 / A13 (Status der Antwort) vorhanden
fn evaluate_43(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [44] Es ist die Zeitraum-ID vom DE1156 aus einem passenden SG6 RFF+Z49/ Z53 (Verwendungszeitraum der Daten: "Gültige Daten", "Keine Daten") aus der Anfragennachricht aus SG6 RFF+TN DE1154 ((Referenz Vo...
fn evaluate_44(&self, _ctx: &EvaluationContext) -> ConditionResult {
// Hinweis: Zeitraum-ID aus passendem SG6 RFF+Z49/Z53 der Anfragenachricht eintragen — informational data population rule
ConditionResult::True
}
/// [45] Wenn in derselben SG8 das SG10 CCI+Z01++Z82 (Verwendungsumfang: ID der prozessual behandelten Messlokation) vorhanden
fn evaluate_45(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [46] Wenn ID für Objekt vergeben wurde
fn evaluate_46(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [47] Wenn SG10 CCI+15++Z21 (Summenzeitreihentyp) CAV+DBA/ VZR/ EGS/ LGS/ SLS/ SES/ TLS/ TES/ BIL/ BIP/ BIT/ GAL/ GAP/ GAT/ GEL/ GEP/ GET/ SOL/ SOP/ SOT/ WFL/ WFP/ WFT/ WNL/ WNP/ WNT vorhanden
// REVIEW: Iterates all SG8 instances and their SG10 children looking for CCI with elements[0][0]=="15" and elements[2][0]=="Z21" (Zeitreihentyp), then checks if the same SG10 has a CAV with elements[0][0] in the Summenzeitreihentyp code list. Uses navigator for parent-child group traversal. (medium confidence)
fn evaluate_47(&self, ctx: &EvaluationContext) -> ConditionResult {
const CODES: &[&str] = &[
"DBA", "VZR", "EGS", "LGS", "SLS", "SES", "TLS", "TES", "BIL", "BIP", "BIT", "GAL",
"GAP", "GAT", "GEL", "GEP", "GET", "SOL", "SOP", "SOT", "WFL", "WFP", "WFT", "WNL",
"WNP", "WNT",
];
let nav = match ctx.navigator {
Some(n) => n,
None => return ConditionResult::Unknown,
};
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
for i in 0..sg8_count {
let sg10_count = nav.child_group_instance_count(&["SG4", "SG8"], i, "SG10");
for j in 0..sg10_count {
let ccis = nav.find_segments_in_child_group("CCI", &["SG4", "SG8"], i, "SG10", j);
let has_cci_15_z21 = ccis.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "15")
&& s.elements
.get(2)
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "Z21")
});
if has_cci_15_z21 {
let cavs =
nav.find_segments_in_child_group("CAV", &["SG4", "SG8"], i, "SG10", j);
if cavs.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| CODES.contains(&v.as_str()))
}) {
return ConditionResult::True;
}
}
}
}
ConditionResult::False
}
/// [48] Wenn in dieser SG4 das STS+E01++A99 (Status der Antwort: Sonstiges) vorhanden
fn evaluate_48(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [49] Wenn in dieser SG4 das STS+E01++E14 (Status der Antwort: Ablehnung Sonstiges) vorhanden
fn evaluate_49(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [50] Wenn kein SG8 SEQ+ZE7 (Informative Daten der Tranche) mit derselben Zeitraum-ID im DE1050 auf die gleiche Marktlokation-ID mit dem RFF+Z18 (Marktlokation) referenziert wie dieses SG8 SEQ+Z98 (Infor...
// REVIEW: Collects (Zeitraum-ID from SEQ.elements[1][0], Marktlok-ID from sibling RFF+Z18.elements[0][1]) for all SG8 instances with SEQ+Z98 and SEQ+ZE7. Returns True if any Z98 group has no ZE7 group matching on both values. Uses collect_group_values with instance-index correlation via HashMap, assuming each SG8 has at most one SEQ (guaranteed as entry segment) and the zip ordering is stable. (medium confidence)
fn evaluate_50(&self, ctx: &EvaluationContext) -> ConditionResult {
use std::collections::HashMap;
let seq_quals = ctx.collect_group_values("SEQ", 0, 0, &["SG4", "SG8"]);
let seq_zeitraum = ctx.collect_group_values("SEQ", 1, 0, &["SG4", "SG8"]);
let rff_quals = ctx.collect_group_values("RFF", 0, 0, &["SG4", "SG8"]);
let rff_ids = ctx.collect_group_values("RFF", 0, 1, &["SG4", "SG8"]);
// Build per-instance RFF lookup: instance_idx -> list of (qualifier, id)
let mut rff_by_instance: HashMap<usize, Vec<(String, String)>> = HashMap::new();
for ((idx, q), (_, id)) in rff_quals.iter().zip(rff_ids.iter()) {
rff_by_instance
.entry(*idx)
.or_default()
.push((q.clone(), id.clone()));
}
// Build (zeitraum_id, marktlok_id) for Z98 and ZE7 SG8 instances
let mut seq_zeitraum_map: HashMap<usize, String> = HashMap::new();
for (idx, z) in &seq_zeitraum {
seq_zeitraum_map.insert(*idx, z.clone());
}
let z98_data: Vec<(String, String)> = seq_quals
.iter()
.filter(|(_, q)| q == "Z98")
.map(|(idx, _)| {
let zeitraum = seq_zeitraum_map.get(idx).cloned().unwrap_or_default();
let marktlok = rff_by_instance
.get(idx)
.and_then(|rffs| rffs.iter().find(|(q, _)| q == "Z18"))
.map(|(_, id)| id.clone())
.unwrap_or_default();
(zeitraum, marktlok)
})
.collect();
if z98_data.is_empty() {
return ConditionResult::Unknown;
}
let ze7_data: Vec<(String, String)> = seq_quals
.iter()
.filter(|(_, q)| q == "ZE7")
.map(|(idx, _)| {
let zeitraum = seq_zeitraum_map.get(idx).cloned().unwrap_or_default();
let marktlok = rff_by_instance
.get(idx)
.and_then(|rffs| rffs.iter().find(|(q, _)| q == "Z18"))
.map(|(_, id)| id.clone())
.unwrap_or_default();
(zeitraum, marktlok)
})
.collect();
ConditionResult::from(z98_data.iter().any(|(z98_zeit, z98_lok)| {
!ze7_data
.iter()
.any(|(ze7_zeit, ze7_lok)| ze7_zeit == z98_zeit && ze7_lok == z98_lok)
}))
}
/// [51] Wenn die Marktlokations-ID im SG8 RFF+Z18 derselben SG8 SEQ+Z98 (Informative Daten der Marktlokation) mit derselben Zeitraum-ID im DE1050 nicht auf ein SG8 SEQ+Z78 (Referenz auf die Lokationsbünde...
// REVIEW: Condition is True when no Z98 SG8 (Informative Daten der Marktlokation) references — via matching Zeitraum-ID in SEQ.C286.DE1050 — a Z78 SG8 (Referenz auf Lokationsbündelstruktur) that carries the pauschal bundle code 9992000000018 in RFF+Z31.DE1154. Requires navigator for cross-SG8 Zeitraum-ID correlation. (medium confidence)
fn evaluate_51(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator() {
Some(n) => n,
None => return ConditionResult::Unknown,
};
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
let pauschal_id = "9992000000018";
// Collect Zeitraum-IDs from Z78 SG8s that carry the pauschal RFF+Z31 ID
let mut pauschal_zeitraum_ids: Vec<String> = Vec::new();
for i in 0..sg8_count {
let seqs = nav.find_segments_in_group("SEQ", &["SG4", "SG8"], i);
let has_z78 = seqs.iter().any(|s| {
s.elements
.first()
.and_then(|e| e.first())
.is_some_and(|v| v == "Z78")
});
if !has_z78 {
continue;
}
let rffs = nav.find_segments_in_group("RFF", &["SG4", "SG8"], i);
let has_pauschal = rffs.iter().any(|s| {
s.elements
.first()
.and_then(|e| e.first())
.is_some_and(|v| v == "Z31")
&& s.elements
.first()
.and_then(|e| e.get(1))
.is_some_and(|v| v.replace(' ', "") == pauschal_id)
});
if has_pauschal {
for seq in &seqs {
if seq
.elements
.first()
.and_then(|e| e.first())
.is_some_and(|v| v == "Z78")
{
if let Some(zid) = seq.elements.get(1).and_then(|e| e.first()) {
if !zid.is_empty() {
pauschal_zeitraum_ids.push(zid.clone());
}
}
}
}
}
}
// For each Z98 SG8, check whether its Zeitraum-ID (SEQ.C286.DE1050) maps to a pauschal Z78
for i in 0..sg8_count {
let seqs = nav.find_segments_in_group("SEQ", &["SG4", "SG8"], i);
for seq in &seqs {
if seq
.elements
.first()
.and_then(|e| e.first())
.is_some_and(|v| v == "Z98")
{
let zid = seq
.elements
.get(1)
.and_then(|e| e.first())
.map(|s| s.as_str())
.unwrap_or("");
if !zid.is_empty() && pauschal_zeitraum_ids.iter().any(|z| z == zid) {
// Z98 SG8 references a pauschal Z78 → condition is False
return ConditionResult::False;
}
}
}
}
// No Z98 SG8 references the pauschal bundle → condition is True
ConditionResult::True
}
/// [52] Wenn SG10 CCI+Z07++Z55/ Z56 (Profiltyp: sonstige verbrauchende Marktlokation / sonstige erzeugende Marktlokation) vorhanden
fn evaluate_52(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [53] Wenn weitere Präzisierungen als über CCI+Z07 (Profiltyp) möglich sind
fn evaluate_53(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [54] Wenn SG8 SEQ+Z01 (Daten der Marktlokation) SG10 CCI+Z30++Z06 (Lieferrichtung: Erzeugung) vorhanden
fn evaluate_54(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [55] Wenn in dieser SG4 das STS+E01++A06/ A99 (Status der Antwort) vorhanden
fn evaluate_55(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [56] Wenn im STS+E01 im DE9013 (Status der Antwort) ein Antwortcode aus dem Cluster Zustimmung vorhanden ist
fn evaluate_56(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [57] Wenn in derselben SG8 das CCI+Z45++ZD9 (Abrechnung findet statt) vorhanden ist
fn evaluate_57(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [58] Wenn in diesem CCI das DE3055 mit dem Code 293 vorhanden
fn evaluate_58(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [60] Wenn BGM+Z90 (Beendigung der Zuordnung zur Lokation) vorhanden
fn evaluate_60(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [61] Wenn BGM+Z89 (Zuordnung zur Lokation) vorhanden
fn evaluate_61(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [62] Wenn mehr als eine SG8 SEQ+Z45 (Netznutzungsabrechnungsdaten der Marktlokation), mit derselben Zeitraum-ID im DE1050, mit einer Gruppen-/Artikel-ID im SG8 PIA+Z02 (Gruppenartikel-ID / Artikel-ID), ...
// REVIEW: Iterates SG8 instances within each SG4, finds those with SEQ+Z45 and a non-empty Zeitraum-ID in elements[1][0]. Checks if PIA+Z02 in the same SG8 has a product code (elements[1][0]) beginning with 1-08-1 through 1-08-5. Groups by Zeitraum-ID and checks if any ID appears more than once. Requires navigator for per-instance group segment access; returns Unknown without one. (medium confidence)
fn evaluate_62(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator {
Some(n) => n,
None => return ConditionResult::Unknown,
};
use std::collections::HashMap;
let mut count_by_zid: HashMap<String, u32> = HashMap::new();
let sg4_count = nav.group_instance_count(&["SG4"]);
for sg4_idx in 0..sg4_count {
let sg8_count = nav.child_group_instance_count(&["SG4"], sg4_idx, "SG8");
for sg8_idx in 0..sg8_count {
let seqs =
nav.find_segments_in_child_group("SEQ", &["SG4"], sg4_idx, "SG8", sg8_idx);
let zeitraum_opt = seqs
.iter()
.filter(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "Z45")
})
.filter_map(|s| {
s.elements
.get(1)
.and_then(|e: &Vec<String>| e.first())
.filter(|v| !v.is_empty())
.cloned()
})
.next();
let Some(zid) = zeitraum_opt else { continue };
let pias =
nav.find_segments_in_child_group("PIA", &["SG4"], sg4_idx, "SG8", sg8_idx);
let has_qualifying_pia = pias.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "Z02")
&& s.elements
.get(1)
.and_then(|e: &Vec<String>| e.first())
.map(|code| {
code.starts_with("1-08-1")
|| code.starts_with("1-08-2")
|| code.starts_with("1-08-3")
|| code.starts_with("1-08-4")
|| code.starts_with("1-08-5")
})
.unwrap_or(false)
});
if has_qualifying_pia {
*count_by_zid.entry(zid).or_insert(0) += 1;
}
}
}
ConditionResult::from(count_by_zid.values().any(|&c| c > 1))
}
/// [63] Wenn in dieser SG4 das STS+E01++A15/ A99 (Status der Antwort) vorhanden
fn evaluate_63(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [64] Wenn mehr als eine SG8 SEQ+ZE1 (Informative Netznutzungsabrechnungsdaten der Marktlokation) mit einer Gruppen-/ Artikel-ID im SG8 PIA+Z02 (Gruppenartikel-ID / Artikel-ID), welche mit 1-08-1/2/3/4/5...
fn evaluate_64(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [65] Wenn in derselben SG8 SEQ+ZE1 (Informative Netznutzungsabrechnungsdaten der Marktlokation) eine Gruppen-/Artikel-ID im PIA+Z02 (Gruppenartikel-ID / Artikel-ID), welche mit 1-08-1/2/3/4/5 beginnt, v...
fn evaluate_65(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [66] Wenn SG8 SEQ+ZH0 (Priorisierung erforderliches Produktpaket) mehr als einmal vorhanden
fn evaluate_66(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [67] Wenn in keinem SG8 SEQ+Z79 (Bestandteil eine Produktpaketes CCI+Z66/CAV+ZH9 (Produkteigenschaft/ Code der Produkteigenschaft) der Code 9991000002933 (Ruhende Marktlokation ausprägen) vorhanden ist.
fn evaluate_67(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [68] Wenn SG8 SEQ+ZH0 (Priorisierung erforderliches Produktpaket) mehr als zweimal vorhanden
fn evaluate_68(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [69] Wenn SG8 SEQ+ZH0 (Priorisierung erforderliches Produktpaket) mehr als dreimal vorhanden
fn evaluate_69(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [70] Wenn SG8 SEQ+ZH0 (Priorisierung erforderliches Produktpaket) fünfmal vorhanden
fn evaluate_70(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [71] Wenn Antwort auf Zuordnung übermittelt wird
fn evaluate_71(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [72] Wenn Antwort auf Beendigung der Zuordnung übermittelt wird
fn evaluate_72(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [73] Wenn in derselben SG8 im PIA DE7140 ein Code aus der Codeliste der Gruppenartikel- und Artikel-ID vorhanden ist, der in der Spalte UTILMD/Preisangabe mit X gekennzeichnet ist
fn evaluate_73(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [74] Wenn in der selben SG8 SEQ+Z59 (Produkt-Daten der Marktlokation) das PIA+5 (Produkt-Daten der Marktlokation) vorhanden
fn evaluate_74(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [75] Wenn in diesem PIA+5 in DE7140 der Code 9991000000721 (vgl.: Kapitel 4.2. Konfigurationsprodukte Leistungskurvendefinition der Codeliste der Konfigurationen) vorhanden
fn evaluate_75(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("code_list_membership_check")
}
/// [76] Wenn Summenzeitreihe auf Ebene des Bilanzierungsgebiet
// REVIEW: SEQ+Z49 is 'Abgerechnete Daten der Bilanzierungsgebietssummenzeitreihe' — the only SEQ code in the reference that explicitly names a Bilanzierungsgebiet-level Summenzeitreihe. Checking its presence is the most direct mapping of the condition text. A broader interpretation involving CAV codes (Bezeichnung der Summenzeitreihe) is possible but those codes are not fully enumerated in the provided reference. (medium confidence)
fn evaluate_76(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.has_qualifier("SEQ", 0, "Z49")
}
/// [77] Wenn SG8 SEQ+Z03 (Zähleinrichtungsdaten) CAV+Z30 (Identifikation/Nummer des Gerätes) nicht vorhanden
fn evaluate_77(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [78] Wenn SG4 STS+7++E02 (Transaktionsgrund: Einzug in Neuanlage) nicht vorhanden
fn evaluate_78(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [83] Wenn in dieser SG4 das STS+E01++A08/ A16/ A99 (Status der Antwort) vorhanden
fn evaluate_83(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [84] Wenn SG4 STS+E01++A57 (Status der Antwort) vorhanden
fn evaluate_84(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [85] Wenn das DE2380 von SG4 DTM+Z01 (Kündigungsfrist des Vertrags) an vierter Stelle M, Q, H oder J enthält
fn evaluate_85(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [86] Wenn das RFF+Z50 (Termine der Marktlokation) aus dieser SG6 (Termine der Marktlokation) auf das gleiche SG5 LOC+Z16 (Marktlokation), wie ein RFF+Z18 (Marktlokation) aus einer SG8 SEQ+Z01 (Daten der...
fn evaluate_86(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [87] Es ist ein Monatserster 0 Uhr (gem. deutscher Zeit) anzugeben
fn evaluate_87(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [88] Wert muss identisch mit DE2380 aus dem SG4 DTM+157 (Änderung zum) sein
fn evaluate_88(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [89] Wenn im SG8 SEQ+Z01 (Daten der Marktlokation) mit identischer Zeitraum-ID im DE1050 wie in diesem SG8, das SG10 CCI+++ZA6 (Prognosegrundlage der Marktlokation: Prognose auf Basis von Profilen) CAV+...
// REVIEW: Checks whether any SG8 instance contains an SG10 child with CCI at elements[2][0]=ZA6 and CAV at elements[0][0]=E14. The condition text requires the Zeitraum-ID in DE1050 to match 'this SG8', but a per-group evaluation context is not available in the current API — the Zeitraum-ID cross-reference is therefore not enforced and is instead approximated as a message-wide check. The CCI qualifier position (elements[2][0]) is confirmed by the MIG reference for CCI segments in SG10. (medium confidence)
fn evaluate_89(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator {
Some(n) => n,
None => {
return ctx.filtered_parent_child_has_qualifier(
&["SG4", "SG8"],
"SEQ",
0,
"Z01",
"SG10",
"CCI",
2,
"ZA6",
)
}
};
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
for i in 0..sg8_count {
let sg10_count = nav.child_group_instance_count(&["SG4", "SG8"], i, "SG10");
for j in 0..sg10_count {
let ccis = nav.find_segments_in_child_group("CCI", &["SG4", "SG8"], i, "SG10", j);
let has_cci_za6 = ccis.iter().any(|s| {
s.elements
.get(2)
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "ZA6")
});
if !has_cci_za6 {
continue;
}
let cavs = nav.find_segments_in_child_group("CAV", &["SG4", "SG8"], i, "SG10", j);
if cavs.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "E14")
}) {
return ConditionResult::True;
}
}
}
ConditionResult::False
}
/// [90] Wenn SG10 CCI+++ZA6 (Prognosegrundlage der Marktlokation: Prognose auf Basis von Profilen) einmal mit CAV+E14 (TLP/TEP) und einmal mit CAV+E02 (SLP/SEP) in dieser SG8 vorhanden
// REVIEW: Within each SG8, iterates all SG10 child instances. For each SG10 that has a CCI with elements[2][0]=ZA6, checks the CAV elements[0][0] value. Tracks whether E14 and E02 have both been seen within the same SG8. Returns True when both are found in a single SG8, satisfying the requirement that both Prognosegrundlage options appear 'in dieser SG8'. (medium confidence)
fn evaluate_90(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator {
Some(n) => n,
None => return ConditionResult::Unknown,
};
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
for i in 0..sg8_count {
let sg10_count = nav.child_group_instance_count(&["SG4", "SG8"], i, "SG10");
let mut has_za6_e14 = false;
let mut has_za6_e02 = false;
for j in 0..sg10_count {
let ccis = nav.find_segments_in_child_group("CCI", &["SG4", "SG8"], i, "SG10", j);
let has_cci_za6 = ccis.iter().any(|s| {
s.elements
.get(2)
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "ZA6")
});
if !has_cci_za6 {
continue;
}
let cavs = nav.find_segments_in_child_group("CAV", &["SG4", "SG8"], i, "SG10", j);
for cav in &cavs {
if let Some(code) = cav.elements.first().and_then(|e: &Vec<String>| e.first()) {
if code == "E14" {
has_za6_e14 = true;
}
if code == "E02" {
has_za6_e02 = true;
}
}
}
}
if has_za6_e14 && has_za6_e02 {
return ConditionResult::True;
}
}
ConditionResult::False
}
/// [91] Wenn nicht SG10 CCI+++ZA6 (Prognosegrundlage der Marktlokation: Prognose auf Basis von Profilen) einmal mit CAV+E14 (TLP/ TEP) und einmal mit CAV+E02 (SLP/SEP) in dieser SG8 vorhanden
// REVIEW: Logical negation of condition 90. Condition 91 is explicitly defined as 'Wenn NICHT (CCI+++ZA6 einmal mit CAV+E14 und einmal mit CAV+E02 in dieser SG8 vorhanden)', which is the exact complement of condition 90. Preserving Unknown propagation handles the no-navigator fallback case correctly. (medium confidence)
fn evaluate_91(&self, ctx: &EvaluationContext) -> ConditionResult {
match self.evaluate_90(ctx) {
ConditionResult::True => ConditionResult::False,
ConditionResult::False => ConditionResult::True,
ConditionResult::Unknown => ConditionResult::Unknown,
}
}
/// [92] Wenn Wert innerhalb SG bzw. Segment geändert wird
fn evaluate_92(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [93] Erlaubte Codes aus der PRICAT BGM+Z32 (Preisblatt Messstellenbetrieb) des verantwortlichen MSB
fn evaluate_93(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [94] Wenn ein Segment innerhalb der SG vorhanden
fn evaluate_94(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [95] Wenn in derselben SG10 das CCI+Z17 (Stromverbrauchsart) CAV+ZE5 (E-Mobilität) vorhanden
fn evaluate_95(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [96] Wenn SG4 STS+7++xxx+ZAP (Transaktionsgrundergänzung ruhende Marktlokation) vorhanden
fn evaluate_96(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [97] Wenn in einem SG10 CAV+ZH9 DE7110 der Code der Produkteigenschaft (Wertebereich) 9991000002420 (Marktprämie) vorhanden ist
fn evaluate_97(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [98] Wenn MP-ID in SG2 NAD+MS (Nachrichtenabsender) in der Rolle NB
fn evaluate_98(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("sender_role_check")
}
/// [99] Wenn MP-ID in SG2 NAD+MS (Nachrichtenabsender) in der Rolle ÜNB
fn evaluate_99(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("sender_role_check")
}
/// [100] Wenn SG10 CAV+TLS/ TES/ BIT/ GET/ GAT/ SOT/ WNT/ WFT/ WAT vorhanden
fn evaluate_100(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [101] Wenn SG10 CCI+++ZA6 (Prognosegrundlage der Marktlokation: Prognose auf Basis von Profilen) CAV+E14/ Z36 (TLP/ TEP/ TEP mit Ref.messung) in dieser SG8 vorhanden
fn evaluate_101(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [102] Wenn SG10 CCI+++ZA6 (Prognosegrundlage der Marktlokation: Prognose auf Basis von Profilen) CAV+Z36 (TEP mit Ref.messung) in dieser SG8 vorhanden
fn evaluate_102(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [103] Wenn SG9 QTY+265 (Arbeit / Leistung für tagesparameterabhängig e Marktlokation: Veranschlagte Jahresmenge Gesamt) in dieser SG8 vorhanden
fn evaluate_103(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [104] Wenn SG9 QTY+Z08 (Arbeit / Leistung für tagesparameterabhängige Marktlokation: angepasste elektrische Arbeit nach Anhang D) in dieser SG8 vorhanden
fn evaluate_104(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [105] Wenn SG9 QTY+Z10 (Arbeit / Leistung für tagesparameterabhängige Marktlokation: Leistung der Marktlokation) in dieser SG8 vorhanden
fn evaluate_105(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [106] Wenn in dieser SG8 SEQ+Z01 SG10 CCI+++ZA6 (Prognosegrundlage der Marktlokation: Prognose auf Basis von Profilen) CAV+E02 (SLP/SEP) vorhanden
fn evaluate_106(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [107] Wenn in derselben SG8 das SG10 CAV+SLS/ SES/ BIP/ GEP/ GAP/ SOP/ WNP/ WFP/ WAP vorhanden
fn evaluate_107(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [108] Wenn in derselben SG8 (Netznutzungsabrechnungsdaten der Marktlokation) eine Gruppen-/Artikel-ID im PIA+Z02 (Gruppenartikel-ID / Artikel-ID), welche mit 1-08-1/2/3/4/5 beginnt, vorhanden
fn evaluate_108(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [110] Wenn SG10 CAV+LGS/ EGS/ BIL/ GEL/ GAL/ SOL/ WNL/ WFL / WAL vorhanden
fn evaluate_110(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [111] Wenn in derselben SG8 SEQ+Z59 (Produkt-Daten der Marktlokation) das PIA+5 (Produkt-Daten der Marktlokation) nicht vorhanden
fn evaluate_111(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.any_group_has_qualifier_without("SEQ", 0, "Z59", "PIA", 0, "5", &["SG4", "SG8"])
}
/// [112] Wenn in derselben SG8 SEQ+Z59 (Produkt-Daten der Marktlokation) das SG10 CCI+11 (Details zum Produkt der Marktlokation) nicht vorhanden
fn evaluate_112(&self, ctx: &EvaluationContext) -> ConditionResult {
let result = ctx.filtered_parent_child_has_qualifier(
&["SG4", "SG8"],
"SEQ",
0,
"Z59",
"SG10",
"CCI",
0,
"11",
);
match result {
ConditionResult::True => ConditionResult::False,
ConditionResult::False => ConditionResult::True,
ConditionResult::Unknown => ConditionResult::Unknown,
}
}
/// [113] Wenn es sich um eine Antwort auf die Bestellung einer Zählzeit handelt
fn evaluate_113(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [114] Wenn das SG10 CCI+E03 (Spannungsebene der Marktlokation) CAV E06 (Niederspannung) in dieser SG vorhanden
// REVIEW: Checks that CCI+E03 (Spannungsebene, elements[0][0]='E03' per AHB hint) and CAV+E06 (Niederspannung, elements[0][0]='E06') co-occur in the same SG10 child instance of some SG8. Uses navigator to iterate SG8→SG10 pairs and verify both segments within the same SG10 instance. Confidence medium because navigator availability is runtime-dependent and fallback is message-wide only. (medium confidence)
fn evaluate_114(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator {
Some(n) => n,
None => {
return match (
ctx.has_qualifier("CCI", 0, "E03"),
ctx.has_qualifier("CAV", 0, "E06"),
) {
(ConditionResult::True, ConditionResult::True) => ConditionResult::True,
(ConditionResult::False, _) | (_, ConditionResult::False) => {
ConditionResult::False
}
_ => ConditionResult::Unknown,
};
}
};
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
for i in 0..sg8_count {
let sg10_count = nav.child_group_instance_count(&["SG4", "SG8"], i, "SG10");
for j in 0..sg10_count {
let ccis = nav.find_segments_in_child_group("CCI", &["SG4", "SG8"], i, "SG10", j);
let has_cci_e03 = ccis.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "E03")
});
if has_cci_e03 {
let cavs =
nav.find_segments_in_child_group("CAV", &["SG4", "SG8"], i, "SG10", j);
if cavs.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "E06")
}) {
return ConditionResult::True;
}
}
}
}
ConditionResult::False
}
/// [115] Wenn das SG10 CCI+E03 (Spannungsebene der Marktlokation) CAV E05 (Mittelspannung) in dieser SG vorhanden
fn evaluate_115(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [116] Wenn das SG10 CCI+E03 (Spannungsebene der Marktlokation) CAV E04 (Hochspannung) in dieser SG vorhanden
fn evaluate_116(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [117] Wenn das RFF+Z18 (Marktlokation) aus dieser SG8 auf das gleiche SG5 LOC+Z16 (Marktlokation), wie ein RFF+Z18 (Marktlokation) aus einer SG8 SEQ+Z01 (Daten der Marktlokation), in dem SG10 CCI+++ZA6 (...
// REVIEW: Full condition requires: (1) current SG8 has RFF+Z18=X, (2) another SG8 with SEQ+Z01 also has RFF+Z18=X, (3) that SG8 has SG10 with CCI elements[2][0]='ZA6' AND CAV elements[0][0]='E14'. Implementation simplifies to checking whether any SG8 has SG10 with both CCI+++ZA6 and CAV+E14 co-occurring in the same SG10 instance. The cross-SG RFF+Z18 value correlation and SEQ+Z01 parent check are omitted because the navigator API only exposes child-group segments (SG10 within SG8), not SG8's own entry segments. Medium confidence due to this structural limitation. (medium confidence)
fn evaluate_117(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator {
Some(n) => n,
None => return ConditionResult::Unknown,
};
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
for i in 0..sg8_count {
let sg10_count = nav.child_group_instance_count(&["SG4", "SG8"], i, "SG10");
for j in 0..sg10_count {
let ccis = nav.find_segments_in_child_group("CCI", &["SG4", "SG8"], i, "SG10", j);
let has_cci_za6 = ccis.iter().any(|s| {
s.elements
.get(2)
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "ZA6")
});
if has_cci_za6 {
let cavs =
nav.find_segments_in_child_group("CAV", &["SG4", "SG8"], i, "SG10", j);
if cavs.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "E14")
}) {
return ConditionResult::True;
}
}
}
}
ConditionResult::False
}
/// [118] Wenn in dieser SG8 SEQ+Z98 SG10 CCI+++ZA6 (Prognosegrundlage der Marktlokation: Prognose auf Basis von Profilen) CAV+E02 (SLP/ SEP) vorhanden
fn evaluate_118(&self, ctx: &EvaluationContext) -> ConditionResult {
let has_cci = ctx.filtered_parent_child_has_qualifier(
&["SG4", "SG8"],
"SEQ",
0,
"Z98",
"SG10",
"CCI",
2,
"ZA6",
);
if has_cci != ConditionResult::True {
return has_cci;
}
ctx.filtered_parent_child_has_qualifier(
&["SG4", "SG8"],
"SEQ",
0,
"Z98",
"SG10",
"CAV",
0,
"E02",
)
}
/// [119] Wenn in der SG8 SEQ+Z01/ Z98 SG10 CCI+++ZA6 (Prognosegrundlage der Marktlokation: Prognose auf Basis von Profilen) CAV+E02 (SLP/SEP) vorhanden
fn evaluate_119(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [120] Wenn von NB Abtretungserklärung benötigt wird
fn evaluate_120(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [121] Wenn in dem SEQ+Z03/ ZF5 (Zähleinrichtungsdaten) das SG8 RFF+Z14 (Referenz auf das Smartmeter-Gateway) nicht vorhanden
fn evaluate_121(&self, ctx: &EvaluationContext) -> ConditionResult {
let z03 =
ctx.any_group_has_qualifier_without("SEQ", 0, "Z03", "RFF", 0, "Z14", &["SG4", "SG8"]);
if z03 == ConditionResult::True {
return ConditionResult::True;
}
ctx.any_group_has_qualifier_without("SEQ", 0, "ZF5", "RFF", 0, "Z14", &["SG4", "SG8"])
}
/// [122] Wenn in dieser SG8 SEQ+Z98 SG10 CCI+++E03 (Spannungsebene der Marktlokation) CAV+E06 (Niederspannung) vorhanden
// REVIEW: Uses filtered_parent_child_has_qualifier to find SG8 instances where SEQ+Z98 has an SG10 child with CCI at elements[2]='E03' (Spannungsebene der Marktlokation). Then confirms CAV+E06 (Niederspannung) exists in an SG8 group. The CAV check is group-scoped rather than strictly same-SG10-instance because the navigator API does not directly expose parent-group (SG8) segment access alongside child-group (SG10) checks in one call. (medium confidence)
fn evaluate_122(&self, ctx: &EvaluationContext) -> ConditionResult {
// Check: in SG8 with SEQ+Z98, SG10 child has CCI+++E03 (Spannungsebene, elements[2][0]="E03")
let has_cci_e03 = ctx.filtered_parent_child_has_qualifier(
&["SG4", "SG8"],
"SEQ",
0,
"Z98",
"SG10",
"CCI",
2,
"E03",
);
if has_cci_e03 != ConditionResult::True {
return has_cci_e03;
}
// Also verify CAV+E06 (Niederspannung, elements[0][0]="E06") exists in the same SG8 scope
ctx.any_group_has_qualifier("CAV", 0, "E06", &["SG4", "SG8"])
}
/// [123] Wenn noch mindestens eine weitere SG8 SEQ+Z20 (OBIS-Daten der Zähleinrichtung Smartmeter-Gateway) mit dem SG8 RFF+MG (Gerätenummer des Zählers) auf die gleiche Identifikation/Nummer des Gerätes...
// REVIEW: Scans segments linearly to collect RFF+MG device IDs from each SG8 group with SEQ+Z20 (OBIS-Daten der Zähleinrichtung/Smartmeter-Gateway). A new SEQ starts a new SG8 context; RFF+MG within that context records the device number. Returns True if any device ID appears in 2+ different SG8 groups (indicating multiple OBIS datasets reference the same device). Linear scan is used because the navigator API does not expose a direct method to retrieve segments within a parent SG8 instance by absolute index. (medium confidence)
fn evaluate_123(&self, ctx: &EvaluationContext) -> ConditionResult {
struct Sg8Z20Entry {
mg_id: Option<String>,
}
let mut entries: Vec<Sg8Z20Entry> = Vec::new();
let mut current: Option<Sg8Z20Entry> = None;
for seg in ctx.segments {
match seg.id.as_str() {
"SEQ" => {
if let Some(entry) = current.take() {
entries.push(entry);
}
if seg
.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "Z20")
{
current = Some(Sg8Z20Entry { mg_id: None });
}
}
"RFF" if current.is_some() => {
if seg
.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "MG")
{
if let Some(ref mut entry) = current {
if entry.mg_id.is_none() {
entry.mg_id = seg.elements.first().and_then(|e| e.get(1)).cloned();
}
}
}
}
_ => {}
}
}
if let Some(entry) = current {
entries.push(entry);
}
let ids: Vec<&str> = entries
.iter()
.filter_map(|e| e.mg_id.as_deref().filter(|s| !s.is_empty()))
.collect();
for i in 0..ids.len() {
for j in (i + 1)..ids.len() {
if ids[i] == ids[j] {
return ConditionResult::True;
}
}
}
ConditionResult::False
}
/// [124] Wenn noch mindestens eine weitere SG8 SEQ+Z20 (OBIS-Daten der Zähleinrichtung Smartmeter-Gateway) mit derselben Zeitraum-ID aus dem DE1050 dieser SG8 mit dem SG8 RFF+MG (Gerätenummer des Zählers...
// REVIEW: Extends condition 123 by also requiring that the matching SG8 groups share the same Zeitraum-ID (from SEQ.elements[1][0] = DE1050 / C286.d1050). Both the Zeitraum-ID and the RFF+MG device number must be identical across at least two different SG8 instances with SEQ+Z20 for the condition to be True. (medium confidence)
fn evaluate_124(&self, ctx: &EvaluationContext) -> ConditionResult {
struct Sg8Z20Entry {
zeitraum_id: String,
mg_id: Option<String>,
}
let mut entries: Vec<Sg8Z20Entry> = Vec::new();
let mut current: Option<Sg8Z20Entry> = None;
for seg in ctx.segments {
match seg.id.as_str() {
"SEQ" => {
if let Some(entry) = current.take() {
entries.push(entry);
}
if seg
.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "Z20")
{
let zeitraum_id = seg
.elements
.get(1)
.and_then(|e: &Vec<String>| e.first())
.cloned()
.unwrap_or_default();
current = Some(Sg8Z20Entry {
zeitraum_id,
mg_id: None,
});
}
}
"RFF" if current.is_some() => {
if seg
.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "MG")
{
if let Some(ref mut entry) = current {
if entry.mg_id.is_none() {
entry.mg_id = seg.elements.first().and_then(|e| e.get(1)).cloned();
}
}
}
}
_ => {}
}
}
if let Some(entry) = current {
entries.push(entry);
}
for i in 0..entries.len() {
for j in (i + 1)..entries.len() {
let ei = &entries[i];
let ej = &entries[j];
if !ei.zeitraum_id.is_empty()
&& ei.zeitraum_id == ej.zeitraum_id
&& ei.mg_id.is_some()
&& !ei.mg_id.as_deref().unwrap_or("").is_empty()
&& ei.mg_id == ej.mg_id
{
return ConditionResult::True;
}
}
}
ConditionResult::False
}
/// [125] Wenn in derselben SG8 SEQ+Z76/ ZC5/ ZC6 (Messstellenbetriebsabrechnungsdaten der Marktlokation) im DE4347 des PIA Z02 (Gruppenartikel-ID / Artikel-ID) vorhanden
fn evaluate_125(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [126] Es ist der Wert einzutragen, der sich aus der Wiederholungshäufigkeit des SG6 RFF+Z49/ Z53 (Verwendungszeitraum der Daten: Gültige Daten/ Keine Daten) ergibt. Bedeutet: Das erste SG6 RFF+Z49/ Z53...
fn evaluate_126(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [127] Es ist der Wert einzutragen, der sich aus der Wiederholungshäufigkeit des SG6 RFF+Z48/ Z55 (Verwendungszeitraum der Daten: Erwartete Daten/ Keine Daten erwartet) ergibt. Bedeutet: Das erste SG6 R...
fn evaluate_127(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [128] Es ist der Wert einzutragen, der sich aus der Wiederholungshäufigkeit des SG6 RFF+Z47/ Z54 (Verwendungszeitraum der Daten: Im System vorhandene Daten/ Im System keine Daten vorhanden) ergibt. Bede...
fn evaluate_128(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [129] Innerhalb eines SG4 IDE müssen alle DE3225 der SG5 LOC+Z16 (Marktlokation) den identischen Wert enthalten
fn evaluate_129(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [130] Wenn an Messlokation vorhanden
fn evaluate_130(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [131] Wenn dieses DTM+Z25 (Verwendung der Daten ab) im SG6 RFF (Verwendungszeitraum der Daten) mit der Zeitraum ID \"1\" im DE1156 gekennzeichnet ist, muss das Datum in diesem DE2380 der direkt auf DTM+1...
fn evaluate_131(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [132] Wenn dieses DTM+Z25 (Verwendung der Daten ab) im SG6 RFF (Verwendungszeitraum der Daten) mit der Zeitraum ID "1" im DE1156 gekennzeichnet ist, muss das Datum in diesem DE2380 der direkt auf DTM+137...
// REVIEW: Validates that when RFF in SG6 has Zeitraum-ID '1' (elements[0][2] = DE1156), the DTM+Z25 date must equal the day immediately following DTM+137 (Nachrichtendatum) at 00:00. Parses the YYYYMMDD portion of DTM+137, computes next calendar day with correct month/year rollover, then checks that DTM+Z25's first 12 characters match YYYYMMDDHHMM with HHMM=0000. Note: German timezone offset (CET/CEST) validation is not performed — this checks the stored datetime value directly, which is the common encoding in EDIFACT 303 format for this use case. (medium confidence)
fn evaluate_132(&self, ctx: &EvaluationContext) -> ConditionResult {
// Condition applies only when RFF in SG6 has Zeitraum-ID "1" in DE1156 (elements[0][2])
let has_zeitraum_id_1 = ctx.find_segments("RFF").iter().any(|s| {
s.elements
.first()
.and_then(|e| e.get(2))
.is_some_and(|v: &String| v == "1")
});
if !has_zeitraum_id_1 {
return ConditionResult::False;
}
// Get message date from DTM+137 (format 303: CCYYMMDDHHmm...)
let msg_date_str = match ctx
.find_segments_with_qualifier("DTM", 0, "137")
.into_iter()
.next()
{
Some(seg) => match seg.elements.first().and_then(|e| e.get(1)) {
Some(v) if v.len() >= 8 => v.clone(),
_ => return ConditionResult::Unknown,
},
None => return ConditionResult::Unknown,
};
// Get DTM+Z25 (Verwendung der Daten ab) value
let usage_date_str = match ctx
.find_segments_with_qualifier("DTM", 0, "Z25")
.into_iter()
.next()
{
Some(seg) => match seg.elements.first().and_then(|e| e.get(1)) {
Some(v) if v.len() >= 12 => v.clone(),
_ => return ConditionResult::Unknown,
},
None => return ConditionResult::Unknown,
};
// Parse YYYYMMDD from DTM+137 value
let year: u32 = match msg_date_str[..4].parse() {
Ok(v) => v,
Err(_) => return ConditionResult::Unknown,
};
let month: u32 = match msg_date_str[4..6].parse() {
Ok(v) => v,
Err(_) => return ConditionResult::Unknown,
};
let day: u32 = match msg_date_str[6..8].parse() {
Ok(v) => v,
Err(_) => return ConditionResult::Unknown,
};
let days_in_month: u32 = match month {
1 | 3 | 5 | 7 | 8 | 10 | 12 => 31,
4 | 6 | 9 | 11 => 30,
2 => {
if year % 4 == 0 && (year % 100 != 0 || year % 400 == 0) {
29
} else {
28
}
}
_ => return ConditionResult::Unknown,
};
let (next_year, next_month, next_day): (u32, u32, u32) = if day >= days_in_month {
if month == 12 {
(year + 1, 1, 1)
} else {
(year, month + 1, 1)
}
} else {
(year, month, day + 1)
};
// Expected DTM+Z25: next day at 00:00 — format 303 prefix YYYYMMDDHHMM = 12 chars
let expected_prefix = format!("{:04}{:02}{:02}0000", next_year, next_month, next_day);
let actual_len = usage_date_str.len().min(12);
let actual_prefix = &usage_date_str[..actual_len];
ConditionResult::from(actual_prefix == expected_prefix.as_str())
}
/// [133] Wenn an der übermittelten Marktlokation / Messlokation vorhanden
fn evaluate_133(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [134] Wenn dieses DTM+Z25 (Verwendung der Daten ab) nicht im SG6 RFF+Z48/ Z55 (Verwendungszeitraum der Daten: Erwartete Daten/ Keine Daten erwartet) mit der Zeitraum ID "1" im DE1156 ist, muss das Datum ...
// REVIEW: Validates time-slice continuity for Z48/Z55 (Erwartete Daten/Keine Daten erwartet) SG6 groups: every slice with Zeitraum-ID > 1 must have its DTM+Z25 (start date) equal to the DTM+Z26 (end date) of the preceding slice. Zeitraum-ID is in RFF.C506.DE1156 = elements[0][2]. Requires navigator for per-SG6-instance DTM extraction. (medium confidence)
fn evaluate_134(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator() {
Some(n) => n,
None => return ConditionResult::Unknown,
};
let sg6_count = nav.group_instance_count(&["SG4", "SG6"]);
// Collect (zeitraum_id, dtm_z25_value, dtm_z26_value) for every Z48/Z55 SG6
let mut slices: Vec<(u32, Option<String>, Option<String>)> = Vec::new();
for i in 0..sg6_count {
let rffs = nav.find_segments_in_group("RFF", &["SG4", "SG6"], i);
// RFF C506: [0][0]=qualifier, [0][1]=ref-id, [0][2]=Zeitraum-ID
let maybe_zid = rffs.iter().find_map(|s| {
let qual = s
.elements
.first()
.and_then(|e| e.first())
.map(|v| v.as_str())?;
if qual == "Z48" || qual == "Z55" {
s.elements
.first()
.and_then(|e| e.get(2))
.and_then(|v| v.parse::<u32>().ok())
} else {
None
}
});
if let Some(zid) = maybe_zid {
let dtms = nav.find_segments_in_group("DTM", &["SG4", "SG6"], i);
let z25 = dtms.iter().find_map(|s| {
if s.elements
.first()
.and_then(|e| e.first())
.map(|v| v.as_str())
== Some("Z25")
{
s.elements.first().and_then(|e| e.get(1)).cloned()
} else {
None
}
});
let z26 = dtms.iter().find_map(|s| {
if s.elements
.first()
.and_then(|e| e.first())
.map(|v| v.as_str())
== Some("Z26")
{
s.elements.first().and_then(|e| e.get(1)).cloned()
} else {
None
}
});
slices.push((zid, z25, z26));
}
}
if slices.is_empty() {
return ConditionResult::Unknown;
}
// For each slice with Zeitraum-ID > 1: its DTM+Z25 must equal DTM+Z26 of the previous slice
for i in 0..slices.len() {
let (zid, ref z25, _) = slices[i];
if zid <= 1 {
continue;
}
let prev_id = zid - 1;
match slices.iter().find(|(id, _, _)| *id == prev_id) {
Some((_, _, prev_z26)) => match (z25, prev_z26) {
(Some(curr), Some(prev_end)) => {
if curr != prev_end {
return ConditionResult::False;
}
}
_ => return ConditionResult::Unknown,
},
None => return ConditionResult::Unknown,
}
}
ConditionResult::True
}
/// [135] Wenn dieses DTM+Z25 (Verwendung der Daten ab) nicht im SG6 RFF+Z47/ Z54 (Verwendungszeitraum der Daten: Im System vorhandene Daten/ Im System keine Daten vorhanden) mit der Zeitraum ID "1" im DE115...
// REVIEW: Identical time-slice continuity logic as condition 134 but applied to Z47/Z54 (Im System vorhandene Daten/Im System keine Daten vorhanden) SG6 groups. Same structural rule: DTM+Z25 of slice N must equal DTM+Z26 of slice N-1 for all N > 1. (medium confidence)
fn evaluate_135(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator() {
Some(n) => n,
None => return ConditionResult::Unknown,
};
let sg6_count = nav.group_instance_count(&["SG4", "SG6"]);
// Collect (zeitraum_id, dtm_z25_value, dtm_z26_value) for every Z47/Z54 SG6
let mut slices: Vec<(u32, Option<String>, Option<String>)> = Vec::new();
for i in 0..sg6_count {
let rffs = nav.find_segments_in_group("RFF", &["SG4", "SG6"], i);
// RFF C506: [0][0]=qualifier, [0][1]=ref-id, [0][2]=Zeitraum-ID
let maybe_zid = rffs.iter().find_map(|s| {
let qual = s
.elements
.first()
.and_then(|e| e.first())
.map(|v| v.as_str())?;
if qual == "Z47" || qual == "Z54" {
s.elements
.first()
.and_then(|e| e.get(2))
.and_then(|v| v.parse::<u32>().ok())
} else {
None
}
});
if let Some(zid) = maybe_zid {
let dtms = nav.find_segments_in_group("DTM", &["SG4", "SG6"], i);
let z25 = dtms.iter().find_map(|s| {
if s.elements
.first()
.and_then(|e| e.first())
.map(|v| v.as_str())
== Some("Z25")
{
s.elements.first().and_then(|e| e.get(1)).cloned()
} else {
None
}
});
let z26 = dtms.iter().find_map(|s| {
if s.elements
.first()
.and_then(|e| e.first())
.map(|v| v.as_str())
== Some("Z26")
{
s.elements.first().and_then(|e| e.get(1)).cloned()
} else {
None
}
});
slices.push((zid, z25, z26));
}
}
if slices.is_empty() {
return ConditionResult::Unknown;
}
// For each slice with Zeitraum-ID > 1: its DTM+Z25 must equal DTM+Z26 of the previous slice
for i in 0..slices.len() {
let (zid, ref z25, _) = slices[i];
if zid <= 1 {
continue;
}
let prev_id = zid - 1;
match slices.iter().find(|(id, _, _)| *id == prev_id) {
Some((_, _, prev_z26)) => match (z25, prev_z26) {
(Some(curr), Some(prev_end)) => {
if curr != prev_end {
return ConditionResult::False;
}
}
_ => return ConditionResult::Unknown,
},
None => return ConditionResult::Unknown,
}
}
ConditionResult::True
}
/// [136] Wenn SG10 CCI+++E13 (Zählertyp) CAV+EHZ (elektronischer Haushaltszähler) vorhanden
fn evaluate_136(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [137] Nicht bei Neuanlage
fn evaluate_137(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [138] Wenn im selben QTY im DE6063 Z35 (Abschlag) vorhanden
fn evaluate_138(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [139] Wenn SG10 CAV+IVA (Individuelle Abstimmung) nicht vorhanden
// REVIEW: Condition is True when SG10 CAV+IVA (Individuelle Abstimmung) is NOT present anywhere. Uses parent-child navigation to iterate all SG8 instances and their SG10 child groups, checking CAV elements[0][0] for 'IVA'. Falls back to message-wide lacks_qualifier when no navigator is available. Returns False as soon as any CAV+IVA is found, True if none found. (medium confidence)
fn evaluate_139(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator {
Some(n) => n,
None => return ctx.lacks_qualifier("CAV", 0, "IVA"),
};
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
for i in 0..sg8_count {
let sg10_count = nav.child_group_instance_count(&["SG4", "SG8"], i, "SG10");
for j in 0..sg10_count {
let cavs = nav.find_segments_in_child_group("CAV", &["SG4", "SG8"], i, "SG10", j);
if cavs.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "IVA")
}) {
return ConditionResult::False;
}
}
}
ConditionResult::True
}
/// [140] Wenn im selben QTY im DE6063 Z34/Z35 (Zuschlag/Abschlag) vorhanden
fn evaluate_140(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [141] Wenn SG10 CAV+MIW/ MPW/ MBW vorhanden
fn evaluate_141(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [142] Wenn SG8 PIA+Z01+:Z04/ Z05 (Berechnung Tagesmitteltemperatur: vom Anbieter zur Verfügung gestellte - / Äquivalente Tagesmitteltemperatur) vorhanden
fn evaluate_142(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [143] Wenn STS+7++ZX3 (Transaktionsgrund: Abrechnungsdaten BK-Abrechnung verbrauchender MaLo) vorhanden
fn evaluate_143(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [144] Wenn STS+7++ZAN (Transaktionsgrund: Korrektur Abrechnungsdaten BK-Abrechnung verbrauchender MaLo) vorhanden
fn evaluate_144(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [145] Wenn STS+7++ZX2 (Transaktionsgrund: Abrechnungsdaten BK-Abrechnung erzeugender MaLo) vorhanden
fn evaluate_145(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [146] Wenn STS+7++ZA0 (Transaktionsgrund: Korrektur Abrechnungsdaten BK-Abrechnung erzeugender MaLo) vorhanden
fn evaluate_146(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [147] Wenn in Anfrage vorhanden
fn evaluate_147(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [148] Wenn in dieser SG8 im SG8 PIA+Z02 (Gruppenartikel-ID / Artikel-ID), die Artikel-ID 1-02-0-017/ 1-02-0-018 vorhanden
fn evaluate_148(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [149] Wenn zwei SG8 SEQ+Z45 (Netznutzungsabrechnungsdaten der Marktlokation), mit derselben Zeitraum-ID im DE1050, mit Artikel-ID im SG8 PIA+Z02 (Gruppenartikel-ID / Artikel-ID), eine SG8 mit 1-02-0-017...
// REVIEW: Condition checks whether two SG8 SEQ+Z45 groups with the same Zeitraum-ID (elements[1][0]) each contain PIA+Z02 (DE4347=Z02) with product codes '1-02-0-017' and '1-02-0-018'. Uses collect_group_values to gather SEQ qualifiers and Zeitraum-IDs per group instance, then PIA qualifiers and product codes (elements[1][0]=DE7140) per group instance. Positional alignment of pia_quals and pia_prods (both from same PIA segments in same order) enables reliable qualifier-to-product matching. Groups product codes by Zeitraum-ID to check co-occurrence. (medium confidence)
fn evaluate_149(&self, ctx: &EvaluationContext) -> ConditionResult {
use std::collections::{HashMap, HashSet};
let seq_quals = ctx.collect_group_values("SEQ", 0, 0, &["SG4", "SG8"]);
let seq_zeitraum = ctx.collect_group_values("SEQ", 1, 0, &["SG4", "SG8"]);
let pia_quals = ctx.collect_group_values("PIA", 0, 0, &["SG4", "SG8"]);
let pia_prods = ctx.collect_group_values("PIA", 1, 0, &["SG4", "SG8"]);
// Map group index -> Zeitraum-ID for SG8s with SEQ+Z45
let mut idx_to_zeitraum: HashMap<usize, String> = HashMap::new();
for ((gi, q), (_, zid)) in seq_quals.iter().zip(seq_zeitraum.iter()) {
if q == "Z45" && !zid.is_empty() {
idx_to_zeitraum.insert(*gi, zid.clone());
}
}
if idx_to_zeitraum.is_empty() {
return ConditionResult::False;
}
// Map Zeitraum-ID -> set of PIA+Z02 product codes found in the same SG8 group
let mut zeitraum_products: HashMap<String, HashSet<String>> = HashMap::new();
for (i, (gi, qual)) in pia_quals.iter().enumerate() {
if qual == "Z02" {
if let Some(zid) = idx_to_zeitraum.get(gi) {
if let Some((_, prod)) = pia_prods.get(i) {
if !prod.is_empty() {
zeitraum_products
.entry(zid.clone())
.or_default()
.insert(prod.clone());
}
}
}
}
}
ConditionResult::from(
zeitraum_products
.values()
.any(|codes| codes.contains("1-02-0-017") && codes.contains("1-02-0-018")),
)
}
/// [150] Wenn in dieser SG8 im SG8 PIA+Z02 (Gruppenartikel-ID / Artikel-ID), die Artikel-ID 1-02-0-002 vorhanden
fn evaluate_150(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [151] Wenn bei der Bestellung ein Messprodukt der Codeliste der Konfigurationen aus dem Kapitel 4.4 mit dem Ü̈bertragungsweg \"aus dem SMGW\" bestellt wurde. Der Empfänger der Werte kann dadurch seine...
fn evaluate_151(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("code_list_membership_check")
}
/// [152] Wenn FTX+Z28 (IP-Range des Absenders) nicht vorhanden
fn evaluate_152(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [153] Wenn FTX+Z27 (IP-Adresse des Absenders) nicht vorhanden
fn evaluate_153(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [156] Wenn SG4 FTX+Z17 (Zieladresse URI) vorhanden
fn evaluate_156(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [161] Wenn SG4 STS+7++E03+ZW8 (Transaktionsgrundergänzung Fall 1) vorhanden
fn evaluate_161(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [162] Wenn SG4 STS+7++E03+ZW9 (Transaktionsgrundergänzung Fall 2) vorhanden
fn evaluate_162(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [163] Wenn SG4 STS+7++E03+ZX0 (Transaktionsgrundergänzung Fall 3) vorhanden
fn evaluate_163(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [164] Wenn SG4 STS+7++E03+ZX1 (Transaktionsgrundergänzung Fall 4) vorhanden
fn evaluate_164(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [165] Wenn bekannt
fn evaluate_165(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [166] Wenn vorhanden
fn evaluate_166(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [167] Wenn SG5 LOC+Z21 (Tranche) vorhanden
fn evaluate_167(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [170] Wenn Anschrift der Marktlokation vorhanden
fn evaluate_170(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [172] Wenn im selben QTY im DE6063 Z37 (Kein Zu- und Abschlag) vorhanden
fn evaluate_172(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [173] Wenn im RFF+Z33 (Referenz auf den Objektcode in der Lokationsbündelstruktur) das DE1156 (Fortlaufende Nummer eines Lokationsbündels im Geschäftsvorfall) in derselben SG8 SEQ+Z58/ ZC9/ ZD0/ ZD6 (...
// REVIEW: Condition is True when, in an SG8 with SEQ+Z58/ZC9/ZD0/ZD6 (Zuordnung Lokation zum Objektcode), RFF+Z33 exists but its DE1156 (elements[0][2] = Fortlaufende Nummer) is absent or empty. Uses collect_group_values to find target SG8 group indices by SEQ qualifier, then positionally aligns rff_quals[i] with rff_de1156[i] (same RFF segment) to check DE1156 emptiness scoped to those groups. Returns Unknown if no RFF+Z33 found in target groups (condition not applicable), False if all RFF+Z33 have DE1156 present. (medium confidence)
fn evaluate_173(&self, ctx: &EvaluationContext) -> ConditionResult {
use std::collections::HashSet;
let seq_quals = ctx.collect_group_values("SEQ", 0, 0, &["SG4", "SG8"]);
let target_indices: HashSet<usize> = seq_quals
.iter()
.filter(|(_, q)| matches!(q.as_str(), "Z58" | "ZC9" | "ZD0" | "ZD6"))
.map(|(i, _)| *i)
.collect();
if target_indices.is_empty() {
return ConditionResult::Unknown;
}
// Collect RFF qualifier (elements[0][0]) and DE1156 (elements[0][2]) with positional alignment
let rff_quals = ctx.collect_group_values("RFF", 0, 0, &["SG4", "SG8"]);
let rff_de1156 = ctx.collect_group_values("RFF", 0, 2, &["SG4", "SG8"]);
let mut found_rff_z33 = false;
for (i, (gi, qual)) in rff_quals.iter().enumerate() {
if qual == "Z33" && target_indices.contains(gi) {
found_rff_z33 = true;
let de1156_empty = rff_de1156.get(i).map(|(_, v)| v.is_empty()).unwrap_or(true);
if de1156_empty {
return ConditionResult::True;
}
}
}
if found_rff_z33 {
ConditionResult::False
} else {
ConditionResult::Unknown
}
}
/// [174] Wenn im RFF+Z33 (Referenz auf den Objektcode in der Lokationsbündelstruktur) das DE1156 Fortlaufende Nummer eines Lokationsbündels im Geschäftsvorfall) in derselben SG8 SEQ+Z58/ ZC9/ ZD0/ ZD6 (Z...
fn evaluate_174(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [175] Wenn der Objektcode im RFF+Z33 (Referenz auf den Objektcode in der Lokationsbündelstruktur) im DE1154 derselben SG8 SEQ+Z58 (Zuordnung Lokation zum Objektcode des Lokationsbündels) in einem weite...
// REVIEW: Cross-SG8 check: find all SG8 instances with SEQ+Z58 that also have RFF+Z33. Check whether any Objektcode (DE1154) with the same fortlaufende Nummer (DE1156) appears in two distinct SG8 instances. Uses nav.find_segments_in_group to access SG8-level segments directly, following the existing navigator pattern. (medium confidence)
fn evaluate_175(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator {
Some(n) => n,
None => return ConditionResult::Unknown,
};
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
let mut entries: Vec<(usize, String, String)> = Vec::new();
for i in 0..sg8_count {
let seqs = nav.find_segments_in_group("SEQ", &["SG4", "SG8"], i);
if !seqs.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "Z58")
}) {
continue;
}
let rffs = nav.find_segments_in_group("RFF", &["SG4", "SG8"], i);
for rff in &rffs {
let elems = match rff.elements.first() {
Some(e) => e,
None => continue,
};
if elems.first().map(|s| s.as_str()) != Some("Z33") {
continue;
}
let objektcode = elems.get(1).cloned().unwrap_or_default();
let fort_nr = elems.get(2).cloned().unwrap_or_default();
if !objektcode.is_empty() {
entries.push((i, objektcode, fort_nr));
}
}
}
for a in 0..entries.len() {
for b in (a + 1)..entries.len() {
if entries[a].0 != entries[b].0
&& entries[a].1 == entries[b].1
&& entries[a].2 == entries[b].2
{
return ConditionResult::True;
}
}
}
ConditionResult::False
}
/// [176] Wenn in demselben Segment das DE1153 mit dem Code Z34 vorgelagerte Messlokation vorhanden ist
fn evaluate_176(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [177] Wenn in demselben Segment das DE1153 mit dem Code Z35 vorgelagerte Netzlokation vorhanden ist
fn evaluate_177(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [178] Wenn das LOC+Z18 (Netzlokation) vorhanden ist
fn evaluate_178(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [179] Wenn der Objektcode im RFF+Z33 (Referenz auf den Objektcode in der Lokationsbündelstruktur) im DE1154 derselben SG8 SEQ+Z58/ ZC9 / ZD0/ ZD6 (Zuordnung Lokation zum Objektcode des Lokationsbündels...
fn evaluate_179(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [180] Wenn im selben QTY im DE6063 Z46 (Kein Abschlag) vorhanden
fn evaluate_180(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [184] Wenn in derselben SG8 SEQ+Z18 (Daten der Messlokation) ein CCI+Z01++Z82 (Verwendungsumfang: ID der prozessual behandelten Messlokation) vorhanden
fn evaluate_184(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [190] Wenn in derselben SG8 SEQ+Z60/ ZG8/ ZG9/ ZE0 (Produkt-Daten der Netzlokation) PIA+5+9991000000721:Z12 vorhanden
fn evaluate_190(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [191] Wenn im SG4 IDE+Z01 (Identifikation einer Liste) STS+E01 (Status der Antwort der Liste) nicht vorhanden
fn evaluate_191(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [192] Wenn SG4 STS+7++XXX+ZW4/ZAP (Transaktionsgrund / Ergänzung: Verbrauchende Marktlokation / ruhende Marktlokation) vorhanden
fn evaluate_192(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [193] Wenn das SG10 CCI ZB5 (Spannungsebene der Summenzeitreihe) CAV E06 (Niederspannung) in dieser SG vorhanden
fn evaluate_193(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator {
Some(n) => n,
None => {
let cavs = ctx.find_segments("CAV");
return ConditionResult::from(cavs.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "E06")
}));
}
};
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
for i in 0..sg8_count {
let sg10_count = nav.child_group_instance_count(&["SG4", "SG8"], i, "SG10");
for j in 0..sg10_count {
let ccis = nav.find_segments_in_child_group("CCI", &["SG4", "SG8"], i, "SG10", j);
let has_cci_zb5 = ccis.iter().any(|s| {
s.elements
.get(2)
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "ZB5")
});
if !has_cci_zb5 {
continue;
}
let cavs = nav.find_segments_in_child_group("CAV", &["SG4", "SG8"], i, "SG10", j);
if cavs.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "E06")
}) {
return ConditionResult::True;
}
}
}
ConditionResult::False
}
/// [194] Wenn das SG10 CCI ZB5 (Spannungsebene der Summenzeitreihe) CAV E05 (Mittelspannung) in dieser SG vorhanden
fn evaluate_194(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [195] Wenn das SG10 CCI ZB5 (Spannungsebene der Summenzeitreihe) CAV E04 (Hochspannung) in dieser SG vorhanden
fn evaluate_195(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [196] Wenn der Objektcode im RFF+Z33 (Referenz auf den Objektcode in der Lokationsbündelstruktur) im DE1154 derselben SG8 SEQ+Z58/ZC9/ZD0 (Zuordnung Lokation zum Objektcode des Lokationsbündels) in ein...
// REVIEW: Extended cross-SG8 check vs 175: now requires matching SEQ qualifier code (DE1229), Zeitraum-ID from SEQ DE1050 (elements[1][0]), Objektcode (RFF+Z33 DE1154), AND fortlaufende Nummer (RFF+Z33 DE1156) to all be identical between two distinct SG8 instances. SEQ qualifiers are Z58/ZC9/ZD0 per schema. (medium confidence)
fn evaluate_196(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator {
Some(n) => n,
None => return ConditionResult::Unknown,
};
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
let mut entries: Vec<(usize, String, String, String, String)> = Vec::new();
for i in 0..sg8_count {
let seqs = nav.find_segments_in_group("SEQ", &["SG4", "SG8"], i);
let seq_opt = seqs.iter().find(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| matches!(v.as_str(), "Z58" | "ZC9" | "ZD0"))
});
let seq = match seq_opt {
Some(s) => s,
None => continue,
};
let seq_code = seq
.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.cloned()
.unwrap_or_default();
let zeitraum_id = seq
.elements
.get(1)
.and_then(|e: &Vec<String>| e.first())
.cloned()
.unwrap_or_default();
let rffs = nav.find_segments_in_group("RFF", &["SG4", "SG8"], i);
for rff in &rffs {
let elems = match rff.elements.first() {
Some(e) => e,
None => continue,
};
if elems.first().map(|s| s.as_str()) != Some("Z33") {
continue;
}
let objektcode = elems.get(1).cloned().unwrap_or_default();
let fort_nr = elems.get(2).cloned().unwrap_or_default();
if !objektcode.is_empty() {
entries.push((
i,
seq_code.clone(),
zeitraum_id.clone(),
objektcode,
fort_nr,
));
}
}
}
for a in 0..entries.len() {
for b in (a + 1)..entries.len() {
if entries[a].0 != entries[b].0
&& entries[a].1 == entries[b].1
&& entries[a].2 == entries[b].2
&& entries[a].3 == entries[b].3
&& entries[a].4 == entries[b].4
{
return ConditionResult::True;
}
}
}
ConditionResult::False
}
/// [197] Wenn das RFF+Z18 (Marktlokation) aus dieser SG8 auf das gleiche SG5 LOC+Z16 (Marktlokation), wie ein RFF+Z18 (Marktlokation) aus einer SG8 SEQ+Z01 (Daten der Marktlokation), in dem SG10 CCI+++ZA6 (...
// REVIEW: Two-phase cross-SG8 check. Phase 1: collect Marktlokation IDs from SG8 instances that (a) have SEQ+Z01 and (b) have an SG10 child with CCI elements[2][0]=ZA6 and CAV elements[0][0]=E02. Phase 2: check whether any SG8's RFF+Z18 references one of those qualifying Marktlokation IDs, establishing the cross-reference described in the condition. (medium confidence)
fn evaluate_197(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator {
Some(n) => n,
None => return ConditionResult::Unknown,
};
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
let mut qualifying_malo_ids: Vec<String> = Vec::new();
for i in 0..sg8_count {
let seqs = nav.find_segments_in_group("SEQ", &["SG4", "SG8"], i);
if !seqs.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "Z01")
}) {
continue;
}
let sg10_count = nav.child_group_instance_count(&["SG4", "SG8"], i, "SG10");
let has_prog = (0..sg10_count).any(|j| {
let ccis = nav.find_segments_in_child_group("CCI", &["SG4", "SG8"], i, "SG10", j);
let has_za6 = ccis.iter().any(|s| {
s.elements
.get(2)
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "ZA6")
});
if !has_za6 {
return false;
}
let cavs = nav.find_segments_in_child_group("CAV", &["SG4", "SG8"], i, "SG10", j);
cavs.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "E02")
})
});
if !has_prog {
continue;
}
let rffs = nav.find_segments_in_group("RFF", &["SG4", "SG8"], i);
for rff in &rffs {
let elems = match rff.elements.first() {
Some(e) => e,
None => continue,
};
if elems.first().map(|s| s.as_str()) != Some("Z18") {
continue;
}
if let Some(malo_id) = elems.get(1) {
if !malo_id.is_empty() {
qualifying_malo_ids.push(malo_id.clone());
}
}
}
}
if qualifying_malo_ids.is_empty() {
return ConditionResult::False;
}
for i in 0..sg8_count {
let rffs = nav.find_segments_in_group("RFF", &["SG4", "SG8"], i);
for rff in &rffs {
let elems = match rff.elements.first() {
Some(e) => e,
None => continue,
};
if elems.first().map(|s| s.as_str()) != Some("Z18") {
continue;
}
if let Some(malo_id) = elems.get(1) {
if qualifying_malo_ids.contains(malo_id) {
return ConditionResult::True;
}
}
}
}
ConditionResult::False
}
/// [198] Wenn SG4 STS+7++E03(Transaktionsgrund: Wechsel) vorhanden
fn evaluate_198(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [199] Wenn in der SG8 SEQ+Z01/ SG10 CCI+++ZA6 (Prognosegrundlage der Marktlokation: Prognose auf Basis von Profilen) mit identischer Zeitraum-ID im DE1050 CAV+E02 (SLP/SEP) vorhanden
// REVIEW: Checks whether any SG8 with SEQ+Z01 (Daten der Marktlokation) contains an SG10 child group where CCI elements[2][0]=ZA6 (Prognosegrundlage: Prognose auf Basis von Profilen) and CAV elements[0][0]=E02 (SLP/SEP) appear in the same SG10 instance. The 'identischer Zeitraum-ID' constraint from SEQ DE1050 is structurally satisfied by operating within the same SG8 instance; deeper Zeitraum-ID cross-referencing with other groups is omitted as it would require knowing the external referencing context. (medium confidence)
fn evaluate_199(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator {
Some(n) => n,
None => {
return ctx.filtered_parent_child_has_qualifier(
&["SG4", "SG8"],
"SEQ",
0,
"Z01",
"SG10",
"CCI",
2,
"ZA6",
)
}
};
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
for i in 0..sg8_count {
let seqs = nav.find_segments_in_group("SEQ", &["SG4", "SG8"], i);
if !seqs.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "Z01")
}) {
continue;
}
let sg10_count = nav.child_group_instance_count(&["SG4", "SG8"], i, "SG10");
for j in 0..sg10_count {
let ccis = nav.find_segments_in_child_group("CCI", &["SG4", "SG8"], i, "SG10", j);
if !ccis.iter().any(|s| {
s.elements
.get(2)
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "ZA6")
}) {
continue;
}
let cavs = nav.find_segments_in_child_group("CAV", &["SG4", "SG8"], i, "SG10", j);
if cavs.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "E02")
}) {
return ConditionResult::True;
}
}
}
ConditionResult::False
}
/// [201] Wenn die Marktlokation / Tranche nicht den ganzen Bilanzierungsmonat dem gleichen Tupel aus Bilanzkreis, Zeitreihentyp, Spannungsebene und Lieferant zugeordnet ist
fn evaluate_201(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [202] Wenn SG8 SEQ+Z78 RFF+Z39 (Keine standardisierte Lokationsbündelstruktur vorhanden), mit identischer Zeitraum-ID im DE1050 wie im DE3224 dieses Segments
// REVIEW: Collects Zeitraum-IDs from SG5 LOC.DE3224 (elements[1][3]), checks SEQ+Z78 DE1050 (elements[1][0]) for a match, then verifies RFF+Z39 exists. Co-occurrence of SEQ+Z78 and RFF+Z39 in the same SG8 instance is not verified without navigator group-instance access. (medium confidence)
fn evaluate_202(&self, ctx: &EvaluationContext) -> ConditionResult {
use std::collections::HashSet;
// Collect Zeitraum-IDs from all SG5 LOC segments (DE3224 at elements[1][3])
let loc_zeitraum_ids: HashSet<String> = ctx
.find_segments("LOC")
.into_iter()
.filter_map(|s| s.elements.get(1)?.get(3).cloned())
.filter(|v| !v.is_empty())
.collect();
if loc_zeitraum_ids.is_empty() {
return ConditionResult::False;
}
// Check if any SEQ+Z78 (SG8 Lokationsbündelstruktur) has DE1050 matching a LOC DE3224
let matching_seq = ctx
.find_segments_with_qualifier("SEQ", 0, "Z78")
.into_iter()
.any(|s| {
s.elements
.get(1)
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| {
!v.is_empty() && loc_zeitraum_ids.contains(v.as_str())
})
});
if !matching_seq {
return ConditionResult::False;
}
// Verify RFF+Z39 also exists (co-occurrence in same SG8 not verified without navigator)
ctx.has_qualifier("RFF", 0, "Z39")
}
/// [203] Wenn STS+7++E06 / Z39 / ZC6 / ZC7/ ZT6/ ZT7 vorhanden
fn evaluate_203(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [204] Wenn im SG8+SEQ+Z03/ ZA3/ ZA4 (Zähleinrichtungsdaten) mit der selben Zeitraum-ID im SG8 SEQ DE1050, sowie identischer Qualität im DE1229 der SG8 SEQ für die in diesem RFF DE1154 genannte Geräte...
// REVIEW: Checks each Zähleinrichtungsdaten SEQ qualifier (Z03/ZA3/ZA4) — if any SG8 instance has that SEQ qualifier but no RFF+Z14 (Smartmeter-Gateway reference), the condition is true. The additional Zeitraum-ID and Gerätenummer cross-matching from the full condition text cannot be implemented without per-instance SG8 segment access. (medium confidence)
fn evaluate_204(&self, ctx: &EvaluationContext) -> ConditionResult {
// True if any SG8 with Zähleinrichtungsdaten (SEQ+Z03/ZA3/ZA4) lacks RFF+Z14 (Smartmeter-Gateway)
for qual in &["Z03", "ZA3", "ZA4"] {
if matches!(
ctx.any_group_has_qualifier_without(
"SEQ",
0,
qual,
"RFF",
0,
"Z14",
&["SG4", "SG8"]
),
ConditionResult::True
) {
return ConditionResult::True;
}
}
ConditionResult::False
}
/// [205] Wenn SG5 LOC+Z19 (Steuerbare Ressource) vorhanden
fn evaluate_205(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [206] Wenn SG4 STS+7++ZG5 (Transaktionsgrund: Aufhebung der zukünftigen Zuordnung aufgrund §38 EEG 2014 bzw. §21b Abs. 1 Nr. 2 EEG 2017) nicht vorhanden
fn evaluate_206(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [209] Wenn im selben Segment im DE2379 der Code 303 vorhanden ist
fn evaluate_209(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [210] Wenn SG10 CCI+++ZA6 (Prognose auf Basis von Profilen) in dieser SG8 vorhanden
fn evaluate_210(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [212] Wenn im selben SG12 NAD DE3124 nicht vorhanden
fn evaluate_212(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [213] Wenn SG12 NAD+Z09 (Kunde des Lieferanten) vorhanden
fn evaluate_213(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [215] Wenn in derselben SG8 (Zähleinrichtungsdaten) SG10 CCI+++E13 CAV+MME (Zählertyp: mME) vorhanden
fn evaluate_215(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [216] Wenn CCI+++Z88 (Netznutzung) CAV+Z74:::Z08 (Netznutzungsvertrag: Direkter Vertrag zwischen Kunden und NB) vorhanden
fn evaluate_216(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [217] Wenn SG6 RFF+Z49 (Verwendungszeitraum der Daten: \"Gültige Daten\") vorhanden
fn evaluate_217(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [219] Wenn SG12 NAD+Z65 (Informativer Kunde des Lieferanten) vorhanden
fn evaluate_219(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [220] Wenn SG8 SEQ+Z01/ Z98 (Daten der Marktlokation) SG10 CCI+Z30++Z06 (Lieferrichtung: Erzeugung) in dieser SG8 vorhanden
fn evaluate_220(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [221] Wenn kein SG8 SEQ+Z15 (Daten der Tranche) auf die gleiche Marktlokation-ID mit dem RFF+Z18 (Marktlokation) referenziert wie dieses SG8 SEQ+Z01 (Daten der Marktlokation)
fn evaluate_221(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [223] Wenn das RFF+Z18 (Marktlokation) aus dieser SG8 auf das gleiche SG5 LOC+Z16 (Marktlokation), wie ein RFF+Z18 (Marktlokation) aus einer SG8 SEQ+Z01 (Daten der Marktlokation) verweist, und dort das S...
fn evaluate_223(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [224] Wenn kein SG8 SEQ+ZE7 (Informative Daten der Tranche) auf die gleiche Marktlokation-ID mit dem RFF+Z18 (Marktlokation) referenziert wie dieses SG8 SEQ+Z98 (Informative Daten der Marktlokation)
fn evaluate_224(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [227] Wenn im SG8 SEQ+Z98 (Daten der Marktlokation) das SG10 CCI+++ZA6 (Prognosegrundlage der Marktlokation: Prognose auf Basis von Profilen) CAV+E14 (TLP/TEP) vorhanden
fn evaluate_227(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [229] Wenn der Objektcode im RFF+Z33 (Referenz auf den Objektcode in der Lokationsbündelstruktur) im DE1154 derselben SG8 SEQ+Z58/ ZC9/ ZD0/ ZD6 (Zuordnung Lokation zum Objektcode des Lokationsbündels)...
// REVIEW: Detects if the same (SEQ-qualifier, Zeitraum-ID, RFF+Z33-Objektcode) triple appears in two different SG8 instances — which is what the condition guards against. Uses collect_group_values to correlate SEQ and RFF data by SG8 instance index. Limitation: collect_group_values may only return the first RFF per SG8 instance, so Z33 may be missed if it is not the first RFF in the group. (medium confidence)
fn evaluate_229(&self, ctx: &EvaluationContext) -> ConditionResult {
use std::collections::HashSet;
let target_quals: HashSet<&str> = ["Z58", "ZC9", "ZD0", "ZD6"].iter().cloned().collect();
// Collect per-SG8-instance: SEQ qualifier and Zeitraum-ID
let seq_quals = ctx.collect_group_values("SEQ", 0, 0, &["SG4", "SG8"]);
let seq_zeitraums = ctx.collect_group_values("SEQ", 1, 0, &["SG4", "SG8"]);
// Collect per-SG8-instance: RFF qualifier and DE1154 value
let rff_quals = ctx.collect_group_values("RFF", 0, 0, &["SG4", "SG8"]);
let rff_codes = ctx.collect_group_values("RFF", 0, 1, &["SG4", "SG8"]);
// Detect duplicate (seq_qual, zeitraum_id, objektcode) combinations across SG8 instances
let mut seen: HashSet<(String, String, String)> = HashSet::new();
for (idx, seq_qual) in &seq_quals {
if seq_qual.is_empty() || !target_quals.contains(seq_qual.as_str()) {
continue;
}
let zeitraum_id = seq_zeitraums
.iter()
.find(|(i, _)| i == idx)
.map(|(_, v)| v.as_str())
.unwrap_or("");
// Find RFF+Z33 in this SG8 instance (correlation by instance index)
for (ridx, rff_qual) in rff_quals.iter() {
if ridx != idx || rff_qual != "Z33" {
continue;
}
if let Some((_, obj_code)) = rff_codes.iter().find(|(i, _)| i == ridx) {
if obj_code.is_empty() {
continue;
}
let key = (seq_qual.clone(), zeitraum_id.to_string(), obj_code.clone());
if seen.contains(&key) {
return ConditionResult::True;
}
seen.insert(key);
}
}
}
ConditionResult::False
}
/// [232] Wenn SG10 CCI+++Z83 (Messtechnische Einordnung der Marktlokation) CAV+Z52 (iMS) vorhanden
fn evaluate_232(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [233] Wenn MP-ID in SG2 NAD+MR (Nachrichtenempfänger) in der Rolle NB
fn evaluate_233(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("recipient_role_check")
}
/// [234] Wenn SG10 CCI+++Z83 (Messtechnische Einordnung der Marktlokation) CAV+Z53 (kME/ mME) vorhanden
fn evaluate_234(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [237] Wenn in derselben SG8 im DE7140 des PIA+Z02 (Gruppenartikel-ID / Artikel-ID) eine Gruppenartikel-ID / Artikel-ID mit 1-06 (entspricht Entgelte des Messstellenbetriebs bei kME) beginnt
fn evaluate_237(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [238] Wenn SG4 IDE+24 (Vorgang) nicht vorhanden
fn evaluate_238(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [239] Wenn in derselben SG10 das CCI+Z17 (Stromverbrauchsart) im CAV+Z65 (Wärme/Kälte) vorhanden
fn evaluate_239(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [240] Wenn SG8 SEQ+Z01 (Daten der Marktlokation) CCI+Z22++Z91 (Veräußerungsform der erzeugenden Marktlokation:: Marktprämie) vorhanden
fn evaluate_240(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [241] Wenn MP-ID in SG2 NAD+MR (Nachrichtenempfänger) in der Rolle MSB
fn evaluate_241(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("recipient_role_check")
}
/// [243] Wenn SG10 CCI+6++ZA8 (Aggreg.verantw. NB) in dieser SG8 vorhanden
fn evaluate_243(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [244] Wenn SG10 CCI+6++ZA9 (Aggreg.verantw. ÜNB) in dieser SG8 vorhanden
fn evaluate_244(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [248] Wenn die Inbetriebnahme der verbrauchenden Marktlokation innerhalb der letzten drei Jahre war und die Energie der Marktlokation mit iMS ausgestatteten Messlokationen erfolgt
fn evaluate_248(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [249] Innerhalb eines SG4 IDE müssen alle DE1131 der SG4 STS+E01 (Status der Antwort) den identischen Wert enthalten
fn evaluate_249(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [251] Wenn MP-ID in SG2 NAD+MS (Nachrichtensender) in der Rolle BIKO
fn evaluate_251(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("sender_role_check")
}
/// [252] Wenn DE0068 vorhanden
fn evaluate_252(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [254] Es ist der Code \"AUA\" einzutragen
fn evaluate_254(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [255] Wenn Marktlokation am Redispatch 2.0 teilnimmt
fn evaluate_255(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [256] Wenn in derselben SG8 SEQ (OBIS-Daten der Zähleinrichtung / Smartmeter-Gateway) das PIA+5+1-b?:1.8.e / 1-b?:2.8.e vorhanden
fn evaluate_256(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [257] Wenn in derselben SG8 SEQ (OBIS-Daten der Marktlokation) das PIA+5+1-b?:1.9.e vorhanden
fn evaluate_257(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [259] Wenn in diesem PIA der Code im DE7140 mit 1-01, 1-03, 1-05 enthalten ist
fn evaluate_259(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [261] Wenn in diesem PIA der Code im DE7140 mit 1-07-1/2, 1-10-1/2/4/5/6/7/8/9, 1-11-1 beginnt
fn evaluate_261(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [262] Wenn Produkt an der Marktlokation vorhanden ist
fn evaluate_262(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [265] Wenn im SG8 SEQ+Z01/ Z98 (Daten der Marktlokation) das SG10 CCI+++ZA6 (Prognosegrundlage der Marktlokation: Prognose auf Basis von Profilen) CAV+Z36 (TEP m. Referenzmessung) vorhanden
fn evaluate_265(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [266] Wenn im SG8 SEQ+Z01 (Daten der Marktlokation) mit identischer Zeitraum-ID im SG8 SEQ+Z01 DE1050 wie in dieser SG8 SEQ, das SG10 CCI+++ZA6 (Prognosegrundlage der Marktlokation: Prognose auf Basis vo...
// REVIEW: Navigates all SG8 instances and their SG10 children, checking for CCI with elements[2][0]=ZA6 (Prognosegrundlage) co-occurring with CAV with elements[0][0]=Z36 (TEP m. Referenzmessung) in the same SG10 instance. The parent SG8 SEQ+Z01 filter and Zeitraum-ID cross-matching are not verified due to lack of direct SG8-level segment access; relies on CCI+ZA6/CAV+Z36 being specific enough to Marktlokation groups. (medium confidence)
fn evaluate_266(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator {
Some(n) => n,
None => {
// Fallback: check any SG8+SEQ+Z01 child SG10 has CAV+Z36
return ctx.filtered_parent_child_has_qualifier(
&["SG4", "SG8"],
"SEQ",
0,
"Z01",
"SG10",
"CAV",
0,
"Z36",
);
}
};
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
for i in 0..sg8_count {
let sg10_count = nav.child_group_instance_count(&["SG4", "SG8"], i, "SG10");
for j in 0..sg10_count {
// CCI+++ZA6 means elements[2][0] == "ZA6"
let ccis = nav.find_segments_in_child_group("CCI", &["SG4", "SG8"], i, "SG10", j);
let has_cci_za6 = ccis.iter().any(|s| {
s.elements
.get(2)
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "ZA6")
});
if has_cci_za6 {
let cavs =
nav.find_segments_in_child_group("CAV", &["SG4", "SG8"], i, "SG10", j);
if cavs.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "Z36")
}) {
return ConditionResult::True;
}
}
}
}
ConditionResult::False
}
/// [267] Wenn SG8 SEQ+Z38 (Referenzprofildaten) nicht vorhanden
fn evaluate_267(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [268] Wenn der Code im DE3207 in der \"EDI@Energy Codeliste der europäischen Ländercodes\" in der Spalte \"PLZ vorhanden\" ein \"X\" aufgeführt ist
fn evaluate_268(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [269] Es sind alle OBIS-Kennzahlen gem. EDI@Energy Codeliste der OBIS-Kennzahlen und Medien für den deutschen Energiemarkt Kap.3 anzugeben welche an der Tranche erforderlich sind
fn evaluate_269(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [270] Wenn in diesem PIA der Code im DE7140 mit 1-02, 1-04, 1-06, 1-09 beginnt
fn evaluate_270(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [273] Wenn in derselben SG8 SEQ+Z20 (OBIS-Daten der Zähleinrichtung / Smartmeter-Gateway) das PIA+5+1-b?:1.8.e / 1-b?:2.8.e / 1-b?:3.8.e / 1-b?:4.8.e / 1-b?:5.8.e / 1-b?:6.8.e / 1-b?:7.8.e / 1-b?:8.8.e ...
fn evaluate_273(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [279] Wenn STS+7++xxx+ZW4 / ZAP (Transaktionsgrundergänzung verbrauchende Marktlokation / ruhende Marktlokation) vorhanden
fn evaluate_279(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [280] Nur MP-ID aus Sparte Strom
fn evaluate_280(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [282] Wenn in diesem PIA der Code im DE7140 1-01-6-005, 1-01-9-001/002, 1-07-3-001, 1- 08-1-001, 1-08-3-001, 1-08-4-001/002/003/004, 1-10-3-001 enthalten ist
fn evaluate_282(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [284] Erlaubte Codes aus der Codeliste der Gruppenartikel- und Artikel-ID sind in der Spalte UTILMD/Codeverwendung mit X gekennzeichnet
fn evaluate_284(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [285] Wenn in diesem PIA der Code im DE7140 mit 1-08-3-AGS angegeben ist
fn evaluate_285(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [286] Wenn in diesem PIA der Code im DE7140 mit 1-08-1/2/4/5-AGS-KG
fn evaluate_286(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [287] Erlaubte Codes aus der PRICAT BGM+ Z70 (Preisblatt Netznutzung) des verantwortlichen NB
fn evaluate_287(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [288] Wenn in derselben SG8 (OBIS-Daten der Marktlokation) das PIA+5+1-b?:2.9.e vorhanden
fn evaluate_288(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [291] Wenn in derselben SG8 (Zuordnung Lokation zum Objektcode des Lokationsbündels) das RFF+Z37 vorhanden
fn evaluate_291(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [292] Es sind nur die Produkt-Codes erlaubt, die in der Codeliste der Konfigurationen im Kapitel 6.1 \"Anmeldung einer Zuordnung des LFN (UTILMD)\" in der Spalte \"Anmeldung einer Zuordnung des LFN (UTIL...
fn evaluate_292(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("code_list_membership_check")
}
/// [293] Wenn SG5 LOC+Z22 (ruhende Marktlokation) vorhanden
fn evaluate_293(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [294] Wenn SG5 LOC+Z18 (Netzlokation) vorhanden
fn evaluate_294(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [295] Wenn SG5 LOC+Z15 (MaBiS-Zählpunkt) nicht vorhanden
fn evaluate_295(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [296] Wenn SG5 LOC+Z20 (Technische Ressource) vorhanden
fn evaluate_296(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [297] #kv# Wenn SG5 LOC+Z18 (Netzlokation) nicht vorhanden
fn evaluate_297(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [298] Wenn SG5 LOC+Z20 (Technische Ressource) nicht vorhanden
fn evaluate_298(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [299] #kv# Wenn SG5 LOC+Z19 (Steuerbare Ressource) nicht vorhanden
fn evaluate_299(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [300] Wenn SG8 SEQ+Z15/ ZE7 (Daten der Tranche) nicht vorhanden
fn evaluate_300(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [301] Wenn BGM+E03 (Änderungsmeldung) vorhanden
fn evaluate_301(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [302] Wenn SG8 SEQ+Z08 (Profilschardaten) nicht vorhanden
fn evaluate_302(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [303] Wenn SG8 SEQ+Z21 (Profildaten) nicht vorhanden
fn evaluate_303(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [304] Wenn SG8 SEQ+Z22 (Daten der Summenzeitreihe) vorhanden
fn evaluate_304(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [305] Wenn SG8 SEQ+Z24 (Daten der Überführungszeitreihe) vorhanden
fn evaluate_305(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [306] Wenn SG5 LOC+Z22 (ruhende Marktlokation) mit derselben Zeitraum-ID im DE3224 vorhanden wie in dieser SG8 im DE1050 (Referenz auf Zeitraum-ID) des SEQ+Z58
fn evaluate_306(&self, ctx: &EvaluationContext) -> ConditionResult {
use std::collections::HashSet;
// Collect Zeitraum-IDs from SG5 LOC+Z22 (Ruhende Marktlokation) — DE3224 at elements[1][3]
let loc_z22_ids: HashSet<String> = ctx
.find_segments_with_qualifier("LOC", 0, "Z22")
.into_iter()
.filter_map(|s| s.elements.get(1)?.get(3).cloned())
.filter(|v| !v.is_empty())
.collect();
if loc_z22_ids.is_empty() {
return ConditionResult::False;
}
// Check if any SG8 SEQ+Z58 has DE1050 (elements[1][0]) matching a LOC+Z22 DE3224
let has_match = ctx
.find_segments_with_qualifier("SEQ", 0, "Z58")
.iter()
.any(|s| {
s.elements
.get(1)
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| !v.is_empty() && loc_z22_ids.contains(v.as_str()))
});
ConditionResult::from(has_match)
}
/// [307] Wenn SG5 LOC+Z22 (ruhende Marktlokation) mit derselben Zeitraum-ID im DE3224 nicht vorhanden wie in dieser SG8 im DE1050 (Referenz auf Zeitraum-ID) des SEQ+Z58
// REVIEW: Collects Zeitraum-IDs from SG5 LOC+Z22 segments (DE3224 = elements[1][3]) and SEQ+Z58 segments (DE1050 = elements[1][0]). Returns True when any SEQ+Z58 has a Zeitraum-ID with no matching LOC+Z22 entry. Message-wide fallback since group-level Zeitraum-ID isolation is not possible without navigator. (medium confidence)
fn evaluate_307(&self, ctx: &EvaluationContext) -> ConditionResult {
let seq_segs = ctx.find_segments_with_qualifier("SEQ", 0, "Z58");
if seq_segs.is_empty() {
return ConditionResult::Unknown;
}
let loc_segs = ctx.find_segments_with_qualifier("LOC", 0, "Z22");
let loc_z22_zeitraum_ids: Vec<&str> = loc_segs
.iter()
.filter_map(|s| s.elements.get(1).and_then(|e| e.get(3)).map(|v| v.as_str()))
.filter(|v| !v.is_empty())
.collect();
ConditionResult::from(seq_segs.iter().any(|seq| {
let zid = seq
.elements
.get(1)
.and_then(|e: &Vec<String>| e.first())
.map(|v| v.as_str())
.unwrap_or("");
!zid.is_empty() && !loc_z22_zeitraum_ids.contains(&zid)
}))
}
/// [309] Wenn SG5 LOC+Z22 (ruhende Marktlokation) nicht vorhanden
fn evaluate_309(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [314] Es sind alle OBIS-Kennzahlen gem. Codeliste der OBIS-Kennzahlen und Medien Kapitel 3 anzugeben welche an der Marktlokation erforderlich sind. Der Mindestumfang der OBIS-Kennzahlen ergibt sich aus d...
fn evaluate_314(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("code_list_membership_check")
}
/// [315] Wenn BGM+Z88 (Datenclearing) vorhanden
fn evaluate_315(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("data_clearing_required")
}
/// [316] Wenn in derselben SG8 das RFF+Z14 (Smartmeter-Gateway) nicht vorhanden
fn evaluate_316(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.any_group_has_qualifier_without("SEQ", 0, "Z03", "RFF", 0, "Z14", &["SG4", "SG8"])
}
/// [317] Es ist derselbe Wert wie im DE2380 von DTM+92 (Datum Vertragsbeginn) einzutragen
fn evaluate_317(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [318] Es ist derselbe Wert wie im DE2380 von DTM+93 (Datum Vertragende) einzutragen
fn evaluate_318(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [321] Wenn im DE3155 in demselben COM der Code EM vorhanden ist
fn evaluate_321(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [322] Wenn im DE3155 in demselben COM der Code TE / FX / AJ / AL vorhanden ist
fn evaluate_322(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [323] Es sind alle OBIS-Kennzahlen gem. EDI@Energy Codeliste der OBIS-Kennzahlen und Medien für den deutschen Energiemarkt Kap. 3. anzugeben, welche an der Zähleinrichtung genutzt werden. Der Mindestum...
fn evaluate_323(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("code_list_membership_check")
}
/// [327] Wenn die Zeitraum-ID im DE1050 dieser SG8 SEQ, welche mit der Zeitraum-ID einer SG6 RFF+Z47/Z48/Z49 (Verwendungszeitraum der Daten) identisch ist und in deren SG das SG6 DTM+Z25 (Verwendung der Dat...
// REVIEW: Step 1: Collect all SEQ DE1050 Zeitraum-IDs. Step 2: Find RFF+Z47/Z48/Z49 (Verwendungszeitraum) whose DE1156 (elements[0][2]) matches. Step 3: Check co-located DTM+Z25 DE2380 (elements[0][1]) >= threshold after normalising EDIFACT escape '?+' to '+'. Falls back to message-wide DTM search which may give false positives if multiple SG6 groups are present, but is sufficient for typical single-transaction messages. (medium confidence)
fn evaluate_327(&self, ctx: &EvaluationContext) -> ConditionResult {
const THRESHOLD: &str = "202212312300+00";
let seq_zeitraum_ids: Vec<String> = ctx
.find_segments("SEQ")
.iter()
.filter_map(|s| {
s.elements
.get(1)
.and_then(|e: &Vec<String>| e.first())
.cloned()
})
.filter(|v| !v.is_empty())
.collect();
if seq_zeitraum_ids.is_empty() {
return ConditionResult::Unknown;
}
let rff_segs = ctx.find_segments("RFF");
let matching_rff = rff_segs.iter().any(|rff| {
let qual = rff
.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.map(|v| v.as_str())
.unwrap_or("");
if !["Z47", "Z48", "Z49"].contains(&qual) {
return false;
}
let zid = rff
.elements
.first()
.and_then(|e| e.get(2))
.map(|v| v.as_str())
.unwrap_or("");
!zid.is_empty() && seq_zeitraum_ids.iter().any(|id| id.as_str() == zid)
});
if !matching_rff {
return ConditionResult::False;
}
for dtm in ctx.find_segments_with_qualifier("DTM", 0, "Z25") {
let val = dtm
.elements
.first()
.and_then(|e| e.get(1))
.map(|v| v.replace("?+", "+"))
.unwrap_or_default();
if !val.is_empty() && val.as_str() >= THRESHOLD {
return ConditionResult::True;
}
}
ConditionResult::False
}
/// [329] Wenn in dieser SG4 IDE+24 das STS+E01++A03: E_0096 bzw. A04:E_0097 (Status der Antwort) nicht vorhanden
fn evaluate_329(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [331] Wenn im SG8 SEQ+Z98 (Daten der Marktlokation) das SG10 CCI+6++ZA9 (Aggreg. verantw. ÜNB) nicht vorhanden
fn evaluate_331(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [332] Wenn im SG8 SEQ+Z01 (Daten der Marktlokation) mit identischer Zeitraum-ID im DE1050 wie in dieser SG8, das SG10 CCI+6++ZA9 (Aggreg. verantw. ÜNB) nicht vorhanden
// REVIEW: Checks whether any SG8 instance lacks CCI+6++ZA9 (Aggregationsverantwortung ÜNB, elements[0]='6' and elements[2][0]='ZA9') in its SG10 children. With navigator: iterates SG8 instances and their SG10 children. Without navigator: falls back to message-wide CCI+6 with ZA9 check. The Zeitraum-ID cross-reference between this SG8 and the Z01 SG8 cannot be fully verified without direct SG8-level segment access via navigator, so this is an approximation that may produce false positives in multi-SG4-group messages. (medium confidence)
fn evaluate_332(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator {
Some(n) => n,
None => {
if ctx.find_segments_with_qualifier("SEQ", 0, "Z01").is_empty() {
return ConditionResult::Unknown;
}
let has_cci_za9 = ctx
.find_segments_with_qualifier("CCI", 0, "6")
.iter()
.any(|s| {
s.elements
.get(2)
.and_then(|e: &Vec<String>| e.first())
.map(|v| v.as_str())
== Some("ZA9")
});
return ConditionResult::from(!has_cci_za9);
}
};
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
if sg8_count == 0 {
return ConditionResult::Unknown;
}
for sg8_idx in 0..sg8_count {
let sg10_count = nav.child_group_instance_count(&["SG4", "SG8"], sg8_idx, "SG10");
let mut has_cci_za9 = false;
for sg10_idx in 0..sg10_count {
let ccis = nav.find_segments_in_child_group(
"CCI",
&["SG4", "SG8"],
sg8_idx,
"SG10",
sg10_idx,
);
if ccis.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.map(|v| v.as_str())
== Some("6")
&& s.elements
.get(2)
.and_then(|e: &Vec<String>| e.first())
.map(|v| v.as_str())
== Some("ZA9")
}) {
has_cci_za9 = true;
break;
}
}
if !has_cci_za9 {
return ConditionResult::True;
}
}
ConditionResult::False
}
/// [333] Wenn in diesem RFF \"Referenz auf die Lokationsbündelstruktur\" im DE1153 der Code Z31 \"Lokationsbündelstruktur\" vorhanden ist
fn evaluate_333(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [334] Nur MP-ID aus Sparte Gas
fn evaluate_334(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [335] Wenn in dieser SG8 im SEQ+Z58 (Zuordnung Lokation zum Objektcode des Lokationsbündels) im DE1050 eine Zeitraum-ID angegeben wird, wie in einer SG8 SEQ+Z78 RFF+Z31 (Referenz auf die Lokationsbünde...
// REVIEW: Collects Zeitraum-IDs from SEQ+Z58 DE1050 (elements[1][0]). Verifies an SG8 with SEQ+Z78 exists (entry for Lokationsbündelstruktur). Collects IDs from RFF+Z31 DE1154 (elements[0][1]) and checks if any SEQ+Z58 Zeitraum-ID matches. Co-location of RFF+Z31 with SEQ+Z78 in the same SG8 instance is approximated message-wide; exact co-location verification would require navigator SG8-level segment access. (medium confidence)
fn evaluate_335(&self, ctx: &EvaluationContext) -> ConditionResult {
let z58_ids: Vec<String> = ctx
.find_segments_with_qualifier("SEQ", 0, "Z58")
.iter()
.filter_map(|s| {
s.elements
.get(1)
.and_then(|e: &Vec<String>| e.first())
.cloned()
})
.filter(|v| !v.is_empty())
.collect();
if z58_ids.is_empty() {
return ConditionResult::Unknown;
}
if ctx.find_segments_with_qualifier("SEQ", 0, "Z78").is_empty() {
return ConditionResult::False;
}
let rff_z31_ids: Vec<String> = ctx
.find_segments("RFF")
.iter()
.filter(|rff| {
rff.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.map(|v| v.as_str())
== Some("Z31")
})
.filter_map(|rff| rff.elements.first().and_then(|e| e.get(1)).cloned())
.filter(|v| !v.is_empty())
.collect();
ConditionResult::from(z58_ids.iter().any(|id| rff_z31_ids.contains(id)))
}
/// [336] Wenn in Änderungsmeldung gefüllt
fn evaluate_336(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [337] Wenn SG10 CCI+++ZB4 (Bezeichnung der Summenzeitreihe) CAV+Z95/ Z96 vorhanden
fn evaluate_337(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [338] Wenn CCI+++ZB4 (Bezeichnung der Summenzeitreihe) CAV+Z95/ Z96/ Z97/ Z99/ ZA1/ ZA3/ ZA4/ZG7 vorhanden
fn evaluate_338(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [339] Wenn CCI+++ZB4 (Bezeichnung der Summenzeitreihe) CAV+Z97/ Z98/ Z99/ ZA0/ ZA1/ ZA2/ ZA3/ ZA6/ ZG7 vorhanden
fn evaluate_339(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [340] Wenn CCI+++ZB4 (Bezeichnung der Summenzeitreihe) CAV+Z95/ Z97/ Z98/ Z99/ ZA1/ ZA2/ ZA3/ ZA4/ ZA5/ ZA6 vorhanden
fn evaluate_340(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [341] Wenn CCI+++ZB4 (Bezeichnung der Summenzeitreihe) CAV+Z96/ ZA0/ ZG7 vorhanden
fn evaluate_341(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [342] Wenn aktiver MaBiS-ZP für den Betrachtungszeitraum vorhanden
fn evaluate_342(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [344] Wenn in dieser SG8 das SG10 CCI+++ZB4 (Bezeichnung der Summenzeitreihe) CAV+ZF1 (Netzgangzeitreihe (NGZ)) vorhanden
fn evaluate_344(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [345] Wenn SG5 LOC+Z17 (Messlokation) vorhanden
fn evaluate_345(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [346] Wenn SG10 CCI+++E13 (Zählertyp) CAV+MME (mME) vorhanden
fn evaluate_346(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [347] Wenn SG5 LOC+Z16 (Marktlokation) nicht vorhanden
fn evaluate_347(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [348] Wenn SG5 LOC+Z21 (Tranche) nicht vorhanden
fn evaluate_348(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [349] Wenn SG5 LOC+Z17 (Messlokation) nicht vorhanden
fn evaluate_349(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [350] Wenn SG8 SEQ+Z78/ZD5 RFF+Z31 (Referenz auf die Lokationsbündelstruktur) vorhanden
fn evaluate_350(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [351] Wenn SG4 STS+E01++A04/ A05 /A13 /A14 (Status der Antwort) vorhanden
fn evaluate_351(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [352] Wenn SG4 STS++A05/ A06/ A14 /A15 (Status der Antwort) vorhanden
fn evaluate_352(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [355] Wenn SG4 STS+E01++A45 (Status der Antwort) vorhanden
fn evaluate_355(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [356] Wenn SG4 STS+E01++A50 (Status der Antwort) vorhanden
fn evaluate_356(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [357] Wenn SG4 STS+E01++A03/ A09/ A12/ A17 (Status der Antwort) vorhanden
fn evaluate_357(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [358] Wenn SG4 STS+E01++A06 (Status der Antwort) vorhanden
fn evaluate_358(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [359] Es sind nur Antwortcodes aus dem Cluster Ablehnung erlaubt
fn evaluate_359(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [360] Es sind nur Antwortcodes aus dem Cluster Zustimmung erlaubt
fn evaluate_360(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [363] Wenn SG4 STS+E01++A50 (Status der Antwort) vorhanden
fn evaluate_363(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [365] Wenn in dieser SG4 IDE+24 das STS+E01++A04:E_0047/E_0014 bzw. A03:E_0049/E_0004 (Status der Antwort) nicht vorhanden
fn evaluate_365(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [366] Bis auf den Code A30 sind alle Codes aus EBD E_0624 im Cluster Ablehnung erlaubt
fn evaluate_366(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [367] Wenn SG4 STS+E01++A05/ A14 (Status der Antwort) vorhanden
fn evaluate_367(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [368] Bis auf den Code A41 sind alle Codes aus EBD E_0624 im Cluster Ablehnung erlaubt
fn evaluate_368(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [370] Wenn SG10 CAV+TLS/TES/BIT/GET/GAT/SOT/WNT/WFT/WAT
fn evaluate_370(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [371] Wenn SG8 SEQ+Z38 (Referenzprofildaten) nicht vorhanden
fn evaluate_371(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [372] Wenn SG10 CAV+TES/BIT/GET/GAT/SOT/WNT/WFT/WAT vorhanden
fn evaluate_372(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [373] Wenn ein Referenzprofil an der Marktlokation vorhanden ist
fn evaluate_373(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [375] Für die ID im SG5 LOC+Z15 (MaBiS-Zählpunkt) DE3225, wenn SG8+Z24 (Daten der Überführungszeitreihe) nicht vorhanden
fn evaluate_375(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [376] Für die ID im SG5 LOC+Z15 (MaBiS-Zählpunkt) DE3225, wenn SG8+Z22 (Daten der Summenzeitreihe) nicht vorhanden
fn evaluate_376(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [377] Wenn SG10 CCI+15++Z21 (Überführungszeitreihentyp) CAV+AUS vorhanden
// REVIEW: Checks if any SG8 has a child SG10 with CCI[0]='15' and CCI[2]='Z21' (Überführungszeitreihentyp) followed by CAV with value 'AUS'. Follows the navigator pattern from example 10 exactly. (medium confidence)
fn evaluate_377(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator {
Some(n) => n,
None => return ctx.has_qualified_value("CAV", 0, "AUS", 0, 0, &["AUS"]),
};
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
for i in 0..sg8_count {
let sg10_count = nav.child_group_instance_count(&["SG4", "SG8"], i, "SG10");
for j in 0..sg10_count {
let ccis = nav.find_segments_in_child_group("CCI", &["SG4", "SG8"], i, "SG10", j);
let has_cci = ccis.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "15")
&& s.elements
.get(2)
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "Z21")
});
if has_cci {
let cavs =
nav.find_segments_in_child_group("CAV", &["SG4", "SG8"], i, "SG10", j);
if cavs.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "AUS")
}) {
return ConditionResult::True;
}
}
}
}
ConditionResult::False
}
/// [378] Wenn SG10 CCI+15++Z21 (Überführungszeitreihentyp) CAV+AUS nicht vorhanden
// REVIEW: Logical negation of condition 377: True when CCI+15++Z21 CAV+AUS is NOT present in any SG8's SG10 child. Iterates all instances and returns True only if the combination is never found. (medium confidence)
fn evaluate_378(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator {
Some(n) => n,
None => {
let r = ctx.has_qualified_value("CAV", 0, "AUS", 0, 0, &["AUS"]);
return match r {
ConditionResult::True => ConditionResult::False,
ConditionResult::False => ConditionResult::True,
ConditionResult::Unknown => ConditionResult::Unknown,
};
}
};
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
for i in 0..sg8_count {
let sg10_count = nav.child_group_instance_count(&["SG4", "SG8"], i, "SG10");
for j in 0..sg10_count {
let ccis = nav.find_segments_in_child_group("CCI", &["SG4", "SG8"], i, "SG10", j);
let has_cci = ccis.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "15")
&& s.elements
.get(2)
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "Z21")
});
if has_cci {
let cavs =
nav.find_segments_in_child_group("CAV", &["SG4", "SG8"], i, "SG10", j);
if cavs.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "AUS")
}) {
return ConditionResult::False;
}
}
}
}
ConditionResult::True
}
/// [379] Wenn SG10 CCI+15++Z21 (Überführungszeitreihentyp) CAV+ Code für EEG-Überführungszeitreihen (ausgenommen AU1) vorhanden
fn evaluate_379(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [380] Wenn SG10 CCI+15++Z21 (Überführungszeitreihentyp) CAV+AUS/AU1 vorhanden
// REVIEW: Variant of condition 377 that accepts either 'AUS' or 'AU1' as the CAV value for the Überführungszeitreihentyp. Same SG8→SG10 parent-child navigation, broadened CAV value check. (medium confidence)
fn evaluate_380(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator {
Some(n) => n,
None => {
return ctx.any_group_has_any_qualifier("CAV", 0, &["AUS", "AU1"], &["SG4", "SG8"])
}
};
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
for i in 0..sg8_count {
let sg10_count = nav.child_group_instance_count(&["SG4", "SG8"], i, "SG10");
for j in 0..sg10_count {
let ccis = nav.find_segments_in_child_group("CCI", &["SG4", "SG8"], i, "SG10", j);
let has_cci = ccis.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "15")
&& s.elements
.get(2)
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "Z21")
});
if has_cci {
let cavs =
nav.find_segments_in_child_group("CAV", &["SG4", "SG8"], i, "SG10", j);
if cavs.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "AUS" || v == "AU1")
}) {
return ConditionResult::True;
}
}
}
}
ConditionResult::False
}
/// [384] Wenn in derselben SG8 SG10 CCI+Z37++ZD1 (Basis zur Bildung der Tranchengröße) (Prozentual) vorhanden
fn evaluate_384(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [386] Wenn mehr als eine SG8 SEQ+Z02/ ZE3 (OBIS-Daten der Marktlokation) mit einer OBIS-Kennzahl für Energiemenge im PIA+5 vorhanden
fn evaluate_386(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [387] Wenn in derselben SG8 (OBIS Daten der Marktlokation) eine OBIS-Kennzahl für Energiemenge im PIA+5 vorhanden und es sich lt. Codeliste OBIS um eine OBIS mit zugeordneter Zählzeit handelt (Tarif: e...
fn evaluate_387(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [388] Segmentgruppe ist mindesten einmal für jede Zeitraum-ID aus dem DE1156 der SG6 RFF+Z49 (Verwendungszeitraum der Daten: \"Gültige Daten\") anzugeben, wenn in diesem Zeitraum Blindarbeit bzw. -leis...
fn evaluate_388(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [391] Wenn in derselben SG8 SEQ+Z20 (OBIS Daten der Zähleinrichtung / Smartmeter-Gateway) eine OBIS-Kennzahl für Zählerstand im PIA+5 vorhanden und es sich lt. Codeliste OBIS um eine OBIS mit zugeordn...
fn evaluate_391(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [392] Wenn in diesem PIA der Code im Format n1-n2-n1 angegeben ist
fn evaluate_392(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [393] Wenn in diesem PIA der Code im Format n1-n2-n1-n3 angegeben ist
fn evaluate_393(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [394] Wenn in diesem PIA der Code im Format n1-n2-n1-n8-n2 angegeben ist
fn evaluate_394(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [395] Wenn in diesem PIA der Code im Format n1-n2-n1-n8 angegeben ist
fn evaluate_395(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [396] Wenn in derselben SG8 SEQ+Z02/ ZA1/ ZA2 (OBIS-Daten der Marktlokation) eine OBIS-Kennzahl für Wirkarbeit und 1/4 Stunde im PIA+5 vorhanden
fn evaluate_396(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [397] Wenn in diesem PIA der Code im DE7140 mit 1-08-1/1-08-4 beginnt
fn evaluate_397(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [398] Wenn in diesem PIA der Code im DE7140 mit 1-08-2/1-08-5 beginnt
fn evaluate_398(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [399] Wenn im SG8 SEQ+Z78 mit identischer Zeitraum-ID im DE1050 wie im DE3224 dieses Segments, das RFF+Z31 (Lokationsbündelstruktur) im DE1153 der Code Z31 (Lokationsbündelstruktur) vorhanden, und im D...
// REVIEW: Condition is True when an SG8 SEQ+Z78 exists whose Zeitraum-ID (DE1050) matches DE3224 of the current LOC segment (accessed via SG5 group navigator as LOC.C517.DE3224 = elements[1][3]), AND that Z78 SG8 has RFF+Z31 with a DE1154 value that is NOT the pauschal code 9992000000018. This identifies bundle structures that reference a non-pauschal Lokationsbündelstruktur. (medium confidence)
fn evaluate_399(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator() {
Some(n) => n,
None => return ConditionResult::Unknown,
};
// Collect DE3224 values from LOC segments in SG5 — LOC.C517.DE3224 = elements[1][3]
// These serve as the Zeitraum-IDs referenced by the condition's "dieses Segments"
let sg5_count = nav.group_instance_count(&["SG4", "SG5"]);
let mut loc_zeitraum_ids: Vec<String> = Vec::new();
for i in 0..sg5_count {
let locs = nav.find_segments_in_group("LOC", &["SG4", "SG5"], i);
for loc in &locs {
if let Some(zid) = loc.elements.get(1).and_then(|e| e.get(3)) {
if !zid.is_empty() {
loc_zeitraum_ids.push(zid.clone());
}
}
}
}
if loc_zeitraum_ids.is_empty() {
return ConditionResult::Unknown;
}
let pauschal_id = "9992000000018";
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
// Find any Z78 SG8 whose Zeitraum-ID (SEQ.C286.DE1050) matches a LOC DE3224
// and that has RFF+Z31 with DE1154 != pauschal_id
for i in 0..sg8_count {
let seqs = nav.find_segments_in_group("SEQ", &["SG4", "SG8"], i);
for seq in &seqs {
if !seq
.elements
.first()
.and_then(|e| e.first())
.is_some_and(|v| v == "Z78")
{
continue;
}
let zid = seq
.elements
.get(1)
.and_then(|e| e.first())
.map(|s| s.as_str())
.unwrap_or("");
if !loc_zeitraum_ids.iter().any(|z| z == zid) {
continue;
}
// Matching Z78 SG8 found — check RFF+Z31 DE1154
let rffs = nav.find_segments_in_group("RFF", &["SG4", "SG8"], i);
for rff in &rffs {
let qual = rff
.elements
.first()
.and_then(|e| e.first())
.map(|v| v.as_str())
.unwrap_or("");
if qual == "Z31" {
let id = rff
.elements
.first()
.and_then(|e| e.get(1))
.map(|v| v.as_str())
.unwrap_or("");
let normalized = id.replace(' ', "");
if !normalized.is_empty() && normalized != pauschal_id {
return ConditionResult::True;
}
}
}
}
}
ConditionResult::False
}
/// [401] Wenn dieses DTM+Z25 (Verwendung der Daten ab) nicht im SG6 RFF+Z49/ Z53 (Verwendungszeitraum der Daten: Gültige Daten/ Keine Daten) mit der Zeitraum ID \"1\" im DE1156 ist, muss das Datum dem DTM+...
fn evaluate_401(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [402] Wenn in derselben SG8 (OBIS-Daten der Zähleinrichtung / Smartmeter-Gateway) eine OBIS-Kennzahl der Werteart \"Zählerstand\" im PIA+5 vorhanden
fn evaluate_402(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [403] Wenn nicht dieselbe MP-ID in SG2 NAD+MS (Nachrichtensender) und im SG8 SEQ+Z01 (Daten der Marktlokation) SG10 CCI+++ZB3 (Zugeordnete Marktpartner) CAV+Z91 (Messtellenbetreiber) vorhanden
// REVIEW: Gets NAD+MS MP-ID from SG2 (elements[1][0]), then navigates all SG8→SG10 instances looking for CCI with elements[2][0]='ZB3' (Zugeordnete Marktpartner) and CAV with elements[0][0]='Z91' (Messstellenbetreiber). Compares the CAV+Z91 MP-ID (elements[0][1]) with the sender MP-ID. Returns True when they differ (not the same). Note: SEQ+Z01 filter on the parent SG8 is omitted because `find_segments_in_child_group` only accesses child groups, not the parent SG8 segments; the Z91 MSB identity is message-consistent regardless. (medium confidence)
fn evaluate_403(&self, ctx: &EvaluationContext) -> ConditionResult {
let sender_mp_id: String = match ctx.find_segments_with_qualifier("NAD", 0, "MS").first() {
Some(nad) => match nad.elements.get(1).and_then(|e: &Vec<String>| e.first()) {
Some(id) if !id.is_empty() => id.clone(),
_ => return ConditionResult::Unknown,
},
None => return ConditionResult::Unknown,
};
let nav = match ctx.navigator {
Some(n) => n,
None => return ConditionResult::Unknown,
};
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
for i in 0..sg8_count {
let sg10_count = nav.child_group_instance_count(&["SG4", "SG8"], i, "SG10");
for j in 0..sg10_count {
let ccis = nav.find_segments_in_child_group("CCI", &["SG4", "SG8"], i, "SG10", j);
let has_cci_zb3 = ccis.iter().any(|s| {
s.elements
.get(2)
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "ZB3")
});
if !has_cci_zb3 {
continue;
}
let cavs = nav.find_segments_in_child_group("CAV", &["SG4", "SG8"], i, "SG10", j);
for cav in &cavs {
if cav
.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "Z91")
{
if let Some(msb_id) = cav.elements.first().and_then(|e| e.get(1)) {
if !msb_id.is_empty() {
return ConditionResult::from(
sender_mp_id.as_str() != msb_id.as_str(),
);
}
}
}
}
}
}
ConditionResult::Unknown
}
/// [404] Wenn nicht dieselbe MP-ID in SG2 NAD+MR (Nachrichtenempfänger) und im SG8 SEQ+Z01/ Z98 (Daten der Marktlokation) SG10 CCI+++ZB3 (Zugeordnete Marktpartner) CAV+Z91 (Messtellenbetreiber) vorhanden
// REVIEW: Reads NAD+MR MP-ID from elements[1][0], then iterates all SG8 SG10 children looking for CCI with elements[2][0]==ZB3 and CAV with elements[0][0]==Z91 where the MP-ID (elements[0][1]) matches. Returns False if same MP-ID found (condition 'not same' fails), True otherwise. Approximation: cannot filter SG8 instances by SEQ+Z01/Z98 without find_segments_in_group; checks all SG8 SG10 children. This is acceptable since CCI+ZB3 CAV+Z91 patterns in other SG8 types would still represent valid MSB assignments to compare against. (medium confidence)
fn evaluate_404(&self, ctx: &EvaluationContext) -> ConditionResult {
let mr_nads = ctx.find_segments_with_qualifier("NAD", 0, "MR");
let mr_mp_id = match mr_nads.first() {
Some(nad) => nad
.elements
.get(1)
.and_then(|e: &Vec<String>| e.first())
.cloned()
.unwrap_or_default(),
None => return ConditionResult::Unknown,
};
if mr_mp_id.is_empty() {
return ConditionResult::Unknown;
}
let nav = match ctx.navigator {
Some(n) => n,
None => {
let cavs = ctx.find_segments("CAV");
let same_id_exists = cavs.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "Z91")
&& s.elements
.first()
.and_then(|e| e.get(1))
.is_some_and(|v: &String| v == &mr_mp_id)
});
return ConditionResult::from(!same_id_exists);
}
};
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
for i in 0..sg8_count {
let sg10_count = nav.child_group_instance_count(&["SG4", "SG8"], i, "SG10");
for j in 0..sg10_count {
let ccis = nav.find_segments_in_child_group("CCI", &["SG4", "SG8"], i, "SG10", j);
let has_cci_zb3 = ccis.iter().any(|s| {
s.elements
.get(2)
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "ZB3")
});
if !has_cci_zb3 {
continue;
}
let cavs = nav.find_segments_in_child_group("CAV", &["SG4", "SG8"], i, "SG10", j);
for cav in &cavs {
if cav
.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "Z91")
{
let cav_mp_id = cav
.elements
.first()
.and_then(|e| e.get(1))
.map(|s| s.as_str())
.unwrap_or("");
if cav_mp_id == mr_mp_id.as_str() {
return ConditionResult::False;
}
}
}
}
}
ConditionResult::True
}
/// [405] Wenn in derselben SG8 SEQ+Z02/ZA1/ZA2 (OBIS-Daten der Marktlokation) eine OBIS-Kennzahl für Wirkarbeit und kumuliert im PIA+5 vorhanden
fn evaluate_405(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [406] Wenn in derselben SG8 SEQ+Z02/ZA1/ZA2 (OBIS-Daten der Marktlokation) eine OBIS-Kennzahl für Wirkarbeit und höchste 1/4 Stunde im Monat im PIA+5 vorhanden
fn evaluate_406(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [407] Wenn in derselben SG8 SEQ+Z02/ZA1/ZA2 (OBIS-Daten der Marktlokation) eine OBIS-Kennzahl für Blindarbeit im PIA+5 vorhanden
fn evaluate_407(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [408] Wenn eine SG8 SEQ+Z02 (OBIS-Daten der Marktlokation), mit dem RFF+Z18 (Referenz auf die ID der Marktlokation) auf die gleiche ID einer Marktlokation referenziert wie das RFF+Z18 (Referenz auf die I...
fn evaluate_408(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [409] Wenn keine SG8 SEQ+Z02 (OBIS-Daten der Marktlokation), mit dem RFF+Z18 (Referenz auf die ID der Marktlokation) auf die gleiche ID einer Marktlokation referenziert wie das RFF+Z18 (Referenz auf die ...
fn evaluate_409(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [410] Wenn eine SG8 SEQ+Z02 (OBIS-Daten der Marktlokation), mit dem RFF+Z18 (Referenz auf die ID der Marktlokation) auf die gleiche ID einer Marktlokation referenziert wie das RFF+Z18 (Referenz auf die I...
fn evaluate_410(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [411] Wenn keine SG8 SEQ+Z02 (OBIS-Daten der Marktlokation), mit dem RFF+Z18 (Referenz auf die ID der Marktlokation) auf die gleiche ID einer Marktlokation referenziert wie das RFF+Z18 (Referenz auf die ...
fn evaluate_411(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [412] Es sind ausschließlich Konfigurationsprodukt-Codes der \"EDI@Energy Codeliste der Konfigurationen\" aus Kapitel 4.2 Konfigurationsprodukte Leistungskurvendefinition erlaubt
fn evaluate_412(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("code_list_membership_check")
}
/// [413] Wenn eine SG8 SEQ+Z02/ZA1/ZA2 (OBIS-Daten der Marktlokation) mit einer OBIS-Kennzahl für Wirkarbeit und kumuliert im PIA+5 vorhanden
fn evaluate_413(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [414] Wenn keine SG8 SEQ+Z02/ZA1/ZA2 (OBIS-Daten der Marktlokation) mit einer OBIS-Kennzahl für Wirkarbeit und kumuliert im PIA+5 vorhanden
fn evaluate_414(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [415] Wenn eine weitere SG8 SEQ+Z02/ZA1/ZA2 (OBIS-Daten der Marktlokation) mit einer OBIS-Kennzahl für Wirkarbeit und 1/4 Stunde im PIA+5 vorhanden
fn evaluate_415(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [416] Wenn keine SG8 SEQ+Z02/ZA1/ZA2 (OBIS-Daten der Marktlokation) mit einer OBIS-Kennzahl für Wirkarbeit und 1/4 Stunde im PIA+5 vorhanden
fn evaluate_416(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [417] Wenn für den erforderlichen Wert keine Zählzeit benötigt wird
fn evaluate_417(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [419] Wenn in diesem Datenelement kein anderes Paket in dieser SG10 in derselben SG8 SEQ zur Möglichkeit der Angabe von mindestens einem anderen Code führt
fn evaluate_419(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [420] Wenn in dieser SG8 das RFF+Z14 (Smartmeter-Gateway) vorhanden ist
fn evaluate_420(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [421] Wenn in dieser SG8 das SG10 CCI+Z39 (Zugeordnete Zählzeitdefinition) vorhanden ist
fn evaluate_421(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [425] Messprodukt-Code aus den Kapitel 2.1 \"Standard-Messprodukte der Marktlokation\" der Codeliste der Konfigurationen
fn evaluate_425(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("code_list_membership_check")
}
/// [426] Messprodukt-Code aus den Kapitel 2.2 \"Standard-Messprodukte der Tranche\" der Codeliste der Konfigurationen
fn evaluate_426(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("code_list_membership_check")
}
/// [427] Messprodukt-Code aus den Kapitel 2.3 \"Standard-Messprodukte der Messlokation\" der Codeliste der Konfigurationen
fn evaluate_427(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("code_list_membership_check")
}
/// [428] Wenn in derselben SG8 SEQ+Z27/ ZE2 (Erforderliches Messprodukt der Marktlokation) das PIA+5 DE7140 mit einem Messprodukt aus Codeliste der Konfigurationen Kapitel 2.1.1 Standard-Messprodukt der Mar...
fn evaluate_428(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("code_list_membership_check")
}
/// [429] Wenn in derselben SG8 SEQ+Z19/ ZF4 (Erforderliches Messprodukt der Messlokation) das PIA+5 DE7140 mit einem Messprodukt aus Codeliste der Konfigurationen Kapitel 2.3.1 Standard-Messprodukt der Mess...
fn evaluate_429(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("code_list_membership_check")
}
/// [430] Wenn eine andere SG8 SEQ+Z27 (Erforderliches Messprodukt der Marktlokation), mit dem RFF+Z18 (Referenz auf die ID der Marktlokation) auf die gleiche ID einer Marktlokation referenziert, mit PIA+5+9...
fn evaluate_430(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [431] Wenn keine andere SG8 SEQ+Z27 (Erforderliches Messprodukt der Marktlokation), mit dem RFF+Z18 (Referenz auf die ID der Marktlokation) auf die gleiche ID einer Marktlokation referenziert, mit PIA+5+...
fn evaluate_431(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [432] Wenn in derselben SG8 SEQ+Z27 (Erforderliches Messprodukt der Marktlokation), das PIA+5+9991000000078:Z11 (Wirkarbeit Lastgang 1/4 stündlich) vorhanden ist
fn evaluate_432(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [433] Wenn keine andere SG8 SEQ+Z27 (Erforderliches Messprodukt der Marktlokation), mit dem RFF+Z18 (Referenz auf die ID der Marktlokation) auf die gleiche ID einer Marktlokation referenziert, mit PIA+5 ...
fn evaluate_433(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("code_list_membership_check")
}
/// [435] Wenn eine andere SG8 SEQ+Z27 (Erforderliches Messprodukt der Marktlokation), mit dem RFF+Z18 (Referenz auf die ID der Marktlokation) auf die gleiche ID einer Marktlokation referenziert, mit PIA+5 D...
fn evaluate_435(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("code_list_membership_check")
}
/// [436] Wenn in derselben SG8 SEQ+Z27 (Erforderliches Messprodukt der Marktlokation), das PIA+5+9991000000086:Z11 (Wirkarbeit höchste 1/4 Stunde im Monat) vorhanden ist
fn evaluate_436(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [437] Wenn in dieser SG4 das STS+E01++A04 / A23 (Status der Antwort) vorhanden
fn evaluate_437(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [438] Wenn im selben CCI im DE7059 der Code Z39 (Code der Zählzeit) vorhanden ist
fn evaluate_438(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [440] Wenn in demselben RFF der Code Z35 (vorgelagerte Netzlokation) im DE1153 vorhanden
fn evaluate_440(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [441] Wenn im SG8+SEQ+Z03/ ZF5 (Zähleinrichtungsdaten) für die in diesem RFF DE1154 genannte Gerätenummer eines Zählers das RFF+Z14 (Referenz auf das Smartmeter-Gateway) nicht vorhanden ist
fn evaluate_441(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [442] Wenn in demselben RFF der Code Z34 (vorgelagerte Messlokation) im DE1153 vorhanden
fn evaluate_442(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [444] Wenn in derselben SG8 (Produkt-Daten der Netzlokation) das PIA+5 (Produkt-Daten der Netzlokation) nicht vorhanden
// REVIEW: Checks whether any SG8 instance carrying a 'Produkt-Daten der Netzlokation' SEQ qualifier (Z60, ZE0, ZG8, ZG9) lacks PIA+5. Iterates each qualifier separately using any_group_has_qualifier_without which checks: SEQ+code present AND PIA+5 absent in same SG8. Returns True on first match. Correctly handles the multi-qualifier case via OR iteration. (medium confidence)
fn evaluate_444(&self, ctx: &EvaluationContext) -> ConditionResult {
for code in ["Z60", "ZE0", "ZG8", "ZG9"] {
if matches!(
ctx.any_group_has_qualifier_without("SEQ", 0, code, "PIA", 0, "5", &["SG4", "SG8"]),
ConditionResult::True
) {
return ConditionResult::True;
}
}
ConditionResult::False
}
/// [445] Wenn in derselben SG8 (Produkt-Daten der Netzlokation) das SG10 CCI+11 (Details zum Produkt der Netzlokation) nicht vorhanden
// REVIEW: Iterates all SG8 instances and checks whether any SG10 child group contains CCI with elements[0][0]=="11" (Details zum Produkt der Netzlokation). Returns True when an SG8 is found that lacks such a CCI+11 in its SG10 children. Navigator fallback uses filtered_parent_child_has_qualifier negated per qualifier. Approximation: the navigator path does not filter SG8 instances by Produkt-Daten-Netzlokation SEQ qualifier due to absence of find_segments_in_group; checks all SG8 instances instead. (medium confidence)
fn evaluate_445(&self, ctx: &EvaluationContext) -> ConditionResult {
let nav = match ctx.navigator {
Some(n) => n,
None => {
let has_cci11 = ["Z60", "ZE0", "ZG8", "ZG9"].iter().any(|code| {
matches!(
ctx.filtered_parent_child_has_qualifier(
&["SG4", "SG8"],
"SEQ",
0,
code,
"SG10",
"CCI",
0,
"11",
),
ConditionResult::True
)
});
return ConditionResult::from(!has_cci11);
}
};
let sg8_count = nav.group_instance_count(&["SG4", "SG8"]);
for i in 0..sg8_count {
let sg10_count = nav.child_group_instance_count(&["SG4", "SG8"], i, "SG10");
let has_cci11 = (0..sg10_count).any(|j| {
let ccis = nav.find_segments_in_child_group("CCI", &["SG4", "SG8"], i, "SG10", j);
ccis.iter().any(|s| {
s.elements
.first()
.and_then(|e: &Vec<String>| e.first())
.is_some_and(|v: &String| v == "11")
})
});
if !has_cci11 {
return ConditionResult::True;
}
}
ConditionResult::False
}
/// [446] Wenn in derselben SG8 das CCI+Z17 (Stromverbrauchsart) vorhanden
fn evaluate_446(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [447] Wenn in derselben SG8 das CCI+Z50 (Stromerzeugungsart) vorhanden
fn evaluate_447(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [448] Wenn in derselben SG8 das CCI+Z56 (Speicher) vorhanden
fn evaluate_448(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [449] Wenn in derselben SG8 das SG10 CCI+6++ZA9 CAV=ZG3 (Aggreg.verantw. ÜNB und Lokation im Regelbetrieb) vorhanden
fn evaluate_449(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [450] Wenn in demselben RFF der Code Z32 (Netzlokation) im DE1153 vorhanden
fn evaluate_450(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [451] Wenn in demselben RFF der Code Z18 (Marktlokation) im DE1153 vorhanden
fn evaluate_451(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [452] Wenn in demselben RFF der Code Z19 (Messlokation) im DE1153 vorhanden
fn evaluate_452(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [453] Wenn bei der Bestellung ein Messprodukt der Codeliste der Konfigurationen aus dem Kapitel 4.4 mit dem Auslöser „Bei Schwellwertunter-/ -überschreitung“ mit selbständiger Änderungsmöglichke...
fn evaluate_453(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("code_list_membership_check")
}
/// [454] Das Bilanzierungsbeginn Datum muss kleiner sein als das Bilanzierungsende Datum in der SG8 „Datenstand des ÜNB“, SG 9 Energiemenge DZÜ Anteil
fn evaluate_454(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [455] Das Bilanzierungsende-Datum muss größer sein, als das Bilanzierungsbeginn Datum in der SG8 „Datenstand des ÜNB“ , SG 9 Energiemenge DZÜ Anteil
fn evaluate_455(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [456] Wenn in demselben RFF der Code Z37 (Technische Ressource) im DE1153 vorhanden
fn evaluate_456(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [457] Wenn bei der Bestellung das Messprodukten 9991000001498 bestellt wurde
fn evaluate_457(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [458] Wenn bei der Bestellung das Konfigurationsprodukte 9991000000739 bestellt wurde
fn evaluate_458(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [459] Wenn bei der Bestellung ein Messprodukt der Codeliste der Konfigurationen aus dem Kapitel 4.4 mit dem Übertragungsweg \"CLS-Direkt aus dem SMGW\" bestellt wurde
fn evaluate_459(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("code_list_membership_check")
}
/// [460] Wenn bei der Bestellung ein Messprodukt der Codeliste der Konfigurationen aus dem Kapitel 4.4 mit dem Übertragungsweg \"aus dem SMGW\" bestellt wurde
fn evaluate_460(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("code_list_membership_check")
}
/// [461] Wenn in derselben SG10 das CCI+Z17 (Stromverbrauchsart) im CAV+ZG8 (Technischen Ressource fällt unter § 14a EnWG) vorhanden
fn evaluate_461(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [462] Wenn in derselben SG10 das CCI+Z17 (Stromverbrauchsart) im CAV+ZH1 (Inbetriebsetzung der TR vor 2024) vorhanden
fn evaluate_462(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [463] Wenn in derselben SG10 das CCI+Z61++ZF9 (Kunde erfüllt die Voraussetzung nach EnFG) vorhanden
fn evaluate_463(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [465] Wenn in derselben SG8 (Daten der Technischen Ressource) das RFF+Z38 (Referenz auf die der Technischen Ressource zugeordnete Steuerbare Ressource) vorhanden ist
fn evaluate_465(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [466] Wenn in derselben SG8 (Daten der Technischen Ressource) das RFF+Z32 (Referenz auf die der Technischen Ressource zugeordneten Netzlokation) vorhanden ist
fn evaluate_466(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [467] Wenn in derselben SG8 (Daten der Technischen Ressource) das CAV+ZG8 (Technischen Ressource fällt unter § 14a EnWG) vorhanden ist
fn evaluate_467(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [468] Wenn in derselben SG8 (Daten der Technischen Ressource) das SG10 CAV+ZH0 (Inbetriebsetzung der TR nach 2023) vorhanden ist
fn evaluate_468(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [469] Wenn in derselben SG8 (Daten der Technischen Ressource) das SG10 CAV+ZH1 (Inbetriebsetzung der TR vor 2024) vorhanden ist
fn evaluate_469(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [470] Wenn in derselben SG8 (Daten der Technischen Ressource) das CAV+ZH5 (Wechsel in das in das § 14a EnWG-Modell gem. Festlegung BK6-22-300 wurde durchgeführt) vorhanden ist
fn evaluate_470(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [471] Wenn im selben SG6 RFF+Z49/ Z53 (Verwendungszeitraum der Daten: Gültige Daten/ Keine Daten) im DE1156 (Zeitraum-ID) eine Zeitraum ID genannt ist, die kleiner ist als in einem anderen SG6 RFF+Z49/ ...
fn evaluate_471(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [472] Wenn im selben SG6 RFF+Z48/ Z55 (Verwendungszeitraum der Daten: Erwartete Daten/ Keine Daten erwartet) im DE1156 (Zeitraum-ID) eine Zeitraum ID genannt ist, die kleiner ist als in einem anderen SG6...
fn evaluate_472(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [473] Wenn im selben SG6 RFF+Z47/ Z54 (Verwendungszeitraum der Daten: Im System vorhandene Daten/ Im System keine Daten vorhanden) im DE1156 (Zeitraum-ID) eine Zeitraum ID genannt ist, die kleiner ist al...
fn evaluate_473(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [474] Wenn SG4 STS+7++ZC8 (Transaktionsgrund \"Beendigung der Zuordnung\") vorhanden
fn evaluate_474(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [475] Wenn SG4 STS+7++ZH1 (Transaktionsgrund \"Aufhebung einer zukünftigen Zuordnung wegen Stilllegung\") vorhanden
fn evaluate_475(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [476] Wenn SG4 STS+7++xxx+ZW0 (Transaktionsgrundergänzung Geschäftsvorfall 1) vorhanden
fn evaluate_476(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [477] Wenn SG4 STS+7++xxx+ZW1 (Transaktionsgrundergänzung Geschäftsvorfall 2) vorhanden
fn evaluate_477(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [478] Wenn SG4 STS+7++xxx+ZW2 (Transaktionsgrundergänzung Geschäftsvorfall 3) vorhanden
fn evaluate_478(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [479] Wenn SG4 STS+7++xxx+ZW3 (Transaktionsgrundergänzung Erzeugende Marktlokation) vorhanden
fn evaluate_479(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [480] Wenn SG4 STS+7++xxx+ZW4 (Transaktionsgrundergänzung Verbrauchende Marktlokation) vorhanden
fn evaluate_480(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [481] Wenn SG4 STS+7++xxx+ZW5 (Transaktionsgrundergänzung Tranche) vorhanden
fn evaluate_481(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [483] Wenn SG4 STS+7++xxx+ZW7 (Transaktionsgrundergänzung Gemessene Marktlokation) vorhanden
fn evaluate_483(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [484] Wenn SG4 STS+7++xxx+ZW8 (Transaktionsgrundergänzung Fall1) vorhanden
fn evaluate_484(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [487] Wenn SG4 STS+7++xxx+ZX1 (Transaktionsgrundergänzung Fall4) vorhanden
fn evaluate_487(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [489] Nur bei dem ältesten Zeitraum welcher mit SG6 RFF+Z49 (Verwendungszeitraum der Daten: Gültige Daten) beschrieben ist
fn evaluate_489(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [490] Wenn Wert in diesem DE, an der Stelle CCYYMMDD ein Datum aus dem angegeben Zeitraum der Tabelle Kapitel 3.5 „Prozesszeitpunkt bei MESZ mit UTC“ ist
fn evaluate_490(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [491] Wenn Wert in diesem DE, an der Stelle CCYYMMDD ein Datum aus dem angegeben Zeitraum der Tabelle Kapitel 3.6 „Prozesszeitpunkt bei MEZ mit UTC““ ist
fn evaluate_491(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [494] Das hier genannte Datum muss der Zeitpunkt sein, zu dem das Dokument erstellt wurde, oder ein Zeitpunkt, der davor liegt
fn evaluate_494(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [500] Hinweis: Code ist gemäß der Kategorie der zu stornierenden Meldung zu wählen
fn evaluate_500(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [501] Hinweis: Es sind zur Unterstützung die Daten des LFA anzugeben
fn evaluate_501(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [502] Hinweis: Es wird der Betrachtungsmonat der DZR bzw. BAS angegeben
fn evaluate_502(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [503] Hinweis: Angabe des BGM DE1004 aus der ORDERS
fn evaluate_503(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [504] Hinweis: Je Profil (ggf. inkl. Profilschar) ein Vorgang erforderlich
fn evaluate_504(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [505] Hinweis: Je zugeordneter ID und je EEG-Überführungszeitreihe ein Vorgang erforderlich
fn evaluate_505(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [506] Hinweis: Für jeden Code im LOC+Z16 (Marktlokation) sollen die entsprechenden Kundendaten des LF angegeben werden, falls bekannt
fn evaluate_506(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [507] Hinweis: Ursprünglich vom NB bestätigtes Beginndatum
fn evaluate_507(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [508] Hinweis: Ausschließlich kME sind über die NNE abrechenbar
fn evaluate_508(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [509] Hinweis: Handelt sich um ein mME oder iMS ist das RFF 1154 immer mit NEIN anzugeben
fn evaluate_509(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [510] Hinweis: Zu verwenden bei der Abmeldung der ESV
fn evaluate_510(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [511] Hinweis: Es sind alle Bilanzierungsgebiete anzugeben in denen das Profil verwendet wird
fn evaluate_511(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [512] Hinweis: Es ist informativ die bisherige Veräußerungsform des LFA an der erzeugenden Marktlokation anzugeben
fn evaluate_512(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [513] Hinweis: Es ist das nächstmögliche Datum ab dem DTM+471 aus der entsprechenden Anfrage zu ermitteln
fn evaluate_513(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [514] Hinweis: Es darf nur eine Information im DE3148 übermittelt werden
fn evaluate_514(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [515] Hinweis: Für den ZP der LieferantensummenZR anzugeben
fn evaluate_515(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [516] Hinweis: Es ist der Änderungszeitpunkt anzugeben an dem das Zuordnungsende des NBA und der Zuordnungsbeginn des NBN zu einer Marktlokation fallen
fn evaluate_516(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [517] Hinweis: Anzuwenden wenn einer Marktlokation eine Paket-ID zugeordnet wurde und diese wieder gelöscht werden soll, da sie nicht unter den genannten NB-Wechsel fällt
fn evaluate_517(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [518] Hinweis: Es sind alle Altlieferanten anzugeben, an die eine Abmeldeanfrage gesendet wird
fn evaluate_518(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [519] Hinweis: Wenn in der Anmeldung der Code ZAP vorhanden war, so ist dieser auch in der Antwort zu verwenden
fn evaluate_519(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [520] Hinweis: Bei der Verwendung des Codes ZAP handelt es sich immer um eine gemessene Marktlokation
fn evaluate_520(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [521] Hinweis: Wenn im zweiten DE 9013 des STS+7 (Transaktionsgrund) der Code ZAP vorhanden ist, so ist das hier angegebene Datum als Zuordnungsbeginn bei der Bildung der \"Ruhenden MaLo zu verstehen. Be...
fn evaluate_521(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [522] Hinweis: Es ist der NBN anzugeben
fn evaluate_522(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [523] Hinweis: Mindestens einmal für jede Marktlokation bzw. Tranche, die in der DZÜ / BG-CL / LF-SZR berücksichtigt wurde
fn evaluate_523(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [524] Hinweis: Mindestens einmal für jede Marktlokation bzw. Tranche, für die der LF nicht die gemeldete Ansicht des NB teilt
fn evaluate_524(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [525] Hinweis: Es sind nur die OBIS-Kennzahlen erlaubt, die im vorherigen Stammdatenaustausch zu dieser Marktlokation vom MSB zu diesem Zeitpunkt übermittelt wurden
fn evaluate_525(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [526] Hinweis: Wenn der Marktlokation keine Technische Ressource in der Lokationsbündelstruktur zugeordnet wurde
fn evaluate_526(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [527] Hinweis: Es sind alle Identifikatoren der Messlokationen anzugeben
fn evaluate_527(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [528] Hinweis: Es ist das Datum/ Daten aus der Anfrage zu verwenden
fn evaluate_528(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [529] Hinweis: Für zusätzliche nicht im Markt standardisierte Identifikatoren wie z.B. eine Netzbetreiber-Projektnummer
fn evaluate_529(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [530] Hinweis: Es sind alle an der Lokation vorhandenen Daten, die mit dieser Segmentgruppe übermittelt werden und zum Datum „Änderung zum“ Gültigkeit haben, anzugeben. Dies kann zur Folge haben, ...
fn evaluate_530(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [531] Hinweis: Es ist das Jahr anzugeben in dem die nächste Netznutzungsabrechnung erfolgt
fn evaluate_531(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [532] Hinweis: Kritische Daten (gemäß GPKE)
fn evaluate_532(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [533] Hinweis: Es ist die MP-ID des Lieferanten anzugeben
fn evaluate_533(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [555] Die Anwendungsfälle für die Durchführung der BDEW-Anwendungshilfe „Marktprozesse Netzbetreiberwechsel Sparte Strom“ sind ab dem 01.08.2025 für Netzbetreiberwechsel ab dem 01.01.2026 zu verw...
fn evaluate_555(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [556] Hinweis: Wenn keine Korrespondenzanschrift des Endverbrauchers/ Kunden vorliegt, ist die Anschrift der Marktlokation zu übermitteln
fn evaluate_556(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [558] Hinweis: Diese Information kann freiwillig ausgetauscht werden
fn evaluate_558(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [559] Hinweis: Die Korrespondenzanschrift des Endverbrauchers/Kunden wird nicht zur Identifikation genutzt
fn evaluate_559(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [563] Hinweis: Für die ID der LieferantensummenZR
fn evaluate_563(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [566] Hinweis: Altlieferant
fn evaluate_566(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [567] Hinweis: Neulieferant
fn evaluate_567(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [568] Hinweis: Lieferant der LieferantensummenZR
fn evaluate_568(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [569] Hinweis: Dritter Nutzer
fn evaluate_569(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [570] Hinweis: Netzbetreiber Alt
fn evaluate_570(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [572] Hinweis: Kundenname aus Anmeldung Lieferant neu
fn evaluate_572(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [576] Hinweis: Stammdaten des bisherigen Messstellenbetreibers
fn evaluate_576(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [577] Hinweis: Wird mit dem ursprünglich vom NB bestätigten Beginnzeitpunkt gefüllt
fn evaluate_577(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [579] Hinweis: Auslösender Marktpartner (LFN bei STS+7++ZH0/ZG9, NB bei STS+7++ZH1)
fn evaluate_579(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [580] Hinweis: Ersatzbelieferung gibt es nur bei - Marktlokationen in der Niederspannung, die kein Haushaltskunde gem. EnWG sind und die nicht mehr der gesetzlichen Ersatzversorgung (drei Monate) unte...
fn evaluate_580(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [581] Hinweis: Es ist der Zeitpunkt anzugeben, zu welchem der Vertrag am Tag des Versandes der Antwort noch kündbar ist.
fn evaluate_581(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [586] Hinweis: Die Messlokationsadresse ist der Messlokation zugeordnet, welche in SG8 SEQ+Z18/ ZF3 (Daten der Messlokation) mit CCI+Z01++Z82 (Verwendungsumfang: ID der prozessual behandelten Messlokatio...
fn evaluate_586(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [590] Hinweis: Für den Empfang des Steuerbefehls
fn evaluate_590(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [594] Hinweis: Es ist der ZPB des ZP der NGZ und die ZPB der NZR anzugeben
fn evaluate_594(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [599] Hinweis: Es ist der Name und die Adresse des Ablesekartenempfängers für die Messlokation anzugeben, welche in SG8 SEQ+Z18 (Daten der Messlokation) mit CCI+Z01++Z82 (Verwendungsumfang: ID der proz...
fn evaluate_599(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [601] Hinweis: Es ist die ID der Marktlokation und alle Identifikatoren der Messlokationen anzugeben. Sowie wenn vorhanden die Tranche/n der Marklokation
fn evaluate_601(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [606] Hinweis: In diesem Segment bzw. SG sind die Daten aus der Sicht des NB anzugeben
fn evaluate_606(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [609] Hinweis: In diesem Segment bzw. SG sind die zwischen NB, LF und ÜNB im Rahmen der Marktkommunikation ausgetauschten Daten aus der Sicht des ÜNB anzugeben
fn evaluate_609(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [611] Hinweis: Wenn das Unternehmen NB die Aufgaben der Marktrolle LF wahrnimmt, ist die MP-ID des Unternehmens NB in der Marktrolle LF anzugeben
fn evaluate_611(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [614] Hinweis: Es werden nur die OBIS Kennzahlen übermittelt die für die Bilanzierung relevant sind
fn evaluate_614(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [617] Hinweis: Mehrere Vorgänge für eine Marktlokation bei Wechsel bilanzierungsrelevanter Stammdaten innerhalb des Bilanzierungsmonats
fn evaluate_617(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [618] Hinweis: Bisheriges Datum des MSBA. Sollte der MSBN ein abweichendes Datum verwenden wollen, so teilt er das neue Datum mit einer Stammdatenänderung mit
fn evaluate_618(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [619] Hinweis: Für die selbständige Änderungsmöglichkeit der Schwellwertunter- / -über-schreitung
fn evaluate_619(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [621] Hinweis: Es ist der MSB anzugeben, welcher ab dem Zeitpunkt der Lokation zugeordnet ist, der in DTM+76 (Datum zum geplanten Leistungsbeginn) genannt ist.
fn evaluate_621(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [622] Hinweis: Falls die OBIS-Kennzahl für mehrere Marktrollen relevant ist, so muss die Segmentgruppe pro Marktrolle wiederholt werden
fn evaluate_622(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [623] Hinweis: Es sind alle Identifikatoren der Messlokationen anzugeben, die zur Ermittlung der Energiemenge der im Vorgang genannten Marktlokation benötigt werden
fn evaluate_623(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [630] Hinweis: Wenn die Liste abgelehnt wird, ist kein Vorgang enthalten
fn evaluate_630(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [631] Hinweis: Es ist die Listennummer aus der Lieferanten- bzw. Bilanzierungsgebietsclearingliste zu verwenden
fn evaluate_631(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [632] Hinweis: Es ist die Listennummer aus der Lieferanten-ausfallarbeits-clearingliste zu verwenden
fn evaluate_632(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [637] Hinweis: Bei Verpflichtungsanfrage
fn evaluate_637(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [638] Hinweis: Bei Aufforderung zur Übernahme der einzelnen Messlokation durch den gMSB
fn evaluate_638(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [639] Hinweis: Wenn Antwort auf Deaktivierung
fn evaluate_639(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [640] Hinweis: Wenn Antwort auf Aktivierung
fn evaluate_640(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [641] Hinweis: Wenn Einzelanforderung vorliegt
fn evaluate_641(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [642] Hinweis: Wenn Abo vorliegt
fn evaluate_642(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [643] Hinweis: Nachfolgender Netzbetreiber
fn evaluate_643(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [645] Hinweis: Es ist der Bilanzkreis des LF anzugeben
fn evaluate_645(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [646] Hinweis: Es ist der RD-Bilanzkreis des ANB anzugeben
fn evaluate_646(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [647] Hinweis: Es ist der RD-Bilanzkreis des anfNB anzugeben
fn evaluate_647(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [648] Hinweis: Soll ein Produkt ab dem Datum \"Änderung zum\" nicht mehr vorhanden sein, wird dies durch nicht angeben des PIA+5 ausgedrückt
fn evaluate_648(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [651] Hinweis: Es sind die Marktlokationen anzugeben, zu welchen die hier genannte OBIS benötigt wird
fn evaluate_651(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [653] Hinweis: Es sind alle Netzlokationen, Marktlokationen, Tranchen und Messlokationen zu nennen, die durch die Bestätigung der Abmeldung der prozessual behandelten Messlokation nicht mehr dem MSB zug...
fn evaluate_653(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [655] Hinweis: Es ist die Listennummer aus der DZÜ Liste zu verwenden
fn evaluate_655(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [659] Hinweis: Bei Tranchen ist nur der Meldepunkt der Tranche anzugeben
fn evaluate_659(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [660] Hinweis: Es ist die ID der BK-Summenzeitreihe Aggregationsebene BG anzugeben
fn evaluate_660(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [662] Hinweis: Es sind die Daten NGZ und die Daten der NZR anzugeben
fn evaluate_662(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [663] Hinweis: Es ist die ID der Marktlokation und die ZPB des ZP der NGZ anzugeben
fn evaluate_663(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [664] Hinweis: Es ist das BG des NB (LPB) anzugeben
fn evaluate_664(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [665] Hinweis: Wenn ein Zähler mit einem SMGW parametriert ist werden an dem Zähler keine OBIS-Kennzahlen angegeben Hier gibt es nur OBIS Kennzahlen vom SMGW
fn evaluate_665(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [667] Hinweis: Für Zeiten die bilanziert wurden, aber inzwischen keine Aggregationsverantwortung beim ÜNB vorliegt, ist eine SG8 mit SG8 - SG10 CCI+6=ZA8 oder SG 10 CCI+6 = ZA9 CAV=ZG4 und SG8 - SG9 QT...
fn evaluate_667(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [668] Hinweis: Dieses Segment wird nach Abschluss der Einführung der Lokationsbündelstruktur zum 01.10.2025 aus der UTILMD entfernt
fn evaluate_668(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [670] Hinweis: Es sind alle Netzlokationen, zu nennen, die dem gleichen Lokationsbündel angehören
fn evaluate_670(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [671] Hinweis: Es sind alle Marktlokationen, zu nennen, die dem gleichen Lokationsbündel angehören
fn evaluate_671(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [672] Hinweis: Es sind alle Technischen Ressourcen, zu nennen, die dem gleichen Lokationsbündel angehören
fn evaluate_672(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [673] Hinweis: Es sind alle Steuerbaren Ressourcen, zu nennen, die dem gleichen Lokationsbündel angehören
fn evaluate_673(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [674] Hinweis: Es sind alle Tranchen, zu nennen, die dem gleichen Lokationsbündel angehören
fn evaluate_674(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [675] Hinweis: Es sind alle Messlokationen, zu nennen, die Lokationsbündel angehören
fn evaluate_675(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [677] Hinweis: Es sind alle Netzlokationen, zu nennen, die aktuell und / oder zukünftig dem gleichen Lokationsbündel angehören
fn evaluate_677(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [678] Hinweis: Es sind alle Marktlokationen, zu nennen, die aktuell und / oder zukünftig dem gleichen Lokationsbündel angehören
fn evaluate_678(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [679] Hinweis: Es sind alle Technischen Ressourcen, zu nennen, die aktuell und / oder zukünftig dem gleichen Lokationsbündel angehören
fn evaluate_679(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [680] Hinweis: Es sind alle Steuerbaren Ressourcen, zu nennen, die aktuell und / oder zukünftig dem gleichen Lokationsbündel angehören
fn evaluate_680(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [682] Hinweis: Es sind alle Messlokationen, zu nennen, die aktuell und / oder zukünftig dem gleichen Lokationsbündel angehören
fn evaluate_682(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [683] Hinweis: Es sind alle ID der Netzlokationen, welche der im SG5 LOC+Z16 angegebenen Marktlokation aktuell und / oder zukünftig vorgelagert sind, anzugeben
fn evaluate_683(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [684] Hinweis: Es sind alle ID der Technischen Ressourcen, welche der im LOC+Z16/ Z22 angegebenen Marktlokation aktuell und / oder zukünftig zugehören, anzugeben
fn evaluate_684(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [685] Hinweis: Es sind alle ID der Steuerbaren Ressourcen, welche der im LOC+Z20 angegebenen Technischen Ressourcen aktuell und / oder zukünftig zugeordnet sind, anzugeben.
fn evaluate_685(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [687] Hinweis: Es sind alle Messlokationen zu nennen, die für die Energiemengenermittlung aktuell und / oder zukünftig der im LOC+Z16/ Z22 angegebenen Marktlokation notwendig sind
fn evaluate_687(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [688] Hinweis: Es sind alle ID der Netzlokationen, welche der im LOC+Z16 angegebenen Marktlokation vorgelagert sind, anzugeben
fn evaluate_688(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [689] Hinweis: Es sind alle ID der Technischen Ressourcen, welche der im LOC+Z16 angegebenen Marktlokation zugehören, anzugeben
fn evaluate_689(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [690] Hinweis: Es sind alle ID der Steuerbaren Ressourcen, welche der im LOC+Z20 angegebenen Technischen Ressourcen zugeordnet sind, anzugeben
fn evaluate_690(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [693] Hinweis: Es sind die Daten NGZ anzugeben
fn evaluate_693(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [694] Hinweis: Wenn in einer Marktlokation eine ID für eine Technischen Ressource vergeben wird, müssen für alle ggf. weitere Technische Ressourcen in der Marktlokation ID vergeben werden. Hintergrund...
fn evaluate_694(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [695] Hinweis: Verwendung, wenn Rolle LF einem Unternehmen NB zugeordnet ist
fn evaluate_695(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [696] Hinweis: Verwendung, nur wenn die Rolle LF nicht einem Unternehmen NB zugeordnet ist
fn evaluate_696(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [698] Hinweis: Für eine erzeugende Marktlokation muss für jede Technische Ressource eine ID der Technischen Ressourcen vergeben werden. Dies ist notwendig um die Nennleistung der Technische Ressource b...
fn evaluate_698(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [699] Hinweis: Es ist die ID der Steuerbare Ressource zu nennen über die die Technische Ressource gesteuert wird
fn evaluate_699(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [700] Hinweis: Es ist die ID der Netzlokation zu nennen über die die Technische Ressource gesteuert wird
fn evaluate_700(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [704] Hinweis: Segment ist zu verwenden, wenn es in Anfrage vorhanden war
fn evaluate_704(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [705] Hinweis: Wenn die Aktion eines Sequenzdiagramms \"Rückmeldung auf Änderung\" durchgeführt wird
fn evaluate_705(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [706] Hinweis: Wenn die Aktion eines Sequenzdiagramms \"Bestellung einer Änderung von Stammdaten...\" durchgeführt wird, mit dem Ziel ein Datenclearing durchzuführen
fn evaluate_706(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("data_clearing_required")
}
/// [707] Hinweis: für weitere Details siehe Kapitel \"SG6 Verwendungszeitraum der Daten\"
fn evaluate_707(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [708] Hinweis: Wenn die Aktion \"Ankündigung der Zuordnung des E/G zur Marktlokation\" durchgeführt wird
fn evaluate_708(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [709] Hinweis: Wenn die Aktion \"Zuordnung des E/G zur Marktlokation aufgrund fehlender Antwort\" durchgeführt wird
fn evaluate_709(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [710] Hinweis: Wenn die Aktion \"Ankündigung der Zuordnung des LFN zur Marktlokation bzw. Tranche\" durchgeführt wird
fn evaluate_710(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [711] Hinweis: Wenn die Aktion \"Zuordnung des LFN zur Marktlokation bzw. Tranche aufgrund fehlender Antwort\" durchgeführt wird
fn evaluate_711(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [712] Hinweis: Wenn die Aktion \"Ankündigung der Beendigung der Zuordnung des LF zur Marktlokation bzw. Tranche\" durchgeführt wird
fn evaluate_712(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [713] Hinweis: Wenn die Aktion \"Beendigung der Zuordnung des LF zur Marktlokation bzw. Tranche aufgrund fehlender Antwort\" durchgeführt wird
fn evaluate_713(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [714] Hinweis: Es ist bei einer unterjährigen Gebietsübernahme möglich hier den bisherigen NB zu nennen um aufzuzeigen, dass die im PIA+5 dieser SG8 genannten Gruppenartikel-ID bzw. Artikel-ID auf die...
fn evaluate_714(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [715] Hinweis: Dieser Transaktionsgrund darf für die betroffene Lokation nur angewendet werden wenn zuvor vom LF eine Anfrage Abr.-Daten BK-Abr. in die Vergangenheit erfolgte oder eine Korrektur zuvor m...
fn evaluate_715(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [716] Hinweis: Wenn die Aktion eines Sequenzdiagramms \"Rückmeldung auf Abrechnungsdaten\" durchgeführt wird
fn evaluate_716(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [717] Hinweis: Wenn die Aktion des Sequenzdiagramms \"Bestellung einer Änderung von Abrechnungsdaten\" durchgeführt wird, mit dem Ziel ein Datenclearing durchzuführen
fn evaluate_717(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external.evaluate("data_clearing_required")
}
/// [718] Hinweis: Es sind alle Tranchen der im SG5 LOC+Z16 (Marktlokation) genannten Marktlokation anzugeben, die für die im SG6 (Verwendungszeitraum der Daten) genannten Zeiträume vorhanden sind
fn evaluate_718(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [719] Hinweis: Dieser Transaktionsgrund darf für die betroffene Lokation nur angewendet werden wenn der LF auf eine Anfrage mit diesem Transaktionsgrund antwortet oder eine Anfrage Abr.-Daten BK-Abr. in...
fn evaluate_719(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [902] Format: Möglicher Wert: ≥ 0
fn evaluate_902(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [910] Format: Möglicher Wert: < 0 oder ≥ 0
fn evaluate_910(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [914] Format: Möglicher Wert: > 0
fn evaluate_914(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [922] Format: TR-ID
fn evaluate_922(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [926] Format: Möglicher Wert: 0
fn evaluate_926(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [930] Format: max. 2 Nachkommastellen
fn evaluate_930(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [931] Format: ZZZ = +00
fn evaluate_931(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [932] Format: HHMM = 2200
fn evaluate_932(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [933] Format: HHMM = 2300
fn evaluate_933(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [937] Format: keine Nachkommastelle
fn evaluate_937(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [938] Format: Möglicher Wert: <= 10
fn evaluate_938(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [939] Format: Die Zeichenkette muss die Zeichen @ und . enthalten
fn evaluate_939(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [940] Format: Die Zeichenkette muss mit dem Zeichen + beginnen und danach dürfen nur noch Ziffern folgen
fn evaluate_940(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [942] Format: n1-n2-n1-n3
fn evaluate_942(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [943] Format: n1-n2-n1
fn evaluate_943(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [946] Format: max. 11 Nachkommastellen
fn evaluate_946(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [948] Format: n1-n2-n1-n8-n2
fn evaluate_948(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [950] Format: Marktlokations-ID
fn evaluate_950(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [951] Format: Zählpunktbezeichnung
fn evaluate_951(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [952] Format: Gerätenummer nach DIN 43863-5
fn evaluate_952(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [955] Format: Möglicher Wert: < 100
fn evaluate_955(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [957] Format: n1-n2-n1-n8
fn evaluate_957(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [960] Format: Netzlokations-ID
fn evaluate_960(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [961] Format: SR-ID
fn evaluate_961(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [967] Format: Zertifikatskörper gemäß X509.1, BSI TR-03109-4
fn evaluate_967(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2001] Segmentgruppe ist mindestens zweimal je SG4 IDE+24 (Vorgang) anzugeben
fn evaluate_2001(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2002] Für jede Produktpaket-ID im SG8 SEQ+Z79 (Erforderliches Produkt) DE1050 genau einmal anzugeben
fn evaluate_2002(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2003] Einmal für jede ruhende Marktlokation, die der Marktlokation \"Kundenanlage\" aus dem SG5 LOC+Z16 (Marktlokation) ab dem Zeitpunkt aus dem SG4 DTM+92 (Beginn zum) untergeordnet ist
fn evaluate_2003(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2004] Segmentgruppe ist genau einmal für jede Zeitraum-ID aus dem DE1156 der SG6 RFF+Z49 (Verwendungszeitraum der Daten: "Gültige Daten") anzugeben
// REVIEW: Collects Zeitraum-IDs from SG6 RFF+Z49 DE1156 (elements[0][2]) by correlating qualifier (elements[0][0]) and ID (elements[0][2]) vectors via shared SG6 instance index. Then collects all SEQ DE1050 (elements[1][0]) references from SG8 instances. For each Zeitraum-ID from SG6 RFF+Z49, counts matching SG8 SEQ references; returns False if any count != 1 (violates 'exactly once' cardinality). Returns Unknown if no RFF+Z49 Zeitraum-IDs exist. (medium confidence)
fn evaluate_2004(&self, ctx: &EvaluationContext) -> ConditionResult {
let rff_qualifiers = ctx.collect_group_values("RFF", 0, 0, &["SG4", "SG6"]);
let rff_zeitraum_ids = ctx.collect_group_values("RFF", 0, 2, &["SG4", "SG6"]);
let zeitraum_ids: Vec<String> = rff_qualifiers
.iter()
.filter(|(_, qual)| qual.as_str() == "Z49")
.filter_map(|(idx, _)| {
rff_zeitraum_ids
.iter()
.find(|(i, v)| i == idx && !v.is_empty())
.map(|(_, v)| v.clone())
})
.collect();
if zeitraum_ids.is_empty() {
return ConditionResult::Unknown;
}
let seq_refs = ctx.collect_group_values("SEQ", 1, 0, &["SG4", "SG8"]);
for zid in &zeitraum_ids {
let count = seq_refs.iter().filter(|(_, v)| v == zid).count();
if count != 1 {
return ConditionResult::False;
}
}
ConditionResult::True
}
/// [2005] Segmentgruppe ist mindesten einmal für jede Zeitraum-ID aus dem DE1156 der SG6 RFF+Z49 (Verwendungszeitraum der Daten: "Gültige Daten") anzugeben
// REVIEW: Same logic as 2004 but enforces 'at least once' cardinality (count >= 1) instead of 'exactly once'. Collects Zeitraum-IDs from SG6 RFF+Z49 DE1156 and checks that each has at least one matching SG8 SEQ DE1050 reference. Returns False if any Zeitraum-ID has zero matching SG8 references. (medium confidence)
fn evaluate_2005(&self, ctx: &EvaluationContext) -> ConditionResult {
let rff_qualifiers = ctx.collect_group_values("RFF", 0, 0, &["SG4", "SG6"]);
let rff_zeitraum_ids = ctx.collect_group_values("RFF", 0, 2, &["SG4", "SG6"]);
let zeitraum_ids: Vec<String> = rff_qualifiers
.iter()
.filter(|(_, qual)| qual.as_str() == "Z49")
.filter_map(|(idx, _)| {
rff_zeitraum_ids
.iter()
.find(|(i, v)| i == idx && !v.is_empty())
.map(|(_, v)| v.clone())
})
.collect();
if zeitraum_ids.is_empty() {
return ConditionResult::Unknown;
}
let seq_refs = ctx.collect_group_values("SEQ", 1, 0, &["SG4", "SG8"]);
for zid in &zeitraum_ids {
let count = seq_refs.iter().filter(|(_, v)| v == zid).count();
if count == 0 {
return ConditionResult::False;
}
}
ConditionResult::True
}
/// [2010] Segmentgruppe ist genau einmal für jede SG8 SEQ+Z01 (Daten der Marktlokation) anzugeben, bei der die Bedingungen [266] ∧ [479] an der Segmentgruppe erfüllt ist. Dabei ist die selbe Zeitraum-ID ...
fn evaluate_2010(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2011] Segmentgruppe ist genau einmal für jede Zeitraum-ID aus dem DE1156 der SG6 RFF+Z49 / Z53 (Verwendungszeitraum der Daten: "Gültige Daten" / "Keine Daten") aus der Anfragennachricht aus SG6 RFF+TN ...
/// EXTERNAL: Requires context from outside the message.
// REVIEW: Condition requires checking Zeitraum-IDs from DE1156 of SG6 RFF+Z49/Z53 ('Verwendungszeitraum der Daten: Gültige Daten / Keine Daten') that originated in the REQUEST message referenced by SG6 RFF+TN DE1154. The referenced request message is a separate EDIFACT interchange not present in the current message being validated. The cardinality constraint ('exactly once per Zeitraum-ID from the request') is therefore an external business context check that depends on data from a prior message in the business process. (medium confidence)
fn evaluate_2011(&self, ctx: &EvaluationContext) -> ConditionResult {
ctx.external
.evaluate("request_message_zeitraum_ids_present")
}
/// [2012] Segmentgruppe ist genau einmal für die Angabe der Informativen Daten der Marktlokation anzugeben
fn evaluate_2012(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2013] Mindesten einmal anzugeben wenn kein SG6 RFF+Z54 (Verwendungszeitraum der Daten: Im System keine Daten vorhanden) vorhanden
fn evaluate_2013(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2014] Mindesten einmal anzugeben wenn kein SG6 RFF+Z47 (Verwendungszeitraum der Daten: Im System vorhandene Daten) vorhanden
fn evaluate_2014(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2015] Einmal für jede ruhende Marktlokation, die der Marktlokation \"Kundenanlage\" aus dem SG5 LOC+Z16 (Marktlokation) untergeordnet ist
fn evaluate_2015(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2016] Je SG5 LOC+Z16 (Marktlokation) ist genau einmal die Segmentgruppe anzugeben
fn evaluate_2016(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2017] Je SG5 LOC+Z17 (Messlokation) ist genau einmal die Segmentgruppe anzugeben
fn evaluate_2017(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2018] Segmentgruppe ist genau einmal für jede SG8 SEQ+Z01 (Daten der Marktlokation) anzugeben, bei der die Bedingungen [266] an der Segmentgruppe erfüllt ist. Dabei ist die selbe Zeitraum-ID im nachfol...
fn evaluate_2018(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2060] Wenn SG10 CAV+NZR ist die Segmentgruppe genau zwei Mal je IDE+24 anzugeben
fn evaluate_2060(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2061] Segment bzw. Segmentgruppe ist genau einmal je SG4 IDE (Vorgang) anzugeben
fn evaluate_2061(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2071] Für die ID der LieferantensummenZR einmal je SG4 IDE+24 (Vorgang)
fn evaluate_2071(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2073] Für die ID der BilanzkreissummenZR einmal je SG4 IDE+24 (Vorgang)
fn evaluate_2073(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2075] Für die ID der Zeitreihen (nicht bei EEG-EUZ und EUZ der AAÜZ) in der Clearingliste einmal je SG4 IDE+24 (Vorgang)
fn evaluate_2075(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2080] Segmentgruppe ist max. zweimal je SG4 IDE+24 (Vorgang) anzugeben
fn evaluate_2080(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2095] Je SG5 LOC+Z15 (MaBiS-Zählpunkt) ist genau einmal die Segmentgruppe anzugeben
fn evaluate_2095(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2096] Segmentgruppe ist genau zweimal je SG4 IDE anzugeben
fn evaluate_2096(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2119] Je SG8 SEQ+Z13/ ZG0 (Smartmeter-Gateway) ist genau einmal die Segmentgruppe anzugeben
fn evaluate_2119(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2140] Für die ID der LieferantensummenZR einmal je SG4 IDE+Z01 (Liste)
fn evaluate_2140(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2182] Segmentgruppe ist genau einmal je SG8 SEQ+Z01/ Z80/ Z81/ Z98 (Daten der Marktlokation/ Erwartete Daten der Marktlokation/ Im System vorhandene Daten der Marktlokation) anzugeben
fn evaluate_2182(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2183] Segmentgruppe ist genau zweimal je SG8 SEQ+Z01/ Z80/ Z81/ Z98 (Daten der Marktlokation/ Erwartete Daten der Marktlokation/ Im System vorhandene Daten der Marktlokation) anzugeben
fn evaluate_2183(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2207] Für die ID der Lieferanten-ausfall-arbeits-summen-zeitreihe einmal je SG4 IDE+Z01 (Liste)
fn evaluate_2207(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2225] Einmal für jede Marktlokation bzw. Tranche für die der LF nicht die gemeldete Ansicht des NB teilt
fn evaluate_2225(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2236] Code einmal je SG4 IDE+24 (Vorgang)
fn evaluate_2236(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2252] Einmal für jede Marktlokation bzw. Tranche, die in der Lieferantenausfallarbeits-summenzeitreihe berücksichtigt wurde
fn evaluate_2252(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2261] Für jede ID im SG5 LOC+Z21 (Tranche) DE3225, mindestens einmal anzugeben
fn evaluate_2261(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2284] Für jede Messlokations-ID im SG5 LOC+Z17 (Messlokation) DE3225 genau einmal anzugeben
fn evaluate_2284(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2286] Für jede SEQ+ZF3 (Daten der Messlokation) mindestens einmal anzugeben
fn evaluate_2286(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2287] Für jede SEQ+Z03/ ZF5 (Zähleinrichtungsdaten) mindestens einmal anzugeben
fn evaluate_2287(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2288] Einmal für jede Zeitreihe, die in der DZR berücksichtigt wurde
fn evaluate_2288(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2307] Für jede ID im SG5 LOC+Z21 (Tranche) DE3225 genau einmal anzugeben
fn evaluate_2307(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2308] Für jede ID im SG5 LOC+Z16 (Marktlokation) DE3225, mindestens einmal anzugeben
fn evaluate_2308(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2309] Für jede ID im SG5 LOC+Z17 (Messlokation) DE3225 mindestens einmal anzugeben
fn evaluate_2309(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2310] Für jede ID im SG5 LOC+Z16 (Marktlokation) DE3225 genau einmal anzugeben
fn evaluate_2310(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2311] Für jede ID im SG5 LOC+Z21 (Tranche) DE3225, mindestens einmal anzugeben
fn evaluate_2311(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2312] Wenn der Objektcode \"9992000001256\" (Netzlokation) im DE1154 des selben RFF+Z33 nicht vorhanden ist, ist das RFF+Z33 in derselben SG8 SEQ+Z58/ ZC9/ ZD0/ ZD6 (Zuordnung Lokation zum Objektcode des...
fn evaluate_2312(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2313] Je SG8 SEQ+Z58/ ZC9/ ZD0/ ZD6 (Zuordnung Lokation zum Objektcode des Lokationsbündels) genau einmal anzugeben
fn evaluate_2313(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2317] Wenn in derselben SG8 SEQ+Z04/ ZF7 (Wandlerdaten) das SG10 CCI+++Z25 (Wandler) CAV+MIW/MPW/MUW vorhanden, ist das Segment mindestens zweimal anzugeben
fn evaluate_2317(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2318] Wenn in derselben SG8 SEQ+Z04/ ZF7 (Wandlerdaten) das SG10 CCI+++Z25 (Wandler) CAV+MBW (Blockstromwandler) vorhanden, ist das Segment genau einmal anzugeben
fn evaluate_2318(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2344] Einmal für jede Marktlokation bzw. Tranche, die in der DZÜ / BG-CL / LF-SZR berücksichtigt wurde
fn evaluate_2344(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2350] Für jedes SMGW das im SEQ+Z13/ ZG0 (Smartmeter-Gateway) SG10 CCI+++Z75 CAV+Z30 (Gerätenummer) genannt ist, mindestens einmal je SEQ+Z03/ ZF5 (Zähleinrichtungsdaten) das mit SG8 RFF+Z14 (Referenz...
fn evaluate_2350(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2351] Einmal je ZP einer BK-SZR, in der die Marktlokation in die Berechnung der abgerechneten Summenzeitreihe aufgenommen wurde
fn evaluate_2351(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2352] Einmal je ZP einer BG-SZR, in der die Marktlokation in die Berechnung der abgerechneten Summenzeitreihe aufge-nommen wurde
fn evaluate_2352(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2356] Je SG5 LOC+Z18 (Netzlokation) ist genau einmal die Segmentgruppe anzugeben
fn evaluate_2356(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2357] Je SG5 LOC+Z20 (Technische Ressource) ist genau einmal die Segmentgruppe anzugeben
fn evaluate_2357(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2358] Je SG5 LOC+Z19 (Steuerbare Ressource) ist genau einmal die Segmentgruppe anzugeben
fn evaluate_2358(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2359] Für jede ID im SG5 LOC+Z16 / Z17 / Z20 (Marktlokation / Messlokation / Technische Ressource) DE3225 mindestens einmal anzugeben
fn evaluate_2359(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2360] Für jede ID im SG5 LOC+Z18 (Netzlokation) DE3225 mindestens einmal anzugeben
fn evaluate_2360(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
/// [2361] Für jede ID im SG5 LOC+Z17 / Z20 / Z22 (Messlokation / Technische Ressource / ruhende Marktlokation) DE3225 mindestens einmal anzugeben
fn evaluate_2361(&self, _ctx: &EvaluationContext) -> ConditionResult {
// TODO: implement
ConditionResult::Unknown
}
}