Real Time Information Director User Documentation
    RTID Metadata Language 
Hewlett-Packard Company  73  529618-002   
These enrichments come into play when a patient’s chart needs to be updated as the result 
of a medical encounter. Here is an excerpt from the UpdateEncounter document 
definition. This document definition refers to several of the enriched records defined in 
EHR.java: 
public class UpdateEncounter extends NativeDocumentDefinition 
{ 
  private static DocumentRecord documentRecord = 
 new DocumentRecord(EHR.lookupEncounterRecord,  
 new RelatedRecords(EHR.externalChartEntryRecord, new 
RelatedRecords[] { 
 new RelatedRecords(EHR.observationRecord), 
 new RelatedRecords(EHR.externalTestsRecord), 
 new 
RelatedRecords(EHR.externalMedicationRecord), 
 new 
RelatedRecords(EHR.externalImmunisationRecord), 
 new RelatedRecords(EHR.externalReportsRecord), 
 new RelatedRecords(EHR.externalReferralRecord) 
 })); 
 … 
 public UpdateEncounter() 
 throws DirectorException  
 { 
 super(documentRecord, "UPDATEENCOUNTER", "UPSERT"); 
 } 
} 
When an UpdateEncounter document arrives, the Director fetches and stores the internal 
IDs for the provider and the organization in various tables. When a query arrives for the 
same information, the Director fetches and delivers the external IDs used within the 
application. 
Procedure to Create a QualifiedMapping Enrichment 
Sometimes it is convenient to use a single mapping table can be used to store various 
categories of lookup values. For instance, the EHR example contains a type codes table 
that contains various valid abbreviations along with the complete descriptions. The 
TYPECODE column identifies the category of abbreviation, such as "TESTTYPE" or 
"IMMUNISATION". 
In a case where the same lookup table performs double or triple duty, the metadata must 
do more than correlate external and internal IDs: it must also specify the category of the 
lookup, for example whether to look up the ID for a test or an immunization. (In this 
scheme, a test and an immunization could have the same ID.) The category indicates 
which records in the lookup table to consider. 
The procedure to create this kind of mapping consists of three steps instead of two. 










