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

Serialisation Annotations

From HL7Wiki
Revision as of 10:32, 20 February 2007 by Charliemccay (talk | contribs)
Jump to navigation Jump to search

This page includes a set of proposals for annotations for serialisation rules that can be used by the New ITS to support easier implementation of HL7v3 models. It is for discussion by MnM.

Serialization Model Annotation Rules

A set of annotations to RMIMs are proposed that describe some serialization rules. These are added in the form of textual RMIM "notes", that are saved into the MIF and can be interpreted by tools that come later in the message production process. (Ideally these serialization hints would be made in a fully graphical style, but this isn\’t achievable yet.)

Serialization rules available are

  • Suppress a clone, RIM attribute or datatype attribute
  • Rename a clone, RIM attribute or datatype attribute
  • Collapse a clone into its parent

These operations can be local to the annotated clone, or can apply globally to the whole model.

An example annotation is : On a clone called ClinicalDocument: ITS:global.codeSystem.suppress;global.contextConductionInd=ccInd;ClinicalDocument=DischargeMessage

On a clone called recordTarget: ITS:recordTarget.collapse

The "ITS:" prefix indicates that this is special purpose comment. Semi-colons are used to separate multiple operations. The keywords "suppress" and "collapse" correspond to a request for that action on the attribute that comes before the dot eg recordTarget.collapse.

Model Annotation Syntax

This section advances a syntax for use as text comments on an RIM-based diagram. These are inserted by the user and picked up, via the MIF, by the Reshaping tool.

The annotations permitted are

  • Suppress

attribute.suppress attribute.dataTypeAttribute.suppress eg code.codeSystem.suppress would remove the codeSystem datatype attribute from the annotated clone\’s code attribute. ("clone" being a diagram element derived from the RIM) .

  • Rename

attribute=name clone=name eg. recordTarget=patient

  • Collapse

clone.collapse eg global.codeSystem.suppress

The keyword "global" can also be used as a prefix, as in the example above, to make the change happen all over the model.

A BNF for the annotations is :

<rule> ::= "ITS:" <commandList>

<commandList> ::= <command> | <command> ";" <commandList>

<command> ::= <identifier> "." <action> | <identifier> "=" <name>

<action> ::= "suppress" | "collapse"

<identifier> ::= "global" "." <localIdentifier> | <localIdentifier>

<localIdentifier> ::= <RIMClone> | <RIMAttribute>

<RIMAttribute> ::= <RIMAttributeName> | <RIMAttributeName> "." <dataTypeAttribute>

Symbols undefined above :

<name> the new name for a renamed item

<RIMClone> the "clone name" of an RMIM shape, cloned from the RIM

<RIMAttributeName> the name of a RIM attribute of a clone eg. id, effectiveTime

<dataTypeAttribute> the name of a datatype attribute eg. extension, codeSystem

All white space is insignificant.


Example annotations

[img:ExampleAnnotation.bmp]


Note: In creating this ITS markup language, user readability was the primary aim. Ideally a fully graphical interface and presentation would be used instead of a textual one. This language was designed to suit the non technical user, hence the intuitive syntax of "=" to give an alternate name, and the english-like ";" to split multiple phrases. "Dot notation" eg patient.id is assumed to be widely enough recognised to be suitable for use.