Incorrect "value" boundaries for laboratory 'itemid = 50983' (sodium, blood, chemistry) in MIMIC-IV
For the laboratory item 50983 there seems to be an issue with incorrect boundaries in MIMIC-IV: (With the exception of 2 values of 117 mmol/l) all reported numerical values lie between 125 mmol/l and 150 mmol/l. This is in stark contrast to the MIMIC-III data and does not make any sense at all from a clinical standpoint. One would expect thousands of values below and above these thresholds. The missing values are probably hidden within the more than 500000 "double underscores" reported (in contrast to only 2 in MIMIC-III). Is there a way to fix this bug? Thanks a lot for looking into this!
I don't understand your observation. What do you mean by "incorrect boundaries"? The ref_range_lower and ref_range_upper values are 133 or 135 and 146 or 147, respectively. In MIMIC-IV v3.1, here is the distribution of serum sodium values:
MariaDB [mimic4v31]> select valuenum, count(*) n from labevents where itemid=50983 group by valuenum order by valuenum;
+----------+--------+
| valuenum | n |
+----------+--------+
| NULL | 606 |
| 67 | 1 |
| 73 | 1 |
| 74 | 1 |
| 79 | 1 |
| 80 | 2 |
| 81 | 1 |
| 82 | 3 |
| 83 | 3 |
| 84 | 3 |
| 85 | 2 |
| 86 | 4 |
| 87 | 6 |
| 88 | 1 |
| 89 | 2 |
| 90 | 2 |
| 91 | 2 |
| 92 | 3 |
| 93 | 4 |
| 94 | 1 |
| 95 | 2 |
| 96 | 3 |
| 97 | 7 |
| 98 | 8 |
| 99 | 5 |
| 100 | 11 |
| 101 | 13 |
| 102 | 23 |
| 103 | 20 |
| 104 | 17 |
| 105 | 30 |
| 106 | 46 |
| 107 | 51 |
| 108 | 67 |
| 109 | 89 |
| 110 | 102 |
| 111 | 125 |
| 112 | 155 |
| 113 | 221 |
| 114 | 311 |
| 115 | 381 |
| 116 | 615 |
| 117 | 885 |
| 118 | 1200 |
| 119 | 1614 |
| 120 | 2256 |
| 121 | 2749 |
| 122 | 3240 |
| 123 | 3427 |
| 124 | 3236 |
| 125 | 13567 |
| 126 | 15196 |
| 127 | 19020 |
| 128 | 25641 |
| 129 | 35144 |
| 130 | 48539 |
| 131 | 66601 |
| 132 | 90211 |
| 133 | 123286 |
| 134 | 164220 |
| 134.2 | 1 |
| 135 | 217700 |
| 136 | 281949 |
| 137 | 352476 |
| 138 | 418180 |
| 138.5 | 1 |
| 139 | 458680 |
| 140 | 454680 |
| 141 | 398517 |
| 142 | 309080 |
| 143 | 215457 |
| 144 | 137148 |
| 145 | 84270 |
| 146 | 51288 |
| 147 | 32471 |
| 148 | 21583 |
| 149 | 15633 |
| 150 | 12189 |
| 151 | 4009 |
| 152 | 4799 |
| 153 | 4210 |
| 154 | 3246 |
| 155 | 2475 |
| 156 | 1888 |
| 157 | 1460 |
| 158 | 1062 |
| 159 | 808 |
| 160 | 609 |
| 161 | 442 |
| 162 | 363 |
| 163 | 323 |
| 164 | 236 |
| 165 | 197 |
| 166 | 178 |
| 167 | 125 |
| 168 | 118 |
| 169 | 94 |
| 170 | 69 |
| 171 | 61 |
| 172 | 37 |
| 173 | 33 |
| 174 | 33 |
| 175 | 32 |
| 176 | 26 |
| 177 | 21 |
| 178 | 17 |
| 179 | 17 |
| 180 | 12 |
| 182 | 1 |
| 184 | 1 |
| 185 | 1 |
+----------+--------+
Thanks a lot for the fast reply. I was using value instead of valuenum. My bad and thanks again!
You're very welcome. I do wonder why so many of these entries have value being ---, which sounds like a bug. Usually, when a value is numeric, valuenum is just a numeric version of the number represented in text as value. That is clearly not the case here, and the same valuenum is sometimes associated with its text representation and sometimes with ---.
MariaDB [mimic4v31]> select valuenum, value, count(*) n from labevents where itemid=50983 group by valuenum, value order by valuenum, value;
+----------+-------+--------+
| valuenum | value | n |
+----------+-------+--------+
| NULL | NULL | 606 |
| 67 | ___ | 1 |
| 73 | ___ | 1 |
| 74 | ___ | 1 |
| 79 | ___ | 1 |
| 80 | ___ | 2 |
| 81 | ___ | 1 |
| 82 | ___ | 3 |
| 83 | ___ | 3 |
| 84 | ___ | 3 |
| 85 | ___ | 2 |
| 86 | ___ | 4 |
| 87 | ___ | 6 |
| 88 | ___ | 1 |
| 89 | ___ | 2 |
| 90 | ___ | 2 |
| 91 | ___ | 2 |
| 92 | ___ | 3 |
| 93 | ___ | 4 |
| 94 | ___ | 1 |
| 95 | ___ | 2 |
| 96 | ___ | 3 |
| 97 | ___ | 7 |
| 98 | ___ | 8 |
| 99 | ___ | 5 |
| 100 | ___ | 11 |
| 101 | ___ | 13 |
| 102 | ___ | 23 |
| 103 | ___ | 20 |
| 104 | ___ | 17 |
| 105 | ___ | 30 |
| 106 | ___ | 46 |
| 107 | ___ | 51 |
| 108 | ___ | 67 |
| 109 | ___ | 89 |
| 110 | ___ | 102 |
| 111 | ___ | 125 |
| 112 | ___ | 155 |
| 113 | ___ | 221 |
| 114 | ___ | 311 |
| 115 | ___ | 381 |
| 116 | ___ | 615 |
| 117 | ___ | 883 |
| 117 | 117 | 2 |
| 118 | ___ | 1200 |
| 119 | ___ | 1614 |
| 120 | ___ | 2256 |
| 121 | ___ | 2749 |
| 122 | ___ | 3240 |
| 123 | ___ | 3427 |
| 124 | ___ | 3236 |
| 125 | ___ | 1784 |
| 125 | 125 | 11783 |
| 126 | ___ | 1720 |
| 126 | 126 | 13476 |
| 127 | ___ | 1962 |
| 127 | 127 | 17058 |
| 128 | ___ | 2629 |
| 128 | 128 | 23012 |
| 129 | ___ | 3449 |
| 129 | 129 | 31695 |
| 130 | ___ | 4746 |
| 130 | 130 | 43793 |
| 131 | ___ | 6150 |
| 131 | 131 | 60451 |
| 132 | ___ | 8385 |
| 132 | 132 | 81826 |
| 133 | ___ | 11265 |
| 133 | 133 | 112021 |
| 134 | ___ | 15020 |
| 134 | 134 | 149200 |
| 134.2 | ___ | 1 |
| 135 | ___ | 19703 |
| 135 | 135 | 197997 |
| 136 | ___ | 25735 |
| 136 | 136 | 256213 |
| 136 | 136. | 1 |
| 137 | ___ | 32924 |
| 137 | 137 | 319552 |
| 138 | ___ | 40794 |
| 138 | 138 | 377386 |
| 138.5 | ___ | 1 |
| 139 | ___ | 48243 |
| 139 | 139 | 410437 |
| 140 | ___ | 53512 |
| 140 | 140 | 401168 |
| 141 | ___ | 53517 |
| 141 | 141 | 345000 |
| 142 | ___ | 47848 |
| 142 | 142 | 261232 |
| 143 | ___ | 37923 |
| 143 | 143 | 177534 |
| 144 | ___ | 26930 |
| 144 | 144 | 110218 |
| 145 | ___ | 17595 |
| 145 | 145 | 66675 |
| 146 | ___ | 10749 |
| 146 | 146 | 40539 |
| 147 | ___ | 6872 |
| 147 | 147 | 25599 |
| 148 | ___ | 4394 |
| 148 | 148 | 17189 |
| 149 | ___ | 3095 |
| 149 | 149 | 12538 |
| 150 | ___ | 2337 |
| 150 | 150 | 9852 |
| 151 | ___ | 4009 |
| 152 | ___ | 4799 |
| 153 | ___ | 4210 |
| 154 | ___ | 3246 |
| 155 | ___ | 2475 |
| 156 | ___ | 1888 |
| 157 | ___ | 1460 |
| 158 | ___ | 1062 |
| 159 | ___ | 808 |
| 160 | ___ | 609 |
| 161 | ___ | 442 |
| 162 | ___ | 363 |
| 163 | ___ | 323 |
| 164 | ___ | 236 |
| 165 | ___ | 197 |
| 166 | ___ | 178 |
| 167 | ___ | 125 |
| 168 | ___ | 118 |
| 169 | ___ | 94 |
| 170 | ___ | 69 |
| 171 | ___ | 61 |
| 172 | ___ | 37 |
| 173 | ___ | 33 |
| 174 | ___ | 33 |
| 175 | ___ | 32 |
| 176 | ___ | 26 |
| 177 | ___ | 21 |
| 178 | ___ | 17 |
| 179 | ___ | 17 |
| 180 | ___ | 12 |
| 182 | ___ | 1 |
| 184 | ___ | 1 |
| 185 | ___ | 1 |
+----------+-------+--------+