Mapping OpenMRS Order Dose Units to FHIR

Sorry, yet another question involved Medications in OpenMRS and mapping them to FHIR.

This is following on from a discussion started on this ticket:

We are looking to map the “Dose” and “Dose Units” components of a Drug Order to the appropriate fields in a FHIR Medication Request. (This currently has not been implmeneted in the FHIR2 module).

The best way to map these two fields appears to be to the following mapping on a Medication Request:


“doseQuantity” is a SimpleQuantity that provides a field for “value”, where’d we’d map the “dose” numeric, and then two fields for the units… one “unit” is more a display value of the unit, while “code” is a coded value for the unit

My question is, what coding system should we use for the coding the unit?

Looking at this ticket here, @ibacher suggests that the preferred approach would be to map to a UCUM (Unified Code for Unit of Message) code.

I started looking into libraries that could assist in doing this, but ran into a problem before I got too far. Many of the “units” we have for dosage units in the PIH EMR (and i suspect in many other implementations) are not valid units under UCUM… for instance things like “tablet” or “vial”, which really are “dosage forms”, not “units” (see the explanation here:

Thoughts on how we want to support this? It seems like ideally we should restrict our dosage units to “true” units, so we could map them to valid UCUM codes, but I suspect that ship has already sailed. Could we used some sort of SNOMED based mapping?

More thoughts /questions for @ibacher @mseaton @burke

It seems to me that the FHIR “SimpleQuantity” datatype that backs the “doseQuantity” supports a flexible coding system for units.

See: Datatypes - FHIR v4.0.1

I would assume that “system” + “code” could refer to any number of coding systems, including SNOMED-CT, etc and is not limited to just UCUM.

In fact, the example listed here, does exactly what you were asking about with “Tablet(s)”, where the “doseQuantity” is represented as “1 Tablet” using SNOMED-CT coding:

Interested in others views on this, but just throwing this out there.

That makes a lot of sense to me, @mseaton , if we could code/translate the dose units via SNOMED-CT in a similar way that we do Duration (though I realize there are many more does units than there are duration units).

I don’t get doseQuantity in Dosage - FHIR v4.0.1 It seems like it would have to include quantity and unit together which would not be easily parsed. Quantity has a value, unit, system and code which would allow for proper disambiguation. The example from Switzerland uses all the quantity elements. CIEL does have dosing units 162384 which are mapped to SNOMED CT.

doseQuantity in R4, at any rate, is a SimpleQuantity, which is just a standard FHIR Quantity without the comparator field. In other words it has all of value, unit, system, and code.

unit is intended to be the human-readable version, with system and code defining the unit according to some coding system. I’ve said before, FHIR prefers UCUM, but this is largely because UCUM defines a machine-calculable system for units. See the note under Quantity. However, we can use SNOMED CT for this if the mappings already exist.

Almost all of the “dosing unit” concepts in the PIH EMR have a SNOMED CT code, and of the ones that do, the majority are SAME-AS, so I think we could clean up our dictionary so that they all have same-as SNOMED codes.

@ibacher @mseaton @akanter for a first pass would you be okay setting:

  • unit to concept.getDisplayString() (is there something better? shortname)
  • system and code to the SNOMED-CT SAME-AS code, if present?

I’d maybe do:

  • RxNORM SAME-AS if present
  • SNOMED CT SAME-AS if present
  • No system and concept UUID for concept if not present

Would that work?

Works for me, thanks @ibacher