Model Interchange Format (version 2.2.0)

Not Balloting This Cycle
HL7 V3 MIF, R1
HL7 Version 3 Standard: Model Interchange Format, Release 1
Last Ballot: Informative Ballot 3 - January 2011
Responsible Group Modeling & Methodology Committee
Health Level Seven International
Primary Contributor and Modeling & Methodology co-chair Lloyd McKenzie
lloyd@lmckenzie.com
Gordon Point Informatics
Primary Contributor and Modeling & Methodology co-chair George Beeler, Jr., PhD.
woody@beelers.com
Beeler Consulting LLC
Contributor and Modeling & Methodology co-chair Grahame Grieve
grahame@kestral.com.au
Kestral Computing P/L
Contributor and Vocabulary co-chair W. Ted Klein
ted@tklein.com
Klein Consulting, Inc
Contributor and Vocabulary co-chair Russel Hamm
rhamm@apelon.com
Apelon, Inc.

Content Last Edited: 2010-03-05T11:07:01


View Revision MarksHide Revision Marks

Table of Contents


Preface
    i What is being balloted?
    ii Why ballot now?
    iii Ballot process
    iv Known issues
Background
    1.1 What is the MIF?
    1.2 Who is the MIF for?
    1.3 History
    1.4 MIF, methodology and tooling
    1.5 Relationship to other methodology documents
    1.6 Maintenance
    1.7 Licensing
    1.8 Other meta-modal representations
    1.9 Future
MIF Overview
    2.1 MIF Artifacts
    2.2 Schema Organization
    2.3 MIF validation information
        2.3.1 Schema
        2.3.2 Schematron
        2.3.3 Schema annotations
    2.4 Schema conventions
    2.5 Key concepts
        2.5.1 Packaging and identifiers
        2.5.2 Annotations
    2.6 File extensions
    2.7 XML Namespaces
MIF representations
    3.1 MIF requirements
    3.2 MIF schemas
    3.3 Rendered schemas
    3.4 XML Spy view
    3.5 'Java doc' View
    3.6 UML
Endnotes

This ballot is seeking formal review and approval of HL7's meta-model as documented using the Model Interchange Format (MIF). It is also seeking endorsement of the set of methodology "requirements" the MIF has been constructed to satisfy. It is NOT seeking review or approval of the model interchange format itself. For example, it would be appropriate to comment on whether static model attributes should distinguish cardinality, mandatory and conformance as distinct characteristics. It would not be appropriate to comment on whether the meta-model should be represented in schema, UML or some other syntax, or whether the cardinality characteristics should best be expressed as XML attributes or elements.

While the MIF has existed and been in use for over 7 years, it is being balloted at this time for a number of reasons:

  • There were concerns in some committees about whether the MIF was "official" because it had not yet been subject to ballot.
  • Through its definition of HL7's meta-model, the MIF helps to define HL7's methodology to a level of detail not found in the HDF and therefore it needed to be published in a more consumable form than just raw schemas.
  • As a core part of HL7's methodology, it needed to be subjected to more rigorous approval than intermittent peer reviews by a small subset of HL7 members
  • The OMG has expressed interest in the possibility of adapting some of their technologies (e.g. UML) to better support HL7 requirements. Prior to proceeding with this project, it made sense to gain official endorsement of the "current state" of the MIF

Similar to the HL7 Reference Information Model, the MIF will be following a continuous balloting process. Revisions to the MIF will be submitted to ballot every second year while ongoing maintenance occurs as part of the Tooling MIF approval process. (Refer to the content of the MIF overview below for more about this process.) Between balloting, the most recent version of the MIF will be published on HL7's gForge site: http://gforge.hl7.org/gf/project/mif-schemas.

  • There were concerns in some committees about whether the MIF was "official" because it had not yet been subject to ballot.
  • Through its definition of HL7's meta-model, the MIF helps to define HL7's methodology to a level of detail not found in the HDF and therefore it needed to be published in a more consumable form than just raw schemas.
  • As a core part of HL7's methodology, it needed to be subjected to more rigorous approval than intermittent peer reviews by a small subset of HL7 members
  • The OMG has expressed interest in the possibility of adapting some of their technologies (e.g. UML) to better support HL7 requirements. Prior to proceeding with this project, it made sense to gain official endorsement of the "current state" of the MIF

A large portion of the Schematron validation rules (see MIF validation information) have not been updated to reflect changes to element and path names that have occurred as the MIF has been revised over the years. In addition, a number of rules that could potentially be enforced with Schematron have merely been captured as XML comments rather than being formally expressed or listed at the top as 'programmatic rules'. The resources to go through and correct all of these rule assertions have not been available.

Comments related to the correctness of the rule described in the text portion of the Schematron or in the textual comments are welcome. Comments indicating corrections to the X-Path assertions within the Schematron rules or proposing formal assertions for rules currently expressed as comments are also welcome. Comments merely indicating that the X-Paths are wrong or that the rules in comments should be expressed more formally will simply be responded to with a query as to the availability of the submitter's volunteer time to help correct things . . .


The term MIF (Model Interchange Format) is used to refer to two things:

  • a set of schemas used to define HL7's artifact meta-model and a format for persisting and exchanging HL7 artifacts
  • the various artifact instances published in MIF format

This ballot deals with the former.

