Package | Description |
---|---|
org.openmrs.logic |
The OpenMRS Logic Service provides access to granular and derived
data.
|
org.openmrs.logic.op |
Modifier and Type | Method and Description |
---|---|
Operator |
LogicExpression.getOperator()
Get the operator for the current LogicExpression
|
Operator |
LogicTransform.getTransformOperator()
Get the
TransformOperator in this LogicTransform object |
Modifier and Type | Method and Description |
---|---|
LogicCriteria |
LogicCriteria.appendCriteria(Operator operator,
LogicCriteria logicCriteria)
Append a LogicCriteria with another LogicCriteria using an operator
|
LogicCriteria |
LogicCriteria.appendExpression(Operator operator,
double operand) |
LogicCriteria |
LogicCriteria.appendExpression(Operator operator,
Operand operand)
Create a new LogicExpression using the
operand and operator and
then append them to the current LogicCriteria |
LogicCriteria |
LogicCriteria.appendExpression(Operator operator,
java.lang.String operand) |
LogicCriteria |
LogicCriteria.applyTransform(Operator operator)
Apply a transformation operator to a logic expression
|
Constructor and Description |
---|
LogicTransform(Operator transformOperator) |
LogicTransform(Operator transformOperator,
java.lang.Integer numResults) |
Modifier and Type | Interface and Description |
---|---|
interface |
ComparisonOperator
Marker interface to keep track of the ComparisonOperator sub type
|
interface |
LogicalOperator
Marker for the logical operator
|
interface |
TransformOperator
Marker for all transform operator.
|
Modifier and Type | Class and Description |
---|---|
class |
After
The After operator works with a date object to tests whether an expression will yield result
after a certain date position.
Example: - logicService.parse("'CD4 COUNT'").after(Context.getDateformat().parse("2009/12/04"); The above will give us a criteria to check if there's "CD4 COUNT" observations after 12/04/2009 |
class |
And
The And operator is a conjunction operator to combine two or more
LogicCriteria objects.Example: - logicService.parse("'CD4 COUNT'").and(logicService.parse("'WEIGHT (KG)'")); The above will give us a criteria to check if there's "CD4 COUNT" and "WEIGHT (KG)" observations |
class |
AsOf
The AsOf operator works with a date object to test whether an expression will yield result after
a certain date position
Example: - logicService.parse("'CD4 COUNT'").asOf(Context.getDateformat().parse("2009/12/04"); The above will give us a criteria to check if there's "CD4 COUNT" observations as of 12/04/2009 |
class |
Average
The Average operator will calculate the average result from a collection of result returned by
the logic expression
Example: - logicService.parse("'CD4 COUNT'").average(); The above will give us a criteria to get the average result of the "CD4 COUNT" observations |
class |
Before
The Before operator works with a date object to tests whether an expression will yield result
before a certain date position.
Example: - logicService.parse("'CD4 COUNT'").before(Context.getDateformat().parse("2009/12/04");
The above will give us a criteria to check if there's "CD4 COUNT" observations before 12/04/2009 |
class |
Contains
The Contains operator will return results that contains the operand .
Example: - logicService.parse("EncounterDataSource.ENCOUNTER_KEY").contains("ADULTRETURN"); The above will give us a criteria to check if there's encounter ADULTRETURN for a certain patients |
class |
Count
The Count operator will return the number of results returned by the logic service
Example: - logicService.parse("EncounterDataSource.ENCOUNTER_KEY").count(); The above will give us a criteria to get the number of encounter type we have in the system |
class |
Distinct
The Distinct operator will filter out duplicate results and return a set of distinct results.
Example: - logicService.parse("EncounterDataSource.ENCOUNTER_KEY").distinct(); The above will give us a criteria to get all distinct encounter type from the system |
class |
Equals
The Equals operator will test whether a result equals to an operand or not.
Example: - logicService.parse("EncounterDataSource.ENCOUNTER_KEY").equals("ADULTRETURN"); The above will give us a criteria to get only ADULTRETURN encounters |
class |
Exists
The Exists operator test whether a criteria will exist for person or not.
Example: - logicService.parse("EncounterDataSource.ENCOUNTER_KEY").equals("ADULTRETURN").exists();
The above will give us a criteria to test whether ADULTRETURN encounter exists or not |
class |
First
The First operator will return a subset result of the entire result returned by the criteria
Example: - logicService.parse("'CD4 COUNT'").first(2); The above will give us a criteria to get the first two "CD4 COUNT" observations |
class |
GreaterThan
The GreaterThan operator will return result that have a greater value than the operand.
Example: - logicService.parse("'CD4 COUNT'").gt(200); The above will give us a criteria to get the "CD4 COUNT" observations that has the value numeric more than 200 |
class |
GreaterThanEquals
The GreaterThanEquals operator will return result that have a greater value than or equals to the
operand.
Example: - logicService.parse("'CD4 COUNT'").gte(200); The above will give us a criteria to get the "CD4 COUNT" observations that has the value numeric more than or equals to 200 |
class |
In
The In operator test whether a value is in a collection of value or not.
Example:
Collection answers = Collection.asList("ADULTRETURN"); The above criteria will test whether a patient have EncounterType in the list |
class |
Last
The Last operator will return a subset result of the entire result returned by the criteria.
Example: - logicService.parse("'CD4 COUNT'").last(2); The above will give us a criteria to get the last two "CD4 COUNT" observations |
class |
LessThan
The LessThan operator will return result that have a less value than the operand.
Example: - logicService.parse("'CD4 COUNT'").gte(200); The above will give us a criteria to get the "CD4 COUNT" observations that has the value numeric less than 200 |
class |
LessThanEquals
The LessThan operator will return result that have a less value than or equals to the operand.
Example: - logicService.parse("'CD4 COUNT'").lte(200); The above will give us a criteria to get the "CD4 COUNT" observations that has the value numeric less than or equals to 200 |
class |
Not
The Not operator will negate the a logic expression
|
class |
NotExists
The NotExists operator test whether a criteria will exist for person or not.
Example: - logicService.parse("EncounterDataSource.ENCOUNTER_KEY").equals("ADULTRETURN").notExists();
The above will give us a criteria to test whether ADULTRETURN encounter exists or not |
class |
Or
The Or operator is a disjunction operator to combine two or more
LogicCriteria objects.Example: - logicService.parse("'CD4 COUNT'").or(logicService.parse("'WEIGHT (KG)'")); The above will give us a criteria to check if there's "CD4 COUNT" or "WEIGHT (KG)" observations |
class |
Within
The Within operator tests whether an expression will yield true for a certain time frame.
Example: - logicService.parse("'CD4 COUNT'").within(Duration.years(2)); The above will give us a criteria to check if there's "CD4 COUNT" observations within the last 2 years |
Modifier and Type | Field and Description |
---|---|
static Operator |
Operator.AFTER |
static Operator |
Operator.AND |
static Operator |
Operator.ASOF |
static Operator |
Operator.AVERAGE |
static Operator |
Operator.BEFORE |
static Operator |
Operator.CONTAINS |
static Operator |
Operator.COUNT |
static Operator |
Operator.DISTINCT |
static Operator |
Operator.EQUALS |
static Operator |
Operator.EXISTS |
static Operator |
Operator.FIRST |
static Operator |
Operator.GT |
static Operator |
Operator.GTE |
static Operator |
Operator.IN |
static Operator |
Operator.LAST |
static Operator |
Operator.LT |
static Operator |
Operator.LTE |
static Operator |
Operator.NOT |
static Operator |
Operator.NOT_EXISTS |
static Operator |
Operator.OR |
static Operator |
Operator.WITHIN |
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.