AutoLayout Revisited

My initial experiences with Apple’s iOS AutoLayout were pretty negative. Using Interface Builder’s (IB) ability to generate AutoLayout constraints automatically based on the positioning of views turned out to be frustrating, as it would generate constraints that were incompatible with iOS 7. As iOS 8 has only been out for a few weeks, I definitely want to keep supporting iOS 7 in my app. But Xcode 6 generates these incompatible constraints anyway, even though the deployment target is iOS 7. Furthermore the automatically generated constraints don’t really do what I want, such as keeping views centered on the screen when the screen enlarges from iPhone size to iPad size. So I was forced to go back to the drawing board and really try to understand how AutoLayout works.

My impetus for all this was my desire to upgrade one of my apps from an iPhone only app to a Universal app — optimized for display on both the iPhone and iPad. The app (EP Mobile) has a big storyboard and many different views. By using AutoLayout I hoped to avoid having two different storyboards, one for iPhone and another for iPad, and just use one storyboard for both devices. I decided to check the Use Size Classes option in IB. Supposedly this allows for designing separate layouts in a single storyboard for different size devices. As it turns out, this was not helpful, as apparently this feature only works on pure iOS 8 apps. Moreover, as the compiler seems to generate code for each possible device, building your app after making a change in the storyboard takes much longer than it did before enabling this option. After a while I grew tired of this and decided to turn off Size Classes. However trying to do this resulted in a warning dialog from Xcode that stated a lot of nasty things that might happen (I hate dialogs that use the word “irreversible”) and so I decided to just live with the longer build times.

I watched some YouTube videos on AutoLayout that were helpful (here and here), but in truth the best way to learn AutoLayout is to play around with it. Take a view, clear any constraints that are there, put the subviews where you want them, and then add your own constraints manually. While doing this, ignore warning messages from Xcode about ambiguous constraints and misplaced views. Ignore the yellow and red lines that show up on the screen indicating these errors. Until you have completely specified all the constraints needed to  determine unambiguously the location of the subviews without conflicts, these warnings will show up. Prematurely asking IB to Update Frames before all the constraints are specified will make the subviews jump around or disappear. Unfortunately even when all constraints are specified and correct, the yellow warnings don’t go away. IB is not capable of automatically applying your constraints and misplaces your controls in your views whenever you change constraints. Sometimes it misplaces controls even when you are just changing the storyboard metrics from one size to another. Update All Frames then puts everything where it belongs.

One way to start is by putting constraints on heights and widths of controls that you don’t want to resize when the screen size changes or the device rotates. Note that some controls, such as buttons, have an intrinsic size based on the button label, and it is not always necessary to add specific constraints to these controls. However, it looks to me like the system will ignore the intrinsic size at times, especially if you are trying to do something fancy with constraints, and your button will grow to a ridiculous size to satisfy your constraints. So it doesn’t hurt to specify width and height constraints manually even in these controls. Of course if you want controls to expand in one direction or another, don’t specify a constraint in that direction.

Next step is to align controls that are lined up horizontally. You can select multiple controls and then align their vertical centers using Editor | Align | Vertical Centers on the menu. If there are rows of controls like this you can take the leftmost control and working from the top to bottom, pin each row to the row above (or to the superview for the first row) to make sure there is vertical separation between the rows. Finally, usually you want your controls to be centered on the screen, even when using different screen sizes and with rotation. If you have one wide control, such as a segmented control or a large text field, you can horizontally center that control. You can then pin the leading edge of that control to the leading edge of the superview (i.e. the window) and that view will grow as the screen width increases. Aligning the leading edges and trailing edges of the other controls to this view will allow the whole set of controls and expand and contract with the width of the screen. If you have rows of controls, you may still need to put constraints between individual controls to control the horizontal distance between them.

One issue I noticed was that, while it’s nice to have controls expand to fill the screen of the iPhone when going from the small iPhone 4s to the 5.5 inch iPhone 6, sometimes the controls get too wide when viewed in landscape mode or on the iPad if they are just pinned to the superview leading edge.  For example, this segmented control is centered horizontally and vertically in the superview, and the leading edge is pinned to the superview leading edge.

Screen Shot 2014-10-01 at 10.03.52 AM
Segmented control has centering constraints and is pinned to the leading edge of the superview.

On the iPhone 4s, with rotation the view remains centered and enlarges when the device is rotated.

iPhone 4s portrait
iPhone 4s portrait
iPhone 4s landscape.  Control remains centered and expands to fill screen.
iPhone 4s landscape. Control remains centered and expands to fill screen.

To show the flexibility of AutoLayout, we can limit the expansion of the segmented control to a maximum we select, by making the width less than or equal to a value (in this case 350) and lowering the priority of the pinning of the leading edge to the superview. This achieves the desired effect.

Width of control constrained to ≤ 350 and priority of pinning to left margin decreased to 750
Portrait view is unchanged, but landscape view (shown here) limits the width of the control to a max of 350
Portrait view is unchanged, but landscape view (shown here) limits the width of the control to a max of 350

You can do a lot with AutoLayout just using IB if you are patient and try out various effects. You can do more by attaching your constraints to outlets and manipulating them in code. It is unfortunate that some glitches in the implementation of AutoLayout in Xcode 6 Interface Builder make using AutoLayout more frustrating than it needs to be.  To those who are discouraged like I was by AutoLayout, I urge you to keep experimenting with it.  The a-ha moment will come and it will be worth it.

How Secure is Your Medical Data?

Script showing my Mac is vulnerable to ShellShock.
Script showing my Mac is vulnerable to ShellShock.

With the recent discovery of the ShellShock vulnerability affecting a large number of computers, the question comes up again: how secure is medical data? Thanks to the federally mandated push to transfer medical data from paper charts to computer databases, most if not all of this data is now fertile ground for hackers. As pointed out in this article medical data is more valuable to hackers than stolen credit cards. The stolen data is used to create fake IDs to purchase drugs or medical equipment, or to file made-up insurance claims. Hackers want our medical data and hackers usually find a way to get what they want.

In going from paper to silicon, we have traded one set of disadvantages for another. Paper charts are bulky, require storage, can get lost or destroyed, are not always immediately available, can be difficult to decipher, and so on. Electronic Heath Records (EHR) systems were intended to avoid these disadvantages and to a large part do; however, we have traded the physical security of the paper chart, which can be locked up, for the insecurity of having our medical data exposed to open ports on the Internet. And make no mistake, the Internet is a wild and scary place. My own website, certainly not containing anything worth much to hackers, is subject to multiple daily bruteforce password guessing attacks to login. Fortunately I have security software in place, but despite this the site was successfully hacked in the past from Russia. There is no doubt that more important sites than mine are subject to more intense attacks. Millions of credit cards have been stolen in attacks on Target and Home Depot. Celebrity nude photos have been stolen from “secure” sites. And if you are not worried about hackers getting your medical data, thanks to Edward Snowden’s revelations you can be sure that it is freely available to the NSA.

But certainly, you ask, given the sensitivity of the data, EHRs must be amongst the most secure of all computer systems? Well it’s difficult to answer that question. Most EHR systems use proprietary software, so the only people examining the source code for bugs are the people that work for the EHR company. It is unlikely that any bugs found would be publicized; rather they would be silently fixed. As critical as some people have been about the existence of bugs in open source software, such as the HeartBleed and ShellShock bugs, at least there is a potential for such bugs to be found by outside code reviewers. There is no such oversight over the code of the EHR purveyors.

Even if one for the sake of argument assumes that EHR systems are secure from online hacking, they are still very vulnerable to what is known as “hacking by social engineering” or “social hacking.” Social hacking involves the weakest link of all security systems, the computer users: doctors, nurses, medical assistants, unit secretaries and others. People who use easy to guess passwords like “123456” or who tape the password to the bottom of the keyboard. People who get a call from someone pretending to be from IT asking for the user’s ID and password in order to fix some supposed problem. There are a large number of cons that rely on human gullibility that can be used to break into “secure systems.”

Besides these issues, I observed a great deal of laziness in regard to security when working in the hospital. Doctors would often log into the EHR system, review patient data, and then leave the computer to visit the patient room without logging out of the system. Anyone could sit down at that computer and view confidential patient information. Some of the systems would automatically log off after a few minutes, but even so there was plenty of time for a dedicated snoop to get into the system. And the problem can occur in doctor’s offices too, now that many exam rooms have a built-in computer. Just yesterday at my eye doctor’s office I was left alone in the exam room for about 15 minutes while my eyes were dilating. Sitting next to me was a desktop computer running Windows 7, left with the user logged on. This doctor’s entire network lay vulnerable. How easy would it be to read patient files, or copy a rootkit or a virus onto the system using a USB drive? Real easy.

Bug-free and 100% secure software probably is a pipe-dream that can’t be achieved in the real-world. In addition, hospitals, with hundreds of computer terminals everywhere, some still running such outdated and vulnerable operating systems as Windows XP, and with busy, security-unconscious users like doctors and nurses, are a security disaster waiting to happen. Now that we have put all our medical data metaphorically into one basket, I am convinced it is only a matter of time before there is a massive data breach that will make the Target credit card breach seem trivial by comparison. Better training of medical personnel who use EHRs may help prevent this, and this should doubtless be done. But we will never have the level of security again that existed in the era of paper charts.

The Approaching Sunshine Apocalypse

On September 30, a week from today as I write this, the US government will release the long-anticipated Sunshine Act Open Payments data to the general public. Or at least some of it, maybe two thirds. It’s not clear. What is clear is that Open Payments has gotten off to a rocky start, reminiscent of the snafu with the inauguration of HealthCare.gov last year.

Our story so far: Back in 2011 as part of the Affordable Care Act, aka ObamaCare, measures were put into place to shed light on the here-to-fore undisclosed direct financial dealings between Big Pharma and physicians. All payments, whether in the form of honoraria, ball-point pens, or bagels from Panera were to be accounted for, tallied up, and presented on a web site for the public to peruse starting this September 30. As a concession to the physicians and drug or device companies, there was a period of review this summer (45 days), during which payments could be viewed by physicians and potentially disputed.  Payments disputed after this time period would be marked as undisputed in the database.  Thus it was important for physicians to dispute these payments before the release to the general public (BTW it’s too late now).  I’m not sure how many physicians participated in the review process. Getting into the Open Payments website initially is onerous.  In order to register for the site, two separate processes of authentication are required, during which applicants are challenged to answer questions based on their credit report history (!), as well as answer a series of questions while a timer runs, including providing a subspecialty code which, if you are lucky and have a fast internet connection, you can google just in time before the buzzer runs out.