The MIF schemas consist of a number of w3c XML Schema files that together define all HL7 v3 artifacts produced by HL7, as well as a few that are not yet produced by HL7. These schemas define public elements for all artifacts that might reasonably be maintained or published independently. They also define complex types, simple types, groups and other schema structures used to fully define the set of content allowed (and required) in HL7 artifacts.

One of the major purposes of the MIF is documentation. Every complex type, element, attribute and other component definition includes descriptive documentation explaining what function that element provides and what type of data it is intended to represent. The documentation also frequently includes the correspondence of the element to the corresponding concept (if any) in the UML meta-model.

In addition to defining the HL7 meta-model, MIF schemas also define the official syntax used by HL7 to publish "computable" [1] representations of HL7 artifacts and is the format recommended for use when exchanging information between HL7 tooling. HL7 makes no commitment about longevity of other formats such as the Access repository used by RoseTree, .HMD files, Visio's .XML files and other formats. However, the organization has committed to maintaining the MIF syntax, including a formal maintenance process for revisions to the MIF format. This process is documented by the Tooling Workgroup and can be found on the HL7 gForge site here

NOTE: MIF is not designed for use in runtime solutions such as terminology services like CTS (Common Terminology Services). Considerations such as performance, scoping, partitioning, etc. have only been taken into account as they impact the HL7 artifact development and publication process. That does not mean that external specifications could not make use of MIF structures if they are found to be appropriate, merely that it is not designed for such use.

The MIF serves two purposes. It documents HL7's version 3 meta-model and therefore forms a part of HL7's methodology documentation. It also defines a formal computational exchange format for HL7 artifacts. The MIF's primary intended audience is internal HL7 constituents, both those who develop tools for HL7 use and for those who are interested in the details of HL7's methodology beyond what is exposed by those tools. However, because the MIF is used as the computational syntax for publishing HL7 artifacts, it may also be of interest to implementers of HL7 standards. Many implementers have chosen to construct applications that load information about HL7 standards from their MIF representation. Because the MIF is more complete than the schema representations, this allows software to take advantage of such information as whether elements are mandatory, vocabulary bindings, etc.

 1.3History

The Model Interchange Format was first developed in 2002 as a replacement for the meta-model found in MDF (Message Development Framework) 99. The effort was undertaken for several reasons:

  • The actual metadata associated with artifacts actually being created and maintained had evolved significantly from the metadata documented in MDF 99 specification
  • There was recognition that the meta-model would continue to evolve as the organization worked through the experience of designing and implementing HL7 v3 specifications
  • There was no "feedback loop" in place to ensure that HL7's existing UML meta-model would be kept up to date as HL7's actual methodology, reflected in the capabilities of tools, evolved
  • HL7 tools were persisting artifacts and exporting artifacts in a variety of proprietary formats with no coherence or commonality
  • Changes to tooling persistence and exchange formats were uncoordinated and were making it difficult for other organizations to create tooling that leveraged HL7 artifacts.
  • There was a growing recognition that several artifacts that had been historically been treated as completely distinct - the RIM (Reference Information Model), RMIMs and HMDs were actually all really one type of artifact with subtle differences in the rules for design and how the artifacts were represented.

The MIF attempted to resolve these issues by combining two functions:

  • Documentation of HL7's meta-model; and
  • Definition of a format for the persistence and exchange of HL7 artifacts

The logic for this was that HL7's methodology was largely being driven by HL7's custom-maintained tooling. As the organization's requirements changed, these changes were reflected in the tools and thus in the tooling exchange formats. By using MIF to define exchange formats, there would thus be a feedback loop that ensured that the "meta-model" would be kept up-to-date to reflect the reality of the methodology in practice.

The technology chosen for MIF was w3c's XML schema specification. It was selected for several reasons:

  • HL7 was an organization that was quite "XML-aware"
  • The technology for representation needed to be platform-agnostic and tool agnostic (i.e. not MS Windows-specific or requiring any particular software to parse or use)
  • Schema, particularly when supplemented with Schematron, allowed very tight validation of instances to confirm they complied with our meta-model.
  • We wanted instances that were human-readable so that tool developers (and on occasion, modelers) could look at the instances and understand what was in them.
  • XML instances were very easy to render into other forms, including schemas, HTML, etc. as needed for our publication process using XSLT.

After its initial development, the MIF was subject to peer reviews with participation from MnM, publishing and tooling. It was identified as a core element of HL7's tooling architecture with a declared intention to move to a MIF-centric tooling base. Over the intervening years, all HL7 tools have been converted to either use the MIF directly or have had their custom outputs translated to MIF as part of processing within the V3 generator.

The MIF has undergone several significant revisions since its development.

The change from MIF 1.0.x to 1.1.x included a reduction of the scope of covered artifacts to those actually in use. However, the major change was to 'align' the MIF with UML 1.4. This included modifying the type hierarchy and element and attribute names as well as adding annotations indicating the mapping of the individual elements within the MIF. This was intended to help identify the relationship between HL7 artifacts and UML. It also helped justify the requirement for an HL7-specific meta-model, as less than 1/3 of the classes and attributes had a direct correspondence to the UML meta-model, and many of these were handled in uncommon ways. For example, Value Sets are technically enumerations. However, in practice they are far more sophisticated than the UML enumeration structure can handle.

