feat(import): import lab results and medications from CSV

Two streamed endpoints read a spreadsheet record by record with a
column mapping from the query: separator, decimal mark, date order and
zone are stated, never guessed per row. Lab rows resolve to markers the
way scanned reports do, convert units where the conversion is known and
keep what the file said; medication rows map name, dose, daily times,
as-needed and a dated window, checked against the create schema, with
reminders off unless asked for. A dry run writes nothing, a re-upload
only finds duplicates, and every refused row comes back with its line
and reason.
This commit is contained in:
Marc-André Bombeck committed 2026-10-21 22:17:59 +02:00
1 parent c94766efc3
commit a84fb4b467
21 files changed
+3593 -3

No files matched your search

+8 -1
View File
@@ -226,7 +226,14 @@ export const ERROR_CODE_CATALOGUE: Readonly<Record<string, readonly string[]>> =
"illness.episode.parent-not-found",
"illness.insights.invalid",
],
import: ["import.apple_health.busy", "import.write_failed"],
import: [
"import.apple_health.busy",
"import.csv.content_type",
"import.csv.empty",
"import.csv.too_large",
"import.rate_limited",
"import.write_failed",
],
ingest: ["ingest.rate_limited"],
insights: [
"insights.generate.budgetExceeded",