Convert your FHIR JSON -> XML and back here. The CDA Book is sometimes listed for Kindle here and it is also SHIPPING from Amazon! See here for Errata.

Thursday, August 26, 2010

A Change of Mood

I get a little tired of my complaining on Monday and Tuesday and so today's post is about the topic of mood in HL7 Version 3.  The HL7 moodCode attribute is one of those topics that always seems to confuse people because the name doesn't seem to make any sense.  And it's true, it doesn't until you understand which definition of mood you need to work with.  This is the definition you want to work with.
mood (plural moods)
  1. (grammar) A verb form that depends on how its containing clause relates to the speaker’s or writer’s wish, intent, or assertion about reality.
Now, in a former life I used to write linguistic software.  I helped develop applications for spelling correction, grammar and thesaurus applications that are still in use today in Microsoft Word, among others.  So I should know a little something about mood.  But while that life led to this one, I found that I needed a refresher on the topic. A more detailed explanation of mood as used in linguistics can be found on wikipedia.

Since just about every clinical statement (sentence) you can make in HL7 version 3 starts with a verb (an Act), you have to have different ways to inflect these verbs.  Inflection changes mood and tense, and that's what moodCode is all about.  And just as in linguistics, where mood and tense are conflated, they are also conflated in HL7 Version 3.

Their are something like 18 moods defined in the HL7 moodCode vocabulary (there were only 14 when CDA Release 2 was created).  Moods fall into two main categories:  The Act completion track represents transitions from definition (e.g., a clinical guideline for care), to intent (a plan of care), to event (a sequence of care events that have taken place).  The predicate track deals with more nebulous moods.

So, looking at a few mood codes, what would be the appropriate linguistic mood to associate with each one? Here are my best guesses.

Event (EVN) - The actual occurence of an event. Indicative.
Request or Order (RQO) - A request or order to perform an act [in the future]. Precative or Imperative.

Definition (DEF) - a definition of an act that can occur. Deontic
Intent (INT) - The intent for an act to occur [in the future]. [Future tense]
Proposal (PRP) - A proposal to perform an act [in the future].
Promise (PRMS) - The promise to perform an act [in the future]. Commissive

Event Criteria (EVN.CRT) - An event that must occur or criteria that must be applicable before another event can happen. Conditional  [but  note that HL7 the inflection occurs on the verb in the protasis, so perhaps it is Subjective]
Expectation (EXPEC) - The expectation that something may occur in the future. Potential seems to be the best choice.
Goal (GOL) - The hope, expectation or desire that something does occur in the future. Optative
Risk (RSK) - The hope, expectation or desire that something DOES NOT occur in the future.  Optative 

I'm glad HL7 chose to use something humans can understand in the vocabulary for moodCode, because this little experiment just proved that I've forgotten a ton about mood, and never learned quite a bit more.

Of course, just when you thought you understood it all, things change.  It turns out the criteria moods are defective, and so the CRT and EVN.CRT mood code was recently deprecated.  I'll save the discussion of that for another post.

I had thought this would be book fodder if I had been able to understand it better. [Pluperfect subjunctive?].