Patent ID: 7706869

Claim:
A method of generating a template of a normal heartbeat of a heart of a patient, comprising: detecting heartbeats as a plurality of events; collecting a predetermined number of detected non-paced heartbeats having predetermined characteristics during a first discrete sample collection interval and identifying them as first selected events; generating a current template from the collected first selected events; waiting a predetermined delay; collecting a predetermined number of detected non-paced heartbeats having predetermined characteristics during a second discrete sample collection interval subsequent to the first discrete sample collection interval and the predetermined delay and identifying the predetermined number of detected non-paced heartbeats collected during the second discrete sample collection interval as second selected events; then comparing the collected second selected events with the current template to obtain a result; and generating an updated template from the collected second selected events in response to the result being an invalid template; and delivering a therapy to the heart of the patient based, at least in part, on the updated template.