Skip to content

Happy path

This page describes how a client places an order with BIOS when every step succeeds.

Note

The client must complete setup before it starts this scenario.

Sequence

---
config:
  sequence:
    actorMargin: 26
    width: 96
    height: 44
    diagramMarginX: 12
    diagramMarginY: 12
---
sequenceDiagram
  participant Client
  participant API as BIOS API
  participant Webhook as Client Webhook<br/>Endpoint
  participant S3
  participant BIOS
  Client->>API: 1a. POST /cases
  API->>BIOS: 1b. Create case
  API-->>Client: 1c. 200 OK with BIOS IDs
  loop For each VCF
    Client->>API: 2a. POST /cases/{case_id}/<br/>requirements/vcfs/upload
    API-->>Client: 2b. 200 OK with upload URL
    Client->>S3: 2c. Upload VCF
  end
  Client->>API: 3a. POST /cases/{case_id}/submit<br/>(all data uploaded)
  API->>S3: 3b. Check that the case files exist
  API->>BIOS: 3c. Mark case as submitted
  API-->>Client: 3d. 200 OK
  BIOS->>BIOS: 4a. VCF sanity checks
  BIOS->>Webhook: 4b. case_sanity_checks_passed event
  BIOS->>BIOS: 5a. Classify variants<br/>and generate report
  opt Case sent for manual review
    BIOS->>Webhook: 5b. case_sent_for_manual_review event
  end
  BIOS->>Webhook: 5c. report_ready event
  Client->>API: 6a. GET /cases/{case_id}/<br/>reports/{report_id}
  API-->>Client: 6b. 200 OK with download URLs
  Client->>S3: 6c. Download structured report data and PDF

Steps

  1. Create a case.
    1. The client calls the POST /cases endpoint of the BIOS API.
    2. The BIOS API creates the case in BIOS.
    3. The BIOS API returns a 200 response with the BIOS IDs for the case.
  2. Upload the VCFs. For each VCF:
    1. The client calls the POST /cases/{case_id}/requirements/vcfs/upload endpoint of the BIOS API.
    2. The BIOS API returns a 200 response with an upload URL.
    3. The client uploads the VCF to S3 at that URL.
  3. Submit the case.
    1. The client calls the POST /cases/{case_id}/submit endpoint of the BIOS API to say it has uploaded all the data for the case.
    2. The BIOS API checks that the case files exist in S3.
    3. The BIOS API marks the case as submitted in BIOS.
    4. The BIOS API returns a 200 response.
  4. BIOS checks the VCFs.
    1. BIOS runs sanity checks on the VCFs.
    2. BIOS sends a case_sanity_checks_passed event to the client's webhook endpoint.
  5. BIOS processes the case.
    1. BIOS classifies the variants and generates the report.
    2. If BIOS sends the case for manual review, BIOS sends a case_sent_for_manual_review event to the client's webhook endpoint.
    3. BIOS sends a report_ready event to the client's webhook endpoint.
  6. Download the report.
    1. The client calls the GET /cases/{case_id}/reports/{report_id} endpoint of the BIOS API.
    2. The BIOS API returns a 200 response with a download URL for each report file.
    3. The client downloads the structured report data and the PDF from S3.