{
 "title": "Junction fields to FHIR R4 Observation with LOINC",
 "checked": "2026-12-03",
 "loinc_source": "https://clinicaltables.nlm.nih.gov/api/loinc_items/v3/search",
 "vendor_source": "https://docs.junction.com/swagger.json",
 "publisher": "Nirmitee.io",
 "warning": "A code match says the code exists with that name. It does not say a given device measures it the clinical way: wearable SpO2 and HRV are consumer readings, and your clinical team decides which ones go into a chart.",
 "mappings": [
  {
   "vendor_field": "sleep.hr_average",
   "vendor_payload": "sleep summary",
   "fhir_resource": "Observation",
   "category": "activity",
   "loinc": "103205-1",
   "loinc_display": "Mean heart rate",
   "ucum": "/min",
   "note": "Mean over the sleep session. 8867-4 with the sleep period as effectivePeriod also works. Your FHIR profile decides."
  },
  {
   "vendor_field": "sleep.hr_resting",
   "vendor_payload": "sleep summary",
   "fhir_resource": "Observation",
   "category": "vital-signs",
   "loinc": "40443-4",
   "loinc_display": "Heart rate --resting",
   "ucum": "/min",
   "note": ""
  },
  {
   "vendor_field": "sleep.average_hrv",
   "vendor_payload": "sleep summary",
   "fhir_resource": "Observation",
   "category": "local",
   "loinc": null,
   "loinc_display": null,
   "ucum": "ms",
   "note": "Junction's schema says this is RMSSD. No LOINC code found on NLM for this measure (searched 3 Dec 2026). Use a local code system and keep the vendor field name."
  },
  {
   "vendor_field": "sleep.respiratory_rate",
   "vendor_payload": "sleep summary",
   "fhir_resource": "Observation",
   "category": "vital-signs",
   "loinc": "9279-1",
   "loinc_display": "Respiratory rate",
   "ucum": "/min",
   "note": ""
  },
  {
   "vendor_field": "sleep.stage_asleep_second",
   "vendor_payload": "sleep summary",
   "fhir_resource": "Observation",
   "category": "activity",
   "loinc": "93832-4",
   "loinc_display": "Sleep duration",
   "ucum": "s",
   "note": "Use stage_*_second. The total, rem, deep and light fields are marked deprecated."
  },
  {
   "vendor_field": "sleep.stage_deep_second",
   "vendor_payload": "sleep summary",
   "fhir_resource": "Observation",
   "category": "activity",
   "loinc": "93831-6",
   "loinc_display": "Deep sleep duration",
   "ucum": "s",
   "note": ""
  },
  {
   "vendor_field": "sleep.stage_light_second",
   "vendor_payload": "sleep summary",
   "fhir_resource": "Observation",
   "category": "activity",
   "loinc": "93830-8",
   "loinc_display": "Light sleep duration",
   "ucum": "s",
   "note": ""
  },
  {
   "vendor_field": "sleep.stage_rem_second",
   "vendor_payload": "sleep summary",
   "fhir_resource": "Observation",
   "category": "activity",
   "loinc": "93829-0",
   "loinc_display": "REM sleep duration",
   "ucum": "s",
   "note": ""
  },
  {
   "vendor_field": "sleep.stage_awake_second",
   "vendor_payload": "sleep summary",
   "fhir_resource": "Observation",
   "category": "activity",
   "loinc": "93828-2",
   "loinc_display": "Nighttime awakening duration",
   "ucum": "s",
   "note": ""
  },
  {
   "vendor_field": "sleep.temperature_delta",
   "vendor_payload": "sleep summary",
   "fhir_resource": "Observation",
   "category": "local",
   "loinc": null,
   "loinc_display": null,
   "ucum": "Cel",
   "note": "Skin temperature deviation from the long-term average. No LOINC code found on NLM for this measure (searched 3 Dec 2026). Use a local code system and keep the vendor field name."
  },
  {
   "vendor_field": "activity.steps",
   "vendor_payload": "activity summary",
   "fhir_resource": "Observation",
   "category": "activity",
   "loinc": "41950-7",
   "loinc_display": "Number of steps in 24 hour Measured",
   "ucum": "{steps}",
   "note": "Daily total. Updates arrive as daily.data.activity.updated."
  },
  {
   "vendor_field": "body.weight",
   "vendor_payload": "body summary",
   "fhir_resource": "Observation",
   "category": "vital-signs",
   "loinc": "29463-7",
   "loinc_display": "Body weight",
   "ucum": "kg",
   "note": ""
  },
  {
   "vendor_field": "body.body_mass_index",
   "vendor_payload": "body summary",
   "fhir_resource": "Observation",
   "category": "vital-signs",
   "loinc": "39156-5",
   "loinc_display": "Body mass index (BMI) [Ratio]",
   "ucum": "kg/m2",
   "note": ""
  },
  {
   "vendor_field": "body.fat",
   "vendor_payload": "body summary",
   "fhir_resource": "Observation",
   "category": "activity",
   "loinc": "41982-0",
   "loinc_display": "Percentage of body fat Measured",
   "ucum": "%",
   "note": ""
  },
  {
   "vendor_field": "timeseries blood_pressure (systolic, diastolic)",
   "vendor_payload": "grouped timeseries",
   "fhir_resource": "Observation",
   "category": "vital-signs",
   "loinc": "85354-9",
   "loinc_display": "Blood pressure panel with all children optional",
   "ucum": "mm[Hg]",
   "note": "Panel with components 8480-6 and 8462-4."
  },
  {
   "vendor_field": "timeseries glucose (value, unit)",
   "vendor_payload": "grouped timeseries",
   "fhir_resource": "Observation",
   "category": "activity",
   "loinc": "99504-3",
   "loinc_display": "Glucose [Mass/volume] in Interstitial fluid",
   "ucum": "mg/dL",
   "note": "Check the unit field per sample. Use 99504-3 for CGM sources, 2339-0 for meters."
  },
  {
   "vendor_field": "timeseries heartrate",
   "vendor_payload": "grouped timeseries",
   "fhir_resource": "Observation",
   "category": "vital-signs",
   "loinc": "8867-4",
   "loinc_display": "Heart rate",
   "ucum": "/min",
   "note": ""
  },
  {
   "vendor_field": "timeseries blood_oxygen",
   "vendor_payload": "grouped timeseries",
   "fhir_resource": "Observation",
   "category": "vital-signs",
   "loinc": "59408-5",
   "loinc_display": "Oxygen saturation in Arterial blood by Pulse oximetry",
   "ucum": "%",
   "note": ""
  },
  {
   "vendor_field": "timeseries body_temperature",
   "vendor_payload": "grouped timeseries",
   "fhir_resource": "Observation",
   "category": "vital-signs",
   "loinc": "8310-5",
   "loinc_display": "Body temperature",
   "ucum": "Cel",
   "note": ""
  },
  {
   "vendor_field": "lab results[].loinc",
   "vendor_payload": "lab testing results",
   "fhir_resource": "Observation",
   "category": "activity",
   "loinc": "from payload",
   "loinc_display": null,
   "ucum": "from payload",
   "note": "Junction returns a LOINC code per biomarker when it has one; it can be missing. Keep slug and provider_id too."
  }
 ]
}