JP's Internal Medicine Page

I'm an internal medicine doctor working as a nocturnist. Sometimes I like to make things with python but most of my life is medicine and raising my young family. I have many posts about teaching my toddler to read at a younger age than is probably wise.

Predict Survival in Advanced Cancer

Other Things I've Made:
ECG Viewer Bobcat Mountain Text Adventure Demo

Medical Blogs I Like:
Dr. Smith's ECG Blog ECG Maven The Number Needed to Treat

Blog Postings:

Thursday, April 23, 2015

ECG Viewer Program

I finally got my ECG viewer to work as a windows application!  You can download it here:

https://www.dropbox.com/s/i79vy1vcxiyo1h5/ECG_Viewer.zip?dl=0

Unzip the file and double click on the program "ECG_ViewerOnlyWindows.exe"

When you open it you will need to load an ECG. There are several ECG files in the folder "ECGs" to load and play around with. 

If you download and use it for other images online, I've found that ECG images that are jpegs should be at least 500 kB in size to really be worth looking at (otherwise there is not enough detail and they are just blurry when you zoom in).

Features:
  -Horizontal and Vertical Calipers
  -Guidelines for calculating rate, axis, STEMI, ischemic regions, LVH, etc...

Bear in mind I have kept the graphics simple because it's a work in progress.
I also have a version of this I'm working that has a quiz mode and my goal is to allow the user to make quizzes (so that you can educate your medical students/junior residents with those ECGs you've saved).

I'm pretty sure it won't work on Mac OS, but it's worth trying (and let me know).

Any comments, suggestions, critiques are much appreciated!

Saturday, April 18, 2015

ECG Program coming soon

I am currently working on an ECG viewing project.  The goal was to make a program where one would load an ECG, scrool/zoom in, use calipers to measure things and have buttons that could give useful info on how to measure things like rate, axis, LVH, ischemic regions, etc... It would also have a challenge mode where you had to identify things correctly (like ECG Maven).

Currently I have broken it into two projects, one is complete and is the basic viewer where you can load an ECG and use the calipers and click buttons to help interpret it but has no "Quiz mode".  I am trying to get it into an executable that will be more easily installed rather than having to have people install python and pygame to run it.  For some reason I haven't yet gotten it to work, although I have done this in the past with another game I made (a multiplication game for my sister which I might put up here someday too).

The "Quiz Mode" version needs some work, because ideally I would like to make it so that the user can design their own quizzes.  Currently I just have it set up with basic proof of concept quiz that I made.

I will be done with a week of nights this Monday and will have some days to tinker so hopefully I'll have the "Basic ECG Viewer" program available in a couple of days.

PS:  Originally I had planned on incorporating detailed instructions on how to learn to read ECGs.  As I worked on this I soon realized how much work this would take and there are already lots of better resources out there to teach this.  That's why there are a couple of posts on the basics of leads and background boxes which I thought I might as well post because maybe they will help somebody.

Sunday, April 5, 2015

ECG Primer Part 3

The Precordial Leads (V1 – V6) measure the electrical potential of the heart in the Transverse Plane (Gives you a “Z” axis, think of it as looking down at the heart from above):



If you understand the anatomy of the heart you will see how V5 and V6 give a good measure of the lateral, left side of the heart while V1 and V2 cover more of the septal area.

By understanding where the leads are positioned and knowing the anatomy of the heart, one can better understand where a certain abnormality is occurring in the heart, and which artery is likely involved:



Finally, the Rhythm Strip is important because it gives you the most time in one lead for observing the Rhythm.  Recall that the entire ECG is 10 seconds long.  The rhythm strip gives you all 10 seconds of the chosen lead (in this case lead I).  The other leads are being sampled sequentially:  that is the first 2.5 seconds of I, II, III are recorded, followed by the next 2.5 seconds of aVR, aVL, and aVF, etc...

Later I will write about how to place the leads in real life and briefly touch on what “augmented” means, although as long as you know the direction in which the leads measure you will be able to interpret ECGs.

Any questions, comments, critiques? I'd love to hear from people at jpmax7 at gmail.com