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>