Fix: Uebersprungene Eintraege wurden als "updated" gezaehlt
Jetzt korrekt: skipped wenn WHERE-Klausel Update verhindert
Deutsche Spaltennamen
Apple Health: Unterstuetzung fuer deutsche Spalten (Ruhepuls, Herzfrequenzvariabilitaet, VO2 max, etc.)
Omron: Spalten mit Einheiten (Systolisch (mmHg), Diastolisch (mmHg), Puls (bpm))
Dezimalwerte-Parsing
Problem: Apple Health exportiert Vitalwerte mit Dezimalstellen (HRV = 37.95 ms)
Fix: safe_int() und safe_float() Funktionen mit robustem Parsing
Error-Details in Response
Import zeigt jetzt detaillierte Fehlermeldungen im Frontend
Rote Box bei Fehlern mit ersten 10 Error-Details
Testing
Tested on dev.mitai.jinkendo.de
Apple Health Import: 31 Zeilen erfolgreich
Omron Import: Funktioniert mit deutschen Spalten
Generated with Claude Code
## Bugfixes
### Import-Zaehlung korrigiert
- Fix: Uebersprungene Eintraege wurden als "updated" gezaehlt
- Jetzt korrekt: skipped wenn WHERE-Klausel Update verhindert
### Deutsche Spaltennamen
- Apple Health: Unterstuetzung fuer deutsche Spalten (Ruhepuls, Herzfrequenzvariabilitaet, VO2 max, etc.)
- Omron: Spalten mit Einheiten (Systolisch (mmHg), Diastolisch (mmHg), Puls (bpm))
### Dezimalwerte-Parsing
- Problem: Apple Health exportiert Vitalwerte mit Dezimalstellen (HRV = 37.95 ms)
- Fix: safe_int() und safe_float() Funktionen mit robustem Parsing
### Error-Details in Response
- Import zeigt jetzt detaillierte Fehlermeldungen im Frontend
- Rote Box bei Fehlern mit ersten 10 Error-Details
## Testing
- Tested on dev.mitai.jinkendo.de
- Apple Health Import: 31 Zeilen erfolgreich
- Omron Import: Funktioniert mit deutschen Spalten
---
Generated with Claude Code
Problem: Import reported all entries as "updated" even when skipped
due to WHERE clause (source != 'manual')
Root cause: RETURNING returns NULL when WHERE clause prevents update,
but code counted NULL as "updated" instead of "skipped"
Fix:
- Check if result is None → skipped (WHERE prevented update)
- Check if xmax = 0 → inserted (new row)
- Otherwise → updated (existing row modified)
Affects:
- vitals_baseline.py: Apple Health import
- blood_pressure.py: Omron import
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Logs:
- CSV column names from first row
- Rows skipped due to missing date
- Rows skipped due to no vitals data
- Shows which fields were found/missing
Helps diagnose CSV format mismatches.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Problem: Import expected English column names, but German Apple Health/Omron
exports use German names with units.
Fixed:
- Apple Health: Support both English and German column names
- "Start" OR "Datum/Uhrzeit"
- "Resting Heart Rate" OR "Ruhepuls (count/min)"
- "Heart Rate Variability" OR "Herzfrequenzvariabilität (ms)"
- "VO2 Max" OR "VO2 max (ml/(kg·min))"
- "Oxygen Saturation" OR "Blutsauerstoffsättigung (%)"
- "Respiratory Rate" OR "Atemfrequenz (count/min)"
- Omron: Support column names with/without units
- "Systolisch (mmHg)" OR "Systolisch"
- "Diastolisch (mmHg)" OR "Diastolisch"
- "Puls (bpm)" OR "Puls"
- "Unregelmäßiger Herzschlag festgestellt" OR "Unregelmäßiger Herzschlag"
- "Mögliches AFib" OR "Vorhofflimmern"
Added debug logging for both imports to show detected columns.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Problem: Errors during import were logged but not visible to user.
Changes:
- Backend: Collect error messages and return in response (first 10 errors)
- Frontend: Display error details in import result box
- UI: Red background when errors > 0, shows detailed error messages
Now users can see exactly which rows failed and why.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Problem: Import failed with "invalid literal for int() with base 10: '37.95'"
because Apple Health exports HRV and other vitals with decimal values.
Root cause: Code used int() directly on string values with decimals.
Fix:
- Added safe_int(): parses decimals as float first, then rounds to int
- Added safe_float(): robust float parsing with error handling
- Applied to all vital value parsing: RHR, HRV, VO2 Max, SpO2, resp rate
Example: '37.95' → float(37.95) → int(38) ✓
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Lars
merged commit 5a6a140dfd into main2026-03-23 16:52:28 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Bugfixes
Import-Zaehlung korrigiert
Deutsche Spaltennamen
Dezimalwerte-Parsing
Error-Details in Response
Testing
Generated with Claude Code