The change from MIF 1.1.x to 2.1 included a revising the markup to align with XHTML, adding support for additional elements and a significant re-factoring of the representation of vocabulary artifacts. In some places, it simplified element names where the UML alignment created undue complexity and confusion rather than clarity.

The MIF was initially constructed as, and to a certain extent remains, a mixture of "current practice" and "to be" representation of HL7 artifacts. That is, in addition to defining all of the elements and structures presently used by existing HL7 tools and artifacts, it references methodology capabilities that have been identified as requirements and desired capabilities that are not yet supported by HL7 tooling or education. Examples include:

  • Support for capturing numeric ranges and enumeration values for static model attributes and datatype properties
  • Ability to represent ballot comments within artifacts
  • Definition of HL7 v3 conformance profiles

Other MIF aspects reflect methodological decisions that are recognized as desirable but have not yet been rolled out, often due to tooling and/or training issues. Examples include:

  • Migration of terminology like RMIM (Refined Message Information Model), DMIM (Domain Message Information Model) and HMD (Hierarchical Message Descriptor) to DIMs (Domain Information Models) and SIMs (Serializable Information Models).
  • Replacement of the fixed 3-layer RMIM-HMD-Message Type hierarchy with a variable depth SIM hierarchy
  • Migration from a fixed-width identifier scheme to a character-delimited identifier scheme to avoid collisions with locally defined artifacts

Evaluation of the MIF content should therefore include consideration not only of HL7's existing practices, but the practices that the organization intends to adopt.

The MIF can be thought of as a 'companion' to the HL7 Development Framework and the Core Principles documents. The HDF defines the processes that HL7 uses to construct its artifacts and identifies what some of those artifacts are. Core Principles defines additional artifacts and describes some common constructs that require more detailed description. The MIF defines exactly what constitutes a valid artifact - what properties an artifact is allowed to have, what characteristics it must have, constraints on the cardinality and value of those properties, etc. All three must be considered together to fully understand the HL7 v3 methodology. Please note that definitions for artifact elements provided in Core Principles are more complete and detailed and supersede those found in the MIF.

