Monday, April 23, 2012

Common Message Element Types

Common Message Element Types (CMETs) are used in many HL7 messages. They encapsulate common "chunks" of messages so that they can be reused. It can be useful to know which message element types are used in the message so that you understand what all the "chunks" are and whether they apply to the transport wrapper, the control act wrapper or the payload. But how do you know which CMETs are used in a message? Let's say that you are working with all the volumes of the pan-Canadian MR2009 standard. You could just open a schema (*.XSD) and look at the include statements. But the problem is that you don't get to see what the included XSDs include, so you have to open those, and then open the their includes and so on. This is time-consuming, awkward and confusing. If you have access to an XML development environment such as Altova XMLSpy or Oxygen, you can open up a schema, and all the child schemas are opened for you. Some of these child schemas will be CMETs. Both tools have a kind of structure-browser that allows you to see what's included and see where a CMET is referenced. So you might start with a CMET such as COCT_MT090502CA (R_AssignedOrganization identified-confirmable) and see all the interactions where it is used. One of the problems with this approach though is that you don't know whether the CMET has been used in the transport, control act or payload portion of the message. To find out which CMETs are used in payloads, you need to look at the XML files provided as part of the Visio models. These XML files include the attribute "CMETid" and if you search for that attribute you can find out which CMETs are used in the payload. You are still left with the issue of checking whether a referenced CMET includes other CMETs or not. You should also be aware that some models include several CMETs.

No comments: