Tuesday, December 20, 2016

The Power of a Single Metric

One number can't tell you everything, but it can tell you some things. For the past two years I have used the connected smart scale to take daily weight measurements in an effort to watch, and lower, my weight.

Let's start with a caveat. One number does not tell you how healthy you are. Your weight does not tell you your whole fitness story. If I had to measure my fitness, I would do it like this: I'm on vacation, I get up at dawn, go for a ten mile hike through the beautiful desert, back to the hotel, hang out at the pool, then back out for sunset. If I'm healthy, I can do all this and more and really get my money's worth. If I'm not fit, I won't be able to do half of that. If I get tired and need a nap, that's valuable vacation time wasted. So my level of fitness has a direct correlation to quality of life. The fitter I am, the more adventures I can have!

Now to the single measurement and what it can do by telling the story of my first year with the scale. At the beginning of 2015 I decided to weigh myself every day the first thing in morning. It's the least I weigh all day, so it's a bit more encouraging than weighing myself, say, after eating lunch. So it's a life-affirming baseline. Also, it tells me something about my day. If I'm below my weight goal, I can enjoy happy hour after work. If I'm above, I'd better have vegetables instead, and maybe go for an extra long walk or run in the evening. In this way I was able to watch my weight and slowly bring it down. Slowly. Losing weight quickly increases the risk of gaining it back. The body has all kinds of ways to compensate for what it sees as a loss of energy stores. It will slow your metabolism if it thinks you're starving. So I don't want to deprive myself, I don't want to go hungry long enough for the body's defenses to kick in. I wanted to drop weight, but I also want my body to see my lower weight as the "new normal."

According to my chart, my highest measured weight was 186lbs. My goal was to drop this down to 165 over the course of a year, hold that weight for a year, and then drop another 5lbs. That would take me from my pub food and beer weight down to what I weighed when I was running marathons. I wanted to go from this:

To this:


So here is a graph of my first year using a smart scale. Spoiler alert: it worked, as you can see.

You can see the peak is over 186.5lbs in February.
 My first reading under 165 was on December 30th. Just in time for the end of the year. My goal for 2015!

This gave me a sense of elation, letting me celebrate reaching my goal at the end of the year. I lost twenty pounds, right? Well, not exactly. Individual readings vary, and if we look at the 2-week moving average:


The moving average is a better measure of weight as it evens out day-to-day variations. Now we see that my starting weight was closer to 182and I didn't hit 165 until mid-February and I was able to keep the moving average around 165 for the rest of the year.

You might notice a significant drop in June. What's happened? This happened.

A friend had the brilliant idea to climb Mt Kilimanjaro and a funny thing happened there. Altitude is a terrific appetite suppressant, dangerously so in fact. We would hike all day and find ourselves not hungry at dinner. This can be a problem, so we had to force ourselves to eat despite not feeling hunger. Being unable to judge how much my body needed, I would place the amount of food on my plate that I thought I would need, visually estimating my calorie requirements, and then force myself to eat it all.

While we were all sitting around the dinner table shocked at our lack of hunger, I joked that when we got back I would write a new fad diet book, "The High Altitude Weight Loss Diet" and companion exercise book, "Eleven Hour Abs." Indeed, when we were done we were all visibly thinner, and the graph of my weight has a noticeable drop.
And the moving average...
So there was a real difference. I went from very slow progress to a sudden drop which seemed to kick off a period of further steady progress. You might also notice that progress continued after the climb. I resolved to hold on to that weight loss so I did two things. One, the inverse of mountain eating, I would visually estimate the amount of food I needed on my plate, and then force myself to eat no more than that. Two, I walked a lot more and tried to stay active. I joined a second run club and reminded myself that I'm still not walking as much as we did on the mountain. I kept up this attitude for the rest of the year, weighing myself every morning, and watched and celebrated my progress.

What did I learn? A few things:

  1. To maintain a healthy weight, I need to be hungry a few hours a day. Typically an hour before lunch and 2-3 hours before dinner. To keep from feeling deprived, I would remind myself how much better that meal will taste now that I'm hungry.
  2. It's better to estimate how much I need to eat before I start eating, and this usually means I'm still a little hungry when I stop eating. About 20 minutes after I stop eating I will stop being hungry. This is very different from the old me, who would only stop eating after I got that satiated feeling. 
  3. Taking many short walks throughout the day is better than a few intense exercise sessions per week. Perhaps it keeps my metabolism elevated, but whatever the physiological mechanism, daily weight measurements showed the difference. 
  4. Don't be afraid of the scale! Healthy weight only happens when you measure it. Being afraid of what you see on the scale only increases the risk of weight gain. Be brave every morning, step on that scale with open eyes, and more often than not, you will see pleasant surprises.
  5. Daily readings make daily plans.
Moving averages, daily plans based on daily readings, and refine-as-you go approaches are tools that helped me reach my goals. As I inevitably get older I plan to apply these tools to other biometric readings as needed to live a long and healthy life. And I hope you can too! 



Thursday, February 12, 2015

How to Win a Hackathon (also: free beer)

You can spend an entire weekend in San Francisco and not pay for food or drinks once. All you need to do is build a prototype web application in 5 minutes and spend the next 50 hours making it into something never seen before. The hackathon is here.

Hackathon is the local sport. It's an endurance event for programmers and builders, usually an entire weekend where the contestants race from zero to working application, followed by Olympic-style judging (the criteria might be creativity, applicability to the problem set (usually there is always a "theme"), and technical difficulty). It's a team sport, and if you want to win you have to bring something good to your team. There's a few things you can do that will make your team happy and give you a shot at the gold medal.

First, preparation is essential. You build your laptop from scratch to be the ultimate developer machine, with several full development stacks and your code editor customized just the way you like it so anything you might need is at your fingertips. Then you'll spend at least a day or two in last minute preparation and testing; doing some practice exercises could't hurt. The key to a good hackathon is rapid prototyping, and that requires tools and skills already in place and ready to go.

What You Need to Bring

At some point I had to ask myself, what is in my toolbox? What do I install on my laptop and how do I make sure I don't embarrass myself by not having the latest SuperNextGen Build System configured to auto-construct the web site we need and remember everyone's coffee order? Also, I want to win! And to win I need the absolute best tools in the room, configured just so. And so what tools do you bring?

Web services development and hosting

That's right, bring the cloud. More precisely, your access to cloud servers and services. You should be able to whip up a new web service as fast as you can type, and deploy it somewhere the rest of your team can use it. At minimum you need a good REST CRUD for basic object persistence; in reality everyone will be expecting you have the entire data set in a high-throughput BigQuery analysis engine by lunch time. In a pinch, JPA on AppEngine will do.

Whatever platform you use, you're going to want to get a test system up and running first thing, something that you can build your application on. This first program essentially becomes a workbench, something you can test on, adding and removing new features to see how they work. Start with something generic, then specialize it to your problem set.

Oh, and you'll need to be able to share your code and other digital assets. Here, a little setup beforehand goes a long way.

User Interface Experience.

It's not an interface, it's an experience. There's rapid prototyping and then there's interactivity, and you'll never know what kind of interaction works until you try it. You need your code templates and a toolbox of plug-and-play components ready to go, organized so you find the right one quickly. Yes, you can impress everyone with a little copy and paste and some quick JavaScript.

Data Visualization 

Chances are, whatever you build will involve looking at data. With a visualization library like D3, you can design and deploy a number of different charts for whatever is thrown at you the day of the hack. 

Hardware

Nobody hacks in pure software. Not in the age of Raspberry Pi and homebrew sensors. If you show up with a programmable hardware device and it turns out to be actually useful, you will be the rock star.

Algorithms

You should just learn all you can, constantly. Bring what you know.

Monty Python Jokes

You're spending the weekend surrounded by some of the smartest, most energetic, and creative engineers around, and everyone has fantastic dreams of things to come. People like this are easily entertained, so bring your silly walk.

A hackathon is a special time and place where sparks of innovation fill the air and the future is taking shape before your eyes. When those eyes get red and tired, when it's late and everyone is punchy, that's when the fun begins. The geeky insider jokes fly with the airspeed velocity of an of unladen swallow.

And you might just take part in the creation of something new. 

Enjoy!

Monday, February 24, 2014

Words by People

It's not the epiphany, it's what you do after the epiphany.
- Stew, Passing Strange 

Always do what's next. 
- George Carlin

Adventure without risk is Disneyland. 
- Douglas Coupland

Life is short and information endless. Abbreviation... a necessary evil. 
- Aldous Huxley

Rule 1 of the attention economy, pay attention. Rule 2, pay attention to where you pay attention. 
-Howard Rheingold

85% of life is just showing up. 
- Woody Allen

At least some of the remaining 15% is showing up early.
- Me

To achieve great things, two things are needed: a plan and not quite enough time.
- Leonard Bernstein

Time is an illusion. Lunchtime, doubly so.
- Douglas Adams

One person can make a difference, but most of the time you probably shouldn't.
- Marge Simpson

Don't believe everything you think.
- bumper sticker on a VW microbus

Everybody's screwed up in their own special way.
- Joey Ramone

Monday, January 27, 2014

Character Sets in HL7v2

If you work with HL7, you need to understand UTF-8. It's the standard and unless you see another character specified in message segment MSH-18, that's what you use. A typical HL7 message will have an empty MSH-18 segment and by default all visible ASCII characters in UTF-8 (hexidecimal 20-7E) are legal.

That simplifies things but there's still a lot to watch out for, especially at computer boundaries. You may be sending messages from Windows to a Linux server, or you may be editing files in a text editor that's configured to a different character set and feeding those into your message client.

There's excellent material on what every programmer needs to know about

Version 2 Character Sets and Encoding from Health Intersections, a paper by someone who had just finished rewriting his v2 parser.

The Unicode FAQ from Unicode.org

What Every Programmer Should Know About Unicode (no excuses!)

From this, we have the need for an HL7 message that can test how a system handles the complete set of visible UTF-8 characters. Start with the UTF-8 Test File from W3C, take any simple HL7 message and add a note segment for every legal character, like this:

NTE|2||0020   SPACE
NTE|2||0021 ! EXCLAMATION MARK
NTE|2||0022 " QUOTATION MARK
NTE|2||0023 # NUMBER SIGN
NTE|2||0024 $ DOLLAR SIGN
NTE|2||0025 % PERCENT SIGN
NTE|2||0026 & AMPERSAND
NTE|2||0027 ' APOSTROPHE
NTE|2||0028 ( LEFT PARENTHESIS
NTE|2||0029 ) RIGHT PARENTHESIS
NTE|2||002A * ASTERISK
NTE|2||002B + PLUS SIGN
NTE|2||002C , COMMA
NTE|2||002D - HYPHEN-MINUS
NTE|2||002E . FULL STOP
NTE|2||002F / SOLIDUS
NTE|2||0030 0 DIGIT ZERO
NTE|2||0031 1 DIGIT ONE
NTE|2||0032 2 DIGIT TWO
NTE|2||0033 3 DIGIT THREE


...and so on.

You can download a simple lab result test message here or create your own with other character sets and neat tricks like embedding escape sequences and changing encoding mid-stream (but for the sake of the rest of us who might have to read your data please don't). Then feed that into an HL7 client program, such as the free and open source HAPI Test Panel, and run it end to end through the system. If it comes out the other side the same way it went in, you're golden. Happy encoding!

Thursday, November 14, 2013

Adventures In Health Insurance Part 3: Getting Covered

(Part 3 in a series, a continuation of Part 1 and Part 2)

To be honest, when I said I want to keep my doctor it was just an experiment.

I've never been able to keep my doctor. Continuity of care seems like a great concept but it's something I've never experienced. I've seen my current doctor a total of 3 times in the 3 years he's been my doctor. I got this doctor l like I got all my doctors: my health coverage changed when my employment situation changed. Optum, the Health IT company and United Healthcare subsidiary, bought Axolotl, the HIE company where I worked. They gave me this new high deductible HSA PPO they believe is the wave of the future and will ultimately bring down the cost of health care by putting the first few thousand dollars of cost on me, motivating me to spend more wisely. That's the theory anyway, as I saw it pitched by Tommy Thompson (HHS Secretary under President Bush) and UHC executives.

I left in July to join a small consulting firm. I'm still working in the HIE field but now I'm buying my own insurance. My intention was to pay for COBRA until the end of the year, then buy either an exchange plan or a private one, depending.

United Health is not on the exchange and is in fact pulling out of California's individual market altogether. They were never big here anyway and the number of individual subscribers probably didn't justify the administrative expense.

I checked out the exchange plans, and I have my choice there. It's not everything I want but it's darn close, a bit cheaper, and feels safer. If I ever feel slighted or wronged by the exchange in any way, I know I'll have an army of Angry Republicans marching to my defense as they have been wont to do of late.

Now it's time to explore the individual private market, that vast free market jungle out there. I feel like I should be wearing a pith helmet.

As with many things, it started with Google, which showed me a paid ad for eHealthInsurance.com

It asked me basically the same questions through the same procedure - the doctor search worked - and it sent me to the Blue Shield of California web site, where I saw the same plans for the same price. The UI is more polished, and you can see how the cheaper plan may be great if you're healthy and nothing happens, but paying 40% of an emergency room visit instead of a simple $250 copay, that could hit pretty hard I imagine, and could lead to some interesting negotiations on the operating table ("What's that machine, doc? It looks expensive").

The cheapest plan on the exchange was $263 and the cheapest plan on eHealthInsurance.com was $294. I could get an HSA for around three hundred bucks, and with that I would have a $4500 deductible and a 40% copay beyond that, up to my yearly maximum of $6250. With the HSA I could contribute to $3300 a year tax free. The idea with an HSA is to start young so when your health fails and you start paying out that yearly maximum, you have enough to cover it. Rich people love it because you can contribute pre-tax dollars and invest it in the stock market, like a 401k. Unlike a 401k, you also withdraw it tax-free as long as you spend it on medical expenses. Like the individual mandate, the high-deductible HSA plan was another conservative idea embraced by insurance companies and incorporated into the ACA. 

The non-HSA plans have a $2000 deductible. Between that and the lower copays, it seems like a less risky choice. I'll pay a bit more per month but a lot less if something happens.

Also, the exchange site is more responsive than it was last time. It's 7:21pm and I'm navigating through as fast as I can click. It wasn't like that the first week.

Buying insurance isn't as scary as I imagined. There is comfort in knowing whatever I buy will have a minimum level of coverage and no lifetime limits. The horrendous industry practice of rescission (actuaries actively looking for reasons to drop sick and expensive patients from their plans) is a thing of the past. I can buy any plan available without fear of hidden "gotchas" that might hurt me later when I need serious health care.

So starting January 1st, I'm off COBRA and on my new plan with the same doctor, the same benefits, and the same costs. I went back to CoveredCA.org to do the actual enrollment, and with another login and a few more clicks, I am signed up! My new coverage starts January 1st.


Tuesday, October 22, 2013

Adventures in Health Insurance, Part 2: CoveredCA Here I Come

So let's see if I got this right. The original contractor blows a high profile rollout, everyone - and I mean everyone - is screaming mad about the lousy software, management panics, and an elite tiger team swoops in to save the day. In the world of health IT, we call that Tuesday.

As I mentioned before, I am actually shopping for insurance right now. I'm in good health and could probably buy insurance on the private market for a bit less than what I've been paying COBRA for the past several months, but I thought I'd wait to see what the exchanges had to offer. This is the story of my adventure on CoveredCA.

I signed up early, was able to compare prices somewhat and already had a login before the October 1st rollout. I finally found the time and motivation to do some for real shopping. It's 7:17pm and I'm logging in.

It's showing the strain of prime time load, the poor thing.

Waiting ten seconds and clicking didn't seem to help, but the APPLY button did take me somewhere useful. The login worked. I was in.
 My first impression is that of a nice, clean layout. I can see right away I've already filled in all the forms (there aren't that many), but then none of the things I want to click are hyperlinked. I'm a very nonlinear user and I like to click on everything. I suspect there's a NEXT button hiding in the corner somewhere, and there is.

It turns out to be a very linear navigation, and by "very" I mean "exclusively." It's next-next-next until you see at least three text regions overlapping each other, like an HTML panel editor threw up in the corner. 
It looks terrible but I just need to click Select Health / Dental Plan so I move on.

I get to my selection of 26 plans, of which I can view exactly three at a time. There's too much real estate at the top being used by navigation links I don't care about right now, leaving precious little room at the bottom for a ridiculously constrained scrolling region containing all the information I really want. In this picture you can see two rows of that.

And here's a collapsed list of all the information you can scroll through down there. If you count you'll see there's a lot. It's all useful and I wish I could view it more easily.

Here's a tip for all you twelve year old kids who want to build web applications like this one: The ideal number of scroll bars on a given page is zero. One is marginally acceptable but if you have two or more they interfere with each other and that's bad. Very bad.

