views:

153

answers:

3

We develop a small business database application with PowerBuilder. Part of the functionality includes scheduling appointments (a secretary schedules an appointment for her doctor via our application). The scheduling appointment is stored as a database record and viewable/editable via our application. Pretty standard stuff.

We would like the ability to have these appointments tied to the doctor's own calendar, notably his mobile phone calendar. I'm looking for ideas (sample PBuilder code would be great, but .NET code would also work) on how to do this. My ideas were:

1) Use the Google Calendar API to link each appointment made to the doctor's personal Google Calendar. If he then syncs his mobile phone to Google Calendar, he'll have it synched. The disadvantage to this is that we'd have to store the doctor's Google user/password in our database app, and that they'd have to have a Google account, as it would only work with that.

2) Sending an iCalendar e-mail every time an appointment is made to the doctor's e-mail address. Is this a good way to do it? They'd have to first use an e-mail client (such as Outlook or iPhone e-mail) to accept the e-mail appointment request. And if they used Outlook to accept it, they'd have to have their mobile phone synced to their Exchange server, etc. Is there any sample PB/.NET code on doing this? I know how to send out e-mails, but I would like help on sending an iCalendar e-mail.

Any feedback/suggestions (such as a good website/tool to visit/check on) is welcome.

+1  A: 

You wouldn't need to store the doctor's Google username and password in your app. You'd just need both the secretary and the doctor to have Google accounts, with the doctor's calendar allowing the secretary's account to edit it.

You could then just ask the secretary for their username and password, generate an authsub token, and then use that token for the rest of the lifetime of the application instance.

However, it does rely on having Google accounts, certainly. If they do, I suspect this would be a simpler solution (from the users' point of view) than sending an email with the ICS in... but I'm biased, as a Google employee who works on Google Mobile Sync :)

Jon Skeet
A: 

I would go with Option 1 as it it the most automated way of doing things.

You can set up a Google calendar called DocCalendar and shared it with the doctor's GMail account. Whatever appointments are modified in your app should be modified in this calendar as well.

The doctor can sync the this shared 'DocCal' calendar with his/her phone.

Raj More
A: 

This all sounds backwards; making any kind of medical related records available to 3rd party systems sounds like a bad idea. But if you need to it, why not publish a .ics file on a webserver (optionally with some kind of authentication) then have the doctor subscribe to it? You can subscribe to calenders from Google Calender, Outlook, and virtually every calender app under the sun.

Option 1 is a lot more work for you and limits you to using Google. Option 2 is a lot more work for the doctor.

Colin Pickard