
I’m guessing many of you have logins to an EHR (Electronic Health Record) platform developed by Epic called “MyChart”. Although MyChart has tons of features, there may be times when you’d like to access your data directly from a script without having to go through a web portal (at least I would!) It just so happens that EHR providers are required by law to provide API access to their platforms using a standard called FHIR, and do so free-of-charge, at least for a subset of the calls.
So I just wrote a very simple app that allows you to login to your MyChart system and retrieve a so-called “access token” that can be used to make FHIR API calls to MyChart to pull your own patient data. You can access the app here: https://fetch-my-epic-token.org. Enjoy!