{ "$id":                    "https://schemas.mpai.community/TFA/V1.5/data/EHRQualifier.json",
  "$schema":                "https://json-schema.org/draft/2020-12/schema",

  "title":                  "EHRQualifier",
                            "description": "Qualifier for EHR content indicating subtypes, format, and implementation‑defined attributes.",
                            "type": "object",
                            "required": [ "Header", "EHRQualifierID", "SubType", "Format", "Trace" ],
                            "additionalProperties": false, "properties": {

    "Header":               { "type": "string",
                              "pattern": "^TFA-EHQ-V[0-9]{1,2}[.][0-9]{1,2}$" },

    "EHRQualifierID":       { "type": "string",
                              "description": "Identifier of this EHRQualifier instance (implementation-defined format)." },

    "SubType":              { "type": "object", "additionalProperties": false, "properties": { 
      "Categories":         { "type": "array", "description": "EHR content subtype(s).", "items": { "type": "string" },
                              "minItems": 1, "uniqueItems": true } } },

    "Format":               { "type": "object", "additionalProperties": false, "properties": {
      "ContentFormat":      { "$ref": "https://schemas.mpai.community/TFA/V1.5/formats/EHRContentFormats.json" } } },

    "Attributes":           { "type": "object", "additionalProperties": true,
                              "description": "Attributes that further qualify the EHR content." },

    "DataExchangeMetadata": { "$ref": "https://schemas.mpai.community/AIF/V3.0/data/DataExchangeMetadata.json" },
    "Trace":                { "$ref": "https://schemas.mpai.community/AIF/V3.0/data/Trace.json" },
    "DescrMetadata":        { "type": "string", "description": "Free-text descriptive metadata.", "maxLength": 2048 } } }