{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://taxonmark.com/api/v1/types/diagnostic-ai-attestation",
    "title": "Diagnostic AI Decision Attestation",
    "type": "object",
    "required": [
        "software_lineage_doi",
        "facility",
        "timestamp",
        "input_hash",
        "output_hash",
        "clinician_reviewed",
        "no_patient_data"
    ],
    "properties": {
        "software_lineage_doi": {
            "title": "Medical software lineage ID",
            "type": "string",
            "format": "doi",
            "description": "A Taxonmark ID (for example TM.AI.2026.7KQ2X) or a DOI registered elsewhere"
        },
        "facility": {
            "title": "Facility (pseudonymous code allowed)",
            "type": "string",
            "maxLength": 1000
        },
        "timestamp": {
            "title": "Timestamp",
            "type": "string",
            "format": "date-time"
        },
        "input_hash": {
            "title": "Input hash",
            "type": "string",
            "pattern": "^(sha256:)?[A-Fa-f0-9]{64}$",
            "description": "SHA-256 hex (optionally prefixed sha256:)"
        },
        "output_hash": {
            "title": "Output hash",
            "type": "string",
            "pattern": "^(sha256:)?[A-Fa-f0-9]{64}$",
            "description": "SHA-256 hex (optionally prefixed sha256:)"
        },
        "clinician_reviewed": {
            "title": "Clinician reviewed",
            "type": "boolean"
        },
        "no_patient_data": {
            "title": "Confirm: no patient data in this record",
            "type": "boolean"
        }
    },
    "additionalProperties": true
}