EP Studios App Updates

Here’s what’s going on with the EP Studios apps:

EP Calipers

Most of the new stuff is in EP Calipers. Probably the most useful new feature is available on the Mac and Windows versions: a transparent floating caliper window. Use it to overlay calipers over any open window on the desktop. Check figures of journal articles. Use it during slide shows. Use it on webpages or on your EHR. No longer are you limited to just image files you have downloaded onto your computer. Unfortunately due to the nature of mobile device platforms, there is no way to implement similar functionality on a phone or tablet (that I know of).

Using the floating transparent window to check measurements in a published academic paper. It appears the pacing CL is actually 240, not 250 msec.

Several users suggested the capability to color each caliper differently. This is now implemented. Others wanted a way to fine tune caliper position besides just dragging with your finger or trackpad/mouse. This is also implemented, via keyboard arrow keys or buttons that “micromove” or “tweak” caliper positioning.

Finally, in case you missed it, angle calipers are available. They can be useful in Brugada syndrome, in which the so-called beta angle may have predictive value. In addition, the work of Dr. Adrian Baranchuk from Queen’s University in Kingston, Ontario indicates that there is prognostic value to measuring the base of the triangle formed by the angle 5 mm inferior to the beta angle triangle’s apex. EP Calipers now supports this. Provided amplitude has been calibrated in mm, the triangle base is automatically drawn showing this measurement. This technique has been dubbed by Dr. Baranchuk as a “Brugadometer.”  More information on these Brugada Syndrome ECG measurements can be found here.

Using the Brugadometer to measure the beta angle and the triangle base 5 mm below the apex.

EP Coding

EP Coding also received a major update earlier this year. After a few years of relative stasis, the AMA decided to shake up the coding of EP procedures once again by unbundling the sedation component from the procedure codes. The result is a relatively complex coding system for sedation, depending on factors of patient age, who does the sedation, and the sedation duration. EP Coding now allows you to calculate the sedation codes automatically using a sedation coding calculator.

Sedation coding calculator

 

EP Mobile

EP Mobile has been relatively static. It is already chock full of calculators, drug information, risk scores, pictures of ECGs, etc. It is our best selling app, so we must be doing something right. I am always happy to add features; just email me at mannd@epstudiossoftware.com with your requests.

Final thoughts

This is a bit off-topic, but probably not worth a separate blog post either. My old Motorola Droid Maxx Android phone is getting a bit long in the tooth, and way past upgrade time. I was an early adapter of Android, and though I use other Apple products (a Macbook Pro and an iPad Mini 2), I have never owned an iPhone. This may change. In many ways I think Android is a more innovative operating system than Apple’s iOS. Nevertheless we live in an insecure world, and I can’t get timely updates to Android via my phone and Verizon. My phone is stuck on Android 4.4.4 (I even forget what candy that is), whereas the most recent Android version is Android 7 Nougat.  Apple doesn’t have this problem.  Having an outdated, obsolete OS in the current world of bad guy hackers is untenable. I think the problem is (as usual) with the providers, who could care less about updating an older phone when they could be pushing the latest phones on customers. The 2 year cycle of upgrading phones is ridiculously wasteful. But that’s what is driving the industry, with the carriers all too eager to get you in and sign another rip-off contract. So, it might be goodbye to Android soon.

Do No Harm

Cardiac neuroses are often iatrogenic in origin. A well-meaning but careless comment by a physician can change a person’s sense of well-being in an instant. The effect can be permanent and devastating. Many clinicians who complain about overly anxious patients don’t appreciate their own role in the genesis of this problem. Our words matter. They can reverse the good we do with our medications and procedures.

If you are a heart rhythm doctor, the scenario is familiar. Your patient (we’ll assume a male for the sake of pronoun economy) has premature ventricular complexes (PVCs). Not a lot of them, but he feels every one. They are intolerable. There is no underlying structural heart disease. These are benign PVCs. The treatment options are not good. Drugs have side-effects that range from annoying to life-threatening pro-arrhythmia. Catheter ablation offers the possibility of “cure,” but is not a sure thing and has its own set of risks. The PVCs aren’t very frequent and perhaps will disappear with sedation during the procedure. Even if they don’t and they can be mapped, how far should they be pursued? What if they are epicardial in origin? Should we really consider placing a catheter directly into the pericardial sac and ablate near a coronary artery to treat benign PVCs?

Reassurance is the best treatment. You tell the patient that these PVCs are benign. You say that many people have PVCs, even more frequent than the patient has, and that most people aren’t even aware they have them. You tell your patient that there is no underlying heart disease, that these PVCs will not shorten his life, and that the treatments are likely to have side-effects or unwarranted risks. But it doesn’t matter to the patient. His palpitations are incapacitating. He can’t do his job when they come on. He has read a lot about PVCs and has seen several doctors before coming to you, the arrhythmia expert. He wants something done.

You stall. You ask the patient to try a different beta-blocker than the ones he has tried already that haven’t worked. You say you need to get some of his medical records from his other doctors. You want to review his Holter monitors. You need to make sure there is only one PVC focus if ablation is being considered as a treatment option. Mostly you are uncomfortable recommending an aggressive approach and want to put off making a decision.

Six weeks later the patient is back in your office. The new beta-blocker didn’t work. Surprise, surprise. He has read the information you gave him about ablation and wants to try it. He is desperate. He is willing to take the risk.

You look at the patient. He is in his mid 30s. He is an executive, type-A personality. You have seen his type before. But you are curious about something.

“When was the first time you found out about your PVCs?” you ask.

The story comes out. It was about 5 years ago. One of his friends at work had gone and gotten an “executive physical” that was being offered by one of the cardiology groups in town. It was a nice deal. There was a physical exam, they checked your cholesterol, and you ran on a treadmill for a few minutes. Afterwards there was orange juice and bagels. So he signed up for it.

During the treadmill the technician seemed a little nervous. Before he got too far into it, the technician stopped the test. You have an irregular heart beat, he was informed.

This was news to your patient, who had always assumed his heart was just fine. But the technician told him that he should refrain from any strenuous activity and needed to see one of their specialists about the irregular heart beat. In the meantime, a 24 hour Holter monitor was put on and he was sent home.

The monitor was turned in the next day, and he waited nervously for the result. That night, he was awakened from sleep by a phone call. The doctor on-call had gotten a call from the monitoring service. The Holter monitor had shown a critical result. During sleep, your patient had had 3 PVCs in a row. The monitoring service deemed this ventricular tachycardia and dutifully informed the on-call doctor of this “critical” result. The doctor was obliged to call the patient, whom he didn’t know. Not knowing if this was a patient with end-stage cardiomyopathy and ejection fraction of 10% or someone with a perfectly normal heart, the doctor on-call felt it was the better part of valor to assume the worst.

“You are having runs of ventricular tachycardia on your monitor,” he told your patient. “This is a life-threatening emergency. Your heart could stop and you could have cardiac arrest. You need to call 911 and get to the hospital ASAP.”

After hanging up, the on-call doctor rolled over in his bed and went back to bed, knowing he done his job, making sure a patient with a potentially life-threatening problem would take it seriously and get to the emergency room. But for your patient, life had changed forever. Even after a full workup that showed no structural heart disease, he couldn’t get it out of his head that his heart rhythm was unsteady. His heart was unreliable. He could die at any time. He had never paid attention to his heart beat before, but now he could feel the irregularity, the strong beats that told him he was having more PVCs. They were driving him crazy. Crazy to the point he would consider having a doctor insert a catheter into his heart and burn away some of his heart muscle to get rid of them.

This story is not an exaggeration. I have seen something like this happen many times, with patients who have generally benign conditions like PVCs or supraventricular tachycardia, or somewhat more serious problems like atrial fibrillation. Patients with heart conditions are worried that what they have will kill them. They know about heart attacks and cardiac arrest, but they are not as well-informed about lesser cardiac conditions that are not life-threatening. Apparently some doctors are equally poorly informed, or just think they are doing their duty by scaring the hell out of patients in order to get them to do their bidding, whether it is to go to the emergency room or take some medicine or do some procedure. The problem is magnified by the disappearance of long-term patient-physician relationships. Patients are at the mercy of the on-call schedule, and rarely get good advice when they are called with the result of some lab test in the middle of the night by a doctor who doesn’t know them.

What to do? Be careful what you say to patients, especially those you don’t know well. Think about how your would react if you were told the same thing. Don’t use your authority as a physician to bully a patient to do what you thing is “the right thing.”

Choose your words carefully.

Thoughts on Mark Josephson

I’m sure there will be plenty of tributes to Dr. Josephson in the next few days from his colleagues who knew him well and those who didn’t know him personally but learned so much from his books and articles. I fall somewhere in the middle. I wasn’t one of his students at Penn who learned from him directly. I did meet him several times. I did work for years at the University of Colorado with Alden Harken, the surgeon with whom Dr. Josephson developed the “Pennsylvania Peel” — endocardial resection, the first surgical treatment for ventricular tachycardia. Oh, and I did live in the same apartment Mark used to live in during my cardiology fellowship in Philadelphia in the 1970s. More on that later.

Mark Josephson may represent somewhat of a dying breed in academia. In the great academic triad of clinical care, research, and teaching, the last element, teaching, which makes the least money for institutions, is emphasized less and less. Dr. Josephson excelled as a teacher. A lucky few were able to experience his teaching skills first-hand. A far greater number learned from his writing, in particular, from his opus magnum Clinical Cardiac Electrophysiology. Originally a relatively small but densely written book in a red binding, subsequent editions were more massive, filled with page after page of painstakingly labeled intracardiac recordings and clear-cut explanations of obscure electrophysiologic phenomena. I cut my teeth on this book, reading the original through when I was an EP fellow in Houston, and then reading the 2nd edition straight through when preparing for my first EP boards.

The book was important because it set a standard for analysis of intracardiac recordings that inspired subsequent researchers and students of the field. Back in the 70s and 80s, the mechanisms for most major arrhythmias (with the exception perhaps of atrial fibrillation) were worked out solely by analysis of intracardiac recordings and a few pacing techniques. Mark Josephson was instrumental in this process. Back then, working on arrhythmia mechanisms was the important thing. Therapies for ventricular tachycardia were drugs like quinidine or procainamide, and EP-guided drug therapy was, in retrospective, a pseudoscience. Yet working out the mechanisms of WPW syndrome, supraventricular tachycardia, and ventricular tachycardia eventually led to effective ablation and device therapy in the 1990s and beyond.

