reference_interval/lib.rs
1//! # Reference interval Rust crate
2//!
3//! This create provides several ways to help with a reference interval:
4//!
5//! * `ReferenceInterval` - A reference interval trait, with lower value and
6//! upper value, and helper functions such as includes and excludes.
7//!
8//! * `ReferenceIntervalStrict` - A reference interval structure, with lower
9//! value and upper value.
10//!
11//! * `mean` - Calculate the mean of a reference interval.
12//!
13//! * `standard_deviation` - Calculate the standard deviation of a reference
14//! interval.
15//!
16//! * `normal` - Calculate the normal distribution of a reference interval.
17//!
18//! Wikipedia has an introduction to the concept of a reference interval, which
19//! we've excerpted and edited below.
20//!
21//! * <https://en.wikipedia.org/wiki/Reference_interval>
22//!
23//! ## Reference interval
24//!
25//! A reference interval is the set of values that are deemed normal for a
26//! measurement.
27//!
28//! A reference interval is a basis for comparison and interpretation, typically
29//! comparing and interpreting one measurement result with a general group of
30//! measurement results.
31//!
32//! Some important reference intervals are in medicine and health care. Examples
33//! are a reference interval for hemoglobin blood testing, a reference interval
34//! for cortisol hormone testing, a reference interval for histamine allergy
35//! testing, and a reference interval for acidity urine testing.
36//!
37//! ## Standard reference interval
38//!
39//! A standard reference interval is defined as the interval between which 95%
40//! of values of a reference population fall into, in such a way that 2.5% of
41//! the time a value will be less than the lower limit of this interval, and
42//! 2.5% of the time it will be larger than the upper limit of this interval,
43//! whatever the distribution of these values.
44//!
45//! ## General reference interval
46//!
47//! A general reference interval is defined as a standard reference interval
48//! based on what is most prevalent in a reference group taken from the general
49//! population, and without any known aspect that directly affects the interval
50//! being established.
51//!
52//! ## Subgroup reference interval
53//!
54//! A subgroup reference interval is defined as a standard reference interval
55//! based on a subgroup with a known aspect that directly affects the interval
56//! being established.
57//!
58//! ## Within Reference Interval (WRI)
59//!
60//! A value inside a reference interval is termed within reference interval
61//! (WRI).
62//!
63//! A value inside a reference interval is not necessarily good, and not
64//! necessarily normal in any sense other than statistically.
65//!
66//! ## Beyond reference interval (BRI)
67//!
68//! A value outside a reference interval is termed beyond reference interval
69//! (BRI).
70//!
71//! A value outside a reference interval is not necessarily bad, and not
72//! necessarily abnormal in any sense other than statistically.
73//!
74//! ## Lower Reference Limit (LRL) & Upper Reference Limit (URL)
75//!
76//! The limits are called:
77//!
78//! * The lower reference limit (LRL) a.k.a. lower limit of normal (LLN)
79//!
80//! * The upper reference limit (URL) a.k.a. upper limit of normal (ULN)
81//!
82//! For mass communications such as publishing, style sheets sometimes prefer
83//! the word "reference" over the word "normal", to prevent the nontechnical
84//! senses of normal from being conflated with the statistical sense.
85//!
86//! ## Binary classification
87//!
88//! For binary classification, a cutoff or threshold is a limit used mainly
89//! between within reference interval (WRI) and beyond reference interval (BRI).
90//!
91//! ## Reference interval vs. reference range
92//!
93//! A reference interval is a.k.a. reference range. Because mathematical
94//! statistics defines the term "range" as describing the interval between the
95//! smallest and largest values, many, including the International Federation of
96//! Clinical Chemistry prefer to use the expression reference interval rather
97//! than reference range.
98//!
99pub mod reference_interval;
100pub mod reference_interval_struct;
101pub mod mean;
102pub mod standard_deviation;
103pub mod normal;
104
105#[allow(unused_imports)] pub use reference_interval::ReferenceInterval;
106#[allow(unused_imports)] pub use reference_interval_struct::ReferenceIntervalStruct;
107#[allow(unused_imports)] pub use mean::mean;
108#[allow(unused_imports)] pub use standard_deviation::standard_deviation;
109#[allow(unused_imports)] pub use normal::normal;