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

Already on GitHub? Sign in to your account

Adult patients and patients with infections #123

Open
wants to merge 3 commits into
from

Conversation

Projects
None yet
3 participants

rooster06 commented Sep 9, 2016 edited

MIMIC-III V1.3
The AdultPatients.sql script generate a table view of subject_id and corresponding hadm_id that belong to patients over the age of 18.

The infections.sql script generates a table view of subject_id, corresponding hadm_id and the start time of the suspected infection.

rooster06 added some commits Sep 9, 2016

@rooster06 rooster06 Adult patients and corresponding hospital admissions
This MIMIC-III V1.3
f26f787
@rooster06 rooster06 suspected Infection
identifying patients with suspected infection and the time of start of infection
6ad4597

@rooster06 rooster06 changed the title from Adult patients and corresponding hospital admissions to Adult patients and patients with infections Sep 11, 2016

Owner

alistairewj commented Sep 13, 2016

Thanks for the contribution. Reviewing your code, I think we shouldn't create temporary tables if they are not necessary, and at the very least should clean them up afterward. Have you seen the icustay_details query here: https://github.com/MIT-LCP/mimic-code/blob/master/demographics/postgres/icustay_detail.sql ? It performs a very similar function to your query except it does not limit the data to adult patients.

Also, the suspected infection query is interesting, but I'd put that in a separate pull request so we can discuss it separately.

Thanks, I will update it and put it in a separate pull request.

When I run the status code sql, it returns an error message as shown in the following. How can I fix this problem?

ERROR: column reference "cmo" is ambiguous
LINE 71: , max(case when rnFirst = 1 then CMO else null end) as CMO...
^

********** 错误 **********

ERROR: column reference "cmo" is ambiguous
SQL 状态: 42702
字符:2392

hi zh-zhang,

I'm not sure if this question is regarding the code i posted. can you further explain the problem you ran into?

Yes, it is not your code. I am sorry for the mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment