Using #FHIR Observations for User fitness data

In a question on stack overflow, an implementer asks about using Observation for user -gathered fitness data:

While there is the Observation resource, this still seems best fit (!) for the EHR domain. In particular the user fitness data is not collected during a visit and is not human-verified.

The goal is to find a “standardized FIHR way” to model this sort of data.

Use an Observation (?) with Extensions? Profiles? Domain-specific rules? FHIR allows extraordinary flexibility, but each extension/profile may increase the cost of being able to exchange the resource directly later. An explanation on the appropriate use of a FHIR resource – including when to Extend, use Profiles/tags, or encode differentiation via Coded values – would be useful.

There’s no need to use extensions, but there is a need for domain specific rules. Use an observation that looks like this:

  "resourceType": "Observation",
  "text": {
    "status": "generated", 
    "div": "<div>[name] : [value] [hunits] @ [date]</div>"
  "status": "final",
  "category": {
    "coding": [
        "system": "",
        "code": "fitness",
        "display": "Fitness Data"
  "code": {
    "coding": [
        "system": "",
        "code": "[lcode]",
        "display": "[...]"
        "system": "",
        "code": "[scode]",
        "display": "[...]"
  "subject": {
    "reference": "Patient/[xxx]"
  "effectiveDateTime" : "[when]",
  "valueQuantity": {
    "value": [value],
    "unit": "[hunits]",
    "system": "",
    "code": "[units]"

Some notes about this:

  • A couple of the measurements need an effectivePeriod instead of an effectiveDateTime
  • it might not be necessary SNOMED CT and LOINC codes, but it’s probably useful to have both (where they’re defined)
  • [name], [scode], [lcode] and [units] come from a row in the table below. other values [value], [hunits], [when] come from the data source
  • the category code is new. I’ll create a task to add it to the specification
Description SNOMED CT Code LOINC Code UCUM Units
Ambient temperature 250825003 60832-3 Cel; [degF]
Blood Glucose 365812005 77145-1 / 74774-1 mmol/L or mg/dL
Blood Pressure 75367002 55417-0
   Systolic 271649006 8480-6

standing: 8460-8

   Diastolic 271650006 8462-4

standing: 8454-1
sitting: 8453-3
lying downlying down: 8455-8

Body Fat % 248300009? 41982-0 %
Body Height 50373000 8302-2 m; cm; [in_i]
BMI 60621009 39156-5 kg/m2
Body Temperature 386725007 8310-5 Cel; [degF]
Body Weight 363808001 29463-7 kg; [lb]
Breath CO 251900003 (none) [ppm]
Calories Burned (none) 41981-2 kcal; J
Expiratory Time 250820008 65819-5 s
Heart Rate 78564009 8867-4

standing: 69001-6
sitting: 69000-8
lying down: 68999-2

{beats}/min; /min
Inspiratory Time 250819002 60740-8 s
Minutes of Moderate Activity (none) (none)
Minute Volume 250811004 20142-6 (use duration) L
O2 Saturation 431314004 20564-1 %
Respiratory Rate 86290005 9279-1 {breaths}/min; /min
Sleep Duration 248263006 n/a h
Step Count n/a 55423-8

If you’re looking for additional rows not in the table, send me a data element name and a definition, and I’ll add it to the table. I’ll also propose adding this table to the FHIR specification


  1. Eric Haas says:

    add laps, reps, wt etc. next logical step is nutritional obs. food, grams, calories etc. be nice if barcodes had nutritional info – do they?

  2. Guy Rowell says:

    Hi Grahame – Any chance of adding the following fitness band heart metrics related to the RR interval (as measured by Microsoft Band 2) equivalent to the LOINC EKG codes below?


    76643 -6

    With new codes for:



  3. Suresh says:

    How do we measure the step counts in Fhir?

  4. Doug says:

    Some of the LOINC codes you are using in your table don’t match up with what SMART on FHIR specifies. For example, the code for body weight.

    Seems like it would be good to settle on standard values.

  5. Grahame Grieve says:

    yes I’ll have to update this table. Will do it next week after discussion here at the HL7 meeting

  6. craig mcclendon says:

    Anybody determine a good value for Device.Type for a fitness tracking device?
    I can’t seem to find a good SNOMED code under 49062001.

  7. Last time I checked I also couldn’t find anything more narrowly defined than “Sensor device” (408746007) or “Tracking System” (706744007).

  8. Will says:

    I’m trying to implement heart rate, can I put simply “bpm” in [units]? What does [hunits] mean? Thank you.

  9. craig mcclendon says:

    If using LOINC code 8867-4 for heart rate, a UCUM code of simply ‘1’ for the units might be correct as the LOINC code implies bpm.

    I also see {H.B.}/min referenced in comments here, but I can’t determine if it is indeed a valid UCUM code:

  10. Kinnari Ajmera says:

    Could someone please post an example of the json/xml file of the observation resource supporting fitness data?

Leave a Reply

Your email address will not be published. Required fields are marked *

question razz sad evil exclaim smile redface biggrin surprised eek confused cool lol mad twisted rolleyes wink idea arrow neutral cry mrgreen


%d bloggers like this: