AmsterdamUMC / AmsterdamUMCdb

AmsterdamUMCdb - Freely Accessible ICU database. Please access our Open Access manuscript at https://doi.org/10.1097/CCM.0000000000004916
https://amsterdammedicaldatascience.nl/
MIT License
156 stars 43 forks source link

Are these numbers reasonable? #71

Closed sullen-194 closed 1 year ago

sullen-194 commented 1 year ago

I have no idea how to fact check other way, still trying to figure out how the database works. I have a question about mechanical ventilation modes - I am trying to extract NIV patients. Found in process items "Beademen non-invasief", google translate says that should be patients receiving noninvasive ventilation.

SELECT admissionid ,start ,stop ,duration FROM processitems WHERE itemid = 10740 --Ventilatie Mode (Set)

I get around 1000 patients, is it reasonable or are they stored somewhere else too?

Also, when I try to extract SpO2 for them, seems like 50% of the patients have SpO2 in the first two hours of their NIV ventilation.

WITH spo AS ( SELECT n.admissionid, n.itemid, n.item, n.value, CASE WHEN NOT n.registeredby IS NULL THEN TRUE ELSE FALSE END as validated, (n.measuredat - a.admittedat)/(1000*60*60) AS time, FROM numericitems n LEFT JOIN admissions a ON n.admissionid = a.admissionid WHERE itemid IN ( 12311, --O2-Saturatie (bloed) 6709 --Saturatie (Monitor) ) and n.admissionid IN UNNEST(@admissionids) ) SELECT * FROM spo

So, either I am looking at this data wrong, or it is possible that not all of these patients are monitored?

patrickthoral commented 1 year ago

The most recent SQL code can be found here. In addition, you could combine this with mechanical ventilation modes containing NIV: admissions[(admissions['non_invasive_bool'] == True) | (admissions['mechanical_ventilation_modes'].str.contains('NIV'))] or use valueid 16, --PC in NIV and 17, --PS/CPAP in NIV directly with

itemid IN 
(12290, --Ventilatie Mode (Set) - Servo-I and Servo-U ventilators
12347 --Ventilatie Mode (Set) (2) Servo-I and Servo-U ventilators
)
patrickthoral commented 1 year ago

The should get you 1379 patients.

sullen-194 commented 1 year ago

Thank you very much!