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

Incomplete Static Models

From HL7Wiki
Revision as of 10:59, 30 April 2007 by GrahameGrieve (talk | contribs)
Jump to navigation Jump to search

Introduction

In order to use static models for templates, we need to be able to have incomplete static models. An incomplete static model is a model that leaves some content open.

Rationale

Usually a static model is complete - any content not described by the model is disallowed. For normal static models - D-MIMs, R-MIMs, CMETs - this makes complete sense. But when it comes to templates, such completeness is often not appropriate.

A typical case is the use case for a template that says that this observation must have a snomed code associated with it. A simple static model would therefore have a single Act Class, with classCode <= OBS, and a constraint on the code to say that there must be a term from snomed.

(It's not the focus of this page, but assuming that the oid for the snomed code system is [snomed_oid], then the constraint might look something like this in OCL:

 inv: code->hasCodeSystem([snomed_oid])

This fragment depends on some decorations on CD, but that's not what this page is about)

The problem with the simple static model described above is that it says that the observation cannot have anything else on it - only a classCode and a code, and no associations. Not very useful.

An alternative is to add every attribute, and also to add every possible association. This includes all the classes that might be encountered, including at the very least the entire RIM backbone - but this is all getting very difficult. At the least we can say that the conceptual problems this brings up can be ignored since no one would ever bother writing such a template for a simple statement.

The solution to this is to allow a static model to say somethings, and refrain from making rules about some content. This is known as an incomplete static model.

Options