Dr. Josephson, who along with a cadre of first-generation EP superstars trained by Dr. Anthony Damato (the “godfather” of EP) at the Staten Island Public Health Hospital, set a standard for teaching in the field of electrophysiology that was often emulated, but never matched. Moreover he wrote a number of incisive editorials over the years in an attempt to keep the field rooted in its scientific basis, rather than be swept away by the insidious influence of industry or the idea that it wasn’t necessary to understand the pathophysiology of an arrhythmia if you were just going to burn it away.

As mentioned above, I was lucky enough to meet him on a few occasions and to round with him. By coincidence we discovered that the apartment on Henry Avenue in Philadelphia where I lived when I was a fellow was the exact same apartment he had lived in several years before. He remembered well the old guy who lived one floor above us, a fellow by the name of Sullivan, nicknamed “Sully.” I was just a plain cardiology fellow when I lived there, only subsequently deciding to go into EP and move to Houston for training. I always wondered if I picked up some kind of EP karma from living there. Who knows?

The advances in diagnosis and treatment of arrhythmias that have occurred since the 1970s are extraordinary, and uncounted numbers of people have benefited from these advances.  It seems a shame that most lay people, saddened at the loss of actors, musicians, sports heroes, and other celebrities, have no knowledge whatsoever of the passing of people who have actually had much more impact on their lives, like Dr. Josephson.  So it’s up to us, his colleagues, to remember Mark Josephson and give thanks for his incredible contributions to medicine and the world.

A Tale of Two Histories

Compare the following two versions of the same medical history:

Version 1

CC: chest pain
Mr. Smith is a 57 y/o white man who comes into the office today for the first time with a complaint of chest pain. He states he has been in generally good health in the past, though he has smoked about 40 pack-years and admits to not exercising much, other than occasional games of golf. He has trouble keeping his weight down. He has been a middle-level manager for many years, but about a month ago changed jobs and took a pay cut. He says this has been quite stressful. He has changed jobs before, but states “I’m getting too old to keep doing this.” About 2 weeks ago he started noting some mild heaviness in his chest, lasting up to 5 or 10 minutes. He attributed this at first to eating heavy meals at dinner, but now thinks it occurred after climbing stairs following meals. He took some Tums, but was not sure if the pain eased from this or just from resting. These episodes of discomfort were localized to his anterior chest, without radiation or other associated symptoms at first. Over the last 2 weeks he thought that they were getting a little more frequent, occurring up to twice a day. Two days before this visit, he had an episode of more intense pain that woke him up from sleep at night. This episode lasted about 15 minutes and was associated with diaphoresis. “My pillow was soaking wet.” He woke up his wife who wanted to call 911, but he refused, though he agreed to make this appointment somewhat reluctantly. He has had no further episodes of chest pain, and feels that he is here just to satisfy his wife at this point. He generally doesn’t like to come to the doctor. He doesn’t know his recent lipid levels, though he says a doctor once told him to watch his cholesterol. His BP has been high occasionally in the past, but he attributes it to white coat syndrome: His BP is always normal when he uses an automatic cuff at the store, he claims. He is on no BP or lipid-lowering meds.  He takes a baby aspirin “most days.”  His parents are deceased: his mother had cancer, but his father died suddenly when his 40s, probably from a heart attack, he thinks.

Version 2
  • Mr. Smith
  • CC: chest pain
  • Age: 57 y/o Sex: M Race: Caucasian
  • Onset: 1 month
  • Frequency: > daily [X] weekly [ ] monthly [ ]
  • Location: Anterior chest [X] Left precordium [ ] Left arm [ ] Other [ ]
  • Radiation: Jaw [ ] Neck [ ] Back [ ] Left arm [ ] Right arm [ ] Other [ ]
  • Pattern: Stable [ ] Unstable [X] Crescendo [X] Rest [X] With exertion [X]
  • Duration: < 15 min [X] 15 min or more [X]
  • Risk factors: Tobacco [X] Family history CAD [X] HTN [?] DM [ ] Hyperlipidemia [?]
  • Relief: Rest [?] Medications [?] Other [ ]
  • Associated symptoms:  N, V [ ] Diaphoresis [X] Dizziness [ ] Other [ ]
Which is better?

Version 1 is an old-fashioned narrative medical history, the only kind of medical history that existed before the onset of Electronic Health Record (EHR) systems.  This particular one is perhaps chattier than average.  It is certainly not great literature or particularly riveting, but it gets the job done.  Version 2 is the kind of history that is available on EHR systems, though usually entry of a Version 1 type history is still possible albeit discouraged.  With an EHR, entering a long narrative history requires either a fast, skilled physician typist, or a transcriptionist — either human (frowned upon due to cost) or artificial, such as Dragon Dictation software.  This latter beast requires careful training and is frustratingly error-fraught, at least in my experience.  The Version 2 example is not completely realistic.  In practice there are more check boxes, more pull-down lists and other data entry fields than can be shown here.  But you get the idea.

Version 2 seems to have a higher signal to noise ratio than Version 1.  It’s just Version 1 boiled down to its bare essentials, stripped of unnecessary verbs, conjunctions, prepositions, and other useless syntax.  It contains everything a medical coder, a medical administrator, or a computer algorithm needs to do his, her, or its job.  It has taken the medical history, the patient’s story, and put it into database form.

