growth_standards 5.4.1
growth_standards: ^5.4.1 copied to clipboard
A Dart implementation of various growth standards, WHO, CDC, Fenton, Intergrowth, etc.
5.4.1 #
- Fix: Removed accidentally tracked test
build/assets from the published package to reduce package size.
5.4.0 #
- SVG Compatibility: Restructured SVG code generation to completely eliminate
<style>blocks and CSS classes. All styles are now generated natively via inline standard SVG presentation attributes (fill=,stroke=,font-family=, etc.). This guarantees 100% out-of-the-box compatibility with strict SVG renderers likeflutter_svg, standard email clients, and document generators without the need for manual regex parsing. - Customizable SVG Headers/Watermarks: Added
patientInfoandwatermarkTexttoGrowthChartConfig.patientInfoneatly anchors to the top right of the SVG (auto-adjusting vertically to prevent overlap with extremely long chart titles).watermarkTextrenders as a large, 48pt, diagonal, translucent watermark embedded deeply behind the chart data.
- Security Check: Custom text parameters (
title,subtitle,patientInfo,watermarkText) are strictly escaped (_escapeXml()) to prevent any SVG/XML injection vulnerabilities.
5.3.0 #
- SVG export restructuring: Revamped SVG generation scripts. Outputs are now meticulously categorized into nested directories for each standard and measurement, producing both standard Z-score curves and percentile-based curves (
dev/generate_all_svg.dart). - LMS curve correctness: Corrected the statistical calculations for rendering smooth
ChartCurvepoints in graphical outputs to honor standard deviation limits (especially mapping age variables explicitly in equations). - Intergrowth CRL fixes: Corrected
earlyPregnancyCRLgestational age reverse lookup. It now evaluates the exact gestational age derived from fetal crown-rump length ultrasound data properly. - Unit normalization constraints: Confirmed flawless abstraction mapping in measurement defaults; Fenton strictly uses grams vs WHO kg; Intergrowth ultrasound enforces millimeters.
5.2.0 #
- Math precision upgrade: Fully migrated internal statistical equations (SD and Z-score calculations) to use the
Rationalclass underneath, strictly preventing any floating-point precision loss during intermediate algebraic steps. - Normal distribution accuracy: Improved probability implementations (
pnormandqnorm) utilizingRationalobjects for enhanced exactness. - Dependency upgrade: Added support for
@freezedsealedclasses toGestationalAgeandPostmenstrualAgeallowing exhaustive pattern matching.
5.1.1 #
- Fix: Remove redundant sex badge in svg output
5.1.0 #
- Official calibration tests: Added comprehensive validation tests against official WHO 2006 reference data with exact LMS calculations
- Precision documentation: Documented official floating-point precision requirements for all growth standards (WHO, CDC, Fenton, INTERGROWTH-21st)
- Test tolerance: Implemented WHO-documented acceptable tolerance of ≤0.01 for z-score calculations
- REFERENCES.md: Added comprehensive reference documentation with all official documentation, scientific papers, and data sources for all growth standards
- LMS formula documentation: Documented the Box-Cox power transformation method used across all standards
- Comparison tables: Added detailed comparisons between growth standards (WHO vs CDC, WHO 2006 vs 2007, Fenton vs WHO, INTERGROWTH vs WHO)
- Implementation guidelines: Added when-to-use guidelines, age calculation methods, measurement units, and extreme value flagging limits
- Quality control documentation: Documented validation protocols for WHO MGRS, INTERGROWTH-21st, and CDC NHANES studies
- FAQ section: Added frequently asked questions about growth standards, z-scores, and implementation differences
- Glossary: Added comprehensive glossary of key terms (BCPE, BMI, LMS, MGRS, PMA, SD, TEM, Z-Score)
- Calculation examples: Added step-by-step z-score calculation examples for WHO and Fenton standards
- Citation formats: Added proper citation formats for all growth standards
- License information: Documented licensing terms for each growth standard
5.0.0 #
- BREAKING — SVG-only chart output: Removed the PNG renderer and all PNG APIs (
toPng(),savePng(),toPngList(),savePngList(),renderVelocityPng(),saveVelocityPng()). Charts are now rendered exclusively as SVG; convert to raster formats externally (e.g.rsvg-convert, Inkscape, or a browser). - BREAKING — dropped
imagedependency: The package no longer depends onpackage:image. - Redesigned chart legend: Legend items are now dynamically measured, evenly spaced, and horizontally centered on a dedicated bottom row, eliminating text overlap with the x-axis title and between entries.
- Legend labels adapt to the display mode (
0 SD (Median)/±1 SD/±2 / ±3 SDfor Z-scores;50th (Median)/15th / 85th/3rd / 97thfor percentiles). - A
Trajectorylegend entry is shown automatically for multi-point longitudinal charts. - The x-axis title now sits at a fixed offset below the tick labels with dedicated space reserved for the legend row.
- Legend labels adapt to the display mode (
- X-axis tick label overlap guard: Tick labels that would collide with the previous label (e.g. dense velocity interval labels like
10–12m) are automatically skipped.
4.6.0 #
- Growth Chart Visualizer Engine: Pure Dart rendering engine generating vector SVG and high-resolution PNG growth charts.
- Supports WHO (0-5y & 5-18y), CDC (2-20y & 0-36m), Fenton 2013 Preterm, and WHO Growth Velocity charts.
- Pixel-perfect layout alignment between SVG and PNG renderers.
- Includes custom themes (
GrowthChartTheme.boy(),GrowthChartTheme.girl()), display modes (Z-scores vs. Percentiles), legend rows, grid lines, and top-right callout result banners. - Direct extension methods on
Result,List<Result>,VelocityBasedResult, andGrowthTrajectory(toSvg(),toPng(),saveSvg(),savePng()).
- Core
GrowthTrajectoryAPI: Decoupled longitudinal child growth tracking helper available at core library level (lib/src/common/trajectory.dart).- Added 24 trajectory factory constructors covering WHO, CDC, Fenton, and INTERGROWTH-21st standards.
- Accepts
LengthMassObservationpaired visit measurements and returnsResultcalculations onadd(). - Added trajectory analytic getters (
zScores,percentiles,latestResult,firstResult).
- WHO Growth Velocity Visualization: Render interval growth velocity charts for weight, length, and head circumference gain across 1, 2, 3, 4, and 6-month increments.
- Pediatric Age & Sex Semantics: Standardized sex labels (
BOY/GIRLandBoys/Girlsfor pediatric age < 18y;MALE/FEMALEandMales/Femalesfor adult age ≥ 18y). - Expanded Modular Example Suite: Added dedicated, runnable scripts under
example/for every growth measurement type.
4.5.0 #
- Add sex-specific Fenton 2013 LMS datasets for boys and girls (
wfa,lfa,hcfa) - Require typed
PostmenstrualAgefor Fenton andGestationalAgefor INTERGROWTH newborn models - Fix WHO growth velocity month classification for day-based clinical visit gaps (
days / 30.4375) - Fix CDC Agemos mid-month
n + 0.5grid lookups across endpoint months - Add WHO WFL (≤730 days) and WFH (>730 days) runtime age gates
- Implement LMS $L=0$ limit form ($Z = \ln(y/M)/S$) and non-positive measurement guards in math core
- Fix
DateFormatExtension.formatmonth name (MMM) token replacement order and export from package root - Fix
ageAtPastDateDOB handling and standing/recumbent length adjustments - Add mathematical golden vector test suite (
test/golden_vectors_test.dart)
4.4.1 #
- Fix bug in growth velocity data parser
- Add conversion unit symbol in length based growth measurement assertion
4.4.0 #
- Set default value for
countObservationDatetotrueinAge - Improve performance by change source data to map literal instead of
jsonstring
4.3.1 #
- Add latest Symphisis-Fundal Height score update
4.3.0 #
- Fix intergrowth source data error
4.2.1 #
- Dependencies bump
4.2.0 #
- Add
countObservationDatetoAgewith default value tofalse
4.1.5 #
- Same as previous version, but support for
freezedv2
4.1.4 #
- Set default decimal
PrecisiontoPrecision.two
4.1.3 #
- Same as previous version, but support for
freezedv2
4.1.2 #
- Minor performance improvements
4.1.1 #
- Exportinng
pnormandqnorm
4.1.0 #
- Add missing
TimeUnit
4.0.0 #
- Remove
Sex.bothenum. - Remove
Sexparameter fromFentonmeasurement. - Add
Intergrowth-21measurements.
3.0.6 #
- Same as previous version
- Use this version if your dependencies has not supported
freezedversion 3
3.0.5 #
- Remove data sorting as the data is sorted by default
3.0.4 #
- Same as previous version
- Use this version if your dependencies has not supported
freezedversion 3
3.0.2 #
- Exporting
TimeUnit
3.0.1 #
- Same as previous version
- Use this version if your dependencies has not supported
freezedversion 3
3.0.0 #
- Add
Sex.bothto replace for sex-agnostic data - Exposing
contextDatafor directly accessing statistical data - Unified assertion for non velocity measurement
- Removing
observationDateon Length-based measurement - Move
observationDateintoAgeobservedDatefield
2.2.1 #
- Same as previous version
- Use this version if your dependencies has not supported
freezedversion 3
2.2.0 #
- Unified
ageDataandlengthDataintolmsData
2.1.5 #
- Export additional typedef
2.1.4 #
- Fix measurement conversion in
WHOGrowthStandardsTricepsSkinfoldForAgeandWHOGrowthStandardsSubscapularSkinfoldForAge
2.1.3 #
- Expose
lengthAtObservationDatefor length based measurement - Use this version if your dependencies has supported
freezedversion 3
2.1.2 #
- Expose
lengthAtObservationDatefor length based measurement - Use this version if your dependencies has not supported
freezedversion 3
2.1.1 #
- Simplify
LMS - Fix bug at measurement of
WHOGrowthStandardsArmCircumferenceForAge - Update dependencies
- Expose
measurementResultInDefaultUnit - Use this version if your dependencies has supported
freezedversion 3
2.1.0 #
- Simplify
LMS - Fix bug at measurement of
WHOGrowthStandardsArmCircumferenceForAge - Update dependencies
- Expose
measurementResultInDefaultUnit - Use this version if your dependencies has not supported
freezedversion 3
2.0.1 #
- Exposing ageAtObservationDate field for age based measurement
- Add various base class
- Use this version if your dependencies has supported
freezedversion 3
2.0.0 #
- Exposing ageAtObservationDate field for age based measurement
- Add various base class
- Use this version if your dependencies has not supported
freezedversion 3
1.5.1 #
- Exposing
ageDatafor more easy access - Use this version if your dependencies has supported
freezedversion 3
1.5.0 #
- Exposing
ageDatafor more easy access - Use this version if your dependencies has not supported
freezedversion 3
1.4.3 #
- Fix pub static analysis issues
1.4.2 #
- Bump
freezedversion. - Use this version if your dependencies has supported
freezedversion 3
1.4.1 #
- Lowering
freezedversion. - Use this version if your dependencies has not supported
freezedversion 3
1.4.0 #
- Bump
super_measurement - Removed
Precision.none
1.3.0 #
- Bump
freezed
1.2.2 #
- Bump Dart SDK
1.2.1 #
1.1.4 #
- Dependency update
- Some measurement API changes
1.1.3 #
- Bug fix
- Minor refractor
1.1.2 #
- Dependencies update
1.1.1 #
- Various bug fix
1.1.0 #
- Refactoring
- Bug fix
- Improved API
1.0.7 #
- API fix
- Remove some unused code
- More test
1.0.6 #
- Several Bug fix
- Add WHO Growth Velocity
1.0.5 #
- Add Fenton preterm growth standards
1.0.4 #
- Add CDC measurement
1.0.3 #
- Exposing additional types
1.0.2 #
- Exposing data API
1.0.1 #
- Some minor refactoring
1.0.0 #
- Initial version.