Abstract:
An apparatus for annotating physiological waveforms is provided. The apparatus comprises an implantable medical device, which may be a pacemaker or a cardioverter/defibrillator, and a programmer for use with the implantable medical device. The implantable medical device may be modeled as a finite state machine. Whenever the implantable medical device enters a new state, a state transition vector or a current state vector is transmitted to the programmer. The programmer implements a state machine model of the implantable medical device to determine the current state of the device based on the received state vectors. Because the exact state of the implantable medical device is known, the programmer can annotate the physiological waveform more completely than has previously been possible. For example, when the behavior of the implantable medical device is unclear, the programmer can place an explanatory label adjacent to the displayed physiological waveform.

Description:
BACKGROUND OF THE INVENTION 
     The present invention relates to displaying waveforms retrieved from implantable medical devices. More particularly, this invention relates to storing and annotating portions of such a waveform. 
     Implantable medical devices are becoming increasingly more complex. As these devices become more complex they perform more functions. These devices frequently measure some physiologic parameter such as a patient&#39;s intracardiac electrogram, blood oxygen level, activity level, respiration rate, or body temperature. These devices may also analyze the measured parameter. Some devices provide some response as a result of that analysis. Often, the analysis may have multiple levels of detail associated with it. There may be a simplistic instantaneous diagnosis of the patient&#39;s condition, as well as a longer term, more sophisticated analysis. For example, a cardiac monitoring device may detect a series of contractions in the patient&#39;s right atrium. A more sophisticated analysis of this same signal would include rate information, and the detection of a possible atrial tachycardia or atrial fibrillation if the rate of the detected atrial contractions exceeds a preset rate for some preset length of time. Other implantable medical devices that could utilize similar diagnostic capabilities include, muscle stimulators, drug pumps, nerve stimulators, artificial organs and/or cardiac stimulating devices. 
     Cardiac stimulating devices such as pacemakers and cardioverter/defibrillators measure the patient&#39;s intracardiac electrogram or electrocardiogram. Newer devices may also have the capability to react to various physiologic parameters such as a patient&#39;s activity level or blood oxygen level. Cardiac stimulating devices may also be capable of terminating potentially dangerous cardiac arrhythmias. To perform these tasks, cardiac stimulating devices contain microprocessors and control circuitry that allow the devices to respond to a patient&#39;s heartbeat and other measured parameters. The patient&#39;s internal heartbeat signals, which are known as the intracardiac electrogram, are measured through leads attached to the patient&#39;s heart. 
     A cardiac stimulating device can respond to different cardiac conditions with varying levels of therapy. For example, some cardiac stimulating devices have the capability to treat heart arrhythmias such as tachycardia. Such devices confirm the onset of tachycardia when a set of detection criteria has been satisfied. Once a tachycardia episode is confirmed, increasing levels of therapy can be applied to the patient&#39;s heart to attempt to terminate the episode. 
     Many cardiac stimulating devices have adjustable settings, which a physician can select and enter into the device using a &#34;programmer.&#34; Although default settings for the detection criteria and corresponding levels of therapy can be used, it is usually beneficial if the physician programs each individual patient&#39;s cardiac stimulating device, so that the specific characteristics of the patient&#39;s heart can be taken into account. Without tailoring the device settings, some patients may experience discomfort if they suffer from a cardiac condition that is not detected and treated adequately or sufficiently early by the cardiac stimulating device. 
     In order to properly adjust the settings of a cardiac stimulating device, physicians often analyze a patient&#39;s electrocardiogram (EKG). Physicians also analyze a patient&#39;s intracardiac electrogram, because the intracardiac electrogram is the signal that the cardiac stimulating device actually monitors during operation. The cardiac simulating device transmits the intracardiac electrogram to the programmer in real-time using radio-frequency telemetry. Either the intracardiac electrogram or the EKG may be displayed on a monitor or a chart recorder, for the physician&#39;s review. 
     During the course of monitoring the patient&#39;s heart, the cardiac stimulating device must identify which portions of the intracardiac electrogram represent certain cardiac events, such as the occurrence of a P-wave or an R-wave. Event markers, such as the letter &#34;P&#34; representing a measured P-wave, are generated whenever a cardiac event is detected by the cardiac stimulating device. Additional markers corresponding to events such as the application of a pacing pulse to the ventricle of the patient&#39;s heart are also generated. These markers are also transmitted to the programmer. 
     As described in Snell et al. U.S. Pat. Nos. 4,596,225 and 4,791,936, when displaying the intracardiac electrogram, it is a useful aid to display the event markers on the monitor or chart recorder adjacent to the event that each marker represents. For example, as shown in the aforementioned Snell et al. patents, the letter &#34;P&#34; can be placed on the display above the portion of the intracardiac electrogram that represents a P-wave. The letter &#34;A&#34; can be placed on the display above the portion of the intracardiac electrogram that represents application of a pulse to the atrium. Other events, such as the occurrence of an R-wave, or the application of a pulse to the ventricle can also be labeled &#34;R&#34; and &#34;V&#34;, respectively. When the intracardiac electrogram is labeled with the event markers, the physician can more easily determine if the cardiac stimulating device is operating properly. 
     However, the response of the cardiac stimulating device to the measured intracardiac electrogram may be quite complex. In many cases, the physician may not be able to quickly determine if a device is responding correctly, because the cause of the device&#39;s behavior is not readily apparent. For example, it may be unclear when a tachycardia episode has been confirmed or what level of therapy is being applied to a patient&#39;s heart. Another example of a situation in which the behavior of the cardiac stimulating is unclear occurs when the cardiac stimulating device drops a pulse in order to terminate an episode of pacemaker mediated tachycardia (&#34;PMT&#34;). A PMT episode may occur when a pulse that is applied to a patient&#39;s ventricle is fed back to the patient&#39;s atrium via a retrograde conduction path in the heart. If the cardiac stimulating device is tracking the patient&#39;s atrial heart rate, the pulse that is fed back may be mistaken for the patient&#39;s normal sinus rhythm, which causes the cardiac stimulating device to apply increasingly fast pacing pulses to the patient&#39;s ventricle, until the maximum allowed pacing rate is reached. A pulse can be dropped to attempt to break this potentially harmful condition after a number of pulses have been applied at the maximum rate. However, unless the physician is aware that this is the reason for the missing pulse, it may appear that the device is not functioning properly. 
     The physician may not immediately know whether it is appropriate for a cardiac stimulating device to drop a pulse because the device makes this determination over a period of many heartbeats. For example, the cardiac stimulating device can be programmed to drop a pulse if more than 127 pulses are applied at the maximum rate. The device is allowed to apply a relatively large number of pulses to the heart at the maximum rate, because it may cause discomfort to the patient to drop pulses more frequently. However, it may be impractical for the physician to review the rate at which the last 127 pulses were applied. This information might no longer appear on the display, or even if the pulses were recorded in memory or on a strip chart, manual review might be unduly burdensome. Additionally, the behavior of each cardiac stimulating device differs, which further impedes the physician&#39;s efforts to evaluate device performance. Devices from different manufacturers are often incompatible and the operational characteristics of many cardiac stimulating devices depend on the selected values of the programmable parameters. 
     It would therefore be desirable to annotate the intracardiac electrogram or electrocardiogram to more completely reflect the state of the cardiac stimulating device. For example, when the cardiac stimulating device drops a pulse to terminate a PMT episode, the cardiac waveform adjacent to the missing pulse could be labeled &#34;attempted PMT termination.&#34; When a cardiac stimulating device applies pulses to the heart in response to the confirmation of an episode of tachycardia, the annotation &#34;tachycardia confirmed&#34; could appear. 
     Alternatively, it may be desirable to annotate the intracardiac electrogram or electrocardiogram to more completely reflect the state of a cardiac monitoring device. In another alternative, any implantable medical device that monitors a measured value may have additional annotations displayed when accumulated individual measurements trigger detection of a more complex state by an implantable medical device. 
     SUMMARY OF THE INVENTION 
     These and other objects of the invention are accomplished in accordance with the principles of the present invention by providing an apparatus for annotating cardiac waveforms. In addition to labeling the waveforms with the traditional event markers, such as those designating P-waves, R-waves, and ventricular pacing pulses, the cardiac waveform may be labeled whenever the cardiac stimulating device performs a function of potential interest to the physician. To avoid cluttering the display, some functions are not labeled. However, when the physician desires to analyze a portion of the signal in more detail, a more complete annotation can be made. 
     Further, the physician can select between different levels of annotation. If desired, only the traditional event markers can be displayed. The event markers can also be supplemented by generating labels whenever the cardiac stimulating device implements a significant device function. The displayed cardiac waveform may also be fully annotated to reflect each change in the state of the cardiac stimulating device. In order to track the state of the cardiac stimulating device, vectors corresponding to the device&#39;s current state and changes in the device&#39;s state are telemetered to the programmer, which determines the current state of the device. The programmer then annotates the cardiac waveform accordingly. 
     An apparatus for annotating cardiac waveforms is therefore provided that has a cardiac stimulating device and a programmer. The cardiac stimulating device contains a sensing circuit for measuring a patient&#39;s heartbeat signals. The cardiac stimulating device also contains a controller that creates either state transition vectors, current state vectors, or both. These vectors describe the various states of the cardiac stimulating device. Also contained within the device is a communications unit for transmitting signals from the cardiac stimulating device. The programmer receives the transmitted signals using a telemetry head. The programmer may receive a cardiac waveform either from the cardiac stimulating device or from another source such as a surface electrocardiogram machine. Regardless of its source, the cardiac waveform is stored in a memory array by a control unit. The control unit also models the cardiac stimulating device&#39;s operation as a finite state machine. By modeling the device in this way, the control unit generates a series of current state signals that are stored in the memory array with the cardiac waveform. The control unit generates annotating labels that describe the operation of the cardiac stimulating device based on the values of the current state signals. Both the cardiac waveform and the annotating labels are displayed on a monitor. 
     Further in accordance with the invention a cardiac stimulating device programmer is provided that has a telemetry head for receiving signals from a cardiac stimulating device. The cardiac stimulating device transmits state transition vectors, or current state vectors, or both. The programmer also receives a patient&#39;s cardiac waveform and stores it in a memory array. A control unit within the programmer implements a state machine model of the cardiac stimulating device to calculate the values of current state signals. This calculation is based on the values of the received state transition vectors and/or received current state vectors. The programmer further has a monitor on which the cardiac waveform that is stored in the memory is displayed. The control unit generates annotating labels that correspond to each transition in the state of the cardiac stimulating device in terms that are relevant to the medical professional that is using the system. The control unit performs this function based on the values of the current state signals that are stored in the memory array. The control unit displays at least some of the annotating labels on the monitor adjacent to the displayed cardiac waveform. 
     Also in accordance with the present invention, a method of annotating a cardiac waveform with labels is provided. The method involves receiving a patient&#39;s cardiac waveform and receiving signals from a cardiac device. The signals that are received from the cardiac device include state transition vectors, or current state vectors, or both. The state transition vectors represent each transition in the state of the cardiac device, whereas the current state vectors represent the current state of the device. The method also involves the step of storing the cardiac waveform in a memory array. A state machine model of the cardiac stimulating device is also implemented, which allows the current state of the cardiac device to be determined from the values of the state transition vectors or the current state vectors. Current state signals are stored in the memory array. The method further involves displaying the cardiac waveform on a monitor. Annotating labels corresponding to each transition in the state of the cardiac device are also generated based on the values of the current state signals that are stored in the memory. The annotating labels are displayed on the monitor adjacent to the displayed cardiac waveform. 
     An alternate embodiment is an external monitoring system for a implantable cardiac monitoring device. The cardiac monitoring device transmits state transition vectors, or current state vectors, or both. The external monitoring system may also receive a patient&#39;s cardiac waveform, and store it in a memory array. A control unit within the external monitoring system implements a state machine model of the cardiac monitoring device to calculate the values of the current state signals. This calculation is based on the values of the received state transition vectors and/or the received current state vectors. The external monitoring system further has a monitor on which the cardiac waveform that is stored in the memory is displayed (if the cardiac waveform is sent). 
     The control unit generates annotating labels that correspond to each transition in the state of the cardiac monitoring device in terms that are relevant to the medical professional using the system. The control unit performs this function based on the values of the current state signals that are stored in the memory array. The control unit displays at least some of the annotating labels on the monitor. If the cardiac waveform is sent by the implantable cardiac monitoring device, or if another cardiac waveform is received, these labels are displayed adjacent to the displayed cardiac waveform. 
     Other alternatives may include any implantable medical device that measures a parameter. Such a device may transmit the measured signal, and state transition vectors and/or current state vectors. An external monitoring apparatus can be used to display the measured signal and annotations that describe the associated state of the implanted medical device. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The above and other advantages of the invention will be apparent upon consideration of the following detailed description, taken in conjunction with the accompanying drawings, in which like reference numerals refer to like parts throughout, and in which: 
     FIG. 1 is a schematic diagram showing an apparatus for annotating cardiac waveforms in accordance with the present invention; 
     FIG. 2 shows a representative annotated cardiac waveform as it appears on a monitor; and 
     FIG. 3 is a schematic diagram showing a state machine representation of the operation of a cardiac stimulating device. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     An apparatus constructed in accordance with the present invention is shown in FIG. 1. A cardiac stimulating device 10 is connected to a patient&#39;s heart 12 via a lead 14. The patient&#39;s intracardiac electrogram (IEGM) is measured by a sensing circuit 16, which passes the IEGM to control circuitry 18. The control circuitry 18 analyzes the intracardiac electrogram to determine when cardiac events occur. When a cardiac event is sensed, the control circuitry changes the state of one of the bits in an eight-bit register (not shown) contained within the control circuitry 18. For example, if a P-wave is sensed by the control circuitry 18, a logical one is stored in the bit in the eight-bit register that corresponds to detected P-waves. Similarly, if an R-wave is sensed or if the ventricle is paced, a logical one can be stored in either the bit corresponding to detected R-waves or the bit corresponding to ventricle pacing. In each case, when one of the bits of the eight-bit register becomes a logical one, the remaining bits become logical zeros. After the eight-bit register is updated to reflect the most recent detected event, the control circuitry generates an interrupt, which is transmitted to a control unit 20. When the control unit 20 receives the interrupt, the data in the eight-bit register is transferred to the control unit 20 from the control circuitry 18. The control circuitry 18 also provides the digitized intracardiac electrogram to the control unit 20, so that it may be telemetered in real-time to a programmer 22 via a communications unit 24. The control unit 20, which is preferably microprocessor based, also monitors sensors such as an activity sensor 26 and an oxygen sensor 28, as well as a real-time clock 30. Typically, the control unit reads data from the sensors after receiving confirmation of the detection of an R-wave or a ventricular pulse. 
     When a physician desires to display a patient&#39;s IEGM, the cardiac stimulating device telemeters the IEGM to the programmer 22 via the communications unit 24. Regardless of whether the physician elects to display the IEGM or the EKG, the programmer 22 receives the data necessary to annotate the cardiac waveform from the cardiac stimulating device 10. As described above, this data has previously consisted of event markers representing the cardiac events that have traditionally been sensed by cardiac stimulating devices, such as the occurrence of P-waves and R-waves. However, in order to more fully annotate the EKG or the IEGM, additional data is required. Although the behavior of the cardiac stimulating device 10 may be complex, the device may still be modeled as a finite state machine. Because each of the device&#39;s states may potentially be of interest to the physician, the cardiac stimulating device preferably telemeters a state transition vector to the programmer 22 each time the device changes its state. 
     A state transition vector is shorter than the current state vector that represents the actual state of the cardiac stimulating device, because the state transition vector only identifies the change between a new state and the previous state. Occasionally, however, the current state vector may be transmitted to the programmer 22, so that the state of the device may not be lost due to a single garbled transmission. The current state vector can be sent once each heartbeat, following an R-wave or a ventricular pacing pulse. Alternatively, the current state vector can be sent at fixed intervals. Another alternative is to send only the current state vector, thereby ensuring that the programmer always knows the current state of the device. Finally, the vectors may also identify concurrently detected events that do not cause a change in the state of the device. For example, during the refractory period following a ventricular output pulse a cardiac stimulating device may detect, yet otherwise ignore, R-waves. 
     Signals that are transmitted by the cardiac stimulating device 10 are received by the programmer 22 via a telemetry head 32. The signals contain tags that allow a decoder 34 to determine whether the signals correspond to IEGM data or state vectors. Signals corresponding to IEGM data are directed to queue logic 36, whereas state vectors are directed to a control unit 38. The state machine model of the cardiac stimulating device 10 is implemented by the control unit 38, so that upon receiving a state transition vector, the control unit 38 can determine the current state of the cardiac stimulating device 10 and generate a corresponding current state signal. This signal is subsequently stored in a portion of a memory 40. If a current state vector is received, it may be compared with the value of the current state that is stored in the memory 40 to determine whether an error has occurred in tracking the state of the cardiac stimulating device. If the states differ, the stored state may be replaced with the received current state vector. 
     Annotated cardiac waveforms may be displayed on a chart recorder 42 or a monitor 44. The IEGM data from the queue logic 36 and the current state signals corresponding to the current state of the cardiac stimulating device 10 are directed to a memory array 46, which may be implemented using a shift register or random access memory organized as a circular buffer. The current state signals pass through a clocked buffer 48 to overcome timing skew. The queue logic 36 is also clocked, as is an EKG input device 50, which is used to receive EKG signals from an optional EKG system 52. Because the control unit 38 may take several clock cycles to generate a current state signal, the current state signals will typically lag behind the EKG data and the IEGM data. By delaying the EKG data with the EKG input device, the EKG data may be synchronized with the current state signals. Similarly, the queue logic 36 may delay the IEGM data. While displaying the annotated cardiac data on the monitor 44, a user interacts with the programmer 22 via input interface 54, which may be, for example, a keyboard, a mouse, or a touch screen. 
     A cardiac waveform that has been annotated in accordance with the present invention is shown in FIG. 2. P-waves are labeled with the letter &#34;P&#34;, while ventricular pacing is represented by the letter &#34;V&#34;. A sensed R-wave is denoted with the letter &#34;R&#34;. FIG. 2 also illustrates how the cardiac waveform may be annotated in more detail to reflect the behavior of the cardiac stimulating device, for example, when the device is attempting to terminate a PMT episode. As described above, if a pacing pulse 56 is applied to the patient&#39;s heart at the maximum pacing rate for 127 pulses, the cardiac stimulating device 10 (FIG. 1) may drop the next pulse in an attempt to break what appears to be a PMT episode. In this event, the programmer 22 (FIG. 1) will place the label &#34;attempted PMT termination&#34; adjacent to the location of the missing pulse. Similar labels may be generated for each of the states of the cardiac stimulating device. For example, when the device confirms an episode of tachycardia, the waveform may be annotated with the label &#34;tachycardia confirmed&#34;. Similarly, whenever the device applies a therapy to the patient&#39;s heart, a label describing the therapy can be displayed. 
     Referring again to FIG. 1, during the annotation of the cardiac waveform, the control unit 38 retrieves the desired IEGM or EKG data and the state of the cardiac stimulating device 10 from the memory array 46. Only the portion of the cardiac waveform that is to be displayed is retrieved, although the remainder of the signal and the corresponding state signals are retained in the memory array 46 for later review by the physician. If the physician directs the programmer to display every state transition of the cardiac stimulating device 10, then each state that is recorded in the memory array 46, will be converted into a label by the control unit 38 and subsequently displayed on the monitor 44. Because the state signals in the memory array 46 are synchronized with the IEGM and EKG data, the control unit 38 may display the data and the state of the device synchronously by retrieving the data and state signals from the same row 58 of the memory array 46. 
     The physician may also direct the programmer 22 to display only the traditional event markers, such as those denoting P-waves and R-waves. In this mode of operation, the control unit 38 would not generate labels such as the label &#34;attempted PMT termination&#34;. Alternatively, the user may direct the programmer 22 to display only those labels deemed to be of significant interest. For example, the label &#34;attempted PMT termination&#34; could be displayed, whereas no label would be generated to denote when the cardiac stimulating device is merely in the state of counting the number of pacing pulses required to trigger the &#34;attempted PMT termination&#34; label. 
     The present invention may be further understood by referring to FIG. 3, which illustrates a typical example of the state machine approach to characterizing the behavior of the cardiac stimulating device 10. The state machine diagram shows a method of detecting and attempting to terminate PMT episodes similar to the method described above. In contrast to the previously described method of terminating PMT episodes, with this method a further condition--the detection of a premature ventricular contraction (PVC)--is required before the cardiac stimulating device counts the number of pacing pulses that are applied at the maximum pacing rate. 
     In a normal pacing state 60 the cardiac stimulating device 10 applies pacing pulses to the patient&#39;s heart at the rate, R, as needed. Premature ventricular contractions, which are defined as the occurrence of an R-wave without an immediately preceding P-wave, have been found to initiate a pacemaker mediated tachycardia. In order to reduce the frequency with which pacing pulses are dropped, the cardiac stimulating device 10 will not enter a counting state 62 unless a PVC has been detected and the heart rate equals the maximum allowed pacing rate, RMAX. If the heart rate drops below the maximum rate, the cardiac stimulating device 10 returns to the normal pacing state 60. If, however, 127 heartbeat cycles are counted in the counting state 62, the cardiac stimulating device 10 enters an inhibiting state 64, in which no pacing pulses are applied to the heart for a predetermined period of time while the heart is monitored to determine if an R-wave occurs. If no R-wave is detected, the cardiac stimulating device 10 returns to the counting state 62, whereas if an R-wave is detected, the device enters the normal pacing state 60. 
     In order for the programmer 22 to model the operation of the cardiac stimulating device 10 as a state machine, each state transition, such as the transitions shown in FIG. 3, must be taken into account. The state machine model for each type of cardiac stimulating device to be supported by the programmer 22 is stored in a storage unit 66 by the control unit 38 (FIG. 1). If the programmer 22 is used with a cardiac stimulating device that only generates traditional event markers, the decoder 34 will direct the traditional markers to the control unit 38, which will store these markers in the memory array 46 in place of the current state signals. 
     The programmer 22 allows the user to freeze the display and subsequently review the saved cardiac data and the saved states of the cardiac stimulating device. If 16 kilobytes of memory are dedicated to data storage, then at a sampling rate of 400 hertz, approximately 40 seconds of cardiac signals can be stored. Using the input interface 54, a user can select portions of the signal to analyze more completely. For example, if a physician observes that the cardiac stimulating device 10 has dropped a pacing pulse, the physician may highlight the area of interest on the display. The control unit 38 then retrieves the corresponding current state from the memory array 46, so that the cardiac waveform can be fully annotated. If the cardiac waveform had previously only been labeled with event markers, the control unit 38 may generate more detailed labels. Further, the control unit 38 may provide an even more complete explanation of the state of the cardiac stimulating device 10, if desired, by displaying supplemental text on a separate region of the monitor. 
     In another alternative embodiment, the implanted device may be a cardiac monitor. The cardiac monitor would detect tachycardia, with the programmer displaying these tachycardia detections at the direction of the physician as described earlier. One skilled in the art will appreciate that the present invention can be practiced by other than the described embodiments, which are presented for purposes of illustration and not of limitation, and the present invention is limited only by the claims that follow.