0

In MIMIC-III database, I need to find when was the blood drawn for a patient the first time (and all the other times).

If I see various events in d_items table with label 'blood' in it, then many come out, but not sure which one is precisely for the first blood draw for a patient

select * from d_items
where dbsource <> 'carevue'
and lower(label) like '%blood%'
and lower(label) not like '%pressure%'

Returns below -

row_id  itemid  label   abbreviation    dbsource    linksto category    unitname    param_type  conceptid
13,767  225,168 Packed Red Blood Cells  PRBC's  metavision  inputevents_mv  Blood Products/Colloids mL  Solution    [NULL]
13,826  225,401 Blood Cultured  Blood Cultured  metavision  procedureevents_mv  6-Cultures  None    Process [NULL]
12,915  221,013 Whole Blood Whole Blood metavision  inputevents_mv  Fluids - Other (Not In Use) mL  Solution    [NULL]
12,295  70,049  NEOPLASTIC BLOOD    [NULL]  hospital    microbiologyevents  SPECIMEN    [NULL]  [NULL]  [NULL]
15,515  228,386 Chloride (whole blood) (soft)   Chloride (whole blood) (soft)   metavision  chartevents Labs    None    Numeric with tag    [NULL]
15,516  228,388 Glucose (whole blood) (soft)    Glucose (whole blood) (soft)    metavision  chartevents Labs    None    Numeric with tag    [NULL]
15,518  228,390 Sodium (whole blood) (soft) Sodium (whole blood) (soft) metavision  chartevents Labs    None    Numeric with tag    [NULL]
13,187  224,144 Blood Flow (ml/min) Blood Flow (ml/min) metavision  chartevents Dialysis    ml/min  Numeric [NULL]
14,825  227,464 Potassium (whole blood) Potassium (whole blood) metavision  chartevents Labs    None    Numeric with tag    [NULL]
12,339  70,093  Blood (Toxo)    [NULL]  hospital    microbiologyevents  SPECIMEN    [NULL]  [NULL]  [NULL]
12,253  70,007  BLOOD BAG FLUID [NULL]  hospital    microbiologyevents  SPECIMEN    [NULL]  [NULL]  [NULL]
12,257  70,011  BLOOD CULTURE ( MYCO/F LYTIC BOTTLE)    [NULL]  hospital    microbiologyevents  SPECIMEN    [NULL]  [NULL]  [NULL]
12,258  70,012  BLOOD CULTURE   [NULL]  hospital    microbiologyevents  SPECIMEN    [NULL]  [NULL]  [NULL]
12,259  70,013  FLUID RECEIVED IN BLOOD CULTURE BOTTLES [NULL]  hospital    microbiologyevents  SPECIMEN    [NULL]  [NULL]  [NULL]
12,260  70,014  BLOOD CULTURE - NEONATE [NULL]  hospital    microbiologyevents  SPECIMEN    [NULL]  [NULL]  [NULL]
12,261  70,015  BLOOD   [NULL]  hospital    microbiologyevents  SPECIMEN    [NULL]  [NULL]  [NULL]
12,262  70,016  BLOOD CULTURE (POST-MORTEM) [NULL]  hospital    microbiologyevents  SPECIMEN    [NULL]  [NULL]  [NULL]
12,263  70,017  SEROLOGY/BLOOD  [NULL]  hospital    microbiologyevents  SPECIMEN    [NULL]  [NULL]  [NULL]
12,278  70,032  Blood (EBV) [NULL]  hospital    microbiologyevents  SPECIMEN    [NULL]  [NULL]  [NULL]
12,298  70,052  PERIPHERAL BLOOD LYMPHOCYTES    [NULL]  hospital    microbiologyevents  SPECIMEN    [NULL]  [NULL]  [NULL]
12,306  70,060  Stem Cell - Blood Culture   [NULL]  hospital    microbiologyevents  SPECIMEN    [NULL]  [NULL]  [NULL]
12,333  70,087  Blood (CMV AB)  [NULL]  hospital    microbiologyevents  SPECIMEN    [NULL]  [NULL]  [NULL]
12,334  70,088  Blood (EBV) [NULL]  hospital    microbiologyevents  SPECIMEN    [NULL]  [NULL]  [NULL]
12,335  70,089  Blood (Malaria) [NULL]  hospital    microbiologyevents  SPECIMEN    [NULL]  [NULL]  [NULL]
15,188  228,188 Change in Blood Color   Change in Blood Color   metavision  chartevents Tandem Heart    [NULL]  Checkbox    [NULL]
14,388  226,482 Blood Clot Outdates Blood Clot Outdates metavision  datetimeevents  Labs    [NULL]  Date time   [NULL]
14,403  226,534 Sodium (whole blood)    Sodium (whole blood)    metavision  chartevents Labs    None    Numeric [NULL]
14,404  226,535 ZPotassium (whole blood)    ZPotassium (whole blood)    metavision  chartevents Labs    None    Numeric [NULL]
14,405  226,536 Chloride (whole blood)  Chloride (whole blood)  metavision  chartevents Labs    None    Numeric [NULL]
14,406  226,537 Glucose (whole blood)   Glucose (whole blood)   metavision  chartevents Labs    None    Numeric [NULL]
14,407  226,540 Hematocrit (whole blood - calc) Hematocrit (whole blood - calc) metavision  chartevents Labs    None    Numeric [NULL]
14,446  226,329 Blood Temperature CCO (C)   Blood Temp CCO (C)  metavision  chartevents Routine Vital Signs ?C  Numeric [NULL]
14,455  226,370 OR Autologous Blood Intake  OR Autologous Blood Intake  metavision  inputevents_mv  Blood Products/Colloids mL  Solution    [NULL]
14,474  226,473 Blood Transfusion Consent   Blood Transfusion Consent   metavision  chartevents General [NULL]  Checkbox    [NULL]
  • Your query gives you all the items (not events) corresponding to your criteria, the itemid being the identity code for each particular item (it is an index so there should not be a comma). Note there are d_items (chartevents) and d_labitems (labevents). The outputevents table is what you should be looking at. Then there are the inputevents tables. – Dr D.C. Ross Sep 3 at 11:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.