Real Time Information Director User Documentation

RTID Metadata Language
Hewlett-Packard Company 52 529618-002
new LeftJoin("CHECKOUTITEM", "CI",
"CO.CHECKOUTID=CI.CHECKOUTID"),
new LeftJoin("ITEM", "I", "CI.ITEMID=I.ITEMID"),
new LeftJoin("TITLE", "T", "I.ISBN=T.ISBN"),
new OrderBy("CO.CARDID, CO.CHECKOUTDATE, T.LASTNAME,
T.FIRSTNAME, T.TITLE"),
new ColumnList("CO.CARDID CO.BRANCHID CO.CHECKOUTDATE
CI.ITEMID CI.CHECKOUTID CI.CHECKOUTDATE CI.DUEDATE CI.RETURNEDDATE
I.ISBN I.BRANCHID I.CHECKEDOUTID T.TITLE T.LASTNAME T.FIRSTNAME
T.CHECKEDOUTCOPIES T.CUMULATIVECHECKOUTS T.CATEGORY"),
new Condition("CI.DUEDATE < CURRENT_DATE AND
CI.RETURNEDDATE IS NULL")
});
Once you’ve defined an enriched record, you can use the record name instead of a table
name in calls to metadata class constructors. For more discussion of enriched records,
see “The EnrichedRecord Class,” later in this document.
This section gives an overview of the predefined enrichments you can use in document
definitions. Later sections include examples of most of these enrichments. You can also
create your own enrichments; for example, some solutions involving RTID use
enrichments to invoke external services, such as business rules and cleansing. For
information about writing enrichments, see “Writing Enrichments,” later in this
document.
SystemKey
The SystemKey enrichment generates a unique 64-bit number and assigns that number to
a column in a table. This enrichment is usually used to generate a unique key for a
record. This enrichment references a KeyDispenser object to obtain the unique number.
A separate KeyDispenser is constructed for each logically independent keyspace. For
example, the EHR example uses one KeyDispenser for obtaining unique IDs for any
agent or consumer, whether a patient, a doctor, or some other person known to the
system. A separate KeyDispenser is used to obtaining unique health encounter IDs.
If you intend to partition data according to a unique key, use the PartitionedSystemKey
enrichment rather than this one. PartitionedSystemKey is introduced in the section called
Partitioning,” later in this document.
The SystemKey constructor looks like this:
public SystemKey(String fieldName, KeyDispenser keyDispenser)