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

title: 'Basic structures'
description: 'Non-identifiable structures'
type: object
definitions:
  AlignmentMetrics:
    description: |
      Used by alignment dataset to store AlignmentMetrics
    type: object
    properties:
      sequencing_type:
        $ref: "core.json#/definitions/SequencingType"
      vendor:
        $ref: "core.json#/definitions/Vendor"
      mean_depth:
        type: number
      median_insert_size:
        type: number
      
  Billing:
    title: Billing Information
    description: Options are currently self-pay, insurance, and institutional billing. 
    type: array
    maxItems: 1
    items:
      oneOf:
        - $ref: "#/definitions/BillingSelf"
        - $ref: "#/definitions/BillingInsurance"
        - $ref: "#/definitions/BillingInstitutional"
  
  BillingInsurance:
    title: Insurance Billing
    additionalProperties: false
    type: object
    properties:
      billing_type:
        type: string
        title: Billing Type
        default: INSURANCE
        enum: 
          - INSURANCE
      insurance:
        type: array
        minItems: 1
        maxItems: 2
        items:
          $ref: "#/definitions/Insurance"
    required:
      - billing_type
      - insurance
  
  BillingSelf:
    title: Self-Pay Billing
    additionalProperties: false
    type: object
    properties:
      billing_type:
        type: string
        title: Billing Type
        default: SELF
        enum: 
          - SELF
      stripe_paymentintent_id:
        type: string
      promo_code:
        type: string
    required:
      - billing_type
  
  BillingInstitutional:
    title: Institutional Billing
    additionalProperties: false
    type: object
    properties:
      billing_type:
        type: string
        title: Billing Type
        default: INSTITUTIONAL
        enum: 
          - INSTITUTIONAL
      billing_code:
        type: string
        title: Billing Code
        description: Institutional code for billing
    required:
      - billing_type

  CNAVariationClassification:
    type: object
    additionalProperties: false
    required:
      - classification
      - evidence
    properties:
      classification:
        anyOf:
          - $ref: 'core.json#/definitions/ACMGClassification'
          - const: "NEGATIVE"
      evidence:
        type: array
        items: 
          type: string
        examples:
          - The individual harbors one copy (heterozygous) of a partial deletion 
            of the chr15q11.2 region, which may be associated with 15q11.2 BP1\u2013BP2 
            microdeletion syndrome.
          - The individual harbors one copy (heterozygous) of a 'pathogenic' variant in the PRKN gene, 
            which has been shown to be associated with parkin type of early-onset Parkinson disease (PARK-Parkin).
      genetic_event:
        $ref: 'core.json#/definitions/GeneticEventType'
      chromosome_region:
        $ref: 'core.json#/definitions/ChromosomeRegion'
      cytoband:
        $ref: 'core.json#/definitions/Cytoband'
      iscn_nomenclature:
        $ref: 'core.json#/definitions/ISCNNomenclature'
      size_mb:
        type: number
        examples:
          - 0.65
          - 2.35
      number_of_genes:
        type: integer
        examples:
          - 6
          - 25


  File:
    type: object
    required:
      - uri
      - mimetype
      - sha512
    properties:
      uri:
        type: string
      mimetype:
        type: string
      description:
        type: string
      sha512:
        type: string
        pattern: "^[0-9a-fA-F]{128}$"
    examples:
      - uri: "s3://somebucket/path/to/report.json"
        description: "Report in JSON format"
        mimetype: "application/json"
        sha512: "1b3c34b32bba4ece72a7b9a1ee53359fe7238be5986984463b5da41baf3b53bce66c87d7f5557021c553a1bbeac175eac2b4923329b993fba11a93502c256912"
      - uri: "s3://somebucket/path/to/report.pdf"
        description: "Report in PDF format"
        mimetype: "application/pdf"
        sha512: "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e"
      - uri: "s3://somebucket/path/to/SM123.R1.fastq.gz"
        description: "R1 FastQ file"
        mimetype: "application/x.seq-na-fastq;type=paired_end;direction=R1"
        sha512: "3ef109fe55e194a0f37b5936405dcf2b96ce7eeb8891d59650c708d26f256d018fd8f98c6efb7da8f85029a3708e34f86a54e700ba3b36fb0967aa869ed37915"

  Gene:
    type: object
    additionalProperties: false
    properties:
      ncbi_gene_id:
        title: NCBI Gene ID
        type: string
      primary_symbol:
        title: Primary Symbol
        type: string
      alternate_symbols:
        title: Alternate Symbols
        type: array
        items:
          type: string
        uniqueItems: true
      references:
        title: Gene References
        type: array
        items:
          $ref: '#/definitions/Reference'
    examples:
      - ncbi_gene_id: 672
        primary_symbol: 'BRCA1'
        alternate_symbols: ["BRCAI", "BRCC1", "FANCS", "IRIS", "PNCA4", "PSCP"]
        references: 
          - type: "pubmed"
            value: "123456"

  Genotype:
    type: object
    additionalProperties: false
    properties:
      gene_symbol:
        type: string
        examples:
          - "CYP2B6"
          - "CYP2C19"
          - "CYP2D6"
      haplotypes:
        type: string
        examples:
          - "*3/*4"
          - "*5/*17"
          - "*1/*8"
          
  PGxFinding:
    type: object
    additionalProperties: false
    properties:
      raw_call:
        type: string
        example: "*4/*6"
      rsid_based:
        type: boolean
        example: false
      activity_score:
        type: number
        example: 1.0
      genotype:
        $ref: '#/definitions/Genotype'
      gene_phenotype:
        $ref: 'core.json#/definitions/PGxGenePhenotype'
      reference:
        $ref: '#/definitions/Reference'

  Reference:
    description: >-
      Stores a reference or citation to external data

      The following types of Reference are supported:

        * `doi`: stores a refernece to a [Digital Object Identifier](https://www.doi.org/). **NOTE: pubmed should be preferred over doi for scientific publications.**
        * `pubmed`: stores a reference to a [PubMed](https://pubmed.ncbi.nlm.nih.gov/) identifier as the `value`.  The PubMed identifier may be replaced with the publication title, authors, etc. during rendering. 
        * `url`: stores a reference to a website (typically starting with `https:`).

      The `display` property, if set, contains text that will be used when representing the reference in written docuemnts. 
    type: object
    additionalProperties: false
    required: ["type", "value"]
    properties:
      display:
        title: Display
        description: Text to display for reference
        type: string
      type:
        title: Type
        type: string
        enum: ['doi', 'pubmed', 'url']
      value:
        title: Value
        type: string
      accessed_at:
        title: Accessed At
        oneOf:
          - $ref: 'core.json#/definitions/Date'
            title: Date
          - $ref: 'core.json#/definitions/UTCTimestamp'
            title: Datetime
    examples:
      - type: "doi"
        value: "10.1007/10753.1573-2576"
        display: "Inflammation"
      - type: "pubmed"
        value: "123456"
      - type: "url"
        value: "https://cpicpgx.org/guidelines/cpic-guideline-for-proton-pump-inhibitors-and-cyp2c19/"
        display: "CPIC CYP2C19 Guidelines"
        accessed_at: '2018-11-13T20:20:39+00:00'

  Lab:
    type: object
    additionalProperties: false
    properties:
      name:
        type: string
      address:
        $ref: '#/definitions/Address'
      clia_number:
        type: string
      cap_number:
        type: string
      directors:
        type: array
        items:
          $ref: '#/definitions/LabDirector'
      product_mapping:
        description: >-
          Maps internal sequencing protocols to their corresponding product id at the lab.
        type: object
        propertyNames:
          $ref: './core.json#/definitions/SequencingProtocol'
        additionalProperties:
          type: string
    required:
      - name
    examples:
      - name: MyOme
        address: 
          city: San Carlos
          country: USA
          postal_code: "94070"
          region: CA
          street_address: "930 Brittan Ave"
        clia_number: null
        cap_number: null
        directors:
          - _id: I/daea778e-11eb-6447
            email: ford@myclinic.com
            fax: 415-555-1212
            name:
              first: Ford
              last: Prefect
              title: Dr.
            phone: +1-415-555-1212
        product_mapping:
          'HC_WGS': 'C_WGS'
  
  ProductDataCAD:
    type: object
    title: "Inputs for IPRS CAD"
    additionalProperties: false
    required:
      - smoking
      - diabetes
      - cholesterol
      - blood_pressure
    properties:
      smoking:
        $ref: './requisition_observations/smoking.json'
      diabetes:
        $ref: './requisition_observations/diabetes.json'
      cholesterol:
        $ref: './requisition_observations/cholesterol.json'
      blood_pressure:
        $ref: './requisition_observations/blood_pressure.json'
  
  ProductDataPR41003:
    type: object
    title: "Inputs for IPRS Breast Cancer"
    description: "Additional data needed for product ID PR41003"
    additionalProperties: false
    properties:
      weight:
        $ref: './requisition_observations/weight.json'
      height:
        $ref: './requisition_observations/height.json'
      ashkenazi_jewish:
        $ref: './requisition_observations/ashkenazi_jewish.json'
      tyrer_cuzick_inputs:
        $ref: './requisition_observations/tyrer_cuzick_inputs.json'
  
  ProductDataPR41003WithDependencies:
    type: object
    title: "Inputs for IPRS Breast Cancer"
    description: "Additional data needed for product ID PR41003"
    additionalProperties: false
    properties:
      weight:
        $ref: './requisition_observations/weight.json'
      height:
        $ref: './requisition_observations/height.json'
      ashkenazi_jewish:
        $ref: './requisition_observations/ashkenazi_jewish.json'
      tyrer_cuzick_inputs:
        $ref: './requisition_observations/tyrer_cuzick_inputs_with_dependencies.json'
  
  ProductDataPR4001Empower:
    type: object
    description: Additional data needed for product ID PR4001 with TC outputs and a data sample
    required:
      - tc_data
      - data_files
      - data_sample_info
    properties:
      tc_data:
        type: object
        description: Extra data required for computation. The content requirements depend on the selected product ID.
        additionalProperties: false
        required:
          - five_year_risk
          - lifetime_risk
          - n_first_degree_affected
        properties:
          five_year_risk:
            description: Five year risk score in decimal format.
            type: number
            minimum: 0
            maximum: 1
          lifetime_risk:
            description: Lifetime year risk score in decimal format.
            type: number
            minimum: 0
            maximum: 1
          n_first_degree_affected:
            description: Number of first degree
            type: integer
      data_files:
        type: array
        items:
          type: object
          $ref: "#/definitions/File"
      data_sample_info:
        type: object
        additionalProperties: false
        required:
          - collection_date
          - received_date
          - sample_type
        properties:
          sample_type:
            type: string
            enum: 
              - "DATA"
          collection_date:
            type: string
            pattern: "[12]\\d{3}-[01]\\d-[0123]\\d"
          received_date:
            type: string
            pattern: "[12]\\d{3}-[01]\\d-[0123]\\d"
    example:
      tc_data:
        five_year_risk: 0.012
        lifetime_risk: 0.022
        n_first_degree_affected: 2
      data_files:
        - uri: "s3://bucket/R1.fastq"
          sha512: 3b7fc7cc370707c1df045c35342f3d64ea7076
          description: "R1 Fastq sequence"
          mimetype: "application/x.seq-na-fastq;type=paired_end;direction=R1"
        - uri: "s3://bucket/R2.fastq"
          sha512: 3b7fc7cc370707c1df045c35342f3d64ea7076
          description: "R2 Fastq sequence"
          mimetype: "application/x.seq-na-fastq;type=paired_end;direction=R2"
      data_sample_info:
        sample_type: "DATA"
        collection_date: "2022-12-21"
        received_date: "2022-12-23"

  ProductDataT2D:
    type: object
    title: "Inputs for IPRS T2D"
    additionalProperties: false
    required:
      - smoking
      - glucose
      - triglyceride
      - cholesterol
      - blood_pressure
      - diabetes_family_history
      - body_mass_index
      - waist_circumference
    properties:
      smoking:
        $ref: './requisition_observations/smoking.json'
      glucose:
        $ref: './requisition_observations/glucose.json'
      triglyceride:
        $ref: './requisition_observations/triglyceride.json'
      cholesterol:
        $ref: './requisition_observations/cholesterol.json'
      blood_pressure:
        $ref: './requisition_observations/blood_pressure.json'
      diabetes_family_history:
        $ref: './requisition_observations/diabetes_family_history.json'
      body_mass_index:
        $ref: './requisition_observations/body_mass_index.json'
      waist_circumference:
        $ref: './requisition_observations/waist_circumference.json'

  Signature:
    type: object
    additionalProperties: false
    properties:
      image:
        type: string
        description: >-
          base64 encoded data url
          Tip: Generate with `convert signature.png -quality 70 -geometry 400x400 inline:gif:-`
        examples:
          - data:image/gif;base64,R0lGODlhZAASAPQAAAICAgMDAwQEBAUFBQYGBgcHBwgICAkJCQoKCgsLCwwMDA0NDQ4ODg8PDxAQEBERERISEhMTExQUFBUVFRYWFhcXFxgYGBkZGRoaGhsbGxwcHB4eHiAgIAAAAAAAAAAAACH5BAEAAB0AIf8LSW1hZ2VNYWdpY2sOZ2FtbWE9MC40NTQ1NDUALAAAAABkABIAAAX+YCeOZGmeaKqubOuaETRJlPXe+AhBTJT/EkkJ8iumIg6fSGhsOZikyaN5aYoelRLDqqoIlaRFU5IYEzuTUZmLkmQ751HDenj/HBkRhblln8AdFCQNaUYSB0aFIj4VcysLVTlTOggPVQ+AIhcLiC0JcVYLTywKIgygLJkKjgeRJBZzCCSTJQsIBiQJBg4bORayIxMOJ2IdoyIWCcM3jg0VriPDD8AdBwUlFGIHjh0REYKTgi7LIg6lYL3c3B0FNnYsEMpgGCTDDgFnDBULFA0LWD4iCOC2ZQqRBQvSmKN3JFipDms6SIjQp9sIBhSyZFLxgJYIhiImUHCwRUJFMASJKDBQsMGGiAYPEJFJc8EBkQkBT0BRkGCBAkUOAJDr8GbKhT0iEjAoBG3Exg4uKVQyhUrOAEccZq1o9FRcB48iKhR4KGdJBzETF/iwwEDtCUUlXPr5oWgBlJfeRmg4qyTCgjfrUng9AXLujTzBogXu0HZwjqevaEiQYRhHBggkK0fRzLmz58+fQwAAOw==
      user:
        type: string
        examples:
          - 'U/61be-4d38-644f'
      name:
        $ref: '#/definitions/Name'
        examples:
          - first: Random
            last: Person
      email:
        type: string
        format: email
        examples:
          - random.person@somelab.com
      utc_timestamp:
        $ref: 'core.json#/definitions/UTCTimestamp'

  ReportNextSteps:
    title: Next Steps
    type: array
    items: 
      type: string
    example:
      - Women with an estimated lifetime breast cancer risk of 20% or higher should speak with their healthcare provider about American Cancer Society (ACS) guidelines for increased breast cancer surveillance as outlined below, as well as published recommendations for risk-reducing agents and comprehensive risk assessment.
      - Annual mammograms starting at age 40 or 10 years younger than the earliest breast cancer diagnosis in the family (but no earlier than age 30)\n
      - Annual breast MRI starting at age 40 or 10 years younger than the earliest breast cancer diagnosis in the family (but no earlier than age 25)\n
      - These results should be interpreted in the context of the individual's personal medical history and family history. The patient's female relatives may wish to speak with their healthcare provider to undergo a personalized risk assessment.

  PRSNextSteps:
    title: PRS Next Steps
    type: object
    description: "Specifies next steps for a given risk level."
    properties:
      general_guidance:
        type: string
        description: "General guidance for this PRS type, regardless of risk."
      risk_level_specific:
        type: string
        description: "Risk-level-specific guidance."
    required:
      - general_guidance
      - risk_level_specific

  RareDiseaseVariation:
    type: object
    additionalProperties: false
    properties:
      hgvs_g_38:
        title: HGVS (g.) - GRCh38
        type: ["string", "null"]
        $ref: 'core.json#/definitions/HGVSExpressionOrNone'
      hgvs_g_37:
        title: HGVS (g.) - GRCh37
        type: ["string", "null"]
        $ref: 'core.json#/definitions/HGVSExpressionOrNone'
      hgvs_t:
        title: HGVS (c.)
        type: ["string", "null"]
        $ref: 'core.json#/definitions/HGVSExpressionOrNone'
      hgvs_p:
        title: HGVS (p.)
        type: ["string", "null"]
        $ref: 'core.json#/definitions/HGVSExpressionOrNone'
      display:
        title: Display
        type: ["string", "null"]
      chromosome_region:
        title: Chromosome Region
        $ref: 'core.json#/definitions/ChromosomeRegion'
    required: [display]
    examples:
      - hgvs_g_38: NC_000017.11:g.43045685T>C
        hgvs_g_37: NC_000017.11:g.43045685T>C
        hgvs_t: NM_007294.4(BRCA1):c.5585A>G
        hgvs_p: NP_009225.1:p.His1862Arg
        display: NM_007294.4(BRCA1):c.5585A>G (p.His1862Arg)
        chromosome_region: chr17:1000-2000

  SampleRequest:
    type: object
    title: Sample Request
    properties:
      send_kit:
        title: Send Kit
        type: boolean
      send_kit_address:
        $ref: '#/definitions/Address'
      type:
        $ref: "core.json#/definitions/SampleType"
    required: ['send_kit', 'type']
    # 'type' is unconditionally required by BPMN to start processes at the moment
    # dependencies:
    #   send_kit:
    #     oneOf:
    #       - properties:
    #           send_kit:
    #             enum:
    #               - false
    #       - properties:
    #           send_kit:
    #             enum:
    #               - true
    #         required:
    #           - type
    examples:
      - type: 'Saliva'
        send_kit: true
        send_kit_address:
          city: San Carlos
          country: USA
          postal_code: "94070"
          region: CA
          street_address: "930 Brittan Ave"

  Supersedes:
    type: object
    additionalProperties: false
    properties:
      report_id:
        $ref: "ids.json#/definitions/ReportId"
      report_date:
        $ref: "core.json#/definitions/Date"
      supersede_type:
        $ref: "core.json#/definitions/SupersedeType"
      changes:
        type: array
        items:
          type: object
          properties:
            original:
              type: string
            revised:
              type: string
        example:
          - original: "a negative report"
            revised: "a pathogenic BRCA2 report"
          - original: "sample ID SM-12345"
            revised: "sample ID SM-67890"


  Variation:
    type: object
    additionalProperties: false
    properties:
      hgvs_g:
        title: HGVS (g.) - GRCh37
        $ref: 'core.json#/definitions/HGVSExpression'
      hgvs_g_38:
        title: HGVS (g.) - GRCh38
        type: ["string", "null"]
        $ref: 'core.json#/definitions/HGVSExpressionOrNone'
      hgvs_t:
        title: HGVS (c.)
        $ref: 'core.json#/definitions/HGVSExpression'
      hgvs_p:
        title: HGVS (p.)
        $ref: 'core.json#/definitions/HGVSExpression'
      display:
        title: Display
        type: string
    required: [display]
    examples:
      - hgvs_g: NC_000017.11:g.43045685T>C
        hgvs_g_38: NC_000017.11:g.43045685T>C
        hgvs_t: NM_007294.4(BRCA1):c.5585A>G
        hgvs_p: NP_009225.1:p.His1862Arg
        display: NM_007294.4(BRCA1):c.5585A>G (p.His1862Arg)
  
  VariationClassification:
    type: object
    additionalProperties: false
    required:
      - classification
    properties:
      disease:
        title: Disease
        type: string
        examples:
          - PMS2 is associated with...
      variation:
        title: Variation
        $ref: '#/definitions/Variation'
      gene:
        title: Gene
        $ref: '#/definitions/Gene'
      classification:
        title: ACMG Classification
        anyOf:
          - $ref: 'core.json#/definitions/ACMGClassification'
          - const: "NEGATIVE"
      inheritance:
        $ref: 'core.json#/definitions/Inheritance'
      zygosity:
        $ref: 'core.json#/definitions/Zygosity'
      evidence:
        title: Evidence
        type: string
        examples:
          - 
            This variant has been seen in % of the individuals with
            condition. Has been observed to segreate with disease in at
            least on ene condition.
  
            For these reasons the variant has been classified as pathogenic.
  
            * This variant has been seen in XXX% of the individuals with
              condition. Has been observed to segreate with disease in at
              least on econdition.
            * For these reasons the variant has been classified as pathogenic.
      references:
        title: References
        type: array
        items:
          $ref: '#/definitions/Reference'

  LabDirector:
    type: object
    required:
      - name
      - npi
    properties:
      name:
        $ref: "#/definitions/Name"
      npi:
        $ref: "core.json#/definitions/NPI"


  ############################################################################
  # utility types

  Address:
    type: object
    additionalProperties: false
    properties:
      street_address:
        type: string
        title: Street Address
        description: Number and street
      street_address_2:
        type: string
        title: Street Address Line 2
      city:
        type: string
        title: City
      region:
        type: string
        title: Region
        description: State, province, or other country-specific region
      postal_code:
        type: string
        title: Postal Code
        description: Country-specific code for geographic districts
      country:
        type: string
        title: Country
        description: Country name or abbreviation
    required:
      - street_address
      - city
      - region
      - postal_code
    examples:
      - street_address: '930 Brittan Ave'
        city: 'San Carlos'
        region: 'CA'
        postal_code: '94070'
        country: 'USA'

  ContactInfo:
    type: object
    additionalProperties: false
    properties:
      address:
        title: Address
        $ref: '#/definitions/Address'
      email:
        $ref: 'core.json#/definitions/EmailAddress'
      phone:
        type: string
        title: Phone Number
      fax:
        type: string
        title: Fax Number

  Demographics:
    type: object
    title: Demographics
    properties:
      dob:
        $ref: 'core.json#/definitions/Date'
        title: Date of Birth
        description: 'mm/dd/yyyy'
      sex:
        $ref: 'core.json#/definitions/BiologicalSex'
        title: Sex
      gender:
        $ref: 'core.json#/definitions/Gender'

  Insurance:
    title: 
      Insurance information
    type: object
    required:
      - policyholder_name
      - company
      - member_id
      - relationship_to_policyholder
    properties:
      policyholder_name:
        title: Policy Holder Name
        $ref: "#/definitions/Name"
        required:
          - first
          - last
      company:
        title: Name of the insurance company
        type: string
      phone:
        title: Insurance company phone
        type: string
      member_id:
        title: Insurance member ID
        type: string
      prior_auth_number:
        title: Prior-authorization number
        type: string
      relationship_to_policyholder:
        title: "Patient Relationship to Policyholder"
        description: ""
        $ref: "core.json#/definitions/Relationship"
      relationship_to_policyholder_other:
        title: "Patient Relationship to Policyholder Other: "
        type: string

  Link:
    type: object
    properties:
      uri:
        type: string
        format: uri
      display:
        type: string
  Name:
    type: object
    title: Name
    additionalProperties: false
    properties:
      first:
        type: string
        title: First
      middle:
        type: string
        title: Middle
      last:
        type: string
        title: Last
      credentials:
        type: string
        title: Credentials
        description: "e.g. M.D., Ph.D."
    examples:
      - first: 'Zaphod'
        middle: 'Vogon'
        last: 'Beeblebrox'
        credentials: 'M.D., Ph.D.'

  ToplineFinding:
    properties:
      finding:
        title: Finding
        anyOf:
          - $ref: "core.json#/definitions/MonogenicToplineFinding"
          - $ref: "core.json#/definitions/PRSToplineFinding"
          - $ref: "core.json#/definitions/PGxImpactToplineFinding"
          - $ref: "core.json#/definitions/RareDiseaseToplineFinding"
        type: string
      text:
        title: Text
        type: string
    required:
      - finding
      - text

  Text:
    description: >-
      NOT IN USE YET
    type: object
    properties:
      format:
        type: string
        enum: ["plain", "markdown"]
        default: "plain"
      value:
        type: string

  LogItem:
    type: object
    additionalProperties: false
    properties:
      facility:
        type: string
      ts:
        $ref: 'core.json#/definitions/UTCTimestamp'
      level:
        $ref: 'core.json#/definitions/LogLevel'
      text:
        type: string
    examples:
      - facility: 'pipeline'
        level: 'WARNING'
        ts: '2018-11-13T20:20:39+00:00'
        text: 'oops!'
      - facility: 'secondary'
        level: 'INFO'
        ts: '2018-11-13T20:20:39+00:00'
        text: 'Sample is not human!'

  Consent:
    type: object
    properties:
      type:
        $ref: 'core.json#/definitions/ConsentType'
      protocol_id:
        type: string
