Getting Google Calendar on your Palm

June 26, 2006

I have been looking for a good calendar application for my Windows PC for years. When I was working, I used Corporate Time (now known as Oracle Calendar.) Before that, I had an on-and-off relationship with Microsoft Outlook, but the client was too heavyweight for me. Later, I saw iCal for Macintosh and wanted that for my computer, so I started looking again in earnest. Mozilla Sunbird was too alpha-quality for my needs, and Chandler looked great but kept throwing weird Python errors I never had the time to diagnose and report. I tried AirSet when it first came out, but I hated the user interface. It was too confusing, even for me, and I didn’t like all the extra features. I just wanted a calendar.

Finally, I saw Google Calendar a month ago and loved it. It had iCal import and export, a great user interface, and all the funky repetition options one could want. I loved the multiple calendar interface and the ability to let many people edit one calendar.

The only thing missing was synchronizing with my Palm unit. Based on a forum posting I saw, I put together this Rube Goldberg system:

  1. Re-open my AirSet account
  2. Subscribe my AirSet calendar (Calendar->Subscribe…) to the private iCal feed of my Google calendar
  3. Install the AirSet Desktop Sync application
  4. HotSync Palm

And that’s it.

The problem is that I need to log into AirSet when I want changes propagated immediately. I found today after entering my Ob/Gyn schedule that I needed to remove and resubscribe AirSet to my Google calendar link. (There appears to be no “update all subscriptions” button in AirSet.) But after all that, I now have four weeks of calendar data in my PDA. It’s worth the effort.

I’m off now to deliver some babies (maybe.)


Rebuilding The Spam Barrier

June 25, 2006

I have used Mozilla Thunderbird as my email client for two years now. While I absolutely love using TBird, I have noticed more spam getting through than before. I realized I hadn't updated any of the junk mail settings since version 1.0.x, so I decided to rebuild the settings and see how it works. The following steps work for Thunderbird v1.5.

  1. Tools->Junk Mail Controls…
    1. Check the "Trust mail headers sent by…" and set to "SpamAssassin". My primary mail ISP uses SpamAssassin and the headers are a great guide. (However, I have read reports of bogus SA headers possibly added by spammers.)

    2. Click "Adaptive Filter" tab and click "Reset Training Data". This lets us start training from scratch.
  2. Tools->Options…->Advanced
    1. Click "Config Editor…" and type "junk" in the Filter window.
    2. Change the "mail.adaptivefilters.junk_threshold" value from 90 to something less. I have mine set to 50 and I'll let you know how well that works.

See also:

Other Thunderbird mail handling tips are appreciated.


The Micromedex Eclectic Time Machine

June 25, 2006

The library here has brokered some deals for free PDA software. One of them is with Thomson-MicroMedex. I went to register at their software site (sorry, customer ID is required) and learned about a set of medical schools I'd never heard of before.

As part of the registration process, I indicated I was a medical student in New York state, and they asked me which school. I thought I knew of every school in New York, but I found some surprises in their drop-down list:

  • Bellevue Hosp Med Coll, New York, NY
  • Eclectic Med Coll of The City of New York, NY
  • Fordham Univ Sch of Med, New York, NY
  • New York Med Coll and Hosp for Women
  • NYU Med Coll

I checked and found that the unknown (to me) schools above are historical.

