Skip to content

Instantly share code, notes, and snippets.

@mherman22
Created May 29, 2026 16:20
Show Gist options
  • Select an option

  • Save mherman22/e6ffb817123ee5ed775e0e077c031acd to your computer and use it in GitHub Desktop.

Select an option

Save mherman22/e6ffb817123ee5ed775e0e077c031acd to your computer and use it in GitHub Desktop.
Feature: Vector Pool Reflex Rule Verification
As a Lab Supervisor
I want reflex tests to fire only from confirmed pool results
So that unconfirmed results do not trigger premature downstream testing
Background:
Given a vector order exists with accession number "DEV01260000000000001"
And the order contains a pool of 6 mosquitoes
And the pool panel includes "Malaria Parasite Detection" and "Dengue Virus Detection"
# ─────────────────────────────────────────────────────────────
# PART A — Malaria confirmed, Dengue not confirmed
# ─────────────────────────────────────────────────────────────
Scenario: VS-01 fires after Malaria is confirmed; VS-02 does not fire because Dengue is unconfirmed
Given pool-level results have been entered:
| Test | Result |
| Malaria Parasite Detection | Positive |
| Dengue Virus Detection | Positive |
And "Malaria Parasite Detection" has been validated and is Finalized
And "Dengue Virus Detection" has NOT been validated
When the lab tech confirms "Malaria Parasite Detection" for all 6 vectors
Then a green "Results Partially Confirmed" banner appears on the lot
And the banner lists "✓ Malaria Parasite Detection: Positive"
And "Malaria Parasite Detection" shows as 6 individual flat rows in Results Entry
And "Dengue Virus Detection" still shows as "Pool of 6" in Results Entry
And a new pool-level analysis "Pan-Plasmodium CSP ELISA" is created
And a new pool-level analysis "Pan-Plasmodium 18S rRNA PCR" is created
But no "DENV NS1 Antigen ELISA" analysis is created
And no "DENV Pan-serotype RT-PCR" analysis is created
Scenario: Split preview shows only copied tests when Malaria is confirmed but Dengue is not
Given "Malaria Parasite Detection" has been confirmed for all 6 vectors
And "Dengue Virus Detection" has NOT been confirmed
When the lab tech opens the split panel for the pool
Then the reflex preview shows the following as COPIED:
| Test |
| Malaria Parasite Detection |
| Dengue Virus Detection |
| Pan-Plasmodium 18S rRNA PCR(Mosquito)|
| Pan-Plasmodium CSP ELISA(Mosquito) |
And no new reflex entries appear in the preview
And no tip about "VS-01 only applies to individual organisms" is shown
And no tip about "VS-02 only applies to individual organisms" is shown
# ─────────────────────────────────────────────────────────────
# PART B — Dengue also confirmed
# ─────────────────────────────────────────────────────────────
Scenario: VS-02 fires after Dengue is confirmed
Given "Malaria Parasite Detection" has already been confirmed for all 6 vectors
And "Dengue Virus Detection" has been validated and is Finalized
When the lab tech confirms "Dengue Virus Detection" for all 6 vectors
Then the green banner lists both:
| Confirmed Test | Result |
| Malaria Parasite Detection | Positive |
| Dengue Virus Detection | Positive |
And "Dengue Virus Detection" shows as 6 individual flat rows in Results Entry
And a new pool-level analysis "DENV NS1 Antigen ELISA" is created
And a new pool-level analysis "DENV Pan-serotype RT-PCR" is created
Scenario: Split preview is clean after both Malaria and Dengue are confirmed
Given both "Malaria Parasite Detection" and "Dengue Virus Detection" have been confirmed for all 6 vectors
When the lab tech opens the split panel for the pool
Then the reflex preview shows the following as COPIED:
| Test |
| Malaria Parasite Detection |
| Dengue Virus Detection |
| Pan-Plasmodium 18S rRNA PCR(Mosquito)|
| Pan-Plasmodium CSP ELISA(Mosquito) |
| DENV NS1 Antigen ELISA(Mosquito) |
| DENV Pan-serotype RT-PCR(Mosquito) |
And no new reflex entries appear in the preview
And no individual-organism tip is shown for VS-01 or VS-02
# ─────────────────────────────────────────────────────────────
# PART C — Tier 2 chain
# ─────────────────────────────────────────────────────────────
Scenario: VR-01 fires after CSP ELISA is confirmed positive (Tier 2 chain)
Given "Pan-Plasmodium CSP ELISA" has been entered as Positive at pool level
And "Pan-Plasmodium CSP ELISA" has been validated and is Finalized
When the lab tech confirms "Pan-Plasmodium CSP ELISA" for all 6 vectors
Then a new pool-level analysis "P. falciparum species-specific PCR" is created
And a new pool-level analysis "P. vivax species-specific PCR" is created
And a new pool-level analysis "P. malariae species-specific PCR" is created
And a new pool-level analysis "P. malariae species-specific PCR" is created
And a new pool-level analysis "P. ovale species-specific PCR" is created
But no DENV serotyping tests are created
And no "DENV-1 RT-PCR" analysis is created
Scenario: VR-02 does not fire because DENV RT-PCR is not yet confirmed
Given "DENV Pan-serotype RT-PCR" exists at pool level with a Positive result
But "DENV Pan-serotype RT-PCR" has NOT been confirmed for all 6 vectors
When the lab tech confirms "Pan-Plasmodium CSP ELISA" for all 6 vectors
Then no "DENV-1 RT-PCR" analysis is created
And no "DENV-2 RT-PCR" analysis is created
And no "DENV-3 RT-PCR" analysis is created
And no "DENV-4 RT-PCR" analysis is created
# ─────────────────────────────────────────────────────────────
# PART D — Validation screen
# ─────────────────────────────────────────────────────────────
Scenario: Validation screen shows pool-level analyses before confirmation
Given results have been entered for "Malaria Parasite Detection" at pool level
And no confirmation has been performed
When the validator searches accession number "DEV01260000000000001" on the Validation screen
Then "Malaria Parasite Detection" appears as a pool-level row awaiting sign-off
And no individual member-level rows are shown
Scenario: Validation screen shows individual analyses after confirmation
Given "Malaria Parasite Detection" has been confirmed for all 6 vectors
And the 6 member-level analyses have TechnicalAcceptance status
When the validator searches accession number "DEV01260000000000001" on the Validation screen
Then 6 individual rows for "Malaria Parasite Detection" appear
And each row shows the individual vector's accession reference
And the pool-level "Malaria Parasite Detection" row is no longer shown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment