Write health to sqlite tables