Thursday, August 25, 2011

Supporting TextExpander in My Application


With version 2.0, the Massage Therapist Notebook now supports TextExpander snippets. A great deal of information about a session can be recorded just by dragging stones onto various parts of the body images. However, notes are handy as well. Because of the way that the iPad deals with special characters (like colons and semi colons that are hidden on an auxiliary keyboard) we realized that entering a lot of notes was going to be a big problem. Additionally, when customers want to create an expansive narrative either for themselves or for an insurance claim, the MTN would stand in the way rather than being helpful.

For the first version, we added a single text macro of .SOAP. that will create the text of
in any note field. This boilerplate text is to help those practitioners who use the SOAP method to document their sessions. However, the CARE method is also in use and in other languages, neither of these is used widely. We realized that we needed a way for anyone to be able to create a series of sentences or paragraphs that they could call up from the application.

That just happens to be the primary function of the TextExpander application.

Setting up TextExpander:
On a desktop computer it is simple to have one program that makes itself available to all other programs. However, on an iOS device (like an iPad) this is much more difficult. The application providing the service has to be written in a particular way and any application that wants to consume the service must also be written in a particular way. Fortunately, to set up TextExpander for sharing a customer just needs to change one setting in TextExpander. They need to turn "Share Snippets" on.
The Massage Therapist Notebook is always checking to see if TextExpander is running. If Text Expander is running then the Massage Therapist Notebook lets it monitor all of the notes as they are typed. When a macro snippet is typed then TextExpander will immediately replace it and even provide a nice whooshing sound to let you know a change has been made (it would be nice if autocorrect did something like this).

Making a snippet:
To make a snippet in TextExpander, we just need to decide on a character sequence we will type and the words that will replace the sequence. Here we have made a snippet in TextExpander to describe neck injuries. For longer paragraphs and phrases, TextExpander supports copying and pasting from other locations. For those people who have the desktop version snippets can be created and shared even faster. If you create a lot of snippets, it would be wise to create a naming convention so that you don't accidentally type one when you don't mean to and so that you can remember all of them.

Adding the snippet to a Note:
Type the Macro
For our example snippet of nkinj1 we add the snippet just by typing. As soon as we type the last character of the macro name (as soon as we type the 1) we hear the whooshing and the new phrase appears. Woosh!
Using the SDK:
Following along with the sample application in the SDK that Smile! provides couldn't have been easier. We simply added a few calls to our delegates for the note taking screens. We were even able to preserve our little .SOAP. macro because as soon as TextExpander does its thing it hands control right back to our program. We are so excited about this integration. We hope our customers find it as valuable as we think they will.

No comments:

Post a Comment