Non-terminating strength rounding Rules

Hi All,

Posting this on behalf of Francois Lavoie and Canada.

Canada recently proposed a rules based approach to non-terminating strength rounding. The proposal is attached here:

ROUNDING RULES V2 2025-07-17.pdf (448.8 KB)

Proposal includes:

  • Significant digit rules,
  • Guard digit rules,
  • Significant trailing zeros,
  • Insignificant trailing zeros,

along with worked examples.

The shared SQL code will be added to a public repository to allow review of the underlying code directly and feedback. @alopez will update the post here when this repository is available.

Concrete domains and decimals can be used in other areas outside of medicinal products, so feedback on use in other hierarchies/use cases is welcome here also.

Hi all,

We have published the logic and created a live demo on the Implementation Demonstrators site:

https://ihtsdo.github.io/sct-implementation-demonstrator/#/drug-strength-rounding

The source code for Francois’ original SQL logic is available there, along with a JavaScript conversion used to power the web demo.

Please send any feedback or submit changes to the open-source repository.

Best regards

Alejandro

1 Like

I think it is very important not to impose significant digit rules on content that does not have explicit significant digit/precision semantics.

I like the proposal. The introduction of guard digits is new to me, and I think solves one of the issues I’ve been struggling with for a long time.

But first. The important thing here is to identify why we need these rounding rules in the first place, and what problem the rounding rules are solving. I’m not sure that’s actually specified anywhere? So, here’s my contribution.

We end up with non-terminating values when we have a product like “Posaconazole 300 mg/16.7 mL injection, vial”

  • In AMT we currently normalise this to have a concentration “17.964072 mg/mL” (we use a composite unit “mg/mL”).
  • The international model could model this with a Strength Numerator + Strength Denominator - with no need for thinking about rounding (but that’s not how it’s done).
  • In AMT we normalise the units so that we can do comparative arithmetic - such as identify that “Posaconazole 300 mg/16.7 mL injection, vial” and “Posaconazole 600mg/33.4 mL injection, vial” have the same concentration “17.964072 mg/mL”. And enable dose calculations by implementations.
  • However, these normalised “concentrations” are not always clinically intuitive, the descriptions use strength representations that reflect the registered labels. Depending on the product, this may be normalised (mg/mL) or not - mg/3mL.
  • What does the denominator value mean? Usually, it’s the size of the vial or syringe. Back to the “Posaconazole 300 mg/16.7 mL injection, vial” example - that’s 300mg of Posaconazole , in a 16.7 mL vial".
  • Clinically, it’s the 300mg that’s probably more useful. In AMT we call this the “total quantity” in the vial. For many (if not most) products - the vial represents a single dose.
  • So, to calculate the “total quantity” delivered by the vial = concentration x vial size
    In my example - 17.964072 mg/mL x 16.7 mL = 300mg (after rounding).
  • It’s this round-trip calculation where the rounding errors creep in.

So while it’s helpful for us to have these rounding rules. It’s also really important to provide adequate implementation guidance for software developers to use the concrete domain modelling to implement the relevant calculations also.

And it’s typically for pack/unit sizes like 3mL that generate these recurring concentrations. And the patches - though I think the INT model has since been resolved how they’re modelled.

I think there is a fundamental tension between two different goals here, consistent with a point raised earlier by Michael:

  • defining deterministic strength properties to support concept definition, classification, and organisation within the terminology, and
  • conveying measurement precision or uncertainty about the strength of a medicinal product.

Trying to combine both goals into a single numeric property risks ambiguity, because they serve different purposes and carry different semantics.

By way of context, AMT uses three strength representation patterns:

  1. Discrete unit products (e.g. paracetamol 500 mg tablet):

    • total quantity only (500 mg).
  2. Continuous products without a stated size (e.g. amoxicillin 125 mg/5 mL):

    • concentration strength only (normalised, e.g. 25 mg/mL).
  3. Continuous products in a known size (e.g. adalimumab 80 mg/0.8 mL, 0.8 mL syringe):

    • total quantity (80 mg)
    • size (0.8 mL)
    • calculated concentration (100 mg/mL).

Where concentration strength calculation produces a non-terminating decimal, AMT applies a deterministic rounding approach (6 decimal places, trailing zeros removed). This normalisation exists to support classification and comparison, not to convey measurement accuracy. Units are likewise normalised so values can be compared directly, and these properties are primarily for machine consumption.

Importantly these all have the same concentration strength of 100 mg/mL

  • adalimumab 80 mg/0.8 mL, 0.8 mL
  • adalimumab 40 mg/0.4 mL, 0.4 mL
  • adalimumab 20 mg/0.2 mL, 0.2 mL

Human-facing representations of strength and size are carried in the terms (FSN, PT, synonyms), which prioritise intuitive display and regulatory phrasing.

From this perspective, applying significant-figure and guard-digit rules to normalised concentration strengths introduces a semantic mismatch - significant figures are about measurement precision, whereas these values are intended for conceptual normalisation. Encoding precision implicitly via rounding risks overloading the property with multiple meanings.

