Giter Site home page Giter Site logo

mit-lcp / eicu-code Goto Github PK

View Code? Open in Web Editor NEW
294.0 40.0 207.0 18.58 MB

Code and website related to the eICU Collaborative Research Database

Home Page: https://eicu-crd.mit.edu

License: MIT License

Makefile 0.98% Shell 0.07% Jupyter Notebook 92.32% HTML 3.32% CSS 1.92% JavaScript 1.39%
database eicu-crd mimic physionet ehr healthcare

eicu-code's People

Contributors

alistairewj avatar jimmyjhickey avatar jraffa avatar lwiklendt avatar matthieukomorowski avatar mirkompcr avatar nickfong avatar obadawi avatar pssf23 avatar rincont avatar sichengh avatar theonesp avatar tnaumann avatar tompollard avatar zhangangus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eicu-code's Issues

Negative Apachescore values

There are some patients with negative apachescore. I was wondering what that means and if there is any interpretation for it.

iecu_capture

Column "hospitalAdmitYear" in PATIENT table seems to be missing

In the current patient.csv file, the column "hospitalAdmitYear" seems to be missing. "hospitaladmittime24" is there though.

head -n1 patient.csv
patientunitstayid,patienthealthsystemstayid,gender,age,ethnicity,hospitalid,wardid,apacheadmissiondx,admissionheight,hospitaladmittime24,hospitaladmitoffset,hospitaladmitsource,hospitaldischargeyear,hospitaldischargetime24,hospitaldischargeoffset,hospitaldischargelocation,hospitaldischargestatus,unittype,unitadmittime24,unitadmitsource,unitvisitnumber,unitstaytype,admissionweight,dischargeweight,unitdischargetime24,unitdischargeoffset,unitdischargelocation,unitdischargestatus,uniquepid

Many labname fields missing in table lab

About 22% of the rows in the table lab are empty for the field "labname", even though labresult is present.
select count(*) from eicu.lab where labname='' retrieves 5.8 E6 rows in the lab table (my version has 25.8 E6 rows).

Authentication / Host Issues

There are some complications due to postgres authentication.

I've found, the easiest fix is to make

DBHOST=127.0.0.1

and add:
--host=127.0.0.1

to the last two lines of create_eicu.sh

lab results vs revised lab results

Hi,

I couldn't find anywhere in the documentation what is the difference between the lab results time (offset) and the lab results revised time (offset).

Can you please elaborate about what is the difference between them?

Thank you very much,
Rom

Ambiguous FiO2 values in respiratorycharting table

when I run the code as below

SELECT distinct respchartvalue
from respiratorycharting
where lower(respchartvaluelabel) similar to '%fio2%'
and respchartoffset <= 1440
and respchartvalue not like '0%'
and respchartvalue not like '%\%%'
and respchartvalue not like '-%'

I got FiO2 vlues like this picture:
image

The normal range of FiO2 values is 0 ~100%, but I found the FiO2 values range from 0 to the value more than 1000.

I wonder whether the value 1 means 100% or 1% , and does the values like 1000 , 1001 greater than 100 mean 1000% 1001% or they have other meaning ?

Build DB fails at adding indexes stage

psql:postgres_add_indexes.sql:143: ERROR: column "hospitaladmityear" does not exist Makefile:347: recipe for target 'eicu-build-gz' failed make: *** [eicu-build-gz] Error 3
It looks like some of the column names have changed but indexes not updated. Was going to fix but wasn't sure of ideal substitutes. Should hospitaladmityear -> hospitaldischargeyear, and what is best for unitadmityear alternative?

Code is here:

CREATE INDEX PATIENT_idx03 
  ON PATIENT (HOSPITALADMITYEAR);
CREATE INDEX PATIENT_idx04
  ON PATIENT (UNITADMITYEAR);

Null date/times in table populated with offset of "0"

Originally raised on eicu-website. From @obadawi

