{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/anpheros-com/json-schema/anpheros-com-observation-out-schema.json",
  "title": "ObservationOut",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/anpheros-com-openapi.json#/components/schemas/ObservationOut",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id"
    },
    "patient": {
      "type": "string",
      "title": "Patient"
    },
    "code": {
      "type": "string",
      "title": "Code"
    },
    "system": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "System"
    },
    "display": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Display"
    },
    "category": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Category"
    },
    "effective_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Effective At"
    },
    "value": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Value"
    },
    "unit": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Unit"
    },
    "value_text": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Value Text"
    },
    "components": {
      "items": {
        "$ref": "#/$defs/Component"
      },
      "type": "array",
      "title": "Components"
    },
    "reference_range": {
      "anyOf": [
        {
          "$ref": "#/$defs/ReferenceRange"
        },
        {
          "type": "null"
        }
      ]
    },
    "note": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Note"
    },
    "derived_from": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Derived From"
    },
    "status": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Status"
    },
    "updated_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Updated At"
    },
    "fhir": {
      "type": "string",
      "title": "Fhir"
    }
  },
  "type": "object",
  "required": [
    "id",
    "patient",
    "code",
    "system",
    "display",
    "category",
    "effective_at",
    "value",
    "unit",
    "value_text",
    "components",
    "reference_range",
    "note",
    "derived_from",
    "status",
    "updated_at",
    "fhir"
  ],
  "$defs": {
    "Component": {
      "properties": {
        "code": {
          "type": "string",
          "title": "Code"
        },
        "system": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "System",
          "default": "http://loinc.org"
        },
        "display": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Display"
        },
        "value": {
          "type": "number",
          "title": "Value"
        },
        "unit": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Unit"
        }
      },
      "type": "object",
      "required": [
        "code",
        "value"
      ],
      "title": "Component"
    },
    "ReferenceRange": {
      "properties": {
        "low": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Low"
        },
        "high": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "High"
        }
      },
      "type": "object",
      "title": "ReferenceRange"
    }
  }
}