This wiki has undergone a migration to Confluence found Here
<meta name="googlebot" content="noindex">

Difference between revisions of "New ITS Datatypes Guide"

From HL7Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 +
 +
This is the first draft of the New ITS datatypes guide. The document is
 +
still under development, and is expected to grow significantly as a
 +
result of comments made against the ISO Healthcare Datatypes standard
 +
and the new ITS specification.
 +
 
= Introduction =
 
= Introduction =
  
 
The ITS datatypes guide provides supporting information for the joint
 
The ITS datatypes guide provides supporting information for the joint
ISO / HL7 healthcare datatypes specification. The joint ISO/HL7
+
ISO / HL7 healthcare datatypes specification. The ISO healthcare
healthcare datatypes is both an implementation of the HL7 abstract
+
datatypes is developed jointly by HL7 and ISO to provide a platform
datatypes and a platform independent datatypes specification that
+
independent datatype specification for general use in healthcare
stands alone, independent of the abstract specification, for general
+
specifications, and in particular to be used as part of the ITS
use in other healthcare specifications.
+
in the context of HL7 V3.
  
 
This guide outlines the design principles that drove the development
 
This guide outlines the design principles that drove the development
Line 24: Line 30:
 
datatypes offered a prospect of providing convergence between HL7, CEN, and ISO on
 
datatypes offered a prospect of providing convergence between HL7, CEN, and ISO on
 
the previously contentious subject of datatypes. This final specification is a joint
 
the previously contentious subject of datatypes. This final specification is a joint
develop between HL7 and ISO. For this reason, the design philosophy is divided into  
+
development between HL7 and ISO. For this reason, the design philosophy is divided into
two parts. the first part deals with aspects of this specification as an ITS for
+
two parts. The first part details with the design philosophy of the ISO datatypes
the HL7 abstract specification, and the second part details with the design philosophy
+
specification and the second part deals with aspects of this specification as an ITS for
of the ISO datatypes specification.
+
the HL7 abstract specification.
 +
 
 +
== ISO Healthcare datatypes design philosophy ==
 +
 
 +
The intent of the ISO healthcare datatypes is to provide a single underpinning
 +
specification tht supports the healthcare datatypes. Each of the different
 +
healthcare specifications has slightly different requirements for the underlying
 +
datatypes, and there has been substantial contention about these differences.
 +
The ISO datatypes provides a single platform independent specification that
 +
can support interoperability between the different specifications. Interoperability
 +
can be enabled if specifications use the ISO Datatypes specification directly,
 +
or if the specifications provide a thorough mapping to the ISO datatypes specification.
 +
 
 +
In addition, the ISO specification must clarify the relationship between the
 +
healthcare datatypes and the general purpose datatypes specified in ISO 11404.
 +
The Healthcare datatypes often include datatypes that represent primitive
 +
concepts such as integer or boolean that are also defined in the general
 +
purpose datatypes, and there has been confusion about the relationship between
 +
the two definitions.
 +
 
 +
The general purpose datatypes define two forms of conformance, direct and
 +
indirect. The ISO Healthcare datatypes specification extends this pattern by
 +
also allowing for direct and indirect conformance, which match the two forms
 +
of interoperability described above.
 +
 
 +
The datatypes framework provided by the 11404 standard is not a common easy
 +
to consume formalism for the datatypes, so in addition to the 11404 based
 +
datatype definition, the specification also includes a definition of the
 +
datatypes in UML, using the UML kernel types in the same way that it
 +
uses the 11404 General Purpose Datatypes. The UML is suitable for code
 +
generation from XMI, and XMI source will be made available. In addition,
 +
given the ubiquity of XML as an interchange format, the specification
 +
defines a normative XML representation for the datatypes.
 +
 
  
 
== New datatypes ITS Design Philosophy ==
 
== New datatypes ITS Design Philosophy ==
  
 
While abstract datatypes specification provides an extremely precise
 
While abstract datatypes specification provides an extremely precise
and thorough definition of the semantics of the HL7 datatypes, it is  
+
and thorough definition of the semantics of the HL7 datatypes, it is
 
not suitable as a basis for implementation for several reasons:
 
not suitable as a basis for implementation for several reasons:
 
* the specification is entirely defined in terms of true and false
 
* the specification is entirely defined in terms of true and false
Line 40: Line 79:
  
 
The XML ITS provided a specification that described the set of XML
 
The XML ITS provided a specification that described the set of XML
instances that could be used to represent the abstract datatype  
+
instances that could be used to represent the abstract datatype
 
semantics when exchanging information between systems in XML form.
 
semantics when exchanging information between systems in XML form.
 
The XML ITS falls short of providing the kind of implementation
 
The XML ITS falls short of providing the kind of implementation
Line 50: Line 89:
 
* the decisions made by HL7 as part of the xml implementation are not described or obvious, and create difficulties for implementors.
 
* the decisions made by HL7 as part of the xml implementation are not described or obvious, and create difficulties for implementors.
  
The focus of this ITS datatypes specification is to develop a platform independent implementation model for the datatypes to provide improved
+
The focus of the new ITS datatypes philosophy is to develop a platform
 +
independent implementation model for the datatypes to provide improved
 
support for the implementation of HL7 V3. The UML is used to provide the
 
support for the implementation of HL7 V3. The UML is used to provide the
platform independent model. Since XML is the most common interchange format, an XML format is also described, along with a schema format which are both automatically derived from the platform independent model. The intent is that other specific platform models would also be automatically derived from the platform independent model.
+
platform independent model. Since XML is the most common interchange
 +
format, an XML format is also described, along with a schema format
 +
which are both automatically derived from the platform independent model.
 +
The intent is that other specific platform models would also be
 +
automatically derived from the platform independent model.
 +
 
 +
The major advantage of this point is that the format is fully and clearly
 +
described by the platform independent model, and the industry standard
 +
anlaysis and development approaches can be applied directly using either
 +
UML or schema as a basis for development, including model driven development
 +
or other forms of code generation. In the parlance of the new ITS, the UML
 +
definition of the datatypes is the implementable model.
 +
 
 +
== Relationship between the Abstract Datatypes and the ISO datatypes ==
  
For this reason, the primary design principle of this ITS is to
+
HL7 V3 has it's own abstract data type specification. This rigorously
provide a platform independent model that is a faithful implementation
+
defines the semantics of the datatypes as they are used in the HL7
of the abstract datatypes specification......
+
development process. The ISO datatypes specification is a computable
 +
platform independent specification, but it is technology specific to UML,
 +
so it can be treated as an ITS for the abstract datatypes.
  
 +
As an ITS of the abstract datatypes, it must implement enough of the
 +
semantics of the abstract datatypes to be useful within it's target
 +
context. There is no clear definition of what scope an ITS has to not
 +
implement all the features of the the abstract datatypes specification.
 +
The existing XML ITS has been used heavily as a guide in this area, and
 +
most of the features that are not implemented in the XML ITS are not
 +
implemented in this ITS. As an example of this, CD.code is at ST in the
 +
abstract specification, which means it has a language property. However in
 +
both the XML ITS and the ISO datatypes, CD.code is implemented as a simple
 +
String taken from the underlying technology, where there is no language
 +
property. This specification deliverately introduces support for some
 +
features that the XML ITS did not support, including:
 +
* support for CD.displayName.language
 +
* support for the ANY properties on SET, LIST, and BAG
  
For a number of reasons, the abstract sp
+
Since the ISO datatypes is an implementation of the abstract datatypes, and
* design philosophy - why we did what we did, and some specific notes about things we did
+
supports some features differently to how they are described in the abstract
The datatypes have been developed according to the following principles:
+
datatypes, this document explains these differences below in the HL7 V3 mapping
* Clarity of expression
+
for the ISO datatypes. In particular, The ISO datatypes includes some features
* Ease of implementation
+
that are not defined in the abstract datatypes specification. The use of these
* Compatibility with datatypes from other specifications, in particular:
+
features is not supported in HL7 V3.
** ISO 11404
 
** HL7 V3 XML ITS datatypes R1
 
** openEHR datatypes
 
  
The desire is to have a simple model, shared in common in both XML and UML. Either the UML or the XML can be used to understand the HL7 v3 messages, validate instances, generate code, etc. This is the "implementable model" that drives the implementation of HL7 v3 instances. Both the UML and Schema models are considered normative representations of the model.
 
  
 
The model represents the structure in as simple terms as possible, with a focus on commonly accepted o-o formalisms. In addition, invariant constraints are provided as either OCL or schematron constraints to further specify the many co-occurence constraints that exist in the HL7 v3 model.
 
The model represents the structure in as simple terms as possible, with a focus on commonly accepted o-o formalisms. In addition, invariant constraints are provided as either OCL or schematron constraints to further specify the many co-occurence constraints that exist in the HL7 v3 model.

Revision as of 04:39, 14 March 2007

This is the first draft of the New ITS datatypes guide. The document is still under development, and is expected to grow significantly as a result of comments made against the ISO Healthcare Datatypes standard and the new ITS specification.

Introduction

The ITS datatypes guide provides supporting information for the joint ISO / HL7 healthcare datatypes specification. The ISO healthcare datatypes is developed jointly by HL7 and ISO to provide a platform independent datatype specification for general use in healthcare specifications, and in particular to be used as part of the ITS in the context of HL7 V3.

This guide outlines the design principles that drove the development of the ISO datatypes specification; specifies the mapping from the ISO datatypes to the V3 modeling framework, as required by the ISO specification; provides reference and tutorial information to help implementors that are experienced with the previous HL7 V3 XML ITS, along with a considerable number of annotated examples; and provides as yet incomplete documentation for the requirements that supported the design of the datatypes.

Design philosophy

The ISO datatypes specification was first developed as a reference package to support the UML ITS: a platform independent object orientated datatype specification for use with HL7 V3. During development it was recognised that these platform independent datatypes offered a prospect of providing convergence between HL7, CEN, and ISO on the previously contentious subject of datatypes. This final specification is a joint development between HL7 and ISO. For this reason, the design philosophy is divided into two parts. The first part details with the design philosophy of the ISO datatypes specification and the second part deals with aspects of this specification as an ITS for the HL7 abstract specification.

ISO Healthcare datatypes design philosophy

The intent of the ISO healthcare datatypes is to provide a single underpinning specification tht supports the healthcare datatypes. Each of the different healthcare specifications has slightly different requirements for the underlying datatypes, and there has been substantial contention about these differences. The ISO datatypes provides a single platform independent specification that can support interoperability between the different specifications. Interoperability can be enabled if specifications use the ISO Datatypes specification directly, or if the specifications provide a thorough mapping to the ISO datatypes specification.

In addition, the ISO specification must clarify the relationship between the healthcare datatypes and the general purpose datatypes specified in ISO 11404. The Healthcare datatypes often include datatypes that represent primitive concepts such as integer or boolean that are also defined in the general purpose datatypes, and there has been confusion about the relationship between the two definitions.

The general purpose datatypes define two forms of conformance, direct and indirect. The ISO Healthcare datatypes specification extends this pattern by also allowing for direct and indirect conformance, which match the two forms of interoperability described above.

The datatypes framework provided by the 11404 standard is not a common easy to consume formalism for the datatypes, so in addition to the 11404 based datatype definition, the specification also includes a definition of the datatypes in UML, using the UML kernel types in the same way that it uses the 11404 General Purpose Datatypes. The UML is suitable for code generation from XMI, and XMI source will be made available. In addition, given the ubiquity of XML as an interchange format, the specification defines a normative XML representation for the datatypes.


New datatypes ITS Design Philosophy

While abstract datatypes specification provides an extremely precise and thorough definition of the semantics of the HL7 datatypes, it is not suitable as a basis for implementation for several reasons:

  • the specification is entirely defined in terms of true and false
  • the specification does not differentiate between the intrinsic and derived properties
  • the specification makes use of some techniques that are not commonly supported in implementation platforms (such as mixins)
  • it is not obvious how to implement the specification in a computing environment that contains existing primitive types.

The XML ITS provided a specification that described the set of XML instances that could be used to represent the abstract datatype semantics when exchanging information between systems in XML form. The XML ITS falls short of providing the kind of implementation support desired by the implementers of HL7 V3 for several reasons:

  • the focus of the XML ITS is specifying the set of possible instances
  • the xml implementation is specific to the XML platform; the form of the ITS does not easily map to other common platforms
  • the schema is a secondary construct suited for validation but not optimised for model driven development
  • the instance format is a compromise between forms suitable for different implementation forms
  • the decisions made by HL7 as part of the xml implementation are not described or obvious, and create difficulties for implementors.

The focus of the new ITS datatypes philosophy is to develop a platform independent implementation model for the datatypes to provide improved support for the implementation of HL7 V3. The UML is used to provide the platform independent model. Since XML is the most common interchange format, an XML format is also described, along with a schema format which are both automatically derived from the platform independent model. The intent is that other specific platform models would also be automatically derived from the platform independent model.

The major advantage of this point is that the format is fully and clearly described by the platform independent model, and the industry standard anlaysis and development approaches can be applied directly using either UML or schema as a basis for development, including model driven development or other forms of code generation. In the parlance of the new ITS, the UML definition of the datatypes is the implementable model.

Relationship between the Abstract Datatypes and the ISO datatypes

HL7 V3 has it's own abstract data type specification. This rigorously defines the semantics of the datatypes as they are used in the HL7 development process. The ISO datatypes specification is a computable platform independent specification, but it is technology specific to UML, so it can be treated as an ITS for the abstract datatypes.

As an ITS of the abstract datatypes, it must implement enough of the semantics of the abstract datatypes to be useful within it's target context. There is no clear definition of what scope an ITS has to not implement all the features of the the abstract datatypes specification. The existing XML ITS has been used heavily as a guide in this area, and most of the features that are not implemented in the XML ITS are not implemented in this ITS. As an example of this, CD.code is at ST in the abstract specification, which means it has a language property. However in both the XML ITS and the ISO datatypes, CD.code is implemented as a simple String taken from the underlying technology, where there is no language property. This specification deliverately introduces support for some features that the XML ITS did not support, including:

  • support for CD.displayName.language
  • support for the ANY properties on SET, LIST, and BAG

Since the ISO datatypes is an implementation of the abstract datatypes, and supports some features differently to how they are described in the abstract datatypes, this document explains these differences below in the HL7 V3 mapping for the ISO datatypes. In particular, The ISO datatypes includes some features that are not defined in the abstract datatypes specification. The use of these features is not supported in HL7 V3.


The model represents the structure in as simple terms as possible, with a focus on commonly accepted o-o formalisms. In addition, invariant constraints are provided as either OCL or schematron constraints to further specify the many co-occurence constraints that exist in the HL7 v3 model.

\[Todo: this will be true\] The UML diagrams use stereotypes that define how the XML and schema re produced from the UML diagrams. These UML Stereotypes are not visible in the diagrams shown in this document, but will be found in the XMI and other UML files attached to this document. The UML profile used is that of David Carlson \[todo: David to give me the appropriate reference, and also reference his book and [1]\]

notes - things to rationalise:

  • why short names not human understandable names


There is no discussion at the abstract level concerning the use of these attributes with null values. It is disallowed until use cases for it\’s support are accepted by HL7.

ISO Datatypes mapping for HL7 V3

Implementers guide to ITS R2

  • comparison between ITS 1 and ITS 2, and notes for implementors

Keith to complete

Things to talk about

  • what happened to null Flavors TRC, QS, NINF, PINF, OTH
  • introduction of properties on ANY
  • changing the inheritance hierarchy (CO, ED/ST, GTS/IVL)
  • specific of differences between abstract specification and ISO datatypes
    • no updateMode, History or nullFlavor on inner properties
    • new properties on PQ (accuracy, magnitude, specialValue)
    • no translations on qualifiers
    • GTS.literal
    • translation purpose
    • II.type & use
    • uncustomised xml for SLIST
    • An explicit "data" component has been added for ED
    • Addition of "Term" and "Data" classes
    • XML attributes are used for address and name part categories rather than XML element names
    • Explicit XML elements were created for sets, bags and lists
  • why only one templateId

Relationship with HL7v3 datatypes release 1 (abstract and XML ITS)

(from new ITS doc, status Draft)

The following summarizes the most significant changes proposed to the data types. These are fully documented in the separate datatypes proposal document.

  • Null flavor values are reduced in number
  • An IdentifierUse attribute has been added to II
  • Encapsulated Data (ED) has been restructured to be a sibling of String (ST), rather than a child
  • An explicit "data" component has been added for ED
  • XML attributes are used for address and name part categories rather than XML element names
  • "Group" was added to Coded Data (CD) to support post coordinated SNOMED terms
  • Explicit XML elements were created for sets, bags and lists

In addition, at this time there are a significant number of open data type shange proposals on the HL7 wiki. It is proposed that these be reviewed, and all those that will not be addressed in this release cycle be explicitly deferred to avoid implementer confusion.


Examples

  • examples with discussion

Requirements

  • requirements as they are collected

Requirements Basic Datatypes

Requirements Text And Content Data Types

Requirements Coded Data Types (Terminology)

Requirements Identification Data Types

Requirements Name and Address Data Type

Requirements Quantity Data Types

Requirements Collection Data Types

Requirements Timing Specification Data Types

old stuff

Old Introduction

This is the reference package for the UML ITS. It consists of representations of the basic datatypes, infrastructural types, and structural vocabularies defined by the V3 methodology to support the UML ITS. The rationale and design philosophy are documented in the UML ITS

This package to support a specific ITS, an implementation of the V3 abstract data types, and some parts of the RIM and the structural vocabulary. It provides a particular way to implement the V3 specifications. Implementers should be aware that not all the features provided by this ITS reference package are able to be used in all contexts, and implementers must consult the V3 modeling layer (RIM, Vocabulary Definitions, Abstract Data Types, and other models) to fully implement the V3 standard correctly.