 All right for the next talk we have Eric and he's going to talk about solving the internet problem Another thing that's here Okay Spoiler alert. No. I've been working in public health overseas in Botswana Conducting clinical trial research in HIV AIDS using electronic as academics like to call it data systems in remote areas of Botswana and Doing that despite having Not necessarily no internet, but no reliable internet Just a little bit about what's on it's a middle-income country landlocked in Southern Africa population now just over 2 million and It is landmass about the same size as Texas and although a bit drier In the drier parts of Texas that it kind of looks the same That's me at the last icon I was at in Namibia last year I'm the Former director of data operations in IT, so it's a pretty broad Job of the Botswana Harvard AIDS Institute I had a data management and IT teams there for over 25 NIH funded clinical trials and During that time we developed a clinical trial data management systems laboratory information systems and interface some of the analytical laboratory equipment and Right now I'm finishing up a trial that oddly enough. I'm running from the cloud which is We're enrolling people in Botswana Malawi Uganda, South Africa and Zimbabwe and I'm not a medical person But I've been surrounded by them for for a lot of years now I Clinical research in HIV AIDS, so this is an academic endeavor Our investigators and research teams were built from or made up of international and local people Our work is funded by competitive grants Almost exclusively from the National Institutes of Health here in the US All of our trials were conducted in Botswana. I worked for Max Essex at Harvard and being a virologist that he is all of our Trials were had a heavy laboratory component so in Included in collecting all the data. We also collected Probably a little bit over 600,000 blood specimens to go with that a Little bit about HIV AIDS in Botswana They I'm sure you know Well, I would say that the rip excuse me the real problem is not no infinite the real problem is the HIV epidemic You probably know a lot about it You also probably know about the epidemic even starting here in the 80s but that was followed with a heterosexual epidemic in in Africa and In Botswana around 1995 even though it already had started ramping up It was very clear that there was a very serious epidemic underway and by 2000 estimates were that 15 to 20 percent of the population was infected, which is Amazing life expectancy in Botswana was around 70 years and had dropped or expected to drop to around 40 and There were projections from the McKinsey group that Population of Botswana, which at that time was about 1.2 million would half within the next 10 to 15 years if nothing was done So in 2000 the president of Botswana stood in front of the UN and basically Sated that his population is looking at extinction if nothing is done we had already started in a trial funded by the NIH and Bristol-Miles Squibb Bristol-Meyer Squibb where we were looking at ways of rolling out already approved adult treatment and that sort of merged in 2002 into a national program, which meant that the government agreed to then fund free treatment testing monitoring whatever was necessary to get people On to the drugs were then available and that program which still continues today is the Probably the most successful one in the world at the moment for combating HIV So now to shift over a little bit about clinical trial data management Yeah, someone said to me don't worry. I won't ever need that data, but we always do Before I get into the solutions of what we did for offline use to take a few minutes Just to talk about clinical trial data management so that you can appreciate why given Limited resources and so on why don't we just keep it simple and flip back to paper because paper works, but so my role in all of this was to Support the research trials with data management and like I said, we built these laboratory information systems already where we're receiving Resulting specimens storing the specimens interface and laboratory equipment and we built data management systems This is prior to the data management systems and filing paper and All kinds of stuff like that for the research clinics that we were currently working with But paper is very difficult to work with and if you're dealing with large trials you start to trip over it It's bulky. It's hard to change state. It can't be validated in real time. You need to transcribe information which has a Fixed sort of 10% error rate. You've got to store the paper and then when you want to do quality assurance Or you're trying to prepare for Some sort of interim or final analysis. You've got to drag those papers back out and make corrections send them back to the clinic Then get them back into your data center transcribe them again store them and this process just goes on forever and it turns out that What'll happen is you get to some point in your trial You want to do analysis and you can take eight to twelve months to prepare a data set and Very often these trials are underfunded. You ask for ten dollars. You get six Kind of things so no matter what you cannot afford to have these long lag times For data preparation and when you get to the end of a trial, you're probably out of money already anyway So having to say oh, we need another 12 months of staffing to work on a data set It's not going to be something you want to do plus you got a lot of pressure to publish to Because that is in some ways the main deliverable. So in 2010 I introduced to my team Python and Django I looked at other things, but I decided to do that and we then got underway to develop Basically data collection that we would do at point of care and Our main metric was to say okay if We say you want to freeze a data set for analysis How long is it going to take from that moment to the point where we can actually do a fine do an analysis? And we got that down from that eight to twelve month thing down to in our last one just a couple weeks So we tried this system out on one trial we called the Mabana trial This was looking at trying to completely block transmission from a mother to a child. It was a successful trial We were able to show do that but it was We deployed this within clinics our research clinics So it's a very comfortable turf and we had control of the environment We were able to install connections and data connections and so on but then we had another trial Which was just a small one which we did in a neighboring village where we? Where we had to go into people's households that actually is a picture of somebody's household and That was different because now it's not our turf. We're actually operating in somebody's house kick us out and we can't sit there anyway, and there wasn't good data connection there and We the group tried to do this on paper and within a few weeks about six weeks the whole thing collapsed because the Handling the paper just became a nightmare You're collecting longitudinal data. You're collecting data from one household over a number of days And it just it just became a nightmare. So we had to stop the trial and finish and kind of come up with another solution The solution was our first iteration of offline use. We had learned something already from Making from the Mabana trial with how to do electronic data connection and data collection In management and we tried some offline use then in 2012 We got a grant for about the large grant about 80 million us which You don't see that much on the ground, but that was the total apparently And since it was so large State Department and CDC got involved as well The trial brought together a lot of what we as data managers or our data manager team already had experience in now We knew how to do real-time data collection real-time validation We knew how to do the sort of the informed consent process how to handle HIV testing data treatment data How to do blood collection chain of custody? and all kinds of Questionnaires for men women and so on Regulatory compliance how to protect personal information through encryption and things like that. We knew how to do all this but This trial was different in that It wanted we wanted to operate in 30 extremely remote villages with distances of I'll say kilometers, but you know 700 kilometers away and things like that from where we were we were sitting So this is a different This is different So what was the current state of internet in Butona at that time? So in 2009 3g was introduced but they just focused on the major city centers and The amount of bandwidth that they could actually handle on those 3g connections is pretty poor It's more mostly about like Facebook Twitter that kind of thing not really trying to do anything And they're always really lopsided you can bring a lot of data in but you can't push data up So you would prefer something symmetrical, but fixed line penetration It's only about 10% in the country. So that's also no good The cost of a gigabyte around 70 dollars per gigabyte. So that's pretty heavy We weren't really sure what kind of data throughput we would have And so we also looked at satellite Like five dollars a megabyte or something like that But there's also the complexity of dealing with satellite because we were thinking in terms of trying to do something in real time Because that's what we were working with we had these systems that work really well But they were online. So we wanted to see if we could work with real time I put into the budget a pretty big trying to work with this five bucks megabyte satellite thing, but when we started to have discussions And the cdc moved in they said oh by the way this internet budget Can we remove that because we need that money for something else I had a lot of arguments a lot of people to explain that you know, no matter what anybody tells you 3g is not going to support this Anyway time went on into 2013 and 30 days before we We started the trial we had already written our solution to operate sort of offline They decided oh my gosh because they have a component of the trial that they were responsible for They wanted internet So they suddenly came up with a lot of money and started helping us put up Towers like this And we would we had 30 villages. They were two uh two um, we're doing a Comparative trial. So we had a control and uh any intervention sites and we would so there's 15 and 15 So we go two sites at a time and we built these Right before we got to the next pair. These were being built and so we walked along the country like this But these connections as expensive as they were We put a half a million dollars into building these or they did And and recurring costs of like $50,000 But we're looking at one megabit per second is all we could sustain Which is okay for ssh and things like that, but it was one megabit Hopefully a lot of most of the time during the day was unusable And if only at night could it be usable so it's still not a solution to real-time data collection So what did we do? So all we really are doing we came up with an offline solution and it's pretty simple I'm not spoiler alert. There's no magic to not having internet. You don't have internet You don't have internet or you don't have a data connection Wi-Fi. There's no solution to that But you know through asynchronous sort of approach you can you can come up with something So we're using Django systems and so we've got database if we can First thing we do is we would we wrote some a little bit to We added to each of our system a a new model an outgoing transaction model as a single model And then we would also have an incoming transaction model sort of taking a almost like mail inbox outbox and all of the models within Within the system for each of the questionnaires and forms and so on would all serialize into us each time You would hit a save method. They would think serialize into an outgoing transaction That transaction at some point would be all those transactions at some point coming out of that outgoing transaction model Would be dumped into a file The file then when we had some availability of some sort would be scp'd across to a remote machine which would and then Reverse it read the file back in D serialize all the transactions and everything works and as long as we maintain the order of how they played out Originally and then just play them back. Everything is fine So what we had were In some cases we would have 30 or 40 research assistants fan out into a village each one has a mac air They would go out for about four hour shifts because they're also collecting blood They have to come back with their blood to what we had was a community server Which is still not connected to any remote system They would connect to a local wi-fi. We had a little wi-fi unit right there and they would connect to a mac book push in all Move in all of their transactions and At some point maybe in the night or in a few days that community server would do the same thing And push all its transactions to a headquarters server So Let's look at some some code So we have an installable application jango collect offline Which seems these are jango applications you would Put in your install app you migrate you'll get those two tables the outgoing transaction table on the incoming transaction table or model Those models simply have one field for the the serialized JSON and then some metadata for the administration around that that transaction and The incoming Model is exactly the same I'm just on the other end So to prepare a model for offline use if you have a model like This one I think is a jango tutorial or something like that Um, I just added a report date times. We're always using that and I have my own little a utility package which uses uh I'm always working with um time zone aware dates and for that Anyway, then you have because you're going to serialize you have to have a unique constraint on at least one field or combination of fields Um, I was just going to say for the um date time stuff. I use the arrow package would recommend that So now and this is pretty much you can follow this pretty well in the and well described in the Django documentation. You're preparing a model for serialization. So you have to add Well, what we did was we would make sure we would switch from a integer primary key to a uuid So we wouldn't get any clashes and That's now Has become part of Django. So you can use that but previously it wasn't um add a custom managers Plus the natural key so you can do the full circle of serializing and deserializing So that would be a model and this will weaken you can also Add foreign keys or in Django. You have the sort of mini to mini. I don't know how many people are familiar with Django So it'll support all that kind of stuff Then the next thing is to um Add a offline models module in your app And that's just where you're going to register which models you want to Include in this process. You don't have to include every model Um, you can either register them explicitly In that offline models py or you could Be safer if you want the whole application and all its models to to um To be a part of this then you just register with the the app name And That module will be discovered on boot up just like if you're familiar with Django. Django has an admin um Has admin classes and when you boot up the system looks for an admins py and registers any classes in there This uses the same the same approach some of the same code So that as soon as you boot up it'll look for that and it have a um, A global site offline global that will you can refer to later in registry And then the last thing is some sort of post-save signal. So once every time you For any model that's registered if you say that It's going to inspect to see if that model By name is registered In the global and if not, it'll just raise an exception and pass or if it is Then it's going to fire this uh two outgoing transaction method And it will then serialize it and stick it in that outgoing transaction table Um, we also encrypt it for security purposes Um as you should Yeah, so that takes care of Everything that's happening on a client machine and everything that will happen in reverse on some remote server and The next thing then is to handle the sort of file events what's going to happen there So that process is started by One of our research assistants with their machine. They have a we had several different interfaces So but it's basically just click and then that will export all those outgoing transactions into a file And then we use a um a module called watch dog Which will just monitor a um a directory for any events We had used this for some of the laboratory equipment that would drop Uh result files and just pick them up and pull them into a database. So this worked well here as well And any sort of event you just pass it um an event handler. This is just some simple code coming from the Um from its own documentation So we had different event handlers one was to um Export the outgoing transactions to a file another one would be to transfer files to a remote system So the file is created and then it can move to the remote system And another one would be that as soon as a remote system file gets dropped into a directory It then pulls it up into the incoming transaction model So that takes care of database file get it across Into get the file across and then pull the file up there So the watchdog is on a community server or it'll be on the final node however many you want to have but we only ever had client community server and then headquarters server and then obviously on the last database or whatever not the last one but The incoming there would be a post-save signal that would then deserialize all your models as I described earlier so That's kind of it. So I told you it wasn't a little shocking Solution and so what does it look like in the field? So This is actually some people working in the field so you can see them with their little mac air there They actually came with the table and the chair and the cd4 counter and all the equipment to collect blood and Coolbox and everything they they would had everything with them as they were going in They have some discussion They collect the blood like that They pack it all up and and walk away And this whole process with the data collection the blood collection everything like that and the testing The counseling and everything that they could take up to an hour hour and a half And in some cases we would have families of like 10 because old ladies would tell all their relatives to come because they're they're coming to to participate in the research then We had trucks like this which were our data center and laboratories. So when Sorry when he Finishes then he goes to this truck. This is parked next to our laboratory But this would be parked also in the field And we have a laboratory there for him to bring in his blood specimens. They would then be processed spun down The data would be Synchronized into our data center, which is just on the other end of the truck The lab technician would then see the data on the server that they're accessing Scan in the physical The physical specimens to verify everything's okay Then the research assistant will go back out to the next household and we're basically done And then up here we had a little wireless bridge that would connect in some way to That tower that you saw earlier when the connection was available and the data would end up Where we wanted it So we did exactly that Across 30 villages for four years. We collect serialized find working internet transfer deserialize this whole process and we did our first Enrollment in october of 2013 and got our first publication out in 2016 to show that but so on I actually Had the best Program available Except I think switzerland might have beat out with their 0.1 percent prevalence In the worlds Yeah, and that's it. That's what we did. So thank you