Java APIs

HDR services are exposed to programmers through Java APIs, which include the following elements:

Client-side Service Classes

The classes described below are called client classes because in remote deployments they reside on the client application side of the network, while the service implementations themselves reside within an application server on a remote computer. All client classes required to use any HDR services are packaged together into a zip file hdr-client-1.0.0-SNAPSHOT.zip in the client directory of hdr-1.0.0-SNAPSHOT.zip. This file must exist in the class path of any application that uses HDR, along with supporting EJB classes.

  • Data Transfer or Value Objects (DTOs): These objects represent snapshots of HDR's internal data model and are used to exchange data between HDR and client applications. Note that for the HL7 package these objects are called RIM objects and reside in the oracle.hsgbu.hdr.hl7.rim package.
  • Factories: Factory classes are used to create data transfer objects for submission to HDR services. Different services use different factories, and some may use multiple factories.
  • Service Interface: Each service has at least one corresponding Java interface. These interfaces contain methods that provide the functionality of the service. Services typically provide CRUD-style operations for some part of the HDR data model, but may also define higher-level business logic. The service interfaces do not provide business logic; business logic is defined by client-developed applications based on HDR.
  • Fetches and Criteria Objects: These objects support the complex search and retrieval operations supported by many services. A criteria object defines a filter that specifies which objects to retrieve. Criteria are analogous to a SQL WHERE clause. A fetchmap defines the kind of data to be returned. It is analogous to a SQL SELECT clause. Criteria and fetches can refer to different (albeit related) objects. For example, a query may be defined to retrieve all encounters (the fetch) for a given patient (the criteria).

Client applications use the ServiceLocator class to retrieve a handle to a service, rather than instantiating services directly. The ServiceLocator provides a single point from which clients establish connections to HDR and access its services. Instantiating the ServiceLocator and establishing a session with HDR is described in "The Service Locator".