§ 6FHIR R4 interop

The full Python package ships mappings for 31 FHIR R4 resource types. Below is a curated set of six clinically-relevant examples showing how raw FHIR resources lift into jsonld-ex with confidence, provenance, and temporal extensions attached.

Input

resource

Posture classification from a wearable, with model uncertainty.

raw fhir r4
{
  "resourceType": "Observation",
  "id": "obs-22",
  "status": "final",
  "code": {
    "coding": [
      {
        "system": "http://loinc.org",
        "code": "8867-4",
        "display": "Heart rate"
      }
    ]
  },
  "valueQuantity": {
    "value": 78,
    "unit": "/min",
    "system": "http://unitsofmeasure.org",
    "code": "/min"
  },
  "effectiveDateTime": "2026-05-18T11:45:00Z"
}

Output

jsonld-ex annotated
{
  "@context": [
    "https://hl7.org/fhir/jsonld/",
    "https://w3id.org/jsonld-ex/v1"
  ],
  "@type": "fhir:Observation",
  "@id": "urn:uuid:obs-22",
  "fhir:status": "final",
  "fhir:code": {
    "fhir:coding": [
      {
        "@id": "http://loinc.org/8867-4",
        "fhir:display": "Heart rate"
      }
    ]
  },
  "fhir:valueQuantity": {
    "@value": 78,
    "fhir:unit": "/min",
    "@confidence": 0.93,
    "@source": "edge://pendant-A14/posture-v3",
    "@method": "wearable-classifier",
    "@extractedAt": "2026-05-18T11:45:00Z"
  }
}

Confidence, source, and human-verification flags are attached at the value level so a downstream FHIR consumer that ignores them still sees a structurally valid resource — backward compatibility holds even in the clinical pipeline.