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

title: 'Id types'
description: 'CURIE-like strings formats used for myome identifiers'
type: object

definitions:
  ClinicId:
    type: string
    pattern: '^CL-?([a-z]{3,5}-?)?\d+$'
    examples:
      - 'CL-0123456'
      - 'CL-dev-123456'
      - 'CL0123456'
      - 'CLdev123456'
  ClinicianId:
    type: string
    pattern: '^CN-?([a-z]{3,5}-?)?\d+$'
    examples:
      - 'CN-0123456'
      - 'CN-dev-0123456'
      - 'CN0123456'
      - 'CNdev0123456'
  ConfirmationId:
    type: string
    pattern: '^CF-?([a-z]{3,5}-?)?\d+$'
    examples:
      - 'CF-0123456'
      - 'CF-dev-0123456'
      - 'CF0123456'
      - 'CFdev0123456'
  ConsentUrn:
    type: string
    pattern: '^myome:consent:[A-Z0-9]+(-\d+\.\d+\.\d+)?$'
    examples:
      - myome:consent:GENERAL-0.1.4
      - myome:consent:PR2008-0.0.1
      - myome:consent:DNAVISIT
  DataSetId:
    type: string
    pattern: '^DS-?([a-z]{3,5}-?)?\d+$'
    examples:
      - 'DS-0123456'
      - 'DS-dev-0123456'
      - 'DS0123456'
      - 'DSdev0123456'
  EntityId:
    type: string
    pattern: '^[A-Z]{2}-?([a-z]{3,5}-?)?\d+$'
    examples:
      - 'RQ-0123456'
      - 'OR-0123456'
      - 'RQ-dev-0123456'
      - 'OR-dev-0123456'
      - 'RQ0123456'
      - 'OR0123456'
      - 'RQdev0123456'
      - 'ORdev0123456'
  IndividualId:
    type: string
    pattern: '^IN-?([a-z]{3,5}-?)?\d+$'
    examples:
      - 'IN-dev-123456'
      - 'IN-123456'
      - 'INdev123456'
      - 'IN123456'
  KitId:
    type: string
    pattern: '^KT-?([a-z]{3,5}-?)?\d+$'
    examples:
      - 'KT-0123456'
      - 'KT-dev-0123456'
      - 'KT0123456'
      - 'KTdev0123456'
  OrderId:
    type: string
    pattern: '^OR-?([a-z]{3,5}-?)?\d+$'
    examples:
      - 'OR-0123456'
      - 'OR-dev-0123456'
      - 'OR0123456'
      - 'ORdev0123456'
  ProductId:
    type: string
    description: A reference to an ordered product. 
    pattern: '^PR-?\d+$'
    examples:
      - 'PR-0123456'
      - 'PR0123456'
  ProductVersionId:
    type: string
    description: INTERNAL ONLY. A reference to a product version; the unversioned component is a `ProductId`. 
    pattern: '^PR-?\d+-\d+\.\d+\.\d+$'
    examples:
      - 'PR-0123456-0.0.1'
      - 'PR0123456-0.0.1'
  ReportId:
    type: string
    pattern: '^RP-?([a-z]{3,5}-?)?\d+$'
    examples:
      - 'RP-0123456'
      - 'RP-dev-0123456'
      - 'RP0123456'
      - 'RPdev0123456'
  RequisitionId:
    type: string
    pattern: '^RQ-?([a-z]{3,5}-?)?\d+$'
    examples:
      - 'RQ-0123456'
      - 'RQ-dev-0123456'
      - 'RQ0123456'
      - 'RQdev0123456'
  RunId:
    type: string
    pattern: '^RU-?([a-z]{3,5}-?)?\d+$'
    examples:
      - 'RU-0123456'
      - 'RU-dev-0123456'
      - 'RU0123456'
      - 'RUdev0123456'
  SampleId:
    type: string
    pattern: '^SM-?([a-z]{3,5}-?)?\d+$'
    examples:
      - 'SM-0123456'
      - 'SM-dev-0123456'
      - 'SM0123456'
      - 'SMdev0123456'
  SendoutId:
    type: string
    pattern: '^SO-?([a-z]{3,5}-?)?\d+$'
    examples:
      - 'SO-0123456'
      - 'SO-dev-0123456'
      - 'SO0123456'
      - 'SOdev0123456'
  WorkflowId:
    type: string
    pattern: '^myome:wf/'
    examples:
      - myome:wf/nf_pgr_sf/1.2.3
      - myome:wf/nf_fastq_to_bam/0123abc
  WorkorderId:
    type: string
    pattern: '^WO-?([a-z]{3,5}-?)?\d+$'
    examples:
      - 'WO-0123456'
      - 'WO-dev-0123456'
      - 'WO0123456'
      - 'WOdev0123456'

