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

Difference between revisions of "Use of HL7 templates in CP"

From HL7Wiki
Jump to navigation Jump to search
 
(62 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Patient Care]]
+
[[Patient Care]] | [[Patient Care Normative Ballot Content]]
  
[[Patient Care Normative Ballot Content]]
+
== Use of Templates in Care Provision ==
  
== '''Use of Templates in Care Provision'''==
+
=== HL7 Templates ===
 +
An HL7 template is a constraint on models based on the HL7 Reference Information Model (RIM). It expresses the data content needed in a specific clinical or administrative context.
  
The Care Provision Domain D-MIMs and R-MIMs for specific message topics depend on the RIM, vocabulary and modeling approaches like any message domain. However, two HL7 base materials are fundamental for all the Care Provision messages. These are the Clinical Statement Pattern (CSP), specifically the CMET COCT_MT530000 (A_SupportingClinicalStatement universal), which in this normative materials replaces the earlier Care_Statement CMET, and a templating approach. The Care Provision D-MIM has the A_SupportingClinicalStatement as core specification mechanism for the numerous date elements for clinical content in Care Records and Care Record based messages. In the D-MIM there are pointers to underlying R-MIMs via the Entry Points. Each Entry Point refers to a RIM based structure that specifies a particular message model. Each of these Entry Points uses the 2011 template approach, which is described here briefly.  
+
In healthcare there are prescribed patterns by which, for example, multiple observations may be combined to describe selected, gross observations. Some observations may be simple, such as the single lab result (e.g. potassium in blood is 4.4 mEq/L) or the blood pressure concept, which involves a set of expected observations (i.e., systolic, diastolic, patient position, method, etc.). Other more elaborate diagnostic procedures may involve hundreds of related pieces of information, including anatomy, orientation, sequences of measurements, etc.
  
Care Provision D-MIM uses the CSP as whole, which can also be used as the source for an HL7 template. Or more precise: a CSP-derived R-MIM model can be used to create a more specialized HL7 template.  Care Provision does not include a full description of HL7 templates (see the HL7 template specification "Specification and Use of Reusable Constraint Templates" and the Sept 2011 DSTU work on templates for that). However, since all Care Provision message models depend on the template approach, it is explained here in basic terms.  An CSP based HL7 template used in Care Provision is a RIM-based model that is applied on top or as further specification of another RIM model. It can be in the form of a series of RIM compatible assertions (commonly seen in CDA templates, e.g. CCD), or it can be a graphical RIM-based model, such as Patient Care has developed several as roll outs or constraints on the CSP. Any RIM model can be used as a template. All HL7 CMETs for instance are capable of being used as templates, as is the CSP as a whole, or any model using the CSP or being derived from the CSP. Templates are more of a method of combining several models than a technique for individual modeling.  
+
In HL7, more or less generic models exist; the Patient Care model, especially the Care Statements = Clinical Statement Pattern (CSP) is one of it. Templates provide a method of describing rules for combining and constraining HL7 v3 XML instances like a Patient Care message. Templates can be used for three purposes:
 +
* To have a guideline to create (a fragment of) a Patient Care message instance
 +
* To validate an instance whether it conforms to the specified template rules
 +
* To have a guidance while processing a Patient Care message instance.
  
To use an HL7 graphical template e.g. an R-MIM, on the Care Provision model, you simply create another RIM based model that is a true constraint of Care Provision and CSP (for example, an assessment scale). This new model is your template. Your implementation guide then states that all messages must conform to the existing Care Provision model in the normal way, to the CSP in the normal way, and additionally, the parts of message instances that deal with the assessment scale must conform to your new assessment scale instance template. This does not mean that all parts of a Care Provision must look like assessment scales, only the parts of it that you specify. Patient Care is specifying several clinical contents materials into Detailed Clinical Models (DCM). These normally allow multiple terminology and code bindings. Once the DCMs are specified to function in Care Provision R-MIMs, they are transformed into Clinical Statements / clinical statement based HL7 templates. In this process, one action is to choose one code only for implementation. So creating an implementation specification from a DCM means that the specified clinical content will adhere to the CSP in general, and has to confirm to the instance template specification for codes among other constraints.
+
The last point should be considered carefully, because an instance must convey fully semantics even without knowing the underlying template.
A whole series of different CSP derived templates can be used on top of a compatible model (such as CDA in general and CCD in particular) to describe the various clinical data sets, codes and value sets, and other constraints that are needed.
 
Unfortunately there is no tooling that directly supports checking of the clinical part of the message against the CSP and the template, although it is possible to create XSD schemas and schematron to do this second stage validation in addition to the normal HL7 XSD check.  
 
Each Clinical Statement use in Patient Care is organized as follows:
 
  
* Each topic has a narrative description defining the scope and use case.
+
Based on user need and preference, the template ideally is a structure that can be used as a building block and, once defined, can be re-used whenever appropriate.
* Each topic has an associated Figure, showing a subset of the Care Provision model and/or Clinical Statement model being constrained. It should be noted that the entire Care Provision D-MIM and Clinical Statement models are available for use, and that the topics are only focusing on specific use cases and required constraints.  
+
 
*  Each topic has a set of constraints, expressed using conformance verbs (e.g. "shall", "should", "may").  
+
=== Kinds of Patient Care templates ===
*  Each topic has a template identifier, which can be used to populate the InfrastructureRoot.templateId attribute of an instance. An instance that thus populates the templateId attribute is claiming conformance to the corresponding topic.
+
The Patient Care standard describes conformance requirements in terms of two general levels:
 +
* '''Message root level''' templates: they define / refine the overall structure of a message starting from the Care Provision class, which templates are contained in the message and whether they are optional or required.
 +
* '''Substructure level''' templates (patient, provider etc.)
 +
* '''Clinical Statement level''' templates: impose the Clinical Statement Pattern of a Patient Care message; they define the constraints on the classes, class attributes, data types and class relationships.
 +
 
 +
=== Template Identifiers in instances ===
 +
Template identifiers (templateId) are assigned at the Message root level and Clinical Statement level. When valued in an instance, the template identifier signals the imposition of a set of template-defined constraints. The value of this attribute, e.g.
 +
 
 +
<code>
 +
<templateId root="2.16.840.1.113883.10.1.2.3" />
 +
</code>
 +
 
 +
provides a unique identifier for the template in question.
 +
 
 +
If a template is a specialization of another template, its first constraint indicates the more general template. The general template is not always required. In all cases where a more specific template conforms to a more general template, asserting the more specific template also implies conformance to the more general template.
 +
 
 +
=== Open and Closed Templates ===
 +
In open templates, all of the features of the Patient Care based specification are allowed except as constrained by the templates. By contrast, a closed template specifies everything that is allowed and nothing further may be included.
 +
 
 +
Open templates allow HL7 implementers to develop additional content not constrained within the template. HL7 encourages implementers to bring their use cases forward as candidate requirements to be formalized in a subsequent version of the standard to maximize the use of shared semantics.
 +
 
 +
In general, Patient Care defines open templates only.
 +
 
 +
=== Expressing Constraints in Templates ===
 +
Constraints expressed in templates may determine
 +
* The data type or a data type flavor
 +
* The cardinality
 +
* The conformance, e.g. if data may be absent (nullFlavor)
 +
* Vocabulary bindings and coding strengths
 +
* Possible fixed values
 +
* Additional properties such as units (measurements), ranges, fraction digits
 +
of a class attribute. In general this means to determine the properties of an XML element or an XML attribute. In addition, containment relationship and co-occurances of items may also be determined.
 +
 
 +
===Containment Relationship===
 +
The containment relationship constraints between a specific structure (context) in an XML instance and sub-structures in that context (child elements).
 +
 
 +
They may be indirect, meaning that where a structure asserts containment of a substructure, that substructure can either be a direct child or a further descendent of that structure, or be direct, meaning that the contained substructure shall be a direct child of the structure.
 +
 
 +
{{BeginBlueBox|Example}}
 +
A report about the first prenatal visit of a pregnant woman with historical findings recorded by an obstetrician or a midwife should contain an observation about the number of pregnancies so far (including the actual pregnancy), also known as “gravidity” (in this example with id 2.16.840.1.113883.2.4.6.10.90.1053).
 +
 
 +
Assume that the underlying model allows for clinical statements like an observation via a component relationship. Then a conformant instance
 +
<ol>
 +
<li>SHALL contain exactly one [1..1] component such that it
 +
<ol style="list-style-type:lower-alpha">
 +
  <li>SHALL contain exactly one [1..1] @typeCode="COMP" (CodeSystem: HL7ActRelationshipType 2.16.840.1.113883.5.1002)</li>
 +
  <li>SHALL contain exactly one [1..1] GravidityObservation (template id 2.16.840.1.113883.2.4.6.10.90.1053)</li>
 +
</ol>
 +
</li>
 +
</ol>
 +
Assume that the referenced template is an observation with a LOINC code 11996-6 (number of pregnancies, reported), then the above example could be properly expressed as follows.
 +
<code>
 +
<component typeCode="COMP">
 +
    <observation classCode="OBS" moodCode="EVN">
 +
        <templateId root="2.16.840.1.113883.2.4.6.10.90.1053"/>
 +
        <code code="11996-6" codeSystem="2.16.840.1.113883.6.1"/>
 +
        <value xsi:type="INT" value="2"/>
 +
    </observation>
 +
</component>
 +
</code>
 +
{{EndBlueBox}}
 +
 
 +
===Co-Occurance===
 +
 
 +
Co-occurance means the presence of some data depending on the presence or value of some other data. There are intra-instantial co-occurances where a condition applies to one single instance, and extra-instantial co-occurances where the presence of data in an instance is influenced by external factors (outside the very same instance).
 +
 
 +
In this domain, only intra-instantial co-occurances are handled: depending on some conditions in an instance, other data in the same instance needs to be present or valued.
 +
 
 +
{{BeginBlueBox|Example: Amnionicity and Chorionicity}}
 +
Assume, that if the number of fetuses of a pregnant woman is more than 1 (multiple gestation), than an Amnionicity observation – number of fluid filled / (amniotic) sacs – and a Chorionicity observation– type of placentation – need to be reported.
 +
 
 +
Co-occurance: If number of fetuses > 1 an ''AmnionicityObservation'' and a ''ChorionicityObservation'' is required, otherwise not present.
 +
{{EndBlueBox}}
 +
 
 +
{{BeginBlueBox|Example: Immunization activity}}
 +
An Immunization Activity can also include that a certain vaccination was not given (expressed as a negationInd/actNegationInd of the associated substance administration is valued “true”).
 +
 
 +
Assume that a business rule says that in this case an Immunization Refusal Reason shall be stated.
 +
 
 +
Co-occurance: if substanceAdministration.negationInd = true then ''ImmunizationRefusalReason'' is required, otherwise optional.
 +
{{EndBlueBox}}
 +
 
 +
===Template canonical form===
 +
The templates defined in this domain will follow the new HL7 canonical form that is defined in the Templates Working Group.

Latest revision as of 07:50, 5 March 2012

Patient Care | Patient Care Normative Ballot Content

Use of Templates in Care Provision

HL7 Templates

An HL7 template is a constraint on models based on the HL7 Reference Information Model (RIM). It expresses the data content needed in a specific clinical or administrative context.

In healthcare there are prescribed patterns by which, for example, multiple observations may be combined to describe selected, gross observations. Some observations may be simple, such as the single lab result (e.g. potassium in blood is 4.4 mEq/L) or the blood pressure concept, which involves a set of expected observations (i.e., systolic, diastolic, patient position, method, etc.). Other more elaborate diagnostic procedures may involve hundreds of related pieces of information, including anatomy, orientation, sequences of measurements, etc.

In HL7, more or less generic models exist; the Patient Care model, especially the Care Statements = Clinical Statement Pattern (CSP) is one of it. Templates provide a method of describing rules for combining and constraining HL7 v3 XML instances like a Patient Care message. Templates can be used for three purposes:

  • To have a guideline to create (a fragment of) a Patient Care message instance
  • To validate an instance whether it conforms to the specified template rules
  • To have a guidance while processing a Patient Care message instance.

The last point should be considered carefully, because an instance must convey fully semantics even without knowing the underlying template.

Based on user need and preference, the template ideally is a structure that can be used as a building block and, once defined, can be re-used whenever appropriate.

Kinds of Patient Care templates

The Patient Care standard describes conformance requirements in terms of two general levels:

  • Message root level templates: they define / refine the overall structure of a message starting from the Care Provision class, which templates are contained in the message and whether they are optional or required.
  • Substructure level templates (patient, provider etc.)
  • Clinical Statement level templates: impose the Clinical Statement Pattern of a Patient Care message; they define the constraints on the classes, class attributes, data types and class relationships.

Template Identifiers in instances

Template identifiers (templateId) are assigned at the Message root level and Clinical Statement level. When valued in an instance, the template identifier signals the imposition of a set of template-defined constraints. The value of this attribute, e.g.

<templateId root="2.16.840.1.113883.10.1.2.3" />

provides a unique identifier for the template in question.

If a template is a specialization of another template, its first constraint indicates the more general template. The general template is not always required. In all cases where a more specific template conforms to a more general template, asserting the more specific template also implies conformance to the more general template.

Open and Closed Templates

In open templates, all of the features of the Patient Care based specification are allowed except as constrained by the templates. By contrast, a closed template specifies everything that is allowed and nothing further may be included.

Open templates allow HL7 implementers to develop additional content not constrained within the template. HL7 encourages implementers to bring their use cases forward as candidate requirements to be formalized in a subsequent version of the standard to maximize the use of shared semantics.

In general, Patient Care defines open templates only.

Expressing Constraints in Templates

Constraints expressed in templates may determine

  • The data type or a data type flavor
  • The cardinality
  • The conformance, e.g. if data may be absent (nullFlavor)
  • Vocabulary bindings and coding strengths
  • Possible fixed values
  • Additional properties such as units (measurements), ranges, fraction digits

of a class attribute. In general this means to determine the properties of an XML element or an XML attribute. In addition, containment relationship and co-occurances of items may also be determined.

Containment Relationship

The containment relationship constraints between a specific structure (context) in an XML instance and sub-structures in that context (child elements).

They may be indirect, meaning that where a structure asserts containment of a substructure, that substructure can either be a direct child or a further descendent of that structure, or be direct, meaning that the contained substructure shall be a direct child of the structure.

Example

A report about the first prenatal visit of a pregnant woman with historical findings recorded by an obstetrician or a midwife should contain an observation about the number of pregnancies so far (including the actual pregnancy), also known as “gravidity” (in this example with id 2.16.840.1.113883.2.4.6.10.90.1053).

Assume that the underlying model allows for clinical statements like an observation via a component relationship. Then a conformant instance

  1. SHALL contain exactly one [1..1] component such that it
    1. SHALL contain exactly one [1..1] @typeCode="COMP" (CodeSystem: HL7ActRelationshipType 2.16.840.1.113883.5.1002)
    2. SHALL contain exactly one [1..1] GravidityObservation (template id 2.16.840.1.113883.2.4.6.10.90.1053)

Assume that the referenced template is an observation with a LOINC code 11996-6 (number of pregnancies, reported), then the above example could be properly expressed as follows.

<component typeCode="COMP">
   <observation classCode="OBS" moodCode="EVN">
       <templateId root="2.16.840.1.113883.2.4.6.10.90.1053"/>
       
       <value xsi:type="INT" value="2"/>
   </observation>
</component>

Co-Occurance

Co-occurance means the presence of some data depending on the presence or value of some other data. There are intra-instantial co-occurances where a condition applies to one single instance, and extra-instantial co-occurances where the presence of data in an instance is influenced by external factors (outside the very same instance).

In this domain, only intra-instantial co-occurances are handled: depending on some conditions in an instance, other data in the same instance needs to be present or valued.

Example: Amnionicity and Chorionicity

Assume, that if the number of fetuses of a pregnant woman is more than 1 (multiple gestation), than an Amnionicity observation – number of fluid filled / (amniotic) sacs – and a Chorionicity observation– type of placentation – need to be reported.

Co-occurance: If number of fetuses > 1 an AmnionicityObservation and a ChorionicityObservation is required, otherwise not present.

Example: Immunization activity

An Immunization Activity can also include that a certain vaccination was not given (expressed as a negationInd/actNegationInd of the associated substance administration is valued “true”).

Assume that a business rule says that in this case an Immunization Refusal Reason shall be stated.

Co-occurance: if substanceAdministration.negationInd = true then ImmunizationRefusalReason is required, otherwise optional.

Template canonical form

The templates defined in this domain will follow the new HL7 canonical form that is defined in the Templates Working Group.