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

V2 Lengths

From HL7Wiki
Revision as of 07:27, 9 September 2008 by Frankoemig (talk | contribs) (added more information)
Jump to navigation Jump to search

Background

  • long controversy concerning lengths
    • most implementers do not take care of length at all, i.e. no change of application with other length definitions!
  • lack of clarity concerning what we are trying to do
  • problem of the back door
    • introduced by local requirements
    • max length must be exceeded in certain circumstances
    • normative max length is defacto useless

Solution

1. stop reporting lengths on complex types

  • value is increasingly difficult to determine
  • in an application only "atomic" information is stored
  • (value is specific to vertical bar representation)
  • value is useless and misleading
  • only define lengths for primitive types (ST etc)
  • only report lengths were the context of use has different rules to definition of type

2. differentiate between authoritative lengths and arbitrary lengths

  • some lengths are authoritative
    • e.g.:
      • for codes coming from HL7-defined tables (they are a MUST)
      • control information
      • segment/field references
      • within realms: a set of fixed values is required in realm specific messages
    • authoritative lengths are fixed and normative - may not be violated
    • systems must support valid data that they encounter
  • some lengths are arbitrary - any particular length is wrong
    • e.g.:
      • lengths of local codes and names, address parts
    • Do not make normative rules. But some length guidance is still useful
    • so provide a "conformance length": the minimum length that must be supported
      • any higher length is accepted, but not shorter
    • conformance length offers a degree of predictability without preventing real world problems being solved

3. add support for truncation pattern

  • applications currenly truncates data, that is too long
    • in most cases without any notification/recognition
  • it works better if systems are able to communicate about truncation
  • truncation allows this.
  • truncation pattern is not required
    • it is a new optional (5th) character in MSH-2
  • some content (identification, clinical descriptions) are not allowed to be truncated
    • this is controlled by a special indication in C.LEN
  • some data type specific truncation rules (numbers, dates)

4. make vendors aware of conformance statements/profiles

  • documentation is the overall and optimal solution
  • whatever a vendor has done, i.e. each individual use of lengths, must be documented
  • try to make conformance statements required for conforming applications