We recently discovered that the ETL transforming raw eCM data into eRI data converts null date/time fields into "0" which will then appear to have an offset equal to the time of ICU admission. We believe this mainly affects the medications table which may often have null stop dates when medications are ordered but are trying to investigate further. This is something we can fix in a future eRI release but I doubt it can be updated in the current CRD release. We should add comments to the documentation to inform users of this and we can add more clarity to it as we learn more about what areas are affected.

@jraffa added a useful summary

I put this together to help understand the extent this may be problematic.

table offset cols affected total_rows pct_affected
admissiondrug drugoffset, drugenteredoffset 2327 874920 0.3
admissiondx admitdxenteredoffset 1373 626858 0.2
allergy allergyoffset, allergyenteredoffset 1105 251949 0.4
autoacuityoverridehistory timestampoffset 2 34141 0.0
autoacuityquickentry lastsavedoffset 4 104045 0.0
careplancareprovider careprovidersaveoffset 2674 502765 0.5
careplaneol cpleolsaveoffset, cpleoldiscussionoffset 675 1433 47.1
careplangeneral cplitemoffset 41959 3115018 1.3
careplangoal cplgoaloffset 575 504139 0.1
careplaninfectiousdisease cplinfectdiseaseoffset 12 8056 0.1
customlab labotheroffset 0 1082 0.0
diagnosis diagnosisoffset 414 2710672 0.0
infusiondrug infusionoffset 1248 4803719 0.0
intakeoutput intakeoutputoffset, intakeoutputentryoffset 5722 12994887 0.0
lab labresultoffset, labresultrevisedoffset 22129 39132531 0.1
medication drugorderoffset, drugstartoffset, drugstopoffset 289542 7301853 4.0
microlab culturetakenoffset 52 16996 0.3
note noteoffset, noteenteredoffset 16127 3835897 0.4
nurseassessment nurseassessoffset, nurseassessentryoffset 12342 18255000 0.1
nursecare nursecareoffset, nursecareentryoffset 7479 13618762 0.1
nursecharting nursingchartoffset, nursingchartentryoffset 144017 221108200 0.1
pasthistory pasthistoryoffset, pasthistoryenteredoffset 5740 1149180 0.5
patient hospitaladmitoffset, hospitaldischargeoffset, unitdischargeoffset 7967 200859 4.0
physicalexam physicalexamoffset 31200 9873332 0.3
respiratorycare respcarestatusoffset, ventstartoffset, ventendoffset, priorventstartoffset, priorventendoffset 865381 865381 100.0
respiratorycharting respchartoffset, respchartentryoffset 21139 26747237 0.1
smartalert triggeroffset, reactivateoffset 378158 596603 63.4
ssadmf expirationoffset 0 473 0.0
treatment treatmentoffset 671 3688745 0.0
vitalaperiodic observationoffset 12278 25075074 0.0
vitalperiodic observationoffset 13484 146671642 0.0

Code Manual

Is there a code manual for the eICU database, i.e. something that let's me know what the numeric codes you use in your data mean when they represent something else? For instance, when pulling up the apachePredVar table there is a row titled admitsource which can be numbered 1-8 but I am unsure what each of these different numbers represent. There are other similar rows such as amilocation, discharge location, etc. Is there a code manual that defines what these numbers represent? Thanks.

There's no create-user recipe

Checked the makefile and there is no create-user recipe plus running the command gives me this error:

make: *** No rule to make target 'create-user'. Stop.

empty volumeffluid in infusiondrug table

two quick question,

  1. What is the relationship between volumeoffluid and drug amount? Does volumeoffluid also contain drug amount?
  2. Why there exist empty volumeffluid? I found that most of the NS fluid has empty value
    screenshot 2018-05-01 00 38 34

Which records can be selseted into my study cohort?

  1. How can I rank the order for the patienthealthsystemstayid of the same uniquepid according to the admission time?

  2. If I want to predict the onset of AKI based on the available data 24h before the onset, should I include the records that the patient first visit the hospital or ICU(actually, they were entered the hospital or ICU several times, while I just select the first record for each patient),or should I just include the patient who were entered the hospital or the ICU for only once?

New releases of eICU-CRD will be announced here

New releases of eICU-CRD will be announced here. To keep up to date on the latest releases, click the 'subscribe' button to receive notifications.

image

Please do not use this thread to ask for updates on the status of data releases.

partition for the table

Hi, I saw the tutorial of partition the table, so I just follow the steps in the document or it has been done in the load_data sql script?

Medication table

Can anyone shed some light on drugorderoffset and drugstartoffset columns in medication table ? Following the definitions given, drugstartoffset >= drugorderoffset (at least that's what I assumed, may be I'm wrong). But I've seen entries where drugorderoffset is followed by drugstartoffset.

image

Heart rhythm data

Hello.

Are there heart rhythm data on the eICU database?

mimic-III has the chartevents table containing, among other things, recorded heart rhythm data e.g. sinus, atrial fibrillation.

I can't seem to find an equivalent in the eICU database! I'm probably missing something simple.

Many thanks.

Determine end-of-life care

The documentation of activeUponDischarge in carePlanEOL states:

denotes if the EOL discussion was active upon discharge: True or False

Does activeUponDischarge being true imply that the EOL discussion was concluded?
Does it also mean that it was decided to stop life therapy?

More generally, what is the best way to extract from eICU-CRD whether a decision to stop life therapy was made before discharge from the ICU?
I've already found the suggestion in #8 to search for terms like CMO, DNR, and DNAR in nurseassessment.

Cardiopulmonary resuscitation

Is there a way to determine if patients received CPR / suffered cardiac arrest prior to (or during) ICU admission?

eICU and MIMIC Dataset

Hi,

Please what is the different between the eICU and MIMIC dataset?

Can they both be used for mortality prediction?

Edit this page

I think the link of the button 'Edit this page' is obsolete.

labresults with the same labresultoffset

@tompollard
when I selected some variables from lab table, found out there are several different lab results with the same labresultoffset, it means different values in the same time? how can it be!

for example, patientunitstayid = 245087 and labresultoffset = 11, there are two different ph values.

Identifying bolus or continuous infusion drug in eICU

Is that possible identifying whether a iv drug is given by bolus or continuous infusion in eICU?

Is the drug recorded in infusiondrug as continuous infusion? But I found some of the drug in the table infusiondrug have infusionrate and others are not, can I say those infusionrate is not null as continuous infusion? And how can I know how long of this infusion really administrated? Is the same iv drug recorded both in table medication and infusiondrug? The documentation is not quite detail in eICU.

Thanks a lot.

Patient Mortality

Does the eICU database collect patient mortality after discharge (like the MIMIC database) to allow the calculation for 30-day mortality? Thank you,

Description for Diagnosisstring in diagnosis table

It would be helpful if someone would elaborate on what the 'diagnosisstring' in the diagnosis table means. The description in the 'Tables in ICU' for diagnosis seems incomplete.

Is there a difference if the terms in the string are separated by a / Vs | ?

For instance in case of these entry

"gastrointestinal|hepatic disease|hepatic dysfunction|with cirrhosis|alcoholic"

"neurologic|altered mental status / pain|drug withdrawal syndrome|alcohol"

Also I was wondering about the usefulness of 'diagnosisstring' in diagnosis table or
'admitDxText' in the admissiondx table to identify the reason for ICU admission in cases where icd9 code is missing.

MIMIC-3 / eICU patient overlap?

Hello,
Does the eICU dataset include the Beth Deaconess? i.e. may patients contained in MIMIC-3 also turn up in the eICU database?
Thanks

Pain assessment data

Is there any data related to pain assessments (i.e. Pain Ratings, Pain Type, Pain Location)? I thought they might be in the nurseassessment table, but I have not found any pain related data.

Are there any plans to add pain assessment data?

Data cleaning \ validation

I found out several records which I believe to have illegal values, e.g in vitalperiodic, vitalperiodicid = 783984588 the temperature value is -2622.2000.

Has anyone did some work regarding cleaning the data?

add note for reviewers to front page of website

