Fairview Health Services creates and maintains hundreds of print-format patient education materials that are created with Adobe InDesign. The content of these print-oriented materials needed to be re-purposed for use in various third-party and internal on-line patient education repositories accessed by a variety of doctors and health systems. Each of these repositories is run by a different company and has different data-import requirements and display capabilities. Some require HTML input, some XML input. Some require the XML to be structured one way, some require the XML to be structured a different way.

To make things even more challenging, many of the documents are translated into nine different languages. Moreover, the content must be indexed and classified by medical code, of which there were seven different “standards” that must to be accommodated.

I consulted with designers, production artists, managers, patient education specialists, and technical staff at Fairview to develop a series of scripts to automate the content-extraction process. The end result was a custom metadata panel, a series of scripts, and comprehensive documentation that enables Fairview staff to add organization and classification metadata to InDesign documents and then export the content to the required PDF, HTML, and XML formats.

Here are the basics of the workflow:

  1. The project began with a giant spreadsheet listing all the InDesign file names on separate rows. Then, Fairview staff and medical coding experts filled in the columns of the spreadsheet with metadata about each file, such as key words, ICD-10 CM codes, document type, gender, age group, topic, language, etc.

  2. I enlisted the help of the brilliant Kris Coppieters at Rorohiko to develop a script to extract the information from this spreadsheet and inject the metadata into the proper InDesign files en masse.

  3. I also contracted with the talented folks at Acts Media to write a routine that combed through the massive coded spreadsheet and expanded ranges of ICD-10 codes into all the specific codes within the range, consulting a massive ICD-10 code table to do so.

  4. Next, I created a custom XMP Metadata panel for InDesign so that Fairview staff could maintain, edit, and add file-related metadata by choosing File > File Info in InDesign.

  1. I developed a series of scripts and comprehensive documentation to help InDesign production artists “normalize” the layout of InDesign content and get it prepared for export to HTML and XML output. These scripts assist with tasks such as verifying that the correct paragraph and character styles are applied to text, fixing bad line breaks, anchoring graphics to text, mapping styles to html tags, and applying alt text to images.
  1. The most complex part of the project was the creation of an InDesign script that provides single-click export of the open InDesign file to PDF, HTML, and XML format. If the file is layered with one language per layer, separate files are exported for each language.

The script performs the export, names the files, puts the files in the correct location, and then performs lots of post-processing to produce HTML and XML files in the unique formats required by the various systems that will ingest the HTML and XML files. For example, all the metadata that is entered in the custom XMP Metadata panel is added to the HTML and XML headers. Special characters are encoded properly, copyright information is added, and much more.

The end result? Now authors, subject matter experts, and production artists can collaborate on creating and maintaining a library of InDesign patient education materials that can be output to print, PDF, HTML, and XML for use in a variety of patient education repositories.

A single page of an InDesign layout to export to PDF, HTML, and XML.
A portion of the HTML output from the InDesign file viewed in the browser for proofing.
A section of the HTML code output from InDesign. Note the metadata in the header section.
A section of the XML code output from InDesign.