ICU Patient Velocity Model

ICU Patient Velocity Model preview image

1 collaborator

Lendgroup Jeff Kahn (Author)

Tags

flow models 

"people flow"

Tagged by Jeff Kahn almost 11 years ago

health care 

"Understand patient flow through the intensive care unit"

Tagged by Jeff Kahn almost 11 years ago

Model group MAM-2013 | Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.0.4 • Viewed 730 times • Downloaded 73 times • Run 0 times
Download the 'ICU Patient Velocity Model' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


WHAT IS IT?

ICU care is costly. Lives are stake. Dollars on the line; some studies show that 2 pennies on every dollar spent in this country are flowing to ICU costs. This model attempts to explore the basic mechanisms that drive patient flow through the ICU. By understanding how patients flow and overflow in the ICU, we may be able to devise better strategies to smooth the flow, bring down costs, and save lives.

You will discover how the number of caregivers, the amount of time that caregivers spend caring for their patients and various discharge standards affect the flow of patients through the ICU. More importantly, this model serves as an object to think with and build with when thinking about patient flow.

HOW IT WORKS

There are two important agents: patients and care-givers. Patients come into the ICU with varying degrees of sickness rated on the Acute Physiology and Chronic Health Evaluation (APACHE) score. The higher the apache, the sicker the patient.

Press Setup

  1. Create the ICU layout including beds and care-giver room
  2. Create initial patients
  3. Create initial care-givers
  4. Care-givers are assigned to patients in order of acuity ex. Sick patients (apache > 30) are assigned first...

Press Go

  1. Patients flow in to the ICU with probability based on the hour of the day
  2. The new patients are assigned care-givers
  3. Care-givers treat their patients. If I have two patients, I split time between each of them.
  4. Patients either improve their health or decrease their health based on the quality of care.
  5. Depending on how sick I am, there is some chance that I die
  6. If I have been healthy for set amount of hours or days, I am ready for discharge at 7am

HOW TO USE IT

Wash before eating, do not breathe this. But really the fumes are toxic. Feel free to push buttons. Learn about them below:

Interface Items

n: number of caregivers initial patient mean: allows adjustment of the mean of how many initial patients are in the icu. care-time%: set the percent of the day that caregivers spend on directly providing care. stable hours needed: set the threshold for how many hours a patient needs to be stable for before being discharged. strict discharge?: In the on position, patients that are ready for discharge leave at 7am. In the off position, they leave as soon as they hit the threshold set above. stable-apche: set the apache score to be considered stable for that hour. For example, if stable apache is set to 10 and your apache is 9, you will be considered stable for that hour.

THINGS TO NOTICE

Visually, you should notice how the colors of the patients are changing. High-risk patients (red), medium-risk patients (yellow), and low risk patients (green) get darker the sicker they get within their category.

Also notice how the caregivers move to the cyan rooms on the bottom of the world. This is to help visualize how caregivers move in and out of treating their patients. This could be very interesting if the model extended into geospatial constraints. It also helps to visualize how changing the care-time % can change where the care givers are located.

You'll often see, if their are many care-givers to the amount of patients, huddles around a newly admitted sick patient. The care givers typically huddle around until the patient is healed quickly or dies from severe illness. Do you agree with the assumption that the less busy the ICU is, the more likely caregivers will be to work together to heal somebody? How does this affect the flow dynamics? Maybe it makes sense to have standby teams of high performing teams to stablize a patient and then hand off to few caregivers once stablized?

THINGS TO TRY

Pay attention to how changing the number of care-givers affects the number of patient overflows. Why might this be the case based on how the model functions? How does varying care-time affect the model and why? Do you agree with the assumption that increasing care-time increases the chance of recovery?

Move around stable-hours-needed and see how it affects the model. Try clicking on a patient and caregiver interaction to see how acuity score changes over time. This gives you a feel for the micro behavior of the model. Compare this to the mean length of stay chart.

You can also try decreasing stable-apache. Why might this parameter have a critical value?

EXTENDING THE MODEL

This model can be extended in many ways as was the goal of this model. View the list below:

  1. Add agents (different nurses) that have a differential ability to treat patients (experience, training, education, etc)
  2. Adapt the model to be more specific to a given ICU. Allow input of historical ICU census data, number of beds, number of caregivers
  3. Add in geospatial constraints. Allow custom room-layouts and model travel time.
  4. Deeper verification of the model with relevant literature.
  5. Model quality of care with finer resolution. Add in things like equipment, administrative support, etc.
  6. Implmenent and test different flow smoothing strategies. Either from literature or based off intuition. For example, how should patients be optimally discharged?

NETLOGO FEATURES

Most of the code is standard NetLogo. Most of the interesting and or tricky components were working with lists. Using the remainder primitive is very useful to turn ticks into hours of the day which allows hour by hour based model dyamics. I used this feature a few times throughout the model, but notably when setting up the patient arrival distribution.

RELATED MODELS

The base layout for this model was taken from the model published below. Unfortunately, the model below does not follow the ABM framework. This made analyzing the model for validity difficult. As a result, none of the logic was used in the creation of this model other than the physical layout.

Leykum LK, Kumar, P, Parchman ML, McDaniel RR, Lanham HJ, Agar, M. Use of Agent-Based Model to Understand Clinical Systems Journal of Artificial Societies and Social Simulation 2012 Jan;15(3)

CREDITS AND REFERENCES

Thanks to Northwestern Memorial Hospital Medical Intensive Care Unit for providing reference data as well as observation and interivew opportunities. Also thank you to Arthur Hjorth, Uri Wilensky, Donna Woods, and Jacob Kelter for feedback and advice on the development of this model.

The model can be found on the NetLogo Modeling Commons: http://modelingcommons.org/browse/onemodel/3662#modeltabsbrowsediscuss

Comments and Questions

ICU

Donna is right. Remember the ABM design principle, Start simple and build towards the question you want to answer.

Posted almost 11 years ago

Update Model Picture (Question)

How do I go about changing the model picture? Do I need to upload a new model entirely?

Posted almost 11 years ago

Model Picture

I think I got it. Just need to upload a preview image.

Posted almost 11 years ago

Click to Run Model

breed [care-givers care-giver]
breed [beds bed]
breed [patients patient]


globals [
  overflow ;;holds overflow count
  patient-arrival-chance ;; List containing probability of arrival for each hour
]

patients-own [initial-apache apache acuity TTL LOS stable-ticks my-caregiver recieving-care? care-count death-prob bed-number ]
beds-own [occupied?]
care-givers-own [my-patients treat-count acuity-score]

to setup
  ca
  
  ;;;;;;;;;;;;;;;
  ;;Setup Layout
  ;;;;;;;;;;;;;;;
  
  ask patches with [pycor > 10 and pycor < 40] [set pcolor white]
  ask patches with [pycor < 10 and pxcor < 20] [set pcolor cyan]
  ask patches with [pycor < 10 and pxcor > 20] [set pcolor cyan]
  
  
  ;;;;;;;;;;;;
  ;;Setup Beds
  ;;;;;;;;;;;;
  
  ask patches with [pycor = 20 or pycor = 30 and pxcor > 5 and pxcor < 35 and pxcor mod 3 = 0] [set pcolor 99]
  ask patches with [pycor = 21 or pycor = 31 and pxcor > 5 and pxcor < 35 and pxcor mod 3 = 0] [set pcolor 99.1]
  set-default-shape beds "square"
  ask patches with [pcolor = 99] [sprout-beds 1 [set size 1 set color 99 set heading 0]]
  
  ;;;;;;;;;;;;;;;;;;;;
  ;;Setup Care-Givers
  ;;;;;;;;;;;;;;;;;;;;
  
  set-default-shape care-givers "person"
  ask n-of n patches with [pcolor = white] [sprout-care-givers 1 [
    set size 2
    set color blue
    set my-patients[]
  ]]
  set-default-shape patients "person"
  
  
  
  ;;;;;;;;;;;;;;;;;;;;;;;;
  ;;Setup Initial Patients
  ;;;;;;;;;;;;;;;;;;;;;;;;
  let initial-patient random-normal initial-patient-mean 2 ;; normal intitializtion of how many patients there are. Initial conditions likely affect system performance.
  if initial-patient > count beds [set initial-patient 20] 
  ask beds [set occupied? false]
  ask n-of initial-patient beds [hatch-patients 1 [set color red set size 2 set bed-number [who] of myself  ] set occupied? true]
  ask patients [ 
    set-apache                                 ;; based off of Naved et al. (2011) - APACHE-II Score Correlation with Mortality and Length of Stay in an ICU
    set-ttl 
    set my-caregiver nobody
    set recieving-care? false
    set-death-prob
    set-patient-color 
  ] 
  assign-patient
  ;;Patient Arrival Probability List
  set patient-arrival-chance [ 12 12 10 10 11 15 18 15 15 13 11 10 ] ;; Assuming that more patients come in the middle of the day. in two hour blocks 
  reset-ticks
end 

to go
  ask beds [
    if not any? patients-here [set occupied? false]  
  ]
  patient-inflow
  assign-patient
  treat-patients
  ask patients [advance-health] ; patients either improve or get sicker depending on quality of care
  ask patients [if random-float 1 < death-prob [remove-patient] ]       ;;patients can randomly die according to their accuity
  ask care-givers [clean-list]
  discharge-patients 
  ask care-givers [clean-list]
  ask patients [set LOS LOS + 1]
  ask patients [set-patient-color] ;; to visualize how sick patients are
  
  tick
end 






;; admits patients if there are available beds. Patients arrive based on the defined patient arrival probability list with added noise

to patient-inflow
  if random 100 < random-normal 0 2 + item (remainder ticks 12) patient-arrival-chance [
    ifelse any? beds with [occupied? = false]  [admit-patient] [overflow-patient] ] ;; each tick, patients either flow in or are overflowed
end 


;; Creates the patient on an open bed

to admit-patient
  ask one-of beds with [occupied? = false] [hatch-patients 1 [
    set color red
    set size 2
    set-apache                                 
    set my-caregiver nobody
    set recieving-care? false
    set-apache
    set-ttl
    set-death-prob
    set bed-number [who] of myself
    set-patient-color
    
  ]
    set occupied? true]
  ask care-givers [clean-list]
end 

;;Increases the overflow count variable

to overflow-patient
  set overflow overflow + 1
end 

;; This procedure holds the logic for treating patients

to treat-patients
  ;; Aiken et al, 2002: increase in one patient to nurses assignment increases mortalilty rate 7%
  
  
  let dedicated-care-givers care-givers with [length my-patients = 1 and item 0 my-patients != nobody] ;; select care-givers that only have one patient
  ask dedicated-care-givers [
    ifelse random 100 < care-time [
      move-to item 0 my-patients
      fd 2
      set treat-count treat-count + 1
      ask item 0 my-patients [
        set recieving-care? true
        set care-count care-count + 1 ;; increasing by ten with each tick?
        set recieving-care? false
      ]
    ]
    [
      ask dedicated-care-givers [move-to one-of patches with [pcolor = cyan]] 
    ]
  ]
  
  
  
  
  
  let multi-care-givers care-givers with [length my-patients > 1]
  ask multi-care-givers [
    ifelse random 2 = 0 [
      ifelse random 100 < care-time [
        move-to item 0 my-patients
        fd 2
        ask item 0 my-patients [
          set recieving-care? true
          set care-count care-count + 1 ;; increasing by ten with each tick?
          set recieving-care? false
        ] ] 
      [move-to one-of patches with [pcolor = cyan]]
    ][
    ifelse random 100 < care-time [
      if item 1 my-patients != nobody [ ;; ensure that the care-giver has a second patient
        move-to item 1 my-patients
        fd 2
        ask item 1 my-patients [
          set recieving-care? true 
          set care-count care-count + 1
          set recieving-care? false
        ]
      ]
    ]
    [move-to one-of patches with [pcolor = cyan]
    ]
    ] 
  ]
end 


;;Patients that are stable are discharged  starting at 7am

