Thursday, December 3, 2015

Why should HealthIT Workflow integration be Different?

In a traditional (read "non-Healthcare" related) workflow scenario:

  1. A workflow produces a good or service through the collaboration of different parties.
  2. The good or service is developed in various stages with through various processes coordinated between parties, with various checkpoints to ensure quality.
  3. Along the way, various information, services or goods are consumed as inputs, or produced as outputs, eventually generating the final good or service that is the goal of the workflow.
Under the above description, lab tests, imaging or other diagnostic studies, screenings, treatments, medication orders, or referrals are all activities involving workflow.  The good or service produced by a diagnostic study is information about a patient used in the diagnosis of disease.  Treatment provides a service that will either cure, or at least alleviate the symptoms of illness.  So really, there is no difference here.

The flow in workflow is of outputs to inputs between tasks being executed by different participants. The fundamental unit of work is a task.  This is reflected in many different models of workflow in the various standards that I discussed yesterday.  Tasks have a fundamental state diagram that is well described in OASIS Human Task.  Essentially, they are first created, then ready to be claimed, then reserved (claimed), and finally in progress and completed (or failed).  Some special states exist to account for non-recoverable errors (recoverable errors eventually complete or fail), premature exit (e.g., cancellation of an order), or on becoming obsolete (it is no longer necessary to treat a patient whose is no longer ill).  Tasks can also be in a special suspended (held) substate from which they return once they are unsuspended (e.g., putting a medication on hold while surgery is being performed).  It's conceivable that a task can go from any of the previously mentioned states to any other (Interface engine administrators often "requeue" messages that "unrecoverably" failed after patching the code).

Tasks have potential performers, those who could perform the task, an actual performer, a creator, and an administrator who can change it (often the creator and administrator are the same party).  Many of these roles can be delegated or reassigned (forwarded).

Tasks have inputs and outputs. These are essentially named slots to which you can attach things (much like Parameters used with FHIR operations).

There are a couple of other attributes of task that might be useful: Priority, type (of task), type of performer (used to qualify potential owners).

Here's my first crack at what Task looks like in FHIR.

<Task xmlns="http://hl7.org/fhir"> 
 <identifier><!-- 0..1 Identifier Task Instance Identifier --></identifier>
 <type><!-- 0..1 CodeableConcept Task Type --></type>
 <performerType><!-- 0..* Coding Task Performer Type --></performerType>
 <priority><!-- 0..1 Coding Task Priority --></priority>
 <status><!-- 1..1 Coding Task Status --></status>
 <subject><!-- 0..1 Reference(Any) Task Subject --></subject>
 <definition value="[uri]"/><!-- 0..1 Task Definition -->
 <created value="[dateTime]"/><!-- ?? 1..1 Task Creation Date -->
 <lastModified value="[dateTime]"/><!-- ?? 1..1 Task Last Modified Date -->
 <owner><!-- 0..1 Reference(Device|Organization|Patient|Practitioner|RelatedPerson) Task Owner -->
 </owner>
 <creator><!-- 1..1 Reference(Device|Organization|Patient|Practitioner|RelatedPerson) Task Creator -->
 </creator>
 <manager><!-- 0..* Reference(Device|Organization|Patient|Practitioner|RelatedPerson) Task Manager -->
 </manager>
 <input>  <!-- 0..* Task Input -->
  <name value="[string]"/><!-- 0..1 Input Name -->
  <value[x]><!-- ?? 0..1 * Input Value --></value[x]>
 </input>
 <output>  <!-- 0..* Task Output -->
  <name value="[string]"/><!-- 0..1 Output Name -->
  <value[x]><!-- ?? 0..1 * Output Value --></value[x]>
 </output>
</Task>
As a resource this is very well aligned with HumanTask and XDW, and would integrate fairly well in a workflow system defined using BPMN and/or orchestrated or choreographed using other. It doesn't have any specific requirements about "how" the task is managed, but enabled it to be managed and tracked.

Task Resources like this MAY be aggregated into a workflow instance resource, which allows a collection of related tasks associated with a given workflow to be managed together.  My first crack at that resource looks something like this:

