mimic-code icon indicating copy to clipboard operation
mimic-code copied to clipboard

WARDIDs and transfers within the ICU

Open EmmaRocheteau opened this issue 4 years ago • 2 comments

I would really like to do a study that looks at the destination of patients after they leave ICU. I'm a bit confused looking at the transfers table and would like some help if possible:

To illustrate with one hospital stay:

mimic=> select icustay_id, eventtype, prev_careunit, curr_careunit, prev_wardid, curr_wardid from transfers where hadm_id = 155897;

 icustay_id | eventtype | prev_careunit | curr_careunit | prev_wardid | curr_wardid

 249202 | admit     |               | MICU          |             |          52

        | transfer  | MICU          |               |          52 |          32

 249202 | transfer  |               | MICU          |          32 |          52

        | transfer  | MICU          |               |          52 |          32

 249202 | transfer  |               | MICU          |          32 |          23

        | discharge | MICU          |               |          23 |

This example brings about my first question: this particular patient has the same icustay_id throughout, but they appear to be transferred out of an ICU area twice? How does this work?

I noted some things regarding WARDIDs on your website:

  • "Note that the grouping of physical locations in the hospital database is referred to as a ward. Though in practice ICUs are not referred to as wards, the hospital database technically tracks ICUs as “wards with an ICU cost center”. As a result, each ICU is associated with a WARDID, but not every WARDID is an ICU."
  • "The care unit is defined based upon the ward: if the ward is an ICU cost center, then the care unit defines the type of ICU. If the ward is not an ICU then in most cases the care unit is null."

I ran some quick queries:

mimic=> select count(distinct prev_wardid) from transfers; count

53

mimic=> select count(distinct prev_wardid) from transfers where prev_careunit is null; count

42

mimic=> select count(distinct curr_wardid) from transfers where curr_careunit is null; count

40

mimic=> select count(distinct prev_wardid) from transfers where prev_careunit is not null; count

19

mimic=> select count(distinct curr_wardid) from transfers where curr_careunit is not null; count

19

To me this means that there are 53 different wards, of which 53-42=11 are always associated with an ICU cost center. A further 19-11=8 may or may not be associated with an ICU cost center (this seems slightly at odds with the second quote on there - are these patients outliers of full ICU centers?), and 53-19=34 are reliably not (ordinary wards I presume).

A classification problem with 53 output classes will be too many. I was wondering if you had any further information regarding the grouping of these wards? Particularly wards 55, 2, 45, 17, 40, 31, 18, 3, 4, 54, 24 and 36. It would be fantastic if you could tell me what these are.

EmmaRocheteau avatar Aug 29 '19 22:08 EmmaRocheteau

Just to add to this, I've found something else that confuses me. The transfers table and the callout tables seem inconsistent to me:

mimic=> select subject_id, hadm_id, curr_careunit, curr_wardid, callout_wardid, discharge_wardid, callout_service from callout where callout_outcome = 'Discharged' limit 10; subject_id | hadm_id | curr_careunit | curr_wardid | callout_wardid | discharge_wardid | callout_service

    854 |  175684 | MICU          |          29 |              1 |               29 | MED
    864 |  138624 | CSRU          |          55 |             55 |               55 | CSURG
    864 |  138624 | CSRU          |          55 |             55 |               55 | CSURG
    867 |  184298 | CCU           |          17 |             17 |               17 | CCU
    306 |  167129 | SICU          |           3 |             44 |                3 | NSURG
    307 |  132807 | SICU          |           8 |              8 |                8 | SURG
    307 |  161712 | MICU          |          55 |              1 |               55 | MED
    309 |  162308 | CCU           |           2 |              2 |                2 | CCU
    310 |  142159 | SICU          |           3 |              1 |                3 | NSURG
    319 |  124954 | MICU          |          45 |              1 |               45 | MED

From the website:

  • "CURR_WARDID identifies the ward in which the patient resides when called out (i.e. prior to discharge/transfer). CURR_CAREUNIT indicates which ICU cost center the CURR_WARDID corresponds to (note: since all patients are being discharged from an ICU, all patients should reside in an ICU cost center)."

But in the transfers table, all of these wards are never associated with an ICU care center:

select distinct curr_wardid, curr_careunit, count(distinct row_id) from transfers group by curr_wardid, curr_careunit order by curr_wardid; curr_wardid | curr_careunit | count

       2 |               |  9345
       3 |               |  5775
       4 |               |  4505
       5 | NWARD         |  4376
       6 |               |    51
       7 | CCU           |  6837
       7 |               |   548
       8 |               |  1295
       9 |               |   865
      10 |               |    29
      11 |               |     3
      12 | CSRU          |  3529
      12 | MICU          |  2181
      12 |               |     1
      13 |               |    23
      14 | CSRU          |  3809
      14 | SICU          |   609
      14 | TSICU         |  6051
      15 | CSRU          |  4696
      15 | MICU          |  2750
      15 |               |     2
      16 | MICU          |   156
      17 |               |  9149
      18 |               |  5412
      19 |               |     2
      20 |               |     5
      22 | SICU          |    58
      23 | CSRU          |  1120
      23 | MICU          |  5601
      23 | SICU          |  1068
      23 | TSICU         |   664
      23 |               |     5
      24 |               |  3147
      25 |               |    79
      26 | NICU          |  1200
      27 |               |  7011
      28 |               |  1192
      29 |               |  2212
      30 |               |   187
      31 |               |  6207
      32 |               |  2960
      33 | CSRU          |   442
      33 | SICU          |  5123
      33 | TSICU         |  1382
      33 |               |     5
      34 |               |    52
      35 |               |    25
      36 |               |  4689
      37 | CCU           |    81
      38 | MICU          |    71
      39 |               |    25
      40 |               |  7019
      41 |               |    84
      42 | NICU          |    93
      43 | NWARD         |  3919
      44 |               |    20
      45 |               |  8529
      47 | CSRU          |    67
      48 |               |  1864
      49 |               |  7624
      50 | MICU          |  5276
      51 |               |   183
      52 | MICU          | 10365
      52 |               |    47
      54 |               |  4690
      55 |               | 12072
      56 | NICU          | 17336
      57 | CCU           |  2624
      57 | SICU          |  4465
      57 | TSICU         |    67
         |               | 58943

The curr_wardid is almost always the same as the discharge_wardid unless the patient is going home. Has the curr_wardid in the callout table been mislabelled?

EmmaRocheteau avatar Aug 30 '19 16:08 EmmaRocheteau

This example brings about my first question: this particular patient has the same icustay_id throughout, but they appear to be transferred out of an ICU area twice? How does this work?

Apologies for the delay in responding to your issue. Regarding this first question, based on the _careunit variables it doesn't look like they are transferred outside of the MICU. The _wardid variables represent a physical location within the hospital but not necessarily what care is being provided in that location.

The curr_wardid is almost always the same as the discharge_wardid unless the patient is going home. Has the curr_wardid in the callout table been mislabelled?

I'm not sure if I fully understand what you are asking here. I'd expect there would be overlap between the curr_wardid and discharge_wardid, especially when curr_wardid is an ICU.

briangow avatar Sep 24 '21 14:09 briangow