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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial clinical laboratory unit commit #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DBartlettHP
Copy link

Related to #2

@billdenney

Here is a data set of clinical units for testing.

@billdenney
Copy link

@Enchufa2, Here is the initial concept of how we are tracking clinical laboratory units. There are several notable features of the dataset that will be worth discussion:

  1. It is possible to convert some units from conventional to SI automatically. I assume that those should be filtered out of this package.
  2. Many units are not valid as SI units on their own. As an example, the acid phosphatase conventional units are nkat/L and are converted to "U/L" (where "U" stands for "international units").

I think that the goal here would be to do a few things:

  1. Detect when the units are currently-valid units by themselves (e.g. "mg/dL" gets converted to "mmol/L" for glucose), but they need a substance-specific conversion factor to convert from "mg" to "mmol".
  2. Detect when the units are not currently-valid (e.g. "nkat/L" above) which may happen for both the conventional and SI units, add the missing units as a new base unit, then add a substance-specific conversion factor.
    1. Within this, we would also need to detect which parts are not valid units in the current units library, the numerator, the denominator, or both. Based on prior discussion, I don't think that this is currently possible, so it may need to be a custom table stored within the substances package that is dynamically generated.

Does that sound right to you?

@billdenney
Copy link

@Enchufa2, ping on this PR/issue discussion.

@Enchufa2
Copy link
Member

Thanks for the reminder, I'll try to find time for this, but I'm in "best effort" mode this time of year.

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

Successfully merging this pull request may close these issues.

3 participants