Apparatus and method are provided to collect and analyze heartbeat waveforms. In one novel aspect, the heartbeat waveforms are collected from wearable devices. In one embodiment, the wearable device collects heartbeat waveforms by attaching the device to the patient for a long period and sends the collected waveforms to a receiver through a wireless network. In another novel aspect, an application program is installed in a smart device to receive heartbeat waveforms from one or more wearable devices. The application program either relays the received waveform to a remote processing center or processes the data before sending. In another novel aspect, an analysis method compares received patient's current heartbeat waveform with historic data. In one embodiment, the historic data are stored in a cloud-based database. In another novel aspect, the remote processing center is an open platform data center, which takes in certified third party inputs.