Setting up google calendar synchronization with InSched
Google Calendar is a free service of Google that allows you to track multiple schedules online. Google also provides programs and systems to synchronize your other systems and devices with your Google Calendar, including your iPhone, and allows outside programs to synchronize their schedules with Google Calendar. You can set up InSched to synchronize some or all of your calendars with Google Calendar, so you can access your InSched calendar online and via your mobile device. You can also use Google Calendar and your mobile device to add appointments to your InSched calendar while on the road. You can even just click on the patient's phone number on your iPhone calendar, and iPhone will dial your patient so you can talk to her!
Setting up your accounts
To set this up, you will need to know a little about Google Calendar. First, you need a free Google account to use Google Calendar. You can use your main Google login to set that up, but you might consider setting up a separate Google account for your InSched calendar, for three reasons. First, in order to access your Google account, you need to tell InSched your Google password, which InSched must store so that InSched can synchronize with Google in the future. While InSched does encrypt the password and can prevent other users in the office from seeing it, that is a potential security risk if there is critical information in your regular Google account.
Second, you also have to give your Google password to your iPhone, so someone who finds your iPhone might be able to get access to your account. Third, Google sometimes, and unpredictably, locks out a Google Calendar account if it believes there has been too much activity. If Google does that to your account, it may be weeks before the lock expires. This is likely only while you are setting up your Google Calendar synch, but it is something to consider. I will describe a setup where you use InSched with a separate Google Calendar account.
Setting up a secondary calendar for InSched
Each Google account can create a "main" calendar and multiple "secondary" calendars. The Google account is named for an email address (either a gmail.com email address or an outside email address). The email address has to be one where you can actually receive email, to confirm your account. The "main" calendar for the account is named for the email address that also names the account. While every calendar is owned by a single Google account, you can share any calendar with one or more other Google accounts. When you share a calendar, you can share it "read-only" or "read-write".
Google's undocumented quota system
When a calendar becomes "locked out", that calendar can no longer accept any changes (from any account, including an account sharing that calendar), and further, all of the calendars of it's account are locked out. Google is secretive about how this "quota" system works, and refuses to give the details, but there are rumors that the quota is 5000 changes per day. Reading events from a calendar does not seem to be limited. Of course, Google could change this at any time.
The recommended configuration
Thus, there are probably an infinite number of ways to set this up, I will describe setting up a separate Google account used by both InSched and your iPhone. You will be able to access both your InSched calendar and your regular, personal Google Calendar on your iPhone.
To start, first get a free Google Calendar account (Google "Google Calendar" to start) and create a calendar in that account. If you want, you can create multiple calendars -- different calendars will have events shown in different colors both online and on your iPhone. If you want to access the calendars (either with InSched or your iPhone) from a different Google account than the one that owns them, share the calendars with the Google accounts that will be accessing them. Be sure to set the local timezone for your calendar to the timezone that you use with InSched.
Connecting Google to InSched
Start InSched from a computer that has access to the Internet. InSched uses https to talk to Google Calendar, and can use a proxy. InSched does not try to verify Google's certificate, so you should have no problem using a proxy.
Once you have InSched up and running, and you have configured InSched with your schedule, go to Setup/Google Calendar Upload within InSched. First, take a look at this dialog.
The Google Calendar Dialog within InSched
InSched allows you to synchronize with several Google Calendars. Those Google Calendars can be accessed with one Google account or with several different Google accounts. The upper portion of the dialog describes each Google Calendar.
Within each Google Calendar, you can synch several different event specifications. For example, you may want to include consult events within the past 60 days, but surgeries for the past two years, and vacations for the past five years and into the future. Each of these event specifications are configured on the lower portion of this dialog.
Enter the username and password for the first Google account that InSched will use to access the calendar. You can choose to show (or not) the password to make sure you have typed it correctly. If you access the Internet via a proxy, set that up on the Diagnostics and Proxy tab. Then, click "Connect". InSched will load the SSL library and make a connection to Google and log you in. If InSched is successful, you will see a combo box listing the valid calendars accessible by that account to the right of the Connect button. Select the calendar you want to configure first.
Your Synch Specifications - which events do you want to synch with Google Calendar?
Each Google Calendar can have several Synch Specs. The Synch Specs are configured on the bottom panel. Use the controls here to set the number of days in the past and in the future to synchronize, the Resources, Locations, and Event Types to include, and the kinds of Event Types to include. Any given event will need to meet ALL of the criteria set in a given Synch Spec in order to be uploaded to Google. The default is to upload all events within the given timeframe except for Blocks. "Upload Others" refers to all non-block Event Types other than the named Trigger Types of Surgery, Procedures, Consult, and Ongoing.
Adding another Synch Specification
Once you have set up the first Synch Spec for a calendar, you can press the "+" button in the lower navigator control to create a second Synch Spec for that calendar. An event will be uploaded if it meets the criteria in any of the Synch Specs for that calendar. For example, you might want to upload all Surgery events within two years, and all other non-block events within 60 days. Set up one Synch Spec with Days in Past and Days in Future of 720 days, and in the checkboxes in the bottom, uncheck all except "Upload Surgery". Then, create a second Synch Spec, set Days in Past and Days in Future to 60 days, and leave the checkboxes at the default of everything checked except "Upload Blocks".
Selecting the Resources and Event Types that you want to synchronize
If there are multiple providers on the schedule and you only want your own events, select the Resources you want with the Resources button. If you want to fine-tune the specific Event Types, select the ones you want with the "Event Types" button, but remember that ALL of the conditions in the Synch Spec must be met to upload a specific event. However, if ALL of the conditions in ANY of the Synch Specs are met, the event will be uploaded.
Configuring multiple Google Calendars to synchronize with - great if you have multiple doctors using InSched
You can use the navigator in the bottom panel to set up the Synch Specs for a given Google Calendar. Use the navigator in the top panel to switch to different Google Calendars to configure. Different Google Calendars can be for different practitioners, or can be for different colors on the iPhone of a single practitioner. Of course, you can put multiple practitioners' events into a single Google Calendar if you want.
How InSched does the synchronization
Now look again at the upper panel in the Setup Google Calendar Upload Dialog. Each Google Calendar, with its multiple Synch Specs, can be synched with Google on its own schedule. A "Full Synchronize" gets all of the events on the Google Calendar in question and checks them to be sure they are up to date. InSched adds a special marker to every event it uploads to Google Calendar, so that InSched will not interfere with non-InSched events on that calendar. For every InSched event found on the Google Calendar, InSched determines whether it still qualifies for uploading to that Google Calendar, and if so, if it is up-to-date with InSched. If it no longer qualifies for uploading, InSched will delete it. If it still qualifies but is out of date, InSched will update it.
If the event still qualifies for uploading by every criteria except date (e.g., a Consult event in the example above that is now 61 days in the past), InSched will look at the "Remove others" checkbox for that calendar. If "Remove others" is checked, InSched will remove it. If "Remove others" is not checked, InSched will leave the "old", but still up-to-date, event on Google.
While InSched is doing the Full Synchronization, it is building a representation of the events on Google in memory, and will use that image to keep Google updated as changes are made to InSched. If InSched is restarted, a new Full Synchronization is required to get that information from Google back into memory. Since only changes are sent to Google, the Full Synchronizations will not count toward your Google Calendar quota except for changes that need to be uploaded.
Time to do your first Full Synchronization
To do a Full Synchronization, click the "Synchronize" button while that calendar is the current calendar in the upper panel of the dialog. Once the calendar has been synchronized, InSched can keep Google up to date by adding, updating, and deleting events on Google as they are changed in InSched. InSched calls that an "Update", and you can manually run an Update by clicking the "Update" button. Of course, InSched must already have done a Full Synchronization with that calendar before doing an Update. Occasionally, a network or other error will prevent an event from being Updated on Google. When that happens, InSched can Re-Send the event. You can do that manually by clicking the "Re-Send" button.
When do you want InSched to automatically synchronize?
Normally, InSched will automatically do a Full Synchronization once a day, and then keep Google up-to-date as changes are made. To prevent that, check the "Disabled" checkbox for that Google Calendar. Pick the days and time to do the Full Synchronization for each calendar in the panel in the upper right. Check the "Do Full Sync" checkbox to have InSched do the scheduled Full Synchronizations, and check the "Do Update Sync" checkbox for the continuous updates. "Mins between" is the number of minutes between sending the Updates to Google. For immediate updates, set that to zero. Note that, to be polite, InSched can wait until you are not using the program to send the updates - use the Setup/Preferences dialog, go to the Synchronization tab, and set the Minutes of quiet time before synch to a number other than zero to make InSched wait.
Downloading events from Google to InSched, so you can enter new events for your schedule from your iPhone
In addition to uploading events to Google Calendar, InSched can also download events you add to Google Calendar in the web or with your iPhone, and add them to your InSched calendar. This is great for adding events you find out about when you are outside the office. It is intentionally limited to adding, rather than changing, events, since it is way too easy to accidentally move an event on Google Calendar - consider the ramifications of accidentally moving a surgery to a different date. Google Calendar has none of the audit tracking and reliability features of InSched. However, the ability to add an event to InSched while you are on the road is a great convenience. Use the Downloads panel to set this up.
How to configure InSched to download events from Google Calendar
Be sure the "Do Download Sync" checkbox is checked, and "Disable All Downloads" is not, for the calendar you want to download from Google into InSched. The difference between those two checkboxes is that "Do Download Sync" refers to automated, repeated downloads, whereas "Disable All Downloads" refers to those downloads as well as downloads performed manually by clicking the "Synchronize" button.
Setting your "Download Cookie", so InSched knows that you have an event for it to download
You need to set a "Download Cookie". This is a brief word or phrase that you will enter into your new event entered on the road. When InSched sees the download cookie in a non-InSched event on this calendar, InSched will know to download the event into InSched. InSched will then replace the cookie in the event on Google and turn the event into an InSched event. When you notice from your iPhone that the download cookie is gone, you will know that InSched has downloaded the event, and it is successfully added to your InSched schedule.
When should InSched check for Downloads?
"Mins Between" for downloads is the number of minutes between the times InSched checks Google for new events. Remember that, for Update, InSched won't actually contact Google unless there is an event to update, but InSched will have to constantly, around the clock, check with Google for events to download. InSched tries to be nice to Google by telling Google the download cookie and only asking for events that contain that cookie (so Google does not have to send all of the events on the calendar!), but consider the load on Google if you make "Mins Between" too small.
Set the Event Type, Resources, and Locations for the newly-downloaded events -- different for each Google Calendar you synchronize with
Pick an Event Type for InSched to use for making the new events on the InSched schedule. One trick is to set the Event Type you use to be "Inactive", so it does not show up on the list of Event Types when your staff is adding events to InSched in the regular course of business. Also, you will probably want to set the Trigger Type for this Event Type to "None". If you make this Event Type a bright color, the staff will likely notice it easily when it appears. You can put the info about the event into the text from your iPhone, and you or your staff can change the Uploaded Event to a more appropriate event once you get back to the office.
Finally, don't forget to set the Resources and Locations for the newly-downloded events. If you and your partner both use your iPhones with different Google Calendars, you can be sure your downloaded events get added with the correct Resource. Alternatively, you can set the resource to be the default resources for the Event Type you choose.
Only single, non-recurring events can be downloaded from Google Calendar to InSched, but you can put a note in the event you create that you want your staff to schedule a recurring event.
Encrypting your Google Username and Password
Once you have all of your configuration info set up for Google Calendar, you will want InSched to save it for use when you re-start InSched. InSched encrypts the information, using your Windows logon, and stores it in the Registry. Thus, if another user logs onto your computer, they will not be able to read or use your Google Calendar configuration. Another consequence of that is that, should you move to a different computer, you will need to re-enter this configuration information, but the alternative would be a security breach, if other users could read your informtion.
Setting a Vault Password - Optional
As an extra layer of security, InSched can further encrypt this information with a "vault password" of your choosing. The vault password will need to be entered both when InSched starts up (so it can read the configuration information itself) and also when opening the Setup Google Calendar Upload dialog, so someone else coming to your computer once InSched is running will not be able to see your Google password. Note that if you do not set a vault password, once you are logged into your computer, anyone with access to your computer will be able to start InSched, open the Setup Google Calendar Upload dialog, check the "Show Google Password", and see your Google password.
Saving and deleting your configuration information
To manually save your encrypted configuration to the registry, click "Save Configuration". To have the encrypted configuration automatically saved when you exit InSched, leave the "Save Configuration On Exit" checkbox checked. To reload the saved configuration from the registry (if you have messed up your configuration) click "Reload Configuration". Normally, the configuration is automatically loaded from the registry when InSched starts.
To delete the saved configuration from the registry, click "Delete Config". To set, change, or clear the vault password, click "Set Vault Password". Save a blank vault password to remove the vault password functionality.
Other buttons - what do they do?
"Close Window" hides this dialog and lets you go back to InSched. Note that automatic Full Synchronizations and Updates will not occur while the dialog is open.
The Google Calendar Synch activity tab - for troubleshooting
"Show Progress On Progress Tab" tell InSched to keep track of all Google Calendar activity on the Progress and Errors tab. Open that tab to see the log.
Copy to Clipboard (or right click on the window) to save some or all of the log to the Clipboard, for saving, emailing, etc. Check the "Save New Items To Logfile" checkbox to have any new activity also saved in the InSched.log logfile, for troubleshooting. "Clear", of course, clears the window.
The Diagnostics and Proxy tab
The "Diagnostics and Proxy" tab has troubleshooting tools as well as proxy setup. A proxy is a network resource that you access and which grants you access to the Internet at large. Many businesses use proxies to limit the websites that employees can access from work. If you have a proxy, enter the proxy information in the Proxy Configuration panel. Check with your network administrator for this information.
The upper part of the Diagnostics and Proxy page contains diagnostic and troubleshooting tools. The Google username and calendar name are shown. Once InSched has authenticated with Google, Google provides an "Auth string" that InSched uses for subsequent access. Thus, InSched only rarely (perhaps yearly) has to actually send your password. Thus, even if you do not save your Google password to the registry, once connected, InSched will still be able to synchronize, at least for a while. However, once Google expires your Auth string, if InSched does not have your Google password saved, it will not be able to get a new Auth string.
Checking for errors
You can see what the timezone for this calendar is (you set that when you set up your calendar on Google), and when the last errors were. A "Forbidden" error occurs when you submit an incorrect username or password. The local cache must be up to date for the Update functionality to work (this is what holds the information about events on Google, downloaded during a Full Synchronization). "Save XML transmissions in files" will save the information sent to and received from Google into .xml files in the InSched directory. You can safely delete all .xml files in InSched's directory when you don't need them anymore, but this is a great troubleshooting tool if you are having trouble determining what InSched is receiving from and sending to Google. "Log All transmissions ..." logs additional information, and may log your Google passwords as well. Use it with care. Generally, the XML transmissions are what you need for troubleshooting.
"Show Calendar Info" shows some of the same information in a message box, including the full authorization string and redirection cookie, including its expiration date. "Show local cache info in progress tab" puts similar information into the Progress and Errors tab, so you can copy to the clipboard, etc. Click this button, and then go to that tab, to see the information. Finally, "Show all events in local cache in progress tab" puts detailed information about all of the events downloaded from Google and stored in the local cache into the Progress and Errors tab. Of course, events that are not InSched events won't be there, and events that do not meet the upload criteria will not be in the local cache, either (InSched will have tried to delete them.)
The navigator at the top of the Diagnostics and Proxy tab lets you look at the different Google Calendars you have configured, and is linked to the upper navigator on the Configuration tab.
Check Google Calendar to check the results of your synchronization
Once you have configured your upload to Google Calendar and clicked the "Synchronize" button and checked that the synchronization is complete, log onto the Google Calendar website to make sure your schedule has uploaded the way you want. Then, to synchronize with the iPhone, follow the instructions on the Google website (which change frequently with changes in both Google and the iPhone).
If you have any problems with the schedule on your iPhone, first go to the Google Calendar website to see if the problem is with the connection between InSched and Google, or the connection between Google and your iPhone. In particular, repeating events on InSched, of which a single instance has been deleted or changed in InSched, still show up without the changes on the iPhone. However, when you check Google Calendar, they are shown correctly there, so you know the problem is with the iPhone, not with InSched.
