feat: tag derivation from ClaML metadata + validity

This commit is contained in:
2026-05-18 16:40:08 +02:00
parent 27d5144864
commit ce7403fee9
2 changed files with 32 additions and 1 deletions
+20
View File
@@ -0,0 +1,20 @@
use alpha_id::model::IcdMeta;
use alpha_id::tags::tags_for;
#[test]
fn billable_when_para295_is_p_and_valid() {
let mut m = IcdMeta::default();
m.para295 = "P".into();
m.chapter = "01".into();
let t = tags_for(&m, true);
assert!(t.billable);
assert!(t.valid);
assert_eq!(t.chapter, "01");
}
#[test]
fn not_billable_when_para295_is_v() {
let mut m = IcdMeta::default();
m.para295 = "V".into();
assert!(!tags_for(&m, true).billable);
}