It turns out that the NYU and Bellevue names are related. According to the NYU SOM entry in Wikipedia, NYU started a Medical College in 1841. In 1859, Bellevue Hospital Medical College started. In 1898, the schools and Bellevue Hospital merged. In 1960 the medical school was renamed to NYU School of Medicine. ("Bellevue Hospital Medical College" and "Bellevue Medical College" may have been separate entities, I'm not sure.)

All I can find on the Eclectic Medical College of the City of New York is that it was organized in 1865 and "extinct" in 1913. (That page is typed from Polk's Medical Register and Directory of North America, 1914-1915.)

As for Fordham, the same link above indicates Fordham started a medical school in 1905, but it's definitely not there now.

New York Medical College and Hospital for Women was chartered in 1866. After it closed in 1918, students transferred to the New York Homeopathic Medical College, which at some point dropped "Homeopathic" and became NYMC.

I find this all pretty fascinating, and wonder why Micromedex didn't include a wider selection of ancient New York medical schools on their list. Perhaps the Eclectic is one of the few extinct colleges that has started to use Micromedex PDA software.


Palm Position

June 24, 2006

I bought a new Palm PDA (Palm Z22, $99 with case and free s/h) last week, and it arrived yesterday. I took the box back to my apartment, tossed it in a corner, and opened it late today.

Ten years ago, I would have ripped the box open the moment my hands touched it. Now, I just see it as Yet Another Electronic Device that fulfills some small role in my life.

Part of my new reaction is because I don't really like Palm PDAs all that much. I got one as a gift some years ago and tried to make it part of my day. I liked that it could store addresses and phone numbers, since I didn't have a cell phone back then. I even developed some software for it using the Codewarrior for Palm OS IDE.

Programming for the original Palm units was a real throwback, because they had such limited memory (one MB?) and slow processors. Memory handling was a real trip, since there wasn't any distinction between storage and ready memory — it was all the same thing. The developers adopted the Macintosh model of grabbing blocks of memory and releasing them once you were done accessing them. If you failed to release a block, the allocator wouldn't be able to move your block out of the way during the defragmentation pass. For someone who grew up without such sharp restrictions for small applications, it was a real education.

A year or two (and one replacement) after I got my personal Palm, I dropped it on a concrete floor and the glass LCD plate smashed into jagged fragments. The fragments didn't fall out due to the covering plastic film, and my PDA looked like a jigsaw puzzle. I realized I wasn't all that upset about breaking it, and decided that this was a sign that I would be wasting money by replacing it.

The PDA originally was my phone book, development platform, and toy. But each of these needs were supplanted. My new cell phone held all the phone numbers, I had a software job with exciting development problems, and as with all boys, I moved on to new toys.

Now, I have a new Palm Z22. I'm told this is useful (but never necessary) for the wards. I loaded ePocrates (free through my medical school), an ABG calculator, the Johns Hopkins Antibiotics Guide, SHOTS 2006, and an OB Wheel. I enjoyed playing with it today — it's still a new toy, no matter how old I am.

I have a new white coat with a special inside pocket where I plan to keep the Z22. I'll let you know how often I actually use it.


Where is the schema?

June 22, 2006

For a day or two now I've been trying to get XML parsing with XML Schema validation working using Xerces-J 2.7.1. Despite a sample document and schema that parse properly, I kept running into this in the test harness:

cvc-elt.1: Cannot find the declaration of element 'purchaseOrder'

Apparently that means "I didn't read about this tag in your schema." I fiddled some more and came up with this warning:

Failed to read schema document

which makes sense. What I couldn't figure out is why my test application which validated an XML file passed on the command line worked, and my application that parsed an InputStream failed.

It turns out that if you invoke XMLReader.parse(String systemId) instead of XMLReader.parse(InputSource input), it will use the systemId URL to figure out where the schema or DTD file may be. With a InputSource created from an InputStream, it doesn't have that URL and is left searching the current directory.

The solution is to use InputSource.setSystemId() to provide the input source with a URL that can used to help the schema/DTD search.

For those who are curious, below are the very simple files I'm using to make sure the validation works as it should.

I would like to syntax highlight my XML and Java code samples in this blog, but I can't see an easy way to do so in WordPress. I found a good XML and Java syntax coloring tool which uses SilverCity to parse code. However, without being able to specify some CSS the coloring won't work here.

Read the rest of this entry »


Basic Resurrection Training

June 21, 2006

When I was younger, I'd play all sorts of Dungeons-and-Dragons computer games. One of the big milestones was getting the "resurrection" spell, which would bring life back to some fallen warrior if you got the right dice roll. The game usually balanced the spell so it was quite expensive or had a high failure rate.

In medicine, we call it "resuscitation."

I thought about this today during a Basic Life Support course I had this afternoon. (The American Heart Association offers a take-home version which looks like a creepy version of the game Operation.)

Our instructors were more intense than I expected and some insisted on calling us "doctors", even though we're not quite there yet. I had to keep myself from addressing the leader as "Sergeant", since it felt like he took a break from training Marines to visit us. They refrained from random chit-chat and just kept testing us over and over again on the numbers and procedures. It's definitely the right way to learn these kinds of technical skills. You want muscle memory, not a long thought process.

I hope this time I'll be able to remember the training for longer than a few weeks. Research says that CPR training even among MDs doesn't stick as it should. A 1998 UCLA study trained parents of at-risk infants in CPR. The study showed that important predictors of CPR retention were previous CPR training, social support, and level of anxiety during training. Maybe Sergeant Scare-em was on to something.

The stat the trainer quoted for restoring a pulseless individual to life was 4%; I had heard 3% previously. The CPR success rate jumps to 77% if you only watch it on television. (That study was ten years ago, but I suspect the figure hasn't changed much.)

Even with such a lousy success rate and the possible sequelae of neurologic complications and broken ribs in older persons, the concept that you can actually help someone cheat death is incredibly powerful. Advanced life support (ACLS) adds potions and devices to the mix, making the process even more "magical."

Of course, there is no real magic in the procedure — here comes the science [PPT]. What we do with CPR is push the blood around and keep the lungs stocked with fresh air until someone can shock the hopefully V-fib heart back into a sinus rhythm. I'm not familiar with ACLS, but I imagine it's the same idea applied to a wider set of arrhythmias.

The magic is in the ability of a medic to remember and run these procedures ("spells?") without a second thought, giving someone in need their 4% chance at survival — the ultimate saving throw.


New Banner

June 21, 2006

I added a new banner graphic.  Photos are from the Naval Safety Center Photo of the Week website.


Toxo Riding the D.C. Cab

June 20, 2006

Great article on Toxoplasma in the NYT by Carl Zimmer. Apparently it hitches a ride on dendritic cells.

Scientists are now discovering some of the secrets of Toxoplasma's success. Researchers in Sweden report that the parasite fans out through the body by manipulating mobile cells that are part of the immune system. Toxoplasma hijacks these so-called dendritic cells and makes them race around the body and ignore commands from other immune cells to commit suicide. The dendritic cells sneak the parasites into the brain and other organs, acting much like a Trojan horse.

[...]"That led us to think, what if this parasite is directing these [dendritic] cells to move and to disseminate through the body?" Dr. Barragan said. He and his colleagues put dendritic cells in a dish and injected them with Toxoplasma. They noticed that the parasites triggered a peculiar change: the dendritic cells became hyperactive, crawling for an entire day. [...] Injecting dendritic cells carrying Toxoplasma spread the parasites to the brain and other organs far faster than injecting Toxoplasma alone.

You can read the full paper by Miguel Tam and Mary Jo Wick in Cellular Microbiology.

Of note is a paper by reporting that malaria pigment "hemozoin" paralyzes dendritic cells (Urban, 2006). So is someone infected with malaria protected against Toxoplasma spread?

It's exciting (and scary!) how little we really know about how diseases actually spread and cause symptoms. There are plenty of tricks used by bacteria, viruses, protozoa, and fungi to evade the immune system.


Online Lab Tests

June 20, 2006

I just read an article in the WSJ that there are several companies offering blood lab tests direct to consumers. I had heard of mail-order paternity testing, but didn't know of blood labs being offered this way.

The idea is that you order the tests you want online, have them drawn at a nearby contract lab (usually LabCorp or Quest), and the results appear on the website. Most customers pay out of pocket since insurance won't cover lab tests not coming from your physician.

"New Online Services Tout Low-Cost Medical Tests," WSJ, 6/20/2006, by Nick Timiraos (subscription req'd)

The medical-testing trend is similar to initiatives undertaken by drug companies in recent years. "Pharmaceutical companies…have taken the product directly to the consumer. 'If you think this drug is right for you,' they say, 'check with your doctor.' That will be happening with blood tests within the next few years," said John Bell, chief executive at Direct Laboratory Services Inc., which operates DirectLabs.com.

A blood test on MyMedLab.com sells for $45, compared with $295 at the local hospital, says company president David Clymer. "We're trying to reach people who are stuck in a market where their only option is a hospital lab," he said. "We're not simply 20% cheaper — we're 20% of [the hospitals' cost]. That's how consumer-driven health [care] is supposed to be."


The article also cites these companies:

Cholesterol, diabetes, and STD panels are all popular. Customers can use their Health Savings Account dollars for these tests, providing another avenue for burning excess HSA money.

It would take a pretty strong market demand for these services to export lab data in an HL7 or other standard format. I wonder if any providers offer an Excel export.


The Mystery of Eclipse(.ini)

June 19, 2006

I wiped out my Eclipse installation and started fresh with the Callisto Release Candidate. I'm particularly interested in the latest Eclipse Webtools package, which will fix a circular loading bug that prevents the CDA schema from being loaded.

I ran into a problem I've seen before — my eclipse.ini settings don't always seem to take effect. With the v3.1 version of Eclipse, my extended memory limits (-Xmx…) were being ignored unless I specified them on the command line. Now, the latest Eclipse insists on using the VM at c:\windows\system32\javaw.exe, and I can't understand why.

Here's my ini file:

-vm
c:\Program Files\Java\jre1.5.0_07\bin\java.exe
-vmargs
-Xms64m
-Xmx1024m

And here's what Eclipse reports in "Configuration Details":

-vm
c:\Program Files\Java\jre1.5.0_07\bin\java.exe
-vm
C:\WINDOWS\system32\javaw.exe

eclipse.vm=C:\WINDOWS\system32\javaw.exe
eclipse.vmargs=-Xms64m
-Xmx1024m

It turns out that I don't need to specify -vm at all, since the Sun JDK installer replaced windows\system32\javaw.exe with Sun's version. However, I'm annoyed that I can't pick my own VM.

The eclipse.org eclipse.ini reference I found wasn't very helpful on this point.