{
  "$schema": "https://json-schema.org/draft-07/schema",
  "$id": "https://geoar.it/schemas/semantic-event-types/v0.1/health-pack-schema-0.1.json",
  "title": "Health Domain Pack v0.1",
  "description": "Vital-sign event types and their statuses.",
  "type": "object",
  "required": [ "semantic-event-type", "semantic-event-status" ],
  "allOf": [
    {
      "$ref": "https://geoar.it/.well-known/schemas/metarverse/v0.1/metarverse-uri-base-schema-0.1.json"
    },
    {
      "if": {
        "properties": {
          "semantic-event-type": { "const": "heartrate" }
        }
      },
      "then": {
        "properties": {
          "semantic-event-status": {
            "enum": [ "reading", "spike" ]
          }
        }
      }
    }
  ],
  "properties": {
    "semantic-event-type": {
      "type": "string",
      "enum": [
        "bloodpressure",
        "heartrate",
        "spo2",
        "bodytemp",
        "bloodglucose",
        "bmi",
        "medication",
        "symptom"
      ]
    },
    "semantic-event-status": {
      "type": "string"
    }
  },
  "additionalProperties": false
}
