[Disclaimer: The note used in the demo is created by GPT. It is not an actual patient note. Yes, GPT is that good at generating "fake" clinical notes.]
I write code and I enjoy using Github Copilot (when I can use it).
It seems like some crazy magic when you use it for the first time.
The concept strikes me as similar to the "dotphrases" in Epic/Cerner/ect that many clinical folks use most of the time ... but way more useful.
For those who don't have the pleasure of writing clinical notes, dotphrases are so ubiquitous that there is a www.dotphrase.org as well physician coaches who use them as lead generation for business. I often hear residents voice concern that when they get an attending job, they fear the amount of time it will take to redo all their dotphrases 🥲.
However, dotphrases are not generative like AI. They either pull in vital signs/meds/labs, paste in some premade text, or a combination of the two.
That is to say, while dotphrases are helpful, they offer very little "intelligence" out of the box.
So, I was curious if I could take a cue from Github Copilot and use the "//" in a free text note to trigger a request to GPT4 asking it to "Imagine you are an emergency physician. Complete the note with the instructions after the //"
So I made a simple app that does this at https://copilotnotes.patientdev.repl.co/
To try it out need to type "//" then some instructions (such as "// generate MDM" and then hit "Tab." Tab is typically how you trigger the dotphrase.
Note: You need to use your own OpenAI API key if you want to use the demo.
If this actually existed, I think this is what the hospital would look like:
While I don't know if the note writers in Epic/Cerner/etc support external API calls, FHIR's DocumentReference.create certainly supports adding this document as a first-class citizen note in the EHR.
Some lessons learned from the experiment are:
- The round trip for OpenAI via API is much slower than the experience in Github Copilot. It seems to be 5-10 seconds, which is way too slow. I imagine there are ways to optimize.
- You would probably want to train a custom LLM on your own pathways as some of the MDM was out of date to the current practice of emergency medicine.
- Given that AMA E&M guidelines changed recently with the elimination of counting review of systems and such, one has to wonder if there is an opportunity to reimagine writing notes with a copilot first approach. For example, if you could pull in a summary of UpToDate relevant to the clinical scenario you are writing about in a note just by adding "//." Or a deep integration with Glass Health, etc.
- Clinical note writing is shouting out for innovation in this new era of cheap, simple to integrate, generative AI.
The "dotphrase that's really OpenAI" code itself is at https://replit.com/@patientDev/CopilotNotes