frontend: pharmacy inventory, lab add-result & analysis charts

- Pharmacy: the sidebar entry now expands into Pharmacy + a new Inventory page
  (searchable medication stock with derived in-stock/low/out availability,
  backed by /api/inventory). Fix the dispensing-queue "Expiring" badge so it
  only flags courses ending within the next 7 days, not ones already elapsed.
- Lab "Add analysis result": the patient picker no longer lists patients until
  you type and supports arrow-key + Enter selection; the test field offers a
  catalog of common analyses with an Advanced option (custom analysis + ref
  range); submitted results now show immediately in a Recent results feed.
- Analysis: add a Live panel (real-time line chart) and replace the flat trend
  sparklines with bklit-ui area + bar charts (installed from the @bklit shadcn
  registry; chart CSS variables wired into the theme for light and dark).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Khalid Abdi
2026-06-12 19:22:07 +03:00
parent e2bcb2cfbc
commit 321a6298a4
81 changed files with 11538 additions and 67 deletions
+10
View File
@@ -10,6 +10,7 @@
},
"dependencies": {
"@base-ui/react": "^1.5.0",
"@number-flow/react": "^0.6.0",
"@radix-ui/react-use-controllable-state": "^1.2.2",
"@rive-app/react-webgl2": "^4.28.6",
"@streamdown/cjk": "^1.0.3",
@@ -21,6 +22,14 @@
"@tiptap/pm": "^3.25.0",
"@tiptap/react": "^3.25.0",
"@tiptap/starter-kit": "^3.25.0",
"@visx/curve": "^4.0.1-alpha.0",
"@visx/event": "^4.0.1-alpha.0",
"@visx/gradient": "^4.0.1-alpha.0",
"@visx/grid": "^4.0.1-alpha.0",
"@visx/pattern": "^4.0.1-alpha.0",
"@visx/responsive": "^4.0.1-alpha.0",
"@visx/scale": "^4.0.1-alpha.0",
"@visx/shape": "^4.0.1-alpha.0",
"@xyflow/react": "^12.10.2",
"ai": "^6.0.193",
"ansi-to-react": "^6.2.6",
@@ -28,6 +37,7 @@
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"d3-array": "^3.2.4",
"embla-carousel-react": "^8.6.0",
"framer-motion": "^12.40.0",
"i18next": "^26.3.1",