Skip to main content

How to connect Google Sheets to live Medicare data

This is pretty cool. Medicare/CMS posts a lot of their data in two main websites for public consumption:

Data.Medicare.gov
Data.CMS.gov

I don't know why these two are separated, but it does seem like they host two separate datasets of healthcare data.

One can connect Windows Excel to an OData feed from Medicare/CMS, but I can't figure out how to do it with Mac Excel '11 (I don't have a Windows computer). I prefer using Google Sheets anyways, so I wanted to find an easy way to connect Sheets to Medicare/CMS data.

Here's the technique I have found, and please let me know if there is a better way:

1. First, access the table of data you want. For me it was this one:

https://data.cms.gov/Public-Use-Files/Medicare-Provider-Utilization-and-Payment-Data-Phy/ee7f-sh97

2. Because these tables are usually massive, you will probably need to login and create a saved view of a subset of the data.

Here's the subset of data I created, where I did a search for "Mohseni":

https://data.cms.gov/Public-Use-Files/test1/5fxd-ai9f



3. Click on "Export", then "Download",  and then right click and save the link to the CSV file. Let me clarify: don't click the CSV file to download it, rather right click and save the LINK to the CSV file. It should be something like this:

https://data.cms.gov/api/views/5fxd-ai9f/rows.csv?accessType=DOWNLOAD

4. Go to Google Sheets and use the following function:

=IMPORTDATA("url")

... and put your url that you just copied in the url spot.

=IMPORTDATA("https://data.cms.gov/api/views/5fxd-ai9f/rows.csv?accessType=DOWNLOAD")

...

Now, every time the data is updated, your Google Sheet will update as well.

This process will not work if your data set is too large.

Comments

Popular posts from this blog

Dr. Alex Mohseni invited to speak at Brault’s Healthcare Leadership Forum about the future of Emergency Medicine services and how ED groups can adapt using telemedicine.

  Dr. Mohseni presented on the topic of how Emergency Medicine groups could expand their scope of practice to the virtual space to and how to do so in a financially viable way.

From Stethoscope to Strategy: Why I Built ClinX Academy for Physicians Ready to Lead

“I love medicine—but I don’t love the hamster wheel.” That sentence kept echoing in my head during 3 a.m. shifts and budget meetings alike. If you’re a physician feeling the same tug between clinical passion and systemic frustration, this post is for you. The Problem: Brilliant Clinicians, Limited Business Training Physicians command >80 % of U.S. healthcare spend yet hold <5 % of C-suite seats. Traditional MBAs cost $150K+, 2 years, and countless missed family dinners. Weekend “crash courses” often lack depth, CME credit, or a meaningful network. Burnout rates hover around 50 % —and much of it stems from feeling powerless in operational decisions. Keywords: physician leadership gap, physician executive training, clinician burnout, healthcare MBA alternative, non-clinical career paths My A-Ha Moment in the Hospital Corridor I was serving as a National Medical Director when a perfectly capable colleague admitted, “I have no idea how capitation works—I just sign ...

How to connect openai to zapier to twilio so that you can interface with GPT3 via SMS

 I created an SMS interface to openAI's gpt3 API so that I can send an SMS prompt to openai and get an SMS response. Result looks like this: There may be better/easier ways of doing this, but this is how I figured it out. I'm assuming some degree of familiarity w/ Zapier here: 1. Buy a phone number in Twilio to use for this. This only costs $1/mo 2. In Zapier, create a new zap where the trigger is "Webhooks by Zapier" (Premium option). Choose your event as "Catch Hook". This will generate a webhook URL that is custom for this workflow. We are doing this because when you send the SMS to the Twilio phone number, you want it to **instantly** trigger the zapier workflow and not wait the 5-15 min it takes for Twilio to trigger on its own, so for that you need the webhook: 3. Copy the webhook URL from zapier and paste it into Twilio in the "A Messages Comes In" webhook section for that phone number 4. You will then need to send a test message so that Zap...