Real Time Information Director User Documentation
RTID Message Format and Programmatic Interfaces
Hewlett-Packard Company 19 529618 - 002
5. Use the query method to execute the query.
Document responseDoc = queryHelper.query(queryDoc);
6. Use methods of the Group object to read elements or for access to child groups
within the document.
Group responseGroup = responseDocument.getfirst();
…
Constructing and Processing an Insert or Update
1.
Construct an UpdateHelper object, specifying the document name. (You must
already have created and deployed the corresponding document definition.)
UpdateHelper updateHelper = new UpdateHelper(“UPDATEENCOUNTER”);
2. Use the getNewDocument method to construct an empty insert or update
document.
Document updateDoc = updateHelper.getNewDocument();
3. Use the getFirst method for access to the top group of the document.
Group updateGroup = updateDoc.getFirst();
4. Use the addChild method, as necessary, to add child groups.
Group chartGroup updateGroup.addChild(“CHART_ENTRY”);
5. Use the put method of the Group object to add data to the Group.
chartGroup.put(“PATIENT_ID”, patientId);
6. Use the update method of the updateHelper object to submit the document.
Response response = updateHelper.update(updateDoc);
7. Use methods of the Group object to read elements or for access to child groups in
the response document.
Group responseGroup = responseDocument.getfirst();
…