Tuesday, June 9, 2009
Null flavours
So if it's Required, you don't have to do anything.
Monday, June 8, 2009
Canada's latest maintenance release V02R04.01
- MIF 1 and MIF 2 files have been published for Volume 1 (Infrastructure)
- Voc.xsd has been republished
- Schemas missing from V02R04.0 were included in Vol 3 (Shared interactions)
- Client Registry MIF and schemas for PRPA_MT101106CA were regenerated.
- Provider Registry MIF 2 – regenerated all MIF2 and schemas.
- Location registry (vol 6) – regenerated all MIF 2 & Schema interaction files.
- SHR (Vol 7) – REPC_MT000005CA regenerated (duplicated “SubjectOf1” problems); REPC_IN000001CA changes; MIF 2 & schemas regenerated for these.
- Pharmacy (Vol 8) – All MIF 2 & schemas regenerated.
- Lab (Vol 9) – Only MIF 2 regenerated. Presumably MIF 1 files are OK.
- Claims (Vol 12) – MIF 2 interaction files regenerated.
- Record access (Vol 13) – all MIF 2 regenerated. Schemas for COMT_MT400001CA regenerated.
Message exchange patterns
- One-Way MEP
Send Message, Immediate Response:
- Request-Response MEP
- Response can be Application Ack, Application Response (Query)
Send Message, Deferred Response
- Two One-Way MEP
Send Message with both Immediate and Deferred Responses
- One Request-Response MEP and one One-Way MEP between receiver and sender
Rene Spronk, January 2008 "HL7 Implementation Mechanics"
Friday, June 5, 2009
Lab Microbiology/generic/Pathology Model rationale.
Just to give a little background: The reason we developed the Micro and AP patterns (which are derivations of the Generic Model) was primarily so we could more tightly bind vocabulary to the business purpose.
During the development process, we created a discussion paper to determine the most appropriate approach and this is where we landed. In addition, we also have documentation to identify what the impact would be if an implementer was to attempt to use the Generic Result pattern to send Micro and/or AP results. I will dig these up as I think these are critical to any decisions going forward regarding a potential 're-evalution' of the original approach for AP.
June 5th 2009
Query parameters
- This is true
2) When a query parameter allows a list (e.g. ObservationCode allows 0..100) this is an "OR". (e.g. query for result records where patient ID=12345 AND collection date is 01Jan-15Jan AND (observationCode=hemoglobin OR observationCode=WBC OR observationCode=PT)
- This is true
Thursday, June 4, 2009
WSDLs for HL7 v3 messages
Writes Lloyd in SCWG#6, May 25th, 2009.
Wednesday, May 20, 2009
xsi:nil="true"
The ITS 1.0 only mentions that xsi:nil is allowed.
From what I've browsed on various lists, wiki, Google etc. I've come to the following picture: if some_element is declared with nillable="true" in it's schema, the following is allowed:
and is equivalent to:
and to:
is that correct?
And if minOccurs="0", are the three above equivalent to absence of some_element in the instance?
Finally, is
Regards,
Marc
Grahame Grieve:
| Agree with Charlie except there is no need to use xsi:nil on the
| datatypes And it should not be done
I agree it would have been better if the form
Cheers,
Marc
From the HL7 ITS lists 20th May 2009.
Friday, April 17, 2009
voc.xsd
Tuesday, March 10, 2009
Lloyd on Schematron and validation
Hi Adam,
The philosophy the MIF has taken thus far is as follows:
- If you can put a rule in the schema, do that. Schema rules can be enforced by editors on the fly, used for type-ahead, used for code-generation, etc. They're also easier to write and to get right.
- If you can't put a rule in schema, put it in as an x-path expression in schematron. At least those can be easily invoked on XML instances
- If you can't express the rule in an X-path (e.g. URLs must resolve to a live link, no recursion allowed in code system hierarchies, etc.), then document it as a comment for software developers to implement in code.
We can use schema as well as XSLT/Schematron in the publication validation process, and I can't see any reason why we wouldn't always do both. Even if the schema wasn't customized, we'd still want to do schema validation to confirm that it's legal XHTML. Moving all validation into Schematron is crazy. You can enforce element order, nesting and most type definitions far easier with the schematron language than you can with XPath.
I recognize that "as you type" validation is hard. I'm not sure it's fair to say it's impossible. However, it may be more expensive than is reasonable to implement. That said, we want to get as close to "as you type" validation as we can. Anything that's easy to customize in whatever WYSIWYG XHTML editor that allows us to more closely approximate the rules in the MIF, we should do. For the rest, I agree that a "validate" or "verify" button is reasonable. It would also be good if you couldn't actually close/leave the window or apply changes so long as there's an outstanding validation issue. However, I'm not clear on why the validation process couldn't (or shouldn't) use all three validation approaches - schema, XSLT and code.
Schema validation can be performed in an Ant script. Changing the schema isn't an issue. MIF schemas change regularly. Though the markup schema is unlikely to change much if at all (either the schema, schematron or programatic rules). I recognize that when schemas change, this may mean changing software. However, when anything in the MIF changes, it may mean changing software. How the rules happen to be encoded shouldn't impact whether software change is necessary or desirable. I'll admit that w3c schema validation messages aren't as human readable as schematron rules, but that's a small price to pay for direct support in XML validation tools, code generation, type-ahead, etc. And schema validation can be (and currently is) applied in batch just like XSLT validation.
I'm not arguing against external validation. We currently have, and will continue to use, external validation during the publication process for various reasons including those you mentioned (external references that can't be known at design time, custom tweaking by users outside of the UI, tooling bugs, changing rules, etc.). However, we also want as much validation as humanly possible to be done at design time. Every error that's caught within the authoring process is an error we don't have to deal with in the 5 days between final content submission and ballot opening.
On some of your other points:
- We specify maximum lengths on everything so that from a user-interface, data storage and software design perspective, we know what may be enountered and can write code accordingly.
- Id references are for things like referring to tables, figures, graphics, etc. from elsewhere in the fragment. And our source materials don't currently use GUIDs. Seeing as some of the source materials are hand-authored, they shouldn't be required to use GUIDs. And because multiple XHTML fragments from multiple sources may be combined in a publication instance, we can only ensure uniqueness within the fragment, not a whole document.
- In the cut and paste scenario, the "accept what they pasted and report it in the error report" is definitely the least desirable of the options. We don't want users submitting invalid content. We don't have the bandwidth to fix content on their behalf. If they decide to use a different authoring tool and copy and paste, then they have the responsibility for getting that content clean. It is not the responsibility of HL7 HQ or the publishing process. In the event that bad content does sneak through, it's just going to get kicked back to the author anyhow. May as well get it right the first time.
Lloyd
March 10th 2009
Wednesday, January 21, 2009
First HL7 International Conference in The Netherlands
HL7 Conference, Noordwijkerhout, The Netherlands Friday, Saturday April 29th, April 30thThe May working group meeting for HL7 International is taking place outside north America for the first time this year. Sierra sent me along to find out what was going on and to contribute to the working groups. It was nice to be back in Britain again after quite a long time away. It was nice to see that everyone was still comfortably miserable, (as evinced by a chap who, as he ran over the foot of the lady sitting next to me in the meeting room, said "I told you twice to move your bag!"); and that Heathrow airport is still a vast maze of confusion both for passengers and for the staff who work there. There may be something about the acronym of the British Airport Authority that is important here. I left one area which had a left arrow for international flights and a right arrow for local flights, only to find that they joined up immediately to go down a flight of steps.... I managed to go through passport control without meaning to - there was really no way to avoid it - but finally edned up at the right place to catch a flight to Amsterdam. Through the departure gate we went, down a long slope and onto - a bus! Yes, having been transported by bus from one terminal to another, we were now treated to a bus trip that took us through the Dickensian underworld of Heathrow airport, finally arriving on the tarmac just behind the jets of an Airbus A320! On the flight were Helen Stevens, Leon Salvail and Bob Grant. We travelled through the airport together, and marvelled Dutch efficiency as the wheelchair Leon borrowed had holders for crutches. When we entered an elevator however, a buzzer went off that told me to leave my cart behind, which I duly did. Then we were puzzled because it went off again. Was it Leon's crutches? No. Step out Bob. It was Bob! Bob had triggered the clever Dutch cart detector. Bob took the stairs. I hope he doesn't take it personally. We rented a car and all four of us drove out to Noordwijkerhout (pronounced roughly Nord-vike-er-out - no spitting allowed). In the conference brochure, the location for the conference in the Netherlands had been rather glibly described as "Amsterdam" when in fact Amsterdam is an hour or so away by car. Saturday, Sunday, April 30th, May 1stOn Saturday evening, after a nap, I went into Amsterdam and observed the Koninginsdag festivities - the Queen's birthday. It was very busy in Amsterdam, but pleasant enough to walk around, stepping over beer cans, and Dutchman full of the contents of the empty cans. Sunday - The Canadians met together in the evening, and discussed which working groups we would attend. Who's who? From left to right: Alexis Grassie, ?, Grant Gillis (HL7 Canada), Bob Grant, Leon Salvail, Louise Brown, ?,?,?,?, Llloyd Mackenzie, Michael van Campen, Garry ? Also, not in the picture, was someone I met at lunch who lives in Charlottetown and works for Kodak. There was a "Connect-a-thon" at the hotel immediately prior to this conference. Monday, 2nd MayAfter attending a first timer's meeting at 7:30am, I went to the main session where there was an overview of the H7 international. Interestingly, there were 19 Canadians at the HL7 Conference, and only 10 from Germany and 12 from France. The vast majority of attendees were Americans. Most of the day was spent in the Control/Query working group. We started off working through some outstanding comments on ballott material. There was a very long discussion on versioning, and I think everyone realised that there was a lot of work to be done to figure out what was to be versioned, and how that versioning should be represented in messages. Tuesday 3rd MayI had breakfast with a group of people, including Rene Spronk, who were discussing why HL7 International is contemplating shipping a snazzy CD with the latest ballot material on it. They came to the conclusion that there was no point in shipping it at all for the content; it was just a stunt, and therefore required eye-catching artwork, to be left on a coffee table somewhere. Control/Query had a joint session with Personnel Management, so we had Leon, Bob, Louise Brown and a few other familiar faces there. The discussion centred around how we should define registries, repositories and master files. It didn't seem crucial to me box all systems in, and of course, Wittgenstein would say, "It's a registry, if you say it is - look at the use." So we decided that there was a spectrum, not three tight boxes, and that the discussion was only valuable as glossary material, having no technical impact. In the second quarter, we talked about web services, and were dealing with some negative comments. There was an outstanding negative comment about the fact that HL7 is apparently favouring proprietary work. In the third quarter, I attended a session by John Quinn, in the Process Improvement Committee, where he gave an overview of the process for ballots, voting, and membership. He discussed the differences between version 2 and version 3, and the motivation for moving to version 3. One thing I learned was that usually only members can vote, but that sometimes there are public votes in which anyone can vote. There was a shorter session in the fourth quarter for the Control/Query Working Group, where the Security SIG came and presented some of their work. They seemed to be tackling some of the same issues as the CQ committee, and so a motion was passed so that the Web services security work in CQ (WS-Security) can be jointly undertaken with the the Security SIG. In the evening, NeoTools had organised a party in Amsterdam, but rather than committing myself to a very late night, I preferred a slightly quieter pursuit of renting a bicycle at the hotel and cycling through the local villages. It was really pleasant to be out on the bike and not have to fight any traffic. Bike paths are everywhere - clearly signed, and often with their own traffic lights. Wednesday 4th MayIn the morning I went to the Modelling and Methodology (M & M) session and listened in as the Security SIG people made another presentation. It seems to me that they have an uphill battle. They are trying to capture enough information to formalised Role Based Access Control (RBAC), but there are issues about the granularity of the information they are capturing, and even then, the information relates only to operations and objects, such as "read Patient Record." What about restrictions on data elements in the objects? They are going to produce something for the next ballot cycle (September), so this is something worth watching. I stayed with M & M for the next session, and chatted to Jane Curry (former Sierran from Edmonton) for a while. This session was all about conformance, and, as usual, the group worked through the finer points of negative material. In the final session, I moved back to Control Query, where version 3 conformance issues were being discussed. We spent a long time discussing how to represent units of measure such as a "puff," which is used in many hospitals. There isn't a convenient way currently to represent this information since it needs to be tied to a particular medicine that is released at a certain rate from a certain container. There was also a discussion on "messy datatypes" : CS (Character Set), Media-Type, and URL Scheme. Tomorrow is Liberation Day, and the Dutch hold a two minute silence in the evening in remembrance of those who have died in the second world war. The HL7 conference took part in this remembrance this year at a reception held at the famous Keukenhof gardens. We had a guided tour of the gardens, which are still beautiful with tulips and a few brave daffodils. Then we had the two minute silence, and dinner. I got talking to quite a few people, including one chap from Quovadx. He told me that "Cloverleaf" is alive again - that is now their product name, after three products were merged. Most of the people that I talk to here are highly skeptical of any straightforward route towards implementation of version 3. Most believe that it will take significant time and work to get two systems to exchange messages reliably! Here's another funny thing: Everyone has a laptop, but almost everyone with a laptop is hammering away on the keyboard and not participating in the discussions! Thursday 5th MayThis morningI abandoned Control Query in favour of a joing session hosted by the EHR Technical Committee, Vocabulary and Patient Care. There was a summary of work done with the US National Library of Medicine to produce an implementation guide and to produce a respository of vocabulary. The vocabulary project is going about its business by collecting as many existing vocabularies as it can and synthesising. There was a fascinating overview of projects and countries that are using HL7 v3. A fairly substantial list was winnowed down to about eight participants, and these participants are just beginning to provide a great deal of information. The foremost project appears to be in Finland, where there is now an extensive network of hospitals and health authorities sharing data with HL7 v3. Also selected was a project in Spokane, Washington, which although fairly local, is apparently making widespread use of version 3. Canada's e-MS project was on the list, but not selected for in depth study. The UK's NHS project was also on the list, but also not selected - apparently because it was too huge and too broad in scope that it would be difficult to target the study the questionnnaire to the right people. The chap in front of me was ignoring all this interesting information and typing up a powerpoint slide entitled "Objective of Cooperability", whatever that is. For the second quarter I dropped in on Leon and Bob in Personnel Management to see how they were doing working through their harmonisation proposals. The tempo seemed a little different than most of the rest of my week at Control Query; each Teechnical Committee is more or less formal it seems. One item under discussion was the addition of OrganizationEntityType. This is currently not in the Reference Information Model (RIM), but no one was sure exactly what was in the RIM. The action item was therefore to clarify this. For the third quarter, I returned to Control Query, where abstract data types were under discussion. The most interesting discussion here was that there is a bit if in-fighting at the international level because the HL7 committee appears to be in a tussle with the European standards organisation about which data types to use. Australia is disappointed about this in fighting, and has threatened to withhold support for either, and develop its own datatype standards unless the Americans and Europeans sort themselves out. The chairman, an American, used a word that I have so far only heard my Indian colleagues use: "updation." Perhaps that word is creeping into general use. On Thursday evening, there was a Facilitators roundtable. All the Technical Committees were present, and they each gave a summary of current issues that needed the attention of the HL7 Board. Most of the issues brought forward resulted in action items for one Technical Committee to converse with another. There was a lot of discussion about overlapping CMETs and Data types, and the issue of versioning was raised again. Lloyd Mackenzie gave a tooling update. There is a Visio tool, a RoseTree tool, and a v3 Generator tool. The last tool is the most interesting. It generates the "Model Interchange Format" which is not, as the name suggests, for exchanging Models. It is actually a representation of everything that HL7 knows about: vocabulary, DMIMs, datatypes, interactions and so on. With the MIF format, one can generate schemas or do other work. MIF is rapidly becoming the representation format for HL7 artifacts. Because there is such a lot of work to be done to create reliable tooling, the HL7 Board has announced a full time paid position for a Tooling Support person. There is another tool in the works, and that is an HL7 MIF to UML translator. So that was about it. Friday Morning, 6th MayAll in all a very successful conference. I had breakfast this morning with the CQ crowd, and we talked more about MIF format. Graham from Australia seems to be the most knowledgeable here. I now have a foundation of face-to-face contact on which to build. When I post to the CQ list, these people will at least know who I am. |
Friday, January 9, 2009
Conformance strengths
1. Not Permitted The property must never appear in an instance. Applications may raise an error if they receive it.
2. Optional The element may be supported by applications if they choose (and they must declare their decision in their conformance statement). If not supported, the element must be ignored if received. I.e. Applications MUST NOT raise an error upon receiving an unsupported optional element.
3. Required The property must be supported by all applications (they are able to capture and/or display it), but won’t necessarily always be present in an instance.
4. Populated The property must be supported (able to be captured and/or displayed) and must always appear in the instance, but may appear with a flavor of null.
The term 'populated' is not an official HL7 conformance strength. It was used in Canada to differentiate
Required 1..n (where a value must be supplied but can contain a flavour of null) from
Required 0..n (where no value need be supplied).
5. Mandatory The property must be supported and must always be present with a non-null value.
In general, if an attribute (or data type property) is not available (i.e. cannot be valued), then the rest of the data type properties (mandatory or not) should not be present. Exceptions to this rule will be documented in affected data types (e.g. CD).
HL7 v3 international datat types spec.
Radov, Nick wrote on the INM HL7 list:
I've been reviewing the V3 data types and am puzzled by the definition of equality for ED http://www.hl7.org/v3ballot/html/infrastructure/datatypes/datatypes.htm#prop-ED.equal. It states that "Two values of type ED are equal if and only if their mediatype and data are equal." The mediaType property is a CS. And CS includes a code property, which is an ST. ST is a specialization of ED, and now we're back where we started. It seems like it would be impossible to implement the ED equality algorithm as specified since that would lead to infinite recursion. Is that intentional or an error in the spec?
The abstract types are included in the XSDs though and this will cause trouble. Not impossible to deal with but not so nice.
Thursday, January 8, 2009
HL7 international batch messages
The Batch material has never gone normative, it is still awaiting the outcome of the Wrappers R2 project/effort.
See http://wiki.hl7.org/index.php?title=Batch_Topic_DSTU_R1_Issues for issues related to the interpretation of Batch that haven't been included in the material yet.
Note that the InM decision that a Batch Wrapper does NOT constitute a transactional grouper (which it was in v2) is a major one. A Batch is a grouper for Transmission purposes only.
If you need a transactional grouper (= something you reject as a whole because one of its component interactions has an error) you'll need to deal with that at the controlAct wrapper, e.g.through nested controlActs (something that isn't available at this point in time).
xsi:nil
Xsi:nil is what allows you to exclude mandatory class attributes and associations when you declare a parent association as “null”. For example, assume you have a patient role with a 1..1 non-mandatory association to playing person which in turn has mandatory attributes name and date of birth.
In schema, you’ll end up with a 1..1 “nillable” element called PlayingPerson which in turn has 1..1 non-nillable elements for name and birthTime. If for some reason the person information is unknown, the instance would send the playingPerson element with an attribute of xsi:nil=”true”, nullFlavor=”UNK”, and no child elements. Normally, that would be a violation of the schema because both name and birthTime have a minimum cardinality of 1. However because xsi:nil is set to true, the schema validator essentially “skips” validating the contents of the nil element, which is what you want.
- Lloyd Mckenzie writes.
All non-mandatory associations should therefore be declared as nillable. (We don’t do the same thing with datatypes because none of the datatype properties have a minimum cardinality of 1 in the schema.)