<Workflow xmlns="http://hl7.org/fhir"> 
 <identifier><!-- 0..1 Identifier Workflow Instance Identifier --></identifier>
 <name value="[string]"/><!-- 1..1 Workflow Name -->
 <description value="[string]"/><!-- 0..1 Workflow Description -->
 <subject><!-- 0..1 Reference(Any) Workflow Subject --></subject>
 <definition value="[uri]"/><!-- 0..1 Workflow Definition -->
 <created value="[dateTime]"/><!-- 1..1 Creation Date -->
 <author><!-- 1..1 Reference(Device|Organization|Patient|Practitioner|
   RelatedPerson) Workflow Author --></author>
 <tasks><!-- 0..* Reference(Task) Workflow Tasks --></tasks>
 <status><!-- 1..1 Coding Workflow Status --></status>
 <failureReason><!-- ?? 0..* CodeableConcept Failure Reason --></failureReason>
</Workflow>
Now, if you want to put these two together, you can manage just about any workflow someone wants to throw at you.  Do medication orders for certain substances need to be reviewed before being filled?  That's a task that is part of the medication ordering workflow.  Does a positive result need to be confirmed by the lab supervisor?  That's a task that  is part of the laboratory testing workflow. These tasks can be associated with their subjects through the subject reference, without ever interfering with the interpretation of the subject resource.  If you want to dig into the workflow associated with an order, you could query for workflow.subject = resource, or task.subject = resource, and find the workflows still open, or the tasks as yet uncompleted.

This approach simplifies integration of clinical workflows with clinical data without making any assumptions about the workflows that go along with it.  And best of all, almost none of it is specific to healthcare.  Everything I've described above comes from existing IT standards and systems, but can be readily applied to healthcare.  

Wednesday, December 2, 2015

A Brief History of non- HealthIT Workflow Standards

I first started playing with workflows standards in the late 90's, before I ever got involved in Healthcare.  Digital publication was (and still is) all the rage, but back then it was only for high-end users, and there was a good deal of workflow involved that crossed multiple organizations.  It was a critical concern of many customers of the XML database product I worked on.

If you wanted to publish an article, you might need some photos or graphics to go with it.  You needed to acquire those, negotiate rights, develop and approve content, layout, et cetera, before the article ever went live.  You may even have needed some time to covert the article from a proprietary format to a standard format using XML.

Back then there were numerous workflow engines (I recall one from Toshiba that I investigated fairly deeply), and also some standards.  The Workflow Management Coalition (WfMC) had been around for a bit (about 5 years) and had some workflow APIs it had evolved.  A number of workflow engines even supported those APIs.  It was like a DOM for workflow, except that back then we had to interface to those APIs using CORBA, because REST hadn't been invented yet.  There were also a number of other workflow products, including a family of products described as group-ware, the most famous of those had a darling little name that we morphed into an epithet describing its most egregious failure, we called it Bloats [Lotus Notes].

We are now looking into workflow in FHIR, but I think at the moment only superficially, assuming that there are some common structures and capabilities built into (mostly) ordering and fulfillment processes.  Here's where I'd advise taking a step back from "Healthcare IT", and look at what is already available in existing IT. But to do that, we probably need a brief history lesson on what already exists, and its purpose as it relates to workflow.

WfMC created XPDL and Wf-XML, but these weren't even extant at the time I was looking at their efforts.  Instead, what I had been looking at was the Workflow Client Application (Interface 2) Application Programming Interface, otherwise known as WAPI.  This specification, circa 1996 describes the "things a client needs to do" to integrate with a workflow engine.  We want to integrate workflows in healthcare, not integrate with a workflow engine, but this is a pretty good description of some of the functional capabilities we need to support.

OASIS formed the BPEL workgroup sometime in 2003, to develop Business Process Execution Language.  Object Management Group (OMG) developed BPMN, and eventually BPMN 2.0 to be the format for Business Process Modelling Notation.  All of this stuff is fine, but the reality is that it doesn't meet the needs for workflow implementers very well.  XPDL, BPEL and BPMN make it possible to describe workflows and execute workflows, but they don't really help much in enabling the capture of essential data for workflow management.  There's a whole passel of discussion in the workflow community on Choreography vs. Orchestration, but the reality is that it doesn't matter to us, both describe execution, which is a step beyond where we want to be in FHIR at first.

OASIS Human Task does support some of the information capture needs.  If you look at Human Task and many of the operations it supports, you'll see a great deal of overlap with WAPI described above.  Human Task defines a WSDL for its operations; an API or set of functionality that systems supporting workflow need.  Where Human Task succeeds is in describing the data that is needed to manage a workflow.  Where it mostly fails is in the heavyweight SOAP/WSDL based approach used to manage that workflow.

Human Task became the basis for IHE's Cross Enterprise Document Workflow (XDW) [now in Final Text form!]  IHE's XDW takes that description in Human Task and turns it into the closest thing to a workflow resource that we have today: an XML Document that becomes a repository for a specific workflow instances state. Updating that document updates the state of the workflow. The biggest challenge that XDW implementers have is in the grain size.  It's off by one.  What they want to update is the task in a workflow, not the entire workflow.

So, take a look at the various references for workflow here.  Next time I'll explain what I think we need to do with this in FHIR, and how it will enable healthcare workflows in Healthcare IT.

   Keith



Tuesday, December 1, 2015

If I were designing the perfect FHIR Profile Authoring Tool

First of all, when it installed, I'd have it ask a few questions about who I was, my name, e-mail, et cetera. Then I'd have it ask some questions about the organizations I was affiliated with, possibly selecting some of them (e.g. HL7, IHE, etc) from a pick list, or adding others.

When the application starts, I'm going to want to do one of three things: Start where I left off from my last project, or from where I left off on a recent project, or start a new project.  When first loaded, I'm going to have to create a project.

That project is going to be one of five things: Creating an IG, a value set, a profile, an operation or an extension.  That project is going to be created on behalf of one of my organizational affiliations, which will have some preset rules for how the project structure works (or maybe I want to apply my own personal rules -- because I might be setting them for the organization).  Those rules affect where in the project certain files are stored, and in what sort of repository they are stored (e.g., CVS, SVN, a file system, a website or FHIR Server, et cetera).  Having some useful presets would be good.  For example, for GAO, I set up a particular file system structure for the contents of the IG, and the files were checked into SVN.  Files are named in a certain way based on the kind of resource, its id and a few other bits of trivia perhaps.  You could come up with a couple of different schemes.

An IG would start off with one of a few sample IG starter page sets, adhering to a particular content design.  I could swap them out for the most part without fear that my customized content would be messed up.  Similarly for a profile, value set, operation or extension would also allow for some preset designs and customized content files.

When creating an IG, a wizard would guide me through certain selections, "style", kinds of content to include (profiles, value sets, extensions, operations), et cetera.  It would take me through the process of identifying actors (an IHE term mostly closely associated with Application Role in HL7 Version 3), to which a conformance statement might apply.  It would have me define the conformance statement for each actor, including some optional features that might implemented (right now, FHIR conformance resources don't really have support for options though).

When creating a profile in an IG, I'd specify the resource and possibly a role being played.  The tool would create the profile name based on the IG name/code, and the resource name and role.  Thus, a profile for a patient resource in the Guideline Accountable Ordering IG (GAO) would be named gao-patient, and one for a ordering provider might be gao-ordering-practitioner (the form defaulting to igcode[-role-name]-resourcename).

After having named a profile, I'd basically be asked to check of those properties that I wanted to profile, and then quickly modify their values (cardinality, must support, etc).  Where an existing value set was present, I'd be asked if I wanted to restrict or extend it where permitted.  On creating a new value set, I'd be given simple ways to select codes from existing value sets that I'd used previously or which already exist).  On creating an operation, I'd be asked to name the parameters, and further specify their details.  As things went on, I'd discover the need to create a new profile, and could add that profile to a resource elsewhere, and the tool would remember that I referenced an as yet unknown profile, and would put it on my to-do list to create.

Building the IG would be a two stage process.  The first stage would take the information I supplied in separate component files, and put it together into FHIR resources sufficient to be the guide.  The second stage would be to compile those FHIR resources into the content we see on the FHIR IG site today, essentially running the FHIR IG build part of the process over those resources.  The tool would also verify that I followed a number of best practices... that I had validating examples for each profiled resource, that I had examples of input and output parameters, and that I had conformance statements that linked to those profiles, and that no profile or valueset or operation was not linked back to something in the IG (ever create a set of constraints that weren't ever referenced any where?  It's been done before.  I'll bet you can't find the CCD template that was never referenced by any other CCD template, and so hardly ever used).

Anyway, that's my wish list.  Get crackin' on it guys, would you.

   Keith


The Tinker Tax

This weekend I replaced the leaky radiator in my truck.  I know from past experience that this is about a half day job.  A shop would probably charge me 2-3 hours of labor for it.  It took me two days.  I saved about $150 on the labor, but in the process, broke my transmission fluid line, and did so in a way that I couldn't fix it myself.  It cost me about $400 to have that repaired professionally (because that's not a job I would take on not having the tools, and having already screwed it up once). The end result is that I paid about $400 to save $150, so a $250 educational experience.

A friend of mine (Gila Pyke) calls that the tinker tax.  It's a useful measure of the value of a learning experience. In this case, I actually did learn how to do something, just a bit too late for it to pay off THIS time. Next time I'll know better and be able to save myself the hardship of having to take my broken repair job to a pro to fix the fix.

How does this apply to Health IT?  Well, the first time you do something you've never done before, you need to be ready to pay the tinker tax.  The tinker tax isn't always measured in dollars. Sometimes it is measured in time.  Either way, you should budget for it.  I knew when I undertook my radiator repair job that if I failed I could afford to take it somewhere else, and quite honestly, the additional work that was done wasn't wasted (I didn't badly break something that wouldn't have needed repair soon anyway).  But often, Health IT projects are undertaken without any cushion, without any contingency, and with the assumption that everything will work the first time.

Really?  When's the last time that happened for you in any other undertaking that you did for the first time?  Be prepared to pay the tinker tax.

Monday, November 30, 2015

Just in time for Christmas, an Armor Class upgrade

My first motorcycle jacket was made of ballistic cloth and padded, with plastic plates beneath.  It worked just fine, looked OK but not great, and protected me for the one accident I ever had, but on hitting the pavement the jacket ripped, and I've worn it rarely since.  My second was simple black classic leather.  It looked great but has a couple of flaws for winter riding: The zippers are wicked difficult to open with gloves on, and getting it all the way closed in for cold riding was difficult, and uncomfortable.

Recently I was offered a jacket to try out a review, and since I needed I new jacket, I chose this one to check out from Motorcycle House.