A cleaner separation is to represent regulatory information directly using presentation strength numerator and denominator (e.g. 1.1 g in 30 mL)

  • presentation strength numerator = 1.1
  • presentation strength numerator unit = g
  • presentation strength denominator = 30
  • presentation strength denominator unit = mL

and include a separately calculated, predictably normalised concentration strength for classification. For AMT that would be 36.666667 mg/mL in this case matching the concentration for classification purposes for a product that was 110 mg in 3 mL.

1 Like

We have been discussing this topic for years, and we need a decision that is limited in scope to what Dion and Michael describe as predictable, deterministic strength properties to support consistent classification with the international release, ONLY when the normalized concentration rules in the international release editorial policies result in non-terminal decimals or periodic values. Without implying measurement accuracy. Each country could define whether they would use multiple axioms or simply reflect the human and usually locally regulated strength representation in terms. This topic is of interest only to countries that are trying to align with the CD level, where the lack of a specified deterministic rounding algorithm impairs our ability to test for clinical drug equivalency when deciding whether to create a local one.

We need a decision, if possible at the April meeting. As far as it is predictable and deterministic, a decision now is better than unpredictability for a few more years. There were proposals from SI, those were rejected by Australia and I think Matt proposed another option. Several requests for clarifications about the SI viewpoint were discussed (in the patch strength representation thread). Canada proposed a deterministic way that is not always intuitive for humans used to basic rounding rules, but the objective is only for machine consumption and classification against international release for CDs. Everyone would adjust the semantic representation to the appropriate level in their context. In Argentina we just used human term representation (but it is a bit contradictory) because users search for lexical patterns (e.g. aten 50 25 would get atenolol 50 mg/table and hydrochlorotiazide 25 mg/tablet much faster than constructing an ECL), while other countries would want to support local natural ECL queries and thus might use multiple axioms (registered strength, international strength, with terms aligned with registered strength, and using international release policies only for classification. Propose the simplest deterministic machine-readable approach, and let’s move on.

I would just like to point out an outstanding bug in the elk-reasoner that may prevent some implementers from seeing equivalencies, having to do with significant figures and concrete domains. This has nothing to do with the rounding rules, but should be kept in mind for adopters from the OWL world.

1 Like

Yes this is a significant different @rwynne and does cause classification differences if not handled correctly. SNOMED CT draws a difference between decimal and integer data types and their representation, but “.0” is significant.

I agree @greynoso, we need an agreed sensible approach. The current SNOMED International rounding is too aggressive and isn’t usable for AMT. This is partly due to unit normalisation, which is an important related additional topic.

I think we tie ourselves in knots over this because we’re conflating the DL definition with human preferred renderings. For classification (and ECL with greater-than/less-than operations to work reliably), we need deterministic renderings - one agreed normalised representation. Human preferences should be expressed in descriptions, or in additional axioms or non-defining properties if necessary, and those can carry as many ways as humans want to see strength represented. But for interoperability we need one agreed deterministic way for the defining axiom.

Rounding alone won’t get us there though - this also needs unit of measure rules and normalisation. No use getting the rounding consistent if the units are different.

A concrete example from the international content - an ECL query for “Risperidone tablets with less than 2 mg” against the international edition returns only the 1 mg tablet. It misses the 250 microgram and 500 microgram risperidone tablets because they’re modelled in microgram rather than mg, and the ECL constraint specifies mg. In AMT those products are normalised to 0.25 mg and 0.5 mg, so the same query returns them all. The rounding rules don’t help with this - it’s a unit normalisation problem, and it has direct clinical safety implications. Analysis of the international content shows 252 ingredients affected by inconsistent units across products of the same substance and dose form, so this isn’t an edge case.

This is where I think AMT’s approach is strong

  • Minimal consistent set of units of measure across all medications
  • 6 significant decimals specified to ensure sufficient accuracy across that range

This makes measurements across ingredients in multiple products directly comparable without unit conversion and achieves correct classification.

I’d go one step further than AMT though. If you are going to have a denominator value and unit (which AMT doesn’t, for other reasons I still think are valid) you might as well use it and avoid non-terminating decimals altogether by using lowest common denominator fractional representation. For example, a product with 100 mg in 30 mL currently has to be normalised to 3.333… mg/1 mL, introducing non-terminating decimals and rounding. With a lowest common denominator approach, this could be expressed exactly as 10 mg/3 mL - no rounding needed. This requires unit normalisation and a lowest common denominator calculation across the content, but it sidesteps the rounding problem rather than papering over it.

The trade-off is that sorting by strength would require a calculation rather than simple value comparison - but this is already non-trivial given the inconsistent units across products in the current content, so it’s not as much of a regression as it might first appear.

I know at the April meeting @greynoso you resolved to use the existing SNOMED International rounding as is. But I still think there are issues to be resolved there.