Quantitative measure schemas are for data that have units of measurement. Our schema library shows all the schemas that have already been defined. If you don’t find what you need there, this quantitative schema template will get you started on writing your own. Here are the basic steps, but you may want to review an annotated example of a quantitative schema first.
  1. Check out the relevant literature and/or consult with a subject matter expert to make sure that you’re modeling the quantitative measure the way real users will want to use it.
  2. The core elements of the schema will be the numeric value of the measure and its unit(s) of measure, defined using the unit-value schema.
  3. If you don’t see what you need in the pre-defined value and unit pairs, you can reference the unit-value schema and then constrain the unit property to a permissible value set for your measure (see the blood glucose schema for an example of this case.)
  4. If the measure does not have a standard unit(s) of measure (for example, the measure is a count, like step count), then do not use the the unit-value schema but define the property as being of type number: “type”: “number” (see Step count schema as an example).
  5. All measure schemas should include properties for describing its relationship to time, defined using the time-frame schema. For more on how we represent time, see the Section Modeling of Time in Schema design principles.
  6. You can also define your schema to include the result of summarizing a set of measurements using one of the descriptive statistics like average or maximum. To do this, include a reference to the descriptive-statistic schema.
Depending on the specific measure, other important properties may be relevant. For example: does physical activity play a role in the measure? If so include in the schema a reference to the temporal-relationship-to-physical-activity schema, as done in the heart rate schema. Is it important to know when the measure was made with respect to meal consumption?  If so include a reference to the temporal-relationship-to-meal schema, as done in the blood glucose schema.

More information