title: "ClinicianPortalRequisition"
type: "object"

properties:
  clinicians:
    type: array
    title: Clinicians
    description: Start typing to autocomplete, must select at least 1 clinician
    minItems: 1
    uniqueItems: true
    items:
      type: object
      properties:
        label:
          type: string
        id:
          type: string
          pattern: '^\d{9,10}-CL-?([a-z]{3,5}-?)?\d+$'
          # NPI-ClinicIdentifier
  preferred_report_delivery:
    $ref: "../core.json#/definitions/PreferredReportDeliveryMethod"
    default: EMAIL
  subject:
    $ref: './Subject.json'
  remote_mrn:
    type: string
    title: Patient ID MRN
    description: Clinic's Medical Record Number
    default: ""
  billing:
    $ref: './Billing.json'
  guardian:
    title: Parent or Guardian
    type: "object"
    properties:
      name:
        $ref: "../structs.json#/definitions/Name"
        title: Parent or Guardian Name
        default: {first: "", last: "", middle: ""}
      relationship_to_patient:
        title: Parent or Guardian Relationship to Patient
        type: string
        default: ""
        examples:
          - Mother
          - Father
          - Legal Guardian
  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
      - $ref: "../ids.json#/definitions/ProductId"
        title: Neurodevelopmental Delay Copy Number Analysis Report
        enum:
        - PR-5004
  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
    default: ""
  additional_files:
    title: Letter of Medical Necessity and Clinical Notes
    type: array
    uniqueItems: true
    items:
      type: 'string'
      format: 'data-url'
  consents_granted:
    type: array
    title: Consents
    minItems: 1
    maxItems: 1
    uniqueItems: true
    items:
      anyOf:
      - $ref: "../ids.json#/definitions/ConsentUri"
        title: Signed Physician Attestation
        description: By checking this box, the medical professional acknowledges that the individual/guardian authorized to make decisions for the individual (collectively, the Patient) has been supplied information regarding and consented to undergo the genetic testing ordered including genetic counseling by MyOme or its affiliates, substantially as set forth in the Informed Consent for Genetic Testing, and/or as required by applicable law, and the Patient has been informed that MyOme and its affiliates may notify them of clinical updates related to genetic test results (in consultation with the ordering medical professional). For orders originating outside the USA, the Patient has been informed that their personal information and specimen will be transferred to and processed in the USA.
        enum:
        - myome:consent:GENERAL
  sample_request:
    $ref: '../structs.json#/definitions/SampleRequest'
required:
  - consents_granted
  - subject
  - sample_request
  - billing
additionalProperties: false