But Version 1 is not just Version 2 embellished with a bunch of fluff.  Certainly Version 1 is more memorable than Version 2.  There is a chance the physician who wrote Version 1 will remember Mr. Smith when he comes back to the office for a follow-up visit: Mr. Smith, that middle-aged fellow who was stressed out when he took a pay cut while starting a new job and started getting chest pain.  Another physician meeting Mr. Smith for the first time might after reading this history modify his tactics in dealing with Mr. Smith.  One gets the impression that Mr. Smith is skeptical of doctors and a bit of a denier.  Maybe it will be necessary to spend more time with him than average to explain the need for a procedure.  Maybe it would be good to tell his long-suffering wife that she did the right thing insisting that he come in to the doctor.  All this subtlety is lost in Version 2.

There are some cases where Version 2 might be preferable.  In an Emergency Department, where rapidity of diagnosis and treatment is the top priority, a series of check boxes saves time and may be all that is needed to expedite a patient evaluation.  But for doctors who follow patients longitudinally, Version 1 is more useful.  A patient’s history is his story: it is dynamic, organic, personal, individual.  No two patient histories are identical or interchangeable.  Each history has a one-to-one correspondence with a unique person.  A good narrative history is an important mnemonic aid to a physician.   A computer screen full of check boxes is no substitute.

While the Version 2 history was designed for administrators, coders, billers, regulators, insurance agents, and the government, the Version 1 history was designed by doctors for doctors.  We should be wary of abandoning it, despite the technical challenge of its implementation in EHR systems.

 

Massive Heart Attacks

Google Ngram of the phrase “massive heart attack”

Carrie Fisher’s sad, premature death is an occasion to reflect upon the poor job the news media does in reporting medical news. The initial report from TMZ had the headline “Carrie Fisher Massive Heart Attack on Plane.” If one equates “heart attack” to the more precise medical term “myocardial infarction,” as is usually done, then this is certainly diagnostic overreach on the part of TMZ. From their report it appears that Fisher suffered a cardiac arrest; indeed that term is used in the body of the article. So why not use that term in their headline? Perhaps massive heart attack sounds more dramatic. The word “massive” seems to go naturally with “heart attack.” Try to think of other phrases in which massive fits so well. Massive hack? Massive debt, perhaps? Few phrases roll off the tongue as well as “massive heart attack.” But most of the time when used by the media this phrase is not at all accurate.  Rather it is a catch-all term to indicate something serious related to the heart has occurred.

Of course we don’t know exactly what happened to Carrie Fisher, nor is it any of our business, but none of the information available indicates that she had a large myocardial infarction as opposed to a primary arrhythmic event like ventricular fibrillation or ventricular tachycardia. As a cardiologist having seen this sort of event a depressingly large number of times it is possible to speculate on what happened.  She likely suffered a cardiac arrest related to an abnormal heart rhythm starting suddenly in the heart’s ventricles.  Lay persons and the media often refer to this as the heart “stopping.”  While the pumping of the heart stops or is reduced, in actuality the heart is beating very fast or in a disorganized fashion to the point where it can’t effectively pump blood.   Without rapid correction using an electrical defibrillator this leads to sudden death.

In Carrie Fisher’s case CPR was administered while the plane was still in flight. It is unclear how much time elapsed between the onset of the cardiac arrest and administration of CPR.  It is difficult to tell from the reports if an AED was used on the plane or if defibrillation was attempted only after the plane landed.   We know she never regained consciousness and most likely suffered brain death due to prolonged interrupted circulation.

Carrie Fisher was a cigarette smoker and used cocaine, at least during her Star Wars days.  Could heart disease caused by smoking and drug use have contributed to her sudden death? Could more recent use of drugs like cocaine have been a factor? We don’t know, but if the family deems it fitting that the circumstances of her death be made public, it might help educate the public and the news media on some of the nuances of heart disease and the difference between a “massive heart attack” and a cardiac arrest.

Finally it is interesting to examine some of this lay cardiac terminology using Google Ngrams. The Google Ngram site is a search engine that can be used to look up the frequency of words or phrases in thousands of books published over many years. It can help establish when certain phrases like “heart attack” or “cardiac arrest” were first used and when they became popular. The Ngram at the top of this post of the phrase “massive heart attack” shows the rise in popularity of this phrase over the last 50 years. The Ngram below compares the terms “heart attack”, “myocardial infarction”, “sudden death”, and “cardiac arrest.” It is interesting that “sudden death” is a term that has been used without much change in frequency since the year 1800. “Myocardial infarction” and “cardiac arrest” both entered the literature around 1930-1940. “Heart attack” dates back to around 1920, but has become more and more popular, while the medical term, “myocardial infarction” seems to be less used recently. Curiously although the phrase “heart attack” has been around since the 1920s, it is only since 1960 that the phrase “massive heart attack” has become popular.  One wonders why.  These kinds of results are open to all kinds of interpretation: I’ll leave that to the reader as an exercise. But I encourage you to try Ngrams out yourself, on any subject that interests you. The results are often fascinating.

Google Ngram of other heart attack related phrases

Escape from Escape

Escape key
Ye Olde Escape Key