Let's get to the part where I search for my doctor. He's not there. I hope he hasn't left town but when I search by name this is what I get.
And this is what I get when I search for "S"
I point this out not because it's broken, in fact it works perfectly fine. However, that NextLast bugs me. It makes me want to open a text editor and fix it, but I can't, so it's just annoying.

Let me show you a brilliant health care web site.
This is Palo Alto Medical Foundation. They've been pioneers in health web applications from the very beginning so when I say it's a brilliant site I mean it. It's been polished by years of heavy use, tweaks, and overhauls. Notice the clean layout containing lots of information. Everything you think you should click on, you can. From here you can do any number of things, whether logging in or checking urgent care wait times. And what's that at the top of Special Notices? A list of ACA plans. Just what I need!

However, on the CoveredCA site, I can't search by plan name, or much of anything really. I can browse and find the plans easily enough. It browses side to side with lots of stuff to read, here's an example of some of the mouse overs.





Oops, that's no mouse-over. I'm guessing some of the javascript events aren't being picked up by the timeout mechanism. In any case, I have most of what I need so I can call it a day. I know what plan I want and it's a bit cheaper than what I'm paying now. I would like to make double sure all my providers are in network along with a few other minor questions, as is true with any health insurance plan. However it didn't crash, annoyances were constant but didn't stop me, and I'll probably have to talk to someone in person before making a purchase anyway.

In other words, it's working just as well as your average brand new health IT system.


UPDATE:
The automatic timeout works, and it is nothing if not secure.

Thursday, October 17, 2013

Adventures in Health Insurance Exchange Part I: Doctor, Doctor

The insurance exchanges are online and I need insurance.

A little background on me: I was a software architect at Optum (the IT arm of United Healthcare) building Health Information Exchange (HIE) systems until recently. I left to join a very small consulting company (there's 3 of us) and lot of exciting stuff is happening in health care: HIEs, ACOs, NwHIN, FHIR, Blue Button, all these amazing things coming into existence right now.

I'm not without coverage. I have a UNH plan, high deductible with HSA, which is fine. I like my doctors. I'm on COBRA which is $500 a month but I get $100 off for being in good health (rockin' all the vital signs - oatmeal and half marathons yo). Not a bad deal, in relative terms. The individual private plan is about the same but I've been waiting for the insurance exchange to come online and now I get to put it to the test.

Being a Silicon Valley kind of guy, I went to CoveredCA.com - I actually signed up months ago and the "window shopping" part of the site has been up for quite some time so I know my rates are going to be similar. Turns out that's just what they cost.

I have a few requirements for my next health insurance plan:

  1. I want to keep my doctors - all of them. PCP, eye doctor, dentist, everyone because I want to live as long as humanly possible and that involves watching the progression of my health very carefully as I age. I stand on the principle that continuity makes better care.
  2. I kind of like my health savings account (HSA), I'd like a plan with an HSA. You pour money in tax free and when it's time to pay that high deductible it doesn't feel nearly as painful as pulling that same amount of money out of a savings account. I also figure when I'm old and feeble I'll be paying the yearly max every year, so there's that.
  3. If they have high tech wellness tools, like a really killer mobile app, that's a plus.


At first, I didn't know if I could keep my doctor. A tool to search for providers was added October 7th, and with it I was able to find my care organization - Palo Alto Medical Foundation - but not my doctor. I had to go to PAMF's web site to see what plans they accept. PAMF was an early pioneer in this technology and their tools are very, very good. I not only saw what plans I could pick from the exchange, I saw this:

How about that. If I don't switch plans, there's a chance I won't be able to keep my doctor.

Partisan pundits have asked, "Will I get to keep my doctor under ObamaCare?" I think the real answer to that question is, "Were you ever able to keep your doctor?" I had to switch doctors every time I changed jobs, and sometimes just because my insurance company decided to change its "network" for no reason I ever knew. If I move to another city I'll find a new doctor, but as long as I live here, walking distance from PAMF, I'm not switching. I shouldn't have to.

With an ACA plan I can keep my doctor. In fact, I need to sign up now if I want to keep my doctor.

In a later post I'll describe my experience navigating the web site, along with a few others, and actually buying insurance. Spoiler alert: I'm a big, big fan of health IT systems and I'm inclined to like it, but I did run into one or two problems.