{ "$schema":              "https://json-schema.org/draft/2020-12/schema",
  "$id":                  "https://schemas.mpai.community/AIH1/V1.1/data/ECGObject.json",
  "title":                "ECG Object V1.1",
  "type":                 "object",
  "additionalProperties": false, "unevaluatedProperties": false,
                          "required": [ "Header", "ECGObjectID", "ECGObjectTime", "ECGData" ],
  "properties":           {

    "Header":             { "type": "string", "const": "AIH-ECO-V1.1" },

    "ECGObjectID":        { "type": "string" },
    "MInstanceID":        { "type": "string" },
    "UEnvironment":       { "type": "string" },
    "EndUserID":          { "type": "string" },
    "EndDeviceID":        { "type": "string" },
    "ECGObjectTime":      { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/Time.json" },

    "ECGData":            { "type": "array", "items": { "anyOf": [
                          { "type": "object", "properties": {
      "DataLength":       { "type": "integer" },
      "DataURI":          { "type": "string", "format": "uri" } } },
                          { "type": "object", "properties": {
      "Data":             { "type": "string" } } },
                          { "type": "object", "properties": {
      "DataID":           { "type": "string" } } } ] } },

    "ECGDataQualifier":   { "$ref": "https://schemas.mpai.community/TFA/V1.5/data/ECGQualifier.json" },

    "DataXMData":         { "$ref": "https://schemas.mpai.community/PTF/V1.0/data/DataExchangeMetadata.json" },
    "DescrMetadata":      { "type": "string", "maxLength": 2048 } } }
