#![allow(clippy::doc_markdown)]
#![allow(clippy::too_many_lines)]
#[allow(dead_code)]
pub(crate) const CODEGEN_SCHEMA_VERSION: u32 = 1;
use std::sync::{Arc, LazyLock};
use edifact_rs::directory_validator::{ElementRef, SegmentDefinition, Status};
use edifact_rs::{
DirectoryValidator, GroupDef, ProfileRulePack, ValidationIssue, ValidationSeverity,
};
use crate::registry::Profile;
use crate::{MessageType, Pruefidentifikator, Release};
static SEGMENTS: &[SegmentDefinition] = &[
SegmentDefinition::new(
"UNH",
"Message Header",
&[
ElementRef::new(1, "0062", Status::Mandatory, 1),
ElementRef::new(2, "S009", Status::Mandatory, 1),
],
),
SegmentDefinition::new(
"BGM",
"Beginning of Message",
&[
ElementRef::new(1, "C002", Status::Mandatory, 1),
ElementRef::new(2, "C106", Status::Conditional, 1),
ElementRef::new(3, "1225", Status::Conditional, 1),
],
),
SegmentDefinition::new(
"DTM",
"Date/Time/Period",
&[ElementRef::new(1, "C507", Status::Mandatory, 1)],
),
SegmentDefinition::new(
"UNT",
"Message Trailer",
&[
ElementRef::new(1, "0074", Status::Mandatory, 1),
ElementRef::new(2, "0062", Status::Mandatory, 1),
],
),
SegmentDefinition::new(
"RFF",
"Reference",
&[ElementRef::new(1, "C506", Status::Mandatory, 1)],
),
SegmentDefinition::new(
"NAD",
"Name and Address",
&[
ElementRef::new(1, "3035", Status::Mandatory, 1),
ElementRef::new(2, "C082", Status::Conditional, 1),
],
),
SegmentDefinition::new(
"CTA",
"Contact Information",
&[
ElementRef::new(1, "3139", Status::Conditional, 1),
ElementRef::new(2, "C056", Status::Conditional, 1),
],
),
SegmentDefinition::new(
"COM",
"Communication Contact",
&[ElementRef::new(1, "C076", Status::Mandatory, 1)],
),
SegmentDefinition::new(
"IDE",
"Identity",
&[
ElementRef::new(1, "7495", Status::Mandatory, 1),
ElementRef::new(2, "C206", Status::Mandatory, 1),
],
),
SegmentDefinition::new(
"STS",
"Status",
&[
ElementRef::new(1, "9015", Status::Mandatory, 1),
ElementRef::new(2, "9013", Status::Conditional, 1),
ElementRef::new(3, "9011", Status::Conditional, 1),
],
),
SegmentDefinition::new(
"FTX",
"Free Text",
&[
ElementRef::new(1, "4451", Status::Mandatory, 1),
ElementRef::new(2, "C108", Status::Conditional, 1),
],
),
SegmentDefinition::new(
"AGR",
"Agreement Identification",
&[ElementRef::new(1, "C543", Status::Mandatory, 1)],
),
SegmentDefinition::new(
"LOC",
"Place/Location Identification",
&[
ElementRef::new(1, "3227", Status::Mandatory, 1),
ElementRef::new(2, "C517", Status::Conditional, 1),
],
),
];
static SEGMENT_MAP: LazyLock<std::collections::HashMap<&'static str, &'static SegmentDefinition>> =
LazyLock::new(|| SEGMENTS.iter().map(|s| (s.tag, s)).collect());
pub(crate) fn segment_lookup(tag: &str) -> Option<&'static SegmentDefinition> {
SEGMENT_MAP.get(tag).copied()
}
static CODES_1001: &[&str] = &["E01", "E03", "E0F", "E1A", "E44"];
static CODES_1153: &[&str] = &["ACE", "AGI", "AGL", "MG", "TN", "Z13"];
static CODES_1245: &[&str] = &["Z01", "Z02", "Z03"];
static CODES_2005: &[&str] = &["137", "163", "164", "165", "166", "203"];
static CODES_3035: &[&str] = &["BF", "DDQ", "DER", "ELR", "EM", "MR", "MS", "Z01"];
static CODES_3227: &[&str] = &["172", "Z01", "Z04", "ZST"];
static CODES_7495: &[&str] = &["24", "Z18", "Z19", "Z31", "Z32"];
static CODES_9015: &[&str] = &["E01", "E02", "E03", "E04", "E05", "E06", "E07", "E08"];
pub(crate) fn is_code_valid(de_id: &str, code: &str) -> bool {
code_list(de_id).is_none_or(|codes| codes.binary_search(&code).is_ok())
}
pub(crate) fn suggest_code(de_id: &str, code: &str) -> Option<&'static str> {
let codes = code_list(de_id)?;
let idx = codes.partition_point(|&c| c < code);
codes.get(idx).or_else(|| codes.last()).copied()
}
fn expected_components(tag: &str, idx: usize) -> Option<u8> {
match (tag, idx) {
("UNH", 0)
| ("BGM", 2)
| ("UNT", 0)
| ("UNT", 1)
| ("NAD", 0)
| ("CTA", 0)
| ("IDE", 0)
| ("STS", 0)
| ("STS", 1)
| ("STS", 2)
| ("FTX", 0)
| ("LOC", 0) => Some(1),
_ => None,
}
}
pub(crate) fn code_list(de_id: &str) -> Option<&'static [&'static str]> {
match de_id {
"1001" => Some(CODES_1001),
"1153" => Some(CODES_1153),
"1245" => Some(CODES_1245),
"2005" => Some(CODES_2005),
"3035" => Some(CODES_3035),
"3227" => Some(CODES_3227),
"7495" => Some(CODES_7495),
"9015" => Some(CODES_9015),
_ => None,
}
}
static DIRECTORY_VALIDATOR_UTILMD_G1_2: LazyLock<DirectoryValidator> = LazyLock::new(|| {
DirectoryValidator::new(
"EDI@Energy-UTILMD-G1.2",
segment_lookup,
is_code_valid,
suggest_code,
expected_components,
None,
)
});
pub(crate) fn directory_validator() -> &'static DirectoryValidator {
&DIRECTORY_VALIDATOR_UTILMD_G1_2
}
fn rule_unh_mandatory(segments: &[edifact_rs::Segment<'_>], issues: &mut Vec<ValidationIssue>) {
if !segments.iter().any(|s| s.tag == "UNH") {
issues.push(
ValidationIssue::new(
ValidationSeverity::Error,
"mandatory segment UNH is missing".to_owned(),
)
.with_rule_id("MIG-UNH-REQ")
.with_segment("UNH".to_owned()),
);
}
}
fn rule_bgm_mandatory(segments: &[edifact_rs::Segment<'_>], issues: &mut Vec<ValidationIssue>) {
if !segments.iter().any(|s| s.tag == "BGM") {
issues.push(
ValidationIssue::new(
ValidationSeverity::Error,
"mandatory segment BGM is missing".to_owned(),
)
.with_rule_id("MIG-BGM-REQ")
.with_segment("BGM".to_owned()),
);
}
}
fn rule_dtm_mandatory(segments: &[edifact_rs::Segment<'_>], issues: &mut Vec<ValidationIssue>) {
if !segments.iter().any(|s| s.tag == "DTM") {
issues.push(
ValidationIssue::new(
ValidationSeverity::Error,
"mandatory segment DTM is missing".to_owned(),
)
.with_rule_id("MIG-DTM-REQ")
.with_segment("DTM".to_owned()),
);
}
}
fn rule_unt_mandatory(segments: &[edifact_rs::Segment<'_>], issues: &mut Vec<ValidationIssue>) {
if !segments.iter().any(|s| s.tag == "UNT") {
issues.push(
ValidationIssue::new(
ValidationSeverity::Error,
"mandatory segment UNT is missing".to_owned(),
)
.with_rule_id("MIG-UNT-REQ")
.with_segment("UNT".to_owned()),
);
}
}
fn rule_nad_mandatory(segments: &[edifact_rs::Segment<'_>], issues: &mut Vec<ValidationIssue>) {
if !segments.iter().any(|s| s.tag == "NAD") {
issues.push(
ValidationIssue::new(
ValidationSeverity::Error,
"mandatory segment NAD is missing".to_owned(),
)
.with_rule_id("MIG-NAD-REQ")
.with_segment("NAD".to_owned()),
);
}
}
fn rule_ide_mandatory(segments: &[edifact_rs::Segment<'_>], issues: &mut Vec<ValidationIssue>) {
if !segments.iter().any(|s| s.tag == "IDE") {
issues.push(
ValidationIssue::new(
ValidationSeverity::Error,
"mandatory segment IDE is missing".to_owned(),
)
.with_rule_id("MIG-IDE-REQ")
.with_segment("IDE".to_owned()),
);
}
}
fn rule_rff_mandatory(segments: &[edifact_rs::Segment<'_>], issues: &mut Vec<ValidationIssue>) {
if !segments.iter().any(|s| s.tag == "RFF") {
issues.push(
ValidationIssue::new(
ValidationSeverity::Error,
"mandatory segment RFF is missing".to_owned(),
)
.with_rule_id("MIG-RFF-REQ")
.with_segment("RFF".to_owned()),
);
}
}
fn rule_group_sg1_rff_max_occurrences(
segments: &[edifact_rs::Segment<'_>],
issues: &mut Vec<ValidationIssue>,
) {
let count = segments.iter().filter(|s| s.tag == "RFF").count();
if count > 99 {
issues.push(
ValidationIssue::new(
ValidationSeverity::Error,
format!("segment group triggered by RFF occurs {count} times; maximum is 99"),
)
.with_rule_id("MIG-UTILMD-MIG-G1.2-GROUP-SG1-RFF-CARD-MAX")
.with_segment("RFF".to_owned()),
);
}
}
fn rule_group_sg2_nad_max_occurrences(
segments: &[edifact_rs::Segment<'_>],
issues: &mut Vec<ValidationIssue>,
) {
let count = segments.iter().filter(|s| s.tag == "NAD").count();
if count > 99 {
issues.push(
ValidationIssue::new(
ValidationSeverity::Error,
format!("segment group triggered by NAD occurs {count} times; maximum is 99"),
)
.with_rule_id("MIG-UTILMD-MIG-G1.2-GROUP-SG2-NAD-CARD-MAX")
.with_segment("NAD".to_owned()),
);
}
}
fn rule_group_sg4_ide_max_occurrences(
segments: &[edifact_rs::Segment<'_>],
issues: &mut Vec<ValidationIssue>,
) {
let count = segments.iter().filter(|s| s.tag == "IDE").count();
if count > 9_999 {
issues.push(
ValidationIssue::new(
ValidationSeverity::Error,
format!("segment group triggered by IDE occurs {count} times; maximum is 9_999"),
)
.with_rule_id("MIG-UTILMD-MIG-G1.2-GROUP-SG4-IDE-CARD-MAX")
.with_segment("IDE".to_owned()),
);
}
}
fn rule_group_sg2_nad_min_occurrences(
segments: &[edifact_rs::Segment<'_>],
issues: &mut Vec<ValidationIssue>,
) {
let count = segments.iter().filter(|s| s.tag == "NAD").count();
if count < 1 {
issues.push(
ValidationIssue::new(
ValidationSeverity::Error,
format!("segment group triggered by NAD occurs {count} times; minimum is 1"),
)
.with_rule_id("MIG-UTILMD-MIG-G1.2-GROUP-SG2-NAD-CARD-MIN")
.with_segment("NAD".to_owned()),
);
}
}
fn rule_group_sg4_ide_min_occurrences(
segments: &[edifact_rs::Segment<'_>],
issues: &mut Vec<ValidationIssue>,
) {
let count = segments.iter().filter(|s| s.tag == "IDE").count();
if count < 1 {
issues.push(
ValidationIssue::new(
ValidationSeverity::Error,
format!("segment group triggered by IDE occurs {count} times; minimum is 1"),
)
.with_rule_id("MIG-UTILMD-MIG-G1.2-GROUP-SG4-IDE-CARD-MIN")
.with_segment("IDE".to_owned()),
);
}
}
fn rule_segment_order(segments: &[edifact_rs::Segment<'_>], issues: &mut Vec<ValidationIssue>) {
fn group_order(name: &str) -> &'static [&'static str] {
match name {
"ROOT" => &["UNH", "BGM", "DTM", "UNT"],
"SG1" | "SG6" => &["RFF"],
"SG2" | "SG12" => &["NAD"],
"SG3" => &["CTA", "COM"],
"SG4" => &["IDE", "STS", "DTM", "FTX", "AGR"],
"SG5" => &["LOC"],
_ => &[],
}
}
fn check_order(
group: &edifact_rs::group::SegmentGroupIndexed,
all_segs: &[edifact_rs::Segment<'_>],
rule_id: &str,
issues: &mut Vec<ValidationIssue>,
) {
let expected = group_order(group.definition);
if !expected.is_empty() {
let mut cursor: usize = 0;
for idx in group.direct_segment_indices() {
let seg = &all_segs[idx];
if let Some(pos) = expected[cursor..].iter().position(|&t| t == seg.tag) {
cursor += pos;
} else if expected.contains(&seg.tag) {
issues.push(
ValidationIssue::new(
ValidationSeverity::Error,
"segment appears out of order".to_owned(),
)
.with_rule_id(rule_id)
.with_segment(seg.tag.to_owned()),
);
}
}
}
for child in &group.children {
check_order(child, all_segs, rule_id, issues);
}
}
let tree = edifact_rs::group::group_segments_indexed(segments, GROUP_SCHEMA, "ROOT");
check_order(&tree, segments, "MIG-UTILMD-MIG-G1.2-ORDER", issues);
}
static MIG_UTILMD_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(
ProfileRulePack::new("UTILMD-MIG-G1.2")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_stateless_rule_fn(rule_unh_mandatory)
.with_stateless_rule_fn(rule_bgm_mandatory)
.with_stateless_rule_fn(rule_dtm_mandatory)
.with_stateless_rule_fn(rule_unt_mandatory)
.with_stateless_rule_fn(rule_nad_mandatory)
.with_stateless_rule_fn(rule_ide_mandatory)
.with_stateless_rule_fn(rule_rff_mandatory)
.with_stateless_rule_fn(rule_group_sg1_rff_max_occurrences)
.with_stateless_rule_fn(rule_group_sg2_nad_max_occurrences)
.with_stateless_rule_fn(rule_group_sg4_ide_max_occurrences)
.with_stateless_rule_fn(rule_group_sg2_nad_min_occurrences)
.with_stateless_rule_fn(rule_group_sg4_ide_min_occurrences)
.with_stateless_rule_fn(rule_segment_order),
)
});
pub(crate) fn mig_rule_pack() -> Arc<ProfileRulePack> {
Arc::clone(&MIG_UTILMD_PACK)
}
static GROUP_SCHEMA: &[GroupDef] = &[
GroupDef {
name: "SG2",
trigger: "NAD",
children: &[],
},
GroupDef {
name: "SG4",
trigger: "IDE",
children: &[GroupDef {
name: "SG6",
trigger: "RFF",
children: &[],
}],
},
];
#[allow(unused_imports)]
use super::ahb_helpers::{
ahb_check_conditional, ahb_check_field_value, ahb_check_mandatory, ahb_check_not_used,
ahb_check_qualifier, ahb_check_required_qualifier, ahb_check_soll,
};
static AHB_44001_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44001")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44001-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44001-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44001", "44001", issues);
})
.with_named_stateless_rule_fn("AHB-44001-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44001-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E01']", |q| matches!(q, "E01"), "44001", issues);
})
.with_named_stateless_rule_fn("AHB-44001-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44001-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44001", "44001", issues);
})
.with_named_stateless_rule_fn("AHB-44001-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44001-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44001", issues);
})
.with_named_stateless_rule_fn("AHB-44001-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44001-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44001", "44001", issues);
})
.with_named_stateless_rule_fn("AHB-44001-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44001-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44001", issues);
})
.with_named_stateless_rule_fn("AHB-44001-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44001-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44001", "44001", issues);
})
.with_named_stateless_rule_fn("AHB-44001-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44001-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['Z19']", |q| matches!(q, "Z19"), "44001", issues);
})
.with_named_stateless_rule_fn("AHB-44001-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44001-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44001", "44001", issues);
})
.with_named_stateless_rule_fn("AHB-44001-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44001-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44001", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44001-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44001-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44001-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44001", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44001-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44001-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44001-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44001", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_scoped_group_rule_fn("SG4", "AHB-44001-SG4-FTX-I0", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
if segs.iter().any(|s| s.tag == "STS" && s.element_str(0).is_some_and(|v| v == "E01") && s.element_str(2).is_some_and(|v| v == "E14")) && !segs.iter().any(|s| s.tag == "FTX") {
issues.push(ValidationIssue::new(ValidationSeverity::Error, "in SG4: conditional segment FTX is missing for Pruefidentifikator 44001 (I: when STS DE[0]=\"E01\"+DE[2]=\"E14\" is present in SG4)".to_owned()).with_rule_id("AHB-44001-SG4-FTX-I0").with_segment("FTX".to_owned()));
}
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_scoped_group_rule_fn("SG4", "AHB-44001-SG4-FTX-I1", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
if segs.iter().any(|s| s.tag == "STS" && s.element_str(0).is_some_and(|v| v == "E01") && s.element_str(2).is_some_and(|v| v == "Z35")) && !segs.iter().any(|s| s.tag == "FTX") {
issues.push(ValidationIssue::new(ValidationSeverity::Error, "in SG4: conditional segment FTX is missing for Pruefidentifikator 44001 (I: when STS DE[0]=\"E01\"+DE[2]=\"Z35\" is present in SG4)".to_owned()).with_rule_id("AHB-44001-SG4-FTX-I1").with_segment("FTX".to_owned()));
}
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44001_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44001_PACK)
}
static AHB_44002_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44002")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44002-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44002-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44002", "44002", issues);
})
.with_named_stateless_rule_fn("AHB-44002-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44002-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E01']", |q| matches!(q, "E01"), "44002", issues);
})
.with_named_stateless_rule_fn("AHB-44002-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44002-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44002", "44002", issues);
})
.with_named_stateless_rule_fn("AHB-44002-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44002-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44002", issues);
})
.with_named_stateless_rule_fn("AHB-44002-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44002-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44002", "44002", issues);
})
.with_named_stateless_rule_fn("AHB-44002-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44002-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44002", issues);
})
.with_named_stateless_rule_fn("AHB-44002-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44002-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44002", "44002", issues);
})
.with_named_stateless_rule_fn("AHB-44002-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44002-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['Z19']", |q| matches!(q, "Z19"), "44002", issues);
})
.with_named_stateless_rule_fn("AHB-44002-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44002-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44002", "44002", issues);
})
.with_named_stateless_rule_fn("AHB-44002-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44002-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44002", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44002-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44002-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44002-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44002", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44002-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44002-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44002-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44002", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_scoped_group_rule_fn("SG4", "AHB-44002-SG4-FTX-I0", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
if segs.iter().any(|s| s.tag == "STS" && s.element_str(0).is_some_and(|v| v == "E01") && s.element_str(2).is_some_and(|v| v == "E14")) && !segs.iter().any(|s| s.tag == "FTX") {
issues.push(ValidationIssue::new(ValidationSeverity::Error, "in SG4: conditional segment FTX is missing for Pruefidentifikator 44002 (I: when STS DE[0]=\"E01\"+DE[2]=\"E14\" is present in SG4)".to_owned()).with_rule_id("AHB-44002-SG4-FTX-I0").with_segment("FTX".to_owned()));
}
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_scoped_group_rule_fn("SG4", "AHB-44002-SG4-FTX-I1", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
if segs.iter().any(|s| s.tag == "STS" && s.element_str(0).is_some_and(|v| v == "E01") && s.element_str(2).is_some_and(|v| v == "Z35")) && !segs.iter().any(|s| s.tag == "FTX") {
issues.push(ValidationIssue::new(ValidationSeverity::Error, "in SG4: conditional segment FTX is missing for Pruefidentifikator 44002 (I: when STS DE[0]=\"E01\"+DE[2]=\"Z35\" is present in SG4)".to_owned()).with_rule_id("AHB-44002-SG4-FTX-I1").with_segment("FTX".to_owned()));
}
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44002_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44002_PACK)
}
static AHB_44003_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44003")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44003-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44003-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44003", "44003", issues);
})
.with_named_stateless_rule_fn("AHB-44003-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44003-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E01']", |q| matches!(q, "E01"), "44003", issues);
})
.with_named_stateless_rule_fn("AHB-44003-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44003-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44003", "44003", issues);
})
.with_named_stateless_rule_fn("AHB-44003-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44003-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44003", issues);
})
.with_named_stateless_rule_fn("AHB-44003-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44003-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44003", "44003", issues);
})
.with_named_stateless_rule_fn("AHB-44003-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44003-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44003", issues);
})
.with_named_stateless_rule_fn("AHB-44003-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44003-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44003", "44003", issues);
})
.with_named_stateless_rule_fn("AHB-44003-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44003-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['Z19']", |q| matches!(q, "Z19"), "44003", issues);
})
.with_named_stateless_rule_fn("AHB-44003-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44003-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44003", "44003", issues);
})
.with_named_stateless_rule_fn("AHB-44003-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44003-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44003", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44003-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44003-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44003-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44003", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44003-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44003-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44003-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44003", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_scoped_group_rule_fn("SG4", "AHB-44003-SG4-FTX-I0", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
if segs.iter().any(|s| s.tag == "STS" && s.element_str(0).is_some_and(|v| v == "E01") && s.element_str(2).is_some_and(|v| v == "E14")) && !segs.iter().any(|s| s.tag == "FTX") {
issues.push(ValidationIssue::new(ValidationSeverity::Error, "in SG4: conditional segment FTX is missing for Pruefidentifikator 44003 (I: when STS DE[0]=\"E01\"+DE[2]=\"E14\" is present in SG4)".to_owned()).with_rule_id("AHB-44003-SG4-FTX-I0").with_segment("FTX".to_owned()));
}
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_scoped_group_rule_fn("SG4", "AHB-44003-SG4-FTX-I1", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
if segs.iter().any(|s| s.tag == "STS" && s.element_str(0).is_some_and(|v| v == "E01") && s.element_str(2).is_some_and(|v| v == "Z35")) && !segs.iter().any(|s| s.tag == "FTX") {
issues.push(ValidationIssue::new(ValidationSeverity::Error, "in SG4: conditional segment FTX is missing for Pruefidentifikator 44003 (I: when STS DE[0]=\"E01\"+DE[2]=\"Z35\" is present in SG4)".to_owned()).with_rule_id("AHB-44003-SG4-FTX-I1").with_segment("FTX".to_owned()));
}
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44003_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44003_PACK)
}
static AHB_44004_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44004")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44004-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44004-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44004", "44004", issues);
})
.with_named_stateless_rule_fn("AHB-44004-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44004-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E0F']", |q| matches!(q, "E0F"), "44004", issues);
})
.with_named_stateless_rule_fn("AHB-44004-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44004-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44004", "44004", issues);
})
.with_named_stateless_rule_fn("AHB-44004-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44004-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44004", issues);
})
.with_named_stateless_rule_fn("AHB-44004-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44004-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44004", "44004", issues);
})
.with_named_stateless_rule_fn("AHB-44004-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44004-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44004", issues);
})
.with_named_stateless_rule_fn("AHB-44004-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44004-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44004", "44004", issues);
})
.with_named_stateless_rule_fn("AHB-44004-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44004-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['Z19']", |q| matches!(q, "Z19"), "44004", issues);
})
.with_named_stateless_rule_fn("AHB-44004-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44004-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44004", "44004", issues);
})
.with_named_stateless_rule_fn("AHB-44004-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44004-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44004", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44004-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44004-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44004-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44004", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44004-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44004-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44004-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44004", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_scoped_group_rule_fn("SG4", "AHB-44004-SG4-DTM-I0", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
if segs.iter().any(|s| s.tag == "STS" && s.element_str(0).is_some_and(|v| v == "7") && s.element_str(2).is_some_and(|v| v == "ZG9" || v == "ZH1" || v == "ZH2")) && !segs.iter().any(|s| s.tag == "DTM") {
issues.push(ValidationIssue::new(ValidationSeverity::Error, "in SG4: conditional segment DTM is missing for Pruefidentifikator 44004 (I: when STS DE[0]=\"7\"+DE[2]∈{ZG9|ZH1|ZH2} is present in SG4)".to_owned()).with_rule_id("AHB-44004-SG4-DTM-I0").with_segment("DTM".to_owned()));
}
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_scoped_group_rule_fn("SG4", "AHB-44004-SG4-DTM-I1", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
if segs.iter().any(|s| s.tag == "STS" && s.element_str(0).is_some_and(|v| v == "7") && s.element_str(2).is_some_and(|v| v == "ZG9" || v == "ZH1" || v == "ZH2")) && !segs.iter().any(|s| s.tag == "DTM" && s.element_str(0).is_some_and(|v| v == "36")) {
issues.push(ValidationIssue::new(ValidationSeverity::Error, "in SG4: conditional segment DTM (DE[0]=\"36\") is missing for Pruefidentifikator 44004 (I: when STS DE[0]=\"7\"+DE[2]∈{ZG9|ZH1|ZH2} is present in SG4)".to_owned()).with_rule_id("AHB-44004-SG4-DTM-I1").with_segment("DTM".to_owned()));
}
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_scoped_group_rule_fn("SG4", "AHB-44004-SG4-FTX-I0", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
if segs.iter().any(|s| s.tag == "STS" && s.element_str(0).is_some_and(|v| v == "E01") && s.element_str(2).is_some_and(|v| v == "E14")) && !segs.iter().any(|s| s.tag == "FTX") {
issues.push(ValidationIssue::new(ValidationSeverity::Error, "in SG4: conditional segment FTX is missing for Pruefidentifikator 44004 (I: when STS DE[0]=\"E01\"+DE[2]=\"E14\" is present in SG4)".to_owned()).with_rule_id("AHB-44004-SG4-FTX-I0").with_segment("FTX".to_owned()));
}
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44004_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44004_PACK)
}
static AHB_44005_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44005")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44005-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44005-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44005", "44005", issues);
})
.with_named_stateless_rule_fn("AHB-44005-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44005-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E01']", |q| matches!(q, "E01"), "44005", issues);
})
.with_named_stateless_rule_fn("AHB-44005-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44005-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44005", "44005", issues);
})
.with_named_stateless_rule_fn("AHB-44005-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44005-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44005", issues);
})
.with_named_stateless_rule_fn("AHB-44005-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44005-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44005", "44005", issues);
})
.with_named_stateless_rule_fn("AHB-44005-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44005-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44005", issues);
})
.with_named_stateless_rule_fn("AHB-44005-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44005-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44005", "44005", issues);
})
.with_named_stateless_rule_fn("AHB-44005-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44005-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['Z19']", |q| matches!(q, "Z19"), "44005", issues);
})
.with_named_stateless_rule_fn("AHB-44005-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44005-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44005", "44005", issues);
})
.with_named_stateless_rule_fn("AHB-44005-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44005-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44005", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44005-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44005-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44005-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44005", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44005-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44005-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44005-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44005", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_scoped_group_rule_fn("SG4", "AHB-44005-SG4-DTM-I0", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
if segs.iter().any(|s| s.tag == "STS" && s.element_str(0).is_some_and(|v| v == "7") && s.element_str(2).is_some_and(|v| v == "ZG9" || v == "ZH1" || v == "ZH2")) && !segs.iter().any(|s| s.tag == "DTM") {
issues.push(ValidationIssue::new(ValidationSeverity::Error, "in SG4: conditional segment DTM is missing for Pruefidentifikator 44005 (I: when STS DE[0]=\"7\"+DE[2]∈{ZG9|ZH1|ZH2} is present in SG4)".to_owned()).with_rule_id("AHB-44005-SG4-DTM-I0").with_segment("DTM".to_owned()));
}
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_scoped_group_rule_fn("SG4", "AHB-44005-SG4-DTM-I1", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
if segs.iter().any(|s| s.tag == "STS" && s.element_str(0).is_some_and(|v| v == "7") && s.element_str(2).is_some_and(|v| v == "ZG9" || v == "ZH1" || v == "ZH2")) && !segs.iter().any(|s| s.tag == "DTM" && s.element_str(0).is_some_and(|v| v == "36")) {
issues.push(ValidationIssue::new(ValidationSeverity::Error, "in SG4: conditional segment DTM (DE[0]=\"36\") is missing for Pruefidentifikator 44005 (I: when STS DE[0]=\"7\"+DE[2]∈{ZG9|ZH1|ZH2} is present in SG4)".to_owned()).with_rule_id("AHB-44005-SG4-DTM-I1").with_segment("DTM".to_owned()));
}
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_scoped_group_rule_fn("SG4", "AHB-44005-SG4-FTX-I0", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
if segs.iter().any(|s| s.tag == "STS" && s.element_str(0).is_some_and(|v| v == "E01") && s.element_str(2).is_some_and(|v| v == "E14")) && !segs.iter().any(|s| s.tag == "FTX") {
issues.push(ValidationIssue::new(ValidationSeverity::Error, "in SG4: conditional segment FTX is missing for Pruefidentifikator 44005 (I: when STS DE[0]=\"E01\"+DE[2]=\"E14\" is present in SG4)".to_owned()).with_rule_id("AHB-44005-SG4-FTX-I0").with_segment("FTX".to_owned()));
}
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44005_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44005_PACK)
}
static AHB_44006_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44006")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44006-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44006-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44006", "44006", issues);
})
.with_named_stateless_rule_fn("AHB-44006-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44006-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E0F']", |q| matches!(q, "E0F"), "44006", issues);
})
.with_named_stateless_rule_fn("AHB-44006-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44006-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44006", "44006", issues);
})
.with_named_stateless_rule_fn("AHB-44006-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44006-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44006", issues);
})
.with_named_stateless_rule_fn("AHB-44006-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44006-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44006", "44006", issues);
})
.with_named_stateless_rule_fn("AHB-44006-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44006-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44006", issues);
})
.with_named_stateless_rule_fn("AHB-44006-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44006-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44006", "44006", issues);
})
.with_named_stateless_rule_fn("AHB-44006-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44006-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['Z19']", |q| matches!(q, "Z19"), "44006", issues);
})
.with_named_stateless_rule_fn("AHB-44006-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44006-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44006", "44006", issues);
})
.with_named_stateless_rule_fn("AHB-44006-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44006-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44006", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44006-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44006-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44006-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44006", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44006-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44006-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44006-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44006", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_scoped_group_rule_fn("SG4", "AHB-44006-SG4-DTM-I0", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
if segs.iter().any(|s| s.tag == "STS" && s.element_str(0).is_some_and(|v| v == "7") && s.element_str(2).is_some_and(|v| v == "ZG9" || v == "ZH1" || v == "ZH2")) && !segs.iter().any(|s| s.tag == "DTM") {
issues.push(ValidationIssue::new(ValidationSeverity::Error, "in SG4: conditional segment DTM is missing for Pruefidentifikator 44006 (I: when STS DE[0]=\"7\"+DE[2]∈{ZG9|ZH1|ZH2} is present in SG4)".to_owned()).with_rule_id("AHB-44006-SG4-DTM-I0").with_segment("DTM".to_owned()));
}
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_scoped_group_rule_fn("SG4", "AHB-44006-SG4-DTM-I1", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
if segs.iter().any(|s| s.tag == "STS" && s.element_str(0).is_some_and(|v| v == "7") && s.element_str(2).is_some_and(|v| v == "ZG9" || v == "ZH1" || v == "ZH2")) && !segs.iter().any(|s| s.tag == "DTM" && s.element_str(0).is_some_and(|v| v == "36")) {
issues.push(ValidationIssue::new(ValidationSeverity::Error, "in SG4: conditional segment DTM (DE[0]=\"36\") is missing for Pruefidentifikator 44006 (I: when STS DE[0]=\"7\"+DE[2]∈{ZG9|ZH1|ZH2} is present in SG4)".to_owned()).with_rule_id("AHB-44006-SG4-DTM-I1").with_segment("DTM".to_owned()));
}
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_scoped_group_rule_fn("SG4", "AHB-44006-SG4-FTX-I0", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
if segs.iter().any(|s| s.tag == "STS" && s.element_str(0).is_some_and(|v| v == "E01") && s.element_str(2).is_some_and(|v| v == "E14")) && !segs.iter().any(|s| s.tag == "FTX") {
issues.push(ValidationIssue::new(ValidationSeverity::Error, "in SG4: conditional segment FTX is missing for Pruefidentifikator 44006 (I: when STS DE[0]=\"E01\"+DE[2]=\"E14\" is present in SG4)".to_owned()).with_rule_id("AHB-44006-SG4-FTX-I0").with_segment("FTX".to_owned()));
}
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44006_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44006_PACK)
}
static AHB_44017_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44017")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44017-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44017-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44017", "44017", issues);
})
.with_named_stateless_rule_fn("AHB-44017-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44017-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E01']", |q| matches!(q, "E01"), "44017", issues);
})
.with_named_stateless_rule_fn("AHB-44017-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44017-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44017", "44017", issues);
})
.with_named_stateless_rule_fn("AHB-44017-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44017-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44017", issues);
})
.with_named_stateless_rule_fn("AHB-44017-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44017-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44017", "44017", issues);
})
.with_named_stateless_rule_fn("AHB-44017-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44017-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44017", issues);
})
.with_named_stateless_rule_fn("AHB-44017-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44017-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44017", "44017", issues);
})
.with_named_stateless_rule_fn("AHB-44017-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44017-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['Z19']", |q| matches!(q, "Z19"), "44017", issues);
})
.with_named_stateless_rule_fn("AHB-44017-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44017-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44017", "44017", issues);
})
.with_named_stateless_rule_fn("AHB-44017-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44017-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44017", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44017-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44017-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44017-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44017", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44017-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44017-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44017-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44017", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_scoped_group_rule_fn("SG4", "AHB-44017-SG4-FTX-I0", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
if segs.iter().any(|s| s.tag == "STS" && s.element_str(0).is_some_and(|v| v == "E01") && s.element_str(2).is_some_and(|v| v == "E14")) && !segs.iter().any(|s| s.tag == "FTX") {
issues.push(ValidationIssue::new(ValidationSeverity::Error, "in SG4: conditional segment FTX is missing for Pruefidentifikator 44017 (I: when STS DE[0]=\"E01\"+DE[2]=\"E14\" is present in SG4)".to_owned()).with_rule_id("AHB-44017-SG4-FTX-I0").with_segment("FTX".to_owned()));
}
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44017_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44017_PACK)
}
static AHB_44018_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44018")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44018-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44018-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44018", "44018", issues);
})
.with_named_stateless_rule_fn("AHB-44018-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44018-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E01']", |q| matches!(q, "E01"), "44018", issues);
})
.with_named_stateless_rule_fn("AHB-44018-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44018-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44018", "44018", issues);
})
.with_named_stateless_rule_fn("AHB-44018-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44018-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44018", issues);
})
.with_named_stateless_rule_fn("AHB-44018-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44018-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44018", "44018", issues);
})
.with_named_stateless_rule_fn("AHB-44018-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44018-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44018", issues);
})
.with_named_stateless_rule_fn("AHB-44018-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44018-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44018", "44018", issues);
})
.with_named_stateless_rule_fn("AHB-44018-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44018-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['Z19']", |q| matches!(q, "Z19"), "44018", issues);
})
.with_named_stateless_rule_fn("AHB-44018-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44018-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44018", "44018", issues);
})
.with_named_stateless_rule_fn("AHB-44018-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44018-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44018", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44018-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44018-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44018-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44018", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44018-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44018-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44018-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44018", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_scoped_group_rule_fn("SG4", "AHB-44018-SG4-FTX-I0", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
if segs.iter().any(|s| s.tag == "STS" && s.element_str(0).is_some_and(|v| v == "E01") && s.element_str(2).is_some_and(|v| v == "E14")) && !segs.iter().any(|s| s.tag == "FTX") {
issues.push(ValidationIssue::new(ValidationSeverity::Error, "in SG4: conditional segment FTX is missing for Pruefidentifikator 44018 (I: when STS DE[0]=\"E01\"+DE[2]=\"E14\" is present in SG4)".to_owned()).with_rule_id("AHB-44018-SG4-FTX-I0").with_segment("FTX".to_owned()));
}
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44018_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44018_PACK)
}
static AHB_44022_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44022")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44022-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44022-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44022", "44022", issues);
})
.with_named_stateless_rule_fn("AHB-44022-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44022-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E01', 'E02', 'E35']", |q| matches!(q, "E01" | "E02" | "E35"), "44022", issues);
})
.with_named_stateless_rule_fn("AHB-44022-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44022-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44022", "44022", issues);
})
.with_named_stateless_rule_fn("AHB-44022-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44022-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44022", issues);
})
.with_named_stateless_rule_fn("AHB-44022-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44022-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44022", "44022", issues);
})
.with_named_stateless_rule_fn("AHB-44022-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44022-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44022", issues);
})
.with_named_stateless_rule_fn("AHB-44022-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44022-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44022", "44022", issues);
})
.with_named_stateless_rule_fn("AHB-44022-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44022-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44022", issues);
})
.with_named_stateless_rule_fn("AHB-44022-STS-M", |segs, issues| {
ahb_check_mandatory(segs, "STS", "AHB-44022-STS-M", "mandatory segment STS is missing for Pruefidentifikator 44022", "44022", issues);
})
.with_named_stateless_rule_fn("AHB-44022-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44022-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44022", "44022", issues);
})
.with_named_stateless_rule_fn("AHB-44022-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44022-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44022", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44022-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44022-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44022-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44022", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44022-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44022-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44022-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44022", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44022_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44022_PACK)
}
static AHB_44023_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44023")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44023-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44023-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44023", "44023", issues);
})
.with_named_stateless_rule_fn("AHB-44023-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44023-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E01', 'E02', 'E35']", |q| matches!(q, "E01" | "E02" | "E35"), "44023", issues);
})
.with_named_stateless_rule_fn("AHB-44023-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44023-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44023", "44023", issues);
})
.with_named_stateless_rule_fn("AHB-44023-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44023-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44023", issues);
})
.with_named_stateless_rule_fn("AHB-44023-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44023-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44023", "44023", issues);
})
.with_named_stateless_rule_fn("AHB-44023-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44023-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44023", issues);
})
.with_named_stateless_rule_fn("AHB-44023-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44023-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44023", "44023", issues);
})
.with_named_stateless_rule_fn("AHB-44023-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44023-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44023", issues);
})
.with_named_stateless_rule_fn("AHB-44023-STS-M", |segs, issues| {
ahb_check_mandatory(segs, "STS", "AHB-44023-STS-M", "mandatory segment STS is missing for Pruefidentifikator 44023", "44023", issues);
})
.with_named_stateless_rule_fn("AHB-44023-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44023-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44023", "44023", issues);
})
.with_named_stateless_rule_fn("AHB-44023-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44023-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44023", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44023-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44023-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44023-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44023", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44023-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44023-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44023-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44023", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44023_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44023_PACK)
}
static AHB_44024_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44024")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44024-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44024-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44024", "44024", issues);
})
.with_named_stateless_rule_fn("AHB-44024-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44024-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E01', 'E02', 'E35']", |q| matches!(q, "E01" | "E02" | "E35"), "44024", issues);
})
.with_named_stateless_rule_fn("AHB-44024-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44024-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44024", "44024", issues);
})
.with_named_stateless_rule_fn("AHB-44024-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44024-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44024", issues);
})
.with_named_stateless_rule_fn("AHB-44024-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44024-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44024", "44024", issues);
})
.with_named_stateless_rule_fn("AHB-44024-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44024-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44024", issues);
})
.with_named_stateless_rule_fn("AHB-44024-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44024-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44024", "44024", issues);
})
.with_named_stateless_rule_fn("AHB-44024-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44024-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44024", issues);
})
.with_named_stateless_rule_fn("AHB-44024-STS-M", |segs, issues| {
ahb_check_mandatory(segs, "STS", "AHB-44024-STS-M", "mandatory segment STS is missing for Pruefidentifikator 44024", "44024", issues);
})
.with_named_stateless_rule_fn("AHB-44024-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44024-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44024", "44024", issues);
})
.with_named_stateless_rule_fn("AHB-44024-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44024-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44024", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44024-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44024-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44024-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44024", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44024-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44024-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44024-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44024", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44024_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44024_PACK)
}
static AHB_44039_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44039")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44039-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44039-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44039", "44039", issues);
})
.with_named_stateless_rule_fn("AHB-44039-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44039-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E35']", |q| matches!(q, "E35"), "44039", issues);
})
.with_named_stateless_rule_fn("AHB-44039-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44039-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44039", "44039", issues);
})
.with_named_stateless_rule_fn("AHB-44039-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44039-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44039", issues);
})
.with_named_stateless_rule_fn("AHB-44039-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44039-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44039", "44039", issues);
})
.with_named_stateless_rule_fn("AHB-44039-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44039-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44039", issues);
})
.with_named_stateless_rule_fn("AHB-44039-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44039-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44039", "44039", issues);
})
.with_named_stateless_rule_fn("AHB-44039-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44039-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44039", issues);
})
.with_named_stateless_rule_fn("AHB-44039-STS-M", |segs, issues| {
ahb_check_mandatory(segs, "STS", "AHB-44039-STS-M", "mandatory segment STS is missing for Pruefidentifikator 44039", "44039", issues);
})
.with_named_stateless_rule_fn("AHB-44039-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44039-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44039", "44039", issues);
})
.with_named_stateless_rule_fn("AHB-44039-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44039-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44039", "44039", issues);
})
.with_named_stateless_rule_fn("AHB-44039-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44039-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44039", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44039-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44039-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44039-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44039", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44039-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44039-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44039-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44039", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44039_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44039_PACK)
}
static AHB_44040_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44040")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44040-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44040-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44040", "44040", issues);
})
.with_named_stateless_rule_fn("AHB-44040-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44040-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E35']", |q| matches!(q, "E35"), "44040", issues);
})
.with_named_stateless_rule_fn("AHB-44040-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44040-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44040", "44040", issues);
})
.with_named_stateless_rule_fn("AHB-44040-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44040-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44040", issues);
})
.with_named_stateless_rule_fn("AHB-44040-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44040-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44040", "44040", issues);
})
.with_named_stateless_rule_fn("AHB-44040-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44040-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44040", issues);
})
.with_named_stateless_rule_fn("AHB-44040-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44040-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44040", "44040", issues);
})
.with_named_stateless_rule_fn("AHB-44040-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44040-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44040", issues);
})
.with_named_stateless_rule_fn("AHB-44040-STS-M", |segs, issues| {
ahb_check_mandatory(segs, "STS", "AHB-44040-STS-M", "mandatory segment STS is missing for Pruefidentifikator 44040", "44040", issues);
})
.with_named_stateless_rule_fn("AHB-44040-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44040-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44040", "44040", issues);
})
.with_named_stateless_rule_fn("AHB-44040-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44040-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44040", "44040", issues);
})
.with_named_stateless_rule_fn("AHB-44040-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44040-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44040", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44040-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44040-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44040-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44040", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44040-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44040-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44040-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44040", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44040_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44040_PACK)
}
static AHB_44041_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44041")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44041-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44041-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44041", "44041", issues);
})
.with_named_stateless_rule_fn("AHB-44041-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44041-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E35']", |q| matches!(q, "E35"), "44041", issues);
})
.with_named_stateless_rule_fn("AHB-44041-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44041-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44041", "44041", issues);
})
.with_named_stateless_rule_fn("AHB-44041-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44041-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44041", issues);
})
.with_named_stateless_rule_fn("AHB-44041-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44041-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44041", "44041", issues);
})
.with_named_stateless_rule_fn("AHB-44041-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44041-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44041", issues);
})
.with_named_stateless_rule_fn("AHB-44041-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44041-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44041", "44041", issues);
})
.with_named_stateless_rule_fn("AHB-44041-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44041-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44041", issues);
})
.with_named_stateless_rule_fn("AHB-44041-STS-M", |segs, issues| {
ahb_check_mandatory(segs, "STS", "AHB-44041-STS-M", "mandatory segment STS is missing for Pruefidentifikator 44041", "44041", issues);
})
.with_named_stateless_rule_fn("AHB-44041-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44041-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44041", "44041", issues);
})
.with_named_stateless_rule_fn("AHB-44041-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44041-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44041", "44041", issues);
})
.with_named_stateless_rule_fn("AHB-44041-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44041-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44041", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44041-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44041-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44041-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44041", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44041-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44041-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44041-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44041", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44041_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44041_PACK)
}
static AHB_44042_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44042")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44042-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44042-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44042", "44042", issues);
})
.with_named_stateless_rule_fn("AHB-44042-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44042-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E01']", |q| matches!(q, "E01"), "44042", issues);
})
.with_named_stateless_rule_fn("AHB-44042-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44042-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44042", "44042", issues);
})
.with_named_stateless_rule_fn("AHB-44042-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44042-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44042", issues);
})
.with_named_stateless_rule_fn("AHB-44042-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44042-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44042", "44042", issues);
})
.with_named_stateless_rule_fn("AHB-44042-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44042-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44042", issues);
})
.with_named_stateless_rule_fn("AHB-44042-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44042-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44042", "44042", issues);
})
.with_named_stateless_rule_fn("AHB-44042-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44042-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44042", issues);
})
.with_named_stateless_rule_fn("AHB-44042-STS-M", |segs, issues| {
ahb_check_mandatory(segs, "STS", "AHB-44042-STS-M", "mandatory segment STS is missing for Pruefidentifikator 44042", "44042", issues);
})
.with_named_stateless_rule_fn("AHB-44042-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44042-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44042", "44042", issues);
})
.with_named_stateless_rule_fn("AHB-44042-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44042-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44042", "44042", issues);
})
.with_named_stateless_rule_fn("AHB-44042-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44042-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44042", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44042-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44042-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44042-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44042", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44042-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44042-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44042-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44042", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44042_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44042_PACK)
}
static AHB_44043_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44043")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44043-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44043-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44043", "44043", issues);
})
.with_named_stateless_rule_fn("AHB-44043-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44043-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E01']", |q| matches!(q, "E01"), "44043", issues);
})
.with_named_stateless_rule_fn("AHB-44043-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44043-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44043", "44043", issues);
})
.with_named_stateless_rule_fn("AHB-44043-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44043-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44043", issues);
})
.with_named_stateless_rule_fn("AHB-44043-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44043-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44043", "44043", issues);
})
.with_named_stateless_rule_fn("AHB-44043-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44043-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44043", issues);
})
.with_named_stateless_rule_fn("AHB-44043-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44043-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44043", "44043", issues);
})
.with_named_stateless_rule_fn("AHB-44043-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44043-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44043", issues);
})
.with_named_stateless_rule_fn("AHB-44043-STS-M", |segs, issues| {
ahb_check_mandatory(segs, "STS", "AHB-44043-STS-M", "mandatory segment STS is missing for Pruefidentifikator 44043", "44043", issues);
})
.with_named_stateless_rule_fn("AHB-44043-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44043-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44043", "44043", issues);
})
.with_named_stateless_rule_fn("AHB-44043-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44043-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44043", "44043", issues);
})
.with_named_stateless_rule_fn("AHB-44043-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44043-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44043", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44043-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44043-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44043-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44043", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44043-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44043-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44043-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44043", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44043_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44043_PACK)
}
static AHB_44044_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44044")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44044-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44044-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44044", "44044", issues);
})
.with_named_stateless_rule_fn("AHB-44044-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44044-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E01']", |q| matches!(q, "E01"), "44044", issues);
})
.with_named_stateless_rule_fn("AHB-44044-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44044-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44044", "44044", issues);
})
.with_named_stateless_rule_fn("AHB-44044-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44044-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44044", issues);
})
.with_named_stateless_rule_fn("AHB-44044-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44044-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44044", "44044", issues);
})
.with_named_stateless_rule_fn("AHB-44044-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44044-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44044", issues);
})
.with_named_stateless_rule_fn("AHB-44044-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44044-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44044", "44044", issues);
})
.with_named_stateless_rule_fn("AHB-44044-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44044-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44044", issues);
})
.with_named_stateless_rule_fn("AHB-44044-STS-M", |segs, issues| {
ahb_check_mandatory(segs, "STS", "AHB-44044-STS-M", "mandatory segment STS is missing for Pruefidentifikator 44044", "44044", issues);
})
.with_named_stateless_rule_fn("AHB-44044-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44044-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44044", "44044", issues);
})
.with_named_stateless_rule_fn("AHB-44044-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44044-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44044", "44044", issues);
})
.with_named_stateless_rule_fn("AHB-44044-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44044-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44044", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44044-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44044-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44044-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44044", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44044-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44044-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44044-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44044", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44044_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44044_PACK)
}
static AHB_44051_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44051")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44051-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44051-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44051", "44051", issues);
})
.with_named_stateless_rule_fn("AHB-44051-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44051-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E02']", |q| matches!(q, "E02"), "44051", issues);
})
.with_named_stateless_rule_fn("AHB-44051-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44051-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44051", "44051", issues);
})
.with_named_stateless_rule_fn("AHB-44051-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44051-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44051", issues);
})
.with_named_stateless_rule_fn("AHB-44051-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44051-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44051", "44051", issues);
})
.with_named_stateless_rule_fn("AHB-44051-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44051-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44051", issues);
})
.with_named_stateless_rule_fn("AHB-44051-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44051-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44051", "44051", issues);
})
.with_named_stateless_rule_fn("AHB-44051-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44051-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44051", issues);
})
.with_named_stateless_rule_fn("AHB-44051-STS-M", |segs, issues| {
ahb_check_mandatory(segs, "STS", "AHB-44051-STS-M", "mandatory segment STS is missing for Pruefidentifikator 44051", "44051", issues);
})
.with_named_stateless_rule_fn("AHB-44051-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44051-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44051", "44051", issues);
})
.with_named_stateless_rule_fn("AHB-44051-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44051-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44051", "44051", issues);
})
.with_named_stateless_rule_fn("AHB-44051-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44051-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44051", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44051-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44051-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44051-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44051", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44051-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44051-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44051-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44051", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44051_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44051_PACK)
}
static AHB_44052_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44052")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44052-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44052-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44052", "44052", issues);
})
.with_named_stateless_rule_fn("AHB-44052-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44052-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E02']", |q| matches!(q, "E02"), "44052", issues);
})
.with_named_stateless_rule_fn("AHB-44052-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44052-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44052", "44052", issues);
})
.with_named_stateless_rule_fn("AHB-44052-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44052-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44052", issues);
})
.with_named_stateless_rule_fn("AHB-44052-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44052-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44052", "44052", issues);
})
.with_named_stateless_rule_fn("AHB-44052-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44052-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44052", issues);
})
.with_named_stateless_rule_fn("AHB-44052-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44052-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44052", "44052", issues);
})
.with_named_stateless_rule_fn("AHB-44052-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44052-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44052", issues);
})
.with_named_stateless_rule_fn("AHB-44052-STS-M", |segs, issues| {
ahb_check_mandatory(segs, "STS", "AHB-44052-STS-M", "mandatory segment STS is missing for Pruefidentifikator 44052", "44052", issues);
})
.with_named_stateless_rule_fn("AHB-44052-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44052-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44052", "44052", issues);
})
.with_named_stateless_rule_fn("AHB-44052-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44052-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44052", "44052", issues);
})
.with_named_stateless_rule_fn("AHB-44052-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44052-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44052", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44052-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44052-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44052-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44052", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44052-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44052-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44052-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44052", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44052_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44052_PACK)
}
static AHB_44053_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44053")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44053-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44053-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44053", "44053", issues);
})
.with_named_stateless_rule_fn("AHB-44053-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44053-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E02']", |q| matches!(q, "E02"), "44053", issues);
})
.with_named_stateless_rule_fn("AHB-44053-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44053-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44053", "44053", issues);
})
.with_named_stateless_rule_fn("AHB-44053-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44053-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44053", issues);
})
.with_named_stateless_rule_fn("AHB-44053-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44053-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44053", "44053", issues);
})
.with_named_stateless_rule_fn("AHB-44053-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44053-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44053", issues);
})
.with_named_stateless_rule_fn("AHB-44053-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44053-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44053", "44053", issues);
})
.with_named_stateless_rule_fn("AHB-44053-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44053-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44053", issues);
})
.with_named_stateless_rule_fn("AHB-44053-STS-M", |segs, issues| {
ahb_check_mandatory(segs, "STS", "AHB-44053-STS-M", "mandatory segment STS is missing for Pruefidentifikator 44053", "44053", issues);
})
.with_named_stateless_rule_fn("AHB-44053-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44053-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44053", "44053", issues);
})
.with_named_stateless_rule_fn("AHB-44053-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44053-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44053", "44053", issues);
})
.with_named_stateless_rule_fn("AHB-44053-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44053-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44053", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44053-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44053-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44053-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44053", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44053-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44053-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44053-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44053", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44053_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44053_PACK)
}
static AHB_44109_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44109")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44109-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44109-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44109", "44109", issues);
})
.with_named_stateless_rule_fn("AHB-44109-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44109-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E03']", |q| matches!(q, "E03"), "44109", issues);
})
.with_named_stateless_rule_fn("AHB-44109-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44109-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44109", "44109", issues);
})
.with_named_stateless_rule_fn("AHB-44109-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44109-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44109", issues);
})
.with_named_stateless_rule_fn("AHB-44109-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44109-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44109", "44109", issues);
})
.with_named_stateless_rule_fn("AHB-44109-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44109-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44109", issues);
})
.with_named_stateless_rule_fn("AHB-44109-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44109-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44109", "44109", issues);
})
.with_named_stateless_rule_fn("AHB-44109-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44109-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44109", issues);
})
.with_named_stateless_rule_fn("AHB-44109-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44109-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44109", "44109", issues);
})
.with_named_stateless_rule_fn("AHB-44109-LOC-3227-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "LOC", "AHB-44109-LOC-3227-RQ", "mandatory segment LOC with DE 3227 qualifier '172' is missing", |q| matches!(q, "172"), "44109", issues);
})
.with_named_stateless_rule_fn("AHB-44109-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44109-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44109", "44109", issues);
})
.with_named_stateless_rule_fn("AHB-44109-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44109-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44109", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44109-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44109-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44109-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44109", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44109-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44109-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44109-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44109", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44109_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44109_PACK)
}
static AHB_44111_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44111")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44111-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44111-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44111", "44111", issues);
})
.with_named_stateless_rule_fn("AHB-44111-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44111-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E03']", |q| matches!(q, "E03"), "44111", issues);
})
.with_named_stateless_rule_fn("AHB-44111-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44111-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44111", "44111", issues);
})
.with_named_stateless_rule_fn("AHB-44111-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44111-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44111", issues);
})
.with_named_stateless_rule_fn("AHB-44111-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44111-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44111", "44111", issues);
})
.with_named_stateless_rule_fn("AHB-44111-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44111-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44111", issues);
})
.with_named_stateless_rule_fn("AHB-44111-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44111-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44111", "44111", issues);
})
.with_named_stateless_rule_fn("AHB-44111-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44111-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44111", issues);
})
.with_named_stateless_rule_fn("AHB-44111-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44111-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44111", "44111", issues);
})
.with_named_stateless_rule_fn("AHB-44111-LOC-3227-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "LOC", "AHB-44111-LOC-3227-RQ", "mandatory segment LOC with DE 3227 qualifier '172' is missing", |q| matches!(q, "172"), "44111", issues);
})
.with_named_stateless_rule_fn("AHB-44111-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44111-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44111", "44111", issues);
})
.with_named_stateless_rule_fn("AHB-44111-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44111-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44111", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44111-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44111-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44111-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44111", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44111-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44111-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44111-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44111", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44111_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44111_PACK)
}
static AHB_44112_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44112")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44112-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44112-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44112", "44112", issues);
})
.with_named_stateless_rule_fn("AHB-44112-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44112-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E03']", |q| matches!(q, "E03"), "44112", issues);
})
.with_named_stateless_rule_fn("AHB-44112-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44112-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44112", "44112", issues);
})
.with_named_stateless_rule_fn("AHB-44112-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44112-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44112", issues);
})
.with_named_stateless_rule_fn("AHB-44112-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44112-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44112", "44112", issues);
})
.with_named_stateless_rule_fn("AHB-44112-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44112-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44112", issues);
})
.with_named_stateless_rule_fn("AHB-44112-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44112-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44112", "44112", issues);
})
.with_named_stateless_rule_fn("AHB-44112-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44112-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44112", issues);
})
.with_named_stateless_rule_fn("AHB-44112-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44112-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44112", "44112", issues);
})
.with_named_stateless_rule_fn("AHB-44112-LOC-3227-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "LOC", "AHB-44112-LOC-3227-RQ", "mandatory segment LOC with DE 3227 qualifier '172' is missing", |q| matches!(q, "172"), "44112", issues);
})
.with_named_stateless_rule_fn("AHB-44112-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44112-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44112", "44112", issues);
})
.with_named_stateless_rule_fn("AHB-44112-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44112-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44112", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44112-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44112-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44112-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44112", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44112-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44112-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44112-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44112", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44112_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44112_PACK)
}
static AHB_44113_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44113")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44113-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44113-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44113", "44113", issues);
})
.with_named_stateless_rule_fn("AHB-44113-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44113-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E03']", |q| matches!(q, "E03"), "44113", issues);
})
.with_named_stateless_rule_fn("AHB-44113-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44113-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44113", "44113", issues);
})
.with_named_stateless_rule_fn("AHB-44113-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44113-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44113", issues);
})
.with_named_stateless_rule_fn("AHB-44113-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44113-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44113", "44113", issues);
})
.with_named_stateless_rule_fn("AHB-44113-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44113-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44113", issues);
})
.with_named_stateless_rule_fn("AHB-44113-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44113-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44113", "44113", issues);
})
.with_named_stateless_rule_fn("AHB-44113-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44113-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44113", issues);
})
.with_named_stateless_rule_fn("AHB-44113-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44113-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44113", "44113", issues);
})
.with_named_stateless_rule_fn("AHB-44113-LOC-3227-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "LOC", "AHB-44113-LOC-3227-RQ", "mandatory segment LOC with DE 3227 qualifier '172' is missing", |q| matches!(q, "172"), "44113", issues);
})
.with_named_stateless_rule_fn("AHB-44113-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44113-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44113", "44113", issues);
})
.with_named_stateless_rule_fn("AHB-44113-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44113-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44113", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44113-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44113-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44113-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44113", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44113-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44113-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44113-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44113", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44113_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44113_PACK)
}
static AHB_44115_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44115")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44115-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44115-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44115", "44115", issues);
})
.with_named_stateless_rule_fn("AHB-44115-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44115-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E03']", |q| matches!(q, "E03"), "44115", issues);
})
.with_named_stateless_rule_fn("AHB-44115-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44115-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44115", "44115", issues);
})
.with_named_stateless_rule_fn("AHB-44115-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44115-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44115", issues);
})
.with_named_stateless_rule_fn("AHB-44115-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44115-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44115", "44115", issues);
})
.with_named_stateless_rule_fn("AHB-44115-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44115-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44115", issues);
})
.with_named_stateless_rule_fn("AHB-44115-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44115-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44115", "44115", issues);
})
.with_named_stateless_rule_fn("AHB-44115-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44115-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44115", issues);
})
.with_named_stateless_rule_fn("AHB-44115-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44115-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44115", "44115", issues);
})
.with_named_stateless_rule_fn("AHB-44115-LOC-3227-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "LOC", "AHB-44115-LOC-3227-RQ", "mandatory segment LOC with DE 3227 qualifier '172' is missing", |q| matches!(q, "172"), "44115", issues);
})
.with_named_stateless_rule_fn("AHB-44115-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44115-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44115", "44115", issues);
})
.with_named_stateless_rule_fn("AHB-44115-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44115-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44115", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44115-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44115-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44115-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44115", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44115-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44115-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44115-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44115", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44115_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44115_PACK)
}
static AHB_44116_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44116")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44116-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44116-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44116", "44116", issues);
})
.with_named_stateless_rule_fn("AHB-44116-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44116-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E03']", |q| matches!(q, "E03"), "44116", issues);
})
.with_named_stateless_rule_fn("AHB-44116-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44116-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44116", "44116", issues);
})
.with_named_stateless_rule_fn("AHB-44116-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44116-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44116", issues);
})
.with_named_stateless_rule_fn("AHB-44116-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44116-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44116", "44116", issues);
})
.with_named_stateless_rule_fn("AHB-44116-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44116-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44116", issues);
})
.with_named_stateless_rule_fn("AHB-44116-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44116-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44116", "44116", issues);
})
.with_named_stateless_rule_fn("AHB-44116-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44116-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44116", issues);
})
.with_named_stateless_rule_fn("AHB-44116-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44116-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44116", "44116", issues);
})
.with_named_stateless_rule_fn("AHB-44116-LOC-3227-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "LOC", "AHB-44116-LOC-3227-RQ", "mandatory segment LOC with DE 3227 qualifier '172' is missing", |q| matches!(q, "172"), "44116", issues);
})
.with_named_stateless_rule_fn("AHB-44116-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44116-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44116", "44116", issues);
})
.with_named_stateless_rule_fn("AHB-44116-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44116-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44116", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44116-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44116-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44116-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44116", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44116-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44116-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44116-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44116", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44116_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44116_PACK)
}
static AHB_44117_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44117")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44117-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44117-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44117", "44117", issues);
})
.with_named_stateless_rule_fn("AHB-44117-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44117-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E03']", |q| matches!(q, "E03"), "44117", issues);
})
.with_named_stateless_rule_fn("AHB-44117-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44117-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44117", "44117", issues);
})
.with_named_stateless_rule_fn("AHB-44117-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44117-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44117", issues);
})
.with_named_stateless_rule_fn("AHB-44117-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44117-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44117", "44117", issues);
})
.with_named_stateless_rule_fn("AHB-44117-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44117-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44117", issues);
})
.with_named_stateless_rule_fn("AHB-44117-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44117-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44117", "44117", issues);
})
.with_named_stateless_rule_fn("AHB-44117-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44117-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44117", issues);
})
.with_named_stateless_rule_fn("AHB-44117-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44117-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44117", "44117", issues);
})
.with_named_stateless_rule_fn("AHB-44117-LOC-3227-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "LOC", "AHB-44117-LOC-3227-RQ", "mandatory segment LOC with DE 3227 qualifier '172' is missing", |q| matches!(q, "172"), "44117", issues);
})
.with_named_stateless_rule_fn("AHB-44117-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44117-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44117", "44117", issues);
})
.with_named_stateless_rule_fn("AHB-44117-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44117-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44117", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44117-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44117-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44117-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44117", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44117-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44117-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44117-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44117", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44117_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44117_PACK)
}
static AHB_44119_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44119")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44119-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44119-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44119", "44119", issues);
})
.with_named_stateless_rule_fn("AHB-44119-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44119-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E03']", |q| matches!(q, "E03"), "44119", issues);
})
.with_named_stateless_rule_fn("AHB-44119-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44119-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44119", "44119", issues);
})
.with_named_stateless_rule_fn("AHB-44119-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44119-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44119", issues);
})
.with_named_stateless_rule_fn("AHB-44119-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44119-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44119", "44119", issues);
})
.with_named_stateless_rule_fn("AHB-44119-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44119-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44119", issues);
})
.with_named_stateless_rule_fn("AHB-44119-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44119-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44119", "44119", issues);
})
.with_named_stateless_rule_fn("AHB-44119-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44119-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44119", issues);
})
.with_named_stateless_rule_fn("AHB-44119-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44119-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44119", "44119", issues);
})
.with_named_stateless_rule_fn("AHB-44119-LOC-3227-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "LOC", "AHB-44119-LOC-3227-RQ", "mandatory segment LOC with DE 3227 qualifier '172' is missing", |q| matches!(q, "172"), "44119", issues);
})
.with_named_stateless_rule_fn("AHB-44119-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44119-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44119", "44119", issues);
})
.with_named_stateless_rule_fn("AHB-44119-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44119-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44119", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44119-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44119-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44119-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44119", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44119-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44119-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44119-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44119", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44119_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44119_PACK)
}
static AHB_44120_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44120")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44120-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44120-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44120", "44120", issues);
})
.with_named_stateless_rule_fn("AHB-44120-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44120-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E03']", |q| matches!(q, "E03"), "44120", issues);
})
.with_named_stateless_rule_fn("AHB-44120-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44120-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44120", "44120", issues);
})
.with_named_stateless_rule_fn("AHB-44120-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44120-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44120", issues);
})
.with_named_stateless_rule_fn("AHB-44120-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44120-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44120", "44120", issues);
})
.with_named_stateless_rule_fn("AHB-44120-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44120-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44120", issues);
})
.with_named_stateless_rule_fn("AHB-44120-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44120-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44120", "44120", issues);
})
.with_named_stateless_rule_fn("AHB-44120-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44120-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44120", issues);
})
.with_named_stateless_rule_fn("AHB-44120-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44120-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44120", "44120", issues);
})
.with_named_stateless_rule_fn("AHB-44120-LOC-3227-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "LOC", "AHB-44120-LOC-3227-RQ", "mandatory segment LOC with DE 3227 qualifier '172' is missing", |q| matches!(q, "172"), "44120", issues);
})
.with_named_stateless_rule_fn("AHB-44120-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44120-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44120", "44120", issues);
})
.with_named_stateless_rule_fn("AHB-44120-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44120-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44120", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44120-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44120-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44120-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44120", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44120-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44120-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44120-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44120", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44120_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44120_PACK)
}
static AHB_44121_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44121")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44121-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44121-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44121", "44121", issues);
})
.with_named_stateless_rule_fn("AHB-44121-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44121-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E03']", |q| matches!(q, "E03"), "44121", issues);
})
.with_named_stateless_rule_fn("AHB-44121-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44121-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44121", "44121", issues);
})
.with_named_stateless_rule_fn("AHB-44121-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44121-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44121", issues);
})
.with_named_stateless_rule_fn("AHB-44121-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44121-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44121", "44121", issues);
})
.with_named_stateless_rule_fn("AHB-44121-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44121-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44121", issues);
})
.with_named_stateless_rule_fn("AHB-44121-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44121-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44121", "44121", issues);
})
.with_named_stateless_rule_fn("AHB-44121-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44121-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44121", issues);
})
.with_named_stateless_rule_fn("AHB-44121-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44121-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44121", "44121", issues);
})
.with_named_stateless_rule_fn("AHB-44121-LOC-3227-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "LOC", "AHB-44121-LOC-3227-RQ", "mandatory segment LOC with DE 3227 qualifier '172' is missing", |q| matches!(q, "172"), "44121", issues);
})
.with_named_stateless_rule_fn("AHB-44121-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44121-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44121", "44121", issues);
})
.with_named_stateless_rule_fn("AHB-44121-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44121-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44121", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44121-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44121-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44121-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44121", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44121-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44121-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44121-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44121", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44121_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44121_PACK)
}
static AHB_44123_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44123")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44123-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44123-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44123", "44123", issues);
})
.with_named_stateless_rule_fn("AHB-44123-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44123-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E03']", |q| matches!(q, "E03"), "44123", issues);
})
.with_named_stateless_rule_fn("AHB-44123-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44123-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44123", "44123", issues);
})
.with_named_stateless_rule_fn("AHB-44123-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44123-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44123", issues);
})
.with_named_stateless_rule_fn("AHB-44123-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44123-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44123", "44123", issues);
})
.with_named_stateless_rule_fn("AHB-44123-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44123-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44123", issues);
})
.with_named_stateless_rule_fn("AHB-44123-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44123-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44123", "44123", issues);
})
.with_named_stateless_rule_fn("AHB-44123-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44123-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44123", issues);
})
.with_named_stateless_rule_fn("AHB-44123-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44123-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44123", "44123", issues);
})
.with_named_stateless_rule_fn("AHB-44123-LOC-3227-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "LOC", "AHB-44123-LOC-3227-RQ", "mandatory segment LOC with DE 3227 qualifier '172' is missing", |q| matches!(q, "172"), "44123", issues);
})
.with_named_stateless_rule_fn("AHB-44123-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44123-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44123", "44123", issues);
})
.with_named_stateless_rule_fn("AHB-44123-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44123-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44123", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44123-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44123-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44123-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44123", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44123-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44123-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44123-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44123", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44123_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44123_PACK)
}
static AHB_44124_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44124")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44124-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44124-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44124", "44124", issues);
})
.with_named_stateless_rule_fn("AHB-44124-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44124-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E03']", |q| matches!(q, "E03"), "44124", issues);
})
.with_named_stateless_rule_fn("AHB-44124-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44124-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44124", "44124", issues);
})
.with_named_stateless_rule_fn("AHB-44124-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44124-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44124", issues);
})
.with_named_stateless_rule_fn("AHB-44124-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44124-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44124", "44124", issues);
})
.with_named_stateless_rule_fn("AHB-44124-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44124-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44124", issues);
})
.with_named_stateless_rule_fn("AHB-44124-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44124-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44124", "44124", issues);
})
.with_named_stateless_rule_fn("AHB-44124-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44124-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44124", issues);
})
.with_named_stateless_rule_fn("AHB-44124-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44124-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44124", "44124", issues);
})
.with_named_stateless_rule_fn("AHB-44124-LOC-3227-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "LOC", "AHB-44124-LOC-3227-RQ", "mandatory segment LOC with DE 3227 qualifier '172' is missing", |q| matches!(q, "172"), "44124", issues);
})
.with_named_stateless_rule_fn("AHB-44124-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44124-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44124", "44124", issues);
})
.with_named_stateless_rule_fn("AHB-44124-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44124-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44124", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44124-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44124-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44124-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44124", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44124-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44124-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44124-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44124", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44124_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44124_PACK)
}
static AHB_44159_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44159")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44159-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44159-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44159", "44159", issues);
})
.with_named_stateless_rule_fn("AHB-44159-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44159-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E03']", |q| matches!(q, "E03"), "44159", issues);
})
.with_named_stateless_rule_fn("AHB-44159-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44159-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44159", "44159", issues);
})
.with_named_stateless_rule_fn("AHB-44159-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44159-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44159", issues);
})
.with_named_stateless_rule_fn("AHB-44159-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44159-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44159", "44159", issues);
})
.with_named_stateless_rule_fn("AHB-44159-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44159-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44159", issues);
})
.with_named_stateless_rule_fn("AHB-44159-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44159-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44159", "44159", issues);
})
.with_named_stateless_rule_fn("AHB-44159-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44159-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44159", issues);
})
.with_named_stateless_rule_fn("AHB-44159-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44159-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44159", "44159", issues);
})
.with_named_stateless_rule_fn("AHB-44159-LOC-3227-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "LOC", "AHB-44159-LOC-3227-RQ", "mandatory segment LOC with DE 3227 qualifier '172' is missing", |q| matches!(q, "172"), "44159", issues);
})
.with_named_stateless_rule_fn("AHB-44159-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44159-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44159", "44159", issues);
})
.with_named_stateless_rule_fn("AHB-44159-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44159-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44159", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44159-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44159-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44159-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44159", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44159-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44159-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44159-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44159", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44159_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44159_PACK)
}
static AHB_44160_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44160")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44160-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44160-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44160", "44160", issues);
})
.with_named_stateless_rule_fn("AHB-44160-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44160-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E03']", |q| matches!(q, "E03"), "44160", issues);
})
.with_named_stateless_rule_fn("AHB-44160-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44160-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44160", "44160", issues);
})
.with_named_stateless_rule_fn("AHB-44160-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44160-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44160", issues);
})
.with_named_stateless_rule_fn("AHB-44160-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44160-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44160", "44160", issues);
})
.with_named_stateless_rule_fn("AHB-44160-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44160-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44160", issues);
})
.with_named_stateless_rule_fn("AHB-44160-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44160-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44160", "44160", issues);
})
.with_named_stateless_rule_fn("AHB-44160-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44160-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44160", issues);
})
.with_named_stateless_rule_fn("AHB-44160-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44160-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44160", "44160", issues);
})
.with_named_stateless_rule_fn("AHB-44160-LOC-3227-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "LOC", "AHB-44160-LOC-3227-RQ", "mandatory segment LOC with DE 3227 qualifier '172' is missing", |q| matches!(q, "172"), "44160", issues);
})
.with_named_stateless_rule_fn("AHB-44160-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44160-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44160", "44160", issues);
})
.with_named_stateless_rule_fn("AHB-44160-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44160-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44160", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44160-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44160-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44160-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44160", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44160-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44160-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44160-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44160", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44160_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44160_PACK)
}
static AHB_44161_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44161")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44161-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44161-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44161", "44161", issues);
})
.with_named_stateless_rule_fn("AHB-44161-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44161-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E03']", |q| matches!(q, "E03"), "44161", issues);
})
.with_named_stateless_rule_fn("AHB-44161-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44161-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44161", "44161", issues);
})
.with_named_stateless_rule_fn("AHB-44161-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44161-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44161", issues);
})
.with_named_stateless_rule_fn("AHB-44161-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44161-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44161", "44161", issues);
})
.with_named_stateless_rule_fn("AHB-44161-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44161-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44161", issues);
})
.with_named_stateless_rule_fn("AHB-44161-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44161-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44161", "44161", issues);
})
.with_named_stateless_rule_fn("AHB-44161-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44161-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44161", issues);
})
.with_named_stateless_rule_fn("AHB-44161-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44161-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44161", "44161", issues);
})
.with_named_stateless_rule_fn("AHB-44161-LOC-3227-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "LOC", "AHB-44161-LOC-3227-RQ", "mandatory segment LOC with DE 3227 qualifier '172' is missing", |q| matches!(q, "172"), "44161", issues);
})
.with_named_stateless_rule_fn("AHB-44161-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44161-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44161", "44161", issues);
})
.with_named_stateless_rule_fn("AHB-44161-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44161-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44161", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44161-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44161-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44161-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44161", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44161-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44161-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44161-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44161", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44161_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44161_PACK)
}
static AHB_44168_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44168")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44168-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44168-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44168", "44168", issues);
})
.with_named_stateless_rule_fn("AHB-44168-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44168-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E01', 'Z40']", |q| matches!(q, "E01" | "Z40"), "44168", issues);
})
.with_named_stateless_rule_fn("AHB-44168-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44168-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44168", "44168", issues);
})
.with_named_stateless_rule_fn("AHB-44168-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44168-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44168", issues);
})
.with_named_stateless_rule_fn("AHB-44168-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44168-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44168", "44168", issues);
})
.with_named_stateless_rule_fn("AHB-44168-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44168-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44168", issues);
})
.with_named_stateless_rule_fn("AHB-44168-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44168-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44168", "44168", issues);
})
.with_named_stateless_rule_fn("AHB-44168-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44168-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44168", issues);
})
.with_named_stateless_rule_fn("AHB-44168-STS-M", |segs, issues| {
ahb_check_mandatory(segs, "STS", "AHB-44168-STS-M", "mandatory segment STS is missing for Pruefidentifikator 44168", "44168", issues);
})
.with_named_stateless_rule_fn("AHB-44168-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44168-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44168", "44168", issues);
})
.with_named_stateless_rule_fn("AHB-44168-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44168-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44168", "44168", issues);
})
.with_named_stateless_rule_fn("AHB-44168-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44168-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44168", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44168-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44168-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44168-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44168", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44168-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44168-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44168-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44168", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44168_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44168_PACK)
}
static AHB_44169_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44169")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44169-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44169-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44169", "44169", issues);
})
.with_named_stateless_rule_fn("AHB-44169-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44169-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E01', 'Z40']", |q| matches!(q, "E01" | "Z40"), "44169", issues);
})
.with_named_stateless_rule_fn("AHB-44169-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44169-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44169", "44169", issues);
})
.with_named_stateless_rule_fn("AHB-44169-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44169-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44169", issues);
})
.with_named_stateless_rule_fn("AHB-44169-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44169-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44169", "44169", issues);
})
.with_named_stateless_rule_fn("AHB-44169-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44169-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44169", issues);
})
.with_named_stateless_rule_fn("AHB-44169-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44169-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44169", "44169", issues);
})
.with_named_stateless_rule_fn("AHB-44169-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44169-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44169", issues);
})
.with_named_stateless_rule_fn("AHB-44169-STS-M", |segs, issues| {
ahb_check_mandatory(segs, "STS", "AHB-44169-STS-M", "mandatory segment STS is missing for Pruefidentifikator 44169", "44169", issues);
})
.with_named_stateless_rule_fn("AHB-44169-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44169-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44169", "44169", issues);
})
.with_named_stateless_rule_fn("AHB-44169-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44169-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44169", "44169", issues);
})
.with_named_stateless_rule_fn("AHB-44169-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44169-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44169", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44169-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44169-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44169-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44169", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44169-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44169-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44169-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44169", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44169_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44169_PACK)
}
static AHB_44175_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44175")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44175-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44175-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44175", "44175", issues);
})
.with_named_stateless_rule_fn("AHB-44175-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44175-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E03']", |q| matches!(q, "E03"), "44175", issues);
})
.with_named_stateless_rule_fn("AHB-44175-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44175-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44175", "44175", issues);
})
.with_named_stateless_rule_fn("AHB-44175-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44175-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44175", issues);
})
.with_named_stateless_rule_fn("AHB-44175-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44175-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44175", "44175", issues);
})
.with_named_stateless_rule_fn("AHB-44175-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44175-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44175", issues);
})
.with_named_stateless_rule_fn("AHB-44175-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44175-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44175", "44175", issues);
})
.with_named_stateless_rule_fn("AHB-44175-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44175-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44175", issues);
})
.with_named_stateless_rule_fn("AHB-44175-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44175-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44175", "44175", issues);
})
.with_named_stateless_rule_fn("AHB-44175-LOC-3227-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "LOC", "AHB-44175-LOC-3227-RQ", "mandatory segment LOC with DE 3227 qualifier '172' is missing", |q| matches!(q, "172"), "44175", issues);
})
.with_named_stateless_rule_fn("AHB-44175-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44175-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44175", "44175", issues);
})
.with_named_stateless_rule_fn("AHB-44175-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44175-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44175", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44175-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44175-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44175-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44175", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44175-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44175-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44175-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44175", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44175_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44175_PACK)
}
static AHB_44176_PACK: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
Arc::new(ProfileRulePack::new("UTILMD-AHB-G1.2-44176")
.for_message_type("UTILMD")
.for_release("G1.2")
.with_named_stateless_rule_fn("AHB-44176-BGM-M", |segs, issues| {
ahb_check_mandatory(segs, "BGM", "AHB-44176-BGM-M", "mandatory segment BGM is missing for Pruefidentifikator 44176", "44176", issues);
})
.with_named_stateless_rule_fn("AHB-44176-BGM-1001-Q", |segs, issues| {
ahb_check_qualifier(segs, "BGM", "AHB-44176-BGM-1001-Q", "segment BGM DE 1001 (element 0, component 0): qualifier is not one of the allowed values ['E03']", |q| matches!(q, "E03"), "44176", issues);
})
.with_named_stateless_rule_fn("AHB-44176-DTM-M", |segs, issues| {
ahb_check_mandatory(segs, "DTM", "AHB-44176-DTM-M", "mandatory segment DTM is missing for Pruefidentifikator 44176", "44176", issues);
})
.with_named_stateless_rule_fn("AHB-44176-DTM-2005-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "DTM", "AHB-44176-DTM-2005-RQ", "mandatory segment DTM with DE 2005 qualifier '137' is missing", |q| matches!(q, "137"), "44176", issues);
})
.with_named_stateless_rule_fn("AHB-44176-NAD-M", |segs, issues| {
ahb_check_mandatory(segs, "NAD", "AHB-44176-NAD-M", "mandatory segment NAD is missing for Pruefidentifikator 44176", "44176", issues);
})
.with_named_stateless_rule_fn("AHB-44176-NAD-3035-Q", |segs, issues| {
ahb_check_qualifier(segs, "NAD", "AHB-44176-NAD-3035-Q", "segment NAD DE 3035 (element 0, component 0): qualifier is not one of the allowed values ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44176", issues);
})
.with_named_stateless_rule_fn("AHB-44176-IDE-M", |segs, issues| {
ahb_check_mandatory(segs, "IDE", "AHB-44176-IDE-M", "mandatory segment IDE is missing for Pruefidentifikator 44176", "44176", issues);
})
.with_named_stateless_rule_fn("AHB-44176-IDE-7495-Q", |segs, issues| {
ahb_check_qualifier(segs, "IDE", "AHB-44176-IDE-7495-Q", "segment IDE DE 7495 (element 0, component 0): qualifier is not one of the allowed values ['24']", |q| matches!(q, "24"), "44176", issues);
})
.with_named_stateless_rule_fn("AHB-44176-LOC-M", |segs, issues| {
ahb_check_mandatory(segs, "LOC", "AHB-44176-LOC-M", "mandatory segment LOC is missing for Pruefidentifikator 44176", "44176", issues);
})
.with_named_stateless_rule_fn("AHB-44176-LOC-3227-RQ", |segs, issues| {
ahb_check_required_qualifier(segs, "LOC", "AHB-44176-LOC-3227-RQ", "mandatory segment LOC with DE 3227 qualifier '172' is missing", |q| matches!(q, "172"), "44176", issues);
})
.with_named_stateless_rule_fn("AHB-44176-RFF-M", |segs, issues| {
ahb_check_mandatory(segs, "RFF", "AHB-44176-RFF-M", "mandatory segment RFF is missing for Pruefidentifikator 44176", "44176", issues);
})
.with_named_stateless_rule_fn("AHB-44176-RFF-1153-Q", |segs, issues| {
ahb_check_qualifier(segs, "RFF", "AHB-44176-RFF-1153-Q", "segment RFF DE 1153 (element 0, component 0): qualifier is not one of the allowed values ['Z13']", |q| matches!(q, "Z13"), "44176", issues);
})
.require_segment_in_group("SG2", "NAD", "AHB-44176-SG2-NAD-M")
.with_scoped_group_rule_fn("SG2", "AHB-44176-SG2-NAD-3035-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "NAD", "AHB-44176-SG2-NAD-3035-Q", "in group SG2: segment NAD DE 3035 qualifier is not one of ['MS', 'MR']", |q| matches!(q, "MS" | "MR"), "44176", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.require_segment_in_group("SG6", "RFF", "AHB-44176-SG6-RFF-M")
.with_scoped_group_rule_fn("SG6", "AHB-44176-SG6-RFF-1153-Q", |group, segs, _ctx, issues| {
let __gs_start = issues.len();
ahb_check_qualifier(segs, "RFF", "AHB-44176-SG6-RFF-1153-Q", "in group SG6: segment RFF DE 1153 qualifier is not one of ['Z13']", |q| matches!(q, "Z13"), "44176", issues);
for __gi in &mut issues[__gs_start..] {
__gi.context.push(("group_occurrence".to_owned(), group.occurrence_index.to_string()));
}
})
.with_max_issues_per_rule(50)
)
});
fn ahb_44176_pack() -> Arc<ProfileRulePack> {
Arc::clone(&AHB_44176_PACK)
}
static AHB_ALL_PACK_UTILMD_G1_2: LazyLock<Arc<ProfileRulePack>> = LazyLock::new(|| {
let pack = ProfileRulePack::new("UTILMD-AHB-G1.2-ALL")
.for_message_type("UTILMD")
.for_release("G1.2");
let pack = pack
.merge_with_override(ahb_44001_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44002_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44003_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44004_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44005_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44006_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44017_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44018_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44022_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44023_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44024_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44039_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44040_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44041_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44042_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44043_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44044_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44051_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44052_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44053_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44109_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44111_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44112_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44113_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44115_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44116_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44117_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44119_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44120_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44121_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44123_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44124_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44159_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44160_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44161_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44168_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44169_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44175_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
let pack = pack
.merge_with_override(ahb_44176_pack().as_ref().clone())
.expect("AHB union pack merge_with_override failed");
Arc::new(pack)
});
pub(crate) fn ahb_rule_pack(pid: Option<Pruefidentifikator>) -> Arc<ProfileRulePack> {
match pid.map(super::super::pruefidentifikator::Pruefidentifikator::as_u32) {
Some(44001) => ahb_44001_pack(),
Some(44002) => ahb_44002_pack(),
Some(44003) => ahb_44003_pack(),
Some(44004) => ahb_44004_pack(),
Some(44005) => ahb_44005_pack(),
Some(44006) => ahb_44006_pack(),
Some(44017) => ahb_44017_pack(),
Some(44018) => ahb_44018_pack(),
Some(44022) => ahb_44022_pack(),
Some(44023) => ahb_44023_pack(),
Some(44024) => ahb_44024_pack(),
Some(44039) => ahb_44039_pack(),
Some(44040) => ahb_44040_pack(),
Some(44041) => ahb_44041_pack(),
Some(44042) => ahb_44042_pack(),
Some(44043) => ahb_44043_pack(),
Some(44044) => ahb_44044_pack(),
Some(44051) => ahb_44051_pack(),
Some(44052) => ahb_44052_pack(),
Some(44053) => ahb_44053_pack(),
Some(44109) => ahb_44109_pack(),
Some(44111) => ahb_44111_pack(),
Some(44112) => ahb_44112_pack(),
Some(44113) => ahb_44113_pack(),
Some(44115) => ahb_44115_pack(),
Some(44116) => ahb_44116_pack(),
Some(44117) => ahb_44117_pack(),
Some(44119) => ahb_44119_pack(),
Some(44120) => ahb_44120_pack(),
Some(44121) => ahb_44121_pack(),
Some(44123) => ahb_44123_pack(),
Some(44124) => ahb_44124_pack(),
Some(44159) => ahb_44159_pack(),
Some(44160) => ahb_44160_pack(),
Some(44161) => ahb_44161_pack(),
Some(44168) => ahb_44168_pack(),
Some(44169) => ahb_44169_pack(),
Some(44175) => ahb_44175_pack(),
Some(44176) => ahb_44176_pack(),
None => Arc::clone(&AHB_ALL_PACK_UTILMD_G1_2),
Some(_unknown) => Arc::new(ProfileRulePack::new("unknown-pid")
.for_message_type("UTILMD")
.with_named_stateless_rule_fn("AHB-UNKNOWN-PID", |_segs, issues| {
issues.push(ValidationIssue::new(
ValidationSeverity::Warning,
"Pruefidentifikator is not registered for this release — AHB rules were not applied",
).with_rule_id("AHB-UNKNOWN-PID"));
})),
}
}
static RELEASE_UTILMD_FV20261001_GAS: LazyLock<Release> = LazyLock::new(|| Release::new("G1.2"));
pub(crate) struct UtilmdFv20261001GasProfile;
impl Profile for UtilmdFv20261001GasProfile {
fn message_type(&self) -> MessageType {
MessageType::Utilmd
}
fn release(&self) -> &Release {
&RELEASE_UTILMD_FV20261001_GAS
}
fn valid_from(&self) -> Option<::time::Date> {
Some(::time::macros::date!(2026 - 10 - 01))
}
fn valid_until(&self) -> Option<::time::Date> {
None
}
fn ahb_revision(&self) -> Option<&'static str> {
Some("G1.2")
}
fn source_document(&self) -> Option<&'static str> {
Some("UTILMD MIG G1.2, Stand 01.10.2026")
}
fn mig_rule_pack(&self) -> Arc<ProfileRulePack> {
mig_rule_pack()
}
fn ahb_rule_pack(&self, pid: Option<Pruefidentifikator>) -> Arc<ProfileRulePack> {
ahb_rule_pack(pid)
}
fn is_code_valid(&self, de_id: &str, code: &str) -> bool {
is_code_valid(de_id, code)
}
fn suggest_code(&self, de_id: &str, code: &str) -> Option<&'static str> {
suggest_code(de_id, code)
}
fn segment_lookup(&self, tag: &str) -> Option<&'static SegmentDefinition> {
segment_lookup(tag)
}
fn code_list(&self, de_id: &str) -> Option<&'static [&'static str]> {
code_list(de_id)
}
fn directory_validator(&self) -> &'static DirectoryValidator {
directory_validator()
}
fn group_schema(&self) -> &'static [GroupDef] {
GROUP_SCHEMA
}
}
pub(crate) static PROFILE: UtilmdFv20261001GasProfile = UtilmdFv20261001GasProfile;