During my college days computers were run from teletype machines. These teletypes had a typewriter keyboard layout extended with unfamiliar keys like Control (Ctrl) and Escape (Esc).  You could press Ctrl-G and make the teletype ring its bell — ding! You could press Esc when you mistakenly wrote a BASIC program with an infinite loop and make the program terminate. When I got an Apple ][+ in the early 1980s, Ctrl and Esc keys were present, though there was no Caps Lock key — all letters were capitalized on the Apple ][. I had to buy a separate Videoterm card to get lower case letters and perform the “Shift key mod” inside the case to get the Shift keys to work. Ah, the good old days!

ASR-33 Teletype keyboard layout
ASR-33 Teletype keyboard layout (by Daniele Giacomini [CC BY-SA 2.5 (http://creativecommons.org/licenses/by-sa/2.5)], via Wikimedia Commons)
When the IBM PC came out its keyboard combined the IBM typewriter keyboard with the new computer keys, adding to Control and Escape the Alt key and a set of Function keys. The Alt key originated in the Meta key from MIT keyboards, and is still called the Meta key in Emacs documentation — so delightfully retro! Apple renamed the Alt key the Option key, and, with the Macintosh, added the Apple key that later became the Command key. Windows certainly couldn’t have an Apple key, so named their equivalent key the Windows key.

Apple ][ keyboard from http://www.hp9845.net/9845/history/comparison/
Apart from the Control key, which is combined with other keys to generate non-printing ASCII characters, like Bell (ASCII 7), and the Escape key (ASCII 27), these other keys originally manipulated the high order bit of a character code.  They could get away with this as ASCII only uses 7 bits of an 8 bit byte. However with internationalized keyboards and Unicode, character sets now not only require all 8 bits of a byte, but often more than one byte for each character. So modern keyboards send scancodes with each keypress and it is up to the computer operating system to make sense out of them.

I have to admit I don’t use the Function keys (F1 – F12) much anymore since my WordPerfect and Lotus 1-2-3 days long ago. I use the Escape key mostly to get out of full screen mode when I am watching a YouTube video. But many developers use the vi or Vim editor to create their source code and depend on the Escape key. I am more an Emacs man myself, but sometimes use Vim for simple editing tasks. Vim is a modal editor, meaning there are separate text entry and editing modes. The Escape key is used to change modes. If you use Vim, you are constantly hitting the Escape key. Given the importance and long history of the Escape key (it was created in 1960), a developer who relies on Vim might be forgiven for thinking that the venerable key would be sticking around a bit longer.

IBM PC keyboard
BM PC keyboard (credit http://www.vintage-computer.com/ibm_pc.shtml)

So if I were Apple and designing the next generation MacBook Pro (MBP), eliminating the Escape key would not be high on my list of priorities. But this was what they did, turning the Escape key into an evanescent luminosity on the new Touchbar interface. This is depressing. Up to this point, the MBP has been a great developer machine. I have a “late 2013″ 15” screen MBP. It is a fast, sturdy laptop. Since Mac OS X macOS is a user interface veneer over BSD Unix, all the Unix development tools are there, as opposed to Windows devices, where installing a Unix environment is a pain. It is impossible to develop for macOS or iOS without an Apple machine. With my MBP I can develop for both Android and Apple. It is even possible to develop Windows software on a Mac, though I haven’t tried this. Because of these advantages, lots of developers use a MBP.

It seems Apple has turned its back on developers. Fortunately my current machine is working well and I don’t have any need to buy a new one yet. Ideally by the time I need a new machine the next iteration of the 15″ MBP will offer a standard keyboard and fix some of the other problems the new versions seem to be having.  Apple should focus on features that developers and other professional computer users want in a computer:  more memory than 16 GB, return of the Magsafe power cable, and at least one full-sized USB port so that old USB devices can be used without a dongle. They can continue to sell a Touchbar, USB-C only version of the 15″ MBP for people who like that sort of thing. The 13″ MBP is available with and without a Touchbar, why not do the same thing with the 15″ version?  Perhaps the death of the Escape key isn’t the end of the world, but it does seem to symbolize a lack of interest on Apple’s part in its developers.  But if developers switch to non-Apple machines, those developers will no longer be able to develop Apple apps.  In the long run this will hurt Apple’s major money-maker, the iPhone.

Geeky Docs

I remember the disdain some of the EHR trainers had for their trainees back when our hospital system “went live” several years ago. Of course this disdain was tempered by their knowledge that if docs weren’t so computer illiterate, or the user interfaces of the EHR systems weren’t so awful, or if the EHR software wasn’t so bug-ridden, their jobs wouldn’t exist. So they soldiered bravely on, undaunted by grumpy old docs who now had to type their notes despite never learning how to touch type, who had to reconcile medication lists a mile long including meds like cinnamon that they really could care less that the patient was taking but had to be reconciled nevertheless, who had to painstakingly enter orders using an interface designed by an engineer who knew as much about medicine as — an engineer, and who were angry and resentful that this newfangled computer system was being shoved down their throats under threat of loss of government medicare reimbursement. Given the tensions and personalities involved, it still amazes me that the EHR transition was accomplished without loss of life or limb.

Maybe the classes helped. Long before the go-live date, we went to EHR school. This consisted of several days of classes, during which the world of health care delivery was supposed to stop (it didn’t) while all medical personnel sat around drinking coffee and listening to talks about how the EHR was supposed to work. Even though this was a useful education into what the life of a hospital administrator must be like, the real world of patients and disease tended to encroach on the world of mouse clicks and meaningful use butttons to the point that I skipped the last afternoon of classes and the final exam. Unfortunately my truancy was detected and, under penalty of garnishment of wages, I was forced to do a make-up class. Despite the rigorous training, the number of months that elapsed between EHR school and going live ensured that I and my colleagues pretty much forgot everything we learned — hence the need for the EHR trainers.

I was a little disappointed that I wasn’t selected to be a “superuser.” A superuser is a user who is technically savvy and enthusiastic about using the EHR — a true believer who could help other users who were having problems, even after the EHR trainer cadre had long since departed to initiate other hospital systems into the EHR religion. I suppose I failed to qualify on my lack of zealotry. I also kept my technical savvy under the radar. So I became merely a user. I found that, unlike my experience with other forms of technology, the EHR was making my life worse. Simple tasks became complex. My work slowed down. More mistakes were made. I was stunned. I could not think of any other example where a computer program was less efficient than the technology it was designed to replace. But it appeared that EHR systems were a counterexample to this.

So I decided to write a few blogs about how bad our EHR was, but the EHR company, who employs people whose sole purpose is to scour the internet looking for screenshots or bad-mouthing of their precious software, caught wind of this and reported it to the administrators of the health care chain I worked for. After some angst, I agreed to shut up for a while, though now that I am retired, I don’t feel bound by any non-disclosure agreements the hospital system signed with the EHR company.

EHR advocates have sometimes commented that once all the old, non-technological, non-touch typing doctors die off, then everyone will be pleased as punch with their EHRs. The new generation of doctors, raised on technology, able from infancy to handle a Playstation controller with aplomb, will have no problem using EHRs. There is some truth to this, but this criticism misses the point of my and others’ criticisms of current EHR software. There are plenty of technologically sophisticated doctors of all ages who are uncomfortable with the state of EHR systems today. I have written computer software and most would consider me one of these “geeky docs.” Most of the critiques of EHRs that I have read have been from tech-savvy doctors, not from the technological dinosaurs that the EHR pushers believe make up the majority of doctors today. None of us wants to go back to a pen and paper chart system. All of us want to see EHR systems improve in usability and interconnectivity. We all use computer software in our daily lives and know that EHR programs don’t measure up to standards that other computer programs meet. We don’t like the secrecy of the EHR companies or the astronomical cost of the software. But mostly we just want the software to get better. This won’t happen unless the software designers start listening to users. Tech-savvy docs need to be on the forefront of this. We need to push for change and not allow the EHR companies to keep falling back on their old excuse: if you docs only knew how to type, you’d love our system.

The Last

He was the last. Old and wizened, he counted down his final days, his final hours on Earth. He lay in his bed, the rain drumming monotonously on the window. Night came. He pressed the button to call the aide. The aide appeared at his bedside. Every night the old man had the same request. The aide went to the window and briefly pulled aside the curtains. He peered outside. He turned to the old man and shook his head. The sky remained overcast, as it had since the day the old man had fallen ill. After briefly fiddling with the intravenous equipment, the aide left the room. He was alone again.

He stared at the window. He felt no pain. The medications worked well. But they made him weak. Or perhaps it was just his condition. He slipped in and out of a dreamlike state.

He recalled his colleagues, the others like him. Never a large group, their number had progressively decreased over the years. One by one they had fallen. The next-to-last one had died three years ago. Meanwhile he had hung on, while the world move past him. He reviewed his cherished memories. No one else on the planet shared those precious memories. Soon they would be gone.

He was the last. But he had not been the first. He, like all his colleagues, had wanted to be first, but that envy didn’t last long. He often wished there had been others, many others. He knew someday there would be, but, as long as he had lived, still it was not long enough for that to happen. This surprised him, even now.

He sensed that tonight was the night, the final night. Outside the rain had stopped. The old man looked to the window. There was light there.

He had been too weak to walk, too weak to move for days now. Nevertheless, he pulled himself up, grabbing onto the bed-rails. He knew he had enough strength to get over the rails, onto the floor.

The light in the window increased. He pulled out his intravenous line. The entry point in his arm started bleeding. He ignored it. The pump whirled along automatically, infusing drops of medicated water onto the floor.

He got a leg over the rail, then his shoulders. The distance to the floor wasn’t great, but from his vantage point it looked like he was perched on top of a giant cliff. He took a deep breath and hurled himself over the railing.

Some time later the aide, making his rounds, entered the room. He was surprised that the old man in his weakened condition had been able to escape from the confines of his bed. His body lay a few feet away, next to the wall, beneath the window. The curtains had been torn down from their rods. The rain had stopped. The clouds had retreated. The night was clear.

The old man lay on his back. The light of the full moon lit his face, for the last time.

More Microsoft Migraines

windows-desktop-app-converterWhen I ported the EP Calipers app (an electronic calipers app) to Microsoft Windows, I initially planned to write a Universal Windows Platform (UWP) app. The UWP is an initiative by Microsoft to allow developers to have one code base that can run on all Windows platforms, from PCs to phones to Xbox to HoloLens. UWP apps can be distributed from the Windows Store and are more secure than traditional Win32 programs, as they don’t install DLL files all over the place and don’t write to the registry. These apps are sandboxed, similar to iOS and Android apps. The UWP is a laudable goal, but inherently difficult to implement in Windows which was not originally designed with security in mind, as opposed to Unix/BSD based operating systems like Android and iOS.  Unfortunately, I found the application programming interface (API) of the UWP difficult, and so I ported EP Calipers to .NET, creating a traditional Windows PC program. At the time I did this, there was no way to distribute a Windows PC program on the Windows Store, so I was forced to distribute the program via a 3rd party. I would have much preferred to distribute via the Windows Store, as I thought this would create more visibility for the app.

With the Anniversary update of Windows 10, I learned about Project Centennial. This project provides a route to convert Windows desktop programs to APPX format — something that is not quite a UWP app, but something that can be distributed on the Windows Store. After reading the MSDN documentation and viewing some instructive videos, I launched into making the conversion.

The transition has not been as easy as I had hoped.

I downloaded the DesktopAppConverter (DAC) from the Windows Store. Despite this origin, this is not really an app. Instead it runs in a PowerShell (which you must run as Administrator). However before you can run the conversion, you also need to download a “Windows Image” (WIM) file that matches your current version of Windows. This is wim file is something akin to a Windows virtual machine, and the download is large, as you might expect (3.3 Gb). I live in an area with poor internet service (3 Mbps speeds), so it takes longer than a coffee break for this kind of download. I used the Microsoft Edge browser, and it took several attempts to download this file. The browser would declare the download finished, even though only a little more than 2 Gbs had been downloaded. Finally it looked like I had the right number of Gbs, but when I ran the DAC I got an obscure error. I suspected my download was corrupt. Yet another download, using Chrome, got me an non-corrupt download. I wish Microsoft would include a checksum with their downloads, to verify the downloads, but they don’t. Anyway this last download worked — to a point.

Ah, I should have read the fine print. The DAC only works on Windows Pro or Enterprise. I was running Windows Home edition. Sigh. $99 and a short download later, I was running Windows Pro. And I was off to the races — well, not exactly!

DAC works by running your program installer in a virtual Windows environment, and capturing whatever changes your installer makes to the file system and registry. It then encapsulates that information into an appx file that can be uploaded to the Windows Store. The documentation suggests that you can use any installer, as long as it installs silently (i.e. without user input). I had created an installation package using the Visual Studios ClickOnce packaging system. Oops, too bad. That’s the one kind of installer package that doesn’t work with DAC.

In other words they wanted something like an InstallShield installer. An MSI file. Well I had an old version of InstallShield from about 10 years ago. Alas, it was so old that it wouldn’t install itself on Windows 10. Well, maybe I’d have to buy a new edition of InstallShield. I went to the website. Hm, the cheapest version , InstallShield Express, was listed for $699. Yikes!

So I ended up using the Wix open-source installer, with the help of the Wax extension to Visual Studios, to create my MSI installer file (all for free). And so finally I could run the DAC after tweaking the -InstallerArguments (the “/S” silent installation argument as suggested in the documentation didn’t work, and wasn’t needed since the Wix installer I made was silent by default). I also had to make sure my code was compiled as an x64 (64-bit) file, because the DAC only supports 64-bit platforms at this time.

The next step was to sign the appx package. I created a certificate as suggested by the documentation, but it didn’t work. I needed a trusted certificate. Not too clearly documented, it is necessary to right-click on your certificate and add it to the Trusted Root Certificate Authorities. After this, I actually had an appx file that I could install by double-clicking it.

I then spent a few days fiddling with icons. Although UWP apps use 60 plus icon images to create various size tiles, it appears that appx files just need 3 images. These are added to the Assets folder generated by the DAC, and the AppxManifest.xml has to be hand-edited to point to these images. Here as throughout the conversion process, the documentation is quite rough and hard to interpret. The 50×50 pixel size image that is used by the application installer appears fuzzy, so I substituted a higher quality image. I still don’t think that all the icons (for example when using the Open With dialog) work quite right. Anyway, after editing these files, you use the MakeAppx.exe program included in the Windows SDK to recreate your appx file, and then sign it again. I created some PowerShell batch files to do this.

I applied to submit apps to the App Store. I applied as a company, which costs $99 (which the website states is a one time fee, though the email receipt I received mentions “Annual Developer Registration”). Because I registered as a company, I had to wait a few days to be approved, after getting a couple of phone calls from a company whose job is to verify that other companies are real companies — a step that Google and Apple don’t bother with.  But EP Studios was duly approved as a real company, such that it is, and all appeared ready for my first Windows App Store submission.

And so I submitted my app. Only to get this error message:

Package acceptance validation error: Your developer account doesn’t have permission to submit apps converted with the Desktop App Converter at this time.

Whaaaaa?? Further research disclosed that even after paying your fee and becoming a certified Microsoft developer, you still have to ask Microsoft “pretty please can I upload apps converted with the Desktop App Converter?” I duly filled out the form to request this. Twice. And I have not heard back from Microsoft.

When I compare this app development and submission process to that of, say, Google or Apple, there is no comparison. The Microsoft process is a chamber of horrors, requiring more time, patience and money than those others. Documentation is poor, and, presumably because not many developers are trying to publish to the Windows Store (I wonder why?) there is very little help in the usual places like StackOverflow. I would Google DAC error messages and get nothing but crickets chirping. All this is unfortunate, especially as I plan to leave for Europe in a few days and I had wanted to get this app uploaded before then. My Windows development machine is a heavy, bulky, desktop (remember them?) computer that certainly is not coming with me.

Maybe by the time I return to the US in a few months, Microsoft will be ready to allow me to submit my app.

Syberberg’s Parsifal

Parsifal and Flower Maidens from Syberberg's Parsifal
Parsifal and Flower Maidens from Syberberg’s Parsifal

One thing that bothers me about opera is that the stage directors are constantly getting into the act, injecting their often weird interpretations into productions, often to the point of destroying the intent of the composer and librettist. Certainly interpretation of a score has a place up to a point, but one can’t redo a Beethoven symphony as hip-hop without fatally distorting the meaning of the music.

The most OCD of operatic composers was Richard Wagner. Not only did he compose the music, he wrote the libretto of each of his operas. Not satisfied with this, he built his own opera house designed especially for the performance of his operas. The stage directions he wrote into his scores are very detailed, and pushed the limits of the technology of his time. Even today, depicting Rhinemaidens singing as they swim in the river, or the burning of Valhalla, or the Valkyries flying through the air on their horses necessitates leaving more to the imagination than can be technically depicted on the stage.

Yet despite this (or maybe because of this?), stage directors think nothing of ignoring these directions and instead impose their own sometimes harebrained interpretations on these finely crafted works. No one would dream of substituting an oom-pah band for the orchestra, but yet anachronistic reinterpretations of the Ring, for example, sometimes bear a closer resemblance to Star Wars (e.g. this) than Norse mythology. Fortunately in most cases the singers, the music, and the text are able to overcome what otherwise would be a cringe-worthy staging.

Case in point: I have seen Die Meistersinger von Nürnberg performed live on two occasions. The first time, years ago in Denver, was a traditional staging, set in the time of the Meistersingers, with period costumes and scenery. It was very enjoyable. This past year, in Paris, I watched the Stefan Herheim version. This version is very cleverly staged, though the bottom line of the production is that the whole opera is just a dream of Hans Sachs’s. The scenes take place on giant versions of his desk and other parts of his room, and various characters from German legends float in and out of the scenes. I have to say that this was entertaining in its own way, but it also somewhat subverted the sad nobility of Sachs in his affection for Eva. I preferred the Denver version that was truer to Wagner’s intent.

All this is just preamble to my feelings about the 1982 film of Wagner’s last opera, Parsifal, directed by Hans-Jürgen Syberberg. I had heard of the film, but had never seen it until recently. The complete plus-4-hour film is available (at least at the moment) through the magic of YouTube. At first glance, the film seems to do all the things I complained about above. The setting is a giant death mask of Wagner. There are tacky puppets and front-screen projections. There are deliberate anachronisms, like Nazi flags. The protagonist, Parsifal, changes between a male and a female. Only a few of the actors actually sing their roles; most are just lip-synching. So, given all this, I am surprised that I really liked the film.

Parsifal, Wagner’s final opera, is a strange work. After the Norse mythology of the Ring, Wagner turned back to the medieval Christian mythology he had previously explored in Lohengrin. Here we find the Knights of the Holy Grail, and Parsifal, “der Reine Tor — Pure Fool” who ends up saving the order of the Grail. Based on medieval tales such as Wolfram von Eschenbach’s Parzival (point of trivial for cardiologists: von Eschenbach in the 13th century describes treating pericardial tamponade with a hollow reed — something that didn’t make it into Wagner’s opera), Wagner as usual wrote his own libretto and has his own interpretation of the tale. This contains many “un-Christian” elements, including a self-castrated evil sorcerer, a knight suffering from a non-healing wound inflicted by the lance that pierced Jesus’ side on the cross, a woman doomed to live forever under a curse because she mocked Jesus at the crucifixion, and over an hour of the most intense seduction scene imaginable, first by a group of flower-maidens, and then by Kundry, the aforementioned conflicted, cursed, unsaved, undying woman/witch. Apparently this mixture of the sacred and profane was met with mixed reactions when the opera premiered, as it does today.  Underpinning all this is Wagner’s music at its finest  — motifs intertwined more intricately than those of Die Götterdämmerung, his penultimate opera. There are many odd and intriguing aspects to Parsifal. It seems that the Castle of the Grail is located in some kind of parallel universe. There is this odd exchange, which make me wonder if Albert Einstein ever viewed the opera:

Parsifal: Ich schreite kaum, doch wähn' ich mich schon weit.

Gurnemanz: Du sieh'st, mein Sohn, zum Raum wird hier die Zeit.

Parsifal: I scarcely move, yet already it seems I have travelled far.

Gurnemanz: You see, my son, here time becomes space.

So what is so great about the Syberberg film? It’s hard to pin down. I think mostly it is the acting. In particular Edith Clever, the German actress who plays Kundry, the tormented, schizophrenic woman at the center of the opera, is wonderful. Using close-ups, film is able to capture the emotions of her and the other actors much better than can be done on the operatic stage. So, despite all the tackiness and weirdness of this production, it is nevertheless a moving experience and, perhaps because Wagner’s opera is so strange to begin with, the extraneous elements don’t seem to distract from the performance.

I would like to see more operas on film. Not films of opera performances (though these are enjoyable too and some are on YouTube), but movies with real actors. Just as Tolkien had to wait for advances in movie special effects and Peter Jackson for his Ring to be filmed, perhaps the apotheosis of Wagner’s Ring will be found in the modern cinema. Through the magic of CGI maybe one day we will see the Rhinemaidens swimming around the Rhinegold as Wagner envisioned the scene in his mind originally.