Hello, everyone!
I’m pretty much a notice at using AI and most of you have probably figured the following out. However, I learned that I can use it to perform a variety of tasks in OpenEMR coding and analyzing. This may have been brought up before, but here is a summary of my findings:
- ChatGPT (or your preferred agent) can analyze DB queries embedded within php files. All I did was upload several important php files, such as demographics.php, demographics_full.php, stats.php, stats_full.php, and files dealing with calendar. For a few tables, it asked to see the current indices, but within a couple of minutes it gave me sql commands to create a whole slew of indices (composite indices) that were missing that sped up the system tremendously. I mean, OpenEMR is now flying for me. It showed me ways to log slow queries and copy and paste to it, so it analyzed further and gave additional suggestions. In addition, it offered to change some queries in the php code to quicker, more stable ones, but I passed on it for now, as just adding those indices helped so much! One thing it noticed, for example, was that the calendar events (I think it’s openemr_calendar_events or something similar) that basically pulls everything for the calendar has field pid stored as text, whereas all other tables have it as bigint. That made a huge difference, as even indices will not help if mySQL has to convert every text to number and compare.
- I now have my first fully AI-created report. Unlike my previous endeavors with OpenEMR, I did not write a single line of code. I uploaded a representative report php file and provided some information on what I would like to see and basic functionality. It pulls up photographs available for a patient and can create a printable report with side-by-side photographs (great for cosmetic cases, surgeries, etc). It can rotate photos, zoom in and out and create custom labels for photos on the report. In the code that it came up with, it even has extensive comments. I can provide this report to whoever wants it, but it looks great! And it only took a few minutes to create (I had to make a few changes after the original, but only to improve the functionality).
I think this could serve as a kind of call to action to better the functionality of OpenEMR in terms of improvement of what is already in it. Tables and indices have to be optimized, some queries have to be improved, maybe even some logic in various places. As we continue to enlarge the scope of OpenEMR and create new functionality, I think it would be important to optimize what is already in it and build upon that. And I believe that AI can REALLY help with this step by removing the need for hours and hours of this manual labor.
Let me know what you think or if you want the new, AI-generated photograph report.
Cheers,
Alex.