to discharge-patients
  ;; every morning at 7 am patients are discharged
  ifelse strict-discharge? [
  if remainder ticks 24 = 7 [
    ask patients with [ stable-ticks > stable-hours-needed ] [
      remove-patient
    ] ]]
  [ask patients with [ stable-ticks > stable-hours-needed ] [
      remove-patient]
  
  ]
end 

;; This procedure abstracts quality of care into how often the care-giver treats the patient. 
;; If the quality of care is high the patient is more likely to improve their health.

to advance-health
  if LOS > 0 [
    let quality-of-care (care-count / LOS) + random-normal 0 .1              ;; patient-centric quality of care plus a little noise
    if random-float 1 < quality-of-care [improve-health] ;; 
    
    
    if random-float 1 < 1 - quality-of-care [worsen-health] ;; includes error rates like nonsocomial infections, falls, HAI, and others
    
                                                            ;;If patient is low acuity, they add to a stability counter which determines if they are ready for discharge
    ifelse apache < stable-apache [set stable-ticks stable-ticks + 1] [set stable-ticks 0]]
  set-death-prob
end 




;;;;;;;;;;;;;;;;;;;;               
;; Helper Methods ;; Methods that are called throughout the model
;;;;;;;;;;;;;;;;;;;;

;; a patient procedure to remove the patient from the ICU

to remove-patient
  if my-caregiver != nobody [ 
    
    ask my-caregiver [ set my-patients remove myself my-patients]
  ]
  die
  ask beds [
    if not any? patients-here [set occupied? false] 
  ]
end 


;; decreaing apache score is equivalent to reducing acuity

to improve-health
  set apache apache - random-normal .2 .05
end 

;; increasing apache is equivalent to increasing patient acuity

to worsen-health
  set apache apache + random-normal .2 .05
end 

;;larger number the darker the color: 

to set-patient-color
  if acuity = "high" [
    set color scale-color red apache 60 25
  ]
  
  if acuity = "medium" [
    set color scale-color yellow apache 50 0
  ]
  
  if acuity = "low" [
    set color scale-color green apache 20 -10 
  ]
end 


;; sets the death probability for each patient group which defines how likely it is that a patient will die during that tick.

to set-death-prob
  if acuity = "low" [ 
    set death-prob abs ( random-normal .1 .05 / ttl) ;; based on Naved Et al. results .1 is the mortality % divded by the number of days the patient is expected to stay in the ICU
  ]
  
  if acuity = "medium" [
    set death-prob abs (random-normal .4 .25 / ttl)
  ]
  
  if acuity = "high" [
    set death-prob abs ( random-normal .85 .05 / ttl )
  ]
end 



;; This procedure sets the apache score for each patient
;; Imputed from Naved et al. (2011) - APACHE-II Score Correlation with Mortality and Length of Stay in an ICU

to set-apache
  if initial-apache < 10 [set initial-apache random-normal 25 12 set apache initial-apache]
  group-apache
  if initial-apache < 10 [set-apache]    ; makes sure no patient has a negative apache or very small apache
end 


;;groups each patient based on the apache score.

to group-apache
  if apache <= 10 [ set acuity "low"] ;; 10% death
  if apache >= 30 [ set acuity "high"]  ;; 85% death
  if apache > 10 and apache < 30 [ set acuity "medium"] ;; but around 40-50% death More randomness with these patients
end 

;; sets the Time to Live of each patient

to set-ttl
  set ttl abs (random-normal 69 93 )           ;; this is length of stay data from literature                
end 


;;;;;;;;;;;;;;;;;;;;;
;;;Patient Assignment
;;;;;;;;;;;;;;;;;;;;;

