-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathopen_icd.html
191 lines (183 loc) · 17.7 KB
/
open_icd.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<!DOCTYPE html>
<html lang="en">
<script src="components/header.js" type="text/javascript" defer></script>
<script src="components/navigation.js" type="text/javascript" defer></script>
<script src="components/footer.js" type="text/javascript" defer></script>
<header-component></header-component>
<body>
<navigation-component></navigation-component>
<div class="breadcrumbs margin-bottom-40">
<div class="container">
<h1 class="pull-left">OpenICD: An Open Platform for Safer ICDs</h1>
</div>
</div>
<!--=== Content Part ===-->
<div class="container">
<div class="row">
<div class="col-md-9">
<p>Implantable Cardioverter Difibrillators (ICDs) are designed to identify fatal heart conditions like Ventricular Tachycardia (VT) and deliver electrical shock to restore normal heart rhythm. A typical ICD has two leads inserted into the heart which measure local electrical activities in the right atrium and right ventricle, respectively. The electrical signals are referred to as <strong>Electrograms (EGMs)</strong>. </p>
<p><img src="assets/img/MBCT_pro.png" width="600" height="333"></p>
<p>Based on the timing and morphology of the EGMs, the ICD needs to distinguish between fatal Ventricular Tachycardia (VT) and non-fatal Supra-Ventricular Tachycardia (SVT). It is important to deliver therapy for all VTs, but therapies delivered during SVTs are considered as <strong>inappropriate</strong>. Inapprppriate shocks are decrimental to patient health and device manufacturers have developed algorithms to reduce the frequency of inappropriate therapies.</p>
<p>We have implemented the VT/SVT discrimination algorithm from two major ICD manufacturers, and by sharing them we hope to encourage researchers to develop better VT/SVT algorithms. In each algorithm description, we start by introducing the clinical features that the algorithm looks for and why, and then go into the implementation details. The Matlab function for RhythmID and PRLogic and a starter kit can be downloaded <a href="assets/downloads/vhm/OpenICD.zip"><strong>here</strong></a>. </p>
<div class="headline">
<h2>Boston Scientific RhythmID </h2>
<p>RhythmID is a very straightfoward algorithm and has been working very well in most heart conditions.</p>
</div>
<h4>Clinical Features</h4>
<p>The readers should keep in mind that none of these features can 100% distinguish VT/SVT on its own.</p>
<h5>1. Ventricular rate</h5>
<p>High ventricular rate is a strong indication of VT. The RhythmID algorithm use the last 10 intervals between consecutive ventricular beats to determine whether the current rhythm is SVT, VT, or even faster VF. Depending on the setting, ventricular rate can be divided into 2 zones (VT/VF) or 3 zones (VT/fast VT/VF). In this study we only consider 2 zones. If the ventricular rate is above the VF threshold, the ICD will deliver therapy immediately without checking whether the ryhthm is SVT, otherwise the algorithm looks for other signs of SVT to potentially inhibit therapy.</p>
<h5>2. Fast Ventricular Rate Duration</h5>
<p>There are cases called non-sustained VT, in which the ventricular rate is only fast for less than say, 30 sec. ICD should not deliver therapy in these scenarios. Therefore in VT/SVT algorithms there are always a timing period in which the ventricular rate has to stay fast before the algorithm decide whether to deliver therapy. In Rhythm ID this period is called VT and VF Duration, respectively.</p>
<h5>3. Ventricular Rate Stability</h5>
<p>During most VTs, the intervals between consecutive ventricular contractions remain mostly constant since the fast beats are generated from the same reentry circuit. On the contrary, during SVTs like AF, the AV node prevents certain fast atrial events from entering the ventricles, resulting unstable ventricular rate. Therefore, unstable ventricular rate is an important sign of SVT.</p>
<h5>4. Atrial Rate</h5>
<p>During SVT, the atrial rate is fast. However, the atrial rate is also fast in some VTs, like double tachycardia. Therefore fast atrial rate is an important sign of SVT but other factors have to be taken into account to confirm SVT.</p>
<h5>5. Far-field Ventricular EGM Morphology</h5>
<p>Far-field ventricular EGM is measured from the ring of the shock coil on the ventricular lead to the ICD can. Due to the relatively longer distance betwen 2 electrodes, far-field ventricular EGM contains information of the direction of the electrical conductions within the heart, which is similar to the ECG signals. During NSR and SVT, electrical signals originate from above the ventricles, and travel to the ventricles through the AV node-His-Pukinje pathway. Therefore, the far-field ventricular EGM morphology during NSR and SVT are very similar. On the other hand, during VT the signals originate from the ventricles, resulting in different conduction pattern and different far-field ventricular EGM morphology. RhythmID utilize this feature to distinguish VT/SVT. The readers should know that there are rare cases in which the far-field EGM morphology during SVT is different than the ones during NSR, and also cases in which the morphology during VT is similar to the ones during NSR. </p>
<h4>Algorithm Descriptions</h4>
<p>RhythmID utilize a combination of the features described above. The decision flow to determine whether a rhythm is VT or SVT is shown below:</p>
<p><img src="assets/img/BS_det.png" width="624" height="526" alt=""/></p>
<p>Now we walk through the code for better understanding.</p>
<p><strong>Inputs</strong></p>
<p>A_sense: Boolean, sensed atrial event after sensing</p>
<p>V_sense: Boolean, sensed ventricular event after sensing</p>
<p>V_shock: Integer, far-field ventricular EGM</p>
<p><strong>Outputs</strong></p>
<p>inhibit: Boolean, whether therapy is inhibited at a particular time.</p>
<p>therapy: Boolean, whether therapy is delivered at a particular time.</p>
<p><strong>ICD States</strong></p>
<p>A_clk: integer. The time (in msec) since the last atrial event, resets when A_sense=1</p>
<p>V_clk: integer. The time (in msec) since the last ventricular event, resets when V_sense=1</p>
<p>A_win: 10*1 integer array. The last 10 intervals between consequtive atrial events. Updated for every new atrial events as FIFO.</p>
<p>V_win: 10*1 integer array. The last 10 intervals between consequtive ventricular events. Updated for every new ventricular events as FIFO. </p>
<p>VTC_morph: 200*1 integer array. The rolling window of far-field ventricular morphology</p>
<p>NSR_temp:</p>
<ul>
<li>raw: 200*1 integer array. The far-field ventricular EGM during NSR</li>
<li>refx: 8*1 integer array. 1:25:200</li>
<li>refy: 8*1 integer array. raw(refx)</li>
</ul>
<p>VTC_win: 10*1 integer array. The type of the last 10 far-field ventricular morphology, 1 for NSR and 2 for non-NSR.</p>
<p>VTduration: boolean. Whether the ICD is during the VT duration.</p>
<p>VFduration: boolean. Whether the ICD is during the VF duration.</p>
<p>VTdur_count: integer. The time (in msec) since the ICD entered VT duration.</p>
<p>VFdur_count: integer. The time (in msec) since the ICD entered VF duration.</p>
<p><strong>Algorithm flow</strong></p>
<p>At each time stamp (1msec):</p>
<ul>
<li>Aclk and Vclk increase by 1</li>
<li>VTC_morph, the 200msec moving window for far-field ventricular morphology, do a FIFO action for V_shock.</li>
</ul>
<p>When A_sense==true:</p>
<ul>
<li>A_win perform a FIFO action for Aclk to save the interval between the last two atrial events</li>
<li>Reset Aclk</li>
</ul>
<p>When V_sense==true:</p>
<ul>
<li>V_win perform a FIFO action for Vclk to save the interval between the last two atrial events</li>
<li>Reset Vclk</li>
<li>If 8/10 of the intervals in V_win is less than the VF threshold, and the last interval in V_win is less than the VF threshold, set VFduration to true and reset VFdur_count</li>
<li>If 8/10 of the intervals in V_win is less than the VT threshold, and the last interval in V_win is less than the VT threshold, set VTduration to true and reset VTdur_count</li>
</ul>
<p>100msec after V_sense==true</p>
<ul>
<li>Compare the 200 data point in VTC_morph with the NSR template</li>
<li>If similarity (fcc) is greater than 94%, do a FIFO action for VTC_win with 1, otherwise do it with 2</li>
</ul>
<p>During VF duration</p>
<ul>
<li>At any time, if 6/10 intervals in V_win is less than VF threshold and the last interval is less than VF threshold, drop off the duration by setting VFduration to false</li>
<li>At the end of the duration, If less than 6/10 V_win intervals during duration or the last interval is slower than VF threshold, inhibit therapy and set VFduration to false. Otherwise deliver therapy.</li>
</ul>
<p>During VT duration</p>
<ul>
<li>At any time, if 6/10 intervals in V_win is less than VT threshold and the last interval is less than VT threshold, drop off the duration by setting VTduration to false</li>
<li>At the end of the duration, If less than 6/10 V_win intervals during duration or the last interval is slower than VT threshold, inhibit therapy and set VTduration to false.</li>
<li>Otherwise use 4 discriminator to determine whether the episode is SVT. The organization of the decision is in the diagram above.
<ul>
<li>VgtA: If the mean ventricular rate in V_win is 10bpm faster than the atrial rate in A_win, the episode is more likely to be VT.</li>
<li>VTC: If 3/10 of the last 10 far-field ventricular morphology is 94% correlated with the morphology during NSR, it's more lilely to be SVT</li>
<li>STB: If the covarience of the last 10 ventricular intervals in V_win is larger than 20, the ventricular rate is unstable thus it's more likely to be SVT</li>
<li>Afib: If 6/10 of the last 10 atrial intervals are shorter than the AF threshold, it's more likely to be SVT</li>
</ul>
</li>
</ul>
<h2>Medtronic PRLogic</h2>
<p>Compared to RhythmID, the PRLogic by Medtronic is a much more complex and less intuitive algorithm. </p>
<h4>Clinical Features</h4>
<p>There are some similarities between the clinical features used in PRLogic and RhythmID. However, there are features in PRLogic that are not considered in RhythmID. For the ones that are similar in principle, we will focus on their differences in implementation.</p>
<h5>1. Ventricular rate</h5>
<p>A sustained fast ventricular rate is obviously a strong indication of VT. In PRLogic, the implementation is slightly different. Instead of looking at the ventricular rate in a detection period and a duration, PRLogic looks at the ventricular rate during a longer period of time. An episode has to have 18 consecutive fast ventricular intervals to be considered as VT, and 18/24 very fast ventricular intervals to be considered as VF.</p>
<h5>2. Atrial Rate</h5>
<p>A fast atrial rate is a strong indication of SVT. In PRLogic, atrial rate is considered together with ventricular rate to consider whether an episode is SVT.</p>
<h5>3. Ventricular rate regularity</h5>
<p>This feature is similar to the ventrcular rate stability in RhythmID. PRLogic looks at the last 18 ventricular intervals and creates a histogram for interval 230:10:400. If the number of the intervals which fall into the 2 most dominant categories are larger than 14, the rhythm is considered as regular.</p>
<h5>4. PR Association</h5>
<p>The correlation between atrial and ventricular events is a good indication of the direction the signal is traveling. i.e. from atrial to ventricle or vice versa. For each ventricular event, PRLogic looks at whether there exists atrial event(s) before it and the timing relationship between the last atrial event and the ventricular event, to determine whether the atrial event is "associated" with the ventricular event.</p>
<h5>5. PR Pattern</h5>
<p>The pattern of atrial and ventricular events contains vital information on whether an episode is SVT or VT. RhythmID does not consider PR pattern at all. In PRLogic the PR pattern is the most complex component are is the key to determine different rhythms. For each two ventricular intervals, PRLogic looks at how many atrial events are within these intervals and the timing relations with the ventricular events. There are 19 couple codes which are shown below. PRLogic then use the sequence of couple codes to categorize the rhythm.</p>
<p><img src="assets/img/MED_pattern.jpg" width="960" height="1280"></p>
<h4>Algorithm Description </h4>
<p><strong>Inputs</strong></p>
<p>A_sense: Boolean, sensed atrial event after sensing</p>
<p>V_sense: Boolean, sensed ventricular event after sensing</p>
<p>V_shock: Integer, far-field ventricular EGM</p>
<p><strong>Outputs</strong></p>
<p>inhibit: Boolean, whether therapy is inhibited at a particular time.</p>
<p>therapy: Boolean, whether therapy is delivered at a particular time.</p>
<p><strong>ICD States</strong></p>
<p>A_clk: integer. The time (in msec) since the last atrial event, resets when A_sense=1</p>
<p>V_clk: integer. The time (in msec) since the last ventricular event, resets when V_sense=1</p>
<p>A_win: 10*1 integer array. The last 10 intervals between consequtive atrial events. Updated for every new atrial events as FIFO.</p>
<p>V_win: 24*1 integer array. The last 24 intervals between consequtive ventricular events. Updated for every new ventricular events as FIFO. </p>
<p>shock_buf: 200*1 integer array. The rolling window of far-field ventricular morphology</p>
<p>VTC_win: 10*1 integer array. The type of the last 10 far-field ventricular morphology, 1 for NSR and 2 for non-NSR.</p>
<p>NOA_win: 5*1 integer array. The number of atrial events between each of the last 5 ventricular intervals</p>
<p>PRpattern: 5 letter string. The last 5 couple codes</p>
<p>PRwin: 5*1 integer array. The last 5 intervals between each ventricular event to the last atrial event. The number is Inf if there is no atrial events during the interval.</p>
<p>PRassociate: 8*1 boolean array. Whether the last 8 A-V event pairs are correlated.</p>
<p>FFRW_win: 12*1 boolean array. Whether the last 12 ventricular intervals have potential far-field R-wave oversensing</p>
<p>FFRW: integer. The number of potential far-field R-wave oversensing in the last 12 ventricular intervals.</p>
<p>LastRR: integer array. The time since the last ventricular event before atrial event(s) happened. </p>
<p>SecondLastRR: The time since the second last ventricular event before atrial event(s) happened. </p>
<p><strong>Algorithm flow</strong></p>
<p>At each time stamp (1msec):</p>
<ul>
<li>Aclk and Vclk increase by 1</li>
<li>VTC_morph, the 200msec moving window for far-field ventricular morphology, do a FIFO action for V_shock.</li>
</ul>
<p>When A_sense==true:</p>
<ul>
<li>A_win perform a FIFO action for Aclk to save the interval between the last two atrial events</li>
<li>Reset Aclk</li>
<li>Do a FIFO action to the Vclk into the LastRR</li>
</ul>
<p>When V_sense==true:</p>
<ul>
<li>V_win performs a FIFO action for Vclk to save the interval between the last two atrial events</li>
<li>Reset Vclk</li>
<li>Update SecondLastRRThe with LastRR and empty LastRR</li>
<li>Add the last A-V interval to PRwin, if any</li>
<li>Calculate the PR association for the last ventricular interval and add to PRassociate</li>
<li>Calculate RR regularity</li>
<li>NOA_win performs a FIFO action for the number of atrial events in the last ventricular interval</li>
<li>Calculate the coupling code and do a FIFO action for PRpattern</li>
<li>Update the counter for Sinus Tachycardia, OtherSVT, AFevidence, FFRW</li>
<li>
<p>The decision tree of PRLogic is shown below. Note that unlike in RhythmID which checks VT/VF first and then SVT, PRLogic checks all potential SVTs before checking VT/VT.</p>
<p><img src="assets/img/MED_overall.jpg" alt="" width="757" height="882"></p>
</li>
</ul>
</div><!--/col-md-9-->
<div class="col-md-3">
</div>
<!--/col-md-3-->
</div><!--/row-->
</div><!--/container-->
<footer-component></footer-component>
<script type="text/javascript" src="assets/css/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="assets/css/hover-dropdown.min.js"></script>
</body>
</html>