How can we ensure that authors of papers using eicu-crd follow the data use agreement around code sharing, paper citation etc?

One suggestion is adding a note to the front page of the website saying "If you are a reviewer of a paper using the eICU Collaborative Research Database, please ensure that the authors have: (1) made their code available (2) cited the paper describing the data (3) etc."

what is risk level of different services?

I would like to know risk level of the below services.
CMED, CSURG , MED, NMED, NSURG, ORTHO, OMED, PSYCH, SURG, TRAUM, TSURG, VSURG

e.g. CMED has a higher risk level than MED or SURG?

I also like to know, Can we detect if a patient will move to an another service by reading their HR,BPs,BPs and SPO2?

Ventilation in respiratorycare

Hi guys,

When I tried to extract ventilation from respiratorycare, there are some cases that ventstartoffset is larger than ventendoffset (e.g. patientunitstayid= 141168). Should we refer to respcarestatusoffset for these cases or exclude? In addition, for cases that ventendoffset=0, are they removed from ventilation when admitted to ICU unit? Thanks.

Identifying terminal extubation among patients

Dear magnificent lcp team,

While trying to evaluate tachypnea episodes within MIMIC patients, we realized that the data is not granular enough so we thought that eICU must have a more granulated one.
Thus in order to identify terminal extubated patients in the eICU, we were wondering:

  • Can we identify extubations? If so, where?
  • Can we identify patients receiving CMO (neither DNR nor EOL)? If so, where?

The outcomes for these patients we will need are:

  1. Respiratory Rate TimeStamps at least every 10 min.
  2. Morphine Infusion TimeStamps at least every 30min?

It would be wonderful if as well we had:

  1. At least 10 min freq. Heart Rate TimeStamp
  2. Hourly PAIN Score TimeStamps

Thanks a lot for your time.

when is the APACHEday and why are some the variables repeated many times?

I noticed in apachepredvar you have meds, verbal, motor, eyes, pao2 and fio2 repeated twice - once for first day and once for APACHE day.

I found this brief explanation on your page for apacheApsVar: 'The APACHE day refers to the time period in which clinical variables can be used in the algorithms.' I read online that the APACHE score is taken on the first day, so what is the difference between these?

I wrote a quick query to investigate, they look the same:

select a.eyes, ap.eyes, ap.day1eyes from apacheapsvar as a
inner join apachepredvar as ap on a.patientunitstayid = ap.patientunitstayid
limit 100;

Create a view with a script in /concepts, suggesting that some fields are missing

Using the script provided in GitHub to complete the creation of the database, then I want to create a view using the script in /concepts, and found that multiple scripts will report errors during the creation of the view.
For example:
Use icustay_detail.sql to create a view, suggesting that there is no hospitaladmityear in the patient, verifying the database structure found that this field does not exist.
I would like to ask, what is wrong with this view and database structure?

get data with patients' all 1st patientunitstayid (icustay_id)

  • Getting the 1st icustay according to unitvisitnumber.
    By using
 SELECT count(*) from patient
 WHERE unitvisitnumber =1

then I get 158442 icustay_ids.

  • The second thinking
    But I have found that there exists the case :
    for example, one patient had multiple hospital admissions(patienthealthsystemstayids), and each hospital admission has ordered icustay_ids ,but sometimes these icustay_ids can be assigned sequence numbers starting with 1 and sometimes with 2 or a higher value.
    So, I used
with firstIcu as (
     SELECT  uniquepid
                , patienthealthsystemstayid as hadmid
                , patientunitstayid as ICUSTAY_ID
                , row_number() OVER (PARTITION BY uniquepid, patienthealthsystemstayid ORDER BY unitvisitnumber) AS first_icu
     FROM eicu.icustay_detail
)
SELECT  uniquepid
           , hadmid
           , ICUSTAY_ID
FROM  firstIcu
    WHERE first_icu = 1

and I get 166355 icustay_ids.
I wonder whether my second thought that treating a higher unitvisitnumber greater than 1 as the 1st icustay for some hospital admissions is right.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.