Introducing the “medicalclaims” package for open source R users

Sunlight is said to be the best of disinfectants.”  – Louis Brandeis

Pick your hobbies wisely, especially if they involve the dysfunctional healthcare sector, open source software,  health savings accounts and terabytes of data.   If you are not careful, seven years will go by before you may have something to show for your efforts.

HealthyHive is excited to announce a new software package, “medicalclaims”, for the open source R software community.  The initial package includes 100,000 de-identified medical records from New Hampshire’s Comprehensive Health Information System’s (CHIS).  It’s just a morsel of our over 300 million medical records we’ve amassed in our effort to better understand why healthcare as a sector is so inefficient.  

Our goal is for the data science community to create useful code that advances transparency efforts in healthcare.  The placeholder data can be used to build helpful functions and models that address the following potential use cases:

  • Summarized data insights that examines spending based on demographic, diagnostic, location of care, provider, and geographic considerations
  • Functions that illustrate the primary drivers of price variation 
  • Fraud Detection
  • Machine Learning models to predict the relative price of healthcare services based on a list of variables such as location type (Hospital versus Office Setting), provider, geography, plan type, etc. 

We believe the open source community is particularly well-positioned to tackle the healthcare crisis because it represents the antithesis of America’s healthcare industry today:  a closed system that blocks data transparency efforts to the benefit of a few and detriment of all others. 

Self-Funded Health Plans:  Time to get your data

The “medicalclaims” package is a modest first step towards encouraging companies to use free software to gain more control and understanding over their healthcare spending.  Self-funded companies in particular are ideal potential end users given the fiduciary obligation present in such plans.   So guess what?  It is time to get your data from your insurance company.  They will try to prevent you from getting it, but just remind them that you have a fiduciary obligation.  The insurance industry hid behind ERISA law in the Gobeille decision, so it’s time to call their bluff … using ERISA law.  Isn’t that ironic?

Below is some sample code to provide the reader with some context:

View of top Diagnoses from the sample data:

Isolate lower back pain and examine average cost based on location or setting type:

The Punchline

What’s the point, or punchline?  Given our focus on health savings accounts and maniacal quest to advance them as the best retirement savings account in the world, if you overspend in your HSA, you are stealing from your future retirement funds.  $500 saved on a procedure today is worth $1,039 in 15 years assuming a 5% rate of return. 

So while we will be able to manage HSA investment accounts once our investment advisory practice goes live, there is tremendous cost savings opportunities to be made by digging into the healthcare data to discern ways to save on out-of-pocket expenditures.  Well, we can do the digging and provide some summary conclusions.  But the main point here is that as a society we need to start demanding more access to our data.  Covid-19 is going to accelerate change in several sectors.  We expect healthcare to be one of them … finally.

More to Come 

We look forward to posting more frequently on this blog.  If you have any particular questions about the data, please email

This price transparency initiative is sponsored by HealthyHive’s sister entity, Lodestar Wealth Public Benefit, LLC.  Lodestar is in the process of becoming a registered investment advisor (RIA).  As a new investment advisor, Lodestar will provide investment management and fiduciary advisory services for companies and individuals while leveraging HealthyHive as its digital educational Hub.  The two are separate companies with the same founders.  This is an exciting development for us and we hope it will also have positive long-term implications for the health savings account space.

Comments are closed.