Load RIM

From DOC

Jump to: navigation, search

Loading HL7 Reference Information Model (RIM) objects

Contents

Objectives

  • RIM is loaded to the Wiki under program control
  • Loaded content is to be read only by end-users
  • End-users are encouraged to comment on RIM content using the Discussion (talk) pages behind each RIM page
  • The loaded content will be versioned (in the usual way) such that only updated terms will get a new article version in the Wiki.
  • The loaded content is represented both visually and semantically
  • One article per RIM object
  • RIM objects depend on HL7 Datatypes

Source File

RIM objects are loaded from an HL7 MIF2 file named rim.coremif.

Each class defined in the source MIF results in a single article created in the Wiki.

Article Name

The name of the article is the combination of the class name and the string (RIM). For example, the page name for the Act class is:

Act (RIM)

The space before (RIM) is significant.

Class Declaration

A class element begins the definition of a RIM class. XPath is:

mif:containedClass/mif:class

For example:

<mif:containedClass>
    <mif:class name="Act" isAbstract="false">

The class is represented in the Wiki page as a template call. For example:

{{Class (RIM)|name=Act|isAbstract=false|extends=infrastructureRoot}}

The extends parameter does not come from the class definition itself but rather its superclass. For example, the Act would be found in a list of child classes within the InfrastructureRoot class in the MIF.

   <mif:containedClass>
      <mif:class name="InfrastructureRoot" isAbstract="false">
         ....
         <mif:childClass sortKey="01" name="Act"/>

Therefore, the Act class extends InfrastructureRoot.

Class Description

Within the mif:class element is the description of the class. XPath within Class Declaration is:

mif:annotations/mif:documentation/mif:definition/mif:text

The description contains pure HTML and therefore must be surrounded by html tags when loaded into the wiki page. For example:

<mif:annotations>
   <mif:documentation>
      <mif:definition>
         <mif:text>
            <html:p xmlns:html="http://www.w3.org/1999/xhtml">A record of 
            something that is being done, has been done, can be done, 
            or is intended or requested to be done.</html:p>
...

would be inserted into the page as:

<html>
   <html:p xmlns:html="http://www.w3.org/1999/xhtml">A record of something that...
</html>

Add the following heading in order to separate Class definition from Attribute definitions.

==== Attributes ====

Attribute Declaration

One or more attributes occur within the Class Element. XPath within Class Declaration is:

mif:attribute

For example:

<mif:attribute name="classCode" sortKey="005" isImmutable="true" 
    minimumMultiplicity="1" maximumMultiplicity="1" isMandatory="true">
...

Within the mif:attribute element are other elements that must be included in the resulting Wiki page. These are at XPath:

mif:type
mif:vocabulary
mif:vocabulary/mif:vocabularyDomain

The vocabulary element is optional (it occurs on CD, CE, and CS type attributes). For example:

    <mif:type name="CD"/>
    <mif:vocabulary codingStrength="CWE">
       <mif:vocabularyDomain name="ActCode"/>
    </mif:vocabulary>

Each attribute header item is inserted into the Wiki page as a template as shown (One attribute per line though this example is wrapped).

{{Attribute (RIM)|name=classCode|sortKey=005|isImmutable=true|
    minimumMultiplicity=1|maximumMultiplicity=1|isMandatory=true|
    type=CD|codingStrength=CWE|vocabularyDomain=ActCode}}


Attribute Description

Within the mif:attribute element is the description of the attribute (this is similar to the Class description).

mif:annotations/mif:documentation/mif:definition/mif:text

The attribute description contains pure HTML and therefore must be surrounded by html tags when loaded into the wiki page. For example:

<mif:annotations>
   <mif:documentation>
      <mif:definition>
         <mif:text>
            <html:p xmlns:html="http://www.w3.org/1999/xhtml">A code specifying 
            the major type of Act that this Act-instance represents.</html:p>
...

would be inserted into the page as:

<html>
    <html:p xmlns:html="http://www.w3.org/1999/xhtml">A code specifying 
     the major type of Act that this Act-instance represents.</html:p>
    ...
</html>

RIM Class Summary

The resulting entry for a single RIM class, in this case Act (RIM) should look something like this:

{{Class (RIM)|name=Act|isAbstract=false|extends=InfrastructureRoot}}
<html>
   <html:p xmlns:html="http://www.w3.org/1999/xhtml">A record of something that...
</html>
==== Attributes ====
{{Attribute (RIM)|name=classCode|sortKey=005|isImmutable=true|
    minimumMultiplicity=1|maximumMultiplicity=1|isMandatory=true|
    type=CS|codingStrength=CNE|vocabularyDomain=ActClass}}
  <html>
    <html:p xmlns:html="http://www.w3.org/1999/xhtml">A code specifying 
     the major type of Act that this Act-instance represents.</html:p>
     ...
  </html>
{{Attribute (RIM)|name=moodCode|sortKey=006|isImmutable=true|
    minimumMultiplicity=1|maximumMultiplicity=1|isMandatory=true|
    type=CS|codingStrength=CNE|vocabularyDomain=ActMood}}
  <html>
     <html:p xmlns:html="http://www.w3.org/1999/xhtml">A code distinguishing whether
     ...
  </html>

See actual result at: Act (RIM)

Personal tools