[MUSIC] Welcome, this is Professor David Bishai, with our lecture, Applying Stock and Flow Diagrams and system dynamics models to public health. This lecture has three sections. The first section is a simple case, where we use the problem of a healthcare clinic which has a volume of medical services to provide, and the quality of those services, and we show how those simple two-state model can lead to insight and understanding. Once we've mastered the basic idea of using system dynamics models to show outcomes in a model, we move on to a more advanced case where that same volume and quality model is combined with performance-based financing in an attempt to try to improve the quality of care in the clinic. And then we move on to a more advanced case, where we use system dynamics to look at the whole healthcare system, where we have to trade off curative services against preventive public health services, and again trying to see how being able to go back and forth between our representation of the system in a model can translate into observable health outcomes that can be graphed and analyzed. So let's start with the simple case. A simple model of a volume of services and the quality of care. Before we get started, I wanted to just make you aware of some system dynamics notation. I've put in a timeline here, and time is numbered or lettered, from J, which comes before time K, which comes before time L. And in our dynamic model, we're going to be looking at all of the states of the system, and we can represent them, at times J, K and L with subscripts, and you see subscript of V in time J, V in time K, and V in time L. That's just notation. And as you remember in system dynamics models, we have rates that occur in between those time steps. So V.JK Is the rate between time J and time K, and the rate called V.KL is the rate between time K and time L, and that's just, again, notation on how we will represent the system. So, the basic system dynamics equation is shown at the bottom in purple. And the idea is that, if you want to know the state at time K, go back to the state at time J and add on an integral of the state between the two times. So, the equation for the state at time K is VJ plus the integral from time J to time K of the net rate of change immediately prior to time K. And I've written the same equation updated to time L, the state via time L is the state via time K. Plus the net integral, the integral of the rate of change in the immediate period before time L. And that's symbolized at the far right with an integral. So, those are simple notational ideas, and I just wanted to show you an important set of approximations and simplifications. That VK equation at the top, VK can be represented with the integral which is the exact way of representing VK. But we can make an approximation. If the time steps are very small, we can assume that the rate is constant over the interval JK, and we can approximate the interval of V.JK from time J to time K, as the product of a constant rate, V.times a time step Delta t, and that will be a good approximation for very small Delta t. So that enables us to write this date equation as shown in the middle of the slide, Vk = Vj + V dot sub JK x delta t. And the last simplification is to simply define all time steps as being one unit long, one second, or one day, or one year, whatever the time step is, just always make that time step equal one. And now we can write that rate equation as VK equals VJ plus V dot in the immediately prior period called JK. So that will keep our rate equation simple. I just wanted to plant that notation because we're going to be using it in just a minute. So let's look at the volume quality model, and at some point during your study of this lecture, it would be very important for you to go to VenSim and open the simple volume quality model. And when you do, you'll see diagrams that look like this. At the bottom is the basic stock and flow diagram and up at the top will be the dashboard where we can track some of the model outcomes. So I've magnified this slide so you can see it in more detail. And if you look at it, you'll see there's simply two states in the model and two rates and two constants, for a total of six elements that we need to track. Notice that there's only one rate flowing out of quality. We could simply track quality as a state and it can have a quality loss, and that quality loss can be either positive or negative. When it's positive, quality is lost at a rapid rate, and when it's negative, quality actually increases. Similarly, with the volume of services, we simply have an inflow rate call volume game controlling the volume of service. Now, notice the feedback. The key feedback in the model is that the higher the quality, the more the volume of services in the clinic. The patients hear that this is a great clinic, that the doctors are wonderful, and they increasingly show up at the clinic to go and try to get taken care of. The other feedback is coming back from the volume of service and it's negative. The higher the volume of service, the more patients crowding into the clinic makes the doctors unable to keep up with the demand and they start cutting corners and not paying attention, and the patients feel like they're neglected and so that gives us negative feedback. And so you can see the net sign in this loop, positive from technical quality to volume and negative from volume to quality, creates a negative feedback. So it should be no surprise, when you look at the quality and volume charts, that quality in the blue at the top-right of the slide, reaches an equilibrium. It tries to increase, but you see it increasing in the very first time unit, but immediately when the quality increases, that red line of volume demand goes up. And in response to that increase in volume, quality falls and then reaches an equilibrium, and the negative feedback holds both volume and quality tightly fixed at their equilibrium value and the model ends at that equilibrium. And indeed the equilibrium is actually worse. By trying to improve quality at the first time step, you've moved the system. Now your entire volume and quality is lower and volume is higher. Now, this may have been the desired policy outcome for the system. Perhaps, the manager said, it's terrible we don't have enough sick patients in our clinic. They're staying home and getting sick. Wouldn't it be better if we just bumped up quality a little bit and got them to come in? And sure enough, simply bumping up quality in that first time unit is enough to stimulate the volume, and it stays high, even though later on, after the volume crowds out the quality, quality goes down, the system stays permanently at this new equilibrium, where more patients are coming in every day, but the quality has gone down because of the extra crowding. There are other graphs in the dashboard. You can see on the top-left, the dashboard tracks the quality against volume. Volume on the. Vertical axis and quality on the horizontal axis, and the arrows point out the trajectory of the system, where initially, quality moves to the right, reaching its maximum of about 0.6 and then volume starts to increase immediately and the model spirals to this new equilibrium at the center of the grid. The graphs in the middle also help us predict the final state of the model. The blue is the supply of volume and the Q is the demand for quality. And where supply equals demand was the predictable equilibrium. And sure enough, we see that in the end the model has a volume state just above 0.5 and a quality state below 0.4, and so we can use that output indicator as a dashboard to show us what the model's doing. So this is the basic system dynamics stock and flow diagram to tell us what's going on. I wanted you to try it out. So please, at any point, pause this lecture, go to Vensim, and open up the model. I wanted to point out a couple of important control knobs in Vensim for you in the top left of the screen you'll see a little button that will show you all of the equations. It's called the DOC button. And it has multiple lines on top of it. And if you click it, you'll see all of the equations, and we'll do that in just a minute. And the other important button is the formula button that says Y equals X squared. If you click on that button and then click on a piece of the model, piece of the diagram, you can change the parameters, and change their values. And that's how you try out the model and learn from it, is repeatedly changing the equations with that change equation button and then running the model which you remember is done by hitting the little running man, which is how we run models. So just a reminder, please try it out, if you want to try it out now that's fine, if you want to wait until the end of the lecture and try it out that would be fine too. If you were to click on that equation screen, you'll see a lot of equations but I wanted to call your attention to four of them that really drives a model. There's the quality levels equation which using our new simple notation is the quality at times zero minus the rate of change of quality in the previous period. That quality change rate has three factors contributing to it. The quality change rate is positively influenced by the volume of services, it's negatively influenced by the prior quality, and it's negatively influenced by a quality constant. And we use that quality constant to control how fast quality changes in the model. And remember, this quality is a quality outflow rate. It's the rate at which quality diminishes. So the higher the volume, the faster quality diminishes. And the higher the quality, the slower the quality diminishes. That's what's embedded in this quality rate equation. The other two equations are the volume level equation and the volume level equation is simple that volume is the rate of change of volume. If you go back, remember that the volume rate equation is simply an inflow into volume. And that volume rate equation is positively influenced by quality. The more quality, the more the growth of volume, It's negatively influenced by the prior volume. The higher the prior volume, the slower the rate. And finally, there's a setting the volume constant, symbolized by V-0. And again, we'll use that as our control knob to increase or decrease the volume rate. So, those are really the four equations. That's why it's such a simple model. However, if you were to click on the documentation button, and then send, you would see 14 separate equations. And you might be overwhelmed by this. But embedded in these 14 equations are those same four equations that we've just gone over and if you just click ahead you'll see that there are really only four equations. Driving the Vansim model, we've already gone over them. Inside those four equations are these ten equations, and if you click ahead you'll see that there's these ten equations that are used to initialize the inputs to setup the initial values and to track output. And I've organized these other equations for you in this slide 16 and shows that there's some time-keeping equations telling Vinsim that the final time will be ten time steps. The initial time will be zero. Each time step will be 0.007 days or hours or months. I don't know what, let's call these time steps years. .007 years in the time step. We are going to initialize the quality constant at .9. The initial quality level will be started at .5 the initial volume constant, the rate at which volume increases will be .2, and that's how we get the model to get started. Then, we want to develop some outcome indicators to track and send to our dashboard. And one indicator is going to be the percent of the time that's already finished, we'll symbolize that by Q, and then to plot our supply and demand curve, these other equations are going to produce those supply and demand curve constructs. One is called V equilibrium, and the other one is called Q equilibrium. These are just some busy work that we wanted to put into the program in order to track its input. They're not essential unless you want to make more drastic changes to the model, but I just wanted you to see them to know what's underneath the hood of this simple model. So what to do when you're trying this out on your own. What do you want to do? I'd like you to focus on quality, and I'll tell you why. In healthcare, the volume of visits to health providers is an eternal constant of nature. For 10,000 years, sicked people have been going to some type of healer, whether or not there's a policy maker trying to do anything. They will go because they're sick and they're in pain and they will try to see somebody. So it's not really as big a problem to get them to go to any provider. The problem for a health planner is to make the quality of visits, having effective medical care is the 20th century miracle, something brand new on the planet. And now that we have effective medical care, we want to ensure that it is there so that the visits that occur will be self-directing to high quality providers. So focus on quality, both in this model, and then in your work as a public health planner. Quality is the public good. Quality is the thing that won't happen on its own. And what's exciting about this model is that there's this stubborn negative feedback loop built into the model that will hold that quality. And your job as a planner is to try to understand the nature of that constraint. To give you insight and understanding, because in reality quality has this stubborn property. It's very hard to move up the quality of healthcare providers, and the more we can understand it the better we can do our jobs in public health. So you'll be understanding it here in assist and dynamics model and then you want to ask yourself, is it real? Is what I've learned here in this computer having anything to do with the problems I might face in my public health job, so focus on quality. Okay, so let's try out the model and first let's play with the volume constant. I want to show how increasing the model's volume response can drive down quality. So on the left of the slide we have the baseline settings of a quality constant of 0.9 in a volume constant of 0.2. We get that baseline effect that we're familiar with where the model initially has a quality bump, volume increases up to time one. And that drives down quality and by about time three you'll see lower quality. And high volume of services and the model ends at that equilibrium. So now we try an experiment where we bump up the volume constant and bump that volume response up to 0.4. When we do that, we increase the initial quality. The volume response is twice as big, reaching a volume plateau of around 0.8, and that high volume pushes quality even lower. And we end the model with high volume and very low quality down below 0.2. That's not very good. We have a lot of patients coming into this clinic and they're getting pretty dismal quality. And one could imagine policies that give this sort of backfiring outcome. You could imagine demand creation policy is where we try to get people to be more sensitive to the high quality of the clinics. Telling to them to notice how the quality of the clinic has improved, and trying to get them to do healthcare seeking. And when one does that, one could end up in the world on the right, where one gets extremely high volume, but it's pushed down quality. In the next line you see what happens when one even makes those effects much, much higher. If we drive the volume constant up to its extreme high levels of 1.3, that volume response is, literally off the chart. And it pushes quality down off the chart. And indeed, this a clinic that has negative quality. Negative quality might mean that it's actually harming patients, but because we've made that volume response so vigorous, we have extremely high volume of services in the clinic. And again, not a really good type of health system to have. Showing a law of unintended consequences by pushing healthcare demand without it paying attention to quality. I've given an animation that shows all of those outcomes all on one slide. And if you run this slide in slow motion, you'll see that the volume constant goes from one to 14, and every time the volume constant gets a little bigger, the image shows the outcome. And you'll see that as the animation reaches its end, we've seen these cases where the quality is off the charts low, and the volume is off the charts high. So that's what you can learn by playing with the volume settings. Now let's play with the quality settings. What would be like if we were to increase that quality constant, increase their natural tendency to produce high quality? So on the left of the slide, we've set up that parameter up to, it's very high level, we set it up to 1.5, keeping the volume constant at it's baseline level. And there the responses kind of mean, that yes the quality goes up initially and yes the volume responds appropriately and comes up, by time 1.5 or time 2 it reaches its peak, but it doesn't push quality back down as much because we have pegged the quality constant so high. And that keeps the providers from losing their quality even though the volume of services they provide is so high. On the right of the slide is the result when we peg that quality constant quite low, and when we set it at 0.3, we get an outcome where the quality response is very disappointing, and the quality of service ends up very close to zero after volume comes and pushes down the quality. Again I produced an animation which shows how this whole system runs across the range of quality constants from 1 to 14, keeping the volume constant, at a midline level of about 7. And you'll see those same effects where, with a low quality constant, the model ends with quality very disappointing, but as we bring the quality constant up, we can reach outcomes that are very desirable where, although there's a volume response, quality is kept at an acceptable level. So we're excited because we think that these quality constants might be the ticket to finding a health system that is able to provide good quality. But there's a problem, and the problem is that intrensic quality bump by setting that quality constant very high, we can't always solve the problem. And in the left of the slide, I'm showing you what happens. Suppose the volume constant is quite high and we have a system that's rigged to have very high demand whenever they noticed high quality. Well the quality constant at 1.2, if we set them both at their high level, we can't get what we want. And we have very high volume responses, off the charts, but quality can't keep up. So there's this problem that was nice to set up high quality constants, but that only worked with volume at a reasonable level. And if there's a high volume response, we can't get the quality constant to be up high enough. Similarly, if the volume constant is very low, we can't drop our guard, and you see on the right of the slide what happens when the volume constant is quite low. But here, setting a quality constant low doesn't solve the problem. You need to always ratchet up your quality response in step with the volume response, you can't just set your quality constant in this model and ignore where volume is. You might end up disappointed, as we were on the left, and disappointed as we were on the right. One has to be constantly paying attention to the quality response of the model. So what have we learned in this section? We've learned a lot about how to use a system dynamics model. We made one that's extremely simple, showing a two-state model of volume and quality. And you've practiced, or will practice the basic approach, which is to change the settings and check the outcomes. When you check the outcomes, you look at the dashboard and track the results. And by trying, and trying again, and again, you can learn how the system responds to you, and you also learn that the negative feedback from volume to quality can be an extremely stubborn problem, where if we simply try to get around it by moving our quality constant, we actually don't solve it for all time. That when volume catches up with us, it can push our volume responses down, and we can end up getting really nowhere. That negative feedback is extremely stubborn. And if that's a true part of our system, learning that in the computer is going to make us really smarter when we try to solve problems in the real world. So in the next section we'll be going on to a more advanced model of volume and quality.