This wiki has undergone a migration to Confluence found Here
Difference between revisions of "Requirements-Static Model"
Jump to navigation
Jump to search
Line 618: | Line 618: | ||
{| border="2" cellspacing="0" cellpadding="3" width="600" | {| border="2" cellspacing="0" cellpadding="3" width="600" | ||
| '''Requirement''' | | '''Requirement''' | ||
− | | | + | | Some attributes need to be marked as "immutable" |
+ | |- | ||
+ | | ''Rationale'' | ||
+ | | HL7 uses attributes and vocabulary in place of distinct classes to ensure that the reference model can be expressed in a simple way. These attribute values are not changeable and need to be distinguished from others. In addition, immutable attributes may be rendered differently in some [[Requirements-Implementation Technology Specifications|Implementation Technology Specifications]]. | ||
+ | |- | ||
+ | | '' MIF'' | ||
+ | | mif-model-staticBase.xsd/Attribute/@isImmutable | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| border="2" cellspacing="0" cellpadding="3" width="600" | ||
+ | | '''Requirement''' | ||
+ | | Some attributes need to have supplemental "properties". | ||
+ | |- | ||
+ | | ''Rationale'' | ||
+ | | At the moment, some attributes are flagged with an "isDocumentCharacteristic" property that identifies how those attributes are interpreted. Other properties may be added over time. | ||
+ | |- | ||
+ | | '' MIF'' | ||
+ | | mif-model-staticBase.xsd/Attribute/property | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| border="2" cellspacing="0" cellpadding="3" width="600" | ||
+ | | '''Requirement''' | ||
+ | | Class attributes may have a number of different types of annotations | ||
|- | |- | ||
| ''Rationale'' | | ''Rationale'' | ||
Line 644: | Line 668: | ||
=Association Ends= | =Association Ends= | ||
+ | Each association has an end for each class it is connected to that describes how the association is navigated from that class. | ||
+ | |||
Most requirements for class association ends can be found in the general section on [[Requirements-Static Model Features|Static model feature requirements]] | Most requirements for class association ends can be found in the general section on [[Requirements-Static Model Features|Static model feature requirements]] | ||
+ | {| border="2" cellspacing="0" cellpadding="3" width="600" | ||
+ | | '''Requirement''' | ||
+ | | Associations must indicate whether their names are considered "locked" | ||
+ | |- | ||
+ | | ''Rationale'' | ||
+ | | HL7 uses a formal naming algorithm to ensure that association navigation names are consistent with the semantics represented by the association. Because of the requirement for association traversal name uniqueness within the context of a class, the addition or removal of associations from a class sometimes results in a change to the names of associations connected to a class. When this occurs after a model has been implemented, it creates interoperability issues. By marking the names of "old" associations within a model as 'locked', the naming algorithm knows to leave those classes alone, regardless of the addition or removal of classes and associations. | ||
+ | |- | ||
+ | | '' MIF'' | ||
+ | | mif-model-staticBase.xsd/AssociationEndBase/@nameLocked | ||
+ | |} | ||
{| border="2" cellspacing="0" cellpadding="3" width="600" | {| border="2" cellspacing="0" cellpadding="3" width="600" | ||
| '''Requirement''' | | '''Requirement''' | ||
− | | | + | | Associations that recurse must be able to identify limits on the depth of recursion. |
+ | |- | ||
+ | | ''Rationale'' | ||
+ | | Just like any other relationship, failure of implementations to be consistent in their expectations on recursion depth can result in interoperability issues. If a sender nests an association 4 deep and the receiver can only handle nesting three levels deep, information will be lost. | ||
+ | |- | ||
+ | | '' MIF'' | ||
+ | | mif-model-staticBase.xsd/AssociationEndBase/@maximumRecursionDepth | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| border="2" cellspacing="0" cellpadding="3" width="600" | ||
+ | | '''Requirement''' | ||
+ | | Associations must be able to capture "history" just the same as the HXIT datatype. | ||
+ | |- | ||
+ | | ''Rationale'' | ||
+ | | The HXIT datatype allows a timestamp and linkage to a particular ControlAct to be associated with each repetition of an attribute. This allows for detailed history information of exactly when a part of a model was changed, by whom, why, etc. This same sort of information can need to be captured for associations. And associations must therefore indicate whether that information is allowed or not. | ||
+ | |- | ||
+ | | '' MIF'' | ||
+ | | mif-model-staticBase.xsd/AssociationEndBase/@referenceHistory | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| border="2" cellspacing="0" cellpadding="3" width="600" | ||
+ | | '''Requirement''' | ||
+ | | Association ends may have a number of different types of annotations | ||
|- | |- | ||
| ''Rationale'' | | ''Rationale'' | ||
Line 671: | Line 731: | ||
* [[Requirements-Annotations#Change Request|Change Request]] | * [[Requirements-Annotations#Change Request|Change Request]] | ||
* [[Requirements-Annotations#Deprecation Information|Deprecation Information]] | * [[Requirements-Annotations#Deprecation Information|Deprecation Information]] | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| border="2" cellspacing="0" cellpadding="3" width="600" | ||
+ | | '''Requirement''' | ||
+ | | When an association points to a choice structure (an abstract class having specializations), it needs to capture traversal names for each of the classes, CMETs and stubs in the choice hierarchy. | ||
+ | |- | ||
+ | | ''Rationale'' | ||
+ | | With some ITSs, such as XML, there's a requirement that traversal names be distinct when the types are distinct. By definition, a choice structure consists of multiple potential types. Each of those types therefore requires a name. | ||
+ | |- | ||
+ | | '' MIF'' | ||
+ | | mif-model-staticBase.xsd/AssociationEndBase/ChoiceItem/@traversalName | ||
|} | |} |
Revision as of 05:25, 24 March 2010
Static models define the information structures for the data to be shared by HL7 standards. This includes the types of data elements, the constraints on those data elements and the meaning of each element.
Contents
Key Constructs
Requirement | There needs to be a mechanism of grouping data elements that are related. |
Rationale | Without organization into logical groupings, data elements become hard to manage or interpret. As well, grouping helps to define the semantics of an element by allowing inheritance of semantics from the definition of the group. |
Methodology | HL7 uses the object-oriented concept of "class" to group related data elements |
MIF | mif-model-staticBase.xsd/ClassBase |
Requirement | There needs to be a mechanism of defining the relationships between groups of related data elements. |
Rationale | The semantics of information in a model is often conveyed by the relationships between those elements. For example, the group of elements representing "Person" might be related to the group representing "Lab Result" as the subject, the performer, supervisor, etc. |
Methodology | HL7 uses the object-oriented concept of "association" to link related groups of data elements |
MIF | mif-model-staticBase.xsd/AssociationBase |
Requirement | When designing a data model, there needs to be a way of allowing choices of different groupings of concepts when constructing an instance. |
Rationale | Instances often need to allow for flexibility. For example, an observation might be made by a patient, a healthcare provider or a patient representative. The set of information to be collected would vary in each circumstance and the model must define what each group of data must be as well as indicate that any one of those options is allowed (and only those options are allowed). |
Methodology | HL7 uses the idea of "choices". A choice is an abstract class having no attributes with one or more specialization classes. Each specialization represents one of the options within the choice. |
MIF | mif-model-staticBase.xsd/ClassGeneralizationBase |
Model metadata
Requirement | Models must be able to indicate whether they are serializable or not. |
Rationale | The ability to serialize a model instance in a standardized way is essential for transmitting instances via technologies that require serialization (e.g. XML). However, other HL7 models (such as the RIM ) do not need to be serializable. Knowing whether a model is serializable indicates what sorts of things can be done with it. |
MIF | mif-model-staticBase.xsd/StaticModelBase/@isSerializable |
Requirement | It must be possible to represent one static model as a set of deltas from another static model. |
Rationale | The HL7 methodology relies on a premise of constraint where models are constructed based on other "more abstract" models using a process of derivation . Often these models only make a few constraints to the parent model. However, if the parent model is updated, these models need to be updated to remain proper constraints of the parent. By storing only the "changes" from the parent model the amount of maintenance is significantly reduced. |
MIF | mif-model-staticDerived.xsd/derivedStaticModel |
Requirement | Static models need to be able to identify what format they're represented in. |
Rationale | A given static model might be represented in its flat or serialized form or as a derived model. Because each of these representations allows different things to be done with it, it's essential to be able to differentiate what a particular representation looks like. |
MIF | mif-model-staticBase.xsd/StaticModelBase/@representationKind |
Requirement | Static models must be able to indicate the type of conformance rules that apply to the model design, specifically around the use of extensions |
Rationale | HL7 has three distinct sets of rules for models depending on what context the model is created in. In order to enforce those rules, the context must be known. |
Methodology |
|
MIF | mif-model-staticBase.xsd/StaticModelBase/@conformanceLevel |
Requirement | Static models must be able to indicate whether they are intended to be directly used in the construction of instances, or whether they are only intended to be used as design artifacts to aid the creation of other models. |
Rationale | High-level models such as the RIM, Domain Information Models, and some CIMs are not intended to be used directly in the construction of instances. They are too abstract to be safely usable. Without a way to distinguish the intended use of the models, they may be mis-used by implementers. |
MIF | mif-model-staticBase.xsd/StaticModelBase/@isAbstract |
Requirement | Static Models may have a number of different types of annotations |
Rationale | See rationales for individual annotations types |
Implementation |
Requirement | Static models must be able to be represented graphically and be able to have that graphical representation persisted. |
Rationale | Graphical representation has been found essential to enabling quick communication and understanding of model content. I.e. "A picture is worth 1000 words". |
MIF |
|
Requirement | Static models must be able to identify the other artifacts they are based on. |
Rationale | Static models depend on datatypes and vocabulary and potentially interface packages and/or annotation libraries . If someone reviewing a model doesn't have access to the same versions of these artifacts that were consulted in constructing the model, they will not be able to understand the content within the model and may even misinterpret the model. |
MIF |
|
Requirement | Static models must be able to identify the other artifacts they are based on. |
Rationale | Static models depend on datatypes and vocabulary and potentially interface packages and/or annotation libraries . |
MIF |
|
Requirement | Static models must be able to identify the other artifacts they are based on. |
Rationale | Static models depend on datatypes and vocabulary and potentially interface packages and/or annotation libraries . If someone reviewing a model doesn't have access to the same versions of these artifacts that were consulted in constructing the model, they will not be able to understand the content within the model and may even misinterpret the model. |
MIF |
|
Requirement | Static models must be able to identify supplemental datatype flavors defined locally. |
Rationale | HL7 has the concept of Datatype Flavors . In some circumstances a datatype flavor may be specific to a particular static model rather than being generically defined and applicable to a variety of static models. In these circumstances the flavor needs to be defined within the model that uses it. |
MIF | mif-model-staticBase.xsd/StaticModelBase/additionalDatatypeModel |
Requirement | Static models must be able to identify supplemental vocabulary information, particularly value sets, defined locally. |
Rationale | In some circumstances a valueset or other vocabulary artifact may be specific to a particular static model rather than being generically defined and applicable to a variety of static models. In these circumstances the vocabulary structures may need to be defined within the model that uses them. (The alternative would be having 1..1 supplemental models maintained separately which would be a maintenance nightmare. |
MIF | mif-model-staticBase.xsd/StaticModelBase/additionalVocabularyModel |
Requirement | Static models must be able to identify supplemental vocabulary information, particularly value sets, defined locally. |
Rationale | In some circumstances a valueset or other vocabulary artifact may be specific to a particular static model rather than being generically defined and applicable to a variety of static models. In these circumstances the vocabulary structures may need to be defined within the model that uses them. (The alternative would be having 1..1 supplemental models maintained separately which would be a maintenance nightmare. |
MIF | mif-model-staticBase.xsd/StaticModelBase/additionalVocabularyModel |
Requirement | Static models must be able to document vocabulary constraints or considerations that apply across the entire model. |
Rationale | While many HL7 models are constructed in a way that is independent of any particular technology solution, most models make at least some sort of assumptions about the types of technologies that will be used. These assumptions need to be understood by the implementers of the model if the model is to be implemented safely. |
MIF | mif-model-staticBase.xsd/StaticModelBase/vocabularyGuidance |
Requirement | Static models must be able to group classes into named collections based on "subject area". |
Rationale | Some models are too large to be easily understood as a whole. Even for those that are understandable, dividing of the model into a set of sub-sections helps to aid in comprehensibility. |
MIF | mif-model-staticBase.xsd/StaticModelBase/subjectAreaPackage |
Requirement | Static models need to be able to identify what coded concept they represent. |
Rationale | Some static models, generally templates, are constructed to give concrete representation to a clinical concept from one or more code systems. For example, "blood pressue". When a model has been constructed for this purpose, it needs to be able to identify what code(s) it is representing. |
MIF | mif-model-staticBase.xsd/StaticModelBase/definitionalCode |
Entry Points
Requirement | Static models must be able to identify the places where serialization can begin. |
Rationale | Most ITSs communicate static model instances in a serialized manner, for example XML. This serialization must be consistent across implementations for interoperability to occur. As well, because models connect together, the order of serialization indicates where models can connect and thus the semantics that can be expressed through the association of a class in the connecting model with the class in the target model. Consistent serialization means a consistent starting point. |
Methodology | HL7 models must have at least one entry point. Some models (which are not directly implementable) may have more than one, indicating that there is more than one class within the model that may be the 'focus' of an exchange. |
MIF | mif-model-staticFlat.xsd/StaticModel/entryPoint |
Requirement | Static models must be able to identify the places where serialization can begin. |
Rationale | Most ITSs communicate static model instances in a serialized manner, for example XML. This serialization must be consistent across implementations for interoperability to occur. As well, because models connect together, the order of serialization indicates where models can connect and thus the semantics that can be expressed through the association of a class in the connecting model with the class in the target model. Consistent serialization means a consistent starting point. |
Methodology | HL7 models must have at least one entry point. Some models (which are not directly implementable) may have more than one, indicating that there is more than one class within the model that may be the 'focus' of an exchange. |
MIF | mif-model-staticFlat.xsd/StaticModel/entryPoint |
Requirement | Entry points must have a name |
Rationale | Names allow the entry points to be referred to within a model and by humans. |
MIF | mif-model-staticFlat.xsd/StaticModel/entryPoint/@name |
Requirement | Entry points must be able to identify how they're intended to be used |
Rationale | Models can be used for a variety of purposes – as wrappers, CMETs, templates, etc. Identifying the intended use of an entry point clarifies for users of the model how the model is intended to be used from that entry point. |
MIF | mif-model-staticFlat.xsd/StaticModel/entryPoint/@useKind |
Requirement | Entry Points may have a number of different types of annotations |
Rationale | See rationales for individual annotations types |
Implementation |
Classes
Requirement | Static models must support referencing of CMETs and Stubs . |
Rationale | HL7 models cannot function in a manner that is totally self contained. Models need to be able to reference other models to allow for re-use, componentization and separation of concerns. |
MIF |
|
Requirement | Stubs, CMET references and Classes must all have unique names within a model |
Rationale | Names allow human reference and also allow explicit reference of the particular class, CMET or stub referenced by an association or entry point. |
MIF | mif-model-staticBase.xsd/ClassBase/@name |
Requirement | Classes based on RIM immutable coded attributes must be able to identify their associated structural vocabulary. |
Rationale | The RIM uses structural vocabulary to supplement its object hierarchy. Thus knowing the base physical class in the RIM is not sufficient to know the full meaning of a class. In the case of stubs and CMETs, the vocabulary reference identifies the physical class that will be at the root of the referenced model. For classes in the RIM, the vocabulary reference identifies the location within structural vocabulary hierarchy that corresponds to a class in the physical class hierarchy. |
MIF | mif-model-staticBase.xsd/ClassBase/definingVocabulary |
Requirement | Classes must indicate whether their names are considered "locked" |
Rationale | HL7 uses a formal naming algorithm to ensure that class names are consistent with the semantics represented by the class. Because of the requirement for class name uniqueness in the model, the addition or removal of classes from a model sometimes results in a change to the names within a model. When this occurs after a model has been implemented, it creates interoperability issues. By marking the names of "old" classes within a model as 'locked', the naming algorithm knows to leave those classes alone, regardless of the addition or removal of classes. |
MIF | mif-model-staticBase.xsd/ClassBase/@nameLocked |
Requirement | Classes derived from the RIM must be able to distinguish whether omitted attributes and associations are prohibited or unconstrained. |
Rationale | In models like RMIMs, omitting an attribute present in the RIM class an RMIM class is derived from means that the attribute is not allowed to appear in instances (except potentially as an extension.) However, in some templates, the desire is to only enforce constraints on what elements must appear, not to prohibit the appearance of anything unspecified. Without an indicator as to which approach is desired, the class cannot be correctly implemented |
MIF | mif-model-staticBase.xsd/ClassBase/@isComplete |
Requirement | Classes, CMETs and Stubs may have a number of different types of annotations |
Rationale | See rationales for individual annotations types |
Implementation |
Requirement | At a given class within a static model, the model must be able to assert what templates can be applied and what templates are known that might optionally be applied at that location. |
Rationale | Templates allow the application of a set of constraints to a model without altering the wire-format of the instance. As such, templates represent re-usable constraints. Rather than copying those constraints into every model where they need to apply, it is easier to just reference the template. This also significantly simplifies the maintenance effort. Listing of optional templates simplifies things for implementers by providing them with a list of optional constraint sets that are known to be appropriate. |
MIF |
|
State Machines
Requirement | Classes with state attributes must be able to define their state machines. |
Rationale | State machines help define the dynamic behavior of objects instantiating a class. This helps clarify the semantics of a class and also identifies what can be done with it over time. |
MIF | mif-model-staticBase.xsd/ClassBase/behavior |
Requirement | Classes with state attributes must be able to define their state machines. |
Rationale | State machines help define the dynamic behavior of objects instantiating a class. This helps clarify the semantics of a class and also identifies what can be done with it over time. |
MIF | mif-model-staticBase.xsd/ClassBase/behavior |
Requirement | The state machine must identify the attribute to which the state machine applies. |
Rationale | It's hard to use a state machine if you don't know where to convey or find the current state . . . |
MIF | mif-model-staticBase.xsd/ClassBase/behavior/@stateAttributeName |
Requirement | State machines may have a number of different types of annotations |
Rationale | See rationales for individual annotations types |
Implementation |
Requirement | The state machine must be able to be represented graphically |
Rationale | A diagram of a state machine is much easier to understand than a flat enumeration of states and transitions |
MIF | mif-model-staticBase.xsd/ClassBase/behavior/figure |
Requirement | State machines must list the states they contain, including name |
Rationale | A state machine doesn't accomplish much if you don't know what the states are |
MIF | mif-model-staticBase.xsd/ClassBase/behavior/subState |
Requirement | Staes may have a number of different types of annotations |
Rationale | See rationales for individual annotations types |
Implementation |
Requirement | States must be able to contain sub-states |
Rationale | Sometimes a given state can be partitioned into multiple substates and both the superstate and its substates can be of interest in different use-cases |
MIF | mif-model-staticBase.xsd/ClassBase/behavior/subState/containedStates |
Requirement | State machines must list the state transitions they support, including name |
Rationale | A state machine that doesn't permit transitions between the states doesn't accomplish much. |
MIF | mif-model-staticBase.xsd/ClassBase/behavior/transition |
Requirement | State Transitions may have a number of different types of annotations |
Rationale | See rationales for individual annotations types |
Implementation |
Attributes
Most requirements for class attributes can be found in the general section on Static model feature requirements
Requirement | Some attributes need to be marked as "immutable" |
Rationale | HL7 uses attributes and vocabulary in place of distinct classes to ensure that the reference model can be expressed in a simple way. These attribute values are not changeable and need to be distinguished from others. In addition, immutable attributes may be rendered differently in some Implementation Technology Specifications. |
MIF | mif-model-staticBase.xsd/Attribute/@isImmutable |
Requirement | Some attributes need to have supplemental "properties". |
Rationale | At the moment, some attributes are flagged with an "isDocumentCharacteristic" property that identifies how those attributes are interpreted. Other properties may be added over time. |
MIF | mif-model-staticBase.xsd/Attribute/property |
Requirement | Class attributes may have a number of different types of annotations |
Rationale | See rationales for individual annotations types |
Implementation |
Association Ends
Each association has an end for each class it is connected to that describes how the association is navigated from that class.
Most requirements for class association ends can be found in the general section on Static model feature requirements
Requirement | Associations must indicate whether their names are considered "locked" |
Rationale | HL7 uses a formal naming algorithm to ensure that association navigation names are consistent with the semantics represented by the association. Because of the requirement for association traversal name uniqueness within the context of a class, the addition or removal of associations from a class sometimes results in a change to the names of associations connected to a class. When this occurs after a model has been implemented, it creates interoperability issues. By marking the names of "old" associations within a model as 'locked', the naming algorithm knows to leave those classes alone, regardless of the addition or removal of classes and associations. |
MIF | mif-model-staticBase.xsd/AssociationEndBase/@nameLocked |
Requirement | Associations that recurse must be able to identify limits on the depth of recursion. |
Rationale | Just like any other relationship, failure of implementations to be consistent in their expectations on recursion depth can result in interoperability issues. If a sender nests an association 4 deep and the receiver can only handle nesting three levels deep, information will be lost. |
MIF | mif-model-staticBase.xsd/AssociationEndBase/@maximumRecursionDepth |
Requirement | Associations must be able to capture "history" just the same as the HXIT datatype. |
Rationale | The HXIT datatype allows a timestamp and linkage to a particular ControlAct to be associated with each repetition of an attribute. This allows for detailed history information of exactly when a part of a model was changed, by whom, why, etc. This same sort of information can need to be captured for associations. And associations must therefore indicate whether that information is allowed or not. |
MIF | mif-model-staticBase.xsd/AssociationEndBase/@referenceHistory |
Requirement | Association ends may have a number of different types of annotations |
Rationale | See rationales for individual annotations types |
Implementation |
Requirement | When an association points to a choice structure (an abstract class having specializations), it needs to capture traversal names for each of the classes, CMETs and stubs in the choice hierarchy. |
Rationale | With some ITSs, such as XML, there's a requirement that traversal names be distinct when the types are distinct. By definition, a choice structure consists of multiple potential types. Each of those types therefore requires a name. |
MIF | mif-model-staticBase.xsd/AssociationEndBase/ChoiceItem/@traversalName |