{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://doi.org/10.5281/zenodo.23577316/evidence-authority-standard-v1.schema.json",
  "title": "Evidence-Authority Standard v2.0: machine-readable companion and test vectors",
  "description": "JSON Schema (draft 2020-12) for evidence-authority-standard-v1.json (the root) and for evidence-authority-standard-v1.test-vectors.json (#/$defs/testVectorFile). The text of the standard governs where a file and the text differ.",
  "type": "object",
  "required": [
    "companion",
    "standard",
    "terms",
    "evidenceClasses",
    "classGroups",
    "authorityIssuedClasses",
    "jurisdictionRules",
    "propositions",
    "rules",
    "verdicts",
    "verdictRecord",
    "limitationDimensions",
    "decisionProcedure",
    "claimDate",
    "scope",
    "marketStep",
    "p6",
    "p8",
    "conformance"
  ],
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "type": "string"
    },
    "companion": {
      "type": "object",
      "required": [
        "title",
        "status",
        "identifierNote",
        "testVectors",
        "schema",
        "licence"
      ],
      "additionalProperties": false,
      "properties": {
        "title": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "type": "string",
          "minLength": 1
        },
        "identifierNote": {
          "type": "string",
          "minLength": 1
        },
        "testVectors": {
          "type": "string",
          "minLength": 1
        },
        "schema": {
          "type": "string",
          "minLength": 1
        },
        "licence": {
          "type": "string",
          "minLength": 1
        },
        "classificationTestSet": {
          "type": "string",
          "pattern": "^classification-test-set-v[0-9]+[.][0-9]+([.][0-9]+)?[.]json$"
        }
      }
    },
    "standard": {
      "$ref": "#/$defs/standardIdentity"
    },
    "terms": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "id",
          "section",
          "text"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z_]+$"
          },
          "section": {
            "type": "string",
            "minLength": 1
          },
          "text": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    },
    "evidenceClasses": {
      "type": "array",
      "minItems": 27,
      "maxItems": 27,
      "items": {
        "type": "object",
        "required": [
          "id",
          "group"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "$ref": "#/$defs/evidenceClassId"
          },
          "group": {
            "enum": [
              "authority_issued",
              "coverage_records",
              "trials_and_appraised",
              "market_and_manufacturer",
              "ai_answer_observations",
              "other"
            ]
          }
        }
      }
    },
    "classGroups": {
      "type": "array",
      "minItems": 6,
      "maxItems": 6,
      "items": {
        "type": "object",
        "required": [
          "id",
          "annexHeading"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "enum": [
              "authority_issued",
              "coverage_records",
              "trials_and_appraised",
              "market_and_manufacturer",
              "ai_answer_observations",
              "other"
            ]
          },
          "annexHeading": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    },
    "authorityIssuedClasses": {
      "type": "array",
      "minItems": 9,
      "maxItems": 9,
      "uniqueItems": true,
      "items": {
        "$ref": "#/$defs/evidenceClassId"
      }
    },
    "jurisdictionRules": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "id",
          "text"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "$ref": "#/$defs/jurisdictionRuleId"
          },
          "text": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    },
    "propositions": {
      "type": "array",
      "minItems": 19,
      "maxItems": 19,
      "items": {
        "$ref": "#/$defs/proposition"
      }
    },
    "rules": {
      "type": "array",
      "minItems": 8,
      "maxItems": 8,
      "items": {
        "type": "object",
        "required": [
          "id",
          "section",
          "text",
          "statements"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^R[1-8]$"
          },
          "section": {
            "const": "5"
          },
          "text": {
            "type": "string",
            "minLength": 1
          },
          "statements": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "related": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      }
    },
    "verdicts": {
      "type": "array",
      "minItems": 4,
      "maxItems": 4,
      "items": {
        "type": "object",
        "required": [
          "id",
          "label",
          "meaning",
          "mayRestOnIt"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "$ref": "#/$defs/verdict"
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "reportedAs": {
            "type": "string",
            "minLength": 1
          },
          "meaning": {
            "type": "string",
            "minLength": 1
          },
          "mayRestOnIt": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    },
    "verdictRecord": {
      "type": "object",
      "required": [
        "unit",
        "records",
        "abstention"
      ],
      "additionalProperties": false,
      "properties": {
        "unit": {
          "type": "string",
          "minLength": 1
        },
        "records": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "abstention": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "limitationDimensions": {
      "type": "array",
      "minItems": 4,
      "maxItems": 4,
      "uniqueItems": true,
      "items": {
        "enum": [
          "authority",
          "jurisdiction",
          "time",
          "accessibility"
        ]
      }
    },
    "decisionProcedure": {
      "type": "object",
      "required": [
        "note",
        "steps"
      ],
      "additionalProperties": false,
      "properties": {
        "note": {
          "type": "string",
          "minLength": 1
        },
        "steps": {
          "type": "array",
          "minItems": 15,
          "maxItems": 15,
          "items": {
            "type": "object",
            "required": [
              "id",
              "basis",
              "decides"
            ],
            "additionalProperties": false,
            "properties": {
              "id": {
                "$ref": "#/$defs/ruleId"
              },
              "basis": {
                "type": "string",
                "minLength": 1
              },
              "decides": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        }
      }
    },
    "claimDate": {
      "type": "object",
      "required": [
        "rule",
        "statedDatePrecision",
        "dateFormat",
        "eventClaim",
        "dateKinds"
      ],
      "additionalProperties": false,
      "properties": {
        "rule": {
          "type": "string",
          "minLength": 1
        },
        "statedDatePrecision": {
          "type": "string",
          "minLength": 1
        },
        "dateFormat": {
          "type": "string",
          "minLength": 1
        },
        "eventClaim": {
          "type": "string",
          "minLength": 1
        },
        "dateKinds": {
          "type": "array",
          "minItems": 3,
          "maxItems": 3,
          "items": {
            "type": "object",
            "required": [
              "id",
              "text"
            ],
            "additionalProperties": false,
            "properties": {
              "id": {
                "$ref": "#/$defs/dateKind"
              },
              "text": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        }
      }
    },
    "scope": {
      "type": "object",
      "required": [
        "isNot"
      ],
      "additionalProperties": false,
      "properties": {
        "isNot": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    },
    "p8": {
      "type": "object",
      "required": [
        "note",
        "notAnId"
      ],
      "additionalProperties": false,
      "properties": {
        "note": {
          "type": "string",
          "minLength": 1
        },
        "notAnId": {
          "const": "P8"
        }
      }
    },
    "conformance": {
      "type": "object",
      "required": [
        "rule",
        "vectors",
        "referenceImplementation"
      ],
      "additionalProperties": false,
      "properties": {
        "rule": {
          "type": "string",
          "minLength": 1
        },
        "vectors": {
          "type": "string",
          "minLength": 1
        },
        "referenceImplementation": {
          "type": "object",
          "required": [
            "name",
            "version",
            "licence",
            "source"
          ],
          "additionalProperties": false,
          "properties": {
            "name": {
              "type": "string",
              "minLength": 1
            },
            "version": {
              "type": "string",
              "pattern": "^\\d+\\.\\d+\\.\\d+$"
            },
            "licence": {
              "type": "string",
              "minLength": 1
            },
            "source": {
              "type": "string",
              "pattern": "^https://"
            }
          }
        }
      }
    },
    "marketStep": {
      "type": "object",
      "required": [
        "steps",
        "governs",
        "conflict",
        "neverInferredFrom",
        "marketWords",
        "recorded"
      ],
      "additionalProperties": false,
      "properties": {
        "steps": {
          "type": "array",
          "minItems": 4,
          "items": {
            "type": "object",
            "required": [
              "id",
              "rule",
              "text"
            ],
            "additionalProperties": false,
            "properties": {
              "id": {
                "enum": [
                  "answer",
                  "question",
                  "configuration",
                  "unresolved"
                ]
              },
              "rule": {
                "type": "string",
                "minLength": 1
              },
              "text": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        },
        "governs": {
          "type": "string",
          "minLength": 1
        },
        "conflict": {
          "type": "string",
          "minLength": 1
        },
        "neverInferredFrom": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "marketWords": {
          "type": "string",
          "minLength": 1
        },
        "recorded": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "p6": {
      "type": "object",
      "required": [
        "note",
        "notAnId"
      ],
      "additionalProperties": false,
      "properties": {
        "note": {
          "type": "string",
          "minLength": 1
        },
        "notAnId": {
          "const": "P6"
        }
      }
    }
  },
  "$defs": {
    "evidenceClassId": {
      "enum": [
        "authorisation_decision",
        "register_entry",
        "authorised_label",
        "regulatory_opinion",
        "regulator_assessment_report",
        "regulator_safety_communication",
        "safety_signal_record",
        "institutional_guidance",
        "payer_decision",
        "hta_appraisal",
        "formulary_listing",
        "trial_registry_record",
        "trial_protocol",
        "trial_results_posting",
        "trial_publication_of_record",
        "conference_abstract",
        "systematic_review",
        "clinical_guideline",
        "head_to_head_trial",
        "appraised_indirect_comparison",
        "supply_record",
        "launch_statement",
        "manufacturer_statement",
        "longitudinal_observation",
        "single_observation",
        "secondary_commentary",
        "case_report_or_forum"
      ]
    },
    "propositionId": {
      "enum": [
        "P1",
        "P2",
        "P3",
        "P3a",
        "P3b",
        "P3c",
        "P3d",
        "P4",
        "P5",
        "P6a",
        "P6b",
        "P6c",
        "P7",
        "P8a",
        "P8b",
        "P8c",
        "P9",
        "P10",
        "answer_change"
      ]
    },
    "jurisdictionRuleId": {
      "enum": [
        "claim_market",
        "international",
        "named_source_scope",
        "composite",
        "none",
        "not_stated"
      ]
    },
    "verdict": {
      "enum": [
        "settles",
        "supports",
        "irrelevant",
        "not_determinable"
      ]
    },
    "ruleId": {
      "enum": [
        "S6-proposition",
        "P10",
        "S2-claim-date",
        "S6-no-source",
        "R7",
        "P3",
        "R1",
        "S2-authority",
        "R5",
        "R2",
        "R3",
        "P3d",
        "P5",
        "P6a",
        "S6-settles"
      ]
    },
    "isoDate": {
      "type": "string",
      "pattern": "^\\d{4}(-\\d{2}(-\\d{2}(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,9})?)?(Z|[+-]\\d{2}:\\d{2})?)?)?)?$"
    },
    "standardIdentity": {
      "type": "object",
      "required": [
        "title",
        "subtitle",
        "version",
        "issued",
        "doi",
        "conceptDoi",
        "author",
        "authorOrcid",
        "publisher",
        "licence",
        "licenceUrl",
        "textFile",
        "textSha256",
        "textSha256Note",
        "versioning"
      ],
      "additionalProperties": false,
      "properties": {
        "title": {
          "type": "string",
          "minLength": 1
        },
        "subtitle": {
          "type": "string",
          "minLength": 1
        },
        "version": {
          "type": "string",
          "pattern": "^\\d+\\.\\d+(\\.\\d+)?$"
        },
        "issued": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/isoDate"
            }
          ]
        },
        "doi": {
          "$ref": "#/$defs/versionDoi"
        },
        "conceptDoi": {
          "type": "string",
          "pattern": "^10\\.5281/zenodo\\.\\d+$"
        },
        "author": {
          "type": "string",
          "minLength": 1
        },
        "authorOrcid": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{4}-\\d{4}-\\d{3}[\\dX]$"
        },
        "publisher": {
          "type": "string",
          "minLength": 1
        },
        "licence": {
          "const": "CC-BY-4.0"
        },
        "licenceUrl": {
          "const": "https://creativecommons.org/licenses/by/4.0/"
        },
        "textFile": {
          "type": "string",
          "minLength": 1
        },
        "textSha256": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            }
          ]
        },
        "textSha256Note": {
          "type": "string",
          "minLength": 1
        },
        "versioning": {
          "type": "string",
          "minLength": 1
        },
        "changes": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "previousVersions": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "version",
              "doi"
            ],
            "additionalProperties": false,
            "properties": {
              "version": {
                "type": "string",
                "pattern": "^\\d+\\.\\d+(\\.\\d+)?$"
              },
              "doi": {
                "$ref": "#/$defs/versionDoi"
              }
            }
          }
        }
      }
    },
    "settlingClass": {
      "type": "object",
      "required": [
        "class",
        "jurisdictionRule"
      ],
      "additionalProperties": false,
      "properties": {
        "class": {
          "$ref": "#/$defs/evidenceClassId"
        },
        "jurisdictionRule": {
          "$ref": "#/$defs/jurisdictionRuleId"
        },
        "condition": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "proposition": {
      "type": "object",
      "required": [
        "id",
        "name",
        "jurisdictionRule",
        "jurisdictionText",
        "settledBy",
        "supportedBy",
        "timeRule",
        "evidenceText"
      ],
      "additionalProperties": false,
      "properties": {
        "id": {
          "$ref": "#/$defs/propositionId"
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "definition": {
          "type": "string",
          "minLength": 1
        },
        "parent": {
          "$ref": "#/$defs/propositionId"
        },
        "jurisdictionRule": {
          "$ref": "#/$defs/jurisdictionRuleId"
        },
        "jurisdictionText": {
          "type": "string",
          "minLength": 1
        },
        "settledBy": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/settlingClass"
          }
        },
        "composedOf": {
          "type": "array",
          "minItems": 2,
          "items": {
            "$ref": "#/$defs/propositionId"
          }
        },
        "supportedBy": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/evidenceClassId"
          }
        },
        "neverSettled": {
          "const": true
        },
        "timeRule": {
          "type": "string",
          "minLength": 1
        },
        "evidenceText": {
          "type": "string",
          "minLength": 1
        },
        "supplyRecordKinds": {
          "type": "array",
          "minItems": 3,
          "maxItems": 3,
          "items": {
            "type": "object",
            "required": [
              "id",
              "text"
            ],
            "additionalProperties": false,
            "properties": {
              "id": {
                "$ref": "#/$defs/supplyKind"
              },
              "text": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        },
        "pharmacyListing": {
          "type": "object",
          "required": [
            "settlesOnly",
            "inForce",
            "bracketing",
            "claimForms",
            "notProofOf",
            "notForSale"
          ],
          "additionalProperties": false,
          "properties": {
            "settlesOnly": {
              "type": "string",
              "minLength": 1
            },
            "inForce": {
              "const": "own_date_only"
            },
            "bracketing": {
              "type": "object",
              "required": [
                "listings",
                "samePharmacy",
                "bothShowForSale",
                "oneBeforeClaimDate",
                "oneAfterClaimDate",
                "maxDaysEachSide",
                "listingOnClaimDate",
                "verdicts",
                "atMost"
              ],
              "additionalProperties": false,
              "properties": {
                "listings": {
                  "const": 2
                },
                "samePharmacy": {
                  "const": true
                },
                "bothShowForSale": {
                  "const": true
                },
                "maxDaysEachSide": {
                  "const": 3
                },
                "verdicts": {
                  "type": "string",
                  "minLength": 1
                },
                "atMost": {
                  "const": "supports"
                },
                "oneBeforeClaimDate": {
                  "const": true
                },
                "oneAfterClaimDate": {
                  "const": true
                },
                "listingOnClaimDate": {
                  "const": "judged on its own"
                }
              }
            },
            "claimForms": {
              "type": "array",
              "minItems": 2,
              "maxItems": 2,
              "items": {
                "type": "object",
                "required": [
                  "id",
                  "text",
                  "pharmacyListingVerdict"
                ],
                "additionalProperties": false,
                "properties": {
                  "id": {
                    "$ref": "#/$defs/p5Scope"
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1
                  },
                  "pharmacyListingVerdict": {
                    "$ref": "#/$defs/verdict"
                  }
                }
              }
            },
            "notProofOf": {
              "type": "array",
              "minItems": 1,
              "items": {
                "type": "string",
                "minLength": 1
              }
            },
            "notForSale": {
              "const": "not_determinable"
            }
          }
        },
        "trialStatuses": {
          "type": "object",
          "required": [
            "ongoing",
            "notOngoing",
            "settlesNothing",
            "missing"
          ],
          "additionalProperties": false,
          "properties": {
            "ongoing": {
              "type": "array",
              "minItems": 1,
              "items": {
                "$ref": "#/$defs/trialStatus"
              }
            },
            "notOngoing": {
              "type": "array",
              "minItems": 1,
              "items": {
                "$ref": "#/$defs/trialStatus"
              }
            },
            "settlesNothing": {
              "type": "array",
              "minItems": 1,
              "items": {
                "$ref": "#/$defs/trialStatus"
              }
            },
            "missing": {
              "const": "not_determinable"
            }
          }
        },
        "supplyRecordKindUnstated": {
          "const": "not_determinable"
        },
        "payerDecision": {
          "type": "object",
          "required": [
            "reaches",
            "claimForms",
            "reachUnstated"
          ],
          "additionalProperties": false,
          "properties": {
            "reaches": {
              "type": "array",
              "minItems": 2,
              "items": {
                "type": "object",
                "required": [
                  "id",
                  "text"
                ],
                "additionalProperties": false,
                "properties": {
                  "id": {
                    "enum": [
                      "market",
                      "scheme"
                    ]
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              }
            },
            "claimForms": {
              "type": "array",
              "minItems": 2,
              "items": {
                "type": "object",
                "required": [
                  "id",
                  "text",
                  "schemeDecisionVerdict"
                ],
                "additionalProperties": false,
                "properties": {
                  "id": {
                    "enum": [
                      "market",
                      "named_payer"
                    ]
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1
                  },
                  "schemeDecisionVerdict": {
                    "$ref": "#/$defs/verdict"
                  }
                }
              }
            },
            "reachUnstated": {
              "const": "not_determinable"
            },
            "unrecordedFormJudgedAs": {
              "const": "market"
            },
            "reachByPlace": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "composedOfWithoutUse": {
          "type": "array",
          "minItems": 2,
          "items": {
            "$ref": "#/$defs/propositionId"
          }
        },
        "unidentifiedGuideline": {
          "const": "not_determinable"
        },
        "unidentifiedFormulary": {
          "const": "not_determinable"
        },
        "stock": {
          "const": "not_determinable"
        },
        "unrecordedFormJudgedAs": {
          "$ref": "#/$defs/p5Scope"
        },
        "claimForms": {
          "type": "array",
          "minItems": 5,
          "items": {
            "type": "object",
            "required": [
              "id",
              "text"
            ],
            "additionalProperties": false,
            "properties": {
              "id": {
                "$ref": "#/$defs/p5Scope"
              },
              "text": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        },
        "namedChannel": {
          "type": "object",
          "required": [
            "kinds",
            "otherChannel",
            "kindUnstated"
          ],
          "additionalProperties": false,
          "properties": {
            "kinds": {
              "type": "array",
              "minItems": 2,
              "maxItems": 2,
              "items": {
                "type": "object",
                "required": [
                  "id",
                  "text",
                  "settledBy",
                  "supportedBy"
                ],
                "additionalProperties": false,
                "properties": {
                  "id": {
                    "$ref": "#/$defs/p5Channel"
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1
                  },
                  "settledBy": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "$ref": "#/$defs/settlingClass"
                    }
                  },
                  "supportedBy": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "$ref": "#/$defs/evidenceClassId"
                    }
                  }
                }
              }
            },
            "otherChannel": {
              "type": "string",
              "minLength": 1
            },
            "kindUnstated": {
              "const": "not_determinable"
            },
            "channelNamedOnlyByKind": {
              "const": "not_determinable"
            }
          }
        },
        "terms": {
          "type": "object",
          "required": [
            "ids",
            "default",
            "settledByTerm",
            "otherTerms"
          ],
          "additionalProperties": false,
          "properties": {
            "ids": {
              "type": "array",
              "minItems": 1,
              "uniqueItems": true,
              "items": {
                "$ref": "#/$defs/p2Term"
              }
            },
            "default": {
              "$ref": "#/$defs/p2Term"
            },
            "settledByTerm": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "id",
                  "settledBy",
                  "supportedBy"
                ],
                "additionalProperties": false,
                "properties": {
                  "id": {
                    "$ref": "#/$defs/p2Term"
                  },
                  "settledBy": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "$ref": "#/$defs/settlingClass"
                    }
                  },
                  "supportedBy": {
                    "type": "array",
                    "uniqueItems": true,
                    "items": {
                      "$ref": "#/$defs/evidenceClassId"
                    }
                  }
                }
              }
            },
            "otherTerms": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      }
    },
    "supplyKind": {
      "enum": [
        "distributor_listing",
        "procurement_record",
        "pharmacy_listing"
      ]
    },
    "p5Scope": {
      "enum": [
        "anywhere_in_market",
        "across_market",
        "named_channel",
        "stock",
        "channel_kind"
      ]
    },
    "iso3166": {
      "type": "string",
      "pattern": "^[A-Z]{2}(-[A-Z0-9]{1,3})?$",
      "description": "An ISO 3166-1 alpha-2 code, or an ISO 3166-2 code for a place below the country (Annex B, M6)."
    },
    "vectorSource": {
      "type": "object",
      "required": [
        "label",
        "evidenceClass",
        "currency"
      ],
      "additionalProperties": false,
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1
        },
        "evidenceClass": {
          "type": "string",
          "minLength": 1
        },
        "authority": {
          "type": [
            "string",
            "null"
          ]
        },
        "publisher": {
          "type": [
            "string",
            "null"
          ]
        },
        "jurisdictions": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/$defs/iso3166"
              }
            }
          ]
        },
        "reading": {
          "enum": [
            "listed",
            "listed_not_current",
            "not_listed",
            "unreadable",
            null
          ]
        },
        "effectiveFrom": {
          "type": [
            "string",
            "null"
          ]
        },
        "effectiveTo": {
          "type": [
            "string",
            "null"
          ]
        },
        "currency": {
          "enum": [
            "assured",
            "not_assured"
          ]
        },
        "currentAsOf": {
          "type": [
            "string",
            "null"
          ]
        },
        "supplyKind": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/supplyKind"
            }
          ]
        },
        "pharmacy": {
          "type": [
            "string",
            "null"
          ]
        },
        "showsForSale": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "synthetic": {
          "type": "boolean"
        },
        "note": {
          "type": "string",
          "minLength": 1
        },
        "trialStatus": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/trialStatus"
            }
          ]
        },
        "payerReach": {
          "anyOf": [
            {
              "enum": [
                "market",
                "scheme"
              ]
            },
            {
              "type": "object",
              "required": [
                "places"
              ],
              "additionalProperties": false,
              "properties": {
                "places": {
                  "type": "array",
                  "minItems": 1,
                  "items": {
                    "$ref": "#/$defs/iso3166"
                  }
                },
                "population": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          ]
        },
        "annulledOn": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "testVector": {
      "type": "object",
      "required": [
        "id",
        "title",
        "basis",
        "input",
        "expected"
      ],
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^EAS-V\\d{3}$"
        },
        "title": {
          "type": "string",
          "minLength": 1
        },
        "basis": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "illustrates": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "synthetic": {
          "type": "boolean"
        },
        "note": {
          "type": "string",
          "minLength": 1
        },
        "input": {
          "type": "object",
          "required": [
            "proposition",
            "claim",
            "evidence"
          ],
          "additionalProperties": false,
          "properties": {
            "proposition": {
              "type": "string",
              "minLength": 1
            },
            "claim": {
              "type": "object",
              "required": [
                "market",
                "answerDate"
              ],
              "additionalProperties": false,
              "properties": {
                "market": {
                  "anyOf": [
                    {
                      "type": "null"
                    },
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "array",
                      "minItems": 1,
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    }
                  ]
                },
                "answerDate": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "statedDate": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "p5Scope": {
                  "anyOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/$defs/p5Scope"
                    }
                  ]
                },
                "synthetic": {
                  "type": "boolean"
                },
                "note": {
                  "type": "string",
                  "minLength": 1
                },
                "questionMarket": {
                  "anyOf": [
                    {
                      "type": "null"
                    },
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "array",
                      "minItems": 1,
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    }
                  ]
                },
                "configuredMarket": {
                  "anyOf": [
                    {
                      "type": "null"
                    },
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "array",
                      "minItems": 1,
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    }
                  ]
                },
                "p6aScope": {
                  "anyOf": [
                    {
                      "type": "null"
                    },
                    {
                      "enum": [
                        "market",
                        "named_payer"
                      ]
                    }
                  ]
                },
                "statedDateUndetermined": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "dateKind": {
                  "anyOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/$defs/dateKind"
                    }
                  ]
                },
                "p5Channel": {
                  "anyOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/$defs/p5Channel"
                    }
                  ]
                },
                "sourceUnidentified": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "useNamed": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "p2Term": {
                  "anyOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/$defs/p2Term"
                    }
                  ]
                }
              }
            },
            "evidence": {
              "type": "object",
              "required": [
                "judged",
                "sources"
              ],
              "additionalProperties": false,
              "properties": {
                "judged": {
                  "enum": [
                    "single",
                    "bracketed"
                  ]
                },
                "sources": {
                  "type": "array",
                  "minItems": 1,
                  "maxItems": 2,
                  "items": {
                    "$ref": "#/$defs/vectorSource"
                  }
                }
              }
            }
          }
        },
        "expected": {
          "type": "object",
          "required": [
            "claimDate",
            "verdict",
            "rule"
          ],
          "additionalProperties": false,
          "properties": {
            "claimDate": {
              "type": [
                "string",
                "null"
              ]
            },
            "verdict": {
              "$ref": "#/$defs/verdict"
            },
            "rule": {
              "$ref": "#/$defs/ruleId"
            },
            "settledAs": {
              "enum": [
                "ongoing",
                "not_ongoing"
              ]
            },
            "market": {
              "type": "object",
              "required": [
                "basis"
              ],
              "additionalProperties": false,
              "properties": {
                "basis": {
                  "enum": [
                    "answer",
                    "question",
                    "configuration",
                    "unresolved"
                  ]
                },
                "conflict": {
                  "type": "boolean"
                }
              }
            }
          }
        }
      }
    },
    "testVectorFile": {
      "type": "object",
      "required": [
        "title",
        "standard",
        "vectorsVersion",
        "conformance",
        "inputs",
        "authorities",
        "vectors"
      ],
      "additionalProperties": false,
      "properties": {
        "$schema": {
          "type": "string"
        },
        "title": {
          "type": "string",
          "minLength": 1
        },
        "standard": {
          "type": "object",
          "required": [
            "version",
            "doi",
            "conceptDoi"
          ],
          "additionalProperties": false,
          "properties": {
            "version": {
              "type": "string",
              "pattern": "^\\d+\\.\\d+(\\.\\d+)?$"
            },
            "doi": {
              "$ref": "#/$defs/versionDoi"
            },
            "conceptDoi": {
              "type": "string",
              "pattern": "^10\\.5281/zenodo\\.\\d+$"
            }
          }
        },
        "vectorsVersion": {
          "type": "string",
          "pattern": "^\\d+\\.\\d+\\.\\d+$"
        },
        "conformance": {
          "type": "string",
          "minLength": 1
        },
        "inputs": {
          "type": "string",
          "minLength": 1
        },
        "authorities": {
          "type": "object",
          "minProperties": 1,
          "additionalProperties": {
            "type": "object",
            "required": [
              "name",
              "jurisdictions",
              "issues",
              "basis"
            ],
            "additionalProperties": false,
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1
              },
              "jurisdictions": {
                "type": "array",
                "minItems": 1,
                "items": {
                  "$ref": "#/$defs/iso3166"
                }
              },
              "issues": {
                "type": "array",
                "minItems": 1,
                "uniqueItems": true,
                "items": {
                  "$ref": "#/$defs/evidenceClassId"
                }
              },
              "basis": {
                "type": "string",
                "minLength": 1
              },
              "synthetic": {
                "type": "boolean"
              },
              "note": {
                "type": "string",
                "minLength": 1
              }
            }
          }
        },
        "vectors": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/testVector"
          }
        }
      }
    },
    "versionDoi": {
      "type": "string",
      "pattern": "^10\\.5281/zenodo\\.(\\d+|\\[version DOI, reserved before deposit\\])$"
    },
    "trialStatus": {
      "enum": [
        "not_yet_recruiting",
        "recruiting",
        "enrolling_by_invitation",
        "active_not_recruiting",
        "suspended",
        "terminated",
        "completed",
        "withdrawn",
        "available",
        "no_longer_available",
        "temporarily_not_available",
        "approved_for_marketing",
        "withheld",
        "unknown"
      ]
    },
    "p2Term": {
      "enum": [
        "use",
        "legal_category",
        "restricted_programme",
        "dose",
        "route",
        "form"
      ]
    },
    "p5Channel": {
      "enum": [
        "regulatory_route",
        "supplier"
      ]
    },
    "dateKind": {
      "enum": [
        "state",
        "event",
        "undated_event"
      ]
    }
  }
}
