{ "$schema":                    "https://json-schema.org/draft/2020-12/schema",
  "$id":                        "https://schemas.mpai.community/AIH1/V1.0/data/ClinicalRecordObject.json",
  "title":                      "Clinical Record Object V1.5",
  "description":                "Symbolic clinical records.",
  "type":                       "object",
  "additionalProperties":       false,
  "required":                   [ "Header", "ClinicalRecordID", "ClinicalRecordTime", "ClinicalRecordData",
                                  "ClinicalRecordQualifier" ],
  "properties":                 {

    "Header":                   { "type": "string", "pattern": "^TFA-CRO-V[0-9],{1,2},[.][0-9],{1,2}$" },
    "MInstanceID":              { "type": "string", "description": "Metaverse instance ID (optional)." },
    "UEnvironment":             { "type": "string" },
    "UserID":                   { "type": "string", "description": "ID of End User autdiing the system forillicit use." },
    "ClinicalRecordObjectID":   { "type": "string", "description": "Identifier of the clinical record instance." },
    "ClinicalRecordObjectTime": { "$ref": "https://schemas.mpai.community/OSD/V1.5/data/Time.json" },

    "ClinicalRecordObjectData": { "type": "array", "items": { "anyOf": [
                                { "type": "object", "properties": { "Data": { "type": "string" } } },
                                { "type": "object", "properties": { "DataLength": { "type": "integer" },
                                                                    "DataURI": { "type": "string", "format": "uri" } } },
                                { "type": "object", "properties": { "ID": { "type": "string" } } } ] } },

    "ClinicalRecordQualifier":  { "$ref": "https://schemas.mpai.community/TFA/V1.5/data/ClinicalRecordQualifier.json",
                                  "description": "Qualifier defining coding semantics and clinical interpretation." },

    "DataXMData":               { "$ref": "https://schemas.mpai.community/PTF/V1.0/data/DataExchangeMetadata.json" },
    "DescrMetadata":            { "type": "string", "maxLength": 2048 } } }
