Expand description
§Patient Matching Crate
A Rust library for matching patient records in healthcare information exchanges. Implements both deterministic and probabilistic matching algorithms based on research from NHS Wales and academic studies on patient identification.
§Features
- Deterministic matching with exact identifier comparisons
- Probabilistic matching with configurable scoring thresholds
- String similarity algorithms (Levenshtein, Jaro-Winkler)
- Support for UK NHS numbers and other identifiers
- Phonetic matching for names
- Address normalization and comparison
§Example
use patient_matching::{Patient, MatchingEngine, MatchConfig};
use chrono::NaiveDate;
let patient1 = Patient::builder()
.given_name("John")
.family_name("Smith")
.date_of_birth(NaiveDate::from_ymd_opt(1980, 5, 15).unwrap())
.gender(patient_matching::Gender::Male)
.build();
let patient2 = Patient::builder()
.given_name("Jon")
.family_name("Smith")
.date_of_birth(NaiveDate::from_ymd_opt(1980, 5, 15).unwrap())
.gender(patient_matching::Gender::Male)
.build();
let engine = MatchingEngine::new(MatchConfig::default());
let result = engine.match_patients(&patient1, &patient2);
println!("Match score: {}", result.score);
println!("Is match: {}", result.is_match);Re-exports§
pub use error::MatchingError;pub use error::Result;pub use matcher::MatchConfig;pub use matcher::MatchResult;pub use matcher::MatchingEngine;pub use models::Address;pub use models::Gender;pub use models::Patient;pub use models::PatientBuilder;pub use normalizer::Normalizer;pub use scorer::Scorer;pub use scorer::SimilarityAlgorithm;
Modules§
- error
- Error types for patient matching operations
- matcher
- Core patient matching engine with deterministic and probabilistic algorithms
- models
- Data models for patient demographics and identifiers
- normalizer
- Text normalization utilities for patient data
- scorer
- Scoring algorithms for string similarity and field comparison