Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request - Create blood glucose (mmo/l - mg/dL) & hba1c (mmol-mol) - (percent) #83

Open
kgrosvenor opened this issue Dec 10, 2017 · 6 comments

Comments

@kgrosvenor
Copy link

Just a another set of units you could add 馃憤

@jiminikiz
Copy link
Collaborator

jiminikiz commented Jan 4, 2018

If you would like to add these units, feel free to submit a pull request following the design patterns of the library. Pull Request #51 might also allow the library to add units on the fly for custom units not currently built into the library.

If not, I will see when these units can be added. Digging through current issues and pull requests to see what is the easiest to add / fix first.

@cchamikara
Copy link

@jiminikiz I've already did this conversion, if you can advice me to which unit group should this conversion goes I can create a PR right away

@maneetgoyal
Copy link
Contributor

We may need a new definition, concentration to handle all mass per unit volume scenarios. Perhaps density measures should also go into the same file.

Seems like different variants of concentration are possible:

  1. Mass/Mass
  • wt%
  • wt ppm
  • kg/kg 鈸傦笍
  • g/kg 鈸傦笍
  • mg/kg 鈸傦笍
  1. Mass/volume
  • lbm/bbl
  • g/US gal
  • g/UK gal
  • lbm/1000 US gal
  • lbm/1000 UK gal
  • gr/US gal
  • gr/ft^3
  • lbm/1000 bbl
  • mg/US gal
  • gr/100 ft^3
  • kg/m^3 鈸傦笍
  • g/m^3 鈸傦笍
  • mg/m^3 鈸傦笍
  • g/dm^3 鈸傦笍
  • g/L 鈸傦笍
  • mg/dm^3 鈸傦笍

mg/dL could go into above.

  1. Volume/volume
  • ft^3/ft^3
  • bbl/acreft
  • vol%
  • UK gal/ft^3
  • US gal/ft^3
  • mL/US gal
  • ml/UK gal
  • vol ppm
  • UK gal/1000 bbl
  • US gal/1000 bbl
  • UK pt/1000 bbl
  • m^3/m^3 鈸傦笍
  • dm^3/m^3 鈸傦笍
  • cm^3/m^3 鈸傦笍
  • L/m^3 鈸傦笍
  1. Mole/Volume
  • (lbmol)/US gal
  • (lbmol)/UK gal
  • (lbmol)/ft^3
  • std ft^3/bbl
  • kmol/m^3 鈸傦笍

mmol/l could go into above.

  1. Volume/mole
  • US gal/1000 std ft^3
  • bbl/million std ft^3
  • dm^3/kmol 鈸傦笍
  • L/kmol 鈸傦笍
  1. Mol/Mol

mmol/mol could go into above.


Ref: Perry


The range of units is large and there can be valid reasons to not support all of them. But should we start by just supporting metric/SI units as concentration is quite a useful unit of measure? @Taar Does it look like a good v3 candidate? I can help with the PR if needed.

@neeraj-ec
Copy link

Any update on this one? How can I support density units (mass/volume)? Is it possible with custom unit definitions?

@neeraj-ec
Copy link

@jiminikiz I've already did this conversion, if you can advice me to which unit group should this conversion goes I can create a PR right away

@cchamikara can you please share the code block how you did it?

@poof86
Copy link

poof86 commented Feb 2, 2024

I also need this, please share :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants