https://github.com/FirelyTeam/Fhir.Metrics
UCUM - Unified Code for Units of Measure Implementation
https://github.com/FirelyTeam/Fhir.Metrics
Last synced: about 2 months ago
JSON representation
UCUM - Unified Code for Units of Measure Implementation
- Host: GitHub
- URL: https://github.com/FirelyTeam/Fhir.Metrics
- Owner: FirelyTeam
- License: bsd-3-clause
- Created: 2014-04-28T07:59:29.000Z (about 11 years ago)
- Default Branch: develop
- Last Pushed: 2024-05-28T11:00:12.000Z (12 months ago)
- Last Synced: 2024-05-29T00:12:25.088Z (12 months ago)
- Language: C#
- Homepage:
- Size: 360 KB
- Stars: 24
- Watchers: 21
- Forks: 13
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-FHIR - UCUM metrics conversion
README
Fhir.Metrics
============
Unified Code for Units of Measure (UCUM) implementation for FHIR.UcumReader now reads UCM essence xml set. And parses basic conversions and more Complex conversions
Example:
```
Quantity q = system.Convert("4.3[psi]'");
```
will result in
```
{[2,25 ± 0,005649]E2 g.m-1.s-2} (approximated)
```
Classes:
- Exponential (Normalized Scientific Notation number, with error propagation)
- Unit (measurable dimensions like gram, meter, Kelvin, pound force, etc.)
- Prefix (kilo, mega, mili, micro etc.)
- Metric (A composite set of (prefixed) units like m/s, kg.m/s2)
- Quantity (a measurement: Exponential + Metric)
- UcumReader (reader of the XML essence of UCUM)
TODO:
- UcumReader doesn't implement special cases (like fahrenheid/celcius conversion formulas)
- Add support for [nested terms](https://ucum.org/ucum.html#section-Syntax-Rules)