Creating a Structured Product Labeling Editor

The challenge: use InfoPath to create an editor for the Structured Product Labeling (SPL) subset of the HL7 Clinical Document Architecture (CDA) schema.

I've done quite a bit of document-centric work, and my philosophy has always been to design an XML schema first, because from an xsd, all other things can flow:

  • InfoPath can generate forms from schema
  • BizTalk can generate maps from schema
  • There are EDI tools to generate implementation guides from schema
  • XMLSpy can generate databases and code from schema

So when I was told there was an SPL schema to work from, I figured this was a one-day job, tops.

I was wrong.

Here's what a drug label usually looks like in the physical form. Now, one of the great features of InfoPath is that you can just point it at an xml schema and get a form out of it. However, doing this with the SPL Schema (this isn't complete - the included files aren't there; see the SPL schema link for the whole schema) yields a pretty unsatisfying result.

The problem is that the schema has a whole lot of metadata, and what is there for content is just markup, like HTML (imagine trying to autogenerate a form from the schema for xhtml - it doesn't reflect how people really use the schema).

This is, of course, in retrospect. Going in, I couldn't get the hang of why the form wasn't getting me where I needed to go. It wasn't until I looked at the sample SPL XML - that's when the markup concept clicked and I started looking at the SPL schema as a destination instead of a source.

Another consideration is that the SPL Schema serves the label, not the drug or the company. What this means is that the information in the schema is geared towards describing the medication, but there may be additional information regarding the drug, the label editing and approval process, or other considerations that the pharmaceutical company wants stored with the label.

These two considerations indicate that the label is best served by using an authoring schema to store the information and generating the SPL XML from that schema. Since InfoPath natively stores its data in XML, the InfoPath schema can serve as an authoring schema nicely. (Alternatively, if the pharma already has a business system in place to store SPL-type information, InfoPath can be designed to interact with that system)

So - next week we'll lay out an InfoPath form to serve the label, designed from a blank form to save directly to XML.