A couple of things attracted me to this jacket:
  • The pockets. 
    For some reason, I like having lots of pockets.  This jacket has a ton of pockets. The outer ones fit my riding gloves (something I couldn't say about the classic leather jacket I was using).  The inner ones are accessible even with the liner installed.  And the zippers can all be operated with gloves on.


  • The reflective stripes.
    My bike is black.  My jeans are black.  My chaps are black.  Riding in the dark means that pretty much I'm an otherwise invisible headlight or taillight with a black jacket on. The built in reflective trim makes it possible to see me, which makes me feel a bit safer.
  • It looks good.
Two things I discovered I like about this jacket after I tried it out:

  • Comfort. The jacket fits me well, and is comfortable around the neck when I close it up.  And it's warm in the cold.  I had planned to write this review sooner, but it's kinda hard to write a review about a jacket that you are going to use for cold weather riding when you haven't had any cold weather to ride in.  What cold weather we've had recently has also overlapped with travel. Finally we got some today, so I took a half-hour for a good ride over lunch.  It fits my final criteria, it's warm.
  • It's also armor.  Padded leather is about AC 8 on a DnD scale, but I'd give this jacket a +1 for ease of movement in it.  It has armor at the back, shoulders and elbows, but I didn't even notice it until I hung the jacket up.  You simply don't feel it.
While I was given the jacket in exchange for this review, the price is also pretty good, at $99.99. And given that today is Cyber Monday, you can also get it on sale.

I don't usually do reviews except for books, and this is my first review for something that most of my usual audience might not appreciate.  I'm probably not going to make a habit of it, but then again, I won't rule it out completely either.  After all, what good is to have a blog if you don't try something different every now and then.



Monday, November 23, 2015

Passion is the Midi-clorian particle for HealthIT Jedi


What does it take to become a Health IT Jedi?  Do you have to have some special skill?  Is there some genetically contributed factor, some Health IT midi-chlorian particle that you need large quantities of to really succeed?

I think not.  The critical factors are, I think, in this order:

  1. Passion
  2. Opportunity
  3. Persistence

Passion

If you have a passion for your craft, you will have an appetite, a curiosity, perhaps even a voraciousness to learn more about it. The more you learn, the more you can do.  The more you can do, the more others will recognize you for your ability. At some point, you too will recognize it (often a long time after others have).

Opportunity

Passion unspent leads to frustration.  It needs an outlet, a doorway, an escape, in order to be realized fully.  Opportunity is that means of egress.  Opportunities come in thousands of ways.  A new software component needs to be developed, will you invent it fully yourself, or learn from the work of others and spend your creative energy adding new value? A group of people need help, will you pitch in and make some time to help them, and at the same time learn more, or will you sit by the wayside and wait for them to do the heavy lifting?  When you don't understand, will you ask the question that may lead to better understanding?  Or will you be silent and hope that someday you will get it?  

What if you have no opportunities?  Then you aren't looking hard enough.  Be creative.  Let that frustration inspire you.  Take a chance.  I guarantee that if you do look closely, you will find a way, which leads to the final attribute.

Persistence

Practice makes perfect.  Doing leads to learning.  I often tell my students that the best thing that they can do for themselves after taking a class is to DO something with it, and the best time to take a class is just before you need to use the material it teaches, or perhaps just a little bit later than that (so that you learn what you need to learn).  Your first opportunity will lead to learning, but probably not stellar success. Along the way you WILL fail.  If you don't or haven't, you aren't trying hard enough.  
Passion helps here, because it gives you the drive to try again ... and again and again and again.

I have failed.  I have found opportunities -- sometimes even the slimmest of chances.  I care deeply about what I do.  As a result, I have one of the most rewarding of careers I could have ever imagined. 

You could too.  It starts with passion -- the midi-clorian particle for a Health IT Jedi.

   -- Keith

P.S. Thanks to Rene Spronk, and the Furore FHIR DevDays team for the great photo above.

Friday, November 20, 2015

Just Proud

What is it about age that makes us proud of our youth?  Over the last week I've had several opportunities to be proud of the accomplishment of others.

I'll start first with my youngest daughter, who overcame several setbacks this summer to brave her way through 20+ hours a week for several months of practice and rehearsal and 2-3 competitions each weekend to finally win (along with her classmates) the title of USBANDS National marching band champions.  That's just a proud dad talking.  To the left is a video of the band arriving home from their victory.


Then there's the team of students I taught Interoperability and Standards to this summer; whose class project sailed through IHE Patient Care Coordination for implementation in the 2016 - 2017 season. That's just a proud TA talking.

Then there's the team of students (see image at the right) from Heilbronn University who won the FHIR DevDays student competition.  I have no reason to be proud of them except that they did something cool with FHIR. That's just a proud co-developer talking.

Then there's the team of OHSU Informatics students who won the AMIA student competition, giving OHSU two wins in two years.  That's just a proud alum talking.

Then there's the four high school students who presented at AMIA.  I have no excuse to be proud of them, other than I see something in them that maybe I had at their age, or perhaps just wished I had at that age.   I guess I'm just proud to see others succeed.