Wearable device to monitor and detect heartbeat anomaly