Having gotten into the system, one can laboriously go through each payment in a spreadsheet and try to ascertain whether or not various payments are legitimate. When I did this I found that, despite providing very specific information in the login process (such as my NPI number), my payment records were mixed in with another physician with my name who practiced in a different state (Florida vs Kentucky) in a different specialty (oncology vs cardiology). Via Charles Orstein and ProPublica this story was published.   This resulted in CMS shutting down the Open Payments website to fix this problem.  The site was shut down for 12 days, from August 3 to August 15. The time allotted for physicians to review their data was extended correspondingly, to September 11.  However, upon reopening the site not only were the mixed up payments gone, but most of the legitimate ones were also missing from the database. CMS then stated that some companies’ data was still being withheld due to data inconsistencies in company submissions. The companies dispute that the problem is theirs, instead blaming the government. The amount of data missing is supposed to be about a third, but, at least in my case, almost all the legitimate payments previously listed in database prior to the closure of the site are now missing.  For example there is no data listed at all from Medtronic, despite payments from them in the database before the “glitch.”  Meanwhile, further glitches shut down the Open Payments system intermittently between August 30 and September 5. Despite all this, the imperfect data is still planned to be released to the public on September 30.

What will the public make of this? Will some consider any payments at all to doctors in the form of food or honoraria a sign of corruption or at least conflict of interest? Will the trivial nature of some of these payments be reassuring to the public? Will the data reveal blockbuster damning revelations about the nature of the relationship between industry and physicians?   Or will the data be just ho-hum?  Who knows? My question is, why release the data now if it is incomplete or questionable? Why stick to this arbitrary timeline? If we are going to supply this data to public, shouldn’t it be as accurate as possible?

I just checked the Open Payments website. It is down again. Not reassuring.

Down again
Down again

AutoLayout Headaches

The new larger iPhones and iOS 8 are here. Xcode 6, upgraded to deal with these new beasts, is also ready for download. Anyone who has written apps designed for the iPhone has to make sure their apps run on these new devices and the new iOS. Previous iPhones had two different heights (3.5 and 4 inches) but were the same width. The new iPhones are not only longer, but are wider. With the previous devices, it was relatively easy to design for the slightly different heights. Now the developer has to deal with layouts that work with many different aspect ratios. If your app is a universal app (i.e. runs on iPhone and iPad) there are even more sizes that you must deal with.

Anticipating this, Apple, a few versions back, introduced AutoLayout to take the place of their older layout system using springs and struts. With AutoLayout, you place your widgets where you want and, automagically, they retain their relationship with different screen sizes or when rotating the screen. Or so it’s supposed to work in theory.

As it turns out, AutoLayout introduces its own set of headaches which rank up there with your worst migraines. Let’s begin.

Intrinsic AutoLayout

If you have AutoLayout turned on (which is the default now), any prior layouts you have, whether you used springs and struts or absolute layouts, will be converted to the AutoLayout system. Any new layouts will use the AutoLayout system automatically. When placing widgets, the dotted blue guidelines will have more meaning than they did before. For example, if you center a widget using the blue lines, that widget will appear centered with different device sizes or with rotation. This is called intrinsic AutoLayout, and the effect is added at run-time. That means, somewhat surprisingly, that when you change device size using Interface Builder (IB), the layout won’t look right.

 

Layout appears off center on 5.5" iPhone 6 Plus
Layout appears off center on 5.5″ iPhone 6 Plus (click to enlarge)

But if you run the simulator, the layout will look fine.

Same layout appears nicely centered when running on iPhone 6 Plus simulator
Same layout appears nicely centered when running on iPhone 6 Plus simulator (click to enlarge)

Hopefully that will be true when running on the new hardware itself, but since I don’t have an iPhone 6 I can’t test this. The moral of this story is don’t start fiddling with your layout because it looks weird on IB. Run your app on the simulator at each size (and on hardware if you have it). Most of your layouts will look OK on the larger iPhones due to intrinsic AutoLayout.

Explicit AutoLayout

If you need to alter what is produced by intrinsic AutoLayout, you have to manually add constraints. Constraints are a rigorous description of a relation between two views. Examples include centering a widget in a superview, fixing a widget’s height, but allowing width to change, and setting a fixed distance between two widgets. Constraints are actually pretty cool in theory and can be added in code. But using IB, once you start adding constraints all hell breaks loose.

Suppose everything about your view looks good, but you want the bottom of your widget to be pinned to the bottom of the view it is contained in. So you add that one constraint. With that one action you have blown away the intrinsic AutoLayout system and IB will inform you that you have all sorts of ambiguous heights and widths. So if you add any constraints in IB, you have to add constraints to all the widgets. There is a menu item to do this, and suddently there are about 50 constraints added to your view. And here you hit your first surprise. Even though you are targeting your app for iOS 7, Xcode adds constraints that are incompatible with iOS 7!

