$schema: "https://json-schema.org/draft/2020-12/schema"

title: "MyOme Canceled json report schema"
description: "Canceled json report schema for orders that have been canceled"
type: "object"

required:
  - report_id
  - report_type
  - cancellation_reason
  - report_logo_uri

properties:
  _versions:
    type: object
    example:
      gatk: 0.1.3
      myome-python: 0.2.3
  report_id:
    $ref: "../../ids.json#/definitions/ReportId"
  report_logo_uri:
    type: "string"
    pattern: "myome:logo:PR-?\\d+(-\\w+)?(.(svg|png))?$"
    example: "myome:logo:PR-4001-nw.svg"
  partner_logo_uri:
    type: "string"
    pattern: "myome:brand_logo:\\w+(.(svg|png))?$"
    example: "myome:brand_logo:novi"
  date:
    $ref: "../../core.json#/definitions/Date"
  subject:
    $ref: "../../entities/SubjectOptionalAddress.json"
  requisition:
    $ref: "../../entities/Requisition.json"
  supersedes:
    $ref: "../../structs.json#/definitions/Supersedes"
  labs:
    type: array
    items:
      $ref: "../../structs.json#/definitions/Lab"
    minItems: 0
  callback:
    type: object
    properties:
      url:
        type: string
        format: url
        examples:
          - "https://myome.com/i/R/f1a7-aec8-6434"
    minItems: 0
  report_type:
    const: "NATERA__TNP"
  cancellation_reason:
    type: string
    description: "Reason why the order was canceled"