Real Time Information Director User Documentation

RTID Metadata Language
Hewlett-Packard Company 74 529618-002
The first step is to define the mapping table by constructing, statically, the
UnqualifiedMapper object. The constructor of UnqualifiedMapper takes the same
parameters that the constructor of Mapper takes, plus one additional parameter: the name
of the column that contains the category name.
The second step is to identify a mapping category by calling the qualify method of the
UnqualifiedMapper. The qualify method takes one parameter, the name of the category.
The qualify method produces a QualifiedMapper (a subclass of Mapper), which restricts
the lookup to records in the specified category.
The following example illustrates the construction of QualifiedMappers to describe the
typecodes table in the EHR application. The UnqualifiedMapper describes a table called
TYPECODE, within which the TYPECODE column contains an internal ID, the
DESCRIPTION column contains the external ID, and the TYPESUBJECT is the
category (the kind of information the typecode represents). Each invocation of the
qualify method specifies the value of TYPESUBJECT to be used in a particular case. For
example, if a document definition makes use of the immunisationCodeMapper, the
lookup will consider only rows of the TYPECODE table in which the value of the
TYPESUBJECT column is IMMUNISATION.
Note: If you look back at the example of the simple mapping enrichment, you’ll notice
that most of the examples include, as one of the external identifying elements, something
called a TYPECODE. That use of TYPECODE is unrelated to the column name in the
TYPECODE table. The EHR example just happens to use TYPECODE for several
different purposes.
public static final UnqualifiedMapper typeCodeMapper = new
UnqualifiedMapper("TYPECODE",
"TYPECODE", "DESCRIPTION", "TYPESUBJECT");
public static final Mapper immunisationCodeMapper =
typeCodeMapper.qualify("IMMUNISATION");
public static final Mapper encounterTypeMapper =
typeCodeMapper.qualify("ENCOUNTERTYPE");
public static final Mapper observationCodeMapper =
typeCodeMapper.qualify("OBSERVATIONCODE");
public static final Mapper testTypeMapper =
typeCodeMapper.qualify("TESTTYPE");
The third step is to invoke the map method within various document definitions. The
method invocation looks just like the invocation used for a simple mapping, but this time,
the document definition is actually invoking a method of the QualifiedMapper class. The
method invocation doesn’t have to specify the category for the lookup, because the
underlying QualifiedMapper already defines the category. For example, if the document
definition invokes the encounterTypeMapper, neither the method invocation nor the input