{
  "resourceType": "StructureDefinition",
  "id": "SmartAL-Observation-Base",
  "url": "http://alticelabs.com/fhir/StructureDefinition/SmartAL-Observation-Base",
  "name": "SmartALObservationBase",
  "title": "SmartAL Observation (Base)",
  "status": "active",
  "description": "Abstract base profile for all Observation resources sent to Glintt.\nDefines common constraints shared by all observation types: identifier,\nstatus, category, code, subject with Glintt viewer enrichment,\neffectiveDateTime, performer, interpretation, and referenceRange.\n\nInterpretation and referenceRange are automatically enriched by MHR from\nObservationDefinition thresholds at creation time. They are NOT mandatory —\nthey are only present when a matching ObservationDefinition exists.\n\nOnly Observations whose code matches the whitelist are synced:\n- 8310-5 (Body Temperature)\n- 59408-5 (SpO2)\n- 8867-4 (Heart Rate)\n- 9279-1 (Respiratory Rate)\n- 85354-9 (Blood Pressure)\n- 10000-F (Gait Group — custom LOINC)\n- 10100-F (Cognition Group — custom LOINC)\n- 20000-I (ECG+PCG Valvular Assessment — custom LOINC)\n- 3000-G (Frailty Physical Assessment -- custom LOINC)\n\nMedia and Device resources are stripped before sending to Glintt.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": true,
  "type": "Observation",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation.meta.source",
        "path": "Observation.meta.source",
        "short": "Source system that created this resource",
        "definition": "Set to 'http://alticelabs.com/fhir' by the MetaSourceInterceptor for all\nresources created via the internal backend (x-api-key). This value is used\nby the GlinttSyncInterceptor as an allowlist — only resources with this\nmeta.source are synced to Glintt. Resources created by external partners\n(e.g., P5) will have a different or absent meta.source and are excluded\nfrom Glintt sync."
      },
      {
        "id": "Observation.identifier",
        "path": "Observation.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open",
          "ordered": false
        },
        "min": 1
      },
      {
        "id": "Observation.identifier:altice",
        "path": "Observation.identifier",
        "sliceName": "altice",
        "short": "Altice business identifier (UUID)",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Observation.identifier:altice.system",
        "path": "Observation.identifier.system",
        "min": 1,
        "fixedUri": "http://alticelabs.com/fhir/identifiers/observation"
      },
      {
        "id": "Observation.identifier:altice.value",
        "path": "Observation.identifier.value",
        "min": 1
      },
      {
        "id": "Observation.status",
        "path": "Observation.status",
        "fixedCode": "final",
        "mustSupport": true
      },
      {
        "id": "Observation.category",
        "path": "Observation.category",
        "short": "Classification of observation type (vital-signs, exam, etc.)",
        "mustSupport": true
      },
      {
        "id": "Observation.code",
        "path": "Observation.code",
        "mustSupport": true
      },
      {
        "id": "Observation.code.coding",
        "path": "Observation.code.coding",
        "min": 1
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Patient"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.subject.reference",
        "path": "Observation.subject.reference",
        "min": 1
      },
      {
        "id": "Observation.subject.identifier",
        "path": "Observation.subject.identifier",
        "short": "Glintt viewer identifier for subject correlation",
        "definition": "When sending to Glintt, the subject reference is enriched with the Patient's Glintt viewer identifier (system: https://glintt.com/viewer)."
      },
      {
        "id": "Observation.encounter",
        "path": "Observation.encounter",
        "short": "Encounter during which this observation was made"
      },
      {
        "id": "Observation.effective[x]",
        "path": "Observation.effective[x]",
        "min": 1,
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Observation.issued",
        "path": "Observation.issued",
        "short": "Date/time this observation was made available"
      },
      {
        "id": "Observation.performer",
        "path": "Observation.performer",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner"
            ]
          }
        ]
      },
      {
        "id": "Observation.interpretation",
        "path": "Observation.interpretation",
        "short": "MHR-enriched interpretation code",
        "definition": "Interpretation code (N, L, LL, H, HH) automatically enriched by MHR from ObservationDefinition thresholds at creation time. Only present when a matching ObservationDefinition exists."
      },
      {
        "id": "Observation.note",
        "path": "Observation.note",
        "short": "Clinical notes about the observation"
      },
      {
        "id": "Observation.method",
        "path": "Observation.method",
        "short": "How the observation was made (e.g., manual, device)"
      },
      {
        "id": "Observation.device",
        "path": "Observation.device",
        "short": "Reference to the Device that produced this observation",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Device"
            ]
          }
        ]
      },
      {
        "id": "Observation.referenceRange",
        "path": "Observation.referenceRange",
        "short": "MHR-enriched reference ranges",
        "definition": "Reference ranges from matching ObservationDefinition, automatically added by MHR at creation time. Only present when a matching ObservationDefinition exists."
      },
      {
        "id": "Observation.derivedFrom",
        "path": "Observation.derivedFrom",
        "short": "Related observations this observation is derived from"
      }
    ]
  }
}