1

I'm writing a few profiles in fhir, and to them I've added an element with type Quantity. In the documentation it states that Quantity is like a special case of a code, where you can state the unit type/dimension of the quantity (e.g. it's a temperature, weight, length, etc).

I cannot find an example of how to add that restriction to my quantity element however, just how to specify the unit in the resource based on the profile. What's the correct way of doing this?

Andy
  • 3,228
  • 8
  • 40
  • 65

1 Answers1

1

Simply specify a binding - you can use binding to declare the value set for the units for quantity (just as you specify one for a CodeableConcept data type)

Lloyd McKenzie
  • 6,345
  • 1
  • 13
  • 10
  • Are there already built in ValueSets for the various dimensions? – Andy Nov 14 '16 at 10:26
  • No, and if there were, you probably wouldn't want to use them. For example a complete value set for length would include angstroms, light-years and fathoms along with probably a hundred other codes. It makes much more sense to define narrower value sets tied to a particular intended usage. – Lloyd McKenzie Nov 15 '16 at 16:38