Creating an Inclusive Django Community with Kenya Phelps
Published July 15, 2026
This video features Becca Nock at DjangoCon US 2016 in Philadelphia, Pennsylvania, USA.
Django, Python, and Health Care Data by Becca Nock
Data and technology can be used to improve the health of older adults and to help them to continue to live at home and in the community as they age. Predictive analytics and modeling can predict who will get sick, be hospitalized, or have adverse outcomes in the future. Once we know who is at risk, we can design interventions to decrease the likelihood of negative health outcomes.
This talk will introduce you to health care data sources, such as electronic medical records and insurance claims; predictive modeling and how it can be used to improve the care we provide; and publicly available and open health data. We will talk about the D2S2 (discharge decision support system), which helps health care providers make decisions when older adults are getting ready to be discharged from the hospital; and how Django and Python can be used to visualize open health-related data.
Intro: Who I am (2 min)
Health care data and where it comes from (5 min)
Electronic health records
Dr. Chrono is actually built with Django!
Claims data
Predictive modeling and decision support (10 min)
Predicting readmissions & the discharge decision support system (D2S2)
Predict whether older adults are at high risk or low risk of being readmitted to the hospital after discharge.
Building decision support to improve hospital discharge decision-making
Once we know a patient is at high risk of being readmitted, how do we decide what care they should receive after they leave the hospital? Use expert knowledge to develop decision support into the electronic medical record that will recommend a site for post acute care (care once the patient leaves the hospital).
Building patient preferences into the recommendations made to health care providers about what care the patient should receive after their hospitalization.
Brief overview of:
Predicting diabetes
Likelihood of hospitalization modeling and nurse health coaching
Django and health care data (8 min)
Overview of open and publically available health care data
Open Data Philly (www.opendataphilly.org)
HealthData.gov
Visualizing open health data with Python and Django
This talk was presented at: https://2016.djangocon.us/schedule/presentation/37/
LINKS:
Follow DjangCon US 👇
https://twitter.com/djangocon
Follow DEFNA 👇
https://twitter.com/defnado
https://www.defna.org/
Becca Nock explains how healthcare data is generated and how electronic health records differ from insurance claims: EHRs provide detailed, often real-time information within one health system, while claims are standardized, billing-oriented, population-level data that can follow patients across providers. She describes discharge decision-support research that combines expert judgment, regression modeling, and patient preferences to identify older adults at risk after hospitalization, recommend post-acute care, and understand why some patients refuse it. She also gives examples of predictive models for hospitalization and diabetes, points to public health datasets, and highlights Python, Django, and PostgreSQL applications including Project Cognoma and Django-based health-record software.
Summarised automatically from the transcript.
Automatically transcribed, so expect mistakes in names and technical terms.
Speaker 1: Come on, no.
Speaker 2: Hi everyone, can is the mic on? Can everyone hear me? Yeah, absolutely. Awesome. So I think it's really awesome that so many of you wanted to come spend your first day of Digacon here with me learning about healthcare data. Just a little bit about me. I did my undergrad in nursing at the University of Pittsburgh, and I'm still a registered nurse, and I came to Penn in 2013. But the picture on the left is my nursing school graduation where we graduated in white scrubs with Lawrence Nightingale Lance. Always good. So I came to Penn in 2013. I did a master's in healthcare administration before starting my PhD in nursing informatics. So I'm a full-time PhD student here. I started to learn more about technology and learning to code in 2014.
Speaker 2: through Girl Develop at Philly. For those of you that aren't familiar, GDI is a fabulous organization. They do low-cost technology costs. for women and ensure a really safe learning environment. So I learned SQL through them and Python and a ton of other just tech skills. That has been really amazing. And I also wanted to give a shout out to Tech Girls. That is an organization based here in Philly that teaches middle school girls technology and helps them form a community and see all the different careers that involve tech. And they have some Python curriculum as well that's open source for anyone that's interested. And then the bottom picture on the right with the big check, this is my fun fact for the day. That's Fully Code Fest 2015. I have won every hackathon that I've participated in.
Speaker 2: So yeah, really proud about that. I wanted to just shout out and thank um quite a few people that helped me get up here today and encourage me to submit the CFP for this presentation A lot of them are here at DjangoCon and in the audience. Here in Philly, we have an amazing women in tech community. And there was a conference here in Wharton. called Ella Conf in November, where I've met a lot of women that are sitting in here today and have been extremely encouraging, as well as everyone that encouraged me over Twitter that I haven't yet met in person. And especially I want to thank Lacey Williams Henschel for talking with me about my CFP idea and reviewing my drafts. So if we get started. So when I was a clinical nurse, I worked with older adults.
Speaker 2: I love working with older adults and technology. Especially it gets me really excited when older adults use technology. And throughout this presentation, when I say older adults, in the US that means anyone over the age of 65, though I don't think that's very old, but that's kind of the target population. And I especially love when tech can help older adults stay healthy. So throughout this presentation, I'll be talking generally about healthcare data and some of the ways that I've applied it. But a lot of my work is specifically related to older adults and how we can use data and technology. to help them stay healthy and living in the community in their own homes. So just a quick outline, I'm gonna do an intro to healthcare data, talk about clinical discussions support and the discharge decision support system , some predictive analytics
Speaker 2: projects in healthcare, a little bit about open health data, and then some uses of Python and Django in healthcare So sources of healthcare data, uh, where does it all come from? I know there's a lot of hype around big data in general and especially in the healthcare industry. And it's there's so much healthcare data being produced. Every time you go to the doctor, they collect all kinds of data. Your vital signs, your cheese complaint or what brought you in that day, your symptoms, what your heart and lungs sound like, and more. And your doctor might send you to go get blood work and then you're gonna have even more lab data. And then all of that has to be paid by your insurance company. who then produces claims about this data. So this picture just shows all the data users and people that are producing data. So the hospital, physicians,
Speaker 2: patients themselves can create personal health records now, labs, public health reporting, payers, and researchers. So here in academia in my PhD program, I've produced research type data. I've also worked in community health with public health data, but a lot of the data that I'll be talking about today is electronic medical record data as well as claims data. That's what I've used most. recently. And so electronic health record data is used to provide care and it's very focused on what the providers need to record and what they're interested in finding out versus insurance claims data is very much for billing purposes. So there are some differences between the two. With claims data, there's a lot of standardized coding. And I use mainly ICD10 codes, which you might have heard it just transitioned
Speaker 2: from ICB nine to ten uh fairly recently and those are diagnoses codes. Um I also used a lot when I was working in insurance NEC codes to reference medications, CPT codes, which are for lab values, versus electronic health record data. There's free text form, there's drop-down menus, you can put a lot of more detail in there With claims data, something that I did a lot when I was working in insurance is you can easily look at an individual person as well as population. level data. It's very easy to say all everyone in my population with diabetes versus electronic health records are very patient-centered , you know, very detailed reports about one patient. You can look at the whole population. as well and abstract the data out of medical records, but it's a little bit easier in claims
Speaker 2: data. And one really nice thing about claims data is you see everything that the patient did. So if today we're in Philly, we have a lot of different hospital systems here. If a patient goes to Penn this week and Jefferson next week and haunt them in the week after. All of that is going to come up in their claims data versus the EHR data is from one health system. So if they're at Penn, you won't see their health information from other health systems. You might, if you're lucky, get their primary care physician and their inpatient in the same system, but not always. And claims data is not in real time. It takes the billing process and the coding process. Versus EHR data is typically available in real time in the hospital. But something that I've experienced in doing research with EHR data is that if you
Speaker 2: go to multiple hospitals hospitals, even if they're using the same electronic medical reference system, which is not necessarily likely, if they're using different versions of the same software, it can be very hard to merge all the data. So the first main thing I'm going to be talking about, the main project, is a type of clinical decision support. And this is built into a lot of EHRs today. The EHR has all this data that they can see in there in the system, and they can help providers through alerts and a couple of other mechanisms. So they can help through alerts and reminders so they know all the medications that a patient is on. If you put in a new medication and it might interact, it can alert to that, or say They're supposed to have blood work done every couple of weeks for something.
Speaker 2: Automatic reminders can come up after that time has passed. They also have clinical guidelines in a lot of the EHRs. So if you know the diagnoses of the patient, Then you know that there's certain things that the physician or nurse should be doing. And those can automatically pop up in the system without having a remark. They are also order sets. So say you go to the hospital and you're having chest pain. There's certain things that everyone would get. And those will kind of, the computer will automatically tell you that you need to do those things. things as well as there's uh diagnostic support in the form of clinical decision support so um if you know certain things you've gotten certain lab values certain test results the computer can help you narrow down to a diagnosis And so clinical decision support just really supports the providers and patients and caregivers
Speaker 2: in some situations to make better decisions, have all that data organized to make the right decision. So the decision support that I work on, this is a project here at Peng. The professor's name is Dr. Kathy Bowles , and she works on discharge decision support. Support. So this is when a patient is in the hospital, inpatient, and they're going to be discharged out of the hospital. So they're leaving And just an FYI, most of the research throughout the rest of the presentation I have links to at the bottom. Dr. Bowles has so many articles that kind of I pulled together for this presentation that if you're interested in the published research, I'm happy to share. But I didn't include all the links at the bottom. But so the patients are leaving the hospital. It's a very complex time.
Speaker 2: They have the situation that in where they were before. They have everything that happens happened in the hospital and it's especially complex for older adults that a lot of times have multiple chronic diseases and just really complex treatment And so the decision of whether they need to go somewhere after they leave the hospital or before returning home or a long-term care facility can be a very complicated decision. And so all of a lot of Kathy Ebole's recent research is all around building decision support around the discharge decision. And so currently in the research, I'll be talking about three main questions that we're using software to answer. So who is at risk of poor outcomes after leaving the hospital? What care should the patient receive after hospitalization and why are patients refusing post-hospital care?
Speaker 2: And I'll be using the term post-acute care kind of throughout the presentation. And acute care is the hospital setting post-acute acute care is kind of anything right afterwards. And this includes home care, inpatient rehabilitation, skilled nursing facilities, nursing home, and hospital. And this transition out of the hospital is really important. We know people that leave the hospital with unmet needs end up right back in the hospital. They go to the emergency department. They lose function, such as walking or being able to bathe themselves. And so it's just an important transition. So the first question, who is at risk of poor outcomes? So the goal was to determine patients that are high risk and low risk, and the high-risk patients are the ones that should go to one of these five services after the
Speaker 2: leave the hospital. They're in need of some kind of post-acute care services. So this model was built using expert opinions and then regression modeling. So the way it worked is this is similar from question one to two, but a little bit different. They took EHR data from the hospitals here and created case studies of real patients. So de-identified them, but included all the information on what happened in the hospital, medications, past medical history, labs , their setting at home, what support they had. um how they were functioning at home, all this data was put into these case studies. And then they recruited experts, both nationally and locally, from a number of different disciplines. So nurses, physical therapists, physicians, social workers, discharge planning experts, and all these people had at least five years of relevant experience.
Speaker 2: So really experts in the area of discharge planning. And so they were in teams of eight and they all looked at the case studies and then said whether they want to discharge the patient to home or whether they should be referred to services. And why. So after they collected all this data, they did a first round, and if there was an agreement, they then could do Delphi rounds to get them to discuss what they thought, why they would refer or not, and come to agreement. So after that was done, they had refer or not refer and for those refer patients, they had reasons why, and they did it regression modeling with that. And came up with six factors in the model that were predictive of poor outcomes post-hospitalization. And those were age, walking ability, length of stay, the number of comorbid conditions, so how many different conditions.
Speaker 2: They had depression and self-rated health assessment. So when you ask them how they felt, how healthy they were, it's poor, fair, good, and excellent. So how did they rate their own health? And so all six of these are things that um are easily added into the HR. Those are data that are already collected by the admitting nurse or in a daily nurse assessment. So this um predictive model was actually added into the hospital system both here and a couple other locations throughout the company or throughout the country through a technology transfer company called Wright Solutions. And they've been continuing to do research, and when the algorithm was implemented, they've shown that it's abbreviated the D2S to for a discharge decision support study.
Speaker 2: But the D2S2 does decrease 30 and 60-day readmissions and leads to better outcomes for patients. So once we knew who was at risk and who wasn't and who to refer and who not, the next question was where should they be referred to? So what care should they receive? So this process was again very similar, pulled new EHR records and put together all these case studies, and there were up to 1,200 variables from the nursing admission assessment. and ongoing documentation. And as I mentioned, it was things like sociodemographics, cognitive status, physical and mental health, home environment, social support, things about the caregiver, medication. Medical history, depression, fall risk.
Speaker 2: And again, we had teams very that were very interdisciplinary, doctors, nurses, social workers, and physical therapists. This time they were only in teams of three And all of the case review was done online. So they would go in, read the case, check yes or no to whether they were referred, where they wanted to refer them to, and then the case came back up with check Boxes next to every variable, and they would go back in and click all the variables that help them make that decision. And for this one, we were using EHR records from four different hospitals. hospitals. So as I mentioned earlier, it was a big process to merge them, even though they were all using the same vendor. Some of them had customized their electronic health records or were using different versions. So the data actually didn't all win
Speaker 2: the same And through this study with question one and question two, it was found that almost a quarter of patients were actually refusing care. So they were at high risk of being readmitted, they were recommended a post-acute referral site and they were actually declining those services. So the next question was, you know, why are they declining those services? Are those are they declining because of preferences? And if so, can those preferences Be incorporated into the model. So this is the work that I'm working on right now. The article that's clipped at the top is from a couple months ago. And it was looking at when patients are leaving the hospital, what information they would want to know. And for this, I interviewed almost 30
Speaker 2: older adults in the hospital about all kinds of questions about what they knew about the different post -security Q care sites, what they were concerned about in being referred, what they might want to know. And so we asked them the two questions that we've been analyzing, the topic And we're working on the second one. The first one was when discussing options available to you for post-hospital services, what would you like to know about your care and those services to help you make an informed decision and can you tell from the patient point of view why someone would not want post-hospital care? So the hope is if we know according to the predictive modeling they should go to home care Is there a way for us to know before approaching that patient that maybe they don't are comfortable with someone coming into their home?
Speaker 2: They might do better with an inpatient setting or the opposite that they really absolutely want to stay in their home and we should look at something in the community as well as um if they have any misperceptions about the different sites and just generally what they know so we can help them accept the Preferred site of care for post -hospital. So now I'm going to talk about a couple of projects related to predictive analytics So with the D2S2, it was expert opinions and then regression modeling versus just taking all the data that's in the HR, all these variables, and running the stiff Statistics from that. The two examples I'm going to bring up are projects I worked on at Independence Wood Cross here in Philadelphia. They're an insurance company. I worked specifically in Medicare Advantage, which is the health
Speaker 2: plans for older adults, but a lot of the projects that we worked on in informatics were across their patient populations. And what I think is really exciting about both the D2S2 and the work we've about to talk about is that if we can predict these bad outcomes as nurses and other healthcare professionals you can intervene before that So with the D2S2, if we know that they're going to have poor outcomes, likely, we can do something ahead of time, which is the same for the next two scenarios. So the first one is a likelihood of hospitalization model. This is a clip from the local NPR station. They did an interview about the model back in April 2015. So predicting the sick through personal trials and health data. So they have a likelihood of hospitalization model
Speaker 2: and the intervention that they're testing is nurse health coaching. So they're focused on kind of eight subgroups. They have older adults and non-older adults, and then with each they're looking at four diagnoses right now. Diabetes, congestive heart failure, coronary artery disease, or just cardiac problems, heart problems. and COPD, so lung issues. So they're predicting a high likelihood of hospitalization and they're now testing what nurse health coaching can do as an intervention to prevent hospitalizations within six months. months. In the second one, they have been working on a model to predict diabetes. This article is looking at when they created the model, they reserved a third of the data to
Speaker 2: Test it. So that's the data that's included in this article. I worked on the prospective analysis, so once they had run the model, knew it was good. They predicted who would have diabetes 6, 12, 18 months from that point. So I looked at how well the model was doing as soon as we would hit those dates. But these are the ROC curves or receiver operating curves for the predictive diabetes model. And they're comparing it to a baseline parsimonious model which is just like the things that we know lead to diabetes like obesity they took those and saw how predictive they were and then if they could make a model that was more predictive. So they were pretty happy with the model and are now
Speaker 2: looking at outcomes prospectively. So the next topic that I wanted to briefly talk about was open health data. We're lucky in Philly. We have Open Data Philly, which is um the city puts a lot of their data up on this repository um and they do 26 health data sets. Overall they have 329 data sets that are all available with CSV by CSV. But even if you're not based in Philly nationally, HHS, which is the Health and Human Services Since 2010 has had a health data initiative to open up data and make it more publicly available. So healthdatac. gov is all of their health-related data. There's 2,880
Speaker 2: 18 datasets as of this morning. So if you're interested in playing around with any healthcare data, seeing if you can create any models, there's a lot of data sets that are easily available. And that's kind of what I've been playing around with right now, was learning more about Python and data visualization using some of the open data that's available. I also wanted to mention using Python and Django specifically with healthcare data. On the right, this is The software architecture for a new program called Project Cognoma that is a collaboration between a lab here at Penn, the Green Lab , Data Philly, which is a meetup group here in Philly, and Code for Philly So this just started in the last two weeks. They're bringing more groups together to work on it.
Speaker 2: But they're building it with Django as well as machine learning with Python. And a Postgres SQL database. And I wanted to mention there's two other companies in Philly that use Python for their healthcare data. Pickwell helps people pick the ideal health insurance for themselves. and their family by predicting what would be the best match for them. And health variety I'm less familiar with, but they also do a ton of work with patient data. using Python. And then when I was putting together this presentation, I Googled Django and healthcare because I hadn't seen a lot out there. And up popped Dr. Chrono, which is an electronic health record system that I didn't even know was built with Python and Django. But they are. Um so that's pretty cool as well.
Speaker 2: That is okay.
Healthcare data comes from hospitals, physicians, patients’ personal health records, laboratories, public-health reporting, insurers, and researchers. Common sources discussed here are electronic health records and insurance claims.
Discussed at 3:19Claims data is primarily collected for billing, uses standardized codes, and makes it relatively easy to analyze populations and care across health systems, but it is not real-time. EHR data is more detailed and usually available in real time within one system, though combining records across hospitals can be difficult.
Discussed at 4:05Clinical decision support uses information in an electronic health record to help providers, patients, and caregivers make better decisions. It can provide alerts and reminders, clinical guidelines, order sets, and diagnostic support.
Discussed at 7:04Post-acute care includes home care, inpatient rehabilitation, skilled nursing facilities, nursing homes, and hospice. These services support patients after they leave the hospital, when unmet needs can lead to readmission or loss of function.
Discussed at 9:35The discharge decision-support model used expert reviews of de-identified patient cases followed by regression modeling. Its six predictive factors were age, walking ability, hospital length of stay, number of comorbidities, depression, and the patient’s self-rated health.
Discussed at 10:06According to the talk, the D2S2 system reduced 30- and 60-day readmissions and produced better patient outcomes after implementation in hospitals.
Discussed at 12:52A hospitalization-likelihood model identifies people at high risk, including patients with diabetes, congestive heart failure, coronary artery disease, or COPD. The intervention being tested is nurse health coaching intended to prevent hospitalization within six months.
Discussed at 16:27Philadelphia’s OpenDataPhilly provides health datasets, and the federal HealthData.gov repository provides thousands of health-related datasets from the Department of Health and Human Services. The datasets can be used for analysis, modeling, and visualization.
Discussed at 19:03The talk describes Project Cognoma, which combines Django, Python-based machine learning, and PostgreSQL to work with healthcare data. It also mentions healthcare organizations using Python, including Pickwell, HealthVerity, and the Django-based electronic health-record system DrChrono.
Discussed at 20:36Note: We understand that names change, people change, and bodies change. We respect each individual's journey and privacy. If you have any concerns about a video or need us to remove content, please don't hesitate to contact us. We will handle your request with care and promptly address any issues.
Published July 15, 2026
Published July 15, 2026
Published July 15, 2026
Published July 15, 2026
Published July 15, 2026
Published July 14, 2026