feat: streaming ClaML parser for ICD metadata and titles

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-18 16:25:46 +02:00
parent 2fe9656c84
commit bb42f07790
2 changed files with 170 additions and 1 deletions
+13
View File
@@ -0,0 +1,13 @@
use alpha_id::claml;
#[test]
fn parses_real_claml_meta_and_titles() {
let map = claml::load("icd-claml/Klassifikationsdateien/icd10gm2026syst_claml_20250912.xml").unwrap();
let a010 = map.get("A01.0").expect("A01.0 present");
assert_eq!(a010.para295, "P"); // billable primary
assert_eq!(a010.chapter, "01");
assert!(a010.description.contains("Typhus abdominalis"));
let a01 = map.get("A01").expect("A01 present");
assert_eq!(a01.para295, "V"); // 3-digit non-codable
assert!(map.len() > 10_000);
}