Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have a question about "ventilation.sql" #1723

Open
hidoyebi opened this issue Mar 19, 2024 · 2 comments
Open

I have a question about "ventilation.sql" #1723

hidoyebi opened this issue Mar 19, 2024 · 2 comments

Comments

@hidoyebi
Copy link

Prerequisites

Description

Hello, I have a question about "mimic-code/mimic-iv/concepts postgres/treatment/ventilation.sql" on github.

https://github.com/MIT-LCP/mimic-code/blob/main/mimic-iv/concepts_postgres/treatment/ventilation.sql

There is "Having MIN(charttime) <> MAX(charttime)" at the end of this code. Using the condition, number 3 of seq_num in the image below will be excluded. I am curious about why the "having" condition is used and whether this case corresponds to weaning failure.

image

@alistairewj
Copy link
Member

Oh does it remove that case? It shouldn't. having MIN(charttime) <> MAX(charttime) is equivalent to not-equal, so it should only filter out rows where the start time is equal to the end time. It might be that these are weaning failures, would be very interested in investigation there. I added it because there were a ton of 0 length events, and the goal of the duration query is to get durations not point estimates.

@hidoyebi
Copy link
Author

Thank you for your reply. In vd2(temporary table), number 3 of seq_num exists only one row, so min(charttime) and max(charttime) are excluded because they are the same time.

Number 3 of seq_num case, it seems that the process was to test whether the patient could breathe spontaneously.

I will take your advice into consideration. Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants