title: "BaseRequisition"
type: "object"

properties:
  sample_request:
    $ref: '../structs.json#/definitions/SampleRequest'
  subject:
    $ref: './Subject.json'
  remote_mrn:
    type: string
    title: Patient ID MRN
    description: Clinic's Medical Record Number
  billing:
    minItems: 1
    maxItems: 2
    $ref: '../structs.json#/definitions/Billing'
  consents_granted:
    type: array
    title: Consents
    minItems: 3
    maxItems: 3
    uniqueItems: true
    items:
      anyOf:
      - $ref: "../ids.json#/definitions/ConsentUri"
        title: Signed Physician Attestation
        enum:
        - myome:consent:GENERAL
      - $ref: "../ids.json#/definitions/ConsentUri"
        title: Signed Patient Acknowledgement
        enum:
        - myome:consent:PATIENT_ACKNOWLEDGEMENT
      - $ref: "../ids.json#/definitions/ConsentUri"
        title: Patient consents to being contacted by MyOme and affiliates (unchecked box)
        enum:
        - myome:consent:PATIENT_CONTACT_CONSENT
  clinicians:
    type: array
    title: Clinicians
    minItems: 1
    items:
      type: object
      properties:
        label:
          type: string
        id:
          $ref: "../core.json#/definitions/NPI"
  product_ids:
    type: array
    title: Products
    minItems: 1
    uniqueItems: true
    items:
      anyOf:
      - $ref: "../ids.json#/definitions/ProductId"
        title: Proactive Health Report
        enum:
        - PR-2019
      - $ref: "../ids.json#/definitions/ProductId"
        title: Pharmacogenomics Report
        enum:
        - PR-3009
  pre_test_counseling:
    title: Pre-Test Genetic Counseling
    type: string
    $ref: "../core.json#/definitions/PreTestCounselingType"
    default: NO_COUNSELING
  post_test_counseling:
    title: Post-Test Genetic Counseling
    type: string
    $ref: "../core.json#/definitions/PostTestCounselingType"
    default: NO_COUNSELING
  indications:
    title: Clinical Phenotype
    description: Indicate Clinical Phenotype
    type: string
  trf:
    title: TRF
    type: 'string'
    format: 'data-url'
  additional_files:
    title: Additional Files
    type: array
    uniqueItems: true
    items:
      type: 'string'
      format: 'data-url'
required:
  - clinicians
  - consents
  - subject
  - sample_request
  - billing
  - trf
additionalProperties: false
