Step 1: Pull all values with the following concepts that are within the time bounds of 4 hours before Anesthesia Start and PACU End Time.:
- 3011 BP Sys Invasive Unspecified Site 1
- 3012 BP DIas Invasive Unspecified Site 1
- 3013 BP Mean Invasive Unspecified Site 1
- 3015 BP Sys Non-invasive
- 3020 BP Dias Non-invasive
- 3025 BP Mean non-invasive
- 3026 BP Sys Invasive Unspecified Site 4
- 3027 BP Dias Invasive Unspecified Site 4
- 3028 BP Mean Invasive Unspecified Site 4
- 3030 BP Sys Aterial Line (Invasive, Peripheral)
- 3035 BP Dias Arterial Line (Invasive, Peripheral)
- 3040 BP Mean Arterial Line (Invasive, Peripheral)
- 3041 BP Sys Invasive Unspecified Site 2
- 3042 BP Dias Invasive Unspecified Site 2
- 3043 BP Mean Invasive Unspecified Site 2
- 3046 BP Sys Invasive Unspecified Site 3
- 3047 BP Dias Invasive Unspecified Site 3
- 3048 BP Mean Invasive Unspecified Site 3
- 3475 BP Sys Invasive Unspecified Site 5
- 3476 BP Dias Invasive Unspecified Site 5
- 3477 BP Mean Invasive Unspecified Site 5
*Aortic BP is not used because it does not have the same clinical meaning
Step 2: Truncate seconds from the BP timestamp
Step 3: If multiple values are present for a given minute and concept, take the highest value
Step 4: Combine components of the same BP category into a single row for each minute. See example below:
BEFORE
BP Time |
BP Concept |
Value |
9:01 AM |
BP Sys Non-invasive |
120 |
9:01 AM |
BP Dias Non-invasive |
80 |
9:01 AM |
BP Mean Non-invasive |
93 |
9:01 AM |
BP Sys Arterial Line (Invasive, Peripheral) |
125 |
9:01 AM |
BP Dias Arterial Line (Invasive, Peripheral) |
100 |
9:01 AM |
BP Mean Arterial Line (Invasive, Peripheral) |
108 |
AFTER
BP Time |
BP Category |
Systolic |
Diastolic |
Recorded Mean |
9:01 AM |
BP Non-Invasive |
120 |
80 |
93 |
9:01 AM |
BP Arterial Line (Invasive, Peripheral) |
125 |
100 |
108 |
Step 5: For each blood pressure, compute an approximate BP mean from the systolic and diastolic to account for the absence of a recorded mean. [Computed Mean = (SYS + DIAS + DIAS) / 3 ]
Step 6: Apply the following artifact rules to each value
Rule
|
Artifact Code
|
Any of the original component sys, dias, or mean values were marked as artifact in the original system |
1 |
Sys > 150 AND (Sys - Dias) < 30 |
2 |
Sys >= 100 AND Sys <= 150 AND (Sys - Dias) < 15 |
3 |
Sys < 100 AND (Sys - Dias) < 10 |
4 |
Sys > 200 AND (Sys - Dias) < 50 |
5 |
Sys <= 10 OR Dias <= 10 |
6 |
Sys = Dias = Mean |
7 |
Recorded or Calculated Mean <= 10 |
8 |
Mean >= 150 |
9 |
Single Spike in Dias |
11 |
Sys > 350 OR Dias > 250 |
12 |
Recorded Mean > Sys |
13 |
Dias > Recorded Mean |
14 |
Dias > Sys |
15 |
Dias is Missing OR Sys is Missing |
16 |
Step 7: Find single value spikes by comparing each BP dias to the BP values of the same category one minute before and after. If the previous value and next value are within 10% of each other and the middle value is twice that of the previous value, mark the middle value with artifact code 11.
Step 8: For each minute within a case that has a BP value, rank all BP values within that minute to determine the "primary" BP for that minute
- Non-artifact values are ranked over artifact values
- Values with both a systolic and a diastolic are ranked over those that don't (e.g. BP mean only was recorded)
- Values with a recorded BP mean are ranked over those that don't
- Of any remaining BP values, the one with the highest systolic is chosen
- BP components (sys/dias/mean) are grouped together based on source (invasive vs. non-invasive)
Step 9: For every "primary" BP that is not artifact, compute the number of minutes until the next available BP value
Output: This phenotype will result in 4 columns:
- BP_Time - Time of the BP Value
- BP_Sys, BP_Dias, BP_Mean_Recorded, BP_Mean_Computed- These columns lists all of the BP values for each minute that a BP value was captured. Including the ones that the MPOG algorihm above determined to be Artifact.
- MPOG_Marked_Artifact_CD - This column lists the artifact code that the value falls into based on the rule table above.
- BP_Sys_Cleaned, BP_Dias_Cleaned, BP_Mean_Recorded_Cleaned, BP_Mean_Computed_Cleaned - These columns return only the values determined to not be artifact based on the rule table above. (Note, artifact values are removed)
Example Case:
BP_Time |
BP_Sys |
BP_Dias |
BP_Mean_Recorded |
BP_Mean_Computed |
MPOG_Marked_Artifact_CD |
BP_Sys_Cleaned |
BP_Dias_Cleaned |
BP_Mean_Recorded_Cleaned |
BP_Mean_Computed_Cleaned |
3/29/24 8:56 |
21 |
-8 |
-6 |
2 |
1 |
|
|
|
|
3/29/24 8:57 |
161 |
71 |
93 |
101 |
1 |
|
|
|
|
3/29/24 8:58 |
240 |
3 |
75 |
82 |
6 |
|
|
|
|
3/29/24 8:59 |
342 |
286 |
11 |
305 |
12 |
|
|
|
|
3/29/24 9:00 |
179 |
76 |
115 |
110 |
0 |
179 |
76 |
115 |
110 |
3/29/24 9:01 |
200 |
144 |
160 |
163 |
9 |
|
|
|
|
3/29/24 9:02 |
214 |
99 |
144 |
137 |
0 |
214 |
99 |
144 |
137 |
3/29/24 9:03 |
229 |
153 |
245 |
178 |
1 |
|
|
|
|
3/29/24 9:04 |
205 |
93 |
139 |
130 |
0 |
205 |
93 |
139 |
130 |
3/29/24 9:05 |
304 |
301 |
304 |
302 |
2 |
|
|
|
|
3/29/24 9:06 |
218 |
181 |
194 |
193 |
5 |
|
|
|
|
3/29/24 9:07 |
138 |
63 |
249 |
88 |
1 |
|
|
|
|
3/29/24 9:08 |
104 |
95 |
93 |
98 |
3 |
|
|
|
|
3/29/24 9:09 |
132 |
64 |
91 |
87 |
0 |
132 |
64 |
91 |
87 |
3/29/24 9:10 |
126 |
62 |
86 |
83 |
0 |
126 |
62 |
86 |
83 |
3/29/24 9:11 |
120 |
58 |
246 |
79 |
1 |
|
|
|
|
3/29/24 9:12 |
111 |
57 |
77 |
75 |
0 |
111 |
57 |
77 |
75 |
3/29/24 9:13 |
106 |
54 |
73 |
71 |
0 |
106 |
54 |
73 |
71 |
3/29/24 9:14 |
92 |
51 |
92 |
65 |
7 |
|
|
|
|
3/29/24 9:15 |
144 |
74 |
99 |
97 |
0 |
144 |
74 |
99 |
97 |
3/29/24 9:16 |
128 |
65 |
89 |
86 |
0 |
128 |
65 |
89 |
86 |
3/29/24 9:17 |
116 |
59 |
250 |
78 |
1 |
|
|
|
|
3/29/24 9:18 |
115 |
60 |
250 |
78 |
1 |
|
|
|
|
3/29/24 9:19 |
110 |
57 |
78 |
75 |
0 |
110 |
57 |
78 |
75 |
3/29/24 9:20 |
104 |
55 |
73 |
71 |
0 |
104 |
55 |
73 |
71 |
3/29/24 9:21 |
104 |
54 |
72 |
71 |
0 |
104 |
54 |
72 |
71 |
3/29/24 9:22 |
157 |
82 |
250 |
107 |
1 |
|
|
|
|
3/29/24 9:23 |
156 |
81 |
109 |
106 |
0 |
156 |
81 |
109 |
106 |
3/29/24 9:24 |
141 |
70 |
96 |
94 |
0 |
141 |
70 |
96 |
94 |
3/29/24 9:25 |
204 |
139 |
167 |
161 |
9 |
|
|
|
|
3/29/24 9:26 |
114 |
58 |
79 |
77 |
0 |
114 |
58 |
79 |
77 |
3/29/24 9:27 |
105 |
55 |
74 |
72 |
0 |
105 |
55 |
74 |
72 |
3/29/24 9:28 |
95 |
50 |
67 |
65 |
0 |
95 |
50 |
67 |
65 |
3/29/24 9:29 |
129 |
68 |
90 |
88 |
0 |
129 |
68 |
90 |
88 |
3/29/24 9:30 |
130 |
69 |
91 |
89 |
0 |
130 |
69 |
91 |
89 |
3/29/24 9:31 |
110 |
|
|
|
8 |
|
|
|
|
3/29/24 9:32 |
120 |
62 |
83 |
81 |
0 |
120 |
62 |
83 |
81 |
3/29/24 9:33 |
131 |
66 |
90 |
88 |
0 |
131 |
66 |
90 |
88 |
3/29/24 9:34 |
133 |
67 |
91 |
89 |
0 |
133 |
67 |
91 |
89 |
3/29/24 9:35 |
60 |
57 |
58 |
58 |
4 |
|
|
|
|
3/29/24 9:36 |
136 |
68 |
93 |
91 |
0 |
136 |
68 |
93 |
91 |
3/29/24 9:37 |
137 |
68 |
93 |
91 |
0 |
137 |
68 |
93 |
91 |
3/29/24 9:38 |
110 |
57 |
168 |
75 |
13 |
|
|
|
|
3/29/24 9:39 |
114 |
50 |
74 |
71 |
0 |
114 |
50 |
74 |
71 |
3/29/24 9:40 |
65 |
55 |
52 |
58 |
14 |
|
|
|
|
3/29/24 9:41 |
109 |
51 |
72 |
70 |
0 |
109 |
51 |
72 |
70 |
3/29/24 9:42 |
138 |
67 |
93 |
91 |
0 |
138 |
67 |
93 |
91 |
3/29/24 9:43 |
153 |
115 |
130 |
128 |
11 |
|
|
|
|
3/29/24 9:44 |
123 |
55 |
80 |
78 |
0 |
123 |
55 |
80 |
78 |