In addition to the major revisions listed above, the MIF has changed on a fairly regular basis in response to new requirements from the methodology and tooling, as well as corrections to content that did not accurately reflect the methodology or intended tooling function. In 2007, the Tooling Workgroup undertook a formal process to maintain the MIF. A gForge project ( http://gforge.hl7.org/gf/project/mif-schemas) was started with accompanying trackers to capture bugs and feature requests for the MIF. It also allows publications of "releases" of the MIF schemas as they are modified over time.

Submitted change requests and defects are reviewed and resolved by the Tooling Workgroup, sometimes in coordination with the necessary domain workgroup (MnM, Publishing and/or Vocabulary). The changes resulting from approved submissions are collected into releases that are coordinated with updates to major HL7 tools. These occur with varying frequency from as little as every month to half a year or more.

Due to the dynamic nature of HL7's methodology and tooling requirements, the MIF will continue to evolve in much the same manner, even after it has completed ballot. Ballot approval will work in much the same way for the MIF as it currently does for the RIM, where harmonization changes occur multiple times per year, but the MIF itself is only balloted on a yearly basis. Whether balloting of the MIF will be annual or bi-annual has not yet been determined. However, once passed, HL7 will publish its normative editions using both the "normative" version of the MIF in effect at the time as well as the "most current release" of the MIF so that tooling vendors can make use of a more stable platform if required.

Beginning with release 2.1.4 of the MIF, transforms have been developed and included with the HL7 V3 Generator which support transforming between the new version of the MIF and the immediately preceding version. These transforms simplify the process for implementers of tooling which might internally support only one version of the MIF, but will externally need to process multiple versions.

As part of HL7's intellectual property, the MIF schemas are both copyrighted and maintained under HL7 license. That means that the full schemas are distributed under the terms of members only content. I.e. Only members of HL7 or its affiliates may access the full schemas, with special rules applying to benefactors, educational institutions and other membership categories as per HL7's GOM ( link). However, MIF also publishes a trimmed down Eclipse Public License version of the schemas for situations where applications require the use of the MIF schemas for function. For example, code generators, MIF instance validators, etc. This stripped down version excludes all of the comments, descriptions and UML mappings content but retains all structures, enumerations and other information required to validate instances.

As mentioned, HL7's original meta-model was included in MDF99. The Tooling Workgroup sponsored the creation of a UML profile based on the MIF. However, this was limited to a "proof of concept" that was limited in scope to static models and was not complete. At present, there is no official source for HL7 metadata information other than the MIF.

 1.9Future

The MIF will continue to evolve with HL7's methodology. The dynamic model and likely the requirements model will likely be revamped as the artifacts defined by the SAIF (Services Aware Interoperability Framework) process are finalized. Some of the 'alpha' artifacts such as conformance profiles and elements to support template authoring may migrate to beta or production. Minor changes in other artifacts will continue to be made as HL7's methodology continues to change.

With the pending release of the XML Schema 1.1 specification, there is a potential for revamping the MIF schema representation to provide a more thorough validation syntax. New capabilities within Schema 1.1 may allow migration of some or all of the Schematron rules to incorporation directly within Schema. It may even permit elimination some of the "software-only" validation rules.

A more significant change may come through alignment with OMG (Object Management Group) technologies. This includes the potential of migrating from MIF to XMI, OWL or some other technology (or combination of technologies) maintained by OMG. As described below in the MIF requirements section, the formal documentation of MIF requirements was initiated as part of a joint project to help identify HL7 requirements that might be incorporated into future releases. Should HL7's needs be satisfied by off-the-shelf products, the need for a custom meta-model and validation representation might be eliminated.

This section describes the content of the MIF in more detail and gives some ideas of how it is structured.

As mentioned in the Background section, the MIF includes global element definitions for artifacts that might be published or released independently. Any one of these global elements might be the 'root' element in a MIF instance file. The following table provides a list of all of the global elements defined by MIF and identifies the schema in which these elements are defined. It also provides a 'status' and a description of the purpose of each element.

The 'status' indicates the level of use (and therefore the level of confidence) the HL7 Tooling Workgroup has in the MIF content of a given element. All content within the MIF has at least an "in principle" endorsement as part of the methodology, however not all endorsed aspects are presently in use. The statuses, and their corresponding meaning, are as follows:

Alpha: Indicates content that is not presently used by any tooling or manual artifact development and is therefore still theoretical. Its design may be based on existing tooling, but none of that tooling currently produces or consumes MIF. Alpha elements could change radically or be removed over time or they could be adopted by newer versions of tooling.

Beta: Indicates content that is in use by a single tool or as part of limited manual artifact creation, but has not been used by other tools and has not necessarily been broadly exercised. Beta elements are unlikely to go away, but may undergo significant change as they become more widely adopted.

Production: This content has been in use by HL7 and been represented in MIF form for a considerable period. It is usually supported by multiple tools. The content continues to evolve with changes in methodology and new requirements and features, but the core structures are stable and unlikely to change.

Testing: These elements are not really intended to be the root element of MIF instances. Instead, they exist for internal use by tools to allow validation of fragments of an artifact. They should be considered to have the same stability as Production elements.

The description of each element is a high-level description only. More rigorous definitions can be found in the HDF, Core Principles and the MIF itself.

Schema file

Public element

Status

Description

mif-core-base

txtInlineOnly

testing

Used by tools to test markup that can appear inside a single paragraph

mif-core-base

txtComplex

testing

Used by tools to test markup that can contain multiple paragraphs and other complex structures

mif-core-base

txtComplexWithLanguage

testing

Same as txtComplex, but allows inclusion of language

mif-core-changes

mifChanges

alpha

Identifies changes between two MIF artifacts. E.g. between versions or from source to derived

mif-model-annotationLibrary

annotationLibrary

alpha

Defines annotations that can be 'cascaded' through static models

mif-model-conformance

mifConformanceProfile

alpha

Defines a full conformance profile indicating the desired or actual capabilities of a particular system

mif-model-conformance

mifInteractionProfile

alpha

Defines conformance expectations for a single interaction

mif-model-crossReference

artifactXrefSummary

beta

Allows representation of the dependencies between a set of artifacts

mif-model-datatype

datatypeModelLibrary

Production

Defines a set of datatypes to be used within static models

mif-model-documentation

freehandDocument

alpha

Represents a single stand-alone document (e.g. an ITS)

mif-model-dynamic

triggerEvent

production

Represents a trigger event from the HL7 dynamic model

mif-model-dynamic

interaction

production

Represents an interaction definition from the HL7 dynamic model

mif-model-dynamic

structuredDocument

alpha

Used to define a single static document (which does not have any dynamic behavior)

mif-model-dynamic

applicationRole

beta

Used to define a single application role from the HL7 dynamic model

mif-model-interface

staticModelInterfacePackage

production

Used to define collections of CMET and stub definitions. (Serves the same purpose as CMETInfo.txt)

mif-model-package

package

production

Used to manage collections of artifacts (including other packages). For example, domain definitions, implementation guides, etc.

mif-model-publication

publication

beta

Used to represent a collection of content for publication

mif-model-requirements

domainAnalysisModel

alpha

Allows capturing domain analysis information as embedded XMI with MIF metadata

mif-model-requirements

domainInstanceExample

alpha

Used to capture static model and interaction instance examples with MIF metadata

mif-model-requirements

glossary

beta

Used to capture glossaries containing term definitions

mif-model-requirements

storyboard

beta

Used to capture storyboard definitions and narratives

mif-model-staticDerived

derivedStaticModels

production

A collection of one or more static models whose definitions are expressed in terms of changes from base static models

mif-model-staticDerived

derivedStaticModel

production

An individual static model whose definitions are expressed in terms of changes from a base static model

mif-model-staticFlat

staticModels

production

A collection of one or more fully expressed static models expressed in their 'flat' representation. E.g. RIM, DIM, SIM, LIM (Localized Information Model), etc.

mif-model-staticFlat

staticModel

production

A single fully expressed static model expressed in its 'flat' representation. E.g. RIM, DIM, SIM, LIM, etc.

mif-model-staticSerialized

serializedStaticModels

production

A collection of one or more fully expressed static models expressed in their 'serialized representation. E.g. SIM, LIM, etc.

mif-model-staticSerialized

serializedStaticModel

production

A single fully expressed static model expressed in its 'serialized' representation. E.g. SIM, LIM, etc.

mif-model-testing

testScenario

alpha

Represents a collection of test cases for validating or testing conformance of an HL7 interface

mif-model-vocabulary

vocabularyModel

production

Represents a collection of inter-related vocabulary objects

mif-model-vocabulary

valueSet

production

Represents the description of a set of codes from one or more code systems that can be used in a particular context

mif-model-vocabulary

codeSystem

production

Represents a set of codes maintained for a common purpose by a particular terminology author

mif-model-vocabulary

codeSystemSupplement

production

Represents a set of supplementary information for a code system maintained by someone other than the author of the terminology being supplemented

The content of the MIF is broken up across a number of separate files to give some sense of organization and modularity. For example, the enumerations used by various MIF artifacts are maintained in one file, the simple type definitions (e.g. "short descriptive name") are maintained in a different file. Some of these 'modules' have dependencies on other modules. In a schema sense, that means the dependent schemas 'include' the contents of the schemas they are dependent on. The following diagram shows these dependencies and highlights the stability status associated with each schema file. The color coding groups the various schema files into categories based on their purpose. For example, the purple boxes deal with markup for rendering text while the yellow boxes represent schemas used to support static models.

Figure 1 - MIF Schema Hierarchy

Figure 1 - MIF Schema Hierarchy

A brief description of the content of each of the schema files can be found in the following table:

Schema file

Description

mif-COMPLETE

This is a "convenience" schema used when validating the entire MIF. It does not define anything, merely asserts dependencies so that it depends on all other schemas.

mif-core-base

This schema asserts core constructs used throughout all HL7 artifacts including identifier information, artifact metadata, annotations, business names, etc.

mif-core-changes

This schema defines a syntax for representing differences between two MIF artifacts, either distinct artifacts or two versions of the same artifact.

mif-core-enumerations

This schema defines all enumerations used by the various artifacts. I.e. any MIF artifact property that is 'coded'.

mif-core-patterns

This schema defines simple types (constraints on string, integer, etc.) that are used throughout the other MIF schemas.

mif-core-staticBase

This schema defines common constructs used in both static model and datatype schemas. E.g. cardinality, vocabulary bindings, etc.

mif-model-annotationLibrary

This schema provides constructs for defining a set of annotations that can "cascade" through a set of models based on classCode, moodCode, clone name, etc.

mif-model-conformance

This schema defines both interaction and implementation conformance profiles.

mif-model-crossReference

This schema defines an artifact that allows capturing dependencies between members of a set of artifacts. Used as part of the publication process.

mif-model-datatype

This schema includes the constructs for defining abstract datatype specifications and datatype flavors.

mif-model-documentation

This schema provides constructs for creating stand-alone documents such as the HDF, ITSs, etc.

mif-model-dynamic

This schema provides the constructs for defining HL7 v3 dynamic model elements: trigger events, interactions and application roles.

mif-model-interface

This schema provides constructs for defining HL7's interface structures, including CMETs and stubs. (Equivalent to CMETInfo.txt.)

mif-model-package

This schema provides generic constructs for grouping collections of artifacts together in a hierarchical structure.

mif-model-publication

This schema provides structures for defining a publication of one or more artifacts.

mif-model-requirements

This schema provides structures for representing HL7's various requirements-analysis artifacts including storyboards and domain analysis models (DAMs).

mif-model-staticBase

This schema provides common structures shared across all of the various static model representation styles.

mif-model-staticDerived

This schema provides the structure for representing static models expressed as a set of deltas from a base static model.

mif-model-staticFlat

This schema provides the structure for representing static models as a flat list of classes and attributes. Supports all types of static models.

mif-model-staticSerialized

This schema provides the structure for representing static models as a hierarchical tree of classes and associations starting at a single root "entry-point" class.

mif-model-testing

This schema provides structures for defining test cases and test scenarios.

mif-model-vocabulary

This schema provides structures for defining vocabulary artifacts including concept domains, code systems, value sets and bindings.

xhtml1-hl7-types

This schema defines HL7-specific constraints and extensions to the base XHTML standard markup.

xhtml1-strict

This is a customized version of the w3c schema for XHTML. The customizations are to allow HL7 localization of the markup structures defined in the base schema.

Xml

This is a w3c schema for core XML structures such as language

One of the purposes of the MIF schemas is to allow validation of HL7 v3 artifact instances to confirm that the artifacts respect all of the methodology rules defined by HL7. Because of this requirement, MIF schemas are defined extremely tightly. In some cases, constraints are included for interoperability and tooling reasons rather than strict methodology requirements. For example, length limits on class names and other properties are driven by a desire to ensure readability in diagrams and other renderings as well as interoperability between tools sharing artifact instances.

Because of limitations in different XML validation technologies, the validation rules are captured in three [2] different ways:

 2.3.1Schema

W3C schema 1.0 ( http://www.w3.org/TR/2004/REC-xmlschema-0-20041028) structures are the primary mechanism for defining the HL7 meta-model rules. Schema is an effective language for defining and documenting XML structures including such things as element and attribute names, type structures, optionality, repeat limits, order of occurrence, nesting, etc. It also allows constraints on the values within elements including length limits, numeric range constraints, enumerations, etc.

 2.3.2Schematron

While schema is extremely good at enforcing structural constraints, Schema 1.0 is not good at testing conditional statements. For example, "Models with a type of RIM or DIM are only allowed to have a single entry point". However, this type of assertion rule is something that Schematron ( http://www.schematron.com) excels at. The MIF therefore uses embedded Schematron assertions to assert these sorts of rules. Schematron's "abstract" rule approach is used to manage assertions on types that are re-used through type inheritance.

In some situations, the HL7 methodology has rules that cannot be enforced by either Schema or Schematron. These rules tend to require some sort of iteration. For example, the rule "The inheritance hierarchy of a class cannot loop - a class cannot be a descendant of itself" cannot be cleanly expressed using either schema elements or the X-Path assertions used by Schematron. These are expressed at the top of each schema within the document annotations in a section labeled "programmatic rules". These are rules that need to be enforced by software used to author and/or validate MIF instances.

The MIF schemas follow a number of conventions [3] intended to enhance readability and the ability to generate software interfaces from the schemas. Specific conventions include:

Limited global elements

Global elements (those defined at the root level of the schema) are only used for elements allowed to be the root of MIF artifact instances. All other elements are only declared within complex types. This enforces that instances are only created using 'legal' elements.

No anonymous types

All complex and simple types are declared at the root level of the schema. This allows re-usability and also makes code generated from the schema more readable

Simple complex types

Nesting of choices within sequences and sequences within choices is avoided, as this creates naming issues when doing code generation.

Descriptive documentation tags

Every complex type, element, attribute group and enumeration element should have a documentation tag. This documentation tag explains the purpose of the schema item and, for element and attribute documentation, the type of information intended to be captured.

UML documentation tags

All elements, attributes and complex type definitions will also have a second documentation annotation prefixed with "UML:" that indicates how that schema item corresponds to the UML 1.4 meta model [4].

Deprecated documentation tags

Some schema components may include a documentation annotation prefixed with "Deprecated:" that indicates that the element, attribute or enumeration value has been deprecated and should be avoided. The remaining comment should identify when the deprecation is effective and what the preferred mechanism is for conveying content that would previously have used the deprecated item.

Derive documentation tags

Some schema components may include a documentation annotation prefixed with "Derive:". Such elements are derivable from other content within the MIF as described by the description following the tag. These elements should not be persisted in most MIF instances, but may be populated in some circumstances for efficient use by tooling and/or transforms.

Other documentation tags

In some cases, additional documentation tags may be present. The meaning of the tags is as follows:

  • DublinCore: Indicates the element corresponds to a meta-data tag from the Dublin core set of metadata
  • Impl: Provides specific guidance for those creating MIF-based tooling
  • Issue: Indicates the element has an outstanding un-resolved issue

Naming conventions

The MIF schemas use the following naming conventions:

  1. All element and attribute names are expressed as lowerCamelCase.
  2. All ComplexType, SimpleType, Group and AttributeGroup names are expressed as UpperCamelCase.

Re-use

Where content will appear in multiple MIF constructs, that content will be defined centrally and re-used either via type inheritance (defining extensions of a base, usually abstract, type) or through the creation and referencing of schema "groups".

Ordering of content

MIF schemas are generally ordered such that global element definitions come first followed by type and group definitions. The content itself is ordered following one of two conventions:

  • Top-down: More complex constructs are listed first, followed by the types they reference, in a "depth first" traversal, defining the type the first time it is referenced
  • Alphabetical by type name

Single-direction linkages

Throughout much of the MIF, artifacts reference each other. For example, Interactions use static models and static models are used by interactions. In general, these relationships are maintained in one direction only. I.e. The Interaction will point to the static models it uses, but the static models will not point to the interactions that use them. This uni-directional referencing is done for two reasons:

  • Simplification of maintenance (links only need to be maintained in one place rather than two)
  • Recognition of "limits of knowledge". E.g. Because interactions can be created by affiliates and other implementers, it's impossible to know what interactions might use a given static model because there's no single repository of all static models

On occasion, for ease of tooling, a reverse-direction relationship will be included in the MIF. Where this has occurred, the reverse-direction relationship will be identified as "derived" and will not be populated in most circumstances.

The MIF includes constructs that appear in many places and may be a bit confusing to those not familiar with some of the underlying mechanics of HL7's methodology. This section describes and explains those constructs to allow for easier interpretation of MIF contents.

Note: When HL7 migrates to the new identifier scheme, this section will likely move from the MIF document to Core Principles.

Every HL7 artifact is assigned an identifier. These identifiers are intended to be globally unique and allow these artifacts to be clearly referenced in documents such as RFPs anywhere in the world. However, unlike most places where HL7 requires unique identity, HL7 artifacts are not identified by OID, GUID, or similar structure. HL7 required identifiers that would be more recognizable to humans and, despite certain best practice recommendations, had embedded semantic meaning. Our initial identifiers contained several pieces of semantics:

  • The identity of the sub-section and domain from which the artifact was drawn (e.g. PORX)
  • The type of artifact (e.g. AR for application role)
  • The realm namespace in which the artifact was defined (e.g. UV, CA, UK, etc.)
  • A 6-digit identifier for the artifact
  • An optional 2-digit version number

Though we did not realize it at the time, we were actually following a UML practice known as packaging. We had a hierarchy of packages and by traversing through the packages, we could find a specific artifact. This packaging approach also helped us to avoid name collisions. Within the "UV" package at the realm namespace level, we had domain packages. Within each domain, there were artifact packages. Within each artifact package, the identifiers for specific artifacts could be managed without fear of collision because responsibility for those identifiers clearly rested within a single workgroup.

This packaging approach was adopted within the MIF, but was applied to other artifacts as well where the existing fixed length UUDD_AAnnnnnnRRvv format did not work well, such as the RIM and datatypes specifications, ITSs and other types of artifacts. As well, the fixed-length structure would not work for version ids such as RIM202 or for ITSs that could not be identified with a 6-digit number. The 2-character limit on realm namespace was also problematic in that it did not permit safe creation of local artifacts by organizations and projects that were not balloting those artifacts through HL7 or its affiliates.

The MIF therefore uses a discrete component based approach to identifying the fully qualified package hierarchy and identity of an artifact. In the new set of tools, artifact identifiers will be changing to express this non-fixed length approach using a delimiter separated identifier. For example, PORX_AR123456UV01.mif will become DEFN=UV=RX=AR=123456=01.mif.

The package hierarchy is made up of a number of layers. Some layers apply to all artifacts, while other layers apply to only certain types of artifacts. The list of the package layers is as follows:

Root

DEFN, BAL or PUB

Mandatory. Identifies whether the artifact is a newly defined artifact, a ballot for one or more artifacts or a publication

Realm namespace

e.g. UV, CA, or 2.16.369.19848.12

Mandatory. Identifies the namespace in which the artifact is defined. This may be UV, one of the 2-character realm ids assigned to HL7 affiliates, a unique string assigned by HL7 to organizations that request such a string, or an OID identifying the namespace assigned by the organization creating the artifact

Domain

E.g. RX, PA, CR

Indicates one of the semantic domains defined by HL7 to which the artifact belongs. Applies to domain-specific artifacts. The set of domains is controlled by HL7's Publishing work group.

Artifact

E.g. AR, RIM, TE

Identifies the type of artifact represented. Applies to all "Definition" artifacts. The set of artifacts is controlled by HL7's Publishing work group in consultation with Modeling & Methodology and Tooling.

Sub-artifact

E.g. VC, VD

Used to identify sub-artifacts. At present, these only exist for vocabulary models that contain concept domains, value sets and other sub-artifacts.

Id/Name

E.g. 123456, XML-ITS

This is the unique label for the artifact within the context of the lower-level packages. For many artifacts, this will be a 6-digit numeric identifier. However, for documents and some other artifacts a string label is used instead. Not all artifacts require an id or name. For example, the RIM and abstract datatypes, no name is required because only one artifact of that type exists in the UV namespace. Note that the string name should be a short-form name, not necessarily the full descriptive name.

Version

E.g. 01, 2.0, 0208

This identifies a specific version of the artifact. This does not need to be present when referencing an artifact independent of version.

Release Date

20090116

Because artifacts are sometimes modified without changing version id, release date can be used to reference a particular version of an artifact more specifically.

Example 1:

Old style: PORX_MT020030UV

New style: DEFN=UV=RX=MT=020030

MIF: <packageLocation root="DEFN" realmNamespace="UV" domain="RX" artifact="MT" id="020030"/>

Example 2:

Old style: RIM0208

New style: DEFN=UV=RIM=0208

MIF: <packageLocation root="DEFN" realmNamespace="UV" artifact="RIM" id="0208"/>

Example 3:

Old style: N/A

New style: DEFN=UV=VO=VC=EntityCode=20090315

MIF: <packageLocation root="DEFN" realmNamespace="UV" artifact="VO" subArtifact="VC" name="EntityCode" releaseDate="20090315"/>

Every artifact and a wide variety of artifact components include support for a variety of annotations. The annotations are split into two categories - documentation annotations that have few or no additional properties beyond the textual content and 'application information' annotations that include additional metadata. The specific set of annotations allowed for a given element varies depending on the needs of that element.

MIF instances used and published by HL7 come with a variety of different file extensions. There is no intrinsic requirement for distinct file extensions as any MIF instance is self-descriptive. All MIF files could just be labeled ".mif". However, because it is useful for quickly separating files of different types and because of a need to avoid collisions when using the v3 generator, a number of distinct file extensions have been adopted. The use of each file extension is documented in the following table:

Extension Purpose
.coremif Used for 'key' MIF files including interface, datatypes and vocabulary files. Also used for the RIM static model.
.dmif (Historical) A dynamic MIF file. Used for MIF 1.x dynamic model files. No longer used in MIF2.
.mif Generic extension for mif files. Presently used for static models (either serialized or non-serialized) and interaction files.
.vmif Used for derived static models.

MIF instances are represented in XML and use the namespace urn:hl7-org:v3/mif2. The original version of the MIF used the namespace urn:hl7-org:v3/mif. If in the future there is a significant re-design of the MIF, it is possible that the namespace will change again. However, all minor revisions to the MIF will retain the same namespace and will make use of the schemaVersion attribute to distinguish what version of the MIF schemas a given instance is compliant with.

To ease its review, the MIF has been published in a variety of different views. The hope is to make the MIF material accessible to a wide variety of readers who may be interested in the contents of the MIF from different perspectives. Each of the sections below contains a distinct view of the MIF. Please note that not all views will expose all aspects of the MIF schemas. Each section discusses the contents of the view, including recommendations on how to navigate it and any limitations it may have in terms of what content is and is not exposed.

Most renditions of the MIF below include two copies. One represents the "complete" MIF, including aspects that are included for future use (Alpha). The other represents the "active" MIF - that portion supported by current tools or in use by at least some HL7 members in the development and publication of HL7 artifacts.

Unfortunately, one thing no view can do is make the MIF "simple". That is because HL7's artifacts are not simple. HL7 has many artifacts, and those artifacts capture a wide variety of data elements. Performing a full review of this content will not be a quick process.

Note: If you have a suggestion for alternate renderings in future ballots that might be useful, please mention it in your ballot feedback.

As a supplement to the MIF schemas themselves, this package includes a set of documentation reflecting the methodology requirements that have driven the existing MIF structures. This documentation is a snapshot of the requirements documentation maintained on the HL7 wiki at http://wiki.hl7.org/index.php?title=Category:V3_Methodology_Requirements. While the documentation embedded in the MIF schemas does a (relatively) good job of identifying what each structure is for, how it should be used and the rules that surround validation of instances, it does not do a good job of documenting the "why" behind each element.

HL7 has recently been in discussions with the OMG around the potential application of OMG technologies such as UML and OWL to HL7 requirements. The lack of a clear rationale behind each element in the existing meta-model was a clear deficiency. The OMG and HL7 therefore undertook a joint project to capture the underlying requirements and rationale supporting each element.

The requirements documentation is organized into a number of sections dealing with different "levels" of requirements and different categories of artifacts. Each requirement is accompanied by a supporting rationale and either a description of the HL7 methodological approach(es) used to solve the problem and/or an identification of the MIF elements that satisfy the requirement.

Requirements have only been included for the MIF schemas that have reached "beta" or "production" stability levels. However, in some cases additional MIF elements that are not in active use have been captured because of the desire to see their support in OMG technologies. These have been flagged as "not currently used".

The MIF requirements can be found on the wiki here. A snapshot PDF is also provided here for those who would like to navigate a static view of the requirements or wish to review a local copy. (The rendering of the PDF is not perfect, so using the wiki might make the content slightly easier to read.)

This format contains the raw MIF schemas. This is the "source" for the remaining views. The schemas are provided in a zip file that can be downloaded and unzipped. The schemas are accompanied by supporting DTD files that are needed for validation with some tools. While the schemas can be browsed using any text editor, they will be most easily viewed using tools specifically designed to navigate schema files, managing inheritance, imports and similar functions. For example, XML Spy.

The MIF schemas can be found here. The 'trimmed' schemas can be found here

This format exposes the MIF schemas as HTML with color formatting. It is useful to see the actual content of the schemas if you do not have a tool for navigating the raw schemas. Because it is a direct rendering of the schema XML, this view exposes all information.

The rendered schemas can be found here. (Here for trimmed schemas.)

This format includes a rendered view of the schemas generated using the XML Spy tool. It includes diagrams of the schema content as well descriptive information. It provides a complete representation of the MIF content, excluding XML comments. (NOTE: It also appears to contain hyperlinks to the underlying schemas. These links are invalid, but cannot be omitted due to a bug in the tool.)

The XML Spy view can be found here. (Here for trimmed XML Spy view.)

This view is generated using a tool called DocFlex/XML that produces a Java-doc like set of HTML documentation of a set of schemas. Like the XML Spy view, this view does not include content from XML comments.

The Java doc view can be found here. (Here for trimmed Java doc view.)

 3.6UML

Dave Carlson has developed a tool called Hypermodel for converting schema content into UML. He has kindly used this tool to produce a UML rendering of the MIF schemas. The UML view is available as an XMI 2.1 file that can be imported into the UML tool of your choice for exploration. As well, an HTML rendering has been produced using the documentation capabilities of Enterprise Architect.

Keep in mind that the UML rendering is auto-generated so the layout of classes may not be optimal. As well, the use of attribute and element groups in the schemas for re-use purposes causes the types for some UML objects to appear a bit different from how one would typically represent the content. Finally, the UML rendering only includes the first descriptive annotation and excludes XML comments, so some rules will not be exposed, nor will deprecated items be flagged.

Note: The UML generated here is not recommended for use in code generation and is not supported by HL7 at this time.

The XMI files can be retrieved here.

The HTML rendering of the UML content can be found here: here. (Here for trimmed UML HTML.)

Note: The HTML rendering requires Javascript to be enabled

  1. [source] Some of the validation content within the MIF is represented in non-computable form, either because of limitations in the capacity of Schema and Schematron to express the constraints, or limitations on the bandwidth of those maintaining the MIF to fully encode the rules. In these circumstances, the contraints are documented as text comments.
  2. [source] In practice, some rules are captured by a fourth mechanism – embedded XML comments, often prefixed by “Todo:” identifying rules that should be expressed by one of the other mechanisms that have not yet been appropriately expressed.
  3. [source] In some places, these conventions may not have been followed exactly. Feel free to mention them in ballot responses :)
  4. [source] HL7 has not yet had the resources to update the mappings to UML 2.

View Revision MarksHide Revision Marks Return to top of page