forked from derekmerck/PERSEUS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yaml
232 lines (187 loc) · 9.84 KB
/
config.yaml
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# PERSEUS v0.3 Sample Config (10/15 Rules)
# ----------------------------------
# Sample rules, zones, and roles with coverage and messenger relays.
rules:
# Device state is matched one by one against rules in the given order. The _first_ matched rule is returned.
#
# Example format:
#- priority: {MAX|HIGH|LOW|None}
# conditions:
# alarm_source: [EQ, NOM_ECG_CARD_BEAT_RATE, etc...]
# alarm_code: [EQ, NOM_EVT_ECG_ASYSTOLE, etc...]
# bpm: [GT|GTE|LT|LTE|EQ|NEQ|TLT|TGT, value] # TLT = "trending less than", TGT = "trending greater than"
# spo2: [GT|GTE|LT|LTE|EQ|NEQ|TLT|TGT, value] # TLT = "trending less than", TGT = "trending greater than"
# ecg: [GOOD|POOR]
# pleth: [GOOD|POOR]
# message: String that will be formatted with the rule dictionary keys (160 char for SMS; 240 char for alphatext page)
#
# LK general notes: need to specify *source(s)* of alert, i.e., alarm_source, as origin of alarm_code as a condition
# full alarm_code names to avoid potential similar alarms from other sources in Philips system
# e.g., "MAX.ALERT: Room C-1; Alert# 2; VTach | HR 122 | No current SpO2 reading"
# Derek's Thoughts: We need to define an _aggregation function_ and _aggregation interval_ and
# _history Interval_. Maybe all the same, maybe rule or condition specific
# ie, max(bpm) in last 10 seconds > X or avg(bpm) in last 2 minutes > X.
# History and aggregation may be the same thing -- did any of the 10 second intervals
# over the last 2 minutes have these qualities?
# Another complexity is that the last 30 seconds may be partially incomplete
### MAXIMUM PRIORITY
#1 [VFIB ALERT] WITH PULSATILE, SPO2 PLETH (FALSE POSITIVE)
- priority: None
conditions:
alarm_source: [HAS, NOM_ECG_CARD_BEAT_RATE]
alarm_code: [HAS, NOM_EVT_ECG_ASYSTOLE, NOM_ECG_V_FIB_TACHY] # Philips system seems to think simulated VFib is VFib *or* asystole-> >>Philips alarm<<
# pleth: [EQ, _qualitatively good signal, pulsatile_]
alert_str: None # ignoring false positive
#2 VFIB ALERT WITHOUT PULSATILE SPO2 PLETH
- priority: MAX
conditions:
alarm_source: [HAS, NOM_ECG_CARD_BEAT_RATE]
alarm_code: [HAS, NOM_EVT_ECG_ASYSTOLE, NOM_ECG_V_FIB_TACHY] # VFib, unknown if true or false alarm-> PERSEUS ALERT
# pleth: [EQ, POOR] # Philips system seems to think simulated VFib is VFib *or* asystole->
alert_str: "V.FIB"
#4 VTACH ALERT WITH HIGH HEART RATE WITH PULSATILE SPO2 PLETH (SPO2 VALUE <= 89%)
- priority: MAX
conditions:
alarm_source: [HAS, NOM_ECG_CARD_BEAT_RATE, NOM_ECG_V_P_C_CNT]
alarm_code: [HAS, NOM_EVT_ECG_V_TACHY] # VTach with pulsatile flow, likely true alarm-> PERSEUS ALERT
bpm: [GT, 100]
spo2: [LTE, 89]
# pleth: [EQ, GOOD]
alert_str: "V.TACH | Current HR {bpm} bpm | Current SpO2 {spo2} % | Latest BP {BP} mmHg ({BP_dt} min ago)"
#3 VTACH ALERT WITH HIGH HEART RATE WITHOUT PULSATILE PLETH
- priority: MAX
conditions:
alarm_source: [HAS, NOM_ECG_CARD_BEAT_RATE, NOM_ECG_V_P_C_CNT]
alarm_code: [EQ, NOM_EVT_ECG_V_TACHY] # VTach, unknown if true or false alarm-> PERSEUS ALERT
bpm: [GT, 100]
# pleth: [EQ, POOR]
alert_str: "V.TACH | Current HR {bpm} bpm | No current SpO2 reading"
### HIGH PRIORITY
#5 VTACH ALERT WITH HIGH HEART RATE WITH PULSATILE SPO2 PLETH (SpO2 VALUE >=90%)
- priority: HIGH
conditions:
alarm_source: [HAS, NOM_ECG_CARD_BEAT_RATE, NOM_ECG_V_P_C_CNT]
alarm_code: [HAS, NOM_EVT_ECG_V_TACHY] # VTach with pulsatile flow, likely true alarm-> PERSEUS ALERT
bpm: [GT, 100]
spo2: [GTE, 90]
# pleth: [EQ, GOOD]
alert_str: "V.TACH | Current HR {bpm} bpm | Current SpO2 {spo2} % | Latest BP {BP} mmHg ({BP_dt} min ago)"
#6 BRADYCARDIA ALERT WITH PULSATILE PLETH
- priority: HIGH
conditions:
alarm_source: [HAS, NOM_ECG_CARD_BEAT_RATE, NOM_PULS_OXIM_SAT_O2]
alarm_code: [HAS, NOM_EVT_ECG_BRADY_EXTREME, NOM_EVT_LO*, NOM_EVT_BRADY] # Bradycardic rhythm with pulsatile flow, likely true alarm-> PERSEUS ALERT
bpm: [LTE, 30] # *** only if from alarm_source NOM_ECG_CARD_BEAT_RATE
# pleth: [EQ, GOOD]
alert_str: "BRADYCARDIA | Current HR {bpm} bpm | Current SpO2 {spo2} % | Latest BP {BP} mmHg ({BP_dt} min ago)"
#7 BRADYCARDIA ALERT WITHOUT PULSATILE PLETH
- priority: HIGH
conditions:
alarm_source: [HAS, NOM_ECG_CARD_BEAT_RATE, NOM_PULS_OXIM_SAT_O2]
alarm_code: [HAS, NOM_EVT_ECG_BRADY_EXTREME, NOM_EVT_LO*, NOM_EVT_BRADY] # Bradycardic rhythm without pulsatile flow, unknown if true or false alarm -> >>Philips alarm<<
bpm: [LTE, 30] # *** only if from alarm_source NOM_ECG_CARD_BEAT_RATE
# pleth: [EQ, POOR]
alert_str: None # defer to Philips system
#8 TACHYCARDIA ALERT WITH PULSATILE PLETH
- priority: HIGH
conditions:
alarm_source: [HAS, NOM_ECG_CARD_BEAT_RATE, NOM_PULS_OXIM_SAT_O2]
alarm_code: [HAS, NOM_EVT_ECG_TACHY_EXTREME, NOM_EVT_HI*, NOM_EVT_TACHY] # Tachycardic rhythm with pulsatile flow, likely true alarm-> PERSEUS ALERT
bpm: [GTE, 140] # *** only if from alarm_source NOM_ECG_CARD_BEAT_RATE
# pleth: [EQ, GOOD]
alert_str: "TACHYCARDIA | Current HR {bpm} bpm | Current SpO2 {spo2} % | Latest BP {BP} mmHg ({BP_dt} min ago)"
#9 TACHYCARDIA ALERT WITHOUT PULSATILE PLETH
- priority: HIGH
conditions:
alarm_source: [HAS, NOM_ECG_CARD_BEAT_RATE, NOM_PULS_OXIM_SAT_O2]
alarm_code: [HAS, NOM_EVT_ECG_TACHY_EXTREME, NOM_EVT_HI*, NOM_EVT_TACHY] # Tachycardic rhythm without pulsatile flow, unknown if true or false alarm -> >>Philips alarm<<
bpm: [GTE, 140] # *** only if from alarm_source NOM_ECG_CARD_BEAT_RATE
# pleth: [EQ, POOR]
alert_str: None # defer to Philips system
#10 BRADYCARDIA TREND ALERT
- priority: HIGH
conditions:
alarm_source: [HAS, NOM_ECG_CARD_BEAT_RATE] # 5-min trend towards bradycardia, current HR =< 60 -> PERSEUS ALERT
bpm: [TLT, 60]
alert_str: "HR RAPIDLY TRENDING DOWN | Current HR {bpm} bpm | Current SpO2 {spo2} % | Latest BP {BP} mmHg ({BP_dt} min ago)"
#11 TACHYCARDIA TREND ALERT
- priority: HIGH
conditions:
alarm_source: [HAS, NOM_ECG_CARD_BEAT_RATE] # 5-min trend towards tachycardia, current HR >= 110 -> PERSEUS ALERT
bpm: [TGT, 110]
alert_str: "HR RAPIDLY TRENDING UP | Current HR {bpm} bpm | Current SpO2 {spo2} % | Latest BP {BP} mmHg ({BP_dt} min ago)"
#12 SPO2 HYPOXIA ALERT WITH PULSATILE PLETH
- priority: HIGH
conditions:
alarm_source: [HAS, NOM_PULS_OXIM_SAT_O2] # Hypoxic SpO2 with pulsatile flow, likely true alarm-> PERSEUS ALERT
alarm_code: [HAS, NOM_EVT_LO*, NOM_EVT_DESAT]
spo2: [LTE, 89]
# pleth: [EQ, GOOD]
alert_str: "HYPOXIA | Current SpO2 {spo2}"
### MEDIUM PRIORITY
#13 SPO2 TREND ALERT
- priority: HIGH
conditions:
alarm_source: [HAS, NOM_PULS_OXIM_SAT_O2] # 5-min trend towards hypoxia, current SpO2 =< 91 -> PERSEUS ALERT
spo2: [TLT, 91]
alert_str: "SpO2 RAPIDLY TRENDING DOWN | Current SpO2 {spo2}"
#14 HYPOTENSION TREND ALERT
- priority: HIGH
conditions:
alarm_source: [HAS, NOM_PRESS_BLD_NONINV_SYS] # 5-min trend towards hypotension, current SBP =< 110 -> PERSEUS ALERT
spo2: [TLT, 100]
alert_str: "BP RAPIDLY TRENDING DOWN | Latest BP {BP} mmHg ({BP_dt} min ago)"
#15 HYPERTENSION TREND ALERT
- priority: HIGH
conditions:
alarm_source: [HAS, NOM_PRESS_BLD_NONINV_SYS] # 5-min trend towards hypertension, current SBP >= 180 -> PERSEUS ALERT
spo2: [TGT, 180]
alert_str: "BP RAPIDLY TRENDING UP | Latest BP {BP} mmHg ({BP_dt} min ago)"
# Assign all hosts to a zone, any host not in a zone will be ignored
# A host may appear in more than one zone
zones:
# Assuming that you are using test logs from the provided sample data
zone1:
- sample1A
- sample1B
- sample1C
zone2:
- sample1D
- sample1E
- sample1F
# For each role, assign zones and priorities, and alert relays. When a host issues an alert,
# it is passed on to relevant zones and then onto relevant roles for dispatch.
roles:
# All alerts
team:
zones:
zone1: [LOW, MEDIUM, HIGH]
zone2: [LOW, MEDIUM, HIGH]
relays:
slack:
channel: !!python/object/apply:os.getenv [SLACK_TEST_CHANNEL]
# All zone1, high zone2
zone1_manager:
zones:
zone1: [LOW, MEDIUM, HIGH]
zone2: [HIGH]
relays:
twilio-sms:
number: !!python/object/apply:os.getenv [SMS_TEST_NUMBER]
# All zone2, high zone 1
zone2_manager:
zones:
zone2: [LOW, MEDIUM, HIGH]
zone1: [HIGH]
relays:
email-sms:
number: !!python/object/apply:os.getenv [SMS_TEST_NUMBER]
carrier: !!python/object/apply:os.getenv [SMS_TEST_CARRIER]
# All high alerts
site_manager:
zones:
zone2: [HIGH]
zone1: [HIGH]
relays:
slack:
channel: !!python/object/apply:os.getenv [SLACK_TEST_DMSG]