Constraints incompatible with iOS 7 are automatically added by Xcode 6!
Constraints incompatible with iOS 7 are automatically added by Xcode 6! (click to enlarge)

Constraints can’t be relative to the superview margin in iOS 7 but IB blithely adds them anyway. So you go through the constraints, one by one, edit the ones that have “relative to margin” checked, which ends up changing the appearance of your view. It is then that you discover that changing a constraint tends to mess up your view or mess up the other constraints. You often get a message saying that the view at runtime will not appear the same as it appears on IB. I found that pressing Option-Command+= fixes that. It is easy to get frustrated when editing constraints in IB. The “Clear Constraints” menu item is your friend here, so you can start all over.

AutoLayout and ScrollViews

It gets worse. If you have any ScrollViews in your app, with AutoLayout they appear to work on the simulator, but they don’t work on actual hardware! Turning off AutoLayout fixes this, but DON’T DO THIS! You cannot turn off AutoLayout for a single view. It goes off for your whole storyboard. And your carefully laid out and tweaked constraints disappear. Version control is your friend here. Using AutoLayout and ScrollViews is complicated, as you can see from this. After reading this and playing around, I was able to get my views to scroll by pinning the ScrollView to the superview on all four sides. Interestingly, when setting up a ScrollView with AutoLayout, you no longer have to add any code about the ScrollView as was necessary before (you would have to add the content size of the ScrollView for it to work). But again, this is a real trap, especially as if you do it wrong, it looks like it is working on the simulator but won’t work on an actual device.

And so…

Handling resizing and rotation is one thing that is a lot easier when developing for Android than for Apple iOS. AutoLayout has a steep learning curve, and others have had these same problems (search for AutoLayout on StackOverflow, or see this. I hope that Apple can improve this experience. I like the concept of AutoLayout, but the devil is in the details.

Update: Since writing the above, I have gone back to basics with AutoLayout and made a concentrated effort to understand the system.  I don’t think the AutoLayout system is bad; however, using AutoLayout in Interface Builder can be rough going for the reasons given above.  AutoLayout itself though is very flexible and I do think you can do just about anything you want with it if you understand it well.  I am trying to achieve this level of understanding.  I have found that the best way to learn is to play around with a view, adding constraints and seeing what happens.  I have also discovered the new feature of Size Classes in Interface Builder  in Xcode 6 which makes developing a Universal App using a single storyboard much easier.  So I’ll keep plugging away until I have conquered this beast.

Don’t Turn Your Back on Your Patient

One of the most important “tricks of the trade” that I learned in Medical School was what some might have considered a little “throw-away” bit of advice. During my psychiatry clinical rotation the preceptor advised that, when applying the stethoscope to the patient’s back, one should rest the other hand gently on his or her shoulder. Human touch was important. It would relax the patient and convey subconsciously a sense of compassion, a feeling that “we’re in this together.” I decided to take that advice and throughout my career always touched my patient’s shoulder with my left hand while I was listening to his or her lungs. I don’t know whether this technique “worked.”  Not one patient ever commented on it. But there must be some reason I had such a good rapport with the majority of my patients. Of course this may have been unrelated to the shoulder touch. Maybe it had more to do with looking patients in the eye when talking to them, paying attention to what they said, showing I paid attention by asking appropriate questions, expressing concern and compassion, always shaking their hand when I entered their room, or perhaps some other unconscious body language that put them at ease.

When I was Professor of Medicine at the University of Colorado I told students that Medicine is both a Science and a Humanity. This is what is emblemized by the phrase “the Art of Medicine.” In recent years there have been great advances in the Science of Medicine, and one could be forgiven for believing that science is all there is to it. Medicine as a Humanity is less well studied, less well understood. Changing age-old practices that affect the doctor-patient relationship may have unforseen consequences. Changes like more rushed, shorter patient visits;  doctors turning away and seemingly ignoring their patients while furiously entering text into an electronic health record (EHR) on a computer; or telemedicine with doctors miles away in front of a television camera. Changes like doctors who don’t relate to patients on a personal level, who don’t have long-standing relationships with patients, who aren’t in touch with their patients.

Long ago, when there were only a few legitimate drugs, and many bogus ones — maybe 50 years ago, certainly 100 years ago or even take it back to Greek and Roman times — there were still doctors. They didn’t have much to work with scientifically. They didn’t get results the way doctors today do. But I wouldn’t discount the possibility that they got some results, in fact sometimes good results. The science of the mind is not well understood. Placebo effects are small, but real effects. Calling in the wise-looking, well-dressed gentleman with the black bag full of mysterious pills and injections, with the comforting voice, with the laying on of hands, the careful physical exam — I’m sure all this had a beneficial effect, regardless of the lack of treatments backed by randomized clinical trials . I’m not for going back to those times — we are far better off with good science backing our therapies! But aren’t we losing an important tool in our armamentarium? Patients need our firm handshakes, the touch of the stethoscope, our thoughtful advice.

When our healthcare practice purchased an EHR I resisted the urge to use the computer in the exam room, even though it was slower for me to do my notes in the privacy of my office. I didn’t want to turn my back to my patients. The people who want to increase constantly the amount of electronic documentation we need to enter into the computer don’t understand this. We need to increase the time with the patient and decrease the time with the computer. We need to be in close communication with our patients as one human being to another. We need to relate on a human level, not electronically.

We should never turn our backs to our patients.

What Motivates Doctors?

As a recently retired physician, I still maintain an interest in medical research, though I have to ask myself: Why? Surely not just from the point of view of a potential future patient. But not from the point of view of a practicing physician either. Perhaps I keep up just from a lifetime of habit?  Or is there something I miss about my old job?

These thoughts came to mind as I was reading some of the reports from the European Society of Cardiology meeting in Barcelona, Spain last week, in particular the results of the PARADIGM-HF trial in which a new, so far not brand-named drug, LCZ696, out-performed traditional ACE inhibition in patients with heart failure, and, in my own field of electrophysiology, the results of the STAR AF 2 study  which imply that a more limited is better than a more aggressive approach in ablation of persistent atrial fibrillation. I read these reports with a combination of excitement, my usual dose of skepticism, and perhaps a tinge of regret that, while the science of medicine advances inexorably, my own participation in this process ended as of December 31st, 2013, the day when I performed my last catheter ablation procedure for atrial fibrillation. Yes it seems odd that I was performing procedures one day and then retiring on the next, but that’s the way it was. At least I wasn’t on call my last night. And although I have written that doctors shouldn’t hesitate to retire when they are ready, sometimes I do look at my still-practicing colleagues with a bit of envy, feeling I am missing out on some of the fun of being a doctor.

Doctors just starting their medical careers, residents, fellows or newly appointed attendings, can easily get discouraged reading many of the online posts and comments from older doctors — including my own. There is a lot of negativity in these posts. We read about increasing work loads, decreasing salaries, competition from associated professionals, unmanageable electronic health record systems, terrible on-call nights, malpractice suits, loss of respect for the profession, Obamacare — the list goes on. It is probably tougher to be a doctor today than it ever has been. As my own career progressed, I had more and more of a feeling that I was swimming upstream against an opposing current of non-medical administrative, regulatory sewage. I found it easier to retire at a relatively early age (62) rather than continue the struggle. It wasn’t a brave decision, nor is it a practical decision for younger physicians, in particular those new physicians just out of medical school saddled with enormous debt. To those physicians, I would like to sound a note of optimism (which unfortunately might be drowned out in the comments section to this post).

Everyone who goes into medicine knows it is going to be hard. This was as true back when I started my internship as it is now. But there are rewards in medicine, and they still exist. I’m not talking about the traditional rewards of past years: financial success, stature in the community, pride in taking part in an old and honorable profession. Unfortunately much of this has evaporated in recent years. Nor am I talking about the occasional uplifting story whereby a patient heeds your exhortations to stop smoking and comes back years later to thank you for changing his life — as wonderful as such stories can be. No, I am talking about another aspect that is not frequently mentioned: the challenge of medicine.  Medicine is a battle against disease.  We doctors are on the front lines of this battle, and we are winning.

The challenge was there in every patient with atrial fibrillation, in every patient with ventricular tachycardia, in every patient with supraventricular tachycardia. These diagnoses were relevant to my field, but I’m sure that similar challenges exist in each specialty of medicine, and in general internal medicine as well. To me each diagnosis was a challenge, and the battle was fought using the weapons I had at hand: the ablation catheter, the pacemaker or implantable defibrillator, antiarrhythmic drugs, or simply persuasion, attempting to alter self-destructive life styles. It was immensely satisfying to ablate a pathway and control a life-threatening arrhythmia. But just as in the Wide Wide World of Sports, there was both the thrill of victory and the agony of defeat. Failures, especially complications, which, if you do enough procedures, statistically have to occur, always disproportionately tempered the successes, even though the latter were thankfully much more the norm. Such is human nature. But I think that which motivated me the most during my medical career was the wonderful adrenaline surge that came from ablating a tough atrial tachycardia or other arrhythmia. This is the sort of thing that motivates doctors despite all the other nonsense that we face. This is what keeps us going, or it least it was in my case.

And I sort of miss it.

Doctors Concerned About Possible Brain Injury From the Ice Bucket Challenge

Ice-Bucket-2Well, not really.  But it does seem ironic to me that the ALS Foundation has embraced what is essentially a blow to the head with ice cubes and water as a fund-raising activity, in order to treat a disease which may in part be related to head trauma.  A large number of football players have developed Chronic Traumatic Encephalopathy (CTE), and, although the science is debatable, there may be a link between CTE and ALS.  Regardless, any form of head trauma can cause brain injury, and there is no specific magnitude of impact force to the head that is required to cause a concussion.  Ice cubes are solid and some of these challenges have been done from a balcony, such as this one with New Jersey Senator Cory Booker.cory-booker-ice-bucket-challenge

I won’t pretend to be a physicist, but let’s do some calculations.  A single ice cube weighs approximately 0.01875 kg.  Assuming a fall height of 5 meters (which looks about right for this picture), and a skull deformation of maybe 2 mm on impact (assuming the skull is pretty rigid), the calculated impact force is  459.37 Newtons per ice cube.  An average ice cube tray has 24 ice cubes, but an ice bucket might contain many more cubes.  Assuming 50 ice cubes (and assuming the ice has not melted), the overall force (not counting the weight of the water) is 22968.5 Newtons.  The average estimated force of two helmeted football player heads colliding has been calculated at 1450 to 1600 pounds.  Converting pounds to Newtons, that’s at best 7117 Newtons.  So the Ice Bucket wins.  All of which convinces me that I don’t know squat about physics, and I’m sure these calculations are wrong.  But in any case, maybe the ALS foundation should have picked something else for their campaign rather than a potential cause of brain injury.  The Pillow Fight Challenge perhaps?

A New Treatment for Chronic Health Syndrome

The XYZ Drug Company

Internal Memo
August 29, 2014
CONFIDENTIAL
For internal use only

AntiRobustium™ Marketing Strategy

Introduction

With the anticipated FDA approval of AntiRobustium™ (arsenic trioxide), the first and so far only treatment for CHS (Chronic Health Syndrome) will soon be available to the general public (prescription only). As with the introduction of drugs for other newly branded syndromes (e.g. Restless Leg Syndrome, Short Eyelash Syndrome, and Low-T), it is imperative that the public as well as medical professionals not only be made aware of the serious nature of the target syndrome (CHS), but also appreciate the unique nature and high success rate of the marketed treatment (AntiRobustium™), while at the same time minimizing the emotional impact of potential adverse effects of treatment. CHS poses greater than average challenges in this regard, as the public generally doesn’t consider “health” to be a medical problem. It is important to sell to the consumer the notion that CHS is insidious, debilitating, and, up until this point, difficult to treat. Fortunately though, relief is on its way.

The Hidden Epidemic of CHS

CHS is a relatively rare syndrome in the American population, and epidemiologically has the unusual and counterintuitive property of having decreasing prevalence with age. Although periods of Acute Health can occur fairly frequently in people with chronic illnesses, the long periods of unmitigated Health that are seen in victims of Chronic Health Syndrome are very unusual. These long periods (remarkably lasting up to years in some rare cases) are the striking feature of CHS. Probably due to the low prevalence of this condition, it has not been well-described or studied in the past. Particularly discouraging for us in the pharmaceutical industry, for a long time it was assumed that there was no feasible drug treatment for CHS. Of course all this has changed now with the development of AntiRobustium™!

The Heartbreak of CHS

Sufferers of CHS rarely spontaneously seek medical therapy. They may occasionally come up with weak reasons for seeking medical help, such as “getting a physical” or “having routine screening,” but in general doctor visits are few and far between. Because of this reluctance to seek help for their condition, many doctors are unfamiliar with diagnosing and treating these patients. One telltale sign of the CHS patient is a short or absent list of medications. While the average person seeing a physician will have a medication list of 5-15 drugs, patients with CHS may be taking no medications, or may be taking ineffective medications, such as vitamins, often used as a form of self-medication out of guilt that taking absolutely no medications is odd or even bizarre. This guilt about being healthy in an unhealthy world results in significant psychological stress, with sufferers often feeling like outcasts at social gatherings, unable to compare notes with their friends regarding their Low-T, chronic back pain, or restless legs. Other characteristics of patients with CHS include lower than average weight, excessive exercise (often more than 5 hours a week), extreme diets low in fat and sugar, abnormally elevated state of well-being, and a pink or rosy skin tone. Paradoxically, despite these unusual signs and symptoms, lab testing is often completely normal. In fact, no specific test has been developed that can definitively diagnose CHS, though a diagnostic score has been developed and shows promise. For physician education, XYZ drug reps are encouraged to inform physicians that for all practical purposes a likely diagnosis of CHS can be made if a patient is taking fewer than 3 prescription medications and any one of the signs or symptoms mentioned above is present.

Breakthough! A New Use for an Old Drug

AntiRobustium™ (arsenic trioxide) is not new to the pharmaceutical world. Originally developed as insecticides and then later used to treat syphillis, arsenic compounds have not found much medicinal use in modern times. Until now! AntiRobustium™is the solution to the dilemma the pharmaceutical industry has had in finding an agent useful in the treatment of CHS, in order to monetize this small, but significant segment of the population. The problem that the industry has had in finding a drug for these underserved patients is that most drugs developed up to this point have had both healthful and healthful effects. Due to this dual action, most drugs will cause some (even if only minor) improvement in Health and this will not work in a patient with CHS, as these patients are already healthy by definition. AntiRobustium™ is the first drug to come to market with absolutely no healthful effects, while still having multiple side-effects. Randomized Controlled Trials (RCTs) show that over 99% of CHS patients taking AntiRobustium™ within a 4 week period develop skin pallor, generalized malaise, gastrointestinal complaints, abdominal pain, cardiac problems, and, rarely, death. In the landmark UNHEALTH Study (roUtiNe use of antirobustium™ in HEALTHy compared to unhealthy patients Study) regular usage of AntiRobustium™ at a 5 mg BID dose resulted in no significant difference in morbidity and mortality compared with a control population of patients with end-stage renal disease, terminal cancer, and hepatic failure. These results are impressive because the comparison group was particularly unhealthy and yet the results were similar to the results of the earlier MAKEMESICK Study (Multicenter Antirobustium™ Keeps Everyone Mostly Equal in SICKness Study) which was criticized in some corners because of the relative health of the comparison group (patients with Restless Leg Syndrome, Chronic Fatigue Syndrome, or Low-T). A meta-analysis of these 2 studies, the earlier RCTs, and 5 studies using 30 lab rats each did result in P values < 10-18 for a dystherapeutic effect that was convincing enough to get the drug through the FDA committee, with approval imminent.

Marketing

As usual direct marketing to physicians will take a high priority, mostly concentrating on bagel breakfasts, burrito and Chinese food lunches, with occasional big dinner presentations. Selected physicians will serve as members of our Speaker Panel, generally the same physicians who have served on all our other Speaker Panels. Slide sets will be provided of course. XYZ reps will distribute reprints of the major studies (UNHEALTH, MAKEMESICK, etc.) along with iPads preloaded with our Poor Healthy Joe multimedia educational presentation. As always NO DISTRIBUTION OF COMPANY LOGO PENS WILL BE PERMITTED!! SUCH DISTRIBUTION WILL BE CONSIDERED GROUNDS FOR DISMISSAL!!

A major push will be aimed at the consumer. Not many people have heard of CHS. We need to change that. A good parallel is that with the Low-T compaign. A few years ago no one would have known what was meant by Low-T. Now someone can be considered stupid if they don’t know what it is. We need to create the same situation with CHS. Our TV marketing department is already working on ads featuring Poor Healthy Joe. An example: Poor Healthy Joe is at a cocktail party, standing in the corner, while a group of beautiful young women (professional models) are discussing their diabetes, cancer diagnoses, and other chronic conditions, when Joe’s rival, call him Ill Fred (another professional model) comes over and starts telling them about the low back pain he got from his old football injury. As the women fawn over Fred, Joe decides to do something about his Chronic Health Syndrome. He starts AntiRobustium™. A month later he is back at the same cocktail party with the same professional models, where he is now the center of attention, the women remarking on how pale and sick he looks. While the viewer is distracted by the curvaceous models, the narrator in super fast-foward mode rattles off the list of side-effects of the drug, and the commercial ends with Joe smiling due to his attaining the ill-health that had eluded him in the past. Audience testing of this commercial has been very positive, with less than 1% of the audience able to list any of the side-effects of the drug after seeing the commercial. Other high production value commercials featuring Joe and his chronically healthy friends (Jogging Judy, Vegan Valerie, and others) are in the works.

Last Words

We anticipate a healthy market for AntiRobustium™ (no pun intended)! Once we get formal FDA approval (it should be within the month) the above campaign will be launched at full throttle. And finally remember to use our new slogan: “Too healthy?  Fight back with AntiRobustium™!

Using Social Media in Moderation

True love. Image by © Zero Creatives/cultura/Corbis
True love…
Image by © Zero Creatives/cultura/Corbis

I’ve been backing off from social media recently. For someone who writes a blog as well as publishing medical apps this may appear to be a risky tactic. In truth this retreat has not been completely voluntary. Something known as “real life” has been seeking my attention and gotten in the way of my online life interactions.

My fascination with social media has always fallen into the “love-hate” category. Maybe “addiction” is a more apropos word than fascination.  Social media addiction has supplanted the previous generation of technological addiction, television. Probably a similar fascination or addiction existed when radio was the dominant medium, but I don’t go back that far. The first reaction to television was amazement: “wow, there are moving pictures on the screen.” It didn’t matter that there were only 3 channels in black and white (later expanded slightly by adding fuzzy, low-budget local programs on UHF).  Nightly TV viewing became a dominant part of American life in the 50s and 60s. With cable, the number of channels rose, but the signal to noise ratio decreased. TV viewing, passive and mindless to begin with, only got more passive and more mindless. Yet the TV addiction, once begun, could not be shaken, at least not until a stronger drug/soporific became available. I’m afraid that stronger drug is social media on the Internet.

Just as voices decried the huge number of hours that the average American sat in front of the TV set in the past, so too some voices have expressed concern over the tightening grip of social media. There is a lot of good that social media does. It brings together geographically separated folks of similar interests. It is much more active than watching television: people text, message, tweet, post, and blog. But by the same token it is much more seductive — and more readily available, now that everyone carries a smart-phone. Despite social media’s mostly bland and not terribly informative content, withdrawal is difficult. There is anxiety about missing interesting tweets or Facebook posts. By nature of  the sheer volume of social media output, the occasional stuff that you might be interested in gets buried in the background noise of cat and baby pictures. So you end up either checking your Twitter or Facebook feed several times a day or living in fear.

Yet somehow the world went on before this torrent of social media posts, and we were none the poorer for its absence or at least living in blissful ignorance of what we were missing. It depresses me to see people walking down the street with their faces buried in their phones, or seemingly talking to the thin air, ignoring what is going on around them; or two people at lunch, staring down at their phones, not talking to each other. How social is social media if it actually decreases our sociability with each other in real life? I am not a Luddite and I don’t want social media to go away completely. Maybe just sometimes. Let’s not lose the delight of person to person conversations over dinner or lunch.  Taking a break from social media, whether due to life events, being out in the middle of the ocean somewhere away from WiFi, or just voluntarily chosen, can be a refreshing, mind-clearing act.  And the real world has a higher pixel density than your iPhone screen.  Take a look!

Is a Mobile Electronic Health Record Possible?

Looking for missing meaningful use button clicks.
Looking for missing meaningful use button clicks.

It’s been a while since my last rant about Electronic Health Records (EHRs), so let’s remedy that right now. EHRs in their current iteration are — how to put this delicately? — an unmitigated disaster. Nevertheless, much of the criticism of EHRs, including mine, has been in the destructive category. What about some constructive criticism? How could EHR software be made better?

I am not familiar with every EHR system out there. In fact my experience is pretty much limited to one system, which shall remain nameless, though I will give some clues as to which EHR I mean: its name contains four letters, two consonants and two vowels; the name has no pure rhyme in the English language, though it does have some near rhymes, such as the word septic; and the software is under the delusion that it is running in hyperspace, which may indicate that the programmers possess a sense of humor. There, I hope I have been obscure enough so I don’t get into trouble like I did before.

Current EHRs were developed before the mobile revolution, and it shows. Sure there are some mobile clients available, such as the puzzlingly Japanese named mobile app for the above-not-mentioned EHR system, but these mobile apps don’t match the functionality of the parent application, and, at least in my experience, have been virtually useless. It was possible though not practical to run the full EHR application in a virtual machine on a tablet.  Being a Windows based program, it was necessary to have various awkward, non-intuitive gestures in order use it, for example, in order to right-click. This was not a natural interface for an Android or iOS tablet though possibly a Windows-based tablet, such as the Microsoft Surface, might work better. I don’t have experience with the Surface, so I just don’t know how much it would help.

Having your EHR running at full functionality on a mobile device is very important for a number a reasons. First, every doctor already has a mobile device of some sort. Second, the alternatives to mobile devices are immobile devices, i.e. desktops, which take up a lot of space, are expensive, are constantly breaking down, and are apt to have security issues, such as the doctor forgetting to log off, thus exposing sensitive patient information to the next person who sits down at the computer. Remarkably, the desktop route seems to be the norm for hospital EHRs, with doctors queued up during busy rounding times waiting to get on a computer. Third, doctors are inherently mobile. In the hospital they go from room to room when they round. It is much more efficient to carry one’s EHR with him or her and just go from room to room than it is to go to a room, return to the nurses station to type into a desktop computer, then go to the next room and repeat the process. Having a truly mobile EHR would avoid the constant trips to the nurses station.  So why can’t an EHR fit into a mobile device?

One reason is that present EHRs try to be all things to everyone.  They are not just for record retrieval and note taking. No, they contain everything and the kitchen sink. The same EHR used by the doctors is used by the admissions office to check in a patient.  You may have no reason to enter anesthesia notes or insurance information but your EHR seems to want to do all that and more. Rather than breaking down EHR functions into different tools for different user roles, all functionality is combined together into one megalithic beast. Such a beast simply can’t fit into the mobile form factor. So we are left with the antiquated desktop computers, taking up precious space in the nurses stations, with quaint, 1990s style user interfaces that would rouse feelings of nostalgia if they weren’t so frustrating to use. And don’t get me started on the do-nothing “click-me” buttons that are required for “meaningful use.”

We used to have mobile record-keeping systems in medicine. They were called “charts.” Sure they were bulky and unwieldy, and often all the information that we wanted was not in them (most egregiously missing were X-rays). Nevertheless they were relatively portable, could be stacked on a mobile rack, and a doctor could go from patient room to room without having to return to the nurses station (other than to get a cup of coffee). Data input was via a pen, which is actually a very quick, if sometimes illegible, way to enter data. For all the deficiencies of such a primitive record keeping system, it was fast, productive, and allowed more face time with patients — qualities that current EHR systems don’t possess.

So, a well-designed EHR system — something that I don’t believe exists today — would take that old-fashioned model and make it work on a mobile device, such as a tablet. The doctor could go room to room, pull up the patient data, and then record, either by writing, dictating, or typing, a note. The key to making data input work on a tablet is brevity. Get rid of all the garbage that is automatically sucked into a progress note by today’s EHR systems: lab reports, X-ray reports, 12 point reviews of systems, accumulated cruft from old notes. If you look at the notes generated by these EHRs, the amount the doctor actually enters is typically very small. It is contained in the history section which often simply says something like this: “no change” and in the plan, which may be “s/p PTCA, discharge tomorrow.” All the other debris in the note is added merely to satisfy the coders and billing personnel, who will freak out if there the note isn’t long enough (low complexity of patient care, missing review of systems, etc.). They don’t really care if it is all just cut and pasted from the admission history and physical, as long as all the components are there for them to check off. As I have argued elsewhere, the close coupling of billing and documentation has to change in order to alleviate the current EHR disaster.

A useful EHR system is possible. For it to happen the current desktop-based model has to be thrown out.  We need to start over and develop a truly mobile EHR. One suggestion: get the input of doctors when designing an EHR. Now there’s a novel idea!