feat(medications): store a supplement's composition, read its label with the document AI, and carry it through backup and restore

This commit is contained in:
Marc-André Bombeck committed 2026-10-15 23:29:40 +02:00
1 parent 98d64c2052
commit eb3cc4237f
28 files changed
+1078 -97

No files matched your search

@@ -172,6 +172,8 @@ const RUN_QUEUED_BY: Record<DocumentAiRunKindValue, string> = {
DOCUMENT_SUMMARY: "src/app/api/documents/inbound/[id]/summary/route.ts",
DOCUMENT_SUGGEST: "src/app/api/documents/inbound/[id]/suggest/route.ts",
DOCUMENT_EXTRACT: "src/app/api/documents/inbound/[id]/extract/route.ts",
SUPPLEMENT_LABEL_EXTRACT:
"src/app/api/medications/[id]/ingredients/extract/route.ts",
};
describe("background run kinds", () => {
@@ -92,6 +92,11 @@ export const AI_ROUTES: Readonly<Record<string, AiRouteEntry>> = {
capabilities: ["labsOcr"],
why: "Reads a lab report image with a model.",
},
"src/app/api/medications/[id]/ingredients/extract/route.ts": {
kind: "action",
capabilities: ["supplementLabel"],
why: "Reads a supplement label photo with a model into a proposed composition.",
},
"src/app/api/medications/extract/route.ts": {
kind: "action",
capabilities: ["medicationExtract"],