See: Description
Interface | Description |
---|---|
ActAttributeCriteria |
Attribute criteria for the
Act RIM class. |
ActConnectiveCriteria |
Connective criteria for the
Act RIM class. |
ActCriteria |
Base criteria for the
Act RIM class. |
ActFetch |
Fetch for the
Act RIM class. |
ActRelationshipAttributeCriteria |
Attribute criteria for the
ActRelationship RIM class. |
ActRelationshipConnectiveCriteria |
Connective criteria for the
ActRelationship RIM class. |
ActRelationshipCriteria |
Base criteria for the
ActRelationship RIM class. |
ActRelationshipFetch |
Fetch for the
ActRelationship RIM class. |
ADAttributeCriteria |
Attribute criteria for the
AD data type. |
ADConnectiveCriteria |
Connective criteria for the
AD data type. |
ADCriteria |
Base criteria for the
AD data type. |
ADXPAttributeCriteria |
Attribute criteria for the
ADXP data type. |
ADXPConnectiveCriteria |
Connective criteria for the
ADXP data type. |
ADXPCriteria |
Base criteria for the
ADXP data type. |
ClassificationAttributeCriteria |
Attribute criteria for Classifications on coded types.
|
ClassificationConnectiveCriteria |
Connective criteria for Classifications on coded types.
|
ClassificationCriteria |
Base criteria for Classfications on coded types.
|
CodedTypeAttributeCriteria |
Attribute criteria for Coded Types, such as
CD . |
CodedTypeConnectiveCriteria |
Connective criteria for the
CodedType data type. |
CodedTypeCriteria |
Base criteria for Coded Types, such as
CD . |
CoreFetch |
Represents a
Fetch on a core RIM object. |
Criteria |
This is the parent query interface and it defines the valid operators that
can be used within a search query.
|
EDAttributeCriteria |
Attribute criteria for the
ED data type. |
EDConnectiveCriteria |
Connective criteria for the
ED data type. |
EDCriteria |
Base criteria for the
ED data type. |
ENAttributeCriteria |
Attribute criteria for the
EN data type. |
ENConnectiveCriteria |
Connective criteria for the
EN data type. |
ENCriteria |
Base criteria for the
EN data type. |
EntityAttributeCriteria |
Attribute criteria for the
Entity RIM class. |
EntityConnectiveCriteria |
Connective criteria for the
Entity RIM class. |
EntityCriteria |
Base criteria for the
Entity RIM class. |
EntityFetch |
Fetch for the
Entity RIM class. |
ENXPAttributeCriteria |
Attribute criteria for the
ENXP data type. |
ENXPConnectiveCriteria |
Connective criteria for the
ENXP data type. |
ENXPCriteria |
Base criteria for the
ENXP data type. |
Fetch |
Provides methods to include or exclude attributes on a value object that is
returned by a fetch method.
|
GTSAttributeCriteria |
Attribute criteria for the
GTS data type. |
GTSConnectiveCriteria |
Connective criteria for the
GTS data type. |
GTSCriteria |
Base criteria for the
GTS data type. |
IncrementalFetch |
Represents a fetch that can be configured to retrieve a subset of the query
results according to a window of result indexes.
|
IVL_INTAttributeCriteria |
Attribute criteria for the
IVL<INT> data type. |
IVL_MOAttributeCriteria |
Attribute criteria for the
IVL<MO> data type. |
IVL_PQAttributeCriteria |
Attribute criteria for the
IVL<PQ> data type. |
IVL_REALAttributeCriteria |
Attribute criteria for the
IVL<REAL> data type. |
IVL_TSAttributeCriteria |
Attribute criteria for the
IVL<TS> data type. |
IVLConnectiveCriteria<T extends ANY> |
Connective criteria for the
IVL<T> data type. |
IVLCriteria<T extends ANY> |
Attribute criteria for the
IVL data type. |
LanguageCommunicationAttributeCriteria |
Attribute criteria for the
LanguageCommunication RIM class. |
LanguageCommunicationConnectiveCriteria |
Connective criteria for the
LanguageCommunication RIM class. |
LanguageCommunicationCriteria |
Base criteria for the
LanguageCommunication RIM class. |
MOAttributeCriteria |
Attribute criteria for the
MO data type. |
MOConnectiveCriteria |
Connective criteria for the
MO data type. |
MOCriteria |
Base criteria for the
MO data type. |
OrderedFetch |
Represents a fetch that sorts the result of its query according to one or
more attributes.
|
ParticipationAttributeCriteria |
Attribute criteria for the
Participation RIM class. |
ParticipationConnectiveCriteria |
Connective criteria for the
Participation RIM class. |
ParticipationCriteria |
Base criteria for the
Participation RIM class. |
ParticipationFetch |
Fetch for the
Participation RIM class. |
PQAttributeCriteria |
Attribute criteria for the
PQ data type. |
PQConnectiveCriteria |
Connective criteria for the
PQ data type. |
PQCriteria |
Base criteria for the
PQ data type. |
RoleAttributeCriteria |
Attribute criteria for the
Role RIM class. |
RoleConnectiveCriteria |
Connective criteria for the
Role RIM class. |
RoleCriteria |
Base criteria for the
Role RIM class. |
RoleFetch |
Fetch for the
Role RIM class. |
RTO_MO_PQAttributeCriteria |
Attribute criteria for the
RTO<MO,PQ> data type. |
RTO_PQAttributeCriteria |
Attribute criteria for the
RTO<PQ,PQ> data type. |
RTOConnectiveCriteria<N extends ANY,D extends ANY> |
Connective criteria for the
RTO<N, D> data type. |
RTOCriteria<N extends ANY,D extends ANY> |
Base criteria for the
RTO<N, D> data type. |
SCAttributeCriteria |
Attribute criteria for the
SC data type. |
SCConnectiveCriteria |
Connective criteria for the
SC data type. |
SCCriteria |
Base criteria for the
SC data type. |
TELAttributeCriteria |
Attribute criteria for the
TEL data type. |
TELConnectiveCriteria |
Connective criteria for the
TEL data type. |
TELCriteria |
Base criteria for the
TEL data type. |
Class | Description |
---|---|
SearchOperator |
Enumerated types for search operators.
|
SetSearchOperator |
Enumerated types for unary search operators.
|
UnarySearchOperator |
Enumerated types for unary search operators.
|
Contains the query component classes used to build a RIM-based query in CTB.
Classes in this package are divided into two types:
XXCriteria
- the base criteria interface
is never used directly but acts as a common parent interface for
XXAttributeCriteria
and XXConnectiveCriteria
.XXAttributeCriteria
- attribute criteria are used to specify
predicates on individual attributes of a class. For example, an ActAttributeCriteria
instance
might include criteria to find acts of the class ENC that became effective in the past 24 hours.XXConnectiveCriteria
- connective criteria are used to combine other criteria using
the logical AND / OR operators. Connective criteria objects are never created or modified directly - they
are produced by the and/or methods available on QueryComponentFactory
.The user can use the QueryComponentFactory
to create Fetch
objects. The fetch creation methods can either be used with no
arguments or with appropriate criteria to create a fetch with a
pre-assigned criteria object. The user may also specify version and
merge characteristics for applicable RIM objects.
The user can use the QueryComponentFactory
to create or join
Criteria objects. The user can join criteria objects to make more
specific (AND) or more general (OR) query criteria.
Special Notes
retrieveXXX(true)
on all attributes and addFetch(xxxFetch)
on
all child objects desired back from the repository. Some attributes are
always retrieved regardless of whether they are requested.
See this note for more information.ParticipationFetch
attached to an ActFetch
; to
navigate from a participation to an act and back to the original act
requires an ActFetch
attached to a ParticipationFetch
attached to an
ActFetch
(with the latter ActFetch
as a different java object from the previous
ActFetch
)The following are code examples to show basic and more complex query creation:
(1a) Find all current, active encounters
// Retrieve the services and factories needed for this example. RimService rimService = serviceLocator.getRimService(); ActFactory actFactory = ActFactory.getInstance(); QueryComponentFactory queryComponentFactory = QueryComponentFactory.getInstance(); // Construct an ActAttributeCriteria, setting the ClassCode == ENC, // StatusCode == ACTIVE and setting the current version flag to true ActAttributeCriteria actAttrCriteria = queryComponentFactory.newActAttributeCriteria(); actAttrCriteria.setClassCode(SearchOperator.EQUALS, ActClass.ENC); actAttrCriteria.setStatusCode(SearchOperator.EQUALS, ActStatus.ACTIVE); actAttrCriteria.setCurrentVersion(true); // Construct an ActFetch with the specified criteria ActFetch actFetch = queryComponentFactory.newActFetch(actAttrCriteria); // Create a query act with the top level fetch, attach it to a // Control Act and submit the ControlAct to the RimService. QueryAct queryAct = actFactory.newQueryAct(actFetch); ControlAct queryControlAct = actFactory.newControlActEvent(null, null); queryControlAct.addOBActRelationship(ActRelationshipType.SUBJ, queryAct); ControlAct queryResult = rimService.submit(queryControlAct);
(1b) Find all current, active encounters in which the current logged-in user (Id=1234) is the attending practitioner - also retrieve the instance identifiers, the subject of the encounter(s), including his/her name, and the scoping entities of these encounters
// Retrieve the services and factories needed for this example. RimService rimService = serviceLocator.getRimService(); ActFactory actFactory = ActFactory.getInstance(); QueryComponentFactory queryComponentFactory = QueryComponentFactory.getInstance(); DataTypeFactory dataTypeFactory = DataTypeFactory.getInstance(); // Construct an ActAttributeCriteria, setting the ClassCode == ENC, // StatusCode == ACTIVE and setting the current version flag to true ActAttributeCriteria actAttrCriteria = queryComponentFactory.newActAttributeCriteria(); actAttrCriteria.setClassCode(SearchOperator.EQUALS, ActClass.ENC); actAttrCriteria.setStatusCode(SearchOperator.EQUALS, ActStatus.ACTIVE); actAttrCriteria.setCurrentVersion(true); // Create the attending practitioner criteria and attach it to the ActCriteria ParticipationAttributeCriteria participationCriteria = queryComponentFactory.newParticipationAttributeCriteria(); participationCriteria.setTypeCode(SearchOperator.EQUALS, ParticipationType.ATND); actAttrCriteria.setParticipationCriteria(participationCriteria, QueryComponentFactory.VERSION_DEPENDENT); // Create the role criteria, set the ID attribute and attach it to the ParticipationCriteria RoleAttributeCriteria roleCriteria = queryComponentFactory.newRoleAttributeCriteria(); UID uidVal = dataTypeFactory.newUID("1234"); II roleId = dataTypeFactory.newII(uidVal, null, null, null); roleCriteria.setId(SetSearchOperator.ANY, new II[] { roleId }); participationCriteria.setRoleCriteria(roleCriteria, QueryComponentFactory.VERSION_DEPENDENT); // Construct an ActFetch with the specified criteria and make IDs for retrieval. ActFetch actFetch = queryComponentFactory.newActFetch(actAttrCriteria); actFetch.retrieveId(true); // Create the participation fetch and attached criteria and attach to the Act Fetch. ParticipationAttributeCriteria subjParticipationCriteria = queryComponentFactory .newParticipationAttributeCriteria(); subjParticipationCriteria.setTypeCode(SearchOperator.EQUALS, ParticipationType.SBJ); ParticipationFetch participationFetch = queryComponentFactory.newParticipationFetch(subjParticipationCriteria); actFetch.addParticipationFetch(participationFetch); // Create a Role Fetch with no criteria and attach it to the Participation fetch. RoleFetch roleFetch = queryComponentFactory.newRoleFetch(); participationFetch.addRoleFetch(roleFetch); // Create the player/scoper entity fetch and mark Name and ID for retrieval. // Note that as we want to get the same attributes for both the player and // scoper, we will use the same EntityFetch. EntityFetch entityFetch = queryComponentFactory.newEntityFetch(); entityFetch.retrieveName(true); entityFetch.retrieveId(true); roleFetch.addPlayerEntityFetch(entityFetch); roleFetch.addScoperEntityFetch(entityFetch); // Create a query act with the top level fetch, attach it to a // Control Act and submit the ControlAct to the RimService. QueryAct queryAct = actFactory.newQueryAct(actFetch); ControlAct queryControlAct = actFactory.newControlActEvent(null, null); queryControlAct.addOBActRelationship(ActRelationshipType.SUBJ, queryAct); ControlAct queryResult = rimService.submit(queryControlAct);
(2) Find all persons with "John" in any part of his name - also retrieve all played and scoped roles for these persons
// Retrieve the services and factories needed for this example. RimService rimService = serviceLocator.getRimService(); ActFactory actFactory = ActFactory.getInstance(); QueryComponentFactory queryComponentFactory = QueryComponentFactory.getInstance(); DataTypeFactory dataTypeFactory = DataTypeFactory.getInstance(); // Create a Name Part Criteria attached to a Name Criteria attaches to an entity Criteria ENXPAttributeCriteria namePartCriteria =queryComponentFactory.newENXPAttributeCriteria(); namePartCriteria.setST(SearchOperator.EQUALS,dataTypeFactory.newST("John")); ENAttributeCriteria nameCriteria = queryComponentFactory.newENAttributeCriteria(); nameCriteria.setENXPCriteria(namePartCriteria); EntityAttributeCriteria entityCriteria = queryComponentFactory.newEntityAttributeCriteria(); entityCriteria.setClassCode(SearchOperator.EQUALS, EntityClass.PSN); entityCriteria.setNameCriteria(nameCriteria); // Create an Entity Fetch with the EntityCriteria and request that Name and Id be retrieved. EntityFetch entityFetch = queryComponentFactory.newEntityFetch(entityCriteria); entityFetch.retrieveName(true); entityFetch.retrieveId(true); // Create an empty Role Fetch and attach it to the Entity Fetch with both a player and // scoper link. As we are not associating any criteria with the Role Fetch it will // return all roles that are played or scoped by the person Entity. RoleFetch roleFetch = queryComponentFactory.newRoleFetch(); entityFetch.addPlayedRoleFetch(roleFetch); entityFetch.addScopedRoleFetch(roleFetch); // Create a query act with the top level fetch, attach it to a // Control Act and submit the ControlAct to the RimService. QueryAct queryAct = actFactory.newQueryAct(entityFetch); ControlAct queryControlAct = actFactory.newControlActEvent(null, null); queryControlAct.addOBActRelationship(ActRelationshipType.SUBJ, queryAct); ControlAct queryResult = rimService.submit(queryControlAct);
HDR Glossary HDR Concept Lists HDR Exceptions HDR Programmer's Guide HDR Implementation Guide HDR Profile Options
Copyright © 2016, 2018, Oracle. All rights reserved