Medimetry
Reference implementations of published clinical formulas and scores, written in pure Python for software developers and researchers.
Intended use
medimetry reproduces formulas and scoring systems exactly as published in the cited literature (every function lists its primary source). It returns the raw numeric result or a category defined by that publication and nothing else: no interpretation, no recommendation, no clinical guidance. Where a category comes from a different publication than the formula (e.g. a guideline's risk bands), that publication is cited separately and marked as such.
medimetry is not a medical device. It is not intended for diagnosis, prevention, monitoring, prediction, prognosis, treatment or alleviation of disease, and it must not be used as a basis for clinical decisions. Anyone integrating it into a product with such a purpose is the manufacturer of that product and is solely responsible for its qualification, validation and regulatory compliance (e.g. as software of unknown provenance under IEC 62304). See DISCLAIMER.md.
The implementations are unit-tested against the published point tables and worked examples, but no clinical validation has been performed and no warranty of correctness is given.
- Free software: MIT license
Installation
pip install medimetry
You can also install the in-development version with::
pip install https://github.com/nerdocs/medimetry/archive/refs/heads/main.zip
Growth charts and WHO reference tables
medimetry.growth computes pediatric z-scores/percentiles from LMS tables. The CDC 2000 tables (public domain) are
bundled. The WHO Child Growth Standards / Growth Reference 2007 are licensed CC BY-NC-SA 3.0 IGO and cannot be
redistributed in an MIT package, so download them yourself once:
from pathlib import Path
from medimetry.growth import download_who_tables
download_who_tables(Path("~/.cache/medimetry/who").expanduser())
Then pass reference=GrowthReference.WHO, data_dir=... to growth_zscore / growth_percentile.
See docs/growth.md for indicators, units and limitations.
See docs/references.md for how the cited sources were verified.
Development
See Contributing.
Medical Tests Reference Table
| Domain / System | Test / Score / Calculator | |
|---|---|---|
| Renal Function (renal) | ✅ | Creatinine Clearance (Cockcroft-Gault) |
| ✅ | CKD-EPI GFR Equations | |
| ✅ | EKFC GFR Equation | |
| ✅ | MDRD GFR Equation | |
| ✅ | CKD Staging | |
| Fractional Excretion of Sodium (FENa) | ||
| Electrolytes (lytes) | Sodium Correction for Hyperglycemia | |
| Serum Osmolality/Osmolarity | ||
| ✅ | Calcium Correction for Hypo-/Hyperalbuminemia | |
| Free Water Deficit in Hypernatremia | ||
| Cardiovascular Risk / Hemodynamics (cardiovasc) | ✅ | Mean Arterial Pressure (MAP) |
| ✅ | CHA₂DS₂-VASc Score | |
| ASCVD 2013 Risk Calculator | ||
| ASCVD Risk Algorithm with Known ASCVD | ||
| ✅ | Framingham General CVD Risk Score (2008) | |
| HEART Score | ||
| GRACE ACS Risk and Mortality Calculator | ||
| Revised Cardiac Risk Index (Pre-op) | ||
| ARISCAT Score | ||
| Gupta MICA Score | ||
| Liver / GI / Metabolic | Fibrosis-4 (FIB-4) Index | |
| ✅ | Child-Pugh Score | |
| MELD Na | ||
| HOMA-IR | ||
| Serum Anion Gap | ||
| Pulmonary / Sleep | Wells’ Criteria for PE | |
| ✅ | Revised / Simplified Geneva Score | |
| ✅ | PERC Rule | |
| Wells’ Criteria for DVT | ||
| STOP-BANG Score | ||
| Neurological / Stroke / Consciousness (neuro) | NIH Stroke Scale (NIHSS) | |
| ✅ | Glasgow Coma Scale (GCS) | |
| PECARN Pediatric Head Injury | ||
| CURB-65 Score | ||
| Body Metrics | ✅ | BMI and BSA |
| ✅ | Growth charts (CDC 2000 / WHO 2006+2007) | |
| Ideal & Adjusted Body Weight | ||
| Maintenance Fluids Calculations | ||
| Cardiac / ECG (cardiac) | ✅ | Corrected QT Interval (QTc) |
| Psychiatric / Neuropsychiatric | PHQ-9 | |
| GAD-7 | ||
| CIWA-Ar | ||
| Medication / Pharmacology | Steroid Conversion Calculator | |
| Morphine Milligram Equivalents (MME) | ||
| Risk Prediction / Surgery / ICU | SIRS, Sepsis, Septic Shock Criteria | |
| Sequential Organ Failure Assessment (SOFA) | ||
| Padua Prediction Score | ||
| ARISCAT Score | ||
| Infectious / Inflammatory | Centor Score (Strep Pharyngitis) | |
| PSI/PORT Score (Pneumonia) |
Metadata
Release files for medimetry 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| medimetry-0.2.2.tar.gz | 101.6 kB | Without provenance | Details for medimetry-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| medimetry-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for medimetry-0.2.2-py3-none-any.whl |
Total release size: 170.8 kB
Release files / medimetry-0.2.2.tar.gz
| Download URL | medimetry-0.2.2.tar.gz |
|---|---|
| Size | 101.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95dafea70fc0a9e28826c009051fb75085d4d4a91fe8561a1a80bf07fcc4fdab
|
|
BLAKE2b-256 checksum How to use checksums |
6b21f561ebba13232c1f6df5b55c9d5f5b2e55239a0a77dba4f0bd908295e853
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / medimetry-0.2.2-py3-none-any.whl
| Download URL | medimetry-0.2.2-py3-none-any.whl |
|---|---|
| Size | 69.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a8b9647a2ac62b53ed5c36f741d6a636c4331c420b1d45878ee007a178a1bf8e
|
|
BLAKE2b-256 checksum How to use checksums |
5416d57a44406f71afbf3da54c5f11ee60f1939878ed797e41212e5c574b932c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for medimetry 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.