Real Time Information Director User Documentation
  RTID Message Format and Programmatic Interfaces 
Hewlett-Packard Company  6  529618 - 002 
<SOURCE_REFERENCE_DOCUMENT_NO>00001</SOURCE_REFERENCE_DOCUMEN
T_NO> 
</HEADER> 
<ENCOUNTER> 
  <EXTERNALIDENTIFIER>PAT00002</EXTERNALIDENTIFIER> 
  <IDENTIFIERTYPECODE>CRN</IDENTIFIERTYPECODE> 
    …  
  <ENCOUNTERACTION>BRTH</ENCOUNTERACTION> 
 <CHARTENTRY> 
  … 
   </CHARTENTRY> 
</ENCOUNTER> 
  </PATIENTEVENTS> 
Keys in Query Documents 
An important part of any query document is the <KEYS> section. It lists the primary key 
columns and the input values corresponding to each column. Sometimes the <KEYS> 
section lists all primary key columns, in which case the output from the query will 
contain zero or one records. If the <KEYS> section a subset of the primary key columns, 
the output from the query will contain zero, one or more records that match the key 
values given in the input. 
The following query document, called ChinnQueryMichaelEventsHistory.xml, is in the 
file ehr_metadata.zip: 
<PATIENTEVENTSHISTORY_R> 
  <HEADER> 
    . . . 
  </HEADER> 
  <KEYS> 
  <EXTERNALIDENTIFIER>PAT00002</EXTERNALIDENTIFIER> 
  <IDENTIFIERTYPECODE>CRN</IDENTIFIERTYPECODE> 
  </KEYS> 
</PATIENTEVENTSHISTORY_R> 
Note the <KEYS> section in the query. It lists all the key values needed to select data, in 
this case from a table called PERSON (not named in the query document). The output 
will contain zero or one <PERSON> records. 
Handling of Blanks in Input Fields 
The handling of blanks when they occur in an input XML document depends on which of 
the following cases applies: 
•  An element in the document definition is not present in the input document 
•  The value part of an element consists of white spaces 
•  The element is present but empty (has no value) 










