MIT-LCP / eicu-code

Code and website related to the eICU Collaborative Research Database
https://eicu-crd.mit.edu
MIT License
307 stars 212 forks source link

Identify patients with Cirrhosis #207

Open yugangjia opened 1 year ago

yugangjia commented 1 year ago

Hi, I am trying to identify patients with Cirrhosis before their icu admission. I searched the "pasthistorypath" in the physionet-data.eicu_crd.pasthistory table and find out the following values are relevant with Cirrhosis

"notes/Progress Notes/Past History/Organ Systems/Gastrointestinal (R)/Cirrhosis/jaundice", "notes/Progress Notes/Past History/Organ Systems/Gastrointestinal (R)/Cirrhosis/UGI bleeding", "notes/Progress Notes/Past History/Organ Systems/Gastrointestinal (R)/Cirrhosis/encephalopathy", "notes/Progress Notes/Past History/Organ Systems/Gastrointestinal (R)/Cirrhosis/ascites", "notes/Progress Notes/Past History/Organ Systems/Gastrointestinal (R)/Cirrhosis/varices", "notes/Progress Notes/Past History/Organ Systems/Gastrointestinal (R)/Cirrhosis/biopsy proven", "notes/Progress Notes/Past History/Organ Systems/Gastrointestinal (R)/Cirrhosis/clinical diagnosis", "notes/Progress Notes/Past History/Organ Systems/Gastrointestinal (R)/Cirrhosis/coma"

Any of those should be excluded? Thanks

jraffa commented 1 year ago

Not what you're asking, but have a look at the diagnosis table too.

yugangjia commented 1 year ago

Thanks. I do find more patients with diagnosis table. My updated query is like this: select distinct * from ( select distinct patientunitstayid from physionet-data.eicu_crd.pasthistory where pasthistorypath in ( "notes/Progress Notes/Past History/Organ Systems/Gastrointestinal (R)/Cirrhosis/jaundice", "notes/Progress Notes/Past History/Organ Systems/Gastrointestinal (R)/Cirrhosis/UGI bleeding", "notes/Progress Notes/Past History/Organ Systems/Gastrointestinal (R)/Cirrhosis/encephalopathy", "notes/Progress Notes/Past History/Organ Systems/Gastrointestinal (R)/Cirrhosis/ascites", "notes/Progress Notes/Past History/Organ Systems/Gastrointestinal (R)/Cirrhosis/varices", "notes/Progress Notes/Past History/Organ Systems/Gastrointestinal (R)/Cirrhosis/biopsy proven", "notes/Progress Notes/Past History/Organ Systems/Gastrointestinal (R)/Cirrhosis/clinical diagnosis", "notes/Progress Notes/Past History/Organ Systems/Gastrointestinal (R)/Cirrhosis/coma") union all select distinct patientunitstayid from physionet-data.eicu_crd.apachepredvar where cirrhosis=1 union all select distinct patientunitstayid from physionet-data.eicu_crd.diagnosis where icd9code in ("571.2, K70.3", "571.5, K74.60", "571.6, K74.5", "571.5, K74.69") ) order by patientunitstayid

yugangjia commented 1 year ago

select distinct * from ( select distinct patientunitstayid from physionet-data.eicu_crd.pasthistory where pasthistorypath in ( "notes/Progress Notes/Past History/Organ Systems/Gastrointestinal (R)/Cirrhosis/jaundice", "notes/Progress Notes/Past History/Organ Systems/Gastrointestinal (R)/Cirrhosis/UGI bleeding", "notes/Progress Notes/Past History/Organ Systems/Gastrointestinal (R)/Cirrhosis/encephalopathy", "notes/Progress Notes/Past History/Organ Systems/Gastrointestinal (R)/Cirrhosis/ascites", "notes/Progress Notes/Past History/Organ Systems/Gastrointestinal (R)/Cirrhosis/varices", "notes/Progress Notes/Past History/Organ Systems/Gastrointestinal (R)/Cirrhosis/biopsy proven", "notes/Progress Notes/Past History/Organ Systems/Gastrointestinal (R)/Cirrhosis/clinical diagnosis", "notes/Progress Notes/Past History/Organ Systems/Gastrointestinal (R)/Cirrhosis/coma") union all select distinct patientunitstayid from physionet-data.eicu_crd.apachepredvar where cirrhosis=1 union all select distinct patientunitstayid from physionet-data.eicu_crd.diagnosis where diagnosisstring in ("gastrointestinal|hepatic disease|hepatic dysfunction|with cirrhosis", "gastrointestinal|hepatic disease|hepatic dysfunction|with cirrhosis|biliary", "gastrointestinal|hepatic disease|hepatic dysfunction|with cirrhosis|alcoholic", "gastrointestinal|hepatic disease|hepatic dysfunction|with cirrhosis|cryptogenic") )

mirkompcr commented 1 year ago

I am not at all familiar with eICU, but in your code you are referencing: icd9code in ("571.2, K70.3", "571.5, K74.60", "571.6, K74.5", "571.5, K74.69")

This also includes icd10 codes, e.g. K74.5. Otherwise the codes seem sensible to me to include. Would also include these: K74.3 to K74.6

this query sounds reasonable to me ("gastrointestinal|hepatic disease|hepatic dysfunction|with cirrhosis", "gastrointestinal|hepatic disease|hepatic dysfunction|with cirrhosis|biliary", "gastrointestinal|hepatic disease|hepatic dysfunction|with cirrhosis|alcoholic", "gastrointestinal|hepatic disease|hepatic dysfunction|with cirrhosis|cryptogenic") )