Real Time Information Director User Documentation
  RTID Message Format and Programmatic Interfaces 
Hewlett-Packard Company  18  529618 - 002 
•  DocumentHelper initializes the Director, sets various modes (for instance, to 
enable statistics gathering), and eventually frees document processing resources. 
•  UpdateHelper constructs and submits a new update document. 
•  QueryHelper constructs and submits a new query document. 
•  Group represents the document internally and provides methods for adding and 
reading records and their constituent elements. 
The next few pages provide an overview of how to use the low-level interface. For more 
detailed information, see the Javadocs for the classes. 
Initializing and Freeing Document Processing Resources 
1.  Use the DocumentHelper class to initialize the Director. A value of true indicates 
that the client will use a shared JDBC connection. 
DocumentHelper.initialize(true); 
2.  Use static methods to specify modes for statistics collection and tracing. For 
details about the methods and modes, see the Javadocs for the DocumentHelper 
class. 
DocumentHelper.SetTimedStatistics(true); 
3.  When you have finished processing documents and are ready to close the 
application, use the freeResources method of the DocumentHelper to free all 
resources.  
DocumentHelper.freeResources(); 
Constructing and Processing a Query 
1.
  Construct a QueryHelper object, specifying the document name. (You must 
already have created and deployed the corresponding document definition.) 
QueryHelper queryHelper = new QueryHelper(“PATIENTEVENTHISTORY”); 
2.
  Use the getNewDocument method to construct an empty query document. 
Document queryDoc = queryHelper.getNewDocument(); 
3.  Use the getFirst method for access to the top group of the document. 
Group queryGroup = queryDoc.getFirst(); 
4.
  Fill in the parameters by calling the put method of the Group object. 
queryGroup.put(“PATIENT_ID”, patientId); 