to assign-patient
  
 
  let sick-patients patients with [ my-caregiver = nobody and acuity = "high"] ;; find high acuity patients without a care-giver 
  let dedicated-caregivers care-givers with [ length my-patients = 0] ;; find care-givers that don't have yet assignment
  ask dedicated-caregivers[
    set my-patients fput one-of sick-patients my-patients ;; adding one of the sick patients to the front of my-patients list
    if item 0 my-patients != nobody[                      ;; accesing first item in list
      ask item 0 my-patients [ set my-caregiver myself]   ;; I ask my patient to set their caregiver to me.
    ]
  ]
  
  
  ;; Assigns remaining care-givers that do not have any patients
  let remaining-patients patients with [(acuity = "medium" or acuity = "low") and my-caregiver = nobody]
  let remaining-empty-caregivers care-givers with [length my-patients = 0 or my-patients = [nobody]] ;; assign rest of caregivers that don't have a patient first
  if any? remaining-patients and any? remaining-empty-caregivers [
    ask remaining-empty-caregivers [
      set my-patients fput one-of remaining-patients my-patients
      ask item 0 my-patients [set my-caregiver myself]
    ]
  ]
  
  
  ;this assignment heuristic makes sure that no patient is left un-cared for
  let leftover-patients patients with [my-caregiver = [] or my-caregiver = nobody ]
  ask care-givers [
    clean-list
    set acuity-score 0
    foreach my-patients [set acuity-score acuity-score + [apache] of ?] ; add up the apache scores of your patients
  ]
  
  ;; asks the neccesarry amount of caregivers with the lowest agregate acuity to take care of the left over patients
  ask min-n-of (count leftover-patients) care-givers [acuity-score]  [    
    set my-patients fput one-of leftover-patients my-patients
    ask item 0 my-patients [set my-caregiver myself]
  ] 
end 


;;this makes sure that the my-patient list doesn't have nobody in the list.
;;this code is called throughout the model

to clean-list
  set my-patients remove nobody my-patients
end 








;;;;;;;;;;;;;;;           
;;Reporters 
;;;;;;;;;;;;;;;



;; census is taken at 7am every morning

to-report census
  report count patients
end 

to-report mean-apache
  report mean [apache] of patients
end 

to-report bed-utilization
  report count beds with [occupied? = true] / count beds
end 

to-report caregiver-patient-ratio
  report precision (count care-givers / count patients) 2
end 


;; add in monitors if need be. These measures are useful for adding on new features and debugging

to-report empty-patients
  report count patients with [my-caregiver = [] or my-caregiver = nobody ]
end 

to-report empty-caregivers
  report count care-givers with [my-patients = []]
end 

There are 5 versions of this model.

Uploaded by When Description Download
Jeff Kahn almost 11 years ago Final Version Download this version
Jeff Kahn almost 11 years ago updated with patient inflow and caregiver assignments Download this version
Jeff Kahn almost 11 years ago Version 1.3 (Not functioning) Download this version
Jeff Kahn almost 11 years ago Basic Patient Setup Included Download this version
Jeff Kahn almost 11 years ago Initial upload Download this version

Attached files

File Type Description Last updated
ABM_Project_Report.pdf pdf Final Project Report almost 11 years ago, by Jeff Kahn Download
ABM_Proposal_1.1.pdf background Proposal Version 1.1 almost 11 years ago, by Jeff Kahn Download
ABM_Proposal_1.pdf background Initial Proposal 1.0 almost 11 years ago, by Jeff Kahn Download
ABMComplexHealth.pdf background Literature almost 11 years ago, by Jeff Kahn Download
APACHE-II Score Correlation With Mortality And Length Of Stay In.pdf background Literature almost 11 years ago, by Jeff Kahn Download
APACHE_IV_LOS (2).pdf background Literature almost 11 years ago, by Jeff Kahn Download
ICU Patient Velocity Model.png preview ICU Patient Flow Screenshot almost 11 years ago, by Jeff Kahn Download
JeffKahn_Progress_May27.html html Progress Report 1.3 almost 11 years ago, by Jeff Kahn Download
jfKahn_May13.md background Final Project Progress Report 1.1, May 13 almost 11 years ago, by Jeff Kahn Download
jfkahn_May20.html html Progress Report almost 11 years ago, by Jeff Kahn Download
Kahn_SlamDeck.pdf powerpoint Slam Presentation almost 11 years ago, by Jeff Kahn Download
litovchenko_charon_carries_souls_across_the_river_styx.jpg jpeg To Cross the River Styx almost 11 years ago, by Jeff Kahn Download
ProgressReportJune3.html html Progress Report 1.4 almost 11 years ago, by Jeff Kahn Download

This model does not have any ancestors.

This model does not have any descendants.