Skip to content

feat(microbiology): add foundations and order routing (OGC-782) - #3789

Open
pmanko wants to merge 22 commits into
spec/782-ogc-782-microbiology-mvp-specfrom
feat/782-ogc-782-microbiology-mvp-m7-release-surveillance-readiness
Open

feat(microbiology): add foundations and order routing (OGC-782)#3789
pmanko wants to merge 22 commits into
spec/782-ogc-782-microbiology-mvp-specfrom
feat/782-ogc-782-microbiology-mvp-m7-release-surveillance-readiness

Conversation

@pmanko

@pmanko pmanko commented Jun 27, 2026

Copy link
Copy Markdown
Member

Summary

First implementation layer for the OGC-782 routine bacteriology workflow.

Scope

  • Add microbiology workflow configuration to Test Catalog.
  • Add organism, antibiotic, AST panel, breakpoint, and culture-setup foundations.
  • Create the case and order-detail domain used by later workflow layers.
  • Route configured culture analyses into microbiology cases.
  • Provision test and demo scenarios through application services only, without SQL seeding, fixed primary keys, or DAO bypass.

Validation

  • Focused service, controller, integration, fixture-architecture, and ORM coverage.
  • Focused Test Catalog and microbiology component coverage.
  • Java formatting and direct-database fixture guardrails.

Stack And Documents

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4e33d1aaaa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@pmanko

pmanko commented Jun 27, 2026

Copy link
Copy Markdown
Member Author

MVP evidence vs mock comparison added:

specs/782-ogc-782-microbiology-mvp-spec/evidence/mock-comparison-2026-06-27.md

Key takeaway: the Playwright screenshots/video prove the behavioral MVP path through final release, but they are not mock-fidelity proof. The current UI is a functional vertical workbench, while the OpenELIS-work mocks describe a guided workflow shell with richer case progress, AST table, expert-review, critical-notification, and WHONET mapping/export surfaces.

I also flagged two concrete evidence/UX issues:

  • Some tall full-page screenshots show the sticky OpenELIS header mid-page, making the evidence hard to read.
  • After FINAL_RELEASED, the final release button remains visible/enabled-looking and should get a post-release state review.

@pmanko

pmanko commented Jun 27, 2026

Copy link
Copy Markdown
Member Author

Design-parity pass pushed in 23b577550.

What changed:

  • Reworked the microbiology case view into a mock-aligned workbench: progress rail, next-step callout, case-info strip, highlighted inoculation/setup card, separate timeline, isolate card, AST table, critical-communication card, and report/WHONET readiness cards.
  • Fixed post-final-release UX so the final release action is no longer offered after FINAL_RELEASED.
  • Refreshed the MVP evidence notes after comparing against the openelis-work case-workbench mock.

Validation run locally:

  • cd frontend && npm test -- MicrobiologyCaseView.test.jsx IsolatePanel.test.jsx AstEntryPanel.test.jsx CriticalCommunicationPanel.test.jsx ReportReadinessPanel.test.jsx
  • cd frontend && npm run pw:test -- playwright/tests/demo/core/ogc-782-microbiology-mvp.spec.ts --project=core-demo
  • cd frontend && npm run pw:test -- playwright/tests/demo/core/ogc-782-microbiology-mvp.spec.ts --project=core-demo-video

Updated local evidence:

  • Video: /Users/pmanko/.codex/worktrees/1c9d/OpenELIS-Global-2/frontend/test-results/demo-core-ogc-782-microbio-3f6cc-ual-AST-override-and-review-core-demo-video/video.webm
  • Bundle zip: /Users/pmanko/.codex/worktrees/1c9d/OpenELIS-Global-2/specs/782-ogc-782-microbiology-mvp-spec/evidence/mvp-checkpoint-2026-06-27.zip
  • Design-parity comparison: /tmp/ogc-782-mock-compare/design-parity-case-workbench-2026-06-27.png

Known remaining mock gaps are feature-depth gaps, not raw layout gaps: richer isolate ID, multi-row AST metadata, expert review queue, and WHONET mapping/export UI are still future slices.

@pmanko

pmanko commented Jun 27, 2026

Copy link
Copy Markdown
Member Author

Updated MVP visual/evidence polish in 16729a1c1.

What changed:

  • Slowed the guided Playwright walkthrough and added clearer step cards/context.
  • Switched evidence capture to focused viewport/card screenshots and added sticky-header scroll margin so captured cards are not clipped.
  • Replaced raw microbiology enums in the workbench with user-facing labels (Received, Bacteriology, Setup Recorded, In Progress, Reviewed, Final Released, etc.).
  • Locked AST controls after review so the reviewed state no longer implies post-review edits are open.
  • Refreshed the evidence notes under specs/782-ogc-782-microbiology-mvp-spec/evidence/.

Validated:

  • cd frontend && npm test -- MicrobiologyCaseView.test.jsx IsolatePanel.test.jsx AstEntryPanel.test.jsx CriticalCommunicationPanel.test.jsx ReportReadinessPanel.test.jsx -> 5 files / 7 tests passed.
  • cd frontend && npm run pw:test -- playwright/tests/demo/core/ogc-782-microbiology-mvp.spec.ts --project=core-demo-video -> 2 passed.
  • Key screenshots manually inspected for design parity/readability: overview, reviewed AST, final readiness.

Fresh local evidence:

  • Video: /Users/pmanko/.codex/worktrees/1c9d/OpenELIS-Global-2/frontend/test-results/demo-core-ogc-782-microbio-3f6cc-ual-AST-override-and-review-core-demo-video/video.webm
  • MP4 bundle: /Users/pmanko/.codex/worktrees/1c9d/OpenELIS-Global-2/specs/782-ogc-782-microbiology-mvp-spec/evidence/mvp-checkpoint-2026-06-27/videos/demo-core-ogc-782-microbio-3f6cc-ual-AST-override-and-review-core-demo-video.mp4
  • Bundle zip: /Users/pmanko/.codex/worktrees/1c9d/OpenELIS-Global-2/specs/782-ogc-782-microbiology-mvp-spec/evidence/mvp-checkpoint-2026-06-27.zip
  • Screenshots: /Users/pmanko/.codex/worktrees/1c9d/OpenELIS-Global-2/frontend/e2e-evidence/ogc-782-01-case-workbench-overview.png through ogc-782-08-final-released-readiness.png.

Known console noise remains the existing unrelated React Intl missing-message output for analyzer/nav labels during auth; the microbiology walkthrough itself passed.

@pmanko

pmanko commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

Addressed the three Codex review findings and the frontend Playwright CI failure in 07cd10b0e.

Fixes:

  • Final release now blocks when a case has an open critical communication with follow-up required. The readiness API also reports CRITICAL_FOLLOW_UP_REQUIRED, so the UI/readiness state does not claim ready and then fail only after click.
  • Final release now routes through MicroCaseStateService.advanceStage(... FINAL_RELEASED ...), so invalid transitions such as RECEIVED -> FINAL_RELEASED are rejected by the existing transition guard before release fields are set.
  • WHONET readiness now checks referenced MicroOrganism.whonetCode and MicroAntibiotic.whonetCode, not just local IDs. Missing export mappings produce ORGANISM_MAPPING_REQUIRED / ANTIBIOTIC_MAPPING_REQUIRED blockers.
  • Playwright CI failure root cause: pw-bucket-guard.mjs reads named bucket constants from playwright.config.ts, but core foundational specs were only listed inline in the core-app project. Added CORE_FOUNDATIONAL_TESTS and pointed core-app at it, so the guard can classify foundational/core/**/*.spec.ts.

Local validation:

  • mvn spotless:apply
  • mvn -Dtest=MicroCaseReadinessServiceTest,MicroReportReleaseServiceTest,MicroWhonetReadinessServiceTest test -> 12 tests passed.
  • cd frontend && npx prettier --write playwright.config.ts
  • cd frontend && npm run lint -> Playwright ESLint passed.
  • cd frontend && npm run pw:guard -> bucket guard passed.

@pmanko pmanko changed the title OGC-782 M7: release readiness OGC-782 Microbiology MVP implementation Jul 3, 2026
@pmanko
pmanko changed the base branch from feat/782-ogc-782-microbiology-mvp-m6-worklists-critical to spec/782-ogc-782-microbiology-mvp-spec July 3, 2026 22:48
@pmanko

pmanko commented Jul 25, 2026

Copy link
Copy Markdown
Member Author

Live AMR deployment and UAT checkpoint

  • Target: https://amr.openelis-global.org
  • Deployment: 20260725T003108Z-c44c3ad0ce35
  • Deployed app SHA: c44c3ad0ce35d1502d9ed217f3e26aa88e309dc1
  • Review-tooling SHA: 2cf9dd4e5794e2ce46a568c295d8093ae51bf33e
  • Scope: app; schema-affecting: false; health + route smoke: passed
  • Live Playwright: auth + feature 2 passed (6.6s); final evidence run 1 passed (4.0s)
  • Grist checklist: 10 stable steps, revision 364c75677839c0aed225ecfa75e5c0912c07840a1925a14c9dd30bf2ed2d7d95

Evidence: README · MP4 · overlay screenshot

Two follow-up signals are recorded, not hidden: all live Grist rows currently have required=false, and nested routes emit route-relative service-worker 404/MIME console noise. Neither blocked the tested workflow.

pmanko commented Jul 26, 2026

Copy link
Copy Markdown
Member Author

Follow-up pushed in 5a00513a4 after the live AMR UAT signal.

  • Fixed the production service-worker registration URL. The former relative ./service-worker.js resolved under nested microbiology case URLs; both normal registration and notification subscription now use the Vite application base.
  • Added serviceWorkerRegistration.test.js covering root and context-path asset URLs.
  • Integrated the already-green TypeScript toolchain commit from #3929 as 489b7ecae, so ongoing OGC-782 work uses the current compatible compiler/tooling while that focused PR completes review.

Validation:

  • npx vitest run src/serviceWorkerRegistration.test.js — 2 passed
  • targeted ESLint for the helper/test and Prettier for all touched files — passed
  • npm run build — passed

Note: linting the existing SlideOverNotifications.jsx independently still reports its pre-existing hook-order rule and unused-variable warnings; this change neither introduces nor suppresses them. Existing OGC-782 Playwright coverage continues to cover configured navigation and canonical deep-link URLs.

pmanko commented Jul 29, 2026

Copy link
Copy Markdown
Member Author

Live AMR redeployment and fixture-integrity checkpoint (0b88c8a08 docs the deployment; app runtime is 9d0c55b6f):

This supersedes the July 24 comment's optional-step and route-relative service-worker observations. Current review findings remain explicit in the evidence: received-case progress labels need semantic review, 15 legacy SQL-seeded demo rows remain, and the unrelated global notification subscription surface still logs fetch/JSON errors.

@pmanko

pmanko commented Aug 4, 2026

Copy link
Copy Markdown
Member Author

CI remediation pushed in 6f941e6 and 46ab388.\n\nRoot cause: legacy DBUnit tests truncate shared reference tables, leaving stale global status cache entries and no active Method for later microbiology integration tests.\n\nFix:\n- microbiology fixtures now provision their minimum status and Method prerequisites through the service layer\n- identifiers and status codes are generated; no SQL, DAO bypass, fixed primary keys, or migration\n- StatusOfSample duplicate detection now compares its numeric code as a numeric value instead of applying lower() to it\n- regression coverage includes stale-cache rollback and the exact ResultsValidationUtilityTest -> MicroCaseIntegrationTest order\n\nLocal verification:\n- mvn spotless:check\n- mvn clean install -Dspotless.check.skip=true\n- 4,660 tests, 0 failures, 0 errors, 14 skipped\n- WAR packaging completed successfully in 6m32s\n\nExternal AMR UAT remains independently blocked and is not represented as complete by this CI remediation.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

👋 Hi, @pmanko,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@pmanko
pmanko force-pushed the feat/782-ogc-782-microbiology-mvp-m7-release-surveillance-readiness branch from 56806f5 to d20e7c7 Compare August 5, 2026 19:50
Copilot AI lite review requested due to automatic review settings August 5, 2026 19:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@github-actions github-actions Bot removed the merge conflict Merge Conflicts label Aug 5, 2026
@pmanko
pmanko force-pushed the feat/782-ogc-782-microbiology-mvp-m7-release-surveillance-readiness branch from 2ff8b83 to 21ef783 Compare August 25, 2026 22:15
@pmanko pmanko changed the title OGC-782 Microbiology MVP implementation feat(microbiology): add foundations and order routing (OGC-782) Aug 25, 2026
@pmanko
pmanko force-pushed the feat/782-ogc-782-microbiology-mvp-m7-release-surveillance-readiness branch from 0642163 to 1726e85 Compare August 26, 2026 18:08
@github-actions github-actions Bot added the merge conflict Merge Conflicts label Aug 27, 2026
@github-actions

Copy link
Copy Markdown

👋 Hi, @pmanko,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge conflict Merge Conflicts

Projects

Development

Successfully merging this pull